mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
LaTeX: reduce hyperref warnings related to PDF bookmarks
This commit is contained in:
parent
f6754d4336
commit
3bdf67a6b4
@ -1607,6 +1607,23 @@
|
||||
\newcommand*\sphinxstylecodecontinues[1]{\footnotesize(#1)}%
|
||||
% figure legend comes after caption and may contain arbitrary body elements
|
||||
\newenvironment{sphinxlegend}{\par\small}{\par}
|
||||
% reduce hyperref "Token not allowed in a PDF string" warnings on PDF builds
|
||||
\AtBeginDocument{\pdfstringdefDisableCommands{%
|
||||
% all "protected" macros possibly ending up in section titles should be here
|
||||
\let\sphinxstyleemphasis \@firstofone
|
||||
\let\sphinxstyleliteralemphasis \@firstofone
|
||||
\let\sphinxstylestrong \@firstofone
|
||||
\let\sphinxstyleliteralstrong \@firstofone
|
||||
\let\sphinxstyleabbreviation \@firstofone
|
||||
\let\sphinxstyleliteralintitle \@firstofone
|
||||
\let\sphinxupquote \@firstofone
|
||||
\let\sphinxstrong \@firstofone
|
||||
\let\sphinxcode \@firstofone
|
||||
\let\sphinxbfcode \@firstofone
|
||||
\let\sphinxemail \@firstofone
|
||||
\let\sphinxcrossref \@firstofone
|
||||
\let\sphinxtermref \@firstofone
|
||||
}}
|
||||
|
||||
% For curly braces inside \index macro
|
||||
\def\sphinxleftcurlybrace{\{}
|
||||
|
Loading…
Reference in New Issue
Block a user