summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty201
1 files changed, 114 insertions, 87 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index 4dd876182ec..9fb90c6691c 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}
- [2019/10/15 v0.77 Allows LaTeX to directly produce HTML5 output.]
+ [2019/11/07 v0.78 Allows LaTeX to directly produce HTML5 output.]
@@ -188,6 +188,7 @@
\LWR@loadafter{a5comb}
\LWR@notmemoirloadafter{abstract}
\LWR@loadafter{academicons}
+\LWR@loadafter{accessibility}
\LWR@loadafter{accsupp}
\LWR@loadafter{acro}
\LWR@loadafter{acronym}
@@ -1077,15 +1078,27 @@
\begin{warpall}
-\RequirePackage{filecontents}
+\@ifundefined{filec@ntents@opt}{% older kernel, discard optional args
-\@ifpackagelater{filecontents}{2011/10/09}%
-{}
-{
-\newwrite\fcwrite
-\let\LWR@origfilec@ntents\filec@ntents
-\def\filec@ntents{\def\chardef##1\write{\let\reserved@c\fcwrite}\LWR@origfilec@ntents}
-}
+ \RequirePackage{filecontents}
+
+ \LetLtxMacro\LWR@orig@filec@ntents\filec@ntents
+
+ \@ifpackagelater{filecontents}{2011/10/08}
+ {
+ \renewcommand*{\filec@ntents}[1][]{\LWR@orig@filec@ntents}
+ }
+ {% patch older package for morewrites
+ \newwrite\fcwrite
+ \renewcommand*{\filec@ntents}[1][]{%
+ \def\chardef##1\write{\let\reserved@c\fcwrite}%
+ \LWR@orig@filec@ntents%
+ }
+ }
+
+}% older kernel
+{% newer kernel
+}% newer kernel, filecontents env accepts optional args, do not load package
\end{warpall}
@@ -1138,6 +1151,7 @@
\begin{warpall}
\LetLtxMacro\LWR@origRequirePackage\RequirePackage
+\LetLtxMacro\LWR@origRequirePackageWithOptions\RequirePackageWithOptions
\newcommand*{\LWR@requirepackagenames}{}
@@ -1259,13 +1273,13 @@
\IfValueTF{#1}%
{% options given
\IfValueTF{#3}% version given?
- {\LWR@origRequirePackage[#1]{\LWR@parsedrequirepackagenames}[#3]}%
- {\LWR@origRequirePackage[#1]{\LWR@parsedrequirepackagenames}}%
+ {\LWR@origRequirePackage[#1]{\LWR@parsedrequirepackagenames}[#3]}%
+ {\LWR@origRequirePackage[#1]{\LWR@parsedrequirepackagenames}}%
}%
{% no options given
\IfValueTF{#3}% version given?
- {\LWR@origRequirePackage{\LWR@parsedrequirepackagenames}[#3]}%
- {\LWR@origRequirePackage{\LWR@parsedrequirepackagenames}}%
+ {\LWR@origRequirePackage{\LWR@parsedrequirepackagenames}[#3]}%
+ {\LWR@origRequirePackage{\LWR@parsedrequirepackagenames}}%
}%
}
\LetLtxMacro\usepackage\RequirePackage
@@ -1279,15 +1293,17 @@
Using package `#1' and adding lwarp modifications,\MessageBreak
including options,}%
\IfValueTF{#2}
-{\ProvidesPackage{lwarp-#1}[#2]}
-{\ProvidesPackage{lwarp-#1}}
-\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{#1}}
-\ProcessOptions\relax
-\IfValueTF{#2}
-{\LWR@origRequirePackage{#1}[#2]}
-{\LWR@origRequirePackage{#1}}
+ {\ProvidesPackage{lwarp-#1}[#2]}
+ {\ProvidesPackage{lwarp-#1}}
+\DeclareOption*{%
+ \PassOptionsToPackage{\CurrentOption}{#1}%
+}
+\ProcessOptions\relax%
+\IfValueTF{#2}%
+ {\LWR@origRequirePackage{#1}[#2]}%
+ {\LWR@origRequirePackage{#1}}%
\DeclareOption*{}%
-\ProcessOptions\relax
+\ProcessOptions\relax%
}
\newcommand*{\LWR@ProvidesPackageDropA}[2]{%
@@ -1928,7 +1944,7 @@
\begin{LWRwriteconf}
-\begin{filecontents*}{lwarp.css}
+\begin{filecontents*}[overwrite]{lwarp.css}
/*
CSS stylesheet for the LaTeX lwarp package
Copyright 2016-2019 Brian Dunn — BD Tech Concepts LLC
@@ -3464,7 +3480,7 @@ span.sidetocthetitle { display: none }
\begin{LWRwriteconf}
-\begin{filecontents*}{lwarp_sagebrush.css}
+\begin{filecontents*}[overwrite]{lwarp_sagebrush.css}
@import url("lwarp.css") ;
A:link {color:#105030 ; text-decoration: none ; }
@@ -3696,7 +3712,7 @@ nav.sidetoc a:hover {
\begin{LWRwriteconf}
-\begin{filecontents*}{lwarp_formal.css}
+\begin{filecontents*}[overwrite]{lwarp_formal.css}
@import url("lwarp.css") ;
A:link {color:#802020 ; text-decoration:none; }
@@ -3889,7 +3905,7 @@ nav.botnavigation {
\begin{LWRwriteconf}
-\begin{filecontents*}{sample_project.css}
+\begin{filecontents*}[overwrite]{sample_project.css}
/* ( --- Start of project.css --- ) */
/* ( --- A sample project-specific CSS file for lwarp --- ) */
@@ -3907,7 +3923,7 @@ nav.botnavigation {
\begin{LWRwriteconf}
-\begin{filecontents*}{lwarp.ist}
+\begin{filecontents*}[overwrite]{lwarp.ist}
preamble
"\\begin{theindex}
\\providecommand*\\lettergroupDefault[1]{}
@@ -3932,7 +3948,7 @@ page_compositor "."
\begin{LWRwriteconf}
-\begin{filecontents*}{lwarp.xdy}
+\begin{filecontents*}[overwrite]{lwarp.xdy}
(require "tex/inputenc/latin.xdy")
(merge-rule "\\PS *" "Postscript")
(require "texindy.xdy")
@@ -3982,7 +3998,7 @@ page_compositor "."
\begin{LWRwriteconf}
-\begin{filecontents*}{lwarp_mathjax.txt}
+\begin{filecontents*}[overwrite]{lwarp_mathjax.txt}
<!-- https://groups.google.com/forum/#!topic/
mathjax-users/jUtewUcE2bY -->
<script type="text/x-mathjax-config">
@@ -4083,12 +4099,12 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-
\begin{LWR@createlwarpmk}
-\begin{filecontents*}{lwarpmk.lua}
+\begin{filecontents*}[overwrite]{lwarpmk.lua}
#!/usr/bin/env texlua
-- Copyright 2016-2019 Brian Dunn
-printversion = "v0.77"
+printversion = "v0.78"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -5390,11 +5406,16 @@ end -- not --version
\providecommand*{\LWR@FBcancel}{}
\AtBeginDocument{%
+\@ifundefined{NoAutoSpacing}%
+ {}%
+ {%
+ \LetLtxMacro\LWR@FBcancel\NoAutoSpacing%
+ }%
+
\@ifundefined{frenchbsetup}%
{}%
{%
\frenchbsetup{FrenchFootnotes=false}%
- \LetLtxMacro\LWR@FBcancel\NoAutoSpacing%
\renewrobustcmd*{\FBcolonspace}{%
\begingroup%
\LWR@FBcancel%
@@ -9104,7 +9125,7 @@ rowspan="#2" %
}
\AtBeginDocument{
-\@ifundefined{frenchbsetup}%
+\@ifundefined{NoAutoSpacing}%
{% no babel-french
\newcommand*{\LWR@nullifyNoAutoSpacing}{}
}% no babel-french
@@ -9448,85 +9469,90 @@ autopage-\theLWR@currentautosec%
}
}
+\newcommand*{\LWR@linkcatcodes}{%
+ \catcode`\#=12%
+ \catcode`\%=12%
+ \catcode`\&=12%
+ \catcode`\~=12%
+ \catcode`\_=12%
+ \LWR@FBcancel%
+}
+
+\newcommand*{\LWR@linkmediacatcodes}{%
+ \catcode`\#=12%
+ \catcode`\%=12%
+ \catcode`\~=12%
+ \catcode`\_=12%
+ \LWR@FBcancel%
+}
+
\NewDocumentCommand{\LWR@subhyperref}{m}{%
-\LWR@traceinfo{LWR@subhyperref !#1!}%
-\LWR@sanitize{#1}%
-\LWR@htmltag{%
- a href="\LWR@sanitized" % space
- \LWR@addlinktitle % space
- target="\_{}blank" % space
-}%
+ \LWR@traceinfo{LWR@subhyperref !#1!}%
+ \LWR@sanitize{#1}%
+ \LWR@htmltag{%
+ a href="\LWR@sanitized" % space
+ \LWR@addlinktitle % space
+ target="\_{}blank" % space
+ }%
}
\newcommand{\LWR@subhyperreftext}[1]{%
-#1%
-\LWR@htmltag{/a}%
-\LWR@ensuredoingapar%
+ #1%
+ \LWR@htmltag{/a}%
+ \LWR@ensuredoingapar%
}
\NewDocumentCommand{\LWR@subhyperrefclass}{m +m m}{%
-\LWR@htmltag{%
- a % space
- href="\begingroup\@sanitize#1\endgroup" % space
- class="#3" % space
- \LWR@addlinktitle % space
-}\LWR@orignewline%
-#2\LWR@orignewline%
-\LWR@htmltag{/a}%
-\LWR@ensuredoingapar%
+ \LWR@htmltag{%
+ a % space
+ href="\begingroup\@sanitize#1\endgroup" % space
+ class="#3" % space
+ \LWR@addlinktitle % space
+ }\LWR@orignewline%
+ #2%
+ \LWR@htmltag{/a}%
+ \LWR@ensuredoingapar%
}
\DeclareDocumentCommand{\LWR@hrefb}{O{} m}{%
-\LWR@ensuredoingapar%
-\LWR@subhyperref{#2}%
-\endgroup% restore catcodes
-\LWR@subhyperreftext%
+ \LWR@ensuredoingapar%
+ \LWR@subhyperref{#2}%
+ \endgroup% restore catcodes
+ \LWR@subhyperreftext%
}
\newrobustcmd*{\href}{%
-\begingroup%
-\catcode`\#=12%
-\catcode`\%=12%
-\catcode`\&=12%
-\catcode`\~=12%
-\catcode`\_=12%
-\LWR@hrefb%
+ \begingroup%
+ \LWR@linkcatcodes%
+ \LWR@hrefb%
}
\newcommand*{\LWR@nolinkurlb}[1]{%
-\LWR@ensuredoingapar%
-\def\LWR@templink{#1}%
-\@onelevel@sanitize\LWR@templink%
-\LWR@templink%
-\endgroup%
+ \LWR@ensuredoingapar%
+ \def\LWR@templink{#1}%
+ \@onelevel@sanitize\LWR@templink%
+ \LWR@templink%
+ \endgroup%
}
\newrobustcmd*{\nolinkurl}{%
-\begingroup%
-\catcode`\#=12%
-\catcode`\%=12%
-\catcode`\&=12%
-\catcode`\~=12%
-\catcode`\_=12%
-\LWR@nolinkurlb%
+ \begingroup%
+ \LWR@linkcatcodes%
+ \LWR@nolinkurlb%
}
\DeclareDocumentCommand{\LWR@urlb}{m}{%
-\LWR@ensuredoingapar%
-\def\LWR@templink{#1}%
-\@onelevel@sanitize\LWR@templink%
-\href{\LWR@templink}{\LWR@templink}%
-\endgroup%
+ \LWR@ensuredoingapar%
+ \def\LWR@templink{#1}%
+ \@onelevel@sanitize\LWR@templink%
+ \href{\LWR@templink}{\LWR@templink}%
+ \endgroup%
}
\newrobustcmd*{\url}{%
-\begingroup%
-\catcode`\#=12%
-\catcode`\%=12%
-\catcode`\&=12%
-\catcode`\~=12%
-\catcode`\_=12%
-\LWR@urlb%
+ \begingroup%
+ \LWR@linkcatcodes%
+ \LWR@urlb%
}
\newcommand*{\LWR@subinlineimage}[5]{%
@@ -12191,7 +12217,8 @@ color:\LWR@origpound\LWR@tempcolor%
\newrobustcmd*{\LWR@HTML@slshape}{\renewcommand*{\LWR@f@shape}{sl}}
\LWR@formatted{slshape}
-\renewrobustcmd*{\normalfont}{\rmfamily\mdseries\upshape\ulcshape}
+\newrobustcmd*{\LWR@HTML@normalfont}{\rmfamily\mdseries\upshape\ulcshape}
+\LWR@formatted{normalfont}
\renewcommand{\sp}[1]{\text{<sup>#1</sup>}{}}