Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
merged 1 commit into from
Dec 5, 2019

Conversation

jfbu
Copy link
Contributor

@jfbu jfbu commented Nov 30, 2019

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:

Capture d’écran 2019-12-01 à 00 17 18

@tacaswell tacaswell added this to the v3.2.0 milestone Dec 5, 2019
doc/conf.py Outdated
"""

# Usage of expdlist package (as originally copied over from Numpy's confpy)
Copy link
Member

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.

Copy link
Contributor Author

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}[
Copy link
Member

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.

Copy link
Contributor Author

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).

Copy link
Member

@tacaswell tacaswell left a 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 👍

@jfbu
Copy link
Contributor Author

jfbu commented Dec 5, 2019

@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
@jfbu jfbu force-pushed the latex_authors_on_titlepage branch from 58df2a3 to da0f35a Compare December 5, 2019 08:52
@NelleV NelleV merged commit 6d3f283 into matplotlib:master Dec 5, 2019
@NelleV
Copy link
Member

NelleV commented Dec 5, 2019

Thanks @jfbu !

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Dec 5, 2019
tacaswell added a commit that referenced this pull request Dec 5, 2019
…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)
@jfbu jfbu deleted the latex_authors_on_titlepage branch December 5, 2019 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants