Skip to content

[DOC] Remove unneeded LaTeX code from latex_elements['preamble'] #124630

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jfbu
Copy link
Contributor

@jfbu jfbu commented Sep 26, 2024

There is absolutely no reason in cpython Doc/conf.py that I can see to get all of the latex documents giving PDF via the xelatex tool to execute in their preambles:

\let\Verbatim=\OriginalVerbatim
\let\endVerbatim=\endOriginalVerbatim

These two lines do nothing and simply go full circle to end up letting \Verbatim be ... \Verbatim. From file sphinxlatexliterals.sty (which gets executed earlier than above preamble additions)

% Prior to Sphinx 1.5, \Verbatim and \endVerbatim were modified by Sphinx.
% The aliases defined here are used in sphinxVerbatim environment and can
% serve as hook-points with no need to modify \Verbatim itself.
\let\OriginalVerbatim   \Verbatim
\let\endOriginalVerbatim\endVerbatim

I don't know why this was added to conf.py at some point, but it definitely is not to be done now, and may confuse people who take big project such as cpython as models or comparison for using Sphinx.


📚 Documentation preview 📚: https://cpython-previews--124630.org.readthedocs.build/

@picnixz picnixz added skip issue skip news docs Documentation in the Doc dir labels Sep 26, 2024
@picnixz picnixz requested a review from AA-Turner September 26, 2024 19:31
@python-cla-bot
Copy link

python-cla-bot bot commented Apr 18, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants