Skip to content

Commit

Permalink
Change slightly console output of LaTeX deprecation macro
Browse files Browse the repository at this point in the history
  • Loading branch information
jfbu committed May 5, 2017
1 parent da8007c commit 698d8d4
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions sphinx/texinputs/sphinx.sty
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@

%% for deprecation warnings
\newcommand\sphinxdeprecationwarning[4]{% #1 the deprecated macro or name,
% #2 = version when deprecated, #3 = version when removed, #4 = message
% #2 = when deprecated, #3 = when removed, #4 = additional info
\edef\spx@tempa{\detokenize{#1}}%
\spx@ifundefined{sphinx_depr_\spx@tempa}{%
\global\expandafter\let\csname sphinx_depr_\spx@tempa\endcsname\spx@tempa
\expandafter\AtEndDocument\expandafter{\expandafter\let\expandafter
\sphinxdeprecatedmacro\csname sphinx_depr_\spx@tempa\endcsname
\PackageWarningNoLine{sphinx}{^^J**** SPHINX DEPRECATION WARNING:^^J
\sphinxdeprecatedmacro\space will be (or has been)
deprecated at Sphinx #2^^J and will be removed at Sphinx #3.^^J
\sphinxdeprecatedmacro^^J
\@spaces- is deprecated at Sphinx #2^^J
\@spaces- and removed at Sphinx #3.^^J
#4^^J****}}%
}{% warning already emitted (at end of latex log), don't repeat
}}
Expand Down Expand Up @@ -1361,8 +1362,10 @@
Anyhow, Sphinx mark-up uses only \string\sphinx\@tempa.}%
% and also at end of log for better visibility
\expandafter\sphinxdeprecationwarning\expandafter{\csname\@tempa\endcsname}{1.6}{1.7}
{\sphinxdeprecatedmacro\space already existed at Sphinx loading time! Not redefined!^^J
Sphinx mark-up uses only \string\sphinx\expandafter\@gobble\sphinxdeprecatedmacro.}%
{\sphinxdeprecatedmacro already existed at Sphinx loading time! Not redefined!^^J
Sphinx mark-up uses only \string\sphinx\expandafter\@gobble\sphinxdeprecatedmacro.^^J
Note: if this warning is about macro \string\strong, it presumably results^^J
from fontspec 2.6 having defined it prior to Sphinx. No need for alarm!}%
}%
\fi
\fi
Expand Down

0 comments on commit 698d8d4

Please sign in to comment.