From 3bdf67a6b49c819d770b4730f13f658d91b2bfff Mon Sep 17 00:00:00 2001 From: jfbu Date: Wed, 18 Jul 2018 16:57:33 +0200 Subject: [PATCH 1/2] LaTeX: reduce hyperref warnings related to PDF bookmarks --- sphinx/texinputs/sphinx.sty | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index 6a885c3f5..18ed69525 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -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{\{} From 685b6802952090ac27ffa14376abc36712723329 Mon Sep 17 00:00:00 2001 From: jfbu Date: Wed, 18 Jul 2018 16:58:41 +0200 Subject: [PATCH 2/2] LaTeX: update date of Sphinx LaTeX style file --- sphinx/texinputs/sphinx.sty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index 18ed69525..2855f1a35 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -6,7 +6,7 @@ % \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 % (many packages load ltxcmds: graphicx does for pdftex and lualatex but