Skip to content

Commit df91b09

Browse files
author
Release Manager
committed
Trac #31397: Work around LaTeX bug for building pdf documentation
Very recent versions of LaTeX won't build the PDF documentation for `en/reference/stats/`, instead yielding an error: {{{ Chapter 8. ! TeX capacity exceeded, sorry [input stack size=5000]. \non@alpherr #1->\@latex@error {\string #1 allowed only in math mode}\@ehd l.2922 ...Samplers for \protect\(\ZZ[x]\protect\)} }}} We should find a workaround. (Split off from #31387 — some more discussion there.) LaTeX bug is fixed at latex3/latex2e#503. URL: https://trac.sagemath.org/31397 Reported by: jhpalmieri Ticket author(s): John Palmieri Reviewer(s): Dave Morris
2 parents 21c7c76 + be98648 commit df91b09

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/sage/docs/conf.py

+8
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,14 @@ def set_intersphinx_mappings(app, config):
507507
508508
\let\textLaTeX\LaTeX
509509
\AtBeginDocument{\renewcommand*{\LaTeX}{\hbox{\textLaTeX}}}
510+
511+
% Workaround for a LaTeX bug -- see trac #31397 and
512+
% https://tex.stackexchange.com/questions/583391/mactex-2020-error-with-report-hyperref-mathbf-in-chapter.
513+
\makeatletter
514+
\pdfstringdefDisableCommands{%
515+
\let\mathbf\@firstofone
516+
}
517+
\makeatother
510518
"""
511519

512520
# Documents to append as an appendix to all manuals.

0 commit comments

Comments
 (0)