Skip to content
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

Use tectonic to build the PDF of the manual #46708

Closed
wants to merge 1 commit into from
Closed

Conversation

ViralBShah
Copy link
Member

@ViralBShah ViralBShah commented Sep 12, 2022

Fix #45027, and also help #46704

Now that we have tectonic as an alternative in Documenter, and also as a JLL, it should be straightforward to use it in the PDF build of the manual. The main challenge is all the pygmentize stuff which seems to take forever.

I'm mainly opening this as a WIP PR. I do feel that this will make it easier for everyone to test the pdf build, if we can use the regular packages and artifacts to provide a tex installation.

@inkydragon Should this be sufficient to generate the PDF?

@ViralBShah ViralBShah marked this pull request as draft September 12, 2022 02:12
@ViralBShah ViralBShah added the docsystem The documentation building system label Sep 12, 2022
@ViralBShah
Copy link
Member Author

ViralBShah commented Sep 12, 2022

The build fails with this:

TeX capacity exceeded, sorry [main memory size=5000000]

Do we need to do something like: https://tex.stackexchange.com/questions/7953/how-to-expand-texs-main-memory-size-pgfplots-memory-overload

@inkydragon
Copy link
Member

inkydragon commented Sep 12, 2022

The main challenge is all the pygmentize stuff which seems to take forever.

Not forever, but it takes a long long time to complete.

workaround: patch documenter.sty

 % listings
-\usepackage{listings, minted}
+\usepackage{listings}
+\usepackage[draft=true]{minted}  % without highlight

TeX capacity exceeded

maybe you just need:

tectonic -X compile --keep-intermediates --keep-logs -Z shell-escape  julia-doc-en.tex

@ViralBShah
Copy link
Member Author

Thanks. That will help with my development, but not with CI, I imagine.

@ViralBShah
Copy link
Member Author

ViralBShah commented Sep 12, 2022

Lots of unicode characters, mainly for emoji like things are missing in the fonts we use here.

Example:

warning: could not represent character "🧕" (0x1f9d5) in font "DejaVu Sans/OT:script=latn;language=dflt;mapping=tex-text;"
warning: TheJuliaLanguage.tex:40259: Missing character: There is no ���� (U+1F9D6) in font DejaVu Sans/OT:script=latn;language=dflt;mapping=tex-text;!
warning: could not represent character "🧖" (0x1f9d6) in font "DejaVu Sans/OT:script=latn;language=dflt;mapping=tex-text;"
warning: TheJuliaLanguage.tex:40259: Missing character: There is no ���� (U+1F9D7) in font DejaVu Sans/OT:script=latn;language=dflt;mapping=tex-text;!
warning: could not represent character "🧗" (0x1f9d7) in font "DejaVu Sans/OT:script=latn;language=dflt;mapping=tex-text;"
warning: TheJuliaLanguage.tex:40259: Missing character: There is no ���� (U+1F9D8) in font DejaVu Sans/OT:script=latn;language=dflt;mapping=tex-text;!
warning: could not represent character "🧘" (0x1f9d8) in font "DejaVu Sans/OT:script=latn;language=dflt;mapping=tex-text;"

@inkydragon
Copy link
Member

The main challenge is all the pygmentize stuff which seems to take forever.

The main problem here is that we need to call the external program pygments in tex.
It looks like pygmentize can only be called one-at-a-time in tex, waiting for io most of the time.
Some parallelization is needed here.

some ideas:

  • Try other highlighting packages: https://github.com/gpoore/pythontex
  • hack minted package. Generate all the required highlighting cache files externally by hand, and then compile them with tex.

Lots of unicode characters, mainly for emoji like things are missing in the fonts we use here.

See JuliaDocs/Documenter.jl#1791
Support for displaying emoji is another issue that can be put aside for a while.

@ViralBShah
Copy link
Member Author

How does texlive currently do it? I see the large compile times only with tectonic, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docsystem The documentation building system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use tectonic to build the pdf version of the manual
2 participants