Skip to content

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

Merged
serhiy-storchaka merged 2 commits into
python:mainfrom
jfbu:latexVerbatim
May 30, 2026
Merged

[DOC] Remove unneeded LaTeX code from latex_elements['preamble']#124630
serhiy-storchaka merged 2 commits into
python:mainfrom
jfbu:latexVerbatim

Conversation

@jfbu
Copy link
Copy Markdown
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
Copy Markdown

python-cla-bot Bot commented Apr 18, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 18, 2026
Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 👍

@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) May 30, 2026 15:12
@serhiy-storchaka serhiy-storchaka merged commit 25a5d87 into python:main May 30, 2026
30 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip issue skip news stale Stale PR or inactive for long period of time.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants