mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #5236 from jfbu/latex_reduce_hyperref_warnings
Latex reduce hyperref warnings
This commit is contained in:
commit
e955bccf2b
@ -6,7 +6,7 @@
|
|||||||
%
|
%
|
||||||
|
|
||||||
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
||||||
\ProvidesPackage{sphinx}[2018/03/11 v1.7.2 LaTeX package (Sphinx markup)]
|
\ProvidesPackage{sphinx}[2018/07/18 v1.7.7 LaTeX package (Sphinx markup)]
|
||||||
|
|
||||||
% provides \ltx@ifundefined
|
% provides \ltx@ifundefined
|
||||||
% (many packages load ltxcmds: graphicx does for pdftex and lualatex but
|
% (many packages load ltxcmds: graphicx does for pdftex and lualatex but
|
||||||
@ -1607,6 +1607,23 @@
|
|||||||
\newcommand*\sphinxstylecodecontinues[1]{\footnotesize(#1)}%
|
\newcommand*\sphinxstylecodecontinues[1]{\footnotesize(#1)}%
|
||||||
% figure legend comes after caption and may contain arbitrary body elements
|
% figure legend comes after caption and may contain arbitrary body elements
|
||||||
\newenvironment{sphinxlegend}{\par\small}{\par}
|
\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
|
% For curly braces inside \index macro
|
||||||
\def\sphinxleftcurlybrace{\{}
|
\def\sphinxleftcurlybrace{\{}
|
||||||
|
Loading…
Reference in New Issue
Block a user