New feature: hyphenation support using Hyphenopoly.js#34
Open
RLesur wants to merge 9 commits intorstudio:mainfrom
Open
New feature: hyphenation support using Hyphenopoly.js#34RLesur wants to merge 9 commits intorstudio:mainfrom
RLesur wants to merge 9 commits intorstudio:mainfrom
Conversation
…poly assets are located
need to add the other elements in the list, otherwise they will be hyphenated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here's a proposal for #33 .
It uses the Hyphenopoly.js library.
Hyphenopoly.js integration was not straightforward for many reasons:
mathclass must not be hyphenated (otherwise, MathJax does not work properly). See/inst/resources/html/paged.html.Hyphenopoly.setup.dontHyphenateobject.self_contained = TRUE(but I am not familiar with these technologies). However, it seems that it is not yet possible. In this PR, the user cannot useself_contained = TRUEwith hyphenation. Be careful, I've inverted the default value forself_contained(it could be confusing for users, tell me what do you prefer).inst/resources/js/Hyphenopoly/configHyphenopoly.js.Hyphenopoly.requireobject: I've forced the use of 6 languages. I think it would be better if the user could declare the languages with something likehtml_paged(lang = c('en-us', 'pt'), ...). But I did not find the way to implement such a solution. You can find the languages supported by Hyphenopoly.js ininst/resources/js/Hyphenopoly/patterns/.