From 5fbe6260252c3a2f45ca811a7e3e46b9ececb0c8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 16 Apr 2017 22:18:18 +0000 Subject: lwarp (14apr17) git-svn-id: svn://tug.org/texlive/trunk@43857 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/lwarp/lwarp-abstract.sty | 5 +- .../tex/latex/lwarp/lwarp-algorithmicx.sty | 1 - Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty | 5 +- Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty | 2 + .../texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty | 1 + .../texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty | 2 + Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty | 8 + .../tex/latex/lwarp/lwarp-glossaries.sty | 25 ++ .../texmf-dist/tex/latex/lwarp/lwarp-graphics.sty | 4 +- .../texmf-dist/tex/latex/lwarp/lwarp-graphicx.sty | 1 - .../texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty | 1 + .../texmf-dist/tex/latex/lwarp/lwarp-listings.sty | 1 + .../texmf-dist/tex/latex/lwarp/lwarp-longtable.sty | 3 - .../texmf-dist/tex/latex/lwarp/lwarp-multicol.sty | 4 +- .../tex/latex/lwarp/lwarp-newproject.sty | 66 ++++- .../texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty | 16 ++ .../texmf-dist/tex/latex/lwarp/lwarp-setspace.sty | 20 +- .../texmf-dist/tex/latex/lwarp/lwarp-sidenotes.sty | 1 + .../texmf-dist/tex/latex/lwarp/lwarp-tabularx.sty | 8 +- .../texmf-dist/tex/latex/lwarp/lwarp-tabulary.sty | 36 +++ .../texmf-dist/tex/latex/lwarp/lwarp-theorem.sty | 12 + .../tex/latex/lwarp/lwarp-threeparttable.sty | 1 + Master/texmf-dist/tex/latex/lwarp/lwarp-ulem.sty | 2 +- Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty | 1 + .../texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty | 1 + Master/texmf-dist/tex/latex/lwarp/lwarp.sty | 281 ++++++++++++++++----- 26 files changed, 417 insertions(+), 91 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/lwarp/lwarp-glossaries.sty create mode 100644 Master/texmf-dist/tex/latex/lwarp/lwarp-tabulary.sty (limited to 'Master/texmf-dist/tex/latex/lwarp') diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-abstract.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-abstract.sty index c30eeaea3a2..4d572b925b6 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-abstract.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-abstract.sty @@ -18,7 +18,10 @@ \LWR@ProvidesPackagePass{abstract} \AtBeginDocument{ -\BeforeBeginEnvironment{abstract}{\BlockClass{abstract}} +\BeforeBeginEnvironment{abstract}{ +\LWR@forcenewpage +\BlockClass{abstract} +} \AfterEndEnvironment{abstract}{\endBlockClass} } diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithmicx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithmicx.sty index 1c3aed41317..9adcd25396f 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithmicx.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithmicx.sty @@ -16,7 +16,6 @@ %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. \LWR@ProvidesPackagePass{algorithmicx} - \begin{warpHTML} \AtBeginEnvironment{algorithmic}{% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty index c804306e340..6dea9a9a53c 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty @@ -19,7 +19,10 @@ \LWR@ProvidesPackagePass{alltt} \AfterEndPreamble{ -\AtBeginEnvironment{alltt}{\LWR@atbeginverbatim{alltt}\unskip\vspace*{-\baselineskip}} +\AtBeginEnvironment{alltt}{% +\LWR@forcenewpage +\LWR@atbeginverbatim{alltt}\unskip\vspace*{-\baselineskip}% +} \AfterEndEnvironment{alltt}{\unskip\vspace*{-\baselineskip}\LWR@afterendverbatim} } diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty index e233534306a..d4ee185135f 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty @@ -66,6 +66,7 @@ \LWR@haveamsthmnumber \LWR@haveamsthmnote \def\@begintheorem#1#2[#3]{% +\LWR@forcenewpage% new \BlockClass{amsthmbody\LWR@thisthmstyle}% new \deferred@thm@head{ \the\thm@headfont \thm@indent @@ -85,6 +86,7 @@ \def\Box{\text{\HTMLunicode{25A1}}}% UTF-8 white box } \renewenvironment{proof}[1][\proofname]{\par +\LWR@forcenewpage% new \BlockClass{amsthmproof}% new \pushQED{\qed}% \normalfont \topsep6\p@\@plus6\p@\relax diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty index 5d2bea4c04b..7052b3081ec 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty @@ -19,6 +19,7 @@ \DeclareDocumentEnvironment{KFLT@marginfloat}{O{-1.2ex} m} {% start \LWR@maybeincthisfloat% +\LWR@forcenewpage \LWR@stoppars% \LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}"} \LWR@startpars% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty index 99f90ca6079..90bab9c3c0d 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty @@ -98,6 +98,7 @@ \newenvironment*{floatrow}[1][2] { +\LWR@forcenewpage \BlockClass{floatrow} \booltrue{LWR@infloatrow} \setlength{\linewidth}{6in/#1} @@ -168,6 +169,7 @@ \newenvironment*{subfloatrow}[1][2] { +\LWR@forcenewpage \BlockClass{floatrow} \begingroup \booltrue{LWR@insubfloatrow} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty index 0a1539046cf..905c723ac16 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty @@ -20,28 +20,33 @@ \renewenvironment{framed}{% +\LWR@forcenewpage \BlockClass{framed}% } {\endBlockClass} \renewenvironment{oframed}{% +\LWR@forcenewpage \BlockClass{framed}% } {\endBlockClass} \renewenvironment{shaded}{% \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% +\LWR@forcenewpage \BlockClass{framed}[background: \#\LWR@tempcolor]% } {\endBlockClass} \renewenvironment{shaded*}{% \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% +\LWR@forcenewpage \BlockClass{framed}[background: \#\LWR@tempcolor]% } {\endBlockClass} \renewenvironment{leftbar}{% +\LWR@forcenewpage \BlockClass{framedleftbar} \def\FrameCommand{}% \MakeFramed {} @@ -50,12 +55,14 @@ \renewenvironment{snugshade}{% \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% +\LWR@forcenewpage \BlockClass{snugframed}[background: \#\LWR@tempcolor]% } {\endBlockClass} \renewenvironment{snugshade*}{% \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% +\LWR@forcenewpage \BlockClass{snugframed}[background: \#\LWR@tempcolor]% } {\endBlockClass} @@ -69,6 +76,7 @@ \renewcommand{\CustomFBox}[7]{% \convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor% +\LWR@forcenewpage \begin{BlockClass}{framed}[border: 3px solid \#\LWR@tempcolor]% \ifthenelse{\isempty{#1}}{}{% not empty \begin{BlockClass}{framedtitle}[background: \#\LWR@tempcolor]% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-glossaries.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-glossaries.sty new file mode 100644 index 00000000000..d2eb3166aee --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-glossaries.sty @@ -0,0 +1,25 @@ +%% +%% This is file `lwarp-glossaries.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `glossaries') +%% This is a generated file. +%% 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 +%% 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. + +\PassOptionsToPackage{xindy}{glossaries} +\LWR@ProvidesPackagePass{glossaries} +\setupglossaries{nonumberlist} +\setglossarystyle{index} +\endinput +%% +%% End of file `lwarp-glossaries.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty index 7d66712758f..f5519c1493d 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty @@ -17,9 +17,7 @@ %% version 2005/12/01 or later. - -\LWR@loadnever{graphics}{graphicx} - +\LWR@ProvidesPackageDrop{graphics} \endinput %% %% End of file `lwarp-graphics.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphicx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphicx.sty index d07e3577665..79e6d49035a 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphicx.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphicx.sty @@ -17,7 +17,6 @@ %% version 2005/12/01 or later. - \LWR@ProvidesPackageDrop{graphicx} \endinput diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty index abe92a0faac..693af547883 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty @@ -36,6 +36,7 @@ \DeclareDocumentEnvironment{KFLT@marginfloat}{O{-1.2ex} m} {% start \LWR@maybeincthisfloat% +\LWR@forcenewpage \LWR@stoppars% \LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}"} \LWR@startpars% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty index b65ddf429de..134ca9b20e5 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty @@ -34,6 +34,7 @@ \lst@ifdisplaystyle% \LWR@traceinfo{About to create verbatim.}% \let\lsthk@EveryPar\relax% +\LWR@forcenewpage \LWR@atbeginverbatim{programlisting}% \let\lsthk@EveryPar\LWR@origlsthkEveryPar% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-longtable.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-longtable.sty index 397108527ba..acef725862f 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-longtable.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-longtable.sty @@ -19,9 +19,6 @@ \LWR@ProvidesPackageDrop{longtable} - - - \newenvironment{longtable*}[2][]{% \LWR@floatbegin{table}% \setcaptiontype{\LTcaptype}% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-multicol.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-multicol.sty index 178ee5057b8..79408484be5 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-multicol.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-multicol.sty @@ -24,7 +24,9 @@ \begin{warpHTML} \NewDocumentEnvironment{multicols}{s m o} -{\BlockClass{multicols} +{ +\LWR@forcenewpage +\BlockClass{multicols} \IfValueTF{#3}{\begin{BlockClass}{multicolsheading}#3\end{BlockClass}}{}} {\endBlockClass} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-newproject.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-newproject.sty index b1fd0af99d6..dadda5adcd6 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-newproject.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-newproject.sty @@ -35,6 +35,7 @@ \DeclareVoidOption{warpHTML}{\boolfalse{LWRNP@genconf}} \DeclareVoidOption{lwarpmk}{\includecomment{LWR@createlwarpmk}} \DeclareStringOption[\jobname]{BaseJobname} +\DeclareStringOption[english]{lwarpmklang} \booltrue{LWRNP@genconf}% warpprint @@ -43,7 +44,7 @@ \providecommand*{\BaseJobname}{\LWRNP@BaseJobname} \providecommand*{\HomeHTMLFileName}{\BaseJobname} -\providecommand*{\HTMLFileName}{} +\providecommand*{\HTMLfiveName}{} \providecommand*{\UseLatexmk}{false} \ifbool{LWRNP@genconf}{\typeout{lwarp-newproject: generating configuration files}}{} @@ -86,8 +87,9 @@ \immediate\write\LWR@file{% homehtmlfilename = "\HomeHTMLFileName"% } -\immediate\write\LWR@file{htmlfilename = "\HTMLFileName"} +\immediate\write\LWR@file{htmlfilename = "\HTMLfiveName"} \immediate\write\LWR@file{uselatexmk = "\UseLatexmk"} +\immediate\write\LWR@file{language = "\LWRNP@lwarpmklang"} \immediate\closeout\LWR@file }{} @@ -1637,7 +1639,6 @@ nav.botnavigation { \end{VerbatimOut} - \begin{VerbatimOut}{lwarp_mathjax.txt} @@ -1721,9 +1722,18 @@ MathJax.Hub.Config({ }); + + + + + + \end{VerbatimOut} @@ -1736,7 +1746,7 @@ MathJax.Hub.Config({ -- Print the usage of the lwarpmk command: -printversion = "v0.27" +printversion = "v0.29" function printhelp () print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ; @@ -1747,15 +1757,17 @@ print ( [[ lwarpmk print [project]: Compile a 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 an 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]: For use with latexmk or a Makefile: Convert project_html.pdf to project_html.html and individual HTML files. -lwarpmk clean [project]: Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log +lwarpmk clean [project]: Remove project.aux, .toc, .lof/t, .idx, .ind, .log, .gl* lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html lwarpmk -h: Print this help message. lwarpmk --help: Print this help message. @@ -1776,6 +1788,7 @@ sourcename = "projectname" (the source-code filename w/o .tex) homehtmlfilename = "index" (or perhaps the project name) htmlfilename = "" (or "projectname" - filename prefix) uselatexmk = "false" (or "true" to use latexmk to build PDFs) +languge = "english" (use a language supported by xindy) -- Filenames must contain only letters, numbers, underscore, or dash. Values must be in "quotes". @@ -1817,6 +1830,8 @@ function loadconf () local conffile = "lwarpmk.conf" -- Optional configuration filename: if arg[2] ~= nil then conffile = arg[2]..".lwarpmkconf" end +-- Default language: +language = "english" -- Verify the file exists: if (lfs.attributes(conffile,"mode")==nil) then -- file not exists print("lwarpmk: " .. conffile .." does not exist.") @@ -1861,6 +1876,7 @@ elseif ( cvarname == "sourcename" ) then sourcename = cvalue elseif ( cvarname == "homehtmlfilename" ) then homehtmlfilename = cvalue elseif ( cvarname == "htmlfilename" ) then htmlfilename = cvalue elseif ( cvarname == "uselatexmk" ) then uselatexmk = cvalue +elseif ( cvarname == "language" ) then language = cvalue else print ( linenum .. " : " .. line ) ; print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ; @@ -1957,7 +1973,8 @@ function removeaux () sourcename ..".lot " .. sourcename .. "_html.lot " .. sourcename ..".idx " .. sourcename .. "_html.idx " .. sourcename ..".ind " .. sourcename .. "_html.ind " .. - sourcename ..".log " .. sourcename .. "_html.log " + sourcename ..".log " .. sourcename .. "_html.log " .. + sourcename ..".gl* " .. sourcename .. "_html.gl* " ) end @@ -2047,6 +2064,22 @@ refreshdate () print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.") print ("lwarpmk: Done.") +-- lwarp printglossary: +-- Compile the glossary then touch the source +-- to trigger a recompile of the document: + +elseif arg[1] == "printglossary" then +loadconf () +print ("lwarpmk: Processing the glossary.") + +os.execute("xindy -L " .. language .. " -C utf8 -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.") + -- lwarpmk html: elseif arg[1] == "html" then @@ -2098,6 +2131,23 @@ refreshdate () print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.") print ("lwarpmk: Done.") +-- lwarpmk htmlglossary: +-- Compile the glossary then touch the source +-- to trigger a recompile of the document: + +elseif arg[1] == "htmlglossary" then +loadconf () +print ("lwarpmk: Processing the glossary.") + +os.execute("xindy -L " .. language .. " -C utf8 -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.") + -- lwarpmk limages: -- Scan the lateximages.txt file to create lateximages, -- then touch the source to trigger a recompile. @@ -2122,7 +2172,7 @@ print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.") print ("lwarpmk: Done.") -- lwarpmk clean: --- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log +-- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log, .gl* elseif arg[1] == "clean" then loadconf () @@ -2130,7 +2180,7 @@ removeaux () print ("lwarpmk: Done.") -- lwarpmk cleanall --- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log +-- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log, .gl* -- and also project.pdf, *.html elseif arg[1] == "cleanall" then diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty index f4833397804..7a513854931 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty @@ -113,10 +113,12 @@ \expandafter\@ifundefined{th@#1}% {\expandafter\gdef\csname th@#1\endcsname{% \def\@begintheorem####1####2{% +\LWR@forcenewpage% new \BlockClass{theorembody#1}%\LWR@thisthmstyle% new \LWR@inctheorem% new #2}% \def\@opargbegintheorem####1####2####3{% +\LWR@forcenewpage% new \BlockClass{theorembody#1}%\LWR@thisthmstyle% new \LWR@inctheorem% new #3}% @@ -243,12 +245,14 @@ \gdef\th@plain{% \def\theorem@headerfont{\normalfont\bfseries}\itshape% \def\@begintheorem##1##2{% +\LWR@forcenewpage% new \BlockClass{theorembodyplain}% new \LWR@inctheorem% new \item[\hskip\labelsep \InlineClass{theoremheaderplain}{##1\ ##2.} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembodyplain}% new \LWR@inctheorem% new \item[\hskip\labelsep @@ -258,12 +262,14 @@ \gdef\th@nonumberplain{% \def\theorem@headerfont{\normalfont\bfseries}\itshape% \def\@begintheorem##1##2{% +\LWR@forcenewpage% new \BlockClass{theorembodyplain}% new \LWR@inctheorem% new \item[\hskip\labelsep \InlineClass{theoremheaderplain}{##1.} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembodyplain}% new \LWR@inctheorem% new \item[\hskip\labelsep @@ -273,12 +279,14 @@ \gdef\th@definition{% \def\theorem@headerfont{\normalfont\bfseries}\normalfont% \def\@begintheorem##1##2{% +\LWR@forcenewpage% new \BlockClass{theorembodydefinition}% new \LWR@inctheorem% new \item[\hskip\labelsep \InlineClass{theoremheaderdefinition}{##1\ ##2.} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembodydefinition}% new \LWR@inctheorem% new \item[\hskip\labelsep @@ -288,12 +296,14 @@ \gdef\th@nonumberdefinition{% \def\theorem@headerfont{\normalfont\bfseries}\normalfont% \def\@begintheorem##1##2{% +\LWR@forcenewpage% new \BlockClass{theorembodydefinition}% new \LWR@inctheorem% new \item[\hskip\labelsep \InlineClass{theoremheaderdefinition}{##1.} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembodydefinition}% new \LWR@inctheorem% new \item[\hskip\labelsep @@ -303,12 +313,14 @@ \gdef\th@remark{% \def\theorem@headerfont{\itshape}\normalfont% \def\@begintheorem##1##2{% +\LWR@forcenewpage% new \BlockClass{theorembodyremark}% new \LWR@inctheorem% new \item[\hskip\labelsep \InlineClass{theoremheaderremark}{##1\ ##2.} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembodyremark}% new \LWR@inctheorem% new \item[\hskip\labelsep @@ -318,12 +330,14 @@ \gdef\th@nonumberremark{% \def\theorem@headerfont{\itshape}\normalfont% \def\@begintheorem##1##2{% +\LWR@forcenewpage% new \BlockClass{theorembodyremark}% new \LWR@inctheorem% new \item[\hskip\labelsep \InlineClass{theoremheaderremark}{##1.} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembodyremark}% new \LWR@inctheorem% new \item[\hskip\labelsep @@ -333,12 +347,14 @@ \gdef\th@proof{% \def\theorem@headerfont{\normalfont\bfseries}\itshape% \def\@begintheorem##1##2{% +\LWR@forcenewpage% new \BlockClass{theorembodyproof}% new \LWR@inctheorem% new \item[\hskip\labelsep \InlineClass{theoremheaderproof}{##1.} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembodyroof}% new \LWR@inctheorem% new \item[\hskip\labelsep diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-setspace.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-setspace.sty index 8a480d0b230..a8e454210ae 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-setspace.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-setspace.sty @@ -28,11 +28,17 @@ \newcommand*{\doublespacing}{} \newenvironment*{singlespace} -{\BlockClass{singlespace}} +{ +\LWR@forcenewpage +\BlockClass{singlespace} +} {\endBlockClass} \newenvironment*{singlespace*} -{\BlockClass{singlespace}} +{ +\LWR@forcenewpage +\BlockClass{singlespace} +} {\endBlockClass} \newenvironment*{spacing}[1]{ @@ -42,11 +48,17 @@ } \newenvironment*{onehalfspace} -{\BlockClass{onehalfspace}} +{ +\LWR@forcenewpage +\BlockClass{onehalfspace} +} {\endBlockClass} \newenvironment*{doublespace} -{\BlockClass{doublespace}} +{ +\LWR@forcenewpage +\BlockClass{doublespace} +} {\endBlockClass} \endinput diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-sidenotes.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-sidenotes.sty index 20ab5213ec9..fe8918afff3 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-sidenotes.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-sidenotes.sty @@ -39,6 +39,7 @@ \DeclareDocumentEnvironment{KFLT@marginfloat}{O{-1.2ex} m} {% start \LWR@maybeincthisfloat% +\LWR@forcenewpage \LWR@stoppars% \LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}"} \LWR@startpars% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-tabularx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-tabularx.sty index 3bc4a39159b..3b1d41eb8a3 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-tabularx.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-tabularx.sty @@ -19,12 +19,12 @@ \LWR@ProvidesPackageDrop{tabularx} -\newenvironment{tabularx}[2] -{\tabular{#2}} +\NewDocumentEnvironment{tabularx}{m o m} +{\tabular{#3}} {\endtabular} -\newenvironment{tabularx*}[2] -{\tabular{#2}} +\NewDocumentEnvironment{tabularx*}{m o m} +{\tabular{#3}} {\endtabular} \endinput diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-tabulary.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-tabulary.sty new file mode 100644 index 00000000000..f2a7b3c5b07 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-tabulary.sty @@ -0,0 +1,36 @@ +%% +%% This is file `lwarp-tabulary.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `tabulary') +%% This is a generated file. +%% 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 +%% 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{tabulary} + +\NewDocumentEnvironment{tabulary}{m o m} +{\tabular{#3}} +{\endtabular} + +\NewDocumentEnvironment{tabulary*}{m o m} +{\tabular{#3}} +{\endtabular} + +\newdimen\tymin +\newdimen\tymax +\def\tyformat{} + +\endinput +%% +%% End of file `lwarp-tabulary.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty index b1572463ea6..2bc608f1a3e 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty @@ -82,11 +82,13 @@ \fi} \gdef\th@plain{%\normalfont\itshape \def\@begintheorem##1##2{% +\LWR@forcenewpage% new \BlockClass{theorembody\LWR@thisthmstyle}% new \item[\hskip\labelsep \InlineClass{theoremheader}{##1\ ##2} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembody\LWR@thisthmstyle}% new \item[\hskip\labelsep \InlineClass{theoremheader}{##1\ ##2\ (##3)} @@ -95,11 +97,13 @@ \gdef\th@break{%\normalfont\slshape \def\@begintheorem##1##2{% +\LWR@forcenewpage% new \BlockClass{theorembody\LWR@thisthmstyle}% new \item[\hskip \labelsep \InlineClass{theoremheader}{##1\ ##2}\newline% ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembody\LWR@thisthmstyle}% new \item[\hskip \labelsep \InlineClass{theoremheader}{##1\ ##2\ (##3)}\newline @@ -108,11 +112,13 @@ \gdef\th@marginbreak{%\normalfont\slshape \def\@begintheorem##1##2{ +\LWR@forcenewpage% new \BlockClass{theorembody\LWR@thisthmstyle}% new \item[\hskip\labelsep % \InlineClass{theoremheader}{##2 \qquad ##1}\newline ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembody\LWR@thisthmstyle}% new \item[\hskip\labelsep % \InlineClass{theoremheader}{##2 \qquad ##1\ % @@ -122,11 +128,13 @@ \gdef\th@changebreak{%\normalfont\slshape \def\@begintheorem##1##2{ +\LWR@forcenewpage% new \BlockClass{theorembody\LWR@thisthmstyle}% new \item[\hskip\labelsep \InlineClass{theoremheader}{##2\ ##1}\newline ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembody\LWR@thisthmstyle}% new \item[\hskip\labelsep \InlineClass{theoremheader}{ ##2\ ##1\ % @@ -136,11 +144,13 @@ \gdef\th@change{%\normalfont\slshape \def\@begintheorem##1##2{ +\LWR@forcenewpage% new \BlockClass{theorembody\LWR@thisthmstyle}% new \item[\hskip\labelsep \InlineClass{theoremheader}{##2\ ##1} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembody\LWR@thisthmstyle}% new \item[\hskip\labelsep \InlineClass{theoremheader}{##2\ ##1\ (##3)} @@ -149,11 +159,13 @@ \gdef\th@margin{%\normalfont\slshape \def\@begintheorem##1##2{ +\LWR@forcenewpage% new \BlockClass{theorembody\LWR@thisthmstyle}% new \item[\hskip\labelsep \InlineClass{theoremheader}{##2 \qquad ##1} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembody\LWR@thisthmstyle}% new \item[\hskip\labelsep \InlineClass{theoremheader}{##2 \qquad ##1\ (##3)} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-threeparttable.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-threeparttable.sty index 22044a839d5..89dbaa1364f 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-threeparttable.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-threeparttable.sty @@ -26,6 +26,7 @@ \newenvironment*{tablenotes}[1][] {% +\LWR@forcenewpage \BlockClass{tnotes}% \setlist[description]{format=\LWR@printtablenote}% \description% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-ulem.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-ulem.sty index f944feb537b..179d8ef91f5 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-ulem.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-ulem.sty @@ -47,7 +47,7 @@ \NewDocumentCommand{\ULthickness}{}{} \newlength{\ULdepth} \NewDocumentCommand{\markoverwith}{m}{} -\NewDocumentCommand{\ULon}{+m}{\uline{#1}} +\NewDocumentCommand{\ULon}{+m}{\uline{#1}\egroup} \NewDocumentCommand{\useunder}{m m m}{% \relax% \ifx\relax#3\relax\else % argumentative command diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty index 2bccbe1850b..b739f34b90b 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty @@ -24,6 +24,7 @@ \setlength{\vleftskip}{\HTMLvleftskip} \setlength{\leftmargini}{\HTMLleftmargini} }{} +\LWR@forcenewpage \LWR@atbeginverbatim{verse} \unskip\vspace{-\baselineskip} } diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty index 7be348f256a..c74ce7ea01f 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty @@ -37,6 +37,7 @@ \setlength{\LWR@wrapwidth}{#2}% \addtolength{\LWR@wrapwidth}{4em}% \uselengthunit{PT}% +\LWR@forcenewpage \LWR@stoppars% \LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}" style="width:\rndprintlength{\LWR@wrapwidth} ; % diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index 3cde0578003..92cbbf80d3c 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} - [2017/04/04 v0.27 Allows LaTeX to directly produce HTML5 output.] + [2017/04/15 v0.29 Allows LaTeX to directly produce HTML5 output.] @@ -56,7 +56,6 @@ \newbool{warpingprint} \newbool{warpingHTML} \newbool{mathjax} - \newcommand{\warpprintonly}[1]{\ifbool{warpingprint}{#1}{}} \newcommand{\warpHTMLonly}[1]{\ifbool{warpingHTML}{#1}{}} @@ -89,6 +88,8 @@ \DeclareStringOption[\jobname]{BaseJobname} +\DeclareStringOption[english]{lwarpmklang} + \includecomment{warpprint}% \excludecomment{warpHTML}% \booltrue{warpingprint}% @@ -154,6 +155,7 @@ Please use the #2 package instead} \LWR@loadafter{floatflt} \LWR@loadafter{ftnright} \LWR@loadafter{geometry} +\LWR@loadafter{glossaries} \LWR@loadafter{hyperref} \LWR@loadafter{indentfirst} \LWR@loadafter{keyfloat} @@ -191,6 +193,7 @@ Please use the #2 package instead} \LWR@loadafter{soul} \LWR@loadafter{subfig} \LWR@loadafter{tabularx} +\LWR@loadafter{tabulary} \LWR@loadafter{textpos} \LWR@loadafter{theorem} \LWR@loadafter{threeparttable} @@ -253,6 +256,8 @@ spacing=false} left=2in,right=12in,% top=1in,bottom=1in,% ]{geometry} +\@twosidefalse +\@mparswitchfalse \end{warpHTML} \begin{warpall} @@ -427,6 +432,8 @@ top=1in,bottom=1in,% \end{warpHTML} +\begin{warpall} + \newbool{LWR@tracinglwarp} \newcommand{\tracinglwarp}{\booltrue{LWR@tracinglwarp}} \newcommand{\LWR@traceinfo}[1]{% @@ -437,6 +444,18 @@ top=1in,bottom=1in,% {}% } +\newbool{HTMLDebugComments} +\boolfalse{HTMLDebugComments} + +\newbool{FormatEPUB} +\boolfalse{FormatEPUB} +\newbool{FormatWordProcessor} +\boolfalse{FormatWordProcessor} +\newbool{HTMLMarkFloats} +\booltrue{HTMLMarkFloats} + +\end{warpall} + \begin{warpHTML} @@ -635,7 +654,7 @@ top=1in,bottom=1in,% \providecommand*{\BaseJobname}{\jobname} -\providecommand*{\HTMLFileName}{} +\providecommand*{\HTMLfiveName}{} \providecommand*{\HomeHTMLFileName}{\BaseJobname} \newcommand*{\SetHTMLFileNumber}[1]{% @@ -676,12 +695,12 @@ top=1in,bottom=1in,% {% \LWR@traceinfo{LWR@htmlsectionfilename C \LWR@tempone}% \ifthenelse{% -\equal{\HTMLFileName}{} \AND \equal{\LWR@tempone}{Index} \OR \equal{\LWR@tempone}{index}% +\equal{\HTMLfiveName}{} \AND \equal{\LWR@tempone}{Index} \OR \equal{\LWR@tempone}{index}% }% {% \LWR@traceinfo{prefixing the index name with an underscore.}% \_#1.html}% -{\HTMLFileName#1.html}% +{\HTMLfiveName#1.html}% }% \LWR@traceinfo{LWR@htmlsectionfilename Z}% } @@ -745,6 +764,14 @@ top=1in,bottom=1in,% \end{warpHTML} +\begin{warpHTML} + +\newcommand{\LWR@forcenewpage}{% +\LWR@stoppars\LWR@orignewpage\LWR@startpars% +} +\end{warpHTML} + + \begin{warpHTML} @@ -812,16 +839,19 @@ top=1in,bottom=1in,% \newcommand*{\LWR@htmlopencomment}{% -\begingroup\LWR@origttfamily\LWR@origtextless{}!{-}{-}\endgroup% +{\LWR@origttfamily\LWR@origtextless{}!{-}{-}}% } \newcommand*{\LWR@htmlclosecomment}{% -\begingroup\LWR@origttfamily{-}{-}\LWR@origtextgreater{}\endgroup% +{\LWR@origttfamily{-}{-}\LWR@origtextgreater{}}% } \newcommand{\LWR@htmlcomment}[1]{% \LWR@htmlopencomment{}% -\LWR@origtextrm{#1}% +{% +\LWR@origttfamily% break ligatures +#1% +}% \LWR@htmlclosecomment{}} \newcommand{\LWR@htmlblockcommentb}[1] {\LWR@stoppars\LWR@htmlcomment{#1}\LWR@startpars\endgroup} @@ -838,12 +868,6 @@ top=1in,bottom=1in,% \LWR@startpars% } -\NewDocumentCommand{\LWR@htmlblocktagcomment}{m +m}{% -\LWR@stoppars% -\LWR@htmltag{#1}\LWR@htmlcomment{#2}\LWR@orignewline% -\LWR@startpars% -} - \NewDocumentCommand{\LWR@subhtmlelementclass}{m m o}{% \IfValueTF{#3}% @@ -864,7 +888,9 @@ top=1in,bottom=1in,% \newcommand*{\LWR@htmlelementclassend}[2]{% \LWR@stoppars% \LWR@htmltag{/#1}% +\ifbool{HTMLDebugComments}{% \LWR@htmlcomment{End of #1 ``#2''}% +}{}% \LWR@startpars% } @@ -936,19 +962,19 @@ top=1in,bottom=1in,% \begin{warpHTML} \newcommand*{\LWR@printclosepart} - {\LWR@htmlcomment{Closing part}} + {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing part}}{}} \newcommand*{\LWR@printclosechapter} - {\LWR@htmlcomment{Closing chapter}} + {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing chapter}}{}} \newcommand*{\LWR@printclosesection} - {\LWR@htmlcomment{Closing section}} + {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing section}}{}} \newcommand*{\LWR@printclosesubsection} - {\LWR@htmlcomment{Closing subsection}} + {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing subsection}}{}} \newcommand*{\LWR@printclosesubsubsection} - {\LWR@htmlcomment{Closing subsubsection}} + {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing subsubsection}}{}} \newcommand*{\LWR@printcloseparagraph} - {\LWR@htmlcomment{Closing paragraph}} + {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing paragraph}}{}} \newcommand*{\LWR@printclosesubparagraph} - {\LWR@htmlcomment{Closing subparagraph}} + {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing subparagraph}}{}} \newcommand*{\LWR@printcloselistitem} {\LWR@htmltag{/li}} @@ -1132,7 +1158,15 @@ top=1in,bottom=1in,% \end{warpprint} -\begin{warpHTML} +\begin{warpall} + +\newcommand{\theHTMLauthor}{\theauthor} + +\newcommand{\HTMLauthor}[1]{\renewcommand{\theHTMLauthor}{#1}} + +\end{warpall} + +\begin{warpall} \newcommand{\LWR@currentHTMLdescription}{} @@ -1141,10 +1175,7 @@ top=1in,bottom=1in,% \renewcommand{\LWR@currentHTMLdescription}{#1} } -\end{warpHTML} -\begin{warpprint} -\newcommand{\NewHTMLdescription}[1]{} -\end{warpprint} +\end{warpall} \begin{warpHTML} @@ -1184,6 +1215,7 @@ top=1in,bottom=1in,% } \newcommand*{\LWR@printpendingfootnotes}{% \ifvoid\LWR@footnotes\else +\LWR@forcenewpage \begin{BlockClass}{footnotes} \LWR@origmedskip \unvbox\LWR@footnotes @@ -1191,6 +1223,11 @@ top=1in,bottom=1in,% \end{BlockClass} \fi } +\newcommand*{\LWR@epubprintpendingfootnotes}{% +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}% +{\LWR@printpendingfootnotes}% +{}% +} \end{warpHTML} @@ -1303,17 +1340,23 @@ top=1in,bottom=1in,% \LWR@printpendingfootnotes +\ifbool{FormatEPUB} +{} +{ \LWR@htmlelement{footer} \LWR@pagebottom \LWR@htmlelementend{footer} - -\ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{} +} +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{\ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{}} \LWR@stoppars \LWR@htmltag{/body}\LWR@orignewline \LWR@htmltag{/html}\LWR@orignewline +\LWR@orignewpage \addtocounter{LWR@htmlfilenumber}{1}% @@ -1322,25 +1365,35 @@ top=1in,bottom=1in,% {\renewcommand*{\LWR@thisfilename}{\theLWR@htmlfilenumber}} \LWR@htmlblockcomment{% -\LWR@origtexttt{|Start file|% -\LWR@htmlsectionfilename{\LWR@thisfilename}|}% +|Start file|% +\LWR@htmlsectionfilename{\LWR@thisfilename}|% } \LWR@stoppars \LWR@filestart{ — #1}% there is an EMdash in front of the #1 -\LWR@topnavigation +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{\LWR@topnavigation} +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{ \LWR@htmlelement{header} \LWR@pagetop \LWR@htmlelementend{header} +} -\ifcsvoid{thetitle}{}{\LWR@printthetitle} +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{\ifcsvoid{thetitle}{}{\LWR@printthetitle}} -\LWR@sidetoc +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{\LWR@sidetoc} \LWR@htmlelementclass{section}{textbody} @@ -1385,10 +1438,11 @@ top=1in,bottom=1in,% \LWR@traceinfo{LWR@section}% \LWR@stoppars% \global\boolfalse{LWR@minipagethispar}% +\LWR@traceinfo{LWR@section: testing whether to start a new HTML file}% +\IfBooleanTF{#1}{% starred \LWR@orignewpage% -\LWR@traceinfo{LWR@section: testing about to start a new HTML file}% -\IfBooleanTF{#1}{}{% not starred +}{% not starred \ifthenelse{% \cnttest{\csuse{LWR@depth#4}}{<=}{\value{FileDepth}}% \AND% @@ -1403,12 +1457,17 @@ top=1in,bottom=1in,% {\LWR@newhtmlfile{#3}}% {\LWR@newhtmlfile{#2}}% }% new file -{}% not new file +{% not new file +\LWR@orignewpage% + +}% not new file }% not starred \LWR@traceinfo{LWR@section: about to LWR@setlatestname}% \IfValueTF{#2}{\LWR@setlatestname{#2}}{\LWR@setlatestname{#3}}% +\ifbool{HTMLDebugComments}{% \LWR@htmlcomment{Opening #4 ``#3''{}} +}{} \ifthenelse{% \cnttest{\csuse{LWR@depth#4}}{>=}{\LWR@depthparagraph}% @@ -1478,6 +1537,7 @@ top=1in,bottom=1in,% {} {% \DeclareDocumentCommand{\part}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthpart}{\LWR@printclosepart}% @@ -1491,6 +1551,7 @@ top=1in,bottom=1in,% {% \DeclareDocumentCommand{\chapter}{s o m}{% \LWR@traceinfo{chapter #3}% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthchapter}{\LWR@printclosechapter}% @@ -1501,6 +1562,7 @@ top=1in,bottom=1in,% } \DeclareDocumentCommand{\section}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthsection}{\LWR@printclosesection}% @@ -1509,6 +1571,7 @@ top=1in,bottom=1in,% } \DeclareDocumentCommand{\subsection}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthsubsection}{\LWR@printclosesubsection}% @@ -1517,6 +1580,7 @@ top=1in,bottom=1in,% } \DeclareDocumentCommand{\subsubsection}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthsubsubsection}% @@ -1526,6 +1590,7 @@ top=1in,bottom=1in,% } \DeclareDocumentCommand{\paragraph}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthparagraph}{\LWR@printcloseparagraph}% @@ -1534,6 +1599,7 @@ top=1in,bottom=1in,% } \DeclareDocumentCommand{\subparagraph}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthsubparagraph}{\LWR@printclosesubparagraph}% @@ -1568,6 +1634,9 @@ top=1in,bottom=1in,% \LWR@htmltag{html lang="\MetaLanguage"{}}\LWR@orignewline \LWR@htmltag{head}\LWR@orignewline \LWR@htmltag{meta charset="UTF-8" /}\LWR@orignewline +\ifcsempty{theHTMLauthor}{}{ +\LWR@htmltag{meta name="author" content="\theHTMLauthor" /}\LWR@orignewline +} \LWR@htmltag{meta name="generator" content="LaTeX lwarp package" /}% \LWR@orignewline \ifdefempty{\LWR@currentHTMLdescription}{}{% @@ -1609,10 +1678,14 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \newcommand*{\LWR@LwarpStart} {% +\ifbool{FormatWordProcessor}{% +\setcounter{FileDepth}{-5}% +\boolfalse{HTMLDebugComments}% +}{} \edef\LWR@strresult{\HomeHTMLFileName} \edef\HomeHTMLFileName{\detokenize\expandafter{\LWR@strresult}} -\edef\LWR@strresult{\HTMLFileName} -\edef\HTMLFileName{\detokenize\expandafter{\LWR@strresult}} +\edef\LWR@strresult{\HTMLfiveName} +\edef\HTMLfiveName{\detokenize\expandafter{\LWR@strresult}} \LWR@origonecolumn% \LWR@origscriptsize% \LWR@origraggedright% @@ -1692,7 +1765,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@htmlelementend{footer} +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{ \ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{} +} \LWR@stoppars% final stop of all paragraphs \LWR@htmltag{/body}\LWR@orignewline \LWR@htmltag{/html}\LWR@orignewline @@ -1745,8 +1822,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \end{warpall} \begin{warpHTML} \renewenvironment*{titlepage} - {\BlockClass{titlepage}\LWR@subminipage} - {\LWR@endsubminipage\endBlockClass} +{ +\LWR@forcenewpage +\BlockClass{titlepage}\LWR@subminipage +} +{\LWR@endsubminipage\endBlockClass} \renewenvironment*{titlingpage} {% \begin{titlepage} @@ -2056,6 +2136,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \providecommand*{\abstractname}{Abstract} \DeclareDocumentEnvironment{abstract}{} { +\LWR@forcenewpage \BlockClass{abstract} \BlockClassSingle{abstracttitle}{\abstractname} } @@ -2088,11 +2169,17 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \begin{warpHTML} \renewenvironment*{quote} -{\LWR@htmlblocktag{blockquote}} +{ +\LWR@forcenewpage +\LWR@htmlblocktag{blockquote} +} {\LWR@htmlblocktag{/blockquote}} \renewenvironment*{quotation} -{\LWR@htmlblocktag{blockquotation}} +{ +\LWR@forcenewpage +\LWR@htmlblocktag{blockquotation} +} {\LWR@htmlblocktag{/blockquotation}} \end{warpHTML} @@ -2111,7 +2198,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \begin{warpHTML} \AfterEndPreamble{ -\AtBeginEnvironment{verbatim}{\LWR@atbeginverbatim{verbatim}\unskip\vspace*{-\baselineskip}} +\AtBeginEnvironment{verbatim}{% +\LWR@forcenewpage +\LWR@atbeginverbatim{verbatim}\unskip\vspace*{-\baselineskip}% +} \AfterEndEnvironment{verbatim}{\unskip\vspace*{-\baselineskip}\LWR@afterendverbatim} } @@ -2159,6 +2249,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \AfterEndPreamble{ \let\LWR@origVerbatim\Verbatim \renewcommand*{\Verbatim}{% +\LWR@forcenewpage \renewcommand*{\LWR@Verbatimclass}{fancyvrb}% \LWR@origVerbatim% } @@ -2285,6 +2376,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \AtBeginEnvironment{BVerbatim} { +\LWR@forcenewpage \LWR@atbeginverbatim{bverbatim} } @@ -2306,10 +2398,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \begin{warpHTML} \renewcommand{\@begintheorem}[2]{% +\LWR@forcenewpage \BlockClass{theoremcontents} \InlineClass{theoremlabel}{#1\ #2\ } } \renewcommand{\@opargbegintheorem}[3]{% +\LWR@forcenewpage \BlockClass{theoremcontents} \InlineClass{theoremlabel}{#1\ #2\ (#3)\ } } @@ -2650,6 +2744,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \IfStrEq{\LWR@strresult}{l}{\LWR@parsenormalcolumn{l}}{}% \IfStrEq{\LWR@strresult}{c}{\LWR@parsenormalcolumn{c}}{}% \IfStrEq{\LWR@strresult}{r}{\LWR@parsenormalcolumn{r}}{}% +\IfStrEq{\LWR@strresult}{L}{\LWR@parsenormalcolumn{l}}{}% +\IfStrEq{\LWR@strresult}{C}{\LWR@parsenormalcolumn{c}}{}% +\IfStrEq{\LWR@strresult}{R}{\LWR@parsenormalcolumn{r}}{}% +\IfStrEq{\LWR@strresult}{J}{\LWR@parsenormalcolumn{l}}{}% \IfStrEq{\LWR@strresult}{S}{\LWR@parsenormalcolumn{r}}{}% \IfStrEq{\LWR@strresult}{\detokenize{@}}{\LWR@parseatcolumn}{}% \IfStrEq{\LWR@strresult}{!}{\LWR@parsebangcolumn}{}% @@ -3000,6 +3098,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \global\boolfalse{LWR@doingtbrule}% \boolfalse{LWR@exitingtabular}% \global\booltrue{LWR@intabularmetadata}% +\LWR@forcenewpage \LWR@htmlblocktag{table}% \LWR@parsetablecols{#2}% \LWR@stoppars% @@ -3117,7 +3216,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \newcommand*{\LWR@startref}[1] {% -\edef\LWR@lidref{\LWR@lateximagedepthref{#1}} +\edef\LWR@lidref{\LWR@lateximagedepthref{#1}}% \LWR@traceinfo{LWR@startref A: !#1!}% \LWR@htmltag{a href="% \LWR@traceinfo{LWR@startref B}% @@ -3127,7 +3226,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@traceinfo{LWR@startref D: !#1!}% \ifthenelse{\equal{\LWR@lidref}{??}}% {% -\LWR@traceinfo{LWR@startref D0: ??} +\LWR@traceinfo{LWR@startref D0: ??}% ??}% {% \LWR@traceinfo{LWR@startref D1: \LWR@lidref}% @@ -3243,6 +3342,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \begin{warpHTML} \NewDocumentCommand{\LWR@floatbegin}{m o}{% +\ifthenelse{\boolean{FormatWordProcessor}\AND\boolean{HTMLMarkFloats}}{% + +=== #1 begin + +}{}% \LWR@stoppars \addtocounter{LWR@thisfloat}{1}% \booltrue{LWR@freezethisfloat}% @@ -3261,6 +3365,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \endgroup% \boolfalse{LWR@freezethisfloat}% \LWR@startpars% +\ifthenelse{\boolean{FormatWordProcessor}\AND\boolean{HTMLMarkFloats}}{% + +=== end + +}{}% } \let\end@float\LWR@floatend \let\end@dblfloat\LWR@floatend @@ -3289,7 +3398,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \setcounter{LWR@nextautofloat}{#2}% } -\newcounter{LWR@latestautopage}% updated each new HTML file +\newcounter{LWR@latestautopage} \setcounter{LWR@latestautopage}{1} \let\LWR@origcaption@begin\caption@begin @@ -3403,20 +3512,27 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \let\LWR@origtableofcontents\tableofcontents \let\LWR@origlistoffigures\listoffigures \let\LWR@origlistoftables\listoftables + \renewcommand*{\tableofcontents}{% +\ifbool{FormatWordProcessor}{}{ \LWR@copyfile{\jobname.toc}{\jobname.sidetoc}% \LWR@printpendingfootnotes -\LWR@origtableofcontents% +\LWR@origtableofcontents +} } \renewcommand*{\listoffigures}{ +\ifbool{FormatWordProcessor}{}{ \LWR@printpendingfootnotes \LWR@origlistoffigures } +} \renewcommand*{\listoftables}{ +\ifbool{FormatWordProcessor}{}{ \LWR@printpendingfootnotes \LWR@origlistoftables } +} \NewDocumentCommand{\listof}{m +m}{% @@ -3442,6 +3558,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \begin{warpHTML} \newcommand*{\LWR@sidetoc}{ +\LWR@forcenewpage \LWR@stoppars \LWR@htmlelementclass{nav}{sidetoc} @@ -3513,8 +3630,15 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% + \begin{warpHTML} +\newcounter{LWR@autoindex} +\setcounter{LWR@autoindex}{0} + +\newcounter{LWR@autoglossary} +\setcounter{LWR@autoglossary}{0} + \@ifundefined{chapter} {\newcommand*{\LWR@indexsection}{\section{\indexname}}} {\newcommand*{\LWR@indexsection}{\chapter{\indexname}}} @@ -3549,11 +3673,24 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \InlineClass{indexsubsubitem}{} } +\def\@wrindex#1{% +\addtocounter{LWR@autoindex}{1}% +\LWR@newlabel{LWRindex-\theLWR@autoindex}% +\protected@write\@indexfile{}% +{\string\indexentry{#1}{\theLWR@autoindex}}% +\endgroup +\@esphack} + +\def\@wrglossary#1{% +\addtocounter{LWR@autoglossary}{1}% +\LWR@newlabel{LWRglossary-\theLWR@autoglossary}% +\protected@write\@glossaryfile{}% +{\string\glossaryentry{#1}{\theLWR@autoglossary}}% +\endgroup +\@esphack} + \newcommand*{\hyperindexref}[1]{ -\LWR@htmltag{a href="% -\LWR@htmlrefsectionfilename{autopage-#1}\#autosec-#1"{}}% -\LWR@origref{autopage-#1}\enskip\LWR@nameref{autopage-#1}% -\LWR@htmltag{/a}% +\nameref{LWRindex-#1}% } \end{warpHTML} @@ -3577,10 +3714,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \let\LWR@origdollar=$ -\let\secondorigdollar=$% balance for editor syntax highlighting +\let\LWR@secondorigdollar=$% balance for editor syntax highlighting \let\LWR@origopenparen\( \let\LWR@origcloseparen\) +\let\LWR@origopenbracket\[ +\let\LWR@origclosebracket\] \begingroup \catcode`\$=\active% @@ -4068,7 +4207,9 @@ class="lateximagesource"{}} \LWR@orignewline }% \LWR@ensuredoingapar% \LWR@htmltag{/span}% +\ifbool{HTMLDebugComments}{% \LWR@htmlcomment{End of lateximage}% +}{}% \addtocounter{LWR@lateximagedepth}{-1}% }% end of outer-most lateximage \LWR@traceinfo{lateximage: done} @@ -4082,15 +4223,24 @@ class="lateximagesource"{}} \LWR@orignewline \begin{warpHTML} \renewenvironment*{center} -{\BlockClass{center}} +{ +\LWR@forcenewpage +\BlockClass{center} +} {\endBlockClass} \renewenvironment*{flushright} -{\BlockClass{flushright}} +{ +\LWR@forcenewpage +\BlockClass{flushright} +} {\endBlockClass} \renewenvironment*{flushleft} -{\BlockClass{flushleft}} +{ +\LWR@forcenewpage +\BlockClass{flushleft} +} {\endBlockClass} \end{warpHTML} @@ -4217,8 +4367,7 @@ height:\rndprintlength{\LWR@igheight} % \newcommand*{\LWR@imageextension}{} \newcommand*{\LWR@expgraphicsfilename}{} - -\newcommand*{\LWR@includegraphicsb}[2][] +\NewDocumentCommand{\LWR@includegraphicsb}{s o o m} {% \LWR@origtilde \LWR@orignewline% \ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}{% @@ -4230,7 +4379,7 @@ height:\rndprintlength{\LWR@igheight} % \setlength{\textheight}{9in}% }% }{}% -\edef\LWR@expgraphicsfilename{#2} +\edef\LWR@expgraphicsfilename{#4} \renewcommand*{\LWR@imageextension}{}% \IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR@expgraphicsfilename.jpg}% {\renewcommand*{\LWR@imageextension}{.jpg}}{}% @@ -4266,7 +4415,11 @@ height:\rndprintlength{\LWR@igheight} % \renewcommand*{\LWR@igxscale}{1}% \renewcommand*{\LWR@igyscale}{1}% \renewcommand*{\LWR@igclass}{inlineimage}% -\setkeys{igraph}{#1}% +\IfValueTF{#3}{}{% +\IfValueTF{#2}% +{\setkeys{igraph}{#2}}% +{\setkeys{igraph}{}}% +}% \href{\thisgraphicspath\LWR@strresult\LWR@imageextension}% {% start of href \LWR@htmltag{% start of image tags @@ -4388,7 +4541,6 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline - \begin{warpHTML} @@ -4503,6 +4655,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \IfValueTF{#2}{\setlength{\LWR@minipageheight}{#2}}{}% \LWR@stoppars% \LWR@traceinfo{minipage: creating div class}% +\LWR@orignewpage% \LWR@htmltag{div class="minipage" style="% \ifthenelse{\equal{#1}{t}}{vertical-align: bottom ; }{}% \ifthenelse{\equal{#1}{c}}{vertical-align: middle ; }{}% @@ -4582,7 +4735,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \renewcommand{\texttt}[1]{\LWR@htmlspan{kbd}{#1}} -\renewcommand{\textup}[1]{\LWR@htmlspan{textup}{#1}} +\renewcommand{\textup}[1]{\InlineClass{textup}{#1}} \renewcommand{\textit}[1]{\LWR@htmlspan{i}{#1}} @@ -4677,6 +4830,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \newcommand*{\LWR@newlinebr}{\unskip\LWR@htmltag{br /}\LWR@orignewline}% \let\newline\LWR@newlinebr +\let\LWR@origendofline\\ \NewDocumentCommand{\LWR@endofline}{s o} {% \newline% @@ -4859,7 +5013,7 @@ display:inline-block;"% \providecommand*{\HomeHTMLFileName}{\BaseJobname} -\providecommand*{\HTMLFileName}{} +\providecommand*{\HTMLfiveName}{} \providecommand*{\UseLatexmk}{false} \begin{warpprint} @@ -4883,8 +5037,9 @@ display:inline-block;"% \immediate\write\LWR@file{% homehtmlfilename = "\HomeHTMLFileName"% } -\immediate\write\LWR@file{htmlfilename = "\HTMLFileName"} +\immediate\write\LWR@file{htmlfilename = "\HTMLfiveName"} \immediate\write\LWR@file{uselatexmk = "\UseLatexmk"} +\immediate\write\LWR@file{language = "\LWR@lwarpmklang"} \immediate\closeout\LWR@file \end{warpprint} -- cgit v1.2.3