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

fix pdf docs #12146

Closed
tacaswell opened this issue Sep 18, 2018 · 4 comments
Closed

fix pdf docs #12146

tacaswell opened this issue Sep 18, 2018 · 4 comments

Comments

@tacaswell
Copy link
Member

The latexpdf docs are not building cleanly again due to names with non-latin characters and a music note in the docs:

  • Андрей Парамонов
  • David Trémouilles
  • $♫$

make latexpdf is enough to trigger this.

We either need to sort out how to convince pdflatex to play nice with unicode or to switch sphinx to using xetex (or one of the other modern ones?)

@tacaswell tacaswell added this to the v3.0.0-doc milestone Sep 18, 2018
@tacaswell
Copy link
Member Author

We may also want to revert af10266 which made the html less pretty, but makes the latex build.

@anntzer
Copy link
Contributor

anntzer commented Sep 18, 2018

Something like

latex_engine = 'lualatex'  # or xelatex

latex_elements = {
    'babel': r'\usepackage{babel}',
    'fontpkg': r'\setmainfont{DejaVu Serif}',
}

in conf.py works on a minimal sphinx example.

For some reason I need to force the use of babel, I get an error with polyglossia (the default on lualatex/xelatex), dunno why, you may not need it.
If you don't set the font to DejaVu (for example), then you get the default (lmodern) which doesn't have coverage for cyrillic and music notes, so the docs do build but the missing characters are just gone.
As for the choice between lualatex and xelatex, in my experience xelatex is faster (not a negligible point for building mpl's docs I guess) but I think(?) lualatex is the more "official", actively developed successor to pdflatex.

@tacaswell
Copy link
Member Author

👍 just figured out half of this.

I am just going to push this fix to the docs branch.

tacaswell pushed a commit that referenced this issue Sep 19, 2018
@anntzer
Copy link
Contributor

anntzer commented Sep 19, 2018

Closed by 5758fc8

@anntzer anntzer closed this as completed Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants