-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Improve display of author names on PDF titlepage of matplotlib own docs #15799
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
Conversation
doc/conf.py
Outdated
""" | ||
|
||
# Usage of expdlist package (as originally copied over from Numpy's confpy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It in ok to just remove this, the comment in the commit log is good enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this commit properly belongs to #15797, I will do the change over there and keep here only the fix proper for author display on title page.
doc/conf.py
Outdated
# the Unicode codepoints needed for the section about Mathtext | ||
# "Writing mathematical expressions" | ||
latex_elements['fontpkg'] = r""" | ||
\setmainfont{XITS}[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On one hand, I would prefer to stick to dejavu to match the default font of our figurse, on the other hand the website does not do that and it may be a tad too cute.
Making the build cleaner seems like a greater good, than the font consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of this is related to the documentation of "Mathtext". It contains extensive tables of math symbols, matching Unicode code points to LaTeX-like math markup. For the PDF it appears thus needed that the text font contains glyphs for all those Unicode code points. DejaVu was lacking 134 of them (grep "There is no" Matplotlib.log | sort -u
).
There is still some piece of the documentation which will renders non satisfactorily because it is supposed to illustrate various fonts, but the PDF uses only one! (it is possible probably, but complicated and will need raw:: latex
directives, to fix that).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor nits.but over all 👍
@tacaswell Thanks for reviewing, for reasons explained at #15797, I will now update to keep only the fix for the author display on titlepage... sorry about this as your reviewing refers to patches which will now only be over there. |
And give \and suitable definition for each author name to be on one line. Relates: sphinx-doc/sphinx#6875 sphinx-doc/sphinx#6876
58df2a3
to
da0f35a
Compare
Thanks @jfbu ! |
…titlepage of matplotlib own docs
…799-on-v3.2.x Backport PR #15799 on branch v3.2.x (Improve display of author names on PDF titlepage of matplotlib own docs)
PR Summary
For LaTeX PDF title page, author names need to be separated by
\and
for better rendering (else the comma separated list of names overflows to the right of the page, see sphinx-doc/sphinx#6875).And
\and
is given a special definition so that each author name is on one line (else see picture at sphinx-doc/sphinx#6876 to see how it would look like).This incorporates #15797 to allow PDF build of matplotlib documentation.
Result looks like this: