summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-03-02 22:02:43 +0000
committerKarl Berry <karl@freefriends.org>2017-03-02 22:02:43 +0000
commite4e5bf0f152ea04be229a2747f8b3c2edc4407e7 (patch)
tree9c5cd61daa005af44bd3f8615574121ac434b315 /Master/texmf-dist/tex/latex/lwarp/lwarp.sty
parent7282f0820d643e7b73cfbc1c46593f1099dd62a9 (diff)
lwarp (2mar17)
git-svn-id: svn://tug.org/texlive/trunk@43383 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty240
1 files changed, 158 insertions, 82 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index 067c256e60b..dd31708c123 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -6,7 +6,7 @@
%%
%% lwarp.dtx (with options: `package')
%% This is a generated file.
-%% Copyright 2016 Brian Dunn
+%% Copyright 2016-2017 Brian Dunn
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2017/02/23 v0.21 Allows LaTeX to directly produce HTML5 output.]
+ [2017/03/02 v0.22 Allows LaTeX to directly produce HTML5 output.]
@@ -106,7 +106,7 @@
-\newcommand*{\LWR@noloadbefore}[1]{%
+\newcommand*{\LWR@loadafter}[1]{%
\@ifpackageloaded{#1}
{
\PackageError{lwarp}
@@ -118,55 +118,73 @@ after lwarp.}
{}
}
-\newcommand*{\LWR@noloadafter}[1]{%
+\newcommand*{\LWR@loadbefore}[1]{%
\PackageError{lwarp}
{Package #1 must be loaded before lwarp}
{Move \detokenize{\usepackage}{#1} before \detokenize{\usepackage}{lwarp}.}
}
-\LWR@noloadbefore{afterpage}
-\LWR@noloadbefore{algorithmicx}
-\LWR@noloadbefore{alltt}
-\LWR@noloadbefore{bookmark}
-\LWR@noloadbefore{booktabs}
-\LWR@noloadbefore{draftwatermark}
-\LWR@noloadbefore{epigraph}
-\LWR@noloadbefore{eso-pic}
-\LWR@noloadbefore{everypage}
-\LWR@noloadbefore{extramarks}
-\LWR@noloadbefore{fancyhdr}
-\LWR@noloadbefore{floatrow}
-\LWR@noloadbefore{float}
-\LWR@noloadbefore{geometry}
-\LWR@noloadbefore{graphics}
-\LWR@noloadbefore{graphicx}
-\LWR@noloadbefore{hyperref}
-\LWR@noloadbefore{keyfloat}
-\LWR@noloadbefore{letterspace}
-\LWR@noloadbefore{listings}
-\LWR@noloadbefore{longtable}
-\LWR@noloadbefore{ltcaption}
-\LWR@noloadbefore{mdframed}
-\LWR@noloadbefore{microtype}
-\LWR@noloadbefore{multirow}
-\LWR@noloadbefore{needspace}
-\LWR@noloadbefore{nowidow}
-\LWR@noloadbefore{pagenote}
-\LWR@noloadbefore{placeins}
-\LWR@noloadbefore{ragged2e}
-\LWR@noloadbefore{rotating}
-\LWR@noloadbefore{setspace}
-\LWR@noloadbefore{textpos}
-\LWR@noloadbefore{threeparttable}
-\LWR@noloadbefore{titleps}
-\LWR@noloadbefore{titlesec}
-\LWR@noloadbefore{titletoc}
-\LWR@noloadbefore{tocloft}
-\LWR@noloadbefore{trivfloat}
-\LWR@noloadbefore{wallpaper}
-\LWR@noloadbefore{wrapfig}
-\LWR@noloadbefore{xcolor}
-\LWR@noloadbefore{xfrac}
+\LWR@loadafter{abstract}
+\LWR@loadafter{afterpage}
+\LWR@loadafter{algorithmicx}
+\LWR@loadafter{alltt}
+\LWR@loadafter{bookmark}
+\LWR@loadafter{booktabs}
+\LWR@loadafter{changepage}
+\LWR@loadafter{dcolumn}
+\LWR@loadafter{draftwatermark}
+\LWR@loadafter{enumerate}
+\LWR@loadafter{epigraph}
+\LWR@loadafter{eso-pic}
+\LWR@loadafter{everypage}
+\LWR@loadafter{extramarks}
+\LWR@loadafter{fancyhdr}
+\LWR@loadafter{floatrow}
+\LWR@loadafter{float}
+\LWR@loadafter{ftnright}
+\LWR@loadafter{geometry}
+\LWR@loadafter{graphics}
+\LWR@loadafter{graphicx}
+\LWR@loadafter{hyperref}
+\LWR@loadafter{indentfirst}
+\LWR@loadafter{keyfloat}
+\LWR@loadafter{layout}
+\LWR@loadafter{letterspace}
+\LWR@loadafter{listings}
+\LWR@loadafter{longtable}
+\LWR@loadafter{lscape}
+\LWR@loadafter{ltcaption}
+\LWR@loadafter{mcaption}
+\LWR@loadafter{mdframed}
+\LWR@loadafter{microtype}
+\LWR@loadafter{multirow}
+\LWR@loadafter{nameref}
+\LWR@loadafter{needspace}
+\LWR@loadafter{newtxmath}
+\LWR@loadafter{nextpage}
+\LWR@loadafter{nowidow}
+\LWR@loadafter{pagenote}
+\LWR@loadafter{parskip}
+\LWR@loadafter{placeins}
+\LWR@loadafter{ragged2e}
+\LWR@loadafter{rotating}
+\LWR@loadafter{setspace}
+\LWR@loadafter{showkeys}
+\LWR@loadafter{sidecap}
+\LWR@loadafter{tabularx}
+\LWR@loadafter{textpos}
+\LWR@loadafter{threeparttable}
+\LWR@loadafter{titleps}
+\LWR@loadafter{titlesec}
+\LWR@loadafter{titletoc}
+\LWR@loadafter{tocloft}
+\LWR@loadafter{trivfloat}
+\LWR@loadafter{varioref}
+\LWR@loadafter{verse}
+\LWR@loadafter{wallpaper}
+\LWR@loadafter{wrapfig}
+\LWR@loadafter{xcolor}
+\LWR@loadafter{xfrac}
@@ -2003,7 +2021,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
\end{warpHTML}
-
\begin{warpHTML}
\providecommand*{\abstractname}{Abstract}
@@ -2060,33 +2077,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\end{warpall}
-\begin{warpHTML}
-
-\AfterEndPreamble{
-\AtBeginEnvironment{verse}
-{%
-\ifdef{\vleftskip}{%
-\setlength{\vleftskip}{\HTMLvleftskip}
-\setlength{\leftmargini}{\HTMLleftmargini}
-}{}
-\LWR@atbeginverbatim{verse}
-\unskip\vspace{-\baselineskip}
-}
-\AfterEndEnvironment{verse}{
-\unskip\vspace{-\baselineskip}
-\LWR@afterendverbatim
-}
-\ifdef{\poemtitle}{
-\DeclareDocumentCommand{\@vstypeptitle}{m}{%
- \vspace{\beforepoemtitleskip}%
- {\InlineClass{poemtitle}{\poemtitlefont #1}\par}%
- \vspace{\afterpoemtitleskip}%
- }
-}{}
-
-}
-\end{warpHTML}
-
\begin{warpHTML}
@@ -2448,6 +2438,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\unskip%
\LWR@getexparray{LWR@colafterspec}{\theLWR@tablecolspos}%
\LWR@getexparray{LWR@colatspec}{\theLWR@tablecolspos}%
+\LWR@getexparray{LWR@colbangspec}{\theLWR@tablecolspos}%
\ifbool{LWR@tableparcell}{\LWR@stoppars}{}%
\global\boolfalse{LWR@tableparcell}%
\unskip\LWR@htmltag{/td}\LWR@orignewline%
@@ -2522,7 +2513,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
{% left edge of the table:
\LWR@traceinfo{at the left edge}%
\LWR@setexparray{LWR@colatspec}{leftedge}{\LWR@strresult}%
-\LWR@traceinfo{finished with the def}%
}%
{% not at the left edge:
\LWR@traceinfo{not at the left edge}%
@@ -2530,6 +2520,28 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@traceinfo{at \theLWR@tabletotalcols: \LWR@colatspec(\theLWR@tabletotalcols)!}%
}%
\let\LWR@strresult\relax%
+\booltrue{LWR@validtablecol}%
+}
+\newcommand*{\LWR@parsebangcolumn}{%
+\LWR@traceinfo{bang column}%
+\addtocounter{LWR@tablecolspos}{1}%
+\LWR@traceinfo{about to read the next token:}%
+\expandarg%
+\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@strresult]
+\fullexpandarg%
+\LWR@traceinfo{have now read the next token}%
+\ifthenelse{\cnttest{\value{LWR@tabletotalcols}}=0}
+{% left edge of the table:
+\LWR@traceinfo{at the left edge}%
+\LWR@setexparray{LWR@colbangspec}{leftedge}{\LWR@strresult}%
+}%
+{% not at the left edge:
+\LWR@traceinfo{not at the left edge}%
+\LWR@setexparray{LWR@colbangspec}{\theLWR@tabletotalcols}{\LWR@strresult}%
+\LWR@traceinfo{bang \theLWR@tabletotalcols: \LWR@colbangspec(\theLWR@tabletotalcols)!}%
+}%
+\let\LWR@strresult\relax%
+\booltrue{LWR@validtablecol}%
}
\newcommand*{\LWR@parsebeforecolumn}{%
\addtocounter{LWR@tablecolspos}{1}%
@@ -2538,6 +2550,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\fullexpandarg%
\LWR@setexparray{LWR@colbeforespec}{\theLWR@tabletotalcolsnext}{\LWR@strresult}%
\let\LWR@strresult\relax%
+\booltrue{LWR@validtablecol}%
}
\newcommand*{\LWR@parseaftercolumn}{%
\addtocounter{LWR@tablecolspos}{1}%
@@ -2546,25 +2559,34 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\fullexpandarg%
\LWR@setexparray{LWR@colafterspec}{\theLWR@tabletotalcols}{\LWR@strresult}%
\let\LWR@strresult\relax%
+\booltrue{LWR@validtablecol}%
}
\newcommand*{\LWR@parseskipcolumn}{%
+\booltrue{LWR@validtablecol}%
}
\newcommand*{\LWR@parsenormalcolumn}[1]{%
\appto\LWR@tablecolspec{#1}%
\addtocounter{LWR@tabletotalcols}{1}%
\addtocounter{LWR@tabletotalcolsnext}{1}%
\LWR@setexparray{LWR@colatspec}{\theLWR@tabletotalcolsnext}{\relax}%
+\LWR@setexparray{LWR@colbangspec}{\theLWR@tabletotalcolsnext}{\relax}%
\LWR@setexparray{LWR@colbeforespec}{\theLWR@tabletotalcolsnext}{\relax}%
\LWR@setexparray{LWR@colafterspec}{\theLWR@tabletotalcolsnext}{\relax}%
+\booltrue{LWR@validtablecol}%
}
-
\newcommand*{\LWR@parsepcolumn}[1]{%
\LWR@parsenormalcolumn{#1}%
\addtocounter{LWR@tablecolspos}{1}%
}
+\newcommand*{\LWR@parseDcolumn}[1]{%
+\LWR@parsenormalcolumn{#1}%
+\addtocounter{LWR@tablecolspos}{3}%
+}
+
+\newbool{LWR@validtablecol}
\newcommand*{\LWR@parsetablecols}[1]{%
\LWR@traceinfo{LWR@parsetablecols started}%
\renewcommand*{\LWR@origcolspec}{#1}%
@@ -2575,6 +2597,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@setexparray{LWR@colatspec}{1}{\relax}%
\LWR@setexparray{LWR@colatspec}{2}{\relax}%
\LWR@setexparray{LWR@colatspec}{3}{\relax}%
+\LWR@setexparray{LWR@colbangspec}{leftedge}{\relax}%
+\LWR@setexparray{LWR@colbangspec}{1}{\relax}%
+\LWR@setexparray{LWR@colbangspec}{2}{\relax}%
+\LWR@setexparray{LWR@colbangspec}{3}{\relax}%
\LWR@setexparray{LWR@colbeforespec}{1}{\relax}%
\LWR@setexparray{LWR@colbeforespec}{2}{\relax}%
\LWR@setexparray{LWR@colbeforespec}{3}{\relax}%
@@ -2592,20 +2618,27 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\noexpandarg%
\StrChar{#1}{\theLWR@tablecolspos}[\LWR@strresult]%
\fullexpandarg%
+\boolfalse{LWR@validtablecol}%
\IfStrEq{\LWR@strresult}{l}{\LWR@parsenormalcolumn{l}}{}%
\IfStrEq{\LWR@strresult}{c}{\LWR@parsenormalcolumn{c}}{}%
\IfStrEq{\LWR@strresult}{r}{\LWR@parsenormalcolumn{r}}{}%
\IfStrEq{\LWR@strresult}{S}{\LWR@parsenormalcolumn{r}}{}%
\IfStrEq{\LWR@strresult}{\detokenize{@}}{\LWR@parseatcolumn}{}%
+\IfStrEq{\LWR@strresult}{!}{\LWR@parsebangcolumn}{}%
\IfStrEq{\LWR@strresult}{>}{\LWR@parsebeforecolumn}{}%
\IfStrEq{\LWR@strresult}{<}{\LWR@parseaftercolumn}{}%
\IfStrEq{\LWR@strresult}{!}{\LWR@parseskipcolumn}{}%
\IfStrEq{\LWR@strresult}{p}{\LWR@parsepcolumn{p}}{}%
\IfStrEq{\LWR@strresult}{m}{\LWR@parsepcolumn{m}}{}%
\IfStrEq{\LWR@strresult}{b}{\LWR@parsepcolumn{b}}{}%
+\IfStrEq{\LWR@strresult}{D}{\LWR@parseDcolumn{c}}{}%
+\IfStrEq{\LWR@strresult}{X}{\LWR@parsenormalcolumn{X}}{}%
\IfStrEq{\LWR@strresult}{P}{\LWR@parsepcolumn{P}}{}%
\IfStrEq{\LWR@strresult}{M}{\LWR@parsepcolumn{M}}{}%
\IfStrEq{\LWR@strresult}{B}{\LWR@parsepcolumn{B}}{}%
+\ifbool{LWR@validtablecol}{}{%
+\LWR@parsenormalcolumn{l}%
+}%
\addtocounter{LWR@tablecolspos}{1}%
}%
}%
@@ -2645,7 +2678,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\equal{\LWR@strresult}{b}\OR%
\equal{\LWR@strresult}{P}\OR%
\equal{\LWR@strresult}{M}\OR%
-\equal{\LWR@strresult}{B}%
+\equal{\LWR@strresult}{B}\OR%
+\equal{\LWR@strresult}{X}%
}%
{% allow pars
\LWR@startpars%
@@ -2653,7 +2687,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}% allow pars
{}% no pars
\ifthenelse{\cnttest{\value{LWR@tablecolspos}}=1}%
-{\LWR@getexparray{LWR@colatspec}{leftedge}}% left edge
+{%
+\LWR@getexparray{LWR@colatspec}{leftedge}%
+\LWR@getexparray{LWR@colbangspec}{leftedge}%
+}% left edge
{}% not left edge
\LWR@getexparray{LWR@colbeforespec}{\theLWR@tablecolspos}%
\global\boolfalse{LWR@intabularmetadata}%
@@ -2705,6 +2742,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\IfStrEq{\LWR@strresult}{M}{M}{}%
\IfStrEq{\LWR@strresult}{B}{B}{}%
\IfStrEq{\LWR@strresult}{S}{r}{}%
+\IfStrEq{\LWR@strresult}{X}{p}{}%
\LWR@traceinfo{lwr@printmccoltype done}%
}
@@ -2718,14 +2756,20 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\addtocounter{LWR@tablemulticolspos}{1}%
\StrChar{#1}{\theLWR@tablemulticolspos}[\LWR@strresult]%
\LWR@strresult%
+\booltrue{LWR@validtablecol}%
}
\newcommand*{\LWR@printmccoldata}[1]{%
\LWR@traceinfo{lwr@printmccoldata -#1}%
+\boolfalse{LWR@validtablecol}%
\StrChar{#1}{\theLWR@tablemulticolspos}[\LWR@strresult]%
\IfStrEq{\LWR@strresult}{l}{\LWR@multicoltext}{}%
\IfStrEq{\LWR@strresult}{c}{\LWR@multicoltext}{}%
\IfStrEq{\LWR@strresult}{r}{\LWR@multicoltext}{}%
+\IfStrEq{\LWR@strresult}{D}{%
+\addtocounter{LWR@tablemulticolspos}{3}% skip parameters
+\LWR@multicoltext%
+}{}%
\IfStrEq{\LWR@strresult}{p}{\LWR@multicolpartext}{}%
\IfStrEq{\LWR@strresult}{m}{\LWR@multicolpartext}{}%
\IfStrEq{\LWR@strresult}{b}{\LWR@multicolpartext}{}%
@@ -2733,9 +2777,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\IfStrEq{\LWR@strresult}{M}{\LWR@multicolpartext}{}%
\IfStrEq{\LWR@strresult}{B}{\LWR@multicolpartext}{}%
\IfStrEq{\LWR@strresult}{S}{\LWR@multicolpartext}{}%
+\IfStrEq{\LWR@strresult}{X}{\LWR@multicolpartext}{}%
\IfStrEq{\LWR@strresult}{\detokenize{@}}{\LWR@multicolother{#1}}{}%
+\IfStrEq{\LWR@strresult}{\detokenize{!}}{\LWR@multicolother{#1}}{}%
\IfStrEq{\LWR@strresult}{\detokenize{>}}{\LWR@multicolother{#1}}{}%
\IfStrEq{\LWR@strresult}{\detokenize{<}}{\LWR@multicolother{#1}}{}%
+\ifbool{LWR@validtablecol}{}{\LWR@multicoltext}%
\LWR@traceinfo{lwr@printmccoldata done}%
}
@@ -2757,7 +2804,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\NewDocumentCommand{\LWR@domulticolumn}{m m +m}{%
\LWR@traceinfo{lwr@domulticolumn -#1- -#2-}%
-\renewcommand{\LWR@multicoltext}{#3}%
+\renewcommand{\LWR@multicoltext}{%
+#3%
+\booltrue{LWR@validtablecol}%
+}%
\LWR@maybenewtablerow%
\LWR@htmltag{td colspan="#1"
class="td%
@@ -3082,10 +3132,10 @@ lateximage\LWR@lateximagenumberref{#1}%
}
-\newcommand*{\pagerefPageFor}{page for}
+\newcommand*{\pagerefPageFor}{see }
\NewDocumentCommand{\LWR@newpageref}{s m}{%
\IfBooleanTF{#1}%
-{(\pagerefPageFor\ \LWR@origref{#2})}%
+{(\pagerefPageFor\LWR@origref{#2})}%
{(\cpageref{#2})}%
}
@@ -3099,6 +3149,8 @@ lateximage\LWR@lateximagenumberref{#1}%
\LWR@traceinfo{nameref D}%
}
+\let\Nameref\nameref
+
@@ -4909,6 +4961,30 @@ homehtmlfilename = "\HomeHTMLFileName"%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\endinput
%%
%% End of file `lwarp.sty'.