From c1b657195f44402f5c3e6183d1746cfc6f91791a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 7 Jul 2018 20:46:58 +0000 Subject: lwarp (7jul18) git-svn-id: svn://tug.org/texlive/trunk@48159 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/lwarp/lwarp-algorithm2e.sty | 16 +- Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty | 3 - Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty | 2 +- Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty | 16 +- .../tex/latex/lwarp/lwarp-attachfile.sty | 55 ++ .../tex/latex/lwarp/lwarp-attachfile2.sty | 88 +++ Master/texmf-dist/tex/latex/lwarp/lwarp-cases.sty | 42 ++ .../texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty | 4 +- .../texmf-dist/tex/latex/lwarp/lwarp-enumitem.sty | 4 +- Master/texmf-dist/tex/latex/lwarp/lwarp-errata.sty | 36 +- .../texmf-dist/tex/latex/lwarp/lwarp-idxlayout.sty | 6 +- .../texmf-dist/tex/latex/lwarp/lwarp-imakeidx.sty | 164 +++++ Master/texmf-dist/tex/latex/lwarp/lwarp-index.sty | 71 ++ .../texmf-dist/tex/latex/lwarp/lwarp-intopdf.sty | 24 + .../texmf-dist/tex/latex/lwarp/lwarp-makeidx.sty | 25 + .../texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty | 12 +- .../texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty | 6 +- .../tex/latex/lwarp/lwarp-patch-komascript.sty | 18 + .../tex/latex/lwarp/lwarp-patch-memoir.sty | 60 +- .../texmf-dist/tex/latex/lwarp/lwarp-pdfpages.sty | 104 +++ Master/texmf-dist/tex/latex/lwarp/lwarp-pdfx.sty | 21 + .../texmf-dist/tex/latex/lwarp/lwarp-quoting.sty | 13 +- .../tex/latex/lwarp/lwarp-repeatindex.sty | 24 + .../texmf-dist/tex/latex/lwarp/lwarp-schemata.sty | 4 +- Master/texmf-dist/tex/latex/lwarp/lwarp-soul.sty | 2 +- .../texmf-dist/tex/latex/lwarp/lwarp-splitidx.sty | 64 ++ Master/texmf-dist/tex/latex/lwarp/lwarp-subfig.sty | 2 +- .../texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty | 208 +++--- .../texmf-dist/tex/latex/lwarp/lwarp-theorem.sty | 6 +- Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty | 24 +- Master/texmf-dist/tex/latex/lwarp/lwarp.sty | 756 ++++++++++++--------- 31 files changed, 1325 insertions(+), 555 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty create mode 100644 Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty create mode 100644 Master/texmf-dist/tex/latex/lwarp/lwarp-cases.sty create mode 100644 Master/texmf-dist/tex/latex/lwarp/lwarp-imakeidx.sty create mode 100644 Master/texmf-dist/tex/latex/lwarp/lwarp-index.sty create mode 100644 Master/texmf-dist/tex/latex/lwarp/lwarp-intopdf.sty create mode 100644 Master/texmf-dist/tex/latex/lwarp/lwarp-makeidx.sty create mode 100644 Master/texmf-dist/tex/latex/lwarp/lwarp-pdfpages.sty create mode 100644 Master/texmf-dist/tex/latex/lwarp/lwarp-pdfx.sty create mode 100644 Master/texmf-dist/tex/latex/lwarp/lwarp-repeatindex.sty create mode 100644 Master/texmf-dist/tex/latex/lwarp/lwarp-splitidx.sty (limited to 'Master/texmf-dist/tex/latex/lwarp') diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithm2e.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithm2e.sty index 8ecc6b19b70..abd4b8d1748 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithm2e.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithm2e.sty @@ -47,26 +47,26 @@ }{}% } \renewcommand{\algocf@makecaption}[2]{% -\LWR@caption@begin{algocf}% +\LWR@HTML@caption@begin{algocf}% \algocf@captiontext{#1}{#2}% -\LWR@caption@end% +\LWR@HTML@caption@end% } \renewcommand{\algocf@makecaption@plain}[2]{% - \LWR@caption@begin{algocf}% + \LWR@HTML@caption@begin{algocf}% \algocf@captiontext{#1}{#2}% - \LWR@caption@end% + \LWR@HTML@caption@end% } \renewcommand{\algocf@makecaption@boxed}[2]{% - \LWR@caption@begin{algocf}% + \LWR@HTML@caption@begin{algocf}% \algocf@captiontext{#1}{#2}% - \LWR@caption@end% + \LWR@HTML@caption@end% } \renewcommand{\algocf@makecaption@ruled}[2]{% - \LWR@caption@begin{algocf}% + \LWR@HTML@caption@begin{algocf}% \algocf@captiontext{#1}{#2}% - \LWR@caption@end% + \LWR@HTML@caption@end% } \long\def\algocf@latexcaption#1[#2]#3{% original definition of caption \boolfalse{LWR@algocf@dopars}% lwarp diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty index 9bc05c9f0b1..828a4f0f99d 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty @@ -15,9 +15,7 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. - \LWR@ProvidesPackagePass{alltt} - \AfterEndPreamble{ \LWR@traceinfo{Patching alltt.} \AtBeginEnvironment{alltt}{% @@ -28,7 +26,6 @@ \LWR@afterendverbatim{2}% } } - \endinput %% %% End of file `lwarp-alltt.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty index 7704450d15c..a70b745aec8 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty @@ -45,7 +45,7 @@ \else % numbered theorem, need to check for optional arg \def\@tempa{\@oparg{\@ynthm{#2}}[]}% \fi - \AtBeginEnvironment{#2}{\edef\LWR@thisthmstyle{\csuse{LWR@thmstyle#2}}}% lwarp + \AtBeginEnvironment{#2}{\edef\LWR@thisthmstyle{\@nameuse{LWR@thmstyle#2}}}% lwarp }% \@tempa } diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty index 09dd18bc59a..7cfc796ca70 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty @@ -15,17 +15,15 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\LWR@ProvidesPackagePass{array} -\let\LWR@origfirsthline\firsthline -\let\LWR@origlasthline\lasthline +\let\firsthline\relax +\let\lasthline\relax -\appto\LWR@restoreorigformatting{% -\let\firsthline\LWR@origfirsthline% -\let\lasthline\LWR@origlasthline% -} +\LWR@ProvidesPackagePass{array} +\newcommand*{\LWR@HTML@firsthline}{\LWR@HTMLhline}% +\LWR@expandableformatted{firsthline} -\renewcommand*{\firsthline}{\LWR@HTMLhline}% -\renewcommand*{\lasthline}{\LWR@HTMLhline}% +\newcommand*{\LWR@HTML@lasthline}{\LWR@HTMLhline}% +\LWR@expandableformatted{lasthline} \endinput %% %% End of file `lwarp-array.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty new file mode 100644 index 00000000000..e52a1f7f2dd --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty @@ -0,0 +1,55 @@ +%% +%% This is file `lwarp-attachfile.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `attachfile') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. + +\LWR@ProvidesPackagePass{attachfile} +\newenvironment*{LWR@attachfile@icon} +{ + \begin{lateximage}*% + [-attachfile-]% + [% + \detokenize\expandafter{\atfi@icon@icon}-% + \detokenize\expandafter{\atfi@color@rgb}% + ]% +} +{ + \end{lateximage} +} +\xpretocmd{\atfi@acroGraph}{\LWR@attachfile@icon}{}{} +\xapptocmd{\atfi@acroGraph}{\endLWR@attachfile@icon}{}{} + +\xpretocmd{\atfi@acroPaperclip}{\LWR@attachfile@icon}{}{} +\xapptocmd{\atfi@acroPaperclip}{\endLWR@attachfile@icon}{}{} + +\xpretocmd{\atfi@acroPushPin}{\LWR@attachfile@icon}{}{} +\xapptocmd{\atfi@acroPushPin}{\endLWR@attachfile@icon}{}{} + +\xpretocmd{\atfi@acroTag}{\LWR@attachfile@icon}{}{} +\xapptocmd{\atfi@acroTag}{\endLWR@attachfile@icon}{}{} +\DeclareRobustCommand{\atfi@embedfile}[1]{} +\newcommand*{\LWR@attachfile@appearance}{} + +\DeclareRobustCommand{\atfi@set@appearance}[1]{% + \def\LWR@attachfile@appearance{#1}% +} +\DeclareRobustCommand{\atfi@insert@file@annot}[1]{% + \href{#1}{\LWR@attachfile@appearance}% +} + +\endinput +%% +%% End of file `lwarp-attachfile.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty new file mode 100644 index 00000000000..5e1b0c09299 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty @@ -0,0 +1,88 @@ +%% +%% This is file `lwarp-attachfile2.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `attachfile2') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. + +\LWR@ProvidesPackagePass{attachfile2} +\def\LWR@attachfiletwo@color{}% + +\define@key{AtFi}{color}{% + \def\LWR@attachfiletwo@color{#1}% lwarp + \HyColor@AttachfileColor{#1}% + \atfi@color@tex\atfi@color@inline\atfi@color@annot + {attachfile2}{color}% +} +\newenvironment*{LWR@attachfile@icon} +{ + \begin{lateximage}*% + [-attachfile-]% + [% + \detokenize\expandafter{\atfi@icon@icon}-% + \detokenize\expandafter{\LWR@attachfiletwo@color}% + ]% +} +{ + \end{lateximage} +} +\xpretocmd{\atfi@acroGraph}{\LWR@attachfile@icon}{}{} +\xapptocmd{\atfi@acroGraph}{\endLWR@attachfile@icon}{}{} + +\xpretocmd{\atfi@acroPaperclip}{\LWR@attachfile@icon}{}{} +\xapptocmd{\atfi@acroPaperclip}{\endLWR@attachfile@icon}{}{} + +\xpretocmd{\atfi@acroPushPin}{\LWR@attachfile@icon}{}{} +\xapptocmd{\atfi@acroPushPin}{\endLWR@attachfile@icon}{}{} + +\xpretocmd{\atfi@acroTag}{\LWR@attachfile@icon}{}{} +\xapptocmd{\atfi@acroTag}{\endLWR@attachfile@icon}{}{} +\DeclareRobustCommand{\atfi@embedfile}[1]{} +\newcommand*{\LWR@attachfile@appearance}{} + +\def\atfi@set@appearance@icon{% + \atfi@set@appearance{\csname atfi@acro\atfi@icon@icon\endcsname}% +} + +\DeclareRobustCommand{\atfi@set@appearance}[1]{% + \def\LWR@attachfile@appearance{#1}% +} +\DeclareRobustCommand{\atfi@insert@file@annot}[1]{% + \href{#1}{\LWR@attachfile@appearance}% +} +\DeclareRobustCommand{\notextattachfile}[2][]{% + \begingroup + \atfi@setup{#1}% + \ifatfi@print + \leavevmode + \begingroup + \HyColor@UseColor\atfi@color@tex + \LWR@textcurrentcolor{#2}% lwarp + \endgroup + \fi + \endgroup +} +\DeclareRobustCommand{\noattachfile}[1][]{% + \begingroup + \atfi@setup{#1}% + \atfi@set@appearance@icon + \ifatfi@print + \LWR@attachfile@appearance% lwarp + \fi + \endgroup +} + +\endinput +%% +%% End of file `lwarp-attachfile2.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-cases.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-cases.sty new file mode 100644 index 00000000000..dc52db4538f --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-cases.sty @@ -0,0 +1,42 @@ +%% +%% This is file `lwarp-cases.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `cases') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackagePass{cases} +\BeforeBeginEnvironment{numcases}{ + \begin{BlockClass}{displaymathnumbered} + \LWR@newautoidanchor% + \booltrue{LWR@indisplaymathimage}% + \begin{lateximage}[-cases- \mathimagename] +} + +\AfterEndEnvironment{numcases}{ + \end{lateximage}\end{BlockClass} +} + +\BeforeBeginEnvironment{subnumcases}{ + \begin{BlockClass}{displaymathnumbered} + \LWR@newautoidanchor% + \booltrue{LWR@indisplaymathimage}% + \begin{lateximage}[-cases- \mathimagename] +} + +\AfterEndEnvironment{subnumcases}{ + \end{lateximage}\end{BlockClass} +} +\endinput +%% +%% End of file `lwarp-cases.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty index 1778ac8a7de..9167558c84c 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty @@ -47,7 +47,7 @@ \def\diagbox@double#1#2#3{% \setkeys{diagbox}{dir=NW,#1}% -\csuse{LWR@diagbox\diagbox@dir}{#2}{#3}% +\@nameuse{LWR@diagbox\diagbox@dir}{#2}{#3}% } \newcommand{\LWR@diagboxTNW}[3]{% @@ -71,7 +71,7 @@ } \def\diagbox@triple#1#2#3#4{% \setkeys{diagbox}{dir=NW,#1}% -\csuse{LWR@diagboxT\diagbox@dir}{#3}{#2}{#4}% +\@nameuse{LWR@diagboxT\diagbox@dir}{#3}{#2}{#4}% } \endinput %% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-enumitem.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-enumitem.sty index a4a24b60a44..3b975346e6a 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-enumitem.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-enumitem.sty @@ -22,8 +22,8 @@ \renewcommand*{\newlist}[3]{% \LWR@orignewlist{#1}{#2}{#3}% -\AtBeginEnvironment{#1}{\csuse{LWR@#2start}}% -\AtEndEnvironment{#1}{\csuse{LWR@#2end}}% +\AtBeginEnvironment{#1}{\@nameuse{LWR@#2start}}% +\AtEndEnvironment{#1}{\@nameuse{LWR@#2end}}% } \end{warpHTML} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-errata.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-errata.sty index a5b1afe8c3a..66589b327c6 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-errata.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-errata.sty @@ -24,61 +24,37 @@ {$_a^{\arabic{erratum}}$} {\textsubscript{a}\textsuperscript{\arabic{erratum}}} {} - { - \PackageError{lwarp} - {Unable to patch the erratum package, erratumAdd macro} - {Please contact the author of the lwarp package.} - } + {\LWR@patcherror{erratum}{erratumAdd}} \xpatchcmd{\erratumDelete} {$_d^{\arabic{erratum}}$} {\textsubscript{d}\textsuperscript{\arabic{erratum}}} {} - { - \PackageError{lwarp} - {Unable to patch the erratum package, erratumDelete macro} - {Please contact the author of the lwarp package.} - } + {\LWR@patcherror{erratum}{erratumDelete}} \xpatchcmd{\erratumReplace} {$_r^{\arabic{erratum}}$} {\textsubscript{r}\textsuperscript{\arabic{erratum}}} {} - { - \PackageError{lwarp} - {Unable to patch the erratum package, erratumReplace macro} - {Please contact the author of the lwarp package.} - } + {\LWR@patcherror{erratum}{erratumReplace}} \xpatchcmd{\erratum} {$_a$} {\textsubscript{a}} {} - { - \PackageError{lwarp} - {Unable to patch the erratum package, eDelete macro} - {Please contact the author of the lwarp package.} - } + {\LWR@patcherror{erratum}{erratumDelete}} \xpatchcmd{\erratum} {$_d^{\@thefnmark}$} {\textsubscript{d}\textsuperscript{\@thefnmark}} {} - { - \PackageError{lwarp} - {Unable to patch the erratum package, eDelete macro} - {Please contact the author of the lwarp package.} - } + {\LWR@patcherror{erratum}{eDelete}} \xpatchcmd{\erratum} {$_r^{\@thefnmark}$} {\textsubscript{r}\textsuperscript{\@thefnmark}} {} - { - \PackageError{lwarp} - {Unable to patch the erratum package, eReplace macro} - {Please contact the author of the lwarp package.} - } + {\LWR@patcherror{erratum}{eReplace}} \preto\PrintErrata{\LWR@orignewpage} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-idxlayout.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-idxlayout.sty index 08012499224..0afeb859509 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-idxlayout.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-idxlayout.sty @@ -18,13 +18,13 @@ \LWR@ProvidesPackageDrop{idxlayout} \newcommand{\LWR@indexprenote}{} -\renewcommand*{\printindex} -{ +\preto\printindex{ + +\LWR@orignewpage \LWR@startpars \LWR@indexprenote -\LWR@origprintindex } \newcommand{\setindexprenote}[1]{\renewcommand{\LWR@indexprenote}{#1}} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-imakeidx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-imakeidx.sty new file mode 100644 index 00000000000..31dac887354 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-imakeidx.sty @@ -0,0 +1,164 @@ +%% +%% This is file `lwarp-imakeidx.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `imakeidx') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackagePass{imakeidx} +\catcode`\_=12% +\define@key{imki}{name}{\def\imki@name{#1_html}} +\catcode`\_=8% +\catcode`\_=12% + +\renewcommand*{\printindex}[1][\imki@jobname]{% +\LWR@orignewpage% +\LWR@startpars% +\ifstrequal{#1}{\imki@jobname}{% + \@ifundefined{#1@idxfile}{% + \imki@error{#1}% + }{% + \imki@putindex{#1}% + }% +}{% + \@ifundefined{#1_html@idxfile}{\imki@error{#1_html}}{\imki@putindex{#1_html}}% +}% +} + +\catcode`\_=8% +\catcode`\_=12% + +\def\@index[#1]{% + \ifstrequal{#1}{\imki@jobname}% + {% + \@ifundefined{#1@idxfile}% + {% + \PackageWarning{imakeidx}{Undefined index file `#1'}% + \begingroup + \@sanitize + \imki@nowrindex% + }% + {% + \edef\@idxfile{#1}% + \begingroup + \@sanitize + \@wrindex\@idxfile% + }% + }% + {% + \@ifundefined{#1_html@idxfile}% + {% + \PackageWarning{imakeidx}{Undefined index file `#1_html'}% + \begingroup + \@sanitize + \imki@nowrindex% + }% + {% + \edef\@idxfile{#1_html}% + \begingroup + \@sanitize + \@wrindex\@idxfile% + }% + }% +} + +\catcode`\_=8% +\appto\theindex{% + \let\item\LWR@indexitem% + \let\subitem\LWR@indexsubitem% + \let\subsubitem\LWR@indexsubsubitem% +} +\renewcommand\imki@wrindexentrysplit[3]{% +\addtocounter{LWR@autoindex}{1}% +\LWR@new@label{LWRindex-\arabic{LWR@autoindex}}% + \expandafter\protected@write\csname#1@idxfile\endcsname{}% + {\string\indexentry{#2}{\arabic{LWR@autoindex}}}% +} + +\renewcommand\imki@wrindexentryunique[3]{% +\addtocounter{LWR@autoindex}{1}% +\LWR@new@label{LWRindex-\arabic{LWR@autoindex}}% + \protected@write\@indexfile{}% + {\string\indexentry[#1]{#2}{\arabic{LWR@autoindex}}}% +} + +\def\imki@wrindexsplit#1#2{% +\imki@wrindexentrysplit{#1}{#2}{\thepage}% +\endgroup\imki@showidxentry{#1}{#2}% + \@esphack% +} + +\def\imki@wrindexunique#1#2{% +\imki@wrindexentryunique{#1}{#2}{\thepage}% +\endgroup\imki@showidxentry{#1}{#2}% + \@esphack% + } + +\newcommand*{\LWR@imki@setxdydefopts}{% + \edef\imki@options{ \space % + -M \space \LWR@xindyStyle\space % + -L \space \LWR@xindyLanguage\space % + -C \space \LWR@xindyCodepage\space % + }% +} +\newcommand*{\LWR@imki@setdefopts}[1]{% +\ifblank{#1}{% + \edef\imki@options{\space -s \space \LWR@makeindexStyle \space}% + \ifdefstring{\imki@progdefault}{xindy}{\LWR@imki@setxdydefopts}{}% + \ifdefstring{\imki@progdefault}{texindy}{\LWR@imki@setxdydefopts}{}% + \ifdefstring{\imki@progdefault}{truexindy}{\LWR@imki@setxdydefopts}{}% +}{% + \edef\imki@options{\space #1 \space}% +}% +} +\xpatchcmd{\imki@makeindex} + {\let\imki@options\space} + {\LWR@imki@setdefopts{}}% + {} + {\LWR@patcherror{imakeidx}{makeindex}} +\define@key{imki}{options}{\LWR@imki@setdefopts{#1}} +\xpatchcmd{\imki@resetdefaults} + {\def\imki@options{ }} + {\LWR@imki@setdefopts{}} + {} + {\LWR@patcherror{imakeidx}{resetdefaults}} +\AtBeginDocument{ +\renewenvironment*{theindex}{% + \imki@maybeaddtotoc + \imki@indexlevel{\indexname} + \let\item\LWR@indexitem% + \let\subitem\LWR@indexsubitem% + \let\subsubitem\LWR@indexsubsubitem% +}{} +}% AtBeginDocument +\imki@resetdefaults +\ifimki@splitindex + \let\imki@startidx\imki@startidxunique + \AtBeginDocument{\let\@wrindex\imki@wrindexunique} + \let\imki@putindex\imki@putindexunique + \let\imki@wrindexentry\imki@wrindexentryunique + \let\imki@startidxsplit\@undefined + \let\imki@wrindexsplit\@undefined + \let\imki@putindexsplit\@undefined +\else + \let\imki@startidx\imki@startidxsplit + \AtBeginDocument{\let\@wrindex\imki@wrindexsplit} + \let\imki@putindex\imki@putindexsplit + \let\imki@wrindexentry\imki@wrindexentrysplit + \let\imki@startidxunique\@undefined + \let\imki@wrindexunique\@undefined + \let\imki@putindexunique\@undefined +\fi +\endinput +%% +%% End of file `lwarp-imakeidx.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-index.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-index.sty new file mode 100644 index 00000000000..030097e33da --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-index.sty @@ -0,0 +1,71 @@ +%% +%% This is file `lwarp-index.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `index') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackagePass{index} +\xpatchcmd{\newindex} + {\x@newindex[thepage]} + {% + \@tempswatrue% + \x@newindex[theLWR@autoindex]% + } + {} + {\LWR@patcherror{index}{newindex}} + +\xpatchcmd{\renewindex} + {\x@renewindex[thepage]} + {% + \@tempswatrue% + \x@renewindex[theLWR@autoindex]% + } + {} + {\LWR@patcherror{index}{renewindex}} +\xpatchcmd{\@wrindex} + {\begingroup} + {% + \addtocounter{LWR@autoindex}{1}% lwarp + \LWR@new@label{LWRindex-\arabic{LWR@autoindex}}% lwarp + \begingroup% + } + {} + {\LWR@patcherror{index}{@wrindex}} +\let\LWR@index@wrindex\@wrindex + +\AtBeginDocument{ +\let\@wrindex\LWR@index@wrindex +} +\AtBeginDocument{ +\renewenvironment*{theindex}{% + \LWR@indexsection{\indexname}% + \ifx\index@prologue\@empty\else + \index@prologue + \bigskip + \fi + \let\item\LWR@indexitem% + \let\subitem\LWR@indexsubitem% + \let\subsubitem\LWR@indexsubsubitem% +}{} +}% AtBeginDocument +\def\@showidx#1{} +\let\@texttop\relax +\renewcommand*{\raggedbottom}{} +\renewcommand*{\flushbottom}{} +\renewcommand*{\markboth}[2]{} +\renewcommand*{\markright}[1]{} + +\endinput +%% +%% End of file `lwarp-index.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-intopdf.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-intopdf.sty new file mode 100644 index 00000000000..40e18b892be --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-intopdf.sty @@ -0,0 +1,24 @@ +%% +%% This is file `lwarp-intopdf.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `intopdf') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackageDrop{intopdf} +\NewDocumentCommand{\attachandlink}{m o m m}{% + \href{#1}{#4}% +} +\endinput +%% +%% End of file `lwarp-intopdf.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-makeidx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-makeidx.sty new file mode 100644 index 00000000000..b5710178cfe --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-makeidx.sty @@ -0,0 +1,25 @@ +%% +%% This is file `lwarp-makeidx.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `makeidx') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackagePass{makeidx} +\preto\printindex{% + \LWR@orignewpage% + \LWR@startpars% +} +\endinput +%% +%% End of file `lwarp-makeidx.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty index 1e466a76d67..9c35143c98c 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty @@ -36,18 +36,18 @@ } }% AtBeginDocument \mdfsetup{ -startcode={\LWR@mdframedstart\LWR@origraggedright}, +startcode={\LWR@mdframedstart\LWR@print@raggedright}, endcode={\LWR@mdframedend}, -startinnercode={\LWR@startpars\LWR@origraggedright}, +startinnercode={\LWR@startpars\LWR@print@raggedright}, endinnercode={\LWR@stoppars}, } \newcommand*{\LWR@mdfprintcolor}[1]{% -\convertcolorspec{named}{\csuse{mdf@#1}}{HTML}\LWR@tempcolor% +\convertcolorspec{named}{\@nameuse{mdf@#1}}{HTML}\LWR@tempcolor% \LWR@origpound\LWR@tempcolor } \newcommand*{\LWR@mdfprintlength}[1]{% -\LWR@printlength{\csuse{mdf@#1@length}} +\LWR@printlength{\@nameuse{mdf@#1@length}} } \newcommand*{\LWR@mdframedstart}{% \LWR@traceinfo{LWR@mdframedstart start}% @@ -169,8 +169,8 @@ background: "}% span \begin{LWR@nestspan}% \IfNoValueTF{#2} -{\csuse{LWR@origmdf#1title}{#3}}% -{\csuse{LWR@origmdf#1title}[#2]{#3}}% +{\@nameuse{LWR@origmdf#1title}{#3}}% +{\@nameuse{LWR@origmdf#1title}[#2]{#3}}% \LWR@htmltagc{/span}% the following empty line is required \end{LWR@nestspan}% must follow the /span or an extra

appears diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty index 03a10225b09..bfaec5c566b 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty @@ -137,7 +137,7 @@ \@thm{#1}{#1}{#2} }% \global\@namedef{end#1}{\@endtheorem} - \AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\csuse{LWR@thmstyle#1}}}% lwarp + \AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\@nameuse{LWR@thmstyle#1}}}% lwarp \fi } @@ -153,7 +153,7 @@ \@thm{#1}{#1}{#2} }% \global\@namedef{end#1}{\@endtheorem} - \AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\csuse{LWR@thmstyle#1}}}% lwarp + \AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\@nameuse{LWR@thmstyle#1}}}% lwarp \fi } @@ -174,7 +174,7 @@ \@thm{#1}{#2}{#3} }% \global\@namedef{end#1}{\@endtheorem} - \AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\csuse{LWR@thmstyle#1}}}% lwarp + \AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\@nameuse{LWR@thmstyle#1}}}% lwarp \fi} } \newcommand{\LWR@inctheorem}{% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-komascript.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-komascript.sty index 4efdb3e6641..1f23d51f37e 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-komascript.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-komascript.sty @@ -19,6 +19,24 @@ \RequirePackage{lwarp-typearea} \RequirePackage{lwarp-tocbasic} \RequirePackage{lwarp-scrextend} +\AtBeginDocument{ + +\renewcommand*{\idx@heading}{% + \idx@@heading{\indexname}% +} + +\renewenvironment{theindex}{% + \idx@heading% + \index@preamble\par\nobreak + \let\item\LWR@indexitem% + \let\subitem\LWR@indexsubitem% + \let\subsubitem\LWR@indexsubsubitem% +} +{} + +\renewcommand*\indexspace{} + +}% AtBeginDocument \renewcommand*{\minisec}[1]{ \begin{BlockClass}{minisec} #1 diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty index ab62119c547..ab523f89d1c 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty @@ -28,6 +28,7 @@ \RequirePackage{lwarp-footmisc}% req'd \RequirePackage{lwarp-framed}% req'd \RequirePackage{lwarp-hanging}% req'd +\RequirePackage{lwarp-makeidx}% req'd \DisemulatePackage{moreverb} \RequirePackage{lwarp-moreverb} \RequirePackage{lwarp-mparhack} @@ -38,6 +39,7 @@ \RequirePackage{lwarp-setspace}% req'd \RequirePackage{lwarp-showidx} \RequirePackage{lwarp-subfigure}% red'q +\makeindex \LetLtxMacro\LWR@memorignewsubfloat\newsubfloat \RenewDocumentCommand{\newsubfloat}{O{} m}{% \@ifundefined{c@sub#2}{% @@ -49,18 +51,7 @@ \RequirePackage{lwarp-titling}% req'd \RequirePackage{lwarp-tocloft}% req'd \RequirePackage{lwarp-verse}% req'd -\LetLtxMacro\LWR@origlabel\@mem@old@label - -\AtBeginDocument{ - \def\@@wrindexhyp#1||\\{% - \addtocounter{LWR@autoindex}{1}% - \LWR@newlabel{LWRindex-\arabic{LWR@autoindex}}% - \ifshowindexmark\@showidx{#1}\fi - \protected@write\@auxout{}% - {\string\@@wrindexm@m{\@idxfile}{#1}{\arabic{LWR@autoindex}}}% - \endgroup - \@esphack}% -} +\LetLtxMacro\LWR@orig@label\@mem@old@label \setstocksize{190in}{20in} \setlrmarginsandblock{2in}{2in}{*} @@ -739,7 +730,7 @@ } \renewenvironment{sidenamedlegend}[2][]{ \begin{center} -\csuse{\@captype name}\CaptionSeparator#2 +\@nameuse{\@captype name}\CaptionSeparator#2 \end{center} } {} @@ -929,6 +920,43 @@ \renewcommand*{\theTitleReference}[2]{} \renewcommand*{\namerefon}{} \renewcommand*{\namerefoff}{} +\AtBeginDocument{ + +\def\@@wrindexhyp#1||\\{% + \addtocounter{LWR@autoindex}{1}% + \LWR@new@label{LWRindex-\arabic{LWR@autoindex}}% + \protected@write\@auxout{}% + {\string\@@wrindexm@m{\@idxfile}{#1}{\arabic{LWR@autoindex}}}% + \endgroup + \@esphack}% +\def\@@wrspindexhyp#1||\\{% + \addtocounter{LWR@autoindex}{1}% + \LWR@new@label{LWRindex-\arabic{LWR@autoindex}}% + \protected@write\@auxout{}% + {% + \string\@@wrindexm@m{\@idxfile}{#1}{\arabic{LWR@autoindex}}% + }% + \endgroup + \@esphack}% + +}% \AtBeginDocument + +\catcode`\_=12% +\renewcommand*{\makeindex}[1][\BaseJobname]{% + \if@filesw + \def\index{\@bsphack% + \@ifnextchar [{\@index}{\@index[\BaseJobname]}} + \def\specialindex{\@bsphack\@spindex}% + \makememindexhook + \expandafter\newwrite\csname #1@idxfile\endcsname + \expandafter\immediate\openout \csname #1@idxfile\endcsname #1_html.idx\relax + \typeout{Writing index file #1_html.idx }% + \fi} +\catcode`\_=8% + +\catcode`\_=12% +\renewcommand{\printindex}[1][\BaseJobname]{\@input@{#1_html.ind}} +\catcode`\_=8% \DeclareDocumentCommand{\newblock}{}{} \renewcommand*{\showindexmarks}{} \renewcommand*{\hideindexmarks}{} @@ -985,7 +1013,7 @@ \renewcommand{\midbicaption}[1]{} \renewcommand{\contcaption}[1]{% \begin{LWR@figcaption}% later becomes \caption* -\csuse{\@captype name} \thechapter.\the\value{\@captype}\CaptionSeparator #1 +\@nameuse{\@captype name} \thechapter.\the\value{\@captype}\CaptionSeparator #1 \end{LWR@figcaption} } @@ -998,9 +1026,9 @@ \renewcommand{\namedlegend}[2][]{ \begin{center} -\csuse{fleg\@captype}\CaptionSeparator#2\\ +\@nameuse{fleg\@captype}\CaptionSeparator#2\\ \end{center} -\csuse{flegtoc\@captype}{#1} +\@nameuse{flegtoc\@captype}{#1} } \renewcommand{\newfixedcaption}[3][\caption]{% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-pdfpages.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-pdfpages.sty new file mode 100644 index 00000000000..38953326780 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-pdfpages.sty @@ -0,0 +1,104 @@ +%% +%% This is file `lwarp-pdfpages.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `pdfpages') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackagePass{pdfpages} +\define@key{pdfpages}{fitpaper}[false]{} +\define@key{pdfpages}{landscape}[false]{} +\define@key{pdfpages}{openright}[false]{} +\define@key{pdfpages}{signature}{} +\define@key{pdfpages}{signature*}{} +\define@key{pdfpages}{booklet}[false]{} +\define@key{pdfpages}{rotateoversize}[false]{} +\define@key{pdfpages}{doublepages}[false]{} +\define@key{pdfpages}{doublepagestwist}[false]{} +\define@key{pdfpages}{doublepagestwistodd}[false]{} +\define@key{pdfpages}{doublepagestwist*}[false]{} +\define@key{pdfpages}{doublepagestwistodd*}[false]{} +\define@key{pdfpages}{duplicatepages}[2]{} +\define@key{pdfpages}{thread}[false]{} +\define@key{pdfpages}{threadname}{} +\define@key{pdfpages}{linkfit}{} +\define@key{pdfpages}{linktodoc}[false]{} +\define@key{pdfpages}{linktodocfit}{} +\define@key{pdfpages}{linkfilename}{} +\define@key{pdfpages}{survey}[false]{} +\define@key{pdfpages}{survey-nolink}[false]{} +\define@key{pdfpages}{newwindow}[false]{} +\xpretocmd{\AM@getpagecount}{\LWR@restoreorigformatting}{}{} +\newif\ifESO@texcoord + +\newcommand{\ESO@HookIIBG}{} + +\renewcommand{\AM@AddToShipoutPicture}{\g@addto@macro\ESO@HookIIBG} + +\renewcommand{\ClearShipoutPicture}{} +\newcommand*{\LWR@esopic@newpage}{% +\ifdefvoid{\ESO@HookIIBG}% +{}% +{% + \ifAM@link% + \hypertarget{\AM@linkname.\AM@page}{}% + \fi% + \begingroup% + \setlength{\unitlength}{1in}% + \begin{picture}(8,10.5)% + \ESO@HookIIBG% + \end{picture}% + \endgroup% + \global\let\ESO@HookIIBG\@empty% +} +} +\xpatchcmd{\AM@output} + {\newpage} + {\LWR@esopic@newpage} + {} + {\LWR@patcherror{pdfpages}{AM@output-1}} + +\xpatchcmd{\AM@output} + {\newpage} + {\LWR@esopic@newpage} + {} + {\LWR@patcherror{pdfpages}{AM@output-2}} + +\xpatchcmd{\AM@output} + {\newpage} + {\LWR@esopic@newpage} + {} + {\LWR@patcherror{pdfpages}{AM@output-3}} +\xpretocmd{\includepdf}{% + \begingroup% + \setlength{\paperwidth}{8in}% + \setlength{\paperheight}{10.5in}% +}{}{} + +\xapptocmd{\includepdf}{% + \endgroup% +}{}{} + +\xpretocmd{\includepdfmerge}{% + \begingroup% + \setlength{\paperwidth}{8in}% + \setlength{\paperheight}{10.5in}% +}{}{} + +\xapptocmd{\includepdfmerge}{% + \endgroup% +}{}{} +\renewcommand{\AM@hyper@begin@i}{} +\endinput +%% +%% End of file `lwarp-pdfpages.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-pdfx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-pdfx.sty new file mode 100644 index 00000000000..4a3e7df0115 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-pdfx.sty @@ -0,0 +1,21 @@ +%% +%% This is file `lwarp-pdfx.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `pdfx') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackageDrop{pdfx} +\endinput +%% +%% End of file `lwarp-pdfx.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-quoting.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-quoting.sty index 12507113ccb..16aba1f64da 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-quoting.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-quoting.sty @@ -21,19 +21,12 @@ \xpatchcmd{\quoting}{\quo@begintext} {\begin{LWR@blocktextcurrentfont}\quo@begintext} {} - { - \PackageError{lwarp} - {Unable to patch the quoting package} - {Please contact the author of the lwarp package.} - } + {\LWR@patcherror{quoting}{quoting}} + \xpatchcmd{\endquoting}{\quo@endtext} {\quo@endtext\end{LWR@blocktextcurrentfont}} {} - { - \PackageError{lwarp} - {Unable to patch the quoting package} - {Please contact the author of the lwarp package.} - } + {\LWR@patcherror{imakeidx}{endquoting}} \endinput %% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-repeatindex.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-repeatindex.sty new file mode 100644 index 00000000000..a7ee1735913 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-repeatindex.sty @@ -0,0 +1,24 @@ +%% +%% This is file `lwarp-repeatindex.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `repeatindex') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackageDrop{repeatindex}[2001/10/13] +\RequirePackage{makeidx} +\def\entryprefix{\itshape} +\def\entrypostfix{\dots} +\endinput +%% +%% End of file `lwarp-repeatindex.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-schemata.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-schemata.sty index c2946d4947c..8b7519ade3e 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-schemata.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-schemata.sty @@ -23,14 +23,14 @@ \renewcommand{\schema}[3][open]{% \begin{lateximage}% -\LWR@orignormalsize +\LWR@print@normalsize \LWR@schemata@origschema[#1]{#2}{#3}% \end{lateximage}% } \renewcommand{\Schema}[5][open]{% \begin{lateximage}% -\LWR@orignormalsize +\LWR@print@normalsize \LWR@schemata@origSchema[#1]{#2}{#3}{#4}{#5}% \end{lateximage}% } diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-soul.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-soul.sty index 8fd814288b4..bc21f6c1ec4 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-soul.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-soul.sty @@ -35,7 +35,7 @@ \ifcsempty{#2}% {\LWR@HTMLtextstyle{#5}{#3}{#1}}% {% - \convertcolorspec{named}{\csuse{#2}}{HTML}\LWR@tempcolor% + \convertcolorspec{named}{\@nameuse{#2}}{HTML}\LWR@tempcolor% \LWR@htmlspanclass[#5;#4:\LWR@origpound\LWR@tempcolor]{#3}{#1}% }% } diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-splitidx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-splitidx.sty new file mode 100644 index 00000000000..460125cee78 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-splitidx.sty @@ -0,0 +1,64 @@ +%% +%% This is file `lwarp-splitidx.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `splitidx') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackagePass{splitidx} +\catcode`\_=12% +\xpatchcmd{\newindex} + {\jobname-#2.idx} + {\jobname-#2_html.idx} + {} + {\LWR@patcherror{splitidx}{@newindex}} +\catcode`\_=8% +\renewcommand*{\@wrsindex}[2][]{% + \ifx\relax#1\relax + \if@splitidx + \@wrsindex[idx]{#2}% + \else + \def\@tempa{#2}% + \if@verbindex\@onelevel@sanitize\@tempa\fi + \@wrindex{\@tempa}% + \fi + \else + \def\@tempa{#2}% + \csname index@#1@hook\endcsname + \addtocounter{LWR@autoindex}{1}% lwarp + \LWR@new@label{LWRindex-\arabic{LWR@autoindex}}% lwarp + \@@@wrsindex{#1}{{\@tempa}{\arabic{LWR@autoindex}}}% + \endgroup + \@esphack + \fi +} +\xpatchcmd{\printsubindex} + {\let\section\subsection} + {\renewcommand*{\section}{\subsection}} + {} + {\LWR@patcherror{splitidx}{printsubindex-section}} + +\xpatchcmd{\printsubindex} + {\let\chapter\section} + {\renewcommand*{\chapter}{\section}} + {} + {\LWR@patcherror{splitidx}{printsubindex-chapter}} + +\xpatchcmd{\printsubindex} + {\let\@makechapterhead\section} + {\def\@makechapterhead{\section}} + {} + {\LWR@patcherror{splitidx}{printsubindex-chapter}} +\endinput +%% +%% End of file `lwarp-splitidx.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-subfig.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-subfig.sty index 79745461deb..b6162923e0b 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-subfig.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-subfig.sty @@ -155,7 +155,7 @@ \renewcommand{\sf@subref}[1]{% \LWR@subnewref{#1}{sub@#1}% } -\renewcommand{\sf@@subref}[1]{\LWR@origpageref{sub@#1}} +\renewcommand{\sf@@subref}[1]{\LWR@orig@pageref{sub@#1}} \LetLtxMacro\LWR@orig@newsubfloat\@newsubfloat \def\@newsubfloat[#1]#2{% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty index 598d512b8ad..4630ec117a8 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty @@ -18,133 +18,101 @@ \LWR@ProvidesPackagePass{textcomp} -\let\LWR@origtextdegree\textdegree -\let\LWR@origtextcelsius\textcelsius -\let\LWR@origtextohm\textohm -\let\LWR@origtextmu\textmu -\let\LWR@origtextlquill\textlquill -\let\LWR@origtextrquill\textrquill -\let\LWR@origtextcircledP\textcircledP -\let\LWR@origtexttwelveudash\texttwelveudash -\let\LWR@origtextthreequartersemdash\textthreequartersemdash -\let\LWR@origtextmho\textmho -\let\LWR@origtextnaira\textnaira -\let\LWR@origtextpeso\textpeso -\let\LWR@origtextrecipe\textrecipe -\let\LWR@origtextinterrobangdown\textinterrobangdown -\let\LWR@origtextperthousand\textperthousand -\let\LWR@origtextpertenthousand\textpertenthousand -\let\LWR@origtextbaht\textbaht -\let\LWR@origtextdiscount\textdiscount -\let\LWR@origtextservicemark\textservicemark -\LetLtxMacro\LWR@origcapitalcedilla\capitalcedilla -\LetLtxMacro\LWR@origcapitalogonek\capitalogonek -\LetLtxMacro\LWR@origcapitalgrave\capitalgrave -\LetLtxMacro\LWR@origcapitalacute\capitalacute -\LetLtxMacro\LWR@origcapitalcircumflex\capitalcircumflex -\LetLtxMacro\LWR@origcapitaltilde\capitaltilde -\LetLtxMacro\LWR@origcapitaldieresis\capitaldieresis -\LetLtxMacro\LWR@origcapitalhungarumlaut\capitalhungarumlaut -\LetLtxMacro\LWR@origcapitalring\capitalring -\LetLtxMacro\LWR@origcapitalcaron\capitalcaron -\LetLtxMacro\LWR@origcapitalbreve\capitalbreve -\LetLtxMacro\LWR@origcapitalmacron\capitalmacron -\LetLtxMacro\LWR@origcapitaldotaccent\capitaldotaccent -\LetLtxMacro\LWR@origtextcircled\textcircled \AtBeginDocument{ \ifPDFTeX -\renewcommand*{\textdegree}{\HTMLentity{deg}} -\renewcommand*{\textcelsius}{\HTMLunicode{2103}} -\renewcommand*{\textohm}{\HTMLunicode{2126}} -\renewcommand*{\textmu}{\HTMLunicode{00B5}} -\renewcommand*{\textlquill}{\HTMLunicode{2045}} -\renewcommand*{\textrquill}{\HTMLunicode{2046}} -\renewcommand*{\textcircledP}{\HTMLunicode{2117}} -\renewcommand*{\texttwelveudash}{\HTMLunicode{2014}}% emdash -\renewcommand*{\textthreequartersemdash}{\HTMLunicode{2014}}% emdash -\renewcommand*{\textmho}{\HTMLunicode{2127}} -\renewcommand*{\textnaira}{\HTMLunicode{20A6}} -\renewcommand*{\textpeso}{\HTMLunicode{20B1}} -\renewcommand*{\textrecipe}{\HTMLunicode{211E}} -\renewcommand*{\textinterrobangdown}{\HTMLunicode{2E18}} -\renewcommand*{\textperthousand}{\HTMLunicode{2030}} -\renewcommand*{\textpertenthousand}{\HTMLunicode{2031}} -\renewcommand*{\textbaht}{\HTMLunicode{0E3F}} -\renewcommand*{\textdiscount}{\%} -\renewcommand*{\textservicemark}{\HTMLunicode{2120}} +\newcommand*{\LWR@HTML@textdegree}{\HTMLentity{deg}} +\newcommand*{\LWR@HTML@textcelsius}{\HTMLunicode{2103}} +\newcommand*{\LWR@HTML@textohm}{\HTMLunicode{2126}} +\newcommand*{\LWR@HTML@textmu}{\HTMLunicode{00B5}} +\newcommand*{\LWR@HTML@textlquill}{\HTMLunicode{2045}} +\newcommand*{\LWR@HTML@textrquill}{\HTMLunicode{2046}} +\newcommand*{\LWR@HTML@textcircledP}{\HTMLunicode{2117}} +\newcommand*{\LWR@HTML@texttwelveudash}{\HTMLunicode{2014}}% emdash +\newcommand*{\LWR@HTML@textthreequartersemdash}{\HTMLunicode{2014}}% emdash +\newcommand*{\LWR@HTML@textmho}{\HTMLunicode{2127}} +\newcommand*{\LWR@HTML@textnaira}{\HTMLunicode{20A6}} +\newcommand*{\LWR@HTML@textpeso}{\HTMLunicode{20B1}} +\newcommand*{\LWR@HTML@textrecipe}{\HTMLunicode{211E}} +\newcommand*{\LWR@HTML@textinterrobangdown}{\HTMLunicode{2E18}} +\newcommand*{\LWR@HTML@textperthousand}{\HTMLunicode{2030}} +\newcommand*{\LWR@HTML@textpertenthousand}{\HTMLunicode{2031}} +\newcommand*{\LWR@HTML@textbaht}{\HTMLunicode{0E3F}} +\newcommand*{\LWR@HTML@textdiscount}{\%} +\newcommand*{\LWR@HTML@textservicemark}{\HTMLunicode{2120}} \else -\renewcommand*{\textdegree}{°} -\renewcommand*{\textcelsius}{℃} -\renewcommand*{\textohm}{Ω} -\renewcommand*{\textmu}{µ} -\renewcommand*{\textlquill}{⁅} -\renewcommand*{\textrquill}{⁆} -\renewcommand*{\textcircledP}{℗} -\renewcommand*{\texttwelveudash}{—}% emdash -\renewcommand*{\textthreequartersemdash}{—}% emdash -\renewcommand*{\textmho}{℧} -\renewcommand*{\textnaira}{₦} -\renewcommand*{\textpeso}{₱} -\renewcommand*{\textrecipe}{℞} -\renewcommand*{\textinterrobangdown}{⸘} -\renewcommand*{\textperthousand}{‰} -\renewcommand*{\textpertenthousand}{‱} -\renewcommand*{\textbaht}{฿} -\renewcommand*{\textdiscount}{\%} -\renewcommand*{\textservicemark}{℠} +\newcommand*{\LWR@HTML@textdegree}{°} +\newcommand*{\LWR@HTML@textcelsius}{℃} +\newcommand*{\LWR@HTML@textohm}{Ω} +\newcommand*{\LWR@HTML@textmu}{µ} +\newcommand*{\LWR@HTML@textlquill}{⁅} +\newcommand*{\LWR@HTML@textrquill}{⁆} +\newcommand*{\LWR@HTML@textcircledP}{℗} +\newcommand*{\LWR@HTML@texttwelveudash}{—}% emdash +\newcommand*{\LWR@HTML@textthreequartersemdash}{—}% emdash +\newcommand*{\LWR@HTML@textmho}{℧} +\newcommand*{\LWR@HTML@textnaira}{₦} +\newcommand*{\LWR@HTML@textpeso}{₱} +\newcommand*{\LWR@HTML@textrecipe}{℞} +\newcommand*{\LWR@HTML@textinterrobangdown}{⸘} +\newcommand*{\LWR@HTML@textperthousand}{‰} +\newcommand*{\LWR@HTML@textpertenthousand}{‱} +\newcommand*{\LWR@HTML@textbaht}{฿} +\newcommand*{\LWR@HTML@textdiscount}{\%} +\newcommand*{\LWR@HTML@textservicemark}{℠} \fi -\renewcommand*{\capitalcedilla}[1]{#1\HTMLunicode{0327}} -\renewcommand*{\capitalogonek}[1]{#1\HTMLunicode{0328}} -\renewcommand*{\capitalgrave}[1]{#1\HTMLunicode{0300}} -\renewcommand*{\capitalacute}[1]{#1\HTMLunicode{0301}} -\renewcommand*{\capitalcircumflex}[1]{#1\HTMLunicode{0302}} -\renewcommand*{\capitaltilde}[1]{#1\HTMLunicode{0303}} -\renewcommand*{\capitaldieresis}[1]{#1\HTMLunicode{0308}} -\renewcommand*{\capitalhungarumlaut}[1]{#1\HTMLunicode{30B}} -\renewcommand*{\capitalring}[1]{#1\HTMLunicode{30A}} -\renewcommand*{\capitalcaron}[1]{#1\HTMLunicode{30C}} -\renewcommand*{\capitalbreve}[1]{#1\HTMLunicode{306}} -\renewcommand*{\capitalmacron}[1]{#1\HTMLunicode{304}} -\renewcommand*{\capitaldotaccent}[1]{#1\HTMLunicode{307}} -\renewcommand*{\textcircled}[1]{% + +\LWR@formatted{textdegree} +\LWR@formatted{textcelsius} +\LWR@formatted{textohm} +\LWR@formatted{textmu} +\LWR@formatted{textlquill} +\LWR@formatted{textrquill} +\LWR@formatted{textcircledP} +\LWR@formatted{texttwelveudash} +\LWR@formatted{textthreequartersemdash} +\LWR@formatted{textmho} +\LWR@formatted{textnaira} +\LWR@formatted{textpeso} +\LWR@formatted{textrecipe} +\LWR@formatted{textinterrobangdown} +\LWR@formatted{textperthousand} +\LWR@formatted{textpertenthousand} +\LWR@formatted{textbaht} +\LWR@formatted{textdiscount} +\LWR@formatted{textservicemark} +\newcommand*{\LWR@HTML@capitalcedilla}[1]{#1\HTMLunicode{0327}} +\newcommand*{\LWR@HTML@capitalogonek}[1]{#1\HTMLunicode{0328}} +\newcommand*{\LWR@HTML@capitalgrave}[1]{#1\HTMLunicode{0300}} +\newcommand*{\LWR@HTML@capitalacute}[1]{#1\HTMLunicode{0301}} +\newcommand*{\LWR@HTML@capitalcircumflex}[1]{#1\HTMLunicode{0302}} +\newcommand*{\LWR@HTML@capitaltilde}[1]{#1\HTMLunicode{0303}} +\newcommand*{\LWR@HTML@capitaldieresis}[1]{#1\HTMLunicode{0308}} +\newcommand*{\LWR@HTML@capitalhungarumlaut}[1]{#1\HTMLunicode{30B}} +\newcommand*{\LWR@HTML@capitalring}[1]{#1\HTMLunicode{30A}} +\newcommand*{\LWR@HTML@capitalcaron}[1]{#1\HTMLunicode{30C}} +\newcommand*{\LWR@HTML@capitalbreve}[1]{#1\HTMLunicode{306}} +\newcommand*{\LWR@HTML@capitalmacron}[1]{#1\HTMLunicode{304}} +\newcommand*{\LWR@HTML@capitaldotaccent}[1]{#1\HTMLunicode{307}} +\newcommand*{\LWR@HTML@textcircled}[1]{% \InlineClass[border: 1px solid \LWR@currenttextcolor]{textcircled}{#1}% } + +\LWR@formatted{capitalcedilla} +\LWR@formatted{capitalogonek} +\LWR@formatted{capitalgrave} +\LWR@formatted{capitalacute} +\LWR@formatted{capitalcircumflex} +\LWR@formatted{capitaltilde} +\LWR@formatted{capitaldieresis} +\LWR@formatted{capitalhungarumlaut} +\LWR@formatted{capitalring} +\LWR@formatted{capitalcaron} +\LWR@formatted{capitalbreve} +\LWR@formatted{capitalmacron} +\LWR@formatted{capitaldotaccent} +\LWR@formatted{textcircled} + }% AtBeginDocument -\appto\LWR@restoreorigformatting{% -\let\textdegree\LWR@origtextdegree% -\let\textcelsius\LWR@origtextcelsius% -\let\textohm\LWR@origtextohm% -\let\textmu\LWR@origtextmu% -\let\textlquill\LWR@origtextlquill% -\let\textrquill\LWR@origtextrquill% -\let\textcircledP\LWR@origtextcircledP% -\let\texttwelveudash\LWR@origtexttwelveudash% -\let\textthreequartersemdash\LWR@origtextthreequartersemdash% -\let\textmho\LWR@origtextmho% -\let\textnaira\LWR@origtextnaira% -\let\textpeso\LWR@origtextpeso% -\let\textrecipe\LWR@origtextrecipe% -\let\textinterrobangdown\LWR@origtextinterrobangdown% -\let\textperthousand\LWR@origtextperthousand% -\let\textpertenthousand\LWR@origtextpertenthousand% -\let\textbaht\LWR@origtextbaht% -\let\textdiscount\LWR@origtextdiscount% -\let\textservicemark\LWR@origtextservicemark% -\LetLtxMacro\capitalcedilla\LWR@origcapitalcedilla% -\LetLtxMacro\capitalogonek\LWR@origcapitalogonek% -\LetLtxMacro\capitalgrave\LWR@origcapitalgrave% -\LetLtxMacro\capitalacute\LWR@origcapitalacute% -\LetLtxMacro\capitalcircumflex\LWR@origcapitalcircumflex% -\LetLtxMacro\capitaltilde\LWR@origcapitaltilde% -\LetLtxMacro\capitaldieresis\LWR@origcapitaldieresis% -\LetLtxMacro\capitalhungarumlaut\LWR@origcapitalhungarumlaut% -\LetLtxMacro\capitalring\LWR@origcapitalring% -\LetLtxMacro\capitalcaron\LWR@origcapitalcaron% -\LetLtxMacro\capitalbreve\LWR@origcapitalbreve% -\LetLtxMacro\capitalmacron\LWR@origcapitalmacron% -\LetLtxMacro\capitaldotaccent\LWR@origcapitaldotaccent% -\LetLtxMacro\textcircled\LWR@origtextcircled% -} \endinput %% %% End of file `lwarp-textcomp.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty index 72947b29fde..ec8c754ee22 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty @@ -49,7 +49,7 @@ \expandafter \endcsname \the \theorem@bodyfont \@thm{#1}{#2}}% \global \expandafter \let \csname end#1\endcsname \@endtheorem - \AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\csuse{LWR@thmstyle#1}}}% lwarp + \AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\@nameuse{LWR@thmstyle#1}}}% lwarp }} \gdef\@ynthm#1#2{% @@ -62,7 +62,7 @@ \expandafter{\csname th@\the \theorem@style \expandafter \endcsname \the\theorem@bodyfont \@thm{#1}{#2}}% \global \expandafter \let \csname end#1\endcsname \@endtheorem - \AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\csuse{LWR@thmstyle#1}}}% lwarp + \AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\@nameuse{LWR@thmstyle#1}}}% lwarp }} \gdef\@othm#1[#2]#3{% @@ -78,7 +78,7 @@ \expandafter{\csname th@\the \theorem@style \expandafter \endcsname \the\theorem@bodyfont \@thm{#2}{#3}}% \global \expandafter \let \csname end#1\endcsname \@endtheorem - \AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\csuse{LWR@thmstyle#1}}}% lwarp + \AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\@nameuse{LWR@thmstyle#1}}}% lwarp }% \fi} \gdef\th@plain{% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty index 62deae06142..12d5fd7c790 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty @@ -37,18 +37,18 @@ \LetLtxMacro\pgfutil@minipage\LWR@print@minipage \let\pgfutil@endminipage\endLWR@print@minipage -\let\pgfutil@raggedleft\LWR@origraggedleft -\let\pgfutil@raggedright\LWR@origraggedright - -\def\pgfutil@font@tiny{\LWR@origtiny} -\def\pgfutil@font@scriptsize{\LWR@origscriptsize} -\def\pgfutil@font@footnotesize{\LWR@origfootnotesize} -\def\pgfutil@font@small{\LWR@origsmall} -\def\pgfutil@font@normalsize{\LWR@orignormalsize} -\def\pgfutil@font@large{\LWR@origlarge} -\def\pgfutil@font@Large{\LWR@origLarge} -\def\pgfutil@font@huge{\LWR@orighuge} -\def\pgfutil@font@Huge{\LWR@origHuge} +\let\pgfutil@raggedleft\LWR@print@raggedleft +\let\pgfutil@raggedright\LWR@print@raggedright + +\def\pgfutil@font@tiny{\LWR@printtiny} +\def\pgfutil@font@scriptsize{\LWR@printscriptsize} +\def\pgfutil@font@footnotesize{\LWR@printfootnotesize} +\def\pgfutil@font@small{\LWR@print@small} +\def\pgfutil@font@normalsize{\LWR@print@normalsize} +\def\pgfutil@font@large{\LWR@printlarge} +\def\pgfutil@font@Large{\LWR@printLarge} +\def\pgfutil@font@huge{\LWR@printhuge} +\def\pgfutil@font@Huge{\LWR@printHuge} \def\pgfutil@font@itshape{\LWR@origitshape} \def\pgfutil@font@bfseries{\LWR@origbfseries} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index 15e1819cb54..a1b52d3adf8 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty @@ -17,7 +17,7 @@ %% version 2005/12/01 or later. \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{lwarp} - [2018/06/06 v0.57 Allows LaTeX to directly produce HTML5 output.] + [2018/07/07 v0.58 Allows LaTeX to directly produce HTML5 output.] @@ -89,6 +89,12 @@ } \newcommand*{\LWR@convertto}[2]{\strip@pt\dimexpr #2*65536/\number\dimexpr 1#1} +\newcommand*{\LWR@patcherror}[2]{% +\PackageError{lwarp} +{Unable to patch package #1, macro #2} +{Please contact the author of the lwarp package.} +} + \RequirePackage{etoolbox}[2011/01/03]% v2.6 for \BeforeBeginEnvironment, etc. \RequirePackage{xpatch} @@ -147,12 +153,14 @@ \DeclareStringOption[\jobname]{BaseJobname} +\DeclareStringOption[lwarp.ist]{makeindexStyle} + +\DeclareStringOption[lwarp.xdy]{xindyStyle} + \DeclareStringOption[english]{xindyLanguage} \DeclareStringOption[utf8]{xindyCodepage} -\DeclareStringOption[lwarp.xdy]{xindyStyle} - \DeclareStringOption[UTF-8]{pdftotextEnc} \newbool{LWR@creatinglwarpmk} @@ -172,6 +180,18 @@ \DeclareStringOption[]{HTMLFilename} +\DeclareStringOption[]{PrintIndexCmd} + +\DeclareStringOption[]{HTMLIndexCmd} + +\DeclareStringOption[]{LatexmkIndexCmd} + +\DeclareBoolOption[false]{makeindex} + +\DeclareBoolOption[false]{xindy} + +\DeclareStringOption[makeglossaries]{GlossaryCmd} + \DeclareBoolOption[false]{latexmk} \ProcessKeyvalOptions*\relax @@ -185,6 +205,49 @@ } \csedef{HTMLFilename}{\LWR@HTMLFilename} +\ifdefempty{\LWR@PrintIndexCmd}{ + \renewcommand{\LWR@PrintIndexCmd}{% + makeindex -s \LWR@makeindexStyle \space \jobname.idx% + } + \ifbool{LWR@xindy}{ + \renewcommand{\LWR@PrintIndexCmd}{% + xindy + -M \LWR@xindyStyle \space + -L \LWR@xindyLanguage \space + -C \LWR@xindyCodepage \space + \jobname.idx% + } + }{} +}{} + +\ifdefempty{\LWR@HTMLIndexCmd}{ + \renewcommand{\LWR@HTMLIndexCmd}{% + makeindex -s \LWR@makeindexStyle \space \jobname_html.idx% + } + \ifbool{LWR@xindy}{ + \renewcommand{\LWR@HTMLIndexCmd}{% + xindy + -M \LWR@xindyStyle \space + -L \LWR@xindyLanguage \space + -C \LWR@xindyCodepage \space + \jobname_html.idx% + } + }{} +}{} + +\ifdefempty{\LWR@LatexmkIndexCmd}{ + \renewcommand{\LWR@LatexmkIndexCmd}{% + makeindex -s \LWR@makeindexStyle% + } + \ifbool{LWR@xindy}{ + \renewcommand{\LWR@LatexmkIndexCmd}{% + xindy + -M \LWR@xindyStyle \space + -L \LWR@xindyLanguage \space + -C \LWR@xindyCodepage% + } + }{} +}{} \newcommand{\warpprintonly}[1]{\ifbool{warpingprint}{#1}{}} \newcommand{\warpHTMLonly}[1]{\ifbool{warpingHTML}{#1}{}} \RequirePackage{comment} @@ -288,6 +351,8 @@ For a possible alternative, see package(s) #2.} \LWR@notmemoirloadafter{appendix} \LWR@loadafter{arabicfront} \LWR@notmemoirloadafter{array} +\LWR@loadafter{attachfile} +\LWR@loadafter{attachfile2} \LWR@loadafter{authblk} \LWR@loadafter{axodraw2} \LWR@loadafter{backref} @@ -304,7 +369,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{cancel} \LWR@loadafter{caption} \LWR@loadafter{caption2} -\LWR@loadafter{ccaption} +\LWR@loadafter{cases} \LWR@loadafter{changebar} \LWR@notmemoirloadafter{changepage} \LWR@notmemoirloadafter{chngpage} @@ -390,7 +455,10 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{hyphenat} \LWR@loadafter{idxlayout} \LWR@loadafter{ifoddpage} +\LWR@loadafter{imakeidx} \LWR@loadafter{indentfirst} +\LWR@notmemoirloadafter{index} +\LWR@loadafter{intopdf} \LWR@loadafter{keyfloat} \LWR@loadafter{layout} \LWR@loadafter{letterspace} @@ -408,6 +476,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{luacolor} \LWR@loadafter{luatodonotes} \LWR@loadafter{magaz} +\LWR@notmemoirloadafter{makeidx} \LWR@loadafter{marginfit} \LWR@loadafter{marginfix} \LWR@loadafter{marginnote} @@ -445,7 +514,9 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{pbox} \LWR@loadafter{pdfrender} \LWR@loadafter{pdflscape} +\LWR@loadafter{pdfpages} \LWR@loadafter{pdfsync} +\LWR@loadafter{pdfx} \LWR@loadafter{pfnote} \LWR@loadafter{phfqit} \LWR@loadafter{placeins} @@ -458,6 +529,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{realscripts} \LWR@loadafter{register} \LWR@loadafter{relsize} +\LWR@loadafter{repeatindex} \LWR@loadafter{resizegather} \LWR@loadafter{romanbar} \LWR@loadafter{romanbarpagenumber} @@ -483,6 +555,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{soul} \LWR@loadafter{soulpos} \LWR@loadafter{soulutf8} +\LWR@loadafter{splitidx} \LWR@loadafter{stabular} \LWR@loadafter{stfloats} \LWR@loadafter{subfig} @@ -612,9 +685,6 @@ top=1in,bottom=1in,% \RequirePackage{verbatim} -\RequirePackage{makeidx} -\makeindex - \RequirePackage{calc} \RequirePackage{refcount} @@ -877,11 +947,11 @@ top=1in,bottom=1in,% }{}% \ifcsundef{#1}{% \expandafter\newrobustcmd\csname #1\endcsname{% - \csuse{LWR@\LWR@formatting @#1}% + \@nameuse{LWR@\LWR@formatting @#1}% }% }{% \expandafter\renewrobustcmd\csname #1\endcsname{% - \csuse{LWR@\LWR@formatting @#1}% + \@nameuse{LWR@\LWR@formatting @#1}% }% }% } @@ -892,11 +962,11 @@ top=1in,bottom=1in,% }{}% \ifcsundef{#1}{% \expandafter\newcommand\csname #1\endcsname{% - \csuse{LWR@\LWR@formatting @#1}% + \@nameuse{LWR@\LWR@formatting @#1}% }% }{% \expandafter\renewcommand\csname #1\endcsname{% - \csuse{LWR@\LWR@formatting @#1}% + \@nameuse{LWR@\LWR@formatting @#1}% }% }% } @@ -907,8 +977,8 @@ top=1in,bottom=1in,% \csletcs{endLWR@print@#1}{end#1}% }{}% \DeclareDocumentEnvironment{#1}{}% - {\csuse{LWR@\LWR@formatting @#1}}% - {\csuse{endLWR@\LWR@formatting @#1}}% + {\@nameuse{LWR@\LWR@formatting @#1}}% + {\@nameuse{endLWR@\LWR@formatting @#1}}% } \newcommand*{\LWR@expandableformattedenv}[1]{% \ifcsundef{LWR@print@#1}{% @@ -917,8 +987,8 @@ top=1in,bottom=1in,% \csletcs{endLWR@print@#1}{end#1}% }{}% \DeclareExpandableDocumentEnvironment{#1}{}% - {\csuse{LWR@\LWR@formatting @#1}}% - {\csuse{endLWR@\LWR@formatting @#1}}% + {\@nameuse{LWR@\LWR@formatting @#1}}% + {\@nameuse{endLWR@\LWR@formatting @#1}}% } \end{warpHTML} @@ -1020,32 +1090,17 @@ top=1in,bottom=1in,% \let\LWR@origenskip\enskip \let\LWR@origquad\quad \let\LWR@origqquad\qquad -\let\LWR@orighfill\hfill \let\LWR@orighfil\hfil \let\LWR@orighss\hss \let\LWR@origllap\llap \let\LWR@origrlap\rlap \let\LWR@orighfilneg\hfilneg -\let\LWR@orighrulefill\hrulefill -\let\LWR@origdotfill\dotfill - \let\LWR@origmedskip\medskip \let\LWR@origbigskip\bigskip \let\LWR@origtextellipsis\textellipsis -\let\LWR@orignormalsize\normalsize -\let\LWR@origsmall\small -\let\LWR@origfootnotesize\footnotesize -\let\LWR@origscriptsize\scriptsize -\let\LWR@origtiny\tiny -\let\LWR@origlarge\large -\let\LWR@origLarge\Large -\let\LWR@origLARGE\LARGE -\let\LWR@orighuge\huge -\let\LWR@origHuge\Huge - \LetLtxMacro\LWR@origtextrm\textrm \LetLtxMacro\LWR@origtextsf\textsf \LetLtxMacro\LWR@origtexttt\texttt @@ -1070,7 +1125,6 @@ top=1in,bottom=1in,% \LetLtxMacro\LWR@origem\em \LetLtxMacro\LWR@orignormalfont\normalfont -\let\LWR@origraggedright\raggedright \let\LWR@origonecolumn\onecolumn \let\LWR@origsp\sp @@ -1084,9 +1138,6 @@ top=1in,bottom=1in,% } \LetLtxMacro\LWR@origunderline\underline -\let\LWR@origraggedright\raggedright -\let\LWR@origraggedleft\raggedleft -\let\LWR@origcentering\centering \let\LWR@orignewpage\newpage \let\LWR@origpagestyle\pagestyle @@ -1186,6 +1237,7 @@ top=1in,bottom=1in,% \end{warpprint} \begin{warpprint} +\AtBeginDocument{ \ifcsdef{LWR@quickfile}{}{\newwrite{\LWR@quickfile}} \immediate\openout\LWR@quickfile=lwarpmk.conf \ifbool{usingOSWindows}{ @@ -1209,14 +1261,17 @@ homehtmlfilename = "\HomeHTMLFilename"% \immediate\write\LWR@quickfile{htmlfilename = "\HTMLFilename"} \immediate\write\LWR@quickfile{latexmk = "\ifbool{LWR@latexmk}{true}{false}"} \immediate\write\LWR@quickfile{shellescape = "\ifshellescape true\else false\fi"} -\immediate\write\LWR@quickfile{xindylanguage = "\LWR@xindyLanguage"} -\immediate\write\LWR@quickfile{xindycodepage = "\LWR@xindyCodepage"} -\immediate\write\LWR@quickfile{xindystyle = "\LWR@xindyStyle"} +\immediate\write\LWR@quickfile{printindexcmd = "\LWR@PrintIndexCmd"} +\immediate\write\LWR@quickfile{HTMLindexcmd = "\LWR@HTMLIndexCmd"} +\immediate\write\LWR@quickfile{latexmkindexcmd = "\LWR@LatexmkIndexCmd"} +\immediate\write\LWR@quickfile{glossarycmd = "\LWR@GlossaryCmd"} \immediate\write\LWR@quickfile{pdftotextenc = "\LWR@pdftotextEnc"} \immediate\closeout\LWR@quickfile +}% AtBeginDocument \end{warpprint} \begin{warpprint} +\AtBeginDocument{ \ifcsdef{LWR@quickfile}{}{\newwrite{\LWR@quickfile}} \immediate\openout\LWR@quickfile=\jobname.lwarpmkconf \ifbool{usingOSWindows}{ @@ -1240,11 +1295,13 @@ homehtmlfilename = "\HomeHTMLFilename"% \immediate\write\LWR@quickfile{htmlfilename = "\HTMLFilename"} \immediate\write\LWR@quickfile{latexmk = "\ifbool{LWR@latexmk}{true}{false}"} \immediate\write\LWR@quickfile{shellescape = "\ifshellescape true\else false\fi"} -\immediate\write\LWR@quickfile{xindylanguage = "\LWR@xindyLanguage"} -\immediate\write\LWR@quickfile{xindycodepage = "\LWR@xindyCodepage"} -\immediate\write\LWR@quickfile{xindystyle = "\LWR@xindyStyle"} +\immediate\write\LWR@quickfile{printindexcmd = "\LWR@PrintIndexCmd"} +\immediate\write\LWR@quickfile{HTMLindexcmd = "\LWR@HTMLIndexCmd"} +\immediate\write\LWR@quickfile{latexmkindexcmd = "\LWR@LatexmkIndexCmd"} +\immediate\write\LWR@quickfile{glossarycmd = "\LWR@GlossaryCmd"} \immediate\write\LWR@quickfile{pdftotextenc = "\LWR@pdftotextEnc"} \immediate\closeout\LWR@quickfile +}% AtBeginDocument \end{warpprint} @@ -3083,6 +3140,31 @@ nav.botnavigation { \end{warpprint} +\begin{warpprint} +\begin{filecontents*}{lwarp.ist} +preamble +"\\begin{theindex} + \\providecommand*\\lettergroupDefault[1]{} + \\providecommand*\\lettergroup[1]{% + \\par\\textbf{#1}\\par + \\nopagebreak + } +" +headings_flag 1 +heading_prefix " + \\lettergroup{" +heading_suffix "}" +delim_0 ", \\hyperindexref{" +delim_1 ", \\hyperindexref{" +delim_2 ", \\hyperindexref{" +delim_n "}, \\hyperindexref{" +delim_r "} -- \\hyperindexref{" +delim_t "}" +page_compositor "." +\end{filecontents*} +\end{warpprint} + + \begin{warpprint} \begin{filecontents*}{lwarp.xdy} (require "tex/inputenc/latin.xdy") @@ -3090,10 +3172,14 @@ nav.botnavigation { (require "texindy.xdy") (require "page-ranges.xdy") (require "book-order.xdy") -(require "page-ranges.xdy") -(markup-locref :open "\hyperindexref{" :close "}") (define-location-class "arabic-page-numbers" ("arabic-numbers") :min-range-length 1) +(require "makeindex.xdy") +(define-attributes (("hyperindexref"))) +(markup-locref :open "\hyperindexref{" :close "}") +(markup-locref :open "\hyperindexref{" :close "}" :attr "hyperpage") +(markup-locref :open "\textbf{\hyperindexref{" :close "}}" :attr "textbf") +(markup-locref :open "\textit{\hyperindexref{" :close "}}" :attr "textit") (define-location-class-order ("roman-page-numbers" "arabic-page-numbers" "alpha-page-numbers" @@ -3227,7 +3313,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX- -- Copyright 2016-2018 Brian Dunn -printversion = "v0.57" +printversion = "v0.58" function printhelp () print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ; @@ -3239,55 +3325,61 @@ function printusage () -- print ( [[ -lwarpmk print [project]: Compile the print version if necessary. -lwarpmk print1 [project]: Forced single compile of the print version. -lwarpmk printindex [project]: Process the index for the print version. -lwarpmk printglossary [project]: Process the glossary for the print version. -lwarpmk html [project]: Compile the HTML version if necessary. -lwarpmk html1 [project]: Forced single compile of the HTML version. -lwarpmk htmlindex [project]: Process the index for the html version. -lwarpmk htmlglossary [project]: Process the glossary for the html version. -lwarpmk again [project]: Touch the source code to trigger recompiles. -lwarpmk limages [project]: Process the "lateximages" created by lwarp.sty. -lwarpmk pdftohtml [project]: +lwarpmk print [-p project]: Compile the print version if necessary. +lwarpmk print1 [-p project]: Forced single compile of the print version. +lwarpmk printindex [-p project]: Process print indexes. +lwarpmk printglossary [-p project]: Process the glossary for the print version. +lwarpmk html [-p project]: Compile the HTML version if necessary. +lwarpmk html1 [-p project]: Forced single compile of the HTML version. +lwarpmk htmlindex [-p project]: Process HTML indexes. +lwarpmk htmlglossary [-p project]: Process the glossary for the html version. +lwarpmk again [-p project]: Touch the source code to trigger recompiles. +lwarpmk limages [-p project]: Process the "lateximages" created by lwarp.sty. +lwarpmk pdftohtml [-p project]: For use with latexmk or a Makefile: Converts project_html.pdf to project_html.html and individual HTML files. Finishes the HTML conversion even if there was a compile error. lwarpmk pdftosvg : Converts each PDF file to SVG. -lwarpmk clean [project]: Remove .aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl* -lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html +lwarpmk clean [-p project]: Remove .aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl* +lwarpmk cleanall [-p project]: Remove auxiliary files and also project.pdf, *.html lwarpmk cleanlimages: Removes all images from the "lateximages" directory. lwarpmk -h: Print this help message. lwarpmk --help: Print this help message. ]] ) -printconf () +-- printconf () end -function printconf () --- --- Print the format of the configuration file lwarpmk.conf: +-- function printconf () +-- -- +-- -- Print the format of the configuration file lwarpmk.conf: +-- -- +-- print ( [[ +-- An example lwarpmk.conf or .lwarpmkconf project file: +-- -- +-- opsystem = "Unix" (or "Windows") +-- latexname = "pdflatex" (or "lualatex", or "xelatex") +-- sourcename = "projectname" (the source-code filename w/o .tex) +-- homehtmlfilename = "index" (or perhaps the project name) +-- htmlfilename = "" (or "projectname" - filename prefix) +-- latexmk = "false" (or "true" to use latexmk to build PDFs) +-- shellescape = "false" +-- printindexcmd = "makeindex -s lwarp.ist .idx" +-- HTMLindexcmd = "makeindex -s lwarp.ist _html.idx" +-- latexmkindexcmd = "makeindex -s lwarp.ist" +-- -- indexprog = "makeindex" or "xindy" +-- -- makeindexstyle = "lwarp.ist" (or a custom file based on lwarp.ist) +-- -- xindylanguge = "english" (use a language supported by xindy) +-- -- xindycodepage = "utf8" (use a codepage supported by xindy) +-- -- xindystyle = "lwarp.xdy" (or a custom file based on lwarp.xdy) +-- glossarycmd = "makeglossaries" +-- pdftotextenc = "UTF-8" (use an encoding supported by pdftotext) +-- -- +-- Filenames must contain only letters, numbers, underscore, or dash. +-- Values must be in upright "quotes". -- -print ( [[ -An example lwarpmk.conf or .lwarpmkconf project file: --- -opsystem = "Unix" (or "Windows") -latexname = "pdflatex" (or "lualatex", or "xelatex") -sourcename = "projectname" (the source-code filename w/o .tex) -homehtmlfilename = "index" (or perhaps the project name) -htmlfilename = "" (or "projectname" - filename prefix) -latexmk = "false" (or "true" to use latexmk to build PDFs) -shellescape = "false" -xindylanguge = "english" (use a language supported by xindy) -xindycodepage = "utf8" (use a codepage supported by xindy) -xindystyle = "lwarp.xdy" (or a custom file based on lwarp.xdy) -pdftotextenc = "UTF-8" (use an encoding supported by pdftotext) --- -Filenames must contain only letters, numbers, underscore, or dash. -Values must be in upright "quotes". - -]] ) ; -end +-- ]] ) ; +-- end function splitfile (destfile,sourcefile) -- @@ -3322,7 +3414,7 @@ function cvalueerror ( line, linenum , cvalue ) "\" in lwarpmk.conf.\n" ) ; print ("lwarpmk: ===") - printconf () ; +-- printconf () ; os.exit(1) ; end @@ -3332,16 +3424,31 @@ function loadconf () -- -- Default configuration filename: local conffile = "lwarpmk.conf" +local confroot = "lwarpmk" +-- Global argument index +argindex = 2 -- Optional configuration filename: -if ( arg[2] ~= nil ) then conffile = arg[2]..".lwarpmkconf" end +if ( arg[argindex] == "-p" ) then + argindex = argindex + 1 + confroot = arg[argindex] + conffile = confroot..".lwarpmkconf" + argindex = argindex + 1 +end -- Additional defaults: opsystem = "Unix" latexmk = "false" shellescape = "false" -xindylanguage = "english" -xindycodepage = "utf8" -xindystyle = "lwarp.xdy" -pdftotextenc = "UTF-8" +printindexcmd = "" +HTMLindexcmd = "" +latexmkindexcmd = "" +-- to be removed: +-- indexprog = "makeindex" +-- makeindexstyle = "lwarp.ist" +-- xindylanguage = "english" +-- xindycodepage = "utf8" +-- xindystyle = "lwarp.xdy" +-- pdftotextenc = "UTF-8" +glossarycmd = "makeglossaries" -- Verify the file exists: if (lfs.attributes(conffile,"mode")==nil) then -- file not exists @@ -3350,9 +3457,9 @@ if (lfs.attributes(conffile,"mode")==nil) then print ("lwarpmk: Move to the project's source directory,") print ("lwarpmk: recompile using pdflatex, xelatex, or lualatex,") print ("lwarpmk: then try using lwarpmk again.") - if ( arg[2] ~= nil ) then + if ( arg[argindex] ~= nil ) then print ( - "lwarpmk: (\"" .. arg[2] .. + "lwarpmk: (\"" .. confroot .. "\" does not appear to be a project name.)" ) end @@ -3367,14 +3474,14 @@ local cfile = io.open(conffile) local linenum = 0 for line in cfile:lines() do -- scan lines linenum = linenum + 1 -i,j,cvarname,cvalue = string.find (line,"([%w-_]*)%s*=%s*\"([%w%-_%.]*)\"") ; +i,j,cvarname,cvalue = string.find (line,"([%w-_]*)%s*=%s*\"([^\"]*)\"") ; -- Error if incorrect enclosing characters: if ( i == nil ) then print ("lwarpmk: ===") print ("lwarpmk: " .. linenum .. " : " .. line ) ; print ("lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ; print ("lwarpmk: ===") - printconf () ; +-- printconf () ; os.exit(1) ; end -- nil if ( cvarname == "opsystem" ) then @@ -3400,9 +3507,25 @@ elseif ( cvarname == "homehtmlfilename" ) then homehtmlfilename = cvalue elseif ( cvarname == "htmlfilename" ) then htmlfilename = cvalue elseif ( cvarname == "latexmk" ) then latexmk = cvalue elseif ( cvarname == "shellescape" ) then shellescape = cvalue -elseif ( cvarname == "xindylanguage" ) then xindylanguage = cvalue -elseif ( cvarname == "xindycodepage" ) then xindycodepage = cvalue -elseif ( cvarname == "xindystyle" ) then xindystyle = cvalue +elseif ( cvarname == "printindexcmd" ) then printindexcmd = cvalue +elseif ( cvarname == "HTMLindexcmd" ) then HTMLindexcmd = cvalue +elseif ( cvarname == "latexmkindexcmd" ) then latexmkindexcmd = cvalue +elseif ( cvarname == "glossarycmd" ) then glossarycmd = cvalue +-- to be removed: +-- elseif ( cvarname == "indexprog" ) then +-- -- Verify choice of indexing program: +-- if ( +-- (cvalue == "makeindex") or +-- (cvalue == "xindy") +-- ) then +-- indexprog = cvalue +-- else +-- cvalueerror ( line, linenum , cvalue ) +-- end +-- elseif ( cvarname == "makeindexstyle" ) then makeindexstyle = cvalue +-- elseif ( cvarname == "xindylanguage" ) then xindylanguage = cvalue +-- elseif ( cvarname == "xindycodepage" ) then xindycodepage = cvalue +-- elseif ( cvarname == "xindystyle" ) then xindystyle = cvalue elseif ( cvarname == "pdftotextenc" ) then pdftotextenc = cvalue else print ("lwarpmk: ===") @@ -3412,7 +3535,7 @@ else conffile ..".\n" ) ; print ("lwarpmk: ===") - printconf () ; +-- printconf () ; os.exit(1) ; end -- cvarname end -- do scan lines @@ -3460,15 +3583,6 @@ elseif opsystem=="Windows" then -- For Windows else print ( "lwarpmk: Select Unix or Windows for opsystem" ) end --- for Windows --- set xindycmd, glossarycmd according to pdflatex vs xelatex/lualatex: -if ( latexname == "pdflatex" ) then - xindycmd = "texindy " - glossarycmd = "xindy " -else - xindycmd = "xindy -M texindy " - glossarycmd = "xindy " -end - end -- loadconf function executecheckerror ( executecommands , errormessage ) @@ -3573,8 +3687,8 @@ os.execute ( rmname .. " *.aux " .. sourcename ..".toc " .. sourcename .. "_html.toc " .. sourcename ..".lof " .. sourcename .. "_html.lof " .. sourcename ..".lot " .. sourcename .. "_html.lot " .. - sourcename ..".idx " .. sourcename .. "_html.idx " .. - sourcename ..".ind " .. sourcename .. "_html.ind " .. + " *.idx " .. + " *.ind " .. sourcename ..".log " .. sourcename .. "_html.log " .. sourcename ..".gl* " .. sourcename .. "_html.gl* " .. " *_html_inc.* " @@ -3819,10 +3933,8 @@ executecheckerror ( .. "-e " .. opquote .. "$makeindex = q/" -- $ - .. xindycmd - .. " -M " .. xindystyle - .. " -C " .. xindycodepage - .. " -L " .. xindylanguage .. " /" + .. latexmkindexcmd + .. " /" .. opquote .. " -pdflatex=\"" .. latexname .. thisshellescape .." %O %S\" " .. sourcename..fsuffix ..".tex" @@ -3834,10 +3946,10 @@ end -- function function convertpdftosvg () -- -- Converts PDF files to SVG files. --- The filenames are arg[2] and up. +-- The filenames are arg[argindex] and up. -- arg[1] is the command "pdftosvg". -- -for i = 2 , #arg do +for i = argindex , #arg do if (lfs.attributes(arg[i],"mode")==nil) then print ("lwarpmk: File \"" .. arg[i] .. "\" does not exist.") else @@ -3847,6 +3959,14 @@ for i = 2 , #arg do end -- do end --function +-- Force an update and conclude processing: +function updateanddone () +print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.") +refreshdate () +print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.") +print ("lwarpmk: Done.") +end -- function + -- Start of the main code: -- -- lwarpmk --version : @@ -3893,25 +4013,17 @@ elseif arg[1] == "print1" then onetime("") print ("lwarpmk: Done.") ; --- lwarp printindex: +-- lwarpmk printindex: -- Compile the index then touch the source -- to trigger a recompile of the document: elseif arg[1] == "printindex" then loadconf () -print ("lwarpmk: Processing the index.") -os.execute( - xindycmd - .. " -M " .. xindystyle - .. " -C " .. xindycodepage - .. " -L " .. xindylanguage - .. " " .. sourcename .. ".idx") -print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.") -refreshdate () -print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.") -print ("lwarpmk: Done.") +os.execute ( printindexcmd ) +print ("lwarpmk: -------") +updateanddone () --- lwarp printglossary: +-- lwarpmk printglossary: -- Compile the glossary then touch the source -- to trigger a recompile of the document: @@ -3919,16 +4031,8 @@ elseif arg[1] == "printglossary" then loadconf () print ("lwarpmk: Processing the glossary.") -os.execute(glossarycmd .. - " -L " .. xindylanguage .. - " -C " .. xindycodepage .. - " -I xindy -M " .. sourcename .. - " -t " .. sourcename .. ".glg -o " .. sourcename .. ".gls " - .. sourcename .. ".glo") -print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.") -refreshdate () -print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.") -print ("lwarpmk: Done.") +os.execute(glossarycmd .. " " .. sourcename) +updateanddone () -- lwarpmk html: @@ -3977,38 +4081,20 @@ elseif arg[1] == "pdftohtml" then elseif arg[1] == "htmlindex" then loadconf () -print ("lwarpmk: Processing the index.") -os.execute( - xindycmd - .. " -M " .. xindystyle - .. " -L " .. xindylanguage - .. " -C " .. xindycodepage - .. " " .. sourcename .. "_html.idx" -) -print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.") -refreshdate () -print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.") -print ("lwarpmk: Done.") +os.execute ( HTMLindexcmd ) +print ("lwarpmk: -------") +updateanddone () -- lwarpmk htmlglossary: -- Compile the glossary then touch the source --- to trigger a recompile of the document: +-- to trigger a recompile of the document. +-- The .xdy file is created by the glossaries package. elseif arg[1] == "htmlglossary" then loadconf () print ("lwarpmk: Processing the glossary.") - -os.execute(glossarycmd .. - " -L " .. xindylanguage .. - " -C " .. xindycodepage .. - " -I xindy -M " ..sourcename .. - "_html -t " .. sourcename .. "_html.glg -o " ..sourcename .. - "_html.gls " ..sourcename .. "_html.glo") - -print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.") -refreshdate () -print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.") -print ("lwarpmk: Done.") +os.execute(glossarycmd .. " " .. sourcename .. "_html") +updateanddone () -- lwarpmk limages: -- Scan the lateximages.txt file to create lateximages. @@ -4024,13 +4110,10 @@ print ("lwarpmk: Done.") elseif arg[1] == "again" then loadconf () -print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.") -refreshdate () -print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.") -print ("lwarpmk: Done.") +updateanddone () -- lwarpmk clean: --- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log, *_html_inc.*, .gl* +-- Remove project.aux, .toc, .lof, .lot, .log, *.idx, *.ind, *_html_inc.*, .gl* elseif arg[1] == "clean" then loadconf () @@ -4038,7 +4121,7 @@ removeaux () print ("lwarpmk: Done.") -- lwarpmk cleanall --- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log, *_html_inc.*, .gl* +-- Remove project.aux, .toc, .lof, .lot, .log, *.idx, *.ind, *_html_inc.*, .gl* -- and also project.pdf, *.html elseif arg[1] == "cleanall" then @@ -4197,7 +4280,7 @@ end -- not --version {\csdef{#1#2}{}}% {\expandafter\edef\csname #1#2\endcsname{\expandonce#3}}% } -\newcommand*{\LWR@getexparray}[2]{\csuse{#1#2}} +\newcommand*{\LWR@getexparray}[2]{\@nameuse{#1#2}} \end{warpHTML} @@ -5410,15 +5493,15 @@ end -- not --version \ifthenelse{% \(% \(\NOT\equal{#1}{\BooleanTrue}\)\OR% - \(\cnttest{\csuse{LWR@depth#4}}{=}{\LWR@depthpart}\)\OR% + \(\cnttest{\@nameuse{LWR@depth#4}}{=}{\LWR@depthpart}\)\OR% \(\boolean{LWR@forcinghtmlpage}\)% \)% \AND% - \cnttest{\csuse{LWR@depth#4}}{<=}{\value{FileDepth}}% + \cnttest{\@nameuse{LWR@depth#4}}{<=}{\value{FileDepth}}% \AND% \(% \NOT\boolean{CombineHigherDepths}\OR% - \cnttest{\csuse{LWR@depth#4}}{<=}{\value{LWR@prevFileDepth}}% + \cnttest{\@nameuse{LWR@depth#4}}{<=}{\value{LWR@prevFileDepth}}% \)% \AND% \(% phantomsection @@ -5457,12 +5540,12 @@ end -- not --version }{}% \ifthenelse{% - \cnttest{\csuse{LWR@depth#4}}{>=}{\LWR@depthparagraph}% + \cnttest{\@nameuse{LWR@depth#4}}{>=}{\LWR@depthparagraph}% }% {\LWR@startpars}% {}% \LWR@traceinfo{LWR@section: about to LWR@createautosec}% -\LWR@createautosec{\csuse{LWR@tag#4}}% +\LWR@createautosec{\@nameuse{LWR@tag#4}}% \setcounter{LWR@currentautosec}{\value{page}} \IfBooleanTF{#1}% {% @@ -5473,7 +5556,7 @@ end -- not --version }% starred {% not starred \ifthenelse{% - \cnttest{\csuse{LWR@depth#4}}{<=}{\value{secnumdepth}}% + \cnttest{\@nameuse{LWR@depth#4}}{<=}{\value{secnumdepth}}% }% {% if secnumdepth \LWR@traceinfo{LWR@section: about to test main matter}% @@ -5484,7 +5567,7 @@ end -- not --version \LWR@traceinfo{LWR@section: about to addcontentsline}% \addcontentsline{toc}{#4}% {% - \protect\numberline{\csuse{the#4}}% + \protect\numberline{\@nameuse{the#4}}% {\ignorespaces\IfValueTF{#2}{#2}{#3}\protect\relax}% }% \LWR@traceinfo{LWR@section: finished addcontentsline}% @@ -5500,15 +5583,15 @@ end -- not --version \ifbool{LWR@mainmatter}% {% \ifthenelse{% - \(\cnttest{\csuse{LWR@depth#4}}{<=}% + \(\cnttest{\@nameuse{LWR@depth#4}}{<=}% {\value{secnumdepth}}\) \AND% - \(\cnttest{\csuse{LWR@depth#4}}{<=}{\LWR@depthpart}\)% + \(\cnttest{\@nameuse{LWR@depth#4}}{<=}{\LWR@depthpart}\)% }% - {\csuse{#4name}~{}}% + {\@nameuse{#4name}~{}}% {}% \LWR@traceinfo{LWR@section: about to print section number}% \ifthenelse{% - \cnttest{\csuse{LWR@depth#4}}{<=}{\value{secnumdepth}}% + \cnttest{\@nameuse{LWR@depth#4}}{<=}{\value{secnumdepth}}% }% {% \ifstrequal{#4}{chapter}% @@ -5522,20 +5605,20 @@ end -- not --version \LWR@traceinfo{LWR@section: about to print the section name}% #3% \LWR@traceinfo{LWR@section: about to close the heading tag}% -\LWR@htmltag{\csuse{LWR@tag#4end}}% +\LWR@htmltag{\@nameuse{LWR@tag#4end}}% \LWR@traceinfo{LWR@section: about to create the LaTeX label}% \LWR@newautopagelabel{LWR@currentautosec}% \ifthenelse{% - \cnttest{\csuse{LWR@depth#4}}{<}{\LWR@depthparagraph}% + \cnttest{\@nameuse{LWR@depth#4}}{<}{\LWR@depthparagraph}% }% {\LWR@startpars}% {}% \ifthenelse{% \NOT\equal{#1}{\BooleanTrue}\OR% - \cnttest{\csuse{LWR@depth#4}}{=}{\LWR@depthpart}% + \cnttest{\@nameuse{LWR@depth#4}}{=}{\LWR@depthpart}% }% {% not starred - \setcounter{LWR@prevFileDepth}{\csuse{LWR@depth#4}}% + \setcounter{LWR@prevFileDepth}{\@nameuse{LWR@depth#4}}% }% not starred {}% \ifstrempty{#3}% @@ -5725,8 +5808,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@origonecolumn% \LWR@origpagestyle{empty}% \overfullrule=0pt -\LWR@origscriptsize% -\LWR@origraggedright% +\LWR@print@scriptsize% +\LWR@print@raggedright% \LetLtxMacro{\\}{\LWR@endofline}% \linespread{1.3}% \setlength{\parindent}{0pt} @@ -5782,8 +5865,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \newcommand*{\LWR@requesttoc}[2]{% \ifbool{#1} { - \expandafter\newwrite\csuse{tf@#2} - \immediate\openout \csuse{tf@#2} \jobname.#2\relax + \expandafter\newwrite\@nameuse{tf@#2} + \immediate\openout \@nameuse{tf@#2} \jobname.#2\relax }{} } @@ -6112,7 +6195,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% }{}% \begingroup% \LWR@origttfamily% -\LWR@origsmall% +\LWR@print@small% \LWR@restoreoriglists% \LWR@FBcancel% \LWR@select@print@hspace% @@ -6148,25 +6231,19 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% } } -\LetLtxMacro\LWR@origtabbing\tabbing -\LetLtxMacro\LWR@origendtabbing\endtabbing - -\renewcommand*{\tabbing}{% +\newcommand*{\LWR@HTML@tabbing}{% \LWR@forcenewpage% \LWR@atbeginverbatim{3}{tabbing}% -\LWR@origtabbing% +\LWR@print@tabbing% } -\renewcommand*{\endtabbing}{% - \LWR@origendtabbing% +\newcommand*{\LWR@HTML@endtabbing}{% + \LWR@print@endtabbing% \LWR@afterendverbatim{1}% } -\AtBeginDocument{ -\appto\LWR@restoreorigformatting{% -\LetLtxMacro\tabbing\LWR@origtabbing% -\LetLtxMacro\endtabbing\LWR@origendtabbing% -} -} + +\LWR@formatted{tabbing} +\LWR@formatted{endtabbing} \end{warpHTML} @@ -7578,12 +7655,12 @@ rowspan="#2" % {% \refstepcounter{\LTcaptype}% \protected@edef\@currentlabel{% - \csuse{p@\LTcaptype}\csuse{the\LTcaptype}% + \@nameuse{p@\LTcaptype}\@nameuse{the\LTcaptype}% }% }% }{}% \LWR@figcaption% - \csuse{fnum@\LTcaptype}\CaptionSeparator#3% + \@nameuse{fnum@\LTcaptype}\CaptionSeparator#3% \endLWR@figcaption% \ifblank{#2}% TOC entry empty {}% @@ -7591,21 +7668,21 @@ rowspan="#2" % \IfNoValueTF{#2}% No TOC entry? {% No TOC entry \addcontentsline% - {\csuse{ext@\LTcaptype}}% + {\@nameuse{ext@\LTcaptype}}% {\LTcaptype}% {% \protect\numberline% - {\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}% + {\@nameuse{p@\LTcaptype}\@nameuse{the\LTcaptype}}% {\ignorespaces #3\protect\relax}% }% }% end of No TOC entry {% yes TOC entry \addcontentsline% - {\csuse{ext@\LTcaptype}}% + {\@nameuse{ext@\LTcaptype}}% {\LTcaptype}% {% \protect\numberline% - {\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}% + {\@nameuse{p@\LTcaptype}\@nameuse{the\LTcaptype}}% {\ignorespaces #2\protect\relax}% }% }% end of yes TOC entry @@ -7694,6 +7771,10 @@ rowspan="#2" % \end{warpall} \begin{warpHTML} \newcommand*{\LWR@donothing}{} +\let\firsthline\relax +\let\lasthline\relax +\newcommand*{\firsthline}{} +\newcommand*{\lasthline}{} \newcommand*{\ldelim}{} \newcommand*{\rdelim}{} @@ -7817,6 +7898,14 @@ rowspan="#2" % \begin{warpHTML} +\LetLtxMacro\toprule\relax +\LetLtxMacro\midrule\relax +\LetLtxMacro\cmidrule\cline +\LetLtxMacro\bottomrule\relax +\LetLtxMacro\addlinespace\relax +\LetLtxMacro\morecmidrules\relax +\LetLtxMacro\specialrule\relax + \newcommand*{\toprule}[1][]{\hline} \newcommand*{\midrule}[1][]{\hline} \LetLtxMacro\cmidrule\cline @@ -8055,16 +8144,16 @@ rowspan="#2" % }% pars not allowed }% not lateximage } -\NewDocumentCommand{\LWR@newlabel}{d() m o}{% -\LWR@traceinfo{LWR@newlabel: starting}% -\LWR@traceinfo{LWR@newlabel: !#2!}% -\LWR@origlabel{#2}% -\LWR@traceinfo{LWR@newlabel: filesectionnames is \ifbool{FileSectionNames}{true}{false}}% -\LWR@traceinfo{LWR@newlabel: LWR@thisfilename is !\LWR@thisfilename!}% -\LWR@traceinfo{LWR@newlabel: LWR@htmlfilenumber is \arabic{LWR@htmlfilenumber}}% +\NewDocumentCommand{\LWR@new@label}{d() m o}{% +\LWR@traceinfo{LWR@new@label: starting}% +\LWR@traceinfo{LWR@new@label: !#2!}% +\LWR@orig@label{#2}% +\LWR@traceinfo{LWR@new@label: filesectionnames is \ifbool{FileSectionNames}{true}{false}}% +\LWR@traceinfo{LWR@new@label: LWR@thisfilename is !\LWR@thisfilename!}% +\LWR@traceinfo{LWR@new@label: LWR@htmlfilenumber is \arabic{LWR@htmlfilenumber}}% \LWR@splabel{#2}% \LWR@sublabel{#2}% -\LWR@traceinfo{LWR@newlabel: done}% +\LWR@traceinfo{LWR@new@label: done}% } @@ -8104,24 +8193,26 @@ rowspan="#2" % \NewDocumentCommand{\LWR@subnewref}{m m}{% \LWR@traceinfo{LWR@subnewref #1 #2}% \LWR@startref{#1}% -\LWR@origref{#2}% +\LWR@print@ref{#2}% \LWR@htmltag{/a}% } -\NewDocumentCommand{\LWR@newref}{s m}{% -\LWR@traceinfo{LWR@newref !#2!}% +\NewDocumentCommand{\LWR@HTML@ref}{s m}{% +\LWR@traceinfo{LWR@HTML@ref !#2!}% \IfBooleanTF{#1}% -{\LWR@origref{#2}}% +{\LWR@print@ref{#2}}% {\LWR@subnewref{#2}{#2}}% } + +\LWR@formatted{ref} \NewDocumentCommand{\LWR@ref@ignorestar}{s m}{% - \LWR@origref{#2}% + \LWR@print@ref{#2}% } \newcommand*{\pagerefPageFor}{see } -\NewDocumentCommand{\LWR@newpageref}{s m}{% +\NewDocumentCommand{\LWR@new@pageref}{s m}{% \IfBooleanTF{#1}% -{(\pagerefPageFor\LWR@origref{#2})}% +{(\pagerefPageFor\LWR@print@ref{#2})}% {(\cpageref{#2})}% } @@ -8247,10 +8338,10 @@ autopage-\theLWR@currentautosec% \addtocounter{LWR@thisautoid}{1}% \booltrue{LWR@freezethisautoid}% \begingroup% -\LWR@origraggedright% +\LWR@print@raggedright% \LWR@htmltag{% figure id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}" % space - class="#1 \csuse{LWR@floatstyle@#1}"% + class="#1 \@nameuse{LWR@floatstyle@#1}"% }% \ifbool{FormatWP}{% \LWR@orignewline% @@ -8332,7 +8423,7 @@ autopage-\theLWR@currentautosec% } \newcommand*{\LWR@endfloatalignment}{% -\ifdefvoid{\LWR@floatalignmentname}{}{\csuse{end\LWR@floatalignmentname}}% +\ifdefvoid{\LWR@floatalignmentname}{}{\@nameuse{end\LWR@floatalignmentname}}% \renewcommand*{\LWR@floatalignmentname}{}% } @@ -8373,37 +8464,31 @@ autopage-\theLWR@currentautosec% \LWR@htmlblocktag{/figcaption}% \LWR@traceinfo{LWR@figcaption env end: done}% } - -\AtBeginDocument{ -\LetLtxMacro\LWR@origcaption@begin\caption@begin -\LetLtxMacro\LWR@origcaption@end\caption@end -} - -\newcommand{\LWR@caption@begin}[1] +\newcommand*{\LWR@HTML@caption@begin}[1] { -\LWR@traceinfo{LWR@caption@begin}% +\LWR@traceinfo{LWR@HTML@caption@begin}% \begingroup% \@setpar{\LWR@closeparagraph\@@par}% \RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}% \RenewDocumentCommand{\parbox}{O{t} o O{t} m +m}{##5}% \LWR@figcaption% -\LWR@traceinfo{LWR@caption@begin: about to LWR@origcaption@begin}% -\LWR@origcaption@begin{#1}% -\LWR@traceinfo{LWR@caption@begin: done}% +\LWR@traceinfo{LWR@HTML@caption@begin: about to LWR@origcaption@begin}% +\LWR@print@caption@begin{#1}% +\LWR@traceinfo{LWR@HTML@caption@begin: done}% } -\newcommand{\LWR@caption@end} +\newcommand*{\LWR@HTML@caption@end} {% -\LWR@traceinfo{LWR@caption@end}% -\LWR@origcaption@end% +\LWR@traceinfo{LWR@HTML@caption@end}% +\LWR@print@caption@end% \endLWR@figcaption% \endgroup% -\LWR@traceinfo{LWR@caption@end: done}% +\LWR@traceinfo{LWR@HTML@caption@end: done}% } \AtBeginDocument{ -\let\caption@begin\LWR@caption@begin -\let\caption@end\LWR@caption@end +\LWR@formatted{caption@begin} +\LWR@formatted{caption@end} } \let\LWR@origcaptionlistentry\captionlistentry @@ -8538,12 +8623,12 @@ autopage-\theLWR@currentautosec% \NewDocumentCommand{\listof}{m +m}{% \@ifundefined{l@#1}{% - \csdef{l@#1}[2]{\hypertocfloat{1}{#1}{\csuse{ext@#1}}{##1}{##2}}% + \csdef{l@#1}[2]{\hypertocfloat{1}{#1}{\@nameuse{ext@#1}}{##1}{##2}}% }{}% \LWR@subtableofcontents{\@nameuse{ext@#1}}{#2} \expandafter\newwrite\csname tf@\csname ext@#1\endcsname\endcsname \immediate\openout \csname tf@\csname ext@#1\endcsname\endcsname - \jobname.\csuse{ext@#1}\relax + \jobname.\@nameuse{ext@#1}\relax } @@ -8659,28 +8744,22 @@ autopage-\theLWR@currentautosec% \newcounter{LWR@autoglossary} \setcounter{LWR@autoglossary}{0} -\let\LWR@origprintindex\printindex - -\renewcommand*{\printindex} -{ -\LWR@startpars -\LWR@origprintindex -} - \@ifundefined{chapter} {\newcommand*{\LWR@indexsection}[1]{\section*{#1}}} {\newcommand*{\LWR@indexsection}[1]{\chapter*{#1}}} +\AtBeginDocument{ \renewenvironment*{theindex}{% -\LWR@indexsection{\indexname}% -\let\item\LWR@indexitem% -\let\subitem\LWR@indexsubitem% -\let\subsubitem\LWR@indexsubsubitem% + \LWR@indexsection{\indexname}% + \let\item\LWR@indexitem% + \let\subitem\LWR@indexsubitem% + \let\subsubitem\LWR@indexsubsubitem% }{} +}% AtBeginDocument -\newcommand{\LWR@indexitem}{ +\newcommand{\LWR@indexitem}[1][\@empty]{ -\InlineClass{indexitem}{} +\InlineClass{indexitem}{}#1% } \newcommand{\LWR@indexsubitem}{ @@ -8695,23 +8774,54 @@ autopage-\theLWR@currentautosec% \def\LWR@wrindex#1{% \addtocounter{LWR@autoindex}{1}% -\LWR@newlabel{LWRindex-\arabic{LWR@autoindex}}% +\LWR@new@label{LWRindex-\arabic{LWR@autoindex}}% \protected@write\@indexfile{}% {\string\indexentry{#1}{\arabic{LWR@autoindex}}}% \endgroup \@esphack} +\AtBeginDocument{ \let\@wrindex\LWR@wrindex +} \def\@wrglossary#1{% \addtocounter{LWR@autoglossary}{1}% -\LWR@newlabel{LWRglossary-\theLWR@autoglossary}% +\LWR@new@label{LWRglossary-\theLWR@autoglossary}% \protected@write\@glossaryfile{}% {\string\glossaryentry{#1}{\theLWR@autoglossary}}% \endgroup \@esphack} -\newcommand*{\hyperindexref}[1]{\nameref{LWRindex-#1}} +\newcommand*{\LWR@indexnameref}[1]{\nameref{LWRindex-#1}} + +\newrobustcmd{\LWR@doindexentry}[1]{% +\IfInteger{#1}% + {\LWR@indexnameref{#1}}% + {#1}% +} + +\newcommand{\LWR@hyperindexrefnullified}{% +\renewcommand{\emph}[1]{\LWR@HTMLemph{\LWR@doindexentry{##1}}}% +\renewcommand{\textbf}[1]{\LWR@HTMLtextbf{\LWR@doindexentry{##1}}}% +\renewcommand{\textrm}[1]{\LWR@HTMLtextrm{\LWR@doindexentry{##1}}}% +\renewcommand{\textsf}[1]{\LWR@HTMLtextsf{\LWR@doindexentry{##1}}}% +\renewcommand{\texttt}[1]{\LWR@HTMLtexttt{\LWR@doindexentry{##1}}}% +\renewcommand{\textup}[1]{\LWR@HTMLtextup{\LWR@doindexentry{##1}}}% +\renewcommand{\textsc}[1]{\LWR@HTMLtextsc{\LWR@doindexentry{##1}}}% +\renewcommand{\textit}[1]{\LWR@HTMLtextit{\LWR@doindexentry{##1}}}% +\renewcommand{\textsl}[1]{\LWR@HTMLtextsl{\LWR@doindexentry{##1}}}% +} + +\newcommand{\hyperindexref}[1]{% +\IfInteger{#1}% + {\LWR@indexnameref{#1}}% + {% + \begingroup% + \LWR@hyperindexrefnullified + #1% + \endgroup% + }% +} \end{warpHTML} @@ -8760,32 +8870,13 @@ autopage-\theLWR@currentautosec% \LWR@traceinfo{LWR@restoreorigformatting}% \renewcommand*{\LWR@formatting}{print}% \linespread{1}% -\LetLtxMacro\caption@begin\LWR@origcaption@begin% -\LetLtxMacro\caption@end\LWR@origcaption@end% \let\par\LWR@origpar% -\LetLtxMacro\ref\LWR@origref% {} syntax highlighting -\let\normalsize\LWR@orignormalsize% -\let\small\LWR@origsmall% -\let\footnotesize\LWR@origfootnotesize% -\let\scriptsize\LWR@origscriptsize% -\let\tiny\LWR@origtiny% -\let\large\LWR@origlarge% -\let\Large\LWR@origLarge% -\let\LARGE\LWR@origLARGE% -\let\huge\LWR@orighuge% -\let\Huge\LWR@origHuge% \LWR@select@print@hspace% -\LetLtxMacro\hfill\LWR@orighfill% \LetLtxMacro\hfil\LWR@orighfil% -\LetLtxMacro\hrulefill\LWR@orighrulefill% -\LetLtxMacro\dotfill\LWR@origdotfill% \let\hss\LWR@orighss% \let\llap\LWR@origllap% \let\rlap\LWR@origrlap% \let\hfilneg\LWR@orighfilneg% -\let\raggedright\LWR@origraggedright% -\let\raggedleft\LWR@origraggedleft% -\let\centering\LWR@origcentering% \let\,\LWR@origcomma% disable HTML short unbreakable space \let\thinspace\LWR@origthinspace% disable HTML short unbreakable space \let\textellipsis\LWR@origtextellipsis% @@ -8927,13 +9018,13 @@ autopage-\theLWR@currentautosec% \begingroup% \LWR@restoreorigformatting% \RenewDocumentEnvironment{lateximage}{s o o o}{}{}% inside group - \LWR@orignormalsize% + \LWR@print@normalsize% \LWR@traceinfo{Using font family \LWR@f@family}% - \csuse{LWR@orig\LWR@f@family family}% + \@nameuse{LWR@orig\LWR@f@family family}% \LWR@traceinfo{Using font series \LWR@f@series}% - \csuse{LWR@orig\LWR@f@series series}% + \@nameuse{LWR@orig\LWR@f@series series}% \LWR@traceinfo{Using font shape \LWR@f@shape}% - \csuse{LWR@orig\LWR@f@shape shape}% + \@nameuse{LWR@orig\LWR@f@shape shape}% \global\advance\c@LWR@lateximagedepth 1\relax% \ifmmode% \global\sbox{\LWR@singledollarbox}{#4}% @@ -9205,10 +9296,10 @@ autopage-\theLWR@currentautosec% \LWR@htmlopencomment \begingroup -\csuse{LWR@orig#1} +\@nameuse{LWR@orig#1} \LWR@restoreorigformatting #2 -\csuse{LWR@origend#1} +\@nameuse{LWR@origend#1} \endgroup \LWR@htmlclosecomment @@ -9255,11 +9346,11 @@ autopage-\theLWR@currentautosec% \LWR@HTMLsanitizeexpand{\detokenize\expandafter{#1}} % extra space \textbackslash{end\{#2\}}% ]% alt tag - \csuse{LWR@orig#2} + \@nameuse{LWR@orig#2}% #1% contents collected by \collect@body - \csuse{LWR@origend#2} + \@nameuse{LWR@origend#2}% \end{lateximage}% - \end{BlockClass} + \end{BlockClass}% }% not mathjax } \newcommand*{\LWR@doendequation}[1]{% @@ -9275,17 +9366,15 @@ autopage-\theLWR@currentautosec% \csletcs{equation*}{relax} \csletcs{endequation*}{relax} -\NewEnviron{equation} -{ -\LWR@doequation{\BODY}{equation} -} +\NewEnviron{equation}% +{\LWR@doequation{\BODY}{equation}}% [\LWR@doendequation{equation}] \LetLtxMacro\LWR@equationnormal\equation \LetLtxMacro\LWR@endequationnormal\endequation -\NewEnviron{equation*} -{\LWR@doequation{\BODY}{equation*}} +\NewEnviron{equation*}% +{\LWR@doequation{\BODY}{equation*}}% [\LWR@doendequation{equation*}] \csletcs{LWR@equationnormalstar}{equation*} @@ -9338,8 +9427,8 @@ autopage-\theLWR@currentautosec% \LWR@traceinfo{LWR@htmlmathlabelb #1}% \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }% {% - \text{ - \ifbool{LWR@amsmultline}{}{\hspace*{\totwidth@}} + \text{% + \ifbool{LWR@amsmultline}{}{\hspace*{\totwidth@}}% \LWR@htmlclosecomment% \LWR@origltx@label{#1}% \LWR@htmlopencomment% @@ -9878,14 +9967,14 @@ autopage-\theLWR@currentautosec% \LWR@orignewpage% \LWR@traceinfo{lateximage: about to create minipage}% \LWR@print@minipage{6in}% - \csuse{LWR@orig\LateximageFontSizeName}% + \@nameuse{LWR@print@\LateximageFontSizeName}% \LWR@traceinfo{lateximage: about to temporarily restore formatting}% \LWR@restoreorigformatting% \def\@mpfn{footnote}% \def\thempfn{\thefootnote}% \LetLtxMacro\@footnotetext\LWR@footnotetext% \LWR@traceinfo{lateximage: about to create label}% - \LWR@origlabel{LWRlateximage\arabic{LWR@lateximagenumber}}% + \LWR@orig@label{LWRlateximage\arabic{LWR@lateximagenumber}}% \LWR@traceinfo{lateximage: finished creating the label}% \LetLtxMacro$\LWR@origdollar% \catcode`\$=3% math shift @@ -9916,7 +10005,7 @@ autopage-\theLWR@currentautosec% \LWR@traceinfo{lateximage: ending outer-most lateximage}% \endLWR@print@minipage% \LWR@orignewpage% - \LWR@origscriptsize% + \LWR@print@scriptsize% \LWR@print@vspace*{.5\baselineskip}% \LWR@htmlclosecomment% \LWR@traceinfo{lateximage: The page after the image is \arabic{page}}% @@ -9987,23 +10076,26 @@ autopage-\theLWR@currentautosec% {\endBlockClass} -\renewcommand*{\centering}{% +\newcommand*{\LWR@HTML@centering}{% \ifbool{HTMLDebugComments}{% \LWR@htmlcomment{centering}% }{}% } +\LWR@formatted{centering} -\renewcommand*{\raggedleft}{% +\newcommand*{\LWR@HTML@raggedleft}{% \ifbool{HTMLDebugComments}{% \LWR@htmlcomment{raggedleft}% }{}% } +\LWR@formatted{raggedleft} -\renewcommand*{\raggedright}{% +\newcommand*{\LWR@HTML@raggedright}{% \ifbool{HTMLDebugComments}{% \LWR@htmlcomment{raggedright}% }{}% } +\LWR@formatted{raggedright} \renewcommand{\leftline}[1]{\begin{flushleft}#1\end{flushleft}} @@ -10283,15 +10375,11 @@ autopage-\theLWR@currentautosec% }% AfterEndPreamble -\LetLtxMacro\LWR@origlabel\label -\RenewDocumentCommand{\label}{}{\LWR@newlabel} - -\LetLtxMacro\LWR@origref\ref -\RenewDocumentCommand{\ref}{}{\LWR@newref}% - -\LetLtxMacro\LWR@origpageref\pageref -\RenewDocumentCommand{\pageref}{}{\LWR@newpageref} +\LetLtxMacro\LWR@orig@label\label +\RenewDocumentCommand{\label}{}{\LWR@new@label} +\LetLtxMacro\LWR@orig@pageref\pageref +\RenewDocumentCommand{\pageref}{}{\LWR@new@pageref} \end{warpHTML} @@ -10373,7 +10461,7 @@ autopage-\theLWR@currentautosec% \setlength{\linewidth}{#4}% the original width \setlength{\textwidth}{6in}% \setlength{\textheight}{9in}% -\LWR@origraggedright% +\LWR@print@raggedright% \def\@mpfn{mpfootnote}% \def\thempfn{\thempfootnote}\c@mpfootnote\z@% \let\@footnotetext\@mpfootnotetext% @@ -10778,16 +10866,35 @@ width:\LWR@printlength{\LWR@tempwidth}% \renewrobustcmd*{~}{\HTMLentity{nbsp}} \renewrobustcmd*{\textellipsis}{\HTMLunicode{2026}} -\renewrobustcmd*{\normalsize}{} -\renewrobustcmd*{\small}{} -\renewrobustcmd*{\footnotesize}{} -\renewrobustcmd*{\scriptsize}{} -\renewrobustcmd*{\tiny}{} -\renewrobustcmd*{\large}{} -\renewrobustcmd*{\Large}{} -\renewrobustcmd*{\LARGE}{} -\renewrobustcmd*{\huge}{} -\renewrobustcmd*{\Huge}{} +\newrobustcmd*{\LWR@HTML@normalsize}{} +\LWR@formatted{normalsize} + +\newrobustcmd*{\LWR@HTML@small}{} +\LWR@formatted{small} + +\newrobustcmd*{\LWR@HTML@footnotesize}{} +\LWR@formatted{footnotesize} + +\newrobustcmd*{\LWR@HTML@scriptsize}{} +\LWR@formatted{scriptsize} + +\newrobustcmd*{\LWR@HTML@tiny}{} +\LWR@formatted{tiny} + +\newrobustcmd*{\LWR@HTML@large}{} +\LWR@formatted{large} + +\newrobustcmd*{\LWR@HTML@Large}{} +\LWR@formatted{Large} + +\newrobustcmd*{\LWR@HTML@LARGE}{} +\LWR@formatted{LARGE} + +\newrobustcmd*{\LWR@HTML@huge}{} +\LWR@formatted{huge} + +\newrobustcmd*{\LWR@HTML@Huge}{} +\LWR@formatted{Huge} \DeclareDocumentCommand{\onecolumn}{}{} \DeclareDocumentCommand{\twocolumn}{O{}}{ @@ -10796,11 +10903,14 @@ width:\LWR@printlength{\LWR@tempwidth}% } -\renewcommand*{\hfill}{\qquad} +\newcommand*{\LWR@HTML@hfill}{\qquad} +\LWR@formatted{hfill} -\renewcommand*{\hrulefill}{\rule{1in}{1pt}} +\newcommand*{\LWR@HTML@hrulefill}{\rule{1in}{1pt}} +\LWR@formatted{hrulefill} -\renewcommand*{\dotfill}{\dots} +\newcommand*{\LWR@HTML@dotfill}{\dots} +\LWR@formatted{dotfill} \renewcommand*{\newpage}{ -- cgit v1.2.3