From 0287311bafc0bdd253df0c8d6df3ef85f804d263 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 6 Jun 2018 20:52:12 +0000 Subject: lwarp (6jun18) git-svn-id: svn://tug.org/texlive/trunk@47944 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/lwarp/lwarp.sty | 1304 ++++++++++++++++----------- 1 file changed, 759 insertions(+), 545 deletions(-) (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty') diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index 6d24427a28d..15e1819cb54 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/05/12 v0.56 Allows LaTeX to directly produce HTML5 output.] + [2018/06/06 v0.57 Allows LaTeX to directly produce HTML5 output.] @@ -264,6 +264,7 @@ For a possible alternative, see package(s) #2.} \LWR@earlyloadnever{boxedminipage}{boxedminipage2e} \LWR@earlyloadnever{caption2}{caption} \LWR@earlyloadnever{fancyheadings}{fancyhdr} +\LWR@earlyloadnever{glossary}{glossaries} \LWR@earlyloadnever{t1enc}{fontenc, inputenc, inputenx} \LWR@earlyloadnever{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol} \LWR@loadafter{a4} @@ -274,7 +275,10 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{acronym} \LWR@loadafter{adjmulticol} \LWR@loadafter{addlines} +\LWR@loadafter{ae} +\LWR@loadafter{aecc} \LWR@loadafter{afterpage} +\LWR@loadafter{algorithm2e} \LWR@loadafter{algorithmicx} \LWR@loadafter{alltt} \LWR@loadafter{amsmath} @@ -299,6 +303,8 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{bytefield} \LWR@loadafter{cancel} \LWR@loadafter{caption} +\LWR@loadafter{caption2} +\LWR@loadafter{ccaption} \LWR@loadafter{changebar} \LWR@notmemoirloadafter{changepage} \LWR@notmemoirloadafter{chngpage} @@ -333,12 +339,14 @@ For a possible alternative, see package(s) #2.} \LWR@notmemoirloadafter{epigraph} \LWR@loadafter{epstopdf} \LWR@loadafter{epstopdf-base} +\LWR@loadafter{errata} \LWR@loadafter{eso-pic} \LWR@loadafter{everypage} \LWR@loadafter{everyshi} \LWR@loadafter{extramarks} \LWR@loadafter{fancybox} \LWR@loadafter{fancyhdr} +\LWR@loadafter{fancyheadings} \LWR@loadafter{fancyref} \LWR@loadafter{fancyvrb} \LWR@loadafter{figcaps} @@ -368,6 +376,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{fwlw} \LWR@loadafter{geometry} \LWR@loadafter{glossaries} +\LWR@loadafter{glossary} \LWR@loadafter{grffile} \LWR@loadafter{grid} \LWR@loadafter{gridset} @@ -391,6 +400,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{listings} \LWR@loadafter{longtable} \LWR@loadafter{lscape} +\LWR@loadafter{ltablex} \LWR@loadafter{ltcaption} \LWR@loadafter{ltxgrid} \LWR@loadafter{ltxtable} @@ -446,6 +456,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{quoting} \LWR@loadafter{ragged2e} \LWR@loadafter{realscripts} +\LWR@loadafter{register} \LWR@loadafter{relsize} \LWR@loadafter{resizegather} \LWR@loadafter{romanbar} @@ -477,6 +488,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{subfig} \LWR@loadafter{subfigure} \LWR@loadafter{supertabular} +\LWR@loadafter{t1inc} \LWR@loadafter{tabls} \LWR@notmemoirloadafter{tabularx} \LWR@loadafter{tabulary} @@ -497,6 +509,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{todo} \LWR@loadafter{todonotes} \LWR@loadafter{transparent} +\LWR@loadafter{trimclip} \LWR@loadafter{trivfloat} \LWR@loadafter{turnthepage} \LWR@loadafter{ulem} @@ -507,14 +520,19 @@ For a possible alternative, see package(s) #2.} \LWR@notmemoirloadafter{verse} \LWR@loadafter{vertbars} \LWR@loadafter{vmargin} +\LWR@loadafter{vowel} \LWR@loadafter{vwcol} \LWR@loadafter{wallpaper} +\LWR@loadafter{wasysym} \LWR@loadafter{watermark} \LWR@loadafter{wrapfig} \LWR@loadafter{xcolor} +\LWR@loadafter{xellipsis} \LWR@loadafter{xfrac} +\LWR@loadafter{xltabular} \LWR@loadafter{xltxtra} \LWR@loadafter{xmpincl} +\LWR@loadafter{xpiano} \LWR@loadafter{xtab} \LWR@loadafter{xurl} \LWR@loadafter{xy} @@ -645,7 +663,7 @@ top=1in,bottom=1in,% \begin{warpHTML} -\LetLtxMacro{\LWR@origRequirePackage}{\RequirePackage} +\LetLtxMacro\LWR@origRequirePackage\RequirePackage \newcommand*{\LWR@requirepackagenames}{} @@ -706,7 +724,7 @@ top=1in,bottom=1in,% {\LWR@origRequirePackage{\LWR@parsedrequirepackagenames}}% }% } -\LetLtxMacro{\usepackage}{\RequirePackage} +\LetLtxMacro\usepackage\RequirePackage \NewDocumentCommand{\LWR@ProvidesPackagePass}{m o}{ \PackageInfo{lwarp}{Using package `#1' and adding lwarp modifications, including options,}% @@ -830,7 +848,6 @@ top=1in,bottom=1in,% \ifbool{LWR@tracinglwarp}% {% \typeout{*** lwarp: #1}% - % \PackageInfo{lwarp}{#1 : }% }% {}% } @@ -848,6 +865,63 @@ top=1in,bottom=1in,% \end{warpall} + + + +\begin{warpHTML} +\newcommand*{\LWR@formatting}{HTML} +\newcommand*{\LWR@formatted}[1]{% + \ifcsundef{LWR@print@#1}{% + \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname% + \csname#1\endcsname% + }{}% + \ifcsundef{#1}{% + \expandafter\newrobustcmd\csname #1\endcsname{% + \csuse{LWR@\LWR@formatting @#1}% + }% + }{% + \expandafter\renewrobustcmd\csname #1\endcsname{% + \csuse{LWR@\LWR@formatting @#1}% + }% + }% +} +\newcommand*{\LWR@expandableformatted}[1]{% + \ifcsundef{LWR@print@#1}{% + \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname% + \csname#1\endcsname% + }{}% + \ifcsundef{#1}{% + \expandafter\newcommand\csname #1\endcsname{% + \csuse{LWR@\LWR@formatting @#1}% + }% + }{% + \expandafter\renewcommand\csname #1\endcsname{% + \csuse{LWR@\LWR@formatting @#1}% + }% + }% +} +\newcommand*{\LWR@formattedenv}[1]{% + \ifcsundef{LWR@print@#1}{% + \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname% + \csname#1\endcsname% + \csletcs{endLWR@print@#1}{end#1}% + }{}% + \DeclareDocumentEnvironment{#1}{}% + {\csuse{LWR@\LWR@formatting @#1}}% + {\csuse{endLWR@\LWR@formatting @#1}}% +} +\newcommand*{\LWR@expandableformattedenv}[1]{% + \ifcsundef{LWR@print@#1}{% + \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname% + \csname#1\endcsname% + \csletcs{endLWR@print@#1}{end#1}% + }{}% + \DeclareExpandableDocumentEnvironment{#1}{}% + {\csuse{LWR@\LWR@formatting @#1}}% + {\csuse{endLWR@\LWR@formatting @#1}}% +} +\end{warpHTML} + \begin{warpall} \newbool{FormatEPUB} \boolfalse{FormatEPUB} @@ -939,8 +1013,6 @@ top=1in,bottom=1in,% \begin{warpHTML} -\LetLtxMacro\LWR@origmbox\mbox -\LetLtxMacro\LWR@origmakebox\makebox \chardef\LWR@origpound=`\# \let\LWR@origcomma\, \let\LWR@origthinspace\thinspace @@ -948,17 +1020,13 @@ top=1in,bottom=1in,% \let\LWR@origenskip\enskip \let\LWR@origquad\quad \let\LWR@origqquad\qquad - -\let\LWR@orighspace\hspace \let\LWR@orighfill\hfill \let\LWR@orighfil\hfil -\let\LWR@origvspace\vspace \let\LWR@orighss\hss \let\LWR@origllap\llap \let\LWR@origrlap\rlap \let\LWR@orighfilneg\hfilneg -\let\LWR@origrule\rule \let\LWR@orighrulefill\hrulefill \let\LWR@origdotfill\dotfill @@ -978,29 +1046,29 @@ top=1in,bottom=1in,% \let\LWR@orighuge\huge \let\LWR@origHuge\Huge -\LetLtxMacro{\LWR@origtextrm}{\textrm} -\LetLtxMacro{\LWR@origtextsf}{\textsf} -\LetLtxMacro{\LWR@origtexttt}{\texttt} -\LetLtxMacro{\LWR@origtextnormal}{\textnormal} -\LetLtxMacro{\LWR@origtextbf}{\textbf} -\LetLtxMacro{\LWR@origtextmd}{\textmd} -\LetLtxMacro{\LWR@origtextit}{\textit} -\LetLtxMacro{\LWR@origtextsl}{\textsl} -\LetLtxMacro{\LWR@origtextsc}{\textsc} -\LetLtxMacro{\LWR@origtextup}{\textup} -\LetLtxMacro{\LWR@origemph}{\emph} - -\LetLtxMacro{\LWR@origrmfamily}{\rmfamily} -\LetLtxMacro{\LWR@origsffamily}{\sffamily} -\LetLtxMacro{\LWR@origttfamily}{\ttfamily} -\LetLtxMacro{\LWR@origbfseries}{\bfseries} -\LetLtxMacro{\LWR@origmdseries}{\mdseries} -\LetLtxMacro{\LWR@origupshape}{\upshape} -\LetLtxMacro{\LWR@origslshape}{\slshape} -\LetLtxMacro{\LWR@origscshape}{\scshape} -\LetLtxMacro{\LWR@origitshape}{\itshape} -\LetLtxMacro{\LWR@origem}{\em} -\LetLtxMacro{\LWR@orignormalfont}{\normalfont} +\LetLtxMacro\LWR@origtextrm\textrm +\LetLtxMacro\LWR@origtextsf\textsf +\LetLtxMacro\LWR@origtexttt\texttt +\LetLtxMacro\LWR@origtextnormal\textnormal +\LetLtxMacro\LWR@origtextbf\textbf +\LetLtxMacro\LWR@origtextmd\textmd +\LetLtxMacro\LWR@origtextit\textit +\LetLtxMacro\LWR@origtextsl\textsl +\LetLtxMacro\LWR@origtextsc\textsc +\LetLtxMacro\LWR@origtextup\textup +\LetLtxMacro\LWR@origemph\emph + +\LetLtxMacro\LWR@origrmfamily\rmfamily +\LetLtxMacro\LWR@origsffamily\sffamily +\LetLtxMacro\LWR@origttfamily\ttfamily +\LetLtxMacro\LWR@origbfseries\bfseries +\LetLtxMacro\LWR@origmdseries\mdseries +\LetLtxMacro\LWR@origupshape\upshape +\LetLtxMacro\LWR@origslshape\slshape +\LetLtxMacro\LWR@origscshape\scshape +\LetLtxMacro\LWR@origitshape\itshape +\LetLtxMacro\LWR@origem\em +\LetLtxMacro\LWR@orignormalfont\normalfont \let\LWR@origraggedright\raggedright \let\LWR@origonecolumn\onecolumn @@ -1025,10 +1093,6 @@ top=1in,bottom=1in,% \let\LWR@origthispagestyle\thispagestyle \LetLtxMacro\LWR@origpagenumbering\pagenumbering -\LetLtxMacro\LWR@origminipage\minipage -\let\LWR@origendminipage\endminipage -\LetLtxMacro{\LWR@origparbox}{\parbox} - \let\LWR@orignewline\newline \AtBeginDocument{% in case packages change definition @@ -1051,7 +1115,7 @@ top=1in,bottom=1in,% \let\LWR@origpar\par -\LetLtxMacro{\LWR@origfootnote}{\footnote} +\LetLtxMacro\LWR@origfootnote\footnote \let\LWR@orig@mpfootnotetext\@mpfootnotetext \let\LWR@origclearpage\clearpage @@ -1065,15 +1129,15 @@ top=1in,bottom=1in,% \begin{warpHTML} \AtBeginDocument{ -\LetLtxMacro{\LWR@origt}{\t} +\LetLtxMacro\LWR@origt\t \ifPDFTeX -\LetLtxMacro{\LWR@origequalaccent}{\=} -\LetLtxMacro{\LWR@origdotaccent}{\.} -\LetLtxMacro{\LWR@origu}{\u} -\LetLtxMacro{\LWR@origv}{\v} -\LetLtxMacro{\LWR@origc}{\c} -\LetLtxMacro{\LWR@origd}{\d} -\LetLtxMacro{\LWR@origb}{\b} +\LetLtxMacro\LWR@origequalaccent\= +\LetLtxMacro\LWR@origdotaccent\. +\LetLtxMacro\LWR@origu\u +\LetLtxMacro\LWR@origv\v +\LetLtxMacro\LWR@origc\c +\LetLtxMacro\LWR@origd\d +\LetLtxMacro\LWR@origb\b \renewcommand*{\=}[1]{#1\HTMLunicode{0305}} \renewcommand*{\.}[1]{#1\HTMLunicode{0307}} \renewcommand*{\u}[1]{#1\HTMLunicode{0306}} @@ -1086,18 +1150,18 @@ top=1in,bottom=1in,% \renewcommand*{\t}[1]{\LWR@t#1} \ifPDFTeX \newcommand*{\LWR@restoreorigaccents}{% -\LetLtxMacro{\=}{\LWR@origequalaccent}% -\LetLtxMacro{\.}{\LWR@origdotaccent}% -\LetLtxMacro{\u}{\LWR@origu}% -\LetLtxMacro{\v}{\LWR@origu}% -\LetLtxMacro{\t}{\LWR@origt}% -\LetLtxMacro{\c}{\LWR@origc}% -\LetLtxMacro{\d}{\LWR@origd}% -\LetLtxMacro{\b}{\LWR@origb}% +\LetLtxMacro\=\LWR@origequalaccent% +\LetLtxMacro\.\LWR@origdotaccent% +\LetLtxMacro\u\LWR@origu% +\LetLtxMacro\v\LWR@origu% +\LetLtxMacro\t\LWR@origt% +\LetLtxMacro\c\LWR@origc% +\LetLtxMacro\d\LWR@origd% +\LetLtxMacro\b\LWR@origb% }% \else% XeLaTeX, LuaLaTeX: \newcommand*{\LWR@restoreorigaccents}{% -\LetLtxMacro{\t}{\LWR@origt}% +\LetLtxMacro\t\LWR@origt% }% \fi% }% AtBeginDocument @@ -1973,7 +2037,7 @@ img.logoimage{ } figure { - margin: 3ex auto 3ex auto ; + margin: 5ex auto 5ex auto ; padding: 1ex 1em 1ex 1em ; overflow-x: auto ; } @@ -2036,6 +2100,27 @@ figure div.floatrow div.minipage figcaption { background: none ; } +/* For packages such as float, rotfloat, and algorithm2e: */ + +figure.boxed, figure.boxruled { + border: 1px solid black ; +} + +figure.ruled { + border-top: 1px solid black ; + border-bottom: 1px solid black ; + border-left: 0px ; + border-right: 0px ; + border-radius: 0px ; + background: none ; + box-shadow: none ; +} + +figure.ruled figcaption, figure.boxruled figcaption { + border-top: 1px solid silver ; + border-bottom: 1px solid silver ; +} + table { margin: 1ex auto 1ex auto ; border-collapse: separate ; @@ -2315,7 +2400,32 @@ div.multicols { -webkit-columns: 3 380px ; -moz-columns: 3 380px ; columns: 3 380px ; } div.multicols p {margin-top: 0ex} -/* Used to support algorithmicx: */ +/* Used for algorithm2e: */ +div.alg2evline{ + margin-left: 1em ; + padding-left: 1em ; + border-left: 1px solid black ; + border-radius: 0px 0px 0px 1ex ; +} + +div.alg2evsline{ + margin-left: 1em ; + padding-left: 1em ; + border-left: 1px solid black ; +} + +div.alg2enoline{ + margin-left: 1em ; + padding-left: 1em ; +} + +span.alg2elinenumber{ + margin-right: .5em ; + font-size: 50% ; + color: red ; +} + +/* Used for algorithmicx: */ span.floatright { float: right ; } /* Native LaTeX theorems: */ @@ -2880,7 +2990,7 @@ div.fancyvrblabel{ } figure { - margin: 3ex 5% 3ex 5% ; + margin: 5ex 5% 5ex 5% ; padding: 1ex 1em 1ex 1em ; background-color: #fffcf5 ; overflow-x: auto ; @@ -3117,15 +3227,16 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX- -- Copyright 2016-2018 Brian Dunn --- Print the usage of the lwarpmk command: - -printversion = "v0.56" +printversion = "v0.57" function printhelp () print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ; end function printusage () +-- +-- Print the usage of the lwarpmk command: +-- print ( [[ lwarpmk print [project]: Compile the print version if necessary. @@ -3153,9 +3264,10 @@ lwarpmk --help: Print this help message. printconf () end --- 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: -- @@ -3177,11 +3289,12 @@ Values must be in upright "quotes". ]] ) ; end +function splitfile (destfile,sourcefile) +-- -- Split one large sourcefile into a number of files, -- starting with destfile. -- The file is split at each occurance of