-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically install hyphenation patterns when using polyglossia #322
Comments
That sounds simple enough to implement (should be similar to ceb2001). Do you want to try a pull request?
It seems the implementation won't be very clean. I tend to let users manually install the package.
I'm not familiar with polyglossia or the hyphen-* packages, and I'm not sure if they should be included by default. The size doesn't look bad, though. Thanks! |
Sure, I can give it a crack in ~2-3 weeks after I come back from holiday.
If I'm not mistaken, the hyphen-* packages are not only used by polyglossia but babel too. Maybe even if one doesn't load babel? |
Just started digging into this, and immediately ran into a problem: LaTeX wraps logfiles. It came up in my original examples but there are even longer language names (not to mention what to do with English variants).
Warnings for babel are similar, and the current regex looks for the same pattern but apparently line breaks cannot occur there? Have you ever had to deal with linebreaks in logfiles? I haven't found any logic for that in the package. LaTeX can be set to wrap longer lines by setting the |
We can configure
We need to run that in these places (after the lines): https://github.com/yihui/tinytex/blob/10dd9361a97e6c1d56e0b42c58f08c5dd9db45c4/R/install.R#L382-L383 @svraka You can include these changes in your PR or send a separate PR. If you are not familiar with the codebase of tinytex, I can also let @cderv do it since it's simple enough. Thanks! Just for the record, it's also possible not to configure pdflatex -cnf-line=max_print_line=10000 test.tex Personally I prefer LaTeX not to hard-wrap the log because that makes the log slightly more trickier to parse. I tend to just change tlmgr conf texmf --delete max_print_line |
Since I haven't heard back, I just added the |
Thanks! Unfortunately I didn't have any time to work on a PR I hope to pick it up soon. |
That's okay. I just did the work by myself. You may test the current dev version if you are interested. Thanks! |
…0.35 Christophe Dervieux (2): Update and simplify GHA workflow (#334) remove curl to see if action is fixed (#337) Yihui Xie (10): start the next version close #332: automatically switch to the 'latest' version when the 'daily' version is not accessible in install_tinytex() run `tlmgr conf texmf max_print_line 10000` to avoid wrapping lines in LaTeX log: rstudio/tinytex#322 (comment) fix #322: automatically install hypen-* packages in case of polyglossia warnings improve the fix for #332: when installing the daily build of TinyTeX, also try https://github.com/yihui/tinytex-releases/releases/tag/daily if yihui.org is not accessible in the batch/shell scripts to install the pre-built version of TinyTeX, download the installers from https://github.com/yihui/tinytex-releases/releases/tag/daily instead of yihui.org because the latter seems to unstable (for unknown reasons) more master -> main retry curl/wget in case of download failures (further enhance the fix for #270) http -> https CRAN release v0.35
Commit ceb2001 added support for automatic installation of some babel language packages. The same issue arises with polyglossia, used with XeLaTeX, as polyglossia only throws warnings if hyphenation patterns are not available.
Here's a minimal reproducible document:
And here's the relevant part from the logs:
In this case the required package for hyphenation patterns is
hyphen-hungarian
, which can be deduced from the logs. I haven't tested all languages but my understanding is that it should work for most languages.Although English seems to be a special case, if you want use British spelling.
This requires the
hyphen-english
package. However, according to its description:I would argue TinyTeX should even include this packages by default, as it would be useful for anyone writing in English. The size is 201k.
By filing an issue to this repo, I promise that
xfun::session_info('tinytex')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('yihui/tinytex')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: