summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/koma-script/scrhack.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-02-03 22:49:58 +0000
committerKarl Berry <karl@freefriends.org>2019-02-03 22:49:58 +0000
commite60efd509538be0bc0f8615d6574ed6a0f2b77fb (patch)
treec42e1b61bd71d682742118a63996d4aaabfd6502 /Master/texmf-dist/source/latex/koma-script/scrhack.dtx
parent31d02fb11d347d3d4db774ecb1ac326d46f77030 (diff)
koma-script (3feb19)
git-svn-id: svn://tug.org/texlive/trunk@49929 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/scrhack.dtx')
-rw-r--r--Master/texmf-dist/source/latex/koma-script/scrhack.dtx93
1 files changed, 85 insertions, 8 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/scrhack.dtx b/Master/texmf-dist/source/latex/koma-script/scrhack.dtx
index d48e642218f..7c89acf9ce6 100644
--- a/Master/texmf-dist/source/latex/koma-script/scrhack.dtx
+++ b/Master/texmf-dist/source/latex/koma-script/scrhack.dtx
@@ -1,8 +1,8 @@
-% \CheckSum{878}
+% \CheckSum{941}
% \iffalse meta-comment
% ======================================================================
% scrhack.dtx
-% Copyright (c) Markus Kohm, 2008-2018
+% Copyright (c) Markus Kohm, 2008-2019
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
@@ -23,7 +23,7 @@
% of TeX would generate the implementation documentation.
% ----------------------------------------------------------------------
% scrhack.dtx
-% Copyright (c) Markus Kohm, 2008-2018
+% Copyright (c) Markus Kohm, 2008-2019
%
% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
% Version 1.3c, verteilt und/oder veraendert werden.
@@ -62,7 +62,7 @@
% Right brace \} Tilde \~}
%
% \iffalse
-%%% From File: $Id: scrhack.dtx 3019 2018-09-06 15:45:33Z kohm $
+%%% From File: $Id: scrhack.dtx 3063 2019-02-01 07:39:11Z kohm $
%<package&identify>%%% using: package,identify
%<package&option>%%% using: package,option
%<package&body>%%% using: package,body
@@ -71,7 +71,7 @@
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
\begingroup
\def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2018-09-06 17:45:33 +0200 (Thu, 06 Sep 2018) $
+ \filedate$Date: 2019-02-01 08:39:11 +0100 (Fri, 01 Feb 2019) $
\def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
\filerevision$Revision: 1962 $
\endgroup
@@ -938,6 +938,16 @@
% \begin{macrocode}
%<*nomencl&body>
\RequirePackage{tocbasic}
+% \end{macrocode}
+% With \Package{nomencl} > 5.0 this should be all.
+% \begin{macrocode}
+\@ifpackagelater{nomencl}{2019/01/01}{%
+ \PackageInfo{scrhack}{only `tocbasic' loaded for `nomencl'}%
+ \expandafter\endinput
+}{}
+% \end{macrocode}
+% Otherwise we have to patch it.
+% \begin{macrocode}
\addtotoclist[nomencl]{nlo}
\addtotoclist[nomencl]{nls}
\xpatchcmd{\thenomenclature}{%
@@ -955,9 +965,76 @@
}{%
\PackageInfo{scrhack}{\string\thenomenclature\space successfully patched}%
}{%
- \PackageWarning{scrhack}{cannot patch \string\thenomenclature.\MessageBreak
- This could happen if you are using an unknown\MessageBreak
- release of package `nomencl'%
+% \end{macrocode}
+% \changes{v3.26b}{2019/01/23}{new \textsf{nomencl} 5.0}^^A
+% From \textsf{nomencl} 5.0 another code is used if the nomenclature is a
+% chapter. So we need another patch:
+% \begin{macrocode}
+ \xpatchcmd{\thenomenclature}{%
+ \@ifundefined{chapter}%
+ {
+ \section*{\nomname}
+ \if@intoc\addcontentsline{toc}{section}{\nomname}\fi%
+ }%
+ {
+ \chapter*{\nomname}
+ \markboth{\nomname}{\nomname}%
+ \if@intoc\addcontentsline{toc}{chapter}{\nomname}\fi%
+ }%
+ }{%
+ \scr@hack@nomencl@head
+ }{%
+ \PackageInfo{scrhack}{\string\thenomenclature\space successfully patched}%
+ }{%
+% \end{macrocode}
+% \changes{v3.26b}{2019/01/23}{prepared for hoply comming \textsf{nomencl}}^^A
+% But this code is also wrong, because it breaks manual running heads, e.g.,
+% of page style \texttt{myheadings}. So I hope, there will be another code,
+% that needs a somehow different patch:
+% \begin{macrocode}
+ \xpatchcmd{\thenomenclature}{%
+ \@ifundefined{chapter}%
+ {
+ \section*{\nomname}
+ \if@intoc\addcontentsline{toc}{section}{\nomname}\fi%
+ }%
+ {
+ \chapter*{\nomname}
+ \@mkboth{\nomname}{\nomname}%
+ \if@intoc\addcontentsline{toc}{chapter}{\nomname}\fi%
+ }%
+ }{%
+ \scr@hack@nomencl@head
+ }{%
+ \PackageInfo{scrhack}{\string\thenomenclature\space successfully patched}%
+ }{%
+% \end{macrocode}
+% \changes{v3.25}{2019/01/23}{emergency patch added}^^A
+% If this also does not work, we try an emergency patch, that could break
+% things.
+% \begin{macrocode}
+ \xpatchcmd{\thenomenclature}{%
+ \@ifundefined{chapter}%
+ }{%
+ \scr@hack@nomencl@head
+ \@gobbletwo
+ }{%
+ \PackageWarning{scrhack}{%
+ using emergency patch of \string\thenomenclature.\MessageBreak
+ This could happen if you are using an unknown\MessageBreak
+ release of package `nomencl'.\MessageBreak
+ Mostly this patch does work too, but it also could\MessageBreak
+ break `nomencl`. If this happens, please deactivate\MessageBreak
+ the `nomencl` hack of `scrhack`
+ }%
+ }{%
+ \PackageWarning{scrhack}{%
+ cannot patch \string\thenomenclature.\MessageBreak
+ This could happen if you are using an unknown\MessageBreak
+ release of package `nomencl'%
+ }%
+ }%
+ }%
}%
}
%</nomencl&body>