diff --git a/CHANGES b/CHANGES index f80a760ea..0179e1454 100644 --- a/CHANGES +++ b/CHANGES @@ -235,6 +235,10 @@ Bugs fixed * #5198: document not in toctree warning when including files only for parallel builds +* LaTeX: reduce "Token not allowed in a PDF string" hyperref warnings in latex + console output (refs: #5136) +* LaTeX: suppress "remreset Warning: The remreset package is obsolete" in latex + console output with recent LaTeX (refs: #5137) Testing -------- diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index 5bfc44e60..a677be3b7 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -182,7 +182,10 @@ % control caption around literal-block \RequirePackage{capt-of} \RequirePackage{needspace} -\RequirePackage{remreset}% provides \@removefromreset +% LaTeX 2018-04-01 and later provides \@removefromreset +\ltx@ifundefined{@removefromreset} + {\RequirePackage{remreset}} + {}% avoid warning % to make pdf with correct encoded bookmarks in Japanese % this should precede the hyperref package \ifx\kanjiskip\@undefined