diff options
Diffstat (limited to 'Master')
31 files changed, 2485 insertions, 1058 deletions
diff --git a/Master/texmf-dist/doc/latex/lwarp/README.txt b/Master/texmf-dist/doc/latex/lwarp/README.txt index b7c6e153de7..cd0004b7712 100644 --- a/Master/texmf-dist/doc/latex/lwarp/README.txt +++ b/Master/texmf-dist/doc/latex/lwarp/README.txt @@ -1,5 +1,5 @@ -LaTeX lwarp package v0.27 README.txt +LaTeX lwarp package v0.29 README.txt Files included are: diff --git a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf Binary files differindex e6373450446..b334c8805d5 100644 --- a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf +++ b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf diff --git a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua index 12eabe3643e..9b7e7e29197 100755 --- a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua +++ b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua @@ -4,7 +4,7 @@ -- 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.") ; @@ -15,15 +15,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. @@ -44,6 +46,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". @@ -85,6 +88,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.") @@ -129,6 +134,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" ) ; @@ -225,7 +231,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 @@ -315,6 +322,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 @@ -366,6 +389,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. @@ -390,7 +430,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 () @@ -398,7 +438,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/source/latex/lwarp/lwarp.dtx b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx index ad02aec941e..73ca057c437 100644 --- a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx +++ b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx @@ -16,7 +16,7 @@ % \iffalse %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{lwarp} -%<package> [2017/04/04 v0.27 Allows LaTeX to directly produce HTML5 output.] +%<package> [2017/04/15 v0.29 Allows LaTeX to directly produce HTML5 output.] % %<*driver> \documentclass{ltxdoc} @@ -119,10 +119,29 @@ \usepackage{dtxdescribe} -\newcommand{\ItemDescribeMacro}[1]{\item[\cmd{#1}:]\DescribeMacro{#1}} -\newcommand{\ItemDescribeEnv}[1]{\item[\env{#1}:]\DescribeEnv{#1}} -\newcommand{\ItemDescribeCounter}[1]{\item[\texttt{#1}:]\DescribeCounter{#1}} -\newcommand{\ItemDescribeBoolean}[1]{\item[\texttt{#1}:]\DescribeBoolean{#1}} +\newcommand{\ItemDescribeMacro}[1]{% +\item[\cmd{#1}:]% +\setlength{\parskip}{1.5ex}% +\DescribeMacro{#1}% +} + +\newcommand{\ItemDescribeEnv}[1]{% +\item[\env{#1}:]% +\setlength{\parskip}{1.5ex}% +\DescribeEnv{#1}% +} + +\newcommand{\ItemDescribeCounter}[1]{% +\item[\texttt{#1}:]% +\setlength{\parskip}{1.5ex}% +\DescribeCounter{#1}% +} + +\newcommand{\ItemDescribeBoolean}[1]{% +\item[\texttt{#1}:]% +\setlength{\parskip}{1.5ex}% +\DescribeBoolean{#1}% +} @@ -161,34 +180,72 @@ Keywords={LaTeX, HTML, conversion}% \newcommand{\acro}[1]{\textsc{\lowercase{#1}}} \newcommand{\tag}[1]{\texttt{<#1>}} +\newcommand{\TOC}{\acro{TOC}} +\newcommand{\LOF}{\acro{LOF}} +\newcommand{\LOT}{\acro{LOT}} + +\newcommand{\HTML}{\acro{HTML}} +\newcommand{\HTMLfive}{\HTML\oldstylenums{5}} +\newcommand{\CSS}{\acro{CSS}} +\newcommand{\CSSthree}{\CSS\oldstylenums{3}} +\newcommand{\EPUB}{\acro{EPUB}} +\newcommand{\SVG}{\acro{SVG}} +\newcommand{\PNG}{\acro{PNG}} +\newcommand{\JPG}{\acro{JPG}} +\newcommand{\PDF}{\acro{PDF}} +\newcommand{\tikz}{Ti\textit{k}z} +\newcommand{\MathML}{Math\acro{ML}} +\newcommand{\CTAN}{\acro{CTAN}} +\newcommand{\TDS}{\acro{TDS}} +\newcommand{\goesto}{$\Rightarrow$} - - - +\newcommand{\credits}[1]{{\footnotesize(\textit{Based on original code by} \textsc{#1}.)}} \newcommand{\codehtml}{\leavevmode\marginpar{\footnotesize\raggedleft\textcolor{codecolor}{\textbf{for HTML output:~}}}\vspace{-5.25ex}} \newcommand{\codeprint}{\leavevmode\marginpar{\footnotesize\raggedleft\textcolor{codecolor}{\textbf{for PRINT output:~}}}\vspace{-5.25ex}} \newcommand{\codeall}{\leavevmode\marginpar{\footnotesize\raggedleft\textcolor{codecolor}{\textbf{for HTML \& PRINT:~}}}\vspace{-5.25ex}} -\newcommand{\tikz}{Ti\textit{k}z} -\newcommand{\htmlfive}{\acro{HTML}\oldstylenums{5}} -\newcommand{\cssthree}{\acro{CSS}\oldstylenums{3}} - -\newcommand{\goesto}{$\Rightarrow$} -\newcommand{\credits}[1]{{\footnotesize(\textit{Based on original code by} \textsc{#1}.)}} +\newcommand{\userentry}[1]{% +\leavevmode\smallskip\newline +\hspace*{2em}\begin{minipage}{\linewidth-2em} +{\footnotesize Enter~$\Rightarrow$}\quad\texttt{#1} +\end{minipage} +\unskip\smallskip +} +\newenvironment{sourcedisplay} +{ +\leavevmode\smallskip\newline +\hspace*{2em}\minipage{\linewidth-2em} +\ttfamily +} +{ +\endminipage +\unskip\smallskip +} -\newcommand{\userentry}[1]{% -\par -\smallskip -\hspace*{2em}{\footnotesize Enter~$\Rightarrow$}\quad\texttt{#1} -\smallskip +\newenvironment{UIdisplay} +{ +\leavevmode\smallskip\newline +\hspace*{2em}\minipage{\linewidth-2em} +\sffamily +} +{ +\endminipage +\unskip\smallskip } + \newenvironment{docsidebar}[1][] -{\hfill\minipage{.9\linewidth}\raggedright#1\smallskip\hrule\medskip} +{% +\ifthenelse{\isempty{#1}}{}{\medskip}% +\hfill\minipage{.9\linewidth}% +\setlength{\parskip}{1.5ex}% +\ifthenelse{\isempty{#1}}{}{\textit{#1}}% +\leavevmode\smallskip\hrule% +} {\smallskip\hrule\endminipage\hspace*{\fill}\bigskip} % \makeatletter @@ -239,11 +296,11 @@ Special warnings are marked with a warning icon. \codeprint\vspace*{5.25ex}\ignorespaces \codeall\vspace*{5.25ex}\ignorespaces Green-colored tags in the left margin show which sections of source -code apply to the generation of \acro{HTML}, print, or both forms of output. +code apply to the generation of \HTML, print, or both forms of output. } \newcommand{\limitspageref}{\pkg{cleveref} and \pkg{varioref} are supported, -but printed page numbers do not map to \acro{HTML}. +but printed page numbers do not map to \HTML. See \cref{sec:successfulcommands} to redefine the message which is printed for page number references. } @@ -273,10 +330,11 @@ The documentation for the \pkg{verse} and \pkg{memoir} packages suggest defining an \cs{attrib} command, which may already exist in current documents, but it will only work for print output. \pkg{lwarp} provides \cs{attribution}, which -works for both print and \acro{HTML} output. To combine the two so that -\cs{attrib} is used for print and \cs{attribution} is used for \acro{HTML}: +works for both print and \HTML\ output. To combine the two so that +\cs{attrib} is used for print and \cs{attribution} is used for \HTML: \begin{docsidebar} +\raggedright \ttfamily \cs{begin}\{warpHTML\} @@ -291,16 +349,16 @@ These lengths are used by \pkg{verse} and \pkg{memoir} to control the left margi and they may already be set by the user for print output. New lengths \DescribeLength{HTMLvleftskip}\DescribeLength{HTMLleftmargini} \cs{HTMLvleftskip} and \cs{HTMLleftmargini} are provided to control the -margins in \acro{HTML} output. These new lengths may be set by the user +margins in \HTML\ output. These new lengths may be set by the user before any \env{verse} environment, and persist until they are manually changed again. One reason to change \cs{HTMLleftmargini} is if there is a wide \cs{flagverse} in use, such as the word ``Chorus'', in which case the value of \cs{HTMLleftmargini} should be set to a wide enough length to contain ``Chorus''. The default is wide enough for a stanza number. -Horizontal spacing relies on \texttt{pdftotext}'s ability to discern the -\texttt{-layout} of the -text in the \acro{HTML}-tagged \acro{PDF} output. For some settings of +Horizontal spacing relies on \texttt{pdftotext}'s ability to discern the layout +(\texttt{-layout} option) of the +text in the \HTML-tagged \PDF\ output. For some settings of \cs{HTMLleftmargini} or \cs{HTMLleftskip} the horizontal alignment may not work out exactly, in which case a label may be shifted by one space. } @@ -309,7 +367,7 @@ exactly, in which case a label may be shifted by one space. \newcommand{\limitslateximagefontsize}{% The size of the math and text used \margintag{SVG image font size} -in the \acro{SVG} image may be adjusted +in the \SVG\ image may be adjusted \index{font>size --- lateximage}% \index{font>size --- math, SVG}% \index{math>font size --- SVG}% @@ -320,51 +378,52 @@ by setting \cs{LateximageFontSizeName} to a font size name --- \emph{without the \newcommand{\limitsmath}{% -Math may be rendered as \acro{SVG} graphics or using the \textsc{MathJax} JavaScript display engine. +Math may be rendered as \SVG\ graphics or using the \textsc{MathJax} JavaScript display engine. \index{JavaScript>MathJax} -For \acro{SVG} math, +For \SVG\ math, \margintag{SVG math option} -math is rendered as usual by \LaTeX{} into the initial \acro{PDF} file using the +math is rendered as usual by \LaTeX{} into the initial \PDF\ file using the \index{math>SVG summary}% \index{SVG>math summary}% current font\footnote{See \cref{sec:xfrac} regarding fonts and fractions.}, -then is captured from the \acro{PDF} and converted to \acro{SVG} graphics +then is captured from the \PDF\ and converted to \SVG\ graphics via a number of utility programs. -The \acro{SVG} format is a scalable-vector web format, so math may be typeset by \LaTeX{} +The \SVG\ format is a scalable-vector web format, so math may be typeset by \LaTeX{} with its fine control and precision, then displayed or printed at any size, depending on (sometimes broken) browser support. -An \acro{HTML} \texttt{ALT} tag carries the \LaTeX{} code which generated the +An \HTML\ \texttt{ALT} tag carries the \LaTeX{} code which generated the math, allowing copy/paste of the \LaTeX{} math expression into other documents. \limitslateximagefontsize As currently implemented, \margintag{SVG files} -each instance of math creates a new \acro{SVG} file. In text with +each instance of math creates a new \SVG\ file. In text with many references to math variables, this can result in a large number of files with duplicate content. In the future, some method of content-based naming and checksumming may be used to remove the need for duplicate files. Another approach would be \margintag{SVG inline} -to in-line the \acro{SVG} files directly into the \acro{HTML}. +to in-line the \SVG\ files directly into the \HTML. This avoids having a large number of files and potentially speeds loading the images, but dis-allows the possibility of sharing one file among many instances without user intervention. -Others have used \acro{PNG} files, +Others have used \PNG\ files, \margintag{PNG files} sometimes pre-scaled for print resolution but displayed on-screen at a scaled down size. This allows high-quality print output at the expense -of larger files, but \acro{SVG} files are also larger as well. +of larger files, but \SVG\ files are also larger as well. -Conversion to Math\acro{ML} might be a better approach, +Conversion to \MathML\ might be a better approach, \margintag{MathML} among other things -allowing a more compact representation of math than \acro{SVG} drawings. -Problems with Math\acro{ML} include limited browser support and some +allowing a more compact representation of math than \SVG\ drawings. +Problems with \MathML\ include limited browser support and some issues with the fine control of the appearance of the result. +Also see \cref{sec:epub} regarding \EPUB\ output with MathJax. The popular MathJax alternative (\url{mathjax.org}) may be used to display math. \margintag{MathJax math option} @@ -374,9 +433,9 @@ The popular MathJax alternative (\url{mathjax.org}) may be used to display math. When MathJax is enabled, math is rendered twice: \begin{enumerate} -\item As regular \LaTeX\ \acro{PDF} output placed inside an \acro{HTML} comment, allowing +\item As regular \LaTeX\ \PDF\ output placed inside an \HTML\ comment, allowing equation numbering and cross referencing to be almost entirely under the control of \LaTeX, and -\item As detokenized printed \LaTeX{} commands placed directly into the \acro{HTML} output +\item As detokenized printed \LaTeX{} commands placed directly into the \HTML\ output for interpretation by the MathJax display scripts. An additional script is used to pre-set the equation number format and value according to the current \LaTeX\ values, and the MathJax cross-referencing system is ignored in favor of the \LaTeX\ internal system, @@ -391,7 +450,7 @@ Limitations when using MathJax include: \margintag{chapter numbers}% \index{MathJax>tagged equations}% \index{tagged equations>Mathjax}% - \cs{tag}ged equations have the chapter number prepended in \acro{HTML} output, unlike \LaTeX. + \cs{tag}ged equations have the chapter number prepended in \HTML\ output, unlike \LaTeX. \cs{tag*} equations (correctly) do not. This may be improved with future versions of the MathJax support script. @@ -431,22 +490,30 @@ Limitations when using MathJax include: \newcommand{\limitsntheorem}{% This conversion is not total. \watchout[Font control] -Font control is via \acro{CSS}, and the custom \LaTeX\ font settings +Font control is via \CSS, and the custom \LaTeX\ font settings are ignored. \pkg{ntheorem} has a bug with equation numbering in AMS environments \watchout[Equation numbering] when the option \texttt{thref} is used. \pkg{lwarp} does not share this bug, so equations with \cs{split}, etc, are numbered correctly -with \pkg{lwarp}'s \acro{HTML} output, but not with the print output. +with \pkg{lwarp}'s \HTML\ output, but not with the print output. It is recommended to use \pkg{cleveref} instead of \pkg{ntheorem}'s \texttt{thref} option. } \newcommand{\limitsgraphics}{% +If using the older \pkg{graphics} syntax, use both optional arguments +\watchout[\pkg{graphics} vs. \pkg{graphicx}] +for \cs{includegraphics}. +A single optional parameter is interpreted as the newer \pkg{graphicx} syntax. +Note that viewports are not supported by \pkg{warp}; +\watchout[viewports] +the entire image will be shown. + \cs{graphicspath} only works for a single directory; -\margintag{\cs{graphicspath}} +\watchout[\cs{graphicspath}] all graphics must be in this directory. For \cs{includegraphics}, avoid \texttt{px} and \% units for width and height, or @@ -464,10 +531,10 @@ to give fixed-sized images proportional to a 6 by 9 inch text area. \texttt{origin}, \texttt{rotate} and \texttt{scale}, plus a new \texttt{class} key. -With \acro{HTML} output, \cs{includegraphics} accepts an optional -\margintag{\acro{HTML} class} +With \HTML\ output, \cs{includegraphics} accepts an optional +\margintag{\HTML\ class} \texttt{class=xyz} keyval combination, and if this is given then -the \acro{HTML} output will include that class for the image. +the \HTML\ output will include that class for the image. The class is ignored for print output. For \cs{includegraphics} the user should provide both \texttt{.pdf} and \texttt{.svg} @@ -475,7 +542,7 @@ images, but always refer to \watchout[image file types] \texttt{.pdf} images in the document source. All \cs{includegraphics} references to \texttt{.pdf} will automatically -be changed to \texttt{.svg} for \acro{HTML} output, and will be left as \texttt{.pdf} for print output. +be changed to \texttt{.svg} for \HTML\ output, and will be left as \texttt{.pdf} for print output. Images may also be \texttt{.jpg} and \texttt{.png}, and will be used as-is for either output. \cs{rotatebox} accepts the optional \texttt{origin} key. @@ -484,7 +551,7 @@ Images may also be \texttt{.jpg} and \texttt{.png}, and will be used as-is for e \cs{rotatebox}, \cs{scalebox}, and \cs{reflectbox} depend on modern browser support. \watchout[browser support] -The \cssthree{} standard declares that when an object is transformed +The \CSSthree\ standard declares that when an object is transformed the whitespace which they occupied is preserved, unlike \LaTeX{}, so expect some ugly results for scaling and rotating. @@ -495,14 +562,14 @@ Color definitions, models, and mixing are fully supported \margintag{support} without any changes required. -Colored tables are ignored so far. Use \acro{CSS} to style tables. +Colored tables are ignored so far. Use \CSS\ to style tables. \margintag{tables} \cs{textcolor}, \cs{colorbox}, and \cs{fcolorbox} are supported. \margintag{colored text and boxes} \cs{color} and \cs{pagecolor} are ignored. -Use \acro{CSS} or \cs{textcolor} where possible. +Use \CSS\ or \cs{textcolor} where possible. \margintag{\cs{color} and \cs{pagecolor}} } @@ -529,7 +596,7 @@ Use \acro{CSS} or \cs{textcolor} where possible. \item For multirow, insert \cs{mrowcell} into any empty multi-row cells. This will be a null function for the print output, and is a placeholder for \watchout[\cs{multirow}] - parsing the table for \acro{HTML} output. + parsing the table for \HTML\ output. \item If a multirow reaches to the bottom of a table, and \cs{bottomrule} does not go over to that edge, @@ -547,12 +614,12 @@ Use \acro{CSS} or \cs{textcolor} where possible. \watchout[paragraphs] \item \cs{cmidrule} does not support width or trim options - due to \acro{CSS} limitations. + due to \CSS\ limitations. \margintag{\cs{cmidrule} width, trim} \item For \pkg{longtable}, place headings and footings which \margintag{\env{longtable} headings} - do not apply to \acro{HTML} inside \cs{warpprintonly\{\}}. + do not apply to \HTML\ inside \cs{warpprintonly\{\}}. \item For \cs{toprule} and \cs{bottomrule}, when combined with a \env{warpprint} or \env{warpHTML} environment, @@ -563,35 +630,59 @@ Use \acro{CSS} or \cs{textcolor} where possible. to \\ \hspace*{.375in}\cmds{\cs{warpprintonly}\{This \& That \cs{endhead}\}} \\ and likewise with the other \cs{end} headings. - Keep the \cs{endfirsthead} row unchanged, as it is still relevent to \acro{HTML} output. + Keep the \cs{endfirsthead} row unchanged, as it is still relevent to \HTML\ output. \item For S columns (from the \pkg{siunitx} package), \watchout[S columns] while producing print output, anything non-numeric must be placed inside \{ \} braces, including commands such as \cs{multirow}. - While producing \acro{HTML} output, though, anything placed inside + While producing \HTML\ output, though, anything placed inside braces is not seen by \pkg{lwarp}'s tabular handling algorithm. To resolve this problem, make a copy of the row, with one version for print output, containing the extra braces, and another version - for \acro{HTML} output, without the extra braces, such as: \\ + for \HTML\ output, without the extra braces, such as: \\ \hspace*{.375in} \cs{warpprintonly}\{\texttt{1 \& 2 \& \textcolor{red}{\{}\cs{multirow}\{2\}\{2cm\}\{Text\}\textcolor{red}{\}} \& 3 \textbackslash\textbackslash\}} \\ \hspace*{.375in} \cs{warpHTMLonly}\{\texttt{1 \& 2 \& \cs{multirow}\{2\}\{2cm\}\{Text\} \& 3 \textbackslash\textbackslash\}} \end{itemize} } +\newcommand{\limitslongtable}{% +Longtable \cs{endhead}, \cs{endfoot}, and \cs{endlastfoot} rows are +not used for \HTML, and these rows should be disabled. +\watchout +Use + \begin{sourcedisplay} + \cs{warpprintonly}\{row contents\} + \end{sourcedisplay} +instead of + \begin{sourcedisplay} + \cs{begin}\{warpprint\} \ldots\ \cs{end}\{warpprint\} + \end{sourcedisplay} +Doing so helps avoid ``Misplaced \cs{noalign}.'' when using \cs{begin}\{warpprint\}. + +Keep the \cs{endfirsthead} row, which is still relevent to \HTML\ output. + +\cs{kill} is ignored, place a \cs{kill} line inside +\watchout + \begin{sourcedisplay} + \cs{begin}\{warpprint\} \ldots\ \cs{end}\{warpprint\} + \end{sourcedisplay} +or place it inside \cs{warpingprintonly}. +} + \newcommand{\limitssaveboxes}{% \LaTeX\ boxes are placed inline and do not allow line breaks, so boxes -with long contents may overflow the line during \acro{HTML} conversion. +with long contents may overflow the line during \HTML\ conversion. This is mostly a problem when the boxes contain objects which themselves -hold large \acro{HTML} tags, such as rotation commands with long contents. -When this object overflows the line, some \acro{HTML} code will be lost and +hold large \HTML\ tags, such as rotation commands with long contents. +When this object overflows the line, some \HTML\ code will be lost and the page will be corrupted. } \newcommand{\limitsminipage}{% -Minipages and parboxes will be placed side-by-side in \acro{HTML} +Minipages and parboxes will be placed side-by-side in \HTML unless you place a \cs{newline} between them. \margintag{placement} @@ -604,32 +695,32 @@ Side-by-side minipages may be separated by \cs{quad}, \cs{qquad}, \cs{enskip}, \margintag{side-by-side} \cs{hspace}, \cs{hfill}, or a \cs{rule}. When inside a \texttt{center} environment, the result is -similar in print and \acro{HTML}. Paragraph tags are surpressed between +similar in print and \HTML. Paragraph tags are surpressed between side-by-side minipages and these spacing commands, but not at the start or end of the paragraph. -There is limited support for minipages inside an \acro{HTML} \tag{span}. +There is limited support for minipages inside an \HTML\ \tag{span}. \margintag{in a span} -An \acro{HTML} \tag{div} cannot appear inside a \tag{span}. +An \HTML\ \tag{div} cannot appear inside a \tag{span}. While in a \tag{span}, minipages and parboxes are ignored. -Use \cs{newline} or \cs{par} for an \acro{HTML} break. +Use \cs{newline} or \cs{par} for an \HTML\ break. When using \cs{linewidth}, \cs{textwidth}, and \cs{textheight}, \margintag{size} widths and heights are scaled proportionally to a 6\texttimes{}9 inch text area. A minipage of width exactly \cs{linewidth} is automatically -given no \acro{HTML} width. +given no \HTML\ width. \margintag{no-width minipages} A new macro \cs{minipagefullwidth} requests \margintag{full-width minipages} that the next minipage be generated -without an \acro{HTML} \texttt{width} tag, allowing it to be the full width of +without an \HTML\ \texttt{width} tag, allowing it to be the full width of the display rather than the fixed width given. -Nested minipages adopt their parent's text alignment in \acro{HTML}, -whereas in regular \LaTeX{} \acro{PDF} output they do not. +Nested minipages adopt their parent's text alignment in \HTML, +whereas in regular \LaTeX{} \PDF\ output they do not. \watchout[text alignment] Use a \env{flushleft} or similar environment in the child minipage to force a text alignment. @@ -643,14 +734,18 @@ title and subtitle background colors and borders and thickness, border radius, and shadow. CSS classes are created for \pkg{mdframed} environments and frame titles. -When used, \pkg{lwarp} loads \pkg{mdframed} in HTML with \texttt{framemethod=none}. +When used, \pkg{lwarp} loads \pkg{mdframed} in \HTML\ with \texttt{framemethod=none}. \watchout[loading] -For title font, use\\ - \hspace*{.25in}\texttt{frametitlefont=\cs{textbf},}\\ +For title font, use \margintag{font}% -instead of\\ - \hspace*{.25in}\texttt{frametitlefont=\cs{bfseries},}\\ +\begin{sourcedisplay} +frametitlefont=\cs{textbf}, +\end{sourcedisplay} +instead of +\begin{sourcedisplay} +frametitlefont=\cs{bfseries}, +\end{sourcedisplay} where \cs{textbf} must appear just before the comma and will receive the following text as its argument (since the text happens to be between braces in the \pkg{mdframed} source). @@ -661,7 +756,7 @@ only one font selection may be made at a time. \margintag{theoremtitlefont} in braces in the \pkg{mdframed} source. -Footnotes are currently placed at the bottom of the \acro{HTML} page. +Footnotes are currently placed at the bottom of the \HTML\ page. \margintag{footnotes} \texttt{userdefinedwidth} and \texttt{align} are currently ignored. @@ -672,8 +767,10 @@ Footnotes are currently placed at the bottom of the \acro{HTML} page. To ensure proper float numbering, set caption positions such as: -\hspace*{2em} \texttt{\cs{captionsetup}[table]\{position=top\}} \\ -\hspace*{2em} \texttt{\cs{captionsetup}[figure]\{position=bottom\}} +\begin{sourcedisplay} +\cs{captionsetup}[table]\{position=top\} \\ +\cs{captionsetup}[figure]\{position=bottom\} +\end{sourcedisplay} Similarly for \texttt{subtable}, \texttt{subfigure}, and \texttt{longtable}. @@ -715,13 +812,13 @@ These values are pre-set to \texttt{.3\cs{linewidth}} and \texttt{2in}. \watchout[\cs{FBwidth}, \cs{FBheight}] Possible solutions include: \begin{itemize} -\item Use fixed lengths. \pkg{lwarp} will scale the \acro{HTML} lengths appropriately. +\item Use fixed lengths. \pkg{lwarp} will scale the \HTML\ lengths appropriately. \item Use \env{warpprint} and \env{warpHTML} environments to select appropriate values for each case. \item Inside a \env{warpHTML} environment, manually change \cs{FBwidth} or \cs{FBheight} before the \cs{ffigbox} or \cs{ttabbox}. Use \cs{FBwidth} or \cs{FBheight} normally afterwards; it will be used as - expected in print output, and will use your custom-selected value in \acro{HTML} + expected in print output, and will use your custom-selected value in \HTML\ output. This custom value will be used repeatedly, until it is manually changed to a new value. \end{itemize} @@ -734,18 +831,21 @@ Do not use \cmds{per-mode=fraction}, which cannot be seen by the final \cmds{pdf \newcommand{\limitsbabelone}{% -If using \pkg{babel} with French, use \\ -\hspace*{.25in}\cs{frenchbsetup\{StandardLists=true\}} \\ +If using \pkg{babel} with French, use \watchout[French]% -to preserve the special \acro{HTML} and \pkg{enumitem} list handling. +\begin{sourcedisplay} +\cs{frenchbsetup\{StandardLists=true\}} +\end{sourcedisplay} +to preserve the special \HTML\ and \pkg{enumitem} list handling. } \newcommand{\limitsbabeltwo}{% Also, when French is used, the caption separator is \margintag{\cs{CaptionSeparator}} -changed to a dash. The following may be used to restore it to a colon: \\ -\hspace*{.25in}% +changed to a dash. The following may be used to restore it to a colon: +\begin{sourcedisplay} \texttt{\cs{renewcommand}*\{\cs{CaptionSeparator}\}\{:\textasciitilde\}} +\end{sourcedisplay} } \newcommand{\limitsnewclude}{% @@ -754,6 +854,7 @@ changed to a dash. The following may be used to restore it to a colon: \\ \watchout[loading] \begin{docsidebar}[Ex:] +\raggedright \cs{documentclass\{article\}} \\ \ldots <font setup> \\ \cs{usepackage\{newclude\}} \\ @@ -776,16 +877,16 @@ The proper load order is: } \newcommand{\limitsenumitem}{% -\pkg{enumitem} is pre-loaded during \acro{HTML} output. +\pkg{enumitem} is pre-loaded during \HTML\ output. \margintag{enumitem} Many of the spacing options are rendered irrelevant by \cmds{pdftotext} and -\acro{HTML}. Numbering, labels, and \cs{newlist} function correctly. +\HTML. Numbering, labels, and \cs{newlist} function correctly. } \newcommand{\limitsenumerate}{% \pkg{enumerate} conflicts with \pkg{enumitem} if both are loaded at the same time, but \pkg{lwarp} does not actually load \pkg{enumerate}. -While generating \acro{HTML}, \pkg{lwarp} only loads \pkg{enumitem}, and +While generating \HTML, \pkg{lwarp} only loads \pkg{enumitem}, and \pkg{enumerate} is simulated by \pkg{enumitem} using the functionality of the \texttt{shortlabels} option. @@ -795,6 +896,29 @@ If these are used, \pkg{enumerate} will conflict with \pkg{enumitem} during print output. } +\newcommand{\limitsglossaries}{% +\texttt{xindy} is required for \pkg{glossaries}. + +The default \texttt{style=item} option for \pkg{glossaries} conflicts +with \pkg{lwarp}, so the style is forced to \texttt{index} instead. + +The page number list in the printed form would become \cs{nameref}s in \HTML, +which could become a very long string if many items are referenced. +For now, the number list is simply turned off. + +\texttt{lwarpmk} has the commands \texttt{printglossary} and +\texttt{htmlglossary} to process the glossaries created by +\pkg{glossaries} using \texttt{xindy}. + +The packages \pkg{lwarp-newproject} and \pkg{lwarp} each take an option +\DescribeOption[lwarp-newproject]{lwarpmklang} +\DescribeOption[lwarp]{lwarpmklang} +\texttt{lwarpmklang=english} to set the language used by \texttt{xindy}. +Set the same option for both packages. +This is passed to \texttt{xindy} using its \texttt{-L} option. +} + + \newcommand{\osportabilityusage}{% \pkg{lwarp} tries to detect which operating system is being used. @@ -831,7 +955,7 @@ operating-system path separator used by \pkg{lwarp}. %<*package> % \fi % -% \CheckSum{10774} +% \CheckSum{10986} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -881,10 +1005,10 @@ operating-system path separator used by \pkg{lwarp}. % \changes{v0.19}{2016/05/25}{File: \texttt{lwarp\_mathjax.txt} added.} % \changes{v0.19}{2016/06/01}{File: lwarp.css: \texttt{tnoteitemheader} added} % \changes{v0.20}{2017/02/09}{\ 2017/02/09} -% \changes{v0.20}{2016/06/27}{Test Suite: HTML meta descriptions.} +% \changes{v0.20}{2016/06/27}{Test Suite: \HTML\ meta descriptions.} % \changes{v0.20}{2016/09/19}{File: lwarp.css: Minor fixes for validation.} % \changes{v0.20}{2016/12/08}{Docs: Improved index.} -% \changes{v0.20}{2016/12/17}{File: lwarpmk used to compile print, HTML, indexes, and lateximages.} +% \changes{v0.20}{2016/12/17}{File: lwarpmk used to compile print, \HTML, indexes, and lateximages.} % \changes{v0.20}{2016/12/17}{Removed reliance on make, grep, gawk.} % \changes{v0.20}{2016/12/17}{Parallel versions of aux files for print/HTML.} % \changes{v0.20}{2017/01/03}{Moved sidebar and example code to test suite.} @@ -897,6 +1021,8 @@ operating-system path separator used by \pkg{lwarp}. % \changes{v0.25}{2017/03/16}{Docs: Adds credits for patched code.} % \changes{v0.26}{2017/03/31}{\ 2017/03/31} % \changes{v0.27}{2017/04/04}{\ 2017/04/04} +% \changes{v0.28}{2017/04/14}{\ 2017/04/14} +% \changes{v0.29}{2017/04/15}{\ 2017/04/15} @@ -912,23 +1038,22 @@ operating-system path separator used by \pkg{lwarp}. % \thispagestyle{empty} % % \begin{center} -% \vfill % \includegraphics[width=.3\linewidth]{lwarp_logo.pdf} -% \vfill +% +% \bigskip +% % {\Huge The \textbf{lwarp} package} % -% \fileversion{} --- \filedate +% {\Large \textup{\LaTeX{} to \HTMLfive}} % % \bigskip % -% {\Large \textup{\LaTeX{} to HTML5}} +% \fileversion{} --- \filedate % % \bigskip % % {\small\copyright{} 2016--2017} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com} % -% \bigskip -% % % ^^A % \title{The \pkg{lwarp} package\thanks{This document % ^^A % corresponds to \pkg{lwarp}~\fileversion, @@ -943,20 +1068,21 @@ operating-system path separator used by \pkg{lwarp}. % % \begin{abstract} % \noindent -% The \pkg{lwarp} package allows \LaTeX\ to directly produce \htmlfive\ output, +% The \pkg{lwarp} package allows \LaTeX\ to directly produce \HTMLfive\ output, % using external utility programs only for the final conversion of text and images. -% Math may be represented by \acro{SVG} files or MathJax. +% Math may be represented by \SVG\ files or MathJax. % % Documents may be produced by \LaTeX, \LuaLaTeX, or \XeLaTeX. % A |texlua| script removes the need for system utilities such as |make| and |gawk|, % and also supports |xindy| and |latexmk|. Configuration is automatic at the % first manual compile. % -% Print and \acro{HTML} versions of each document may coexist, each with its own +% Print and \HTML\ versions of each document may coexist, each with its own % set of auxiliary files. Support files are self-generated on request. +% Assistance is provided for import into \EPUB\ conversion software and word processors. % % A modular package-loading system uses the \pkg{lwarp} version of a package for -% \acro{HTML} when available. +% \HTML\ when available. % Several dozen \LaTeX\ packages are supported with these high-level source % compatibility replacements. % @@ -1030,6 +1156,35 @@ operating-system path separator used by \pkg{lwarp}. % For a detailed list of changes, see the Change History on page \pageref{sec:changehistory}. % % \begin{description} +% \item[v0.29:] \ +% \begin{itemize} +% \item Add: |lwarpmklang| option for \pkg{lwarp-newproject} and \pkg{lwarp}. +% Sets the language to use while processing the glossary. +% \item Fix: \cs{includegraphics} when no optional arguments. +% \end{itemize} +% \item[v0.28:] \ +% \begin{itemize} +% \item \cs{HTMLauthor} \marg{name} assigns \HTML\ meta author if non-empty. +% Defaults to \cs{theauthor}. +% \item Booean |HTMLDebugComments| controls whether \HTML\ comments are +% added for closing \tag{div}s, opening and closing sections, etc. +% \item Boolean |FormatEPUB| changes \HTML\ output for easy \EPUB\ conversion +% via an external program. +% Removes per-file headers, footers, and nav. Adds footnotes per chapter/section. +% \item Boolean |FormatWordProcessor| changes \HTML\ output for easier conversion +% by a word processor. Removes headers and nav, prints footnotes per section, +% and also forces single-file output and turns off \HTML\ debug comments. +% \item Boolean |HTMLMarkFloats| adds text marks around floats only if +% |FormatWordProcessor|. These make it easier to identify float boundaries, +% which are to be manually converted to word-processor frames. +% \item Updated for the new MathJax \acro{CDN} repository. +% \item Adds \pkg{tabulary}. +% \item Supports the options syntax for \pkg{graphics}. +% \item Improved index references, now pointing exactly to their target. +% \item Adds \pkg{glossaries}. +% |lwarpmk| is modified to add |printglosssary| and |htmlglossary| actions. +% \end{itemize} +% % \item[v0.27:] \ % \begin{itemize} % \item Improved documentation for MacOS install. @@ -1037,6 +1192,7 @@ operating-system path separator used by \pkg{lwarp}. % \item Fix for table footnote paragraph tags. % \item Adds \pkg{lettrine}, \pkg{ulem}, and \pkg{soul}. % \end{itemize} +% \needspace{2\baselineskip} % \item[v0.26:] \ % \begin{itemize} % \item Improved installation instructions for MiK\TeX\ regarding generating @@ -1049,12 +1205,14 @@ operating-system path separator used by \pkg{lwarp}. % This allows the correct inclusion of |lateximage|s in footnotes, pagenotes, and endnotes. % \item \pkg{cutwin} and \pkg{floatflt} are also supported. % \end{itemize} +% \needspace{2\baselineskip} % \item[v0.25:] \ % \begin{itemize} % \item Fix: Allows \pkg{graphicx} and \pkg{graphicsx} before \pkg{lwarp} because % \XeLaTeX\ and \LuaLaTeX\ use \pkg{xunicode} which uses \pkg{graphics}. % \item Package support for \pkg{framed}, several theorem packages, and ellipses. % \end{itemize} +% \needspace{2\baselineskip} % \item[v0.24:] \ % \begin{itemize} % \item \pkg{tikz}'s |babel| library is load automatically as needed. @@ -1092,7 +1250,7 @@ operating-system path separator used by \pkg{lwarp}. % and much simpler installation and setup. % \item The |lwarp-newproject| package is now used to locally create % support files. -% \item The print and \acro{HTML} versions of a document may co-exist with their +% \item The print and \HTML\ versions of a document may co-exist with their % own sets of auxiliary files. % \item Package handling is now controlled by a modular system which % looks for and loads an |lwarp-<package>| version if available. @@ -1102,7 +1260,7 @@ operating-system path separator used by \pkg{lwarp}. % \item A large number of additional packages are supported. % \item A new tutorial is included in the documentation, and % many obsolete sections have been removed. -% \item \cs{NewHTMLdescription} sets the \acro{HTML} meta description tag for each file. +% \item \cs{NewHTMLdescription} sets the \HTML\ meta description tag for each file. % See \cref{sec:htmldescription}. % \item \cs{HTMLFileName} may now be empty, allowing filenames without a prefix. % Lwarp no longer automatically appends a |-| character. @@ -1130,7 +1288,7 @@ operating-system path separator used by \pkg{lwarp}. % \item \cs{LateximageFontSizeName} provides user-adjustable font size for math % and \env{lateximage}s. % \item \cs{minipagefullwidth} requests that the next minipage be -% full-width in \acro{HTML}, but still the assigned width in print. +% full-width in \HTML, but still the assigned width in print. % \item \env{minipage} improved side-by-side rendering. % \item CSS class |tablenotes| is provided for table note items. % \item \cs{warpprintonly} replaces \cs{rowprintedonly}, @@ -1140,14 +1298,14 @@ operating-system path separator used by \pkg{lwarp}. % the previously table-specific syntax. % \item \pkg{cleveref} is loaded \cs{AtEndPreamble} for improved reliability. % See \cref{sec:cleveref}. -% \item \cs{xfracHTMLfontsize} controls \pkg{xfrac} font size in \acro{HTML}. +% \item \cs{xfracHTMLfontsize} controls \pkg{xfrac} font size in \HTML. % \item \tikz\ improved catcode handling. % \end{itemize} % \item[v0.18:] \ % \begin{itemize} % \item The \pkg{verse} package and the verse-related commands from % the \pkg{memoir} package are now supported. -% \item Responsive web design has been improved for the sideTOC. +% \item Responsive web design has been improved for the side\TOC. % \item \cs{includegraphics} now maintains relative sized for em, ex, and \%. % \end{itemize} % \item[v0.17:] \ @@ -1167,74 +1325,78 @@ operating-system path separator used by \pkg{lwarp}. % \section{Introduction} % \changes{v0.19}{2016/05/25}{Introduction: MathJax support mentioned.} % -% The \pkg{lwarp} project aims to allow a rich \LaTeX{} document to be converted to a reasonable \acro{HTML} +% The \pkg{lwarp} project aims to allow a rich \LaTeX{} document +% to be converted to a reasonable \HTML\ % interpretation. No attempt has been made to force \LaTeX{} to provide for every -% \acro{HTML}-related possibility, and \acro{HTML} cannot exactly render every possible \LaTeX{} concept. +% \HTML-related possibility, and \HTML\ cannot exactly render every possible \LaTeX{} concept. % Where compromise is necessary, it is desirable to allow the print output to remain -% typographically rich, and compromise only in the \acro{HTML} conversion. +% typographically rich, and compromise only in the \HTML\ conversion. % -% Several ``modern'' features of \htmlfive, \cssthree, and \acro{SVG} +% Several ``modern'' features of \HTMLfive, \CSSthree, and \SVG\ % are employed to allow a fairly feature-rich document % without relying on the use of Javascript. % Limited testing on older browsers show that these new features -% degrade gracefully, although the \acro{SVG} format +% degrade gracefully, although the \SVG\ format % for math may not be available on small cell phones. % % |pdflatex|, |xelatex|, or |lualatex| is used, allowing \pkg{lwarp} to process the usual image formats. -% While generating \acro{HTML} output, \acro{SVG} files are used in placed of \acro{PDF}. -% Other formats such as \acro{JPG} are used as-is. +% While generating \HTML\ output, \SVG\ files are used in placed of \PDF. +% Other formats such as \JPG\ are used as-is. % -% \acro{SVG} images may be used for math, +% \SVG\ images may be used for math, % and are also used for \env{picture}, and \tikz{} environments, % as this format has -% better browser and e-book support than Math\acro{ML} (as of this writing), +% better browser and e-book support than \MathML\ (as of this writing), % while still allowing for the high-quality display and printing of images (again, subject to potentially % bug-ridden\footnote{Firefox has had an on-again/off-again bug for quite some time regareding -% printing \acro{SVG}s at high resolution.} browser +% printing \SVG{}s at high resolution.} browser % support). % -% Furthermore, \acro{SVG} images allow math to be presented with +% Furthermore, \SVG\ images allow math to be presented with % the same precise formatting as in the print version. % Math is accompanied by ALT tags holding the \LaTeX{} source for the expression, allowing it to be % copy/pasted into other documents.\footnote{There seems to be some debate as to whether -% Math\acro{ML} is actually an improvement over \LaTeX{} for sharing math. The author has no +% \MathML\ is actually an improvement over \LaTeX{} for sharing math. The author has no % particular opinion on the matter, except to say that in this case \LaTeX{} is much easier to implement!} % Custom \LaTeX{} macros may be used as-is in math expressions, since the math is evaluated % entirely inside \LaTeX. % % The \textsc{MathJax} JavaScript display engine may be selected -% for math display instead of using \acro{SVG} images. +% for math display instead of using \SVG\ images. % Subject to browser support and Internet access, -% MathJax allows an \acro{HTML} page to display +% MathJax allows an \HTML\ page to display % math without relying on a large number of external image files, % one per math expression. \pkg{lwarp} maintains \LaTeX\ control for cross-referencing % and equation numbering\,/\,formatting. % % \hfill\rule[.7ex]{.3\linewidth}{.4pt}\hspace*{\fill} % -% The \pkg{lwarp} package allows \LaTeX{} to directly generate \htmlfive{} tags from a \LaTeX{} +% The \pkg{lwarp} package allows \LaTeX{} to directly generate \HTMLfive\ tags from a \LaTeX{} % source document, with only minor intervention on the user's part. -% A |texlua| program called |lwarpmk| is used to process either the print or \acro{HTML} +% A |texlua| program called |lwarpmk| is used to process either the print or \HTML\ % version of the document. A few external utility programs are used to finish -% the conversion from a \LaTeX{}-generated \acro{PDF} file which happens to have \htmlfive{} tags, -% to a number of \htmlfive{} plain-text files and accompanying images. +% the conversion from a \LaTeX{}-generated \PDF\ file which happens to have \HTMLfive\ tags, +% to a number of \HTMLfive\ plain-text files and accompanying images. % % A special |lwarp-newproject| package is used to set up the auxiliary files necessary for -% the \acro{HTML} conversion. Included is a parallel version of the user's source document, -% |<sourcename>-html.tex|, which selects \acro{HTML} output and then inputs the user's own source. -% This process allows both the printed and \acro{HTML} versions to co-exist side-by-side, +% the \HTML\ conversion. Included is a parallel version of the user's source document, +% |<sourcename>-html.tex|, which selects \HTML\ output and then inputs the user's own source. +% This process allows both the printed and \HTML\ versions to co-exist side-by-side, % each with their own auxiliary files. % -% When requesting packages during \acro{HTML} conversion, +% When requesting packages during \HTML\ conversion, % |lwarp| first looks to see if it has its own modified version % to use instead of the usual \LaTeX\ version. These |lwarp-packagename.sty| files contain -% code used to emulate or replace functions for \acro{HTML} output. +% code used to emulate or replace functions for \HTML\ output. % % Enough functionality is provided to convert a typical article containing technical content. % Not every package has been tested, but many of the most useful ones are known to work, % either as-is or through emulation with replacement code. (See \cref{tab:supported} on % page \pageref{tab:supported}.) % +% Assistance is provide for modifying the \HTML\ output to suite the creation +% of \EPUB\ documents, and for modifying the \HTML\ output to ease import into +% a word processor. % % % \subsection{Supported packages and features} @@ -1270,7 +1432,7 @@ operating-system path separator used by \pkg{lwarp}. % \midrule % Sectioning: & Supported, with hyperlinks. % Honors \cmds{tocdepth} and \cmds{secnumdepth}. -% Adds \cmds{filedepth} for splitting the \acro{HTML} output. +% Adds \cmds{filedepth} for splitting the \HTML\ output. % Files may be numbered sequentially or named according to section name. % Common short words and punctuation is removed from the filenames. \\ % Table of Contents, Figures, Tables: & Supported, with hyperlinks. \\ @@ -1280,16 +1442,17 @@ operating-system path separator used by \pkg{lwarp}. % \midrule % Cross-references: & Emulated, with hyperlinks. \\ % \pkg{hyperref}: & Emulated. -% \acro{HTML} hyperlinks are generated for \acro{TOC}, \acro{LOF}, \acro{LOT}, +% \HTML\ hyperlinks are generated for \TOC, \LOF, \LOT, % \cs{nameref}, \cs{ref}, % the \pkg{cleveref} commands, and index entries.\\ % \midrule % Footnotes: & \pkg{footnote}, \pkg{footmisc}, % \pkg{marginnote}, \pkg{sidenote}, \pkg{pagenote}, \pkg{endnotes}. \\ % Indexing: & \cmds{texindy} is used, with hyperlinks. \\ +% Glossary: & \pkg{glossaries} and \cmds{xindy} are used. \\ % Bibliography: & Supported, without hyperlinks so far. \\ % \midrule -% Math: & Supported. Converted to \acro{SVG} images with \acro{HTML} \cmds{ALT} tags containing the +% Math: & Supported. Converted to \SVG\ images with \HTML\ \cmds{ALT} tags containing the % \LaTeX{} source for the math expression. % MathJax supported as an alternative. % \AmS{} environments are supported. @@ -1308,7 +1471,7 @@ operating-system path separator used by \pkg{lwarp}. % be used at the same time. % Nested tables are not supported. \\ % \pkg{array}: & Supported inside math environments, emulated elsewhere. \\ -% \pkg{multirow}: & Emulated. \\ +% \pkg{tabularx}, \pkg{tabulary}, \pkg{threeparttable}, \pkg{multirow}: & Emulated. \\ % \pkg{longtable}: & Emulated. Converted to a tabular. Captions supported. % Extra headings and \cs{kill} lines must be enclosed in % \cs{warpprintonly\{\}} \\ @@ -1317,28 +1480,26 @@ operating-system path separator used by \pkg{lwarp}. % form black rules, \cs{midrule} forms silver rules, as demonstrated on % this table. % \cs{cmidrule}, demonstrated at this line, does not use width or trim options. \\ -% \cmidrule{2-2} -% \pkg{threeparttable}: & Emulated \\ % \midrule % \pkg{graphics}, \pkg{graphicx}: & Emulated. % \cs{includegraphics} supports \cmds{width}, \cmds{height}, % \cmds{origin}, \cmds{angle}, and \cmds{scale} tags, and adds \cmds{class}. -% References to \acro{PDF} files are changed to \acro{SVG}, other image types +% References to \PDF\ files are changed to \SVG, other image types % are accepted as well. -% \cs{rotatebox} and \cs{scalebox} are supported as well as \acro{HTML} can handle. \\ +% \cs{rotatebox} and \cs{scalebox} are supported as well as \HTML\ can handle. \\ % \pkg{rotating}: & Emulated. All objects are displayed unrotated. \\ % \midrule % Lists: & Supported \\ -% \pkg{enumitem}: & Supported, although spacing is still controlled by \acro{CSS}. \\ +% \pkg{enumitem}: & Supported, although spacing is still controlled by \CSS. \\ % \midrule % Environments: & Standard \LaTeX{} environments are supported. \\ -% \pkg{picture} and \pkg{tikz}: & Converted to an \acro{SVG} image. \\ -% \env{minipage}: & Supported with some \acro{HTML}5-imposed limitations. +% \pkg{picture} and \pkg{tikz}: & Converted to an \SVG\ image. \\ +% \env{minipage}: & Supported with some \HTMLfive-imposed limitations. % Nested minipages are supported. -% Footnotes appear at the bottom of the \acro{HTML} page. \\ +% Footnotes appear at the bottom of the \HTML\ page. \\ % \pkg{fancyvrb}: & Supported except for verbatim footnotes. \\ % \pkg{framed}, \pkg{mdframed}: & Supported \\ -% \pkg{multicol}: & Emulated, with \acro{CSS}3. +% \pkg{multicol}: & Emulated, with \CSSthree. % Converted to up to three columns with an optional heading, % per browser support. Single-column if unsupported.\\ % \midrule @@ -1355,11 +1516,11 @@ operating-system path separator used by \pkg{lwarp}. % because many simpler browsers do not display them correctly. % Modern full-featured browsers re-create these ligatures on-the-fly.\\ % Horizontal space: & -% \acro{HTML} output for thin-unbreakable, unbreakable, +% \HTML\ output for thin-unbreakable, unbreakable, % \cs{enskip}, \cs{quad}, \cs{qquad}, \cs{hspace}. \\ % Rules: & \cs{rule} with width, height, raise, text color. \\ -% \acro{HTML} reserved characters: & \cs{\&}, \cs{textless}, and -% \cs{textgreater} are converted to \acro{HTML} entities. \\ +% \HTML\ reserved characters: & \cs{\&}, \cs{textless}, and +% \cs{textgreater} are converted to \HTML\ entities. \\ % \midrule % \pkg{xcolor}: & \textcolor{DarkGreen}{Supported}. % Full package color names, any color models, @@ -1383,11 +1544,11 @@ operating-system path separator used by \pkg{lwarp}. % Supported packages include everything listed in the table of contents, % plus each of the following in \cref{tab:additionalsupported}, % and probably others which have not yet been tested. -% Many are simply nullfied during \acro{HTML} output. +% Many are simply nullfied during \HTML\ output. % Others are not affected by the output mode and thus work as-is. % % -% \begin{table}[bp] +% \begin{table} % \caption{Additional supported packages} % \label{tab:additionalsupported} % \sffamily @@ -1406,7 +1567,7 @@ operating-system path separator used by \pkg{lwarp}. % These packages and features probably works with little or no change to the % user's source code. % Special environments are provided to mark blocks of code which are for -% print only, \acro{HTML} only, or both, should it be necessary. +% print only, \HTML\ only, or both, should it be necessary. % % % @@ -1415,8 +1576,8 @@ operating-system path separator used by \pkg{lwarp}. % % \section{Alternatives} % -% Summarized below are several other ways to convert a \LaTeX{} or other document to \acro{HTML}. -% Where an existing \LaTeX{} document is to be converted to \acro{HTML}, \pkg{lwarp} may be +% Summarized below are several other ways to convert a \LaTeX{} or other document to \HTML. +% Where an existing \LaTeX{} document is to be converted to \HTML, \pkg{lwarp} may be % a good choice. For new projects with a large number of documents, it may be worth % investigating the alternatives before decided which path to take. % @@ -1429,7 +1590,7 @@ operating-system path separator used by \pkg{lwarp}. % \verb+internet+ class by Andrew Stacey % (\url{https://github.com/loopspace/latex-to-internet}), % an interesting project which directly produces several versions -% of markdown, and also \acro{HTML}\ and \acro{EPUB}. +% of markdown, and also \HTML\ and \EPUB. % % % @@ -1438,21 +1599,21 @@ operating-system path separator used by \pkg{lwarp}. % \url{http://tug.org/tex4ht/}\DescribeProgram{TeX4ht} % % This system uses native \LaTeX{} processing to produce a DVI file containing special commands, -% and then uses additional post-processing for the \acro{HTML} conversion by way of numerous configuration +% and then uses additional post-processing for the \HTML\ conversion by way of numerous configuration % files. -% In some cases, \pkg{lwarp} provides a better \acro{HTML} conversion, and it +% In some cases, \pkg{lwarp} provides a better \HTML\ conversion, and it % supports a different set of packages. -% TeX4ht produces several other forms of output beyond \acro{HTML}. +% TeX4ht produces several other forms of output beyond \HTML. % % \subsection{Translators} % % \changes{v0.21}{2017/02/14}{Docs: Added TeX2page, GladTeX.} % -% These systems use external programs to translate a subset of \LaTeX{} syntax into \acro{HTML}. -% Search for each on CTAN (\url{http:\\ctan.org}). +% These systems use external programs to translate a subset of \LaTeX{} syntax into \HTML. +% Search for each on \CTAN\ (\url{http:\\ctan.org}). % \begin{description} % \item [H\textsuperscript{E}v\textsuperscript{E}a:] \url{http://hevea.inria.fr/} -% \DescribeProgram{Hevea} {\footnotesize(not on CTAN)} +% \DescribeProgram{Hevea} {\footnotesize(not on \CTAN)} % \item [T\textsubscript{T}H:] \url{http://hutchinson.belmont.ma.us/tth/} % \DescribeProgram{TtH} % \item [GELLMU:] \url{http://www.albany.edu/~hammond/gellmu/} @@ -1466,7 +1627,7 @@ operating-system path separator used by \pkg{lwarp}. % and \url{http://ctan.org/pkg/latex2html}. % \item [\TeX2page:] \url{http://ds26gte.github.io/tex2page/index.html} \DescribeProgram{TeX2page} % \end{description} -% Finally, Glad\TeX\ may used to directly insert \LaTeX\ math into \acro{HTML}: +% Finally, Glad\TeX\ may used to directly insert \LaTeX\ math into \HTML: % \begin{description} % \item [Glad\TeX:] \url{http://humenda.github.io/GladTeX/} \DescribeProgram{GladTeX} % \end{description} @@ -1475,7 +1636,7 @@ operating-system path separator used by \pkg{lwarp}. % % AsciiDoc is one of the most capable markup languages, providing enough features to produce % the typical technical-writing document with cross-references, -% and it writes \LaTeX{} and \acro{HTML}. +% and it writes \LaTeX{} and \HTML. % \begin{description} % \item [Asciidoctor:] \url{http://asciidoctor.org/} (More active.)\DescribeProgram{AsciiDoc} % \item [AsciiDoc:] \url{http://asciidoc.org/} (The original version.)\DescribeProgram{AsciiDoctor} @@ -1492,7 +1653,7 @@ operating-system path separator used by \pkg{lwarp}. % \subsection{Pandoc} % \DescribeProgram{Pandoc} % -% A markup system which also reads and writes \LaTeX{} and \acro{HTML}. +% A markup system which also reads and writes \LaTeX{} and \HTML. % \begin{description} % \item [Pandoc:] \url{http://pandoc.org/} % \end{description} @@ -1505,7 +1666,7 @@ operating-system path separator used by \pkg{lwarp}. % \DescribeProgram{Word}\DescribeProgram{LibreOffice}\DescribeProgram{OpenOffice} % have advanced through the years in their abilities % to represent math with a \LaTeX-ish input syntax, unicode math fonts, -% and high-quality output, and also generate HTML with varying success. +% and high-quality output, and also generate \HTML\ with varying success. % See recent developments in Microsoft\,\textregistered{} Word\,\textregistered{} % and LibreOffice\,\texttrademark{} Writer. % @@ -1514,7 +1675,7 @@ operating-system path separator used by \pkg{lwarp}. % Likewise, several professional systems exist whose % \DescribeProgram{Adobe} \DescribeProgram{FrameMaker} % \DescribeProgram{InDesign} \DescribeProgram{Flare} \DescribeProgram{Madcap} -% abilities have been advancing in the areas of typesetting, cross-referencing, and HTML generation. +% abilities have been advancing in the areas of typesetting, cross-referencing, and \HTML\ generation. % See Adobe\,\textregistered{} FrameMaker\,\textregistered{}, % Adobe\,\textregistered{} InDesign\,\textregistered{}, % and Madcap Flare\,\texttrademark{}. @@ -1547,9 +1708,9 @@ operating-system path separator used by \pkg{lwarp}. % % The effort required to customize the output of each markup system varies. % For print output, \LaTeX{} configuration -% files are usually used. For HTML output, a \acro{CSS} file will be available, but additional +% files are usually used. For \HTML\ output, a \CSS\ file will be available, but additional % configuration may require editing some form of control file with a different syntax, such as XML. -% In the case of \pkg{lwarp}, CSS is used, and much HTML output is adjusted +% In the case of \pkg{lwarp}, CSS is used, and much \HTML\ output is adjusted % through the usual \LaTeX{} optional macro parameters, % but further customization may require patching \LaTeX{} code. % @@ -1565,7 +1726,7 @@ operating-system path separator used by \pkg{lwarp}. % \section{Installation} % % \Cref{tab:utility} shows the tools which are used for -% the \LaTeX\ to \acro{HTML} conversion. +% the \LaTeX\ to \HTML\ conversion. % In most cases, these will be available via the % standard package-installation tools. % @@ -1609,7 +1770,7 @@ operating-system path separator used by \pkg{lwarp}. % \item[latexmk:] Optionally used by |lwarpmk| to compile \LaTeX\ code. % On a MiK\TeX\ system, Perl may need to be installed first. % -% \item[pdfcrop:] Used to pull images out of the \LaTeX{} \acro{PDF}. +% \item[pdfcrop:] Used to pull images out of the \LaTeX{} \PDF. % \DescribeProgram[requirement]{pdfcrop} % % \end{description} @@ -1618,13 +1779,13 @@ operating-system path separator used by \pkg{lwarp}. % % \begin{description} % -% \item[pdftotext:] Used to convert \acro{PDF} to text. +% \item[pdftotext:] Used to convert \PDF\ to text. % \DescribeProgram[requirement]{pdftotext}\index{Poppler} % -% \item[pdfseparate:] Used to pull images out of the \LaTeX{} \acro{PDF}. +% \item[pdfseparate:] Used to pull images out of the \LaTeX{} \PDF. % \DescribeProgram[requirement]{pdfseparate} % -% \item[pdftocairo:] Used to convert images to \acro{SVG}. +% \item[pdftocairo:] Used to convert images to \SVG. % \DescribeProgram[requirement]{pdftocairo} % % \end{description} @@ -1634,8 +1795,8 @@ operating-system path separator used by \pkg{lwarp}. % From Poppler: \url{poppler.freedesktop.org}. % % For MacOS\textregistered, see -% \url{https://brew.sh/}, install Homebrew, then enter \\ -% \hspace*{2em}|brew install poppler| +% \url{https://brew.sh/}, install Homebrew, then +% \userentry{brew install poppler} % % For Windows, see: \\ % \url{https://sourceforge.net/projects/poppler-win32/} \quad and: \\ @@ -1644,7 +1805,7 @@ operating-system path separator used by \pkg{lwarp}. % \item[Perl:] \ % % This may be provided by your operating-system package manager, and is -% required for some of the Poppler \acro{PDF} utilities. +% required for some of the Poppler \PDF\ utilities. % % \url{perl.org}, \url{strawberryperl.com} % @@ -1691,7 +1852,7 @@ operating-system path separator used by \pkg{lwarp}. % \item [CTAN TDS archive:] \pkg{lwarp} may be downloaded from the Comprehensive \TeX\ Archive: % \begin{enumerate} % \item See \url{http://ctan.org/pkg/lwarp} for the \pkg{lwarp} package. -% \item Download the TDS archive: |lwarp.tds.zip| +% \item Download the \TDS\ archive: |lwarp.tds.zip| % \item Find the \TeX\ |local| directory: % \begin{description} % \item[\TeX\ Live:] \ @@ -1699,11 +1860,13 @@ operating-system path separator used by \pkg{lwarp}. % \userentry{kpsewhich -var-value TEXMFLOCAL} % \item[MiK\TeX:] \ % -% In the ``Settings'' window, ``Roots'' tab, look for a local TDS root. +% In the ``Settings'' window, ``Roots'' tab, look for a local \TDS\ root. % \end{description} -% This should be something like: \\ -% \hspace*{2em}|/usr/local/texlive/texmf-local/| -% \item Unpack the archive in the TDS local directory. +% This should be something like: +% \begin{sourcedisplay} +% |/usr/local/texlive/texmf-local/| +% \end{sourcedisplay} +% \item Unpack the archive in the \TDS\ local directory. % \item Renew the cache: % \userentry{mktexlsr} \quad —\,or\,— % \userentry{texhash} @@ -1724,11 +1887,15 @@ operating-system path separator used by \pkg{lwarp}. % \item Create the documentation: \userentry{pdflatex lwarp.dtx} (several times) % \item Create the |.sty| files: \userentry{pdflatex lwarp.ins} % \item Copy the |.sty| files somewhere such as the \TeX\ Live local tree -% found in the previous CTAN TDS section, under the subdirectory: \\ -% \hspace*{2em}|<texlocal>/tex/latex/local/lwarp| +% found in the previous \CTAN\ \TDS\ section, under the subdirectory: +% \begin{sourcedisplay} +% |<texlocal>/tex/latex/local/lwarp| +% \end{sourcedisplay} % \item Copy the documentation |lwarp.pdf| to a |source| directory in the local tree, -% such as: \\ -% \hspace*{2em}|<texlocal>/doc/local/lwarp| +% such as: +% \begin{sourcedisplay} +% |<texlocal>/doc/local/lwarp| +% \end{sourcedisplay} % \item Renew the cache: % \userentry{mktexlsr} \quad —\,or\,— % \userentry{texhash} @@ -1740,7 +1907,7 @@ operating-system path separator used by \pkg{lwarp}. % \item Once the local version of |lwarpmk.lua| is installed, it may be made % available system-wide as per \cref{sec:installlwarpmk}. % \end{enumerate} -% \item[Project-local CTAN \texttt{.dtx} and \texttt{.ins} files:] The +% \item[Project-local \CTAN\ \texttt{.dtx} and \texttt{.ins} files:] The % |.dtx| and |.ins| files may be downloaded to a project % directory, then compiled right there, alongside the % document source files. The resultant |*.sty| and |lwarpmk.lua| files @@ -1776,7 +1943,7 @@ operating-system path separator used by \pkg{lwarp}. % Otherwise, continue with the following: % % \item Locate the file |lwarpmk.lua|, which should be in the |scripts| directory -% of the TDS tree. On a \TeX\ Live or MiK\TeX\ system you may use +% of the \TDS\ tree. On a \TeX\ Live or MiK\TeX\ system you may use % \userentry{kpsewhich lwarpmk.lua} % % (If the file is not found, you may also generate a local copy and use it instead. @@ -1787,12 +1954,16 @@ operating-system path separator used by \pkg{lwarp}. % \item [Unix:] Create a symbolic link and make it executable: % \begin{enumerate} % \item Locate the \TeX\ Live binaries: -% \userentry{kpsewhich -var-value TEXMFROOT} \\ -% This will be something like: \\ -% \hspace*{2em}|/usr/local/texlive/<year>| \\ +% \userentry{kpsewhich -var-value TEXMFROOT} +% This will be something like: +% \begin{sourcedisplay} +% |/usr/local/texlive/<year>| +% \end{sourcedisplay} % The binaries are then located in the |bin/<arch>| directory -% under the root: \\ -% \hspace*{2em}|/usr/local/texlive/<year>/bin/<architecture>/| \\ +% under the root: +% \begin{sourcedisplay} +% |/usr/local/texlive/<year>/bin/<architecture>/| +% \end{sourcedisplay} % In this directory you will find programs % such as |pdflatex| and |makeindex|. % \item In the binaries directory, @@ -1811,13 +1982,17 @@ operating-system path separator used by \pkg{lwarp}. % \end{enumerate} % \item [Windows MiK\TeX:] Create a new |lwarpmk.bat| file: % \begin{enumerate} -% \item Locate the binaries. These will be in a directory such as: \\ -% \hspace*{2em}|C:\Program Files\MiKTeX 2.9\miktex\bin\x64| \\ +% \item Locate the binaries. These will be in a directory such as: +% \begin{sourcedisplay} +% |C:\Program Files\MiKTeX 2.9\miktex\bin\x64| +% \end{sourcedisplay} % In this directory you will find programs % such as |pdflatex.exe| and |makeindex.exe|. -% \item Create a new file named |lwarpmk.bat| containing: \\ -% \hspace*{1em}{\small -% |texlua "C:\Program Files\MiKTeX 2.9\scripts\lwarp\lwarp.texlua" %*|} \\ +% \item Create a new file named |lwarpmk.bat| containing: +% \begin{sourcedisplay} +% {\footnotesize +% |texlua "C:\Program Files\MiKTeX 2.9\scripts\lwarp\lwarp.texlua" %*|} +% \end{sourcedisplay} % This will call the copy of |lwarpmk.lua| % which is in the |scripts| directory of the distribution. % \end{enumerate} @@ -1829,8 +2004,10 @@ operating-system path separator used by \pkg{lwarp}. % It is also possible to use a local version of |lwarpmk|: % \begin{enumerate} % \item When compiling the tutorial in \cref{sec:tutorial}, -% use the |lwarpmk| option for the \pkg{lwarp-newproject} package: \\ -% \hspace*{2em}|\usepackage[lwarpmk]{lwarp-newproject}| +% use the |lwarpmk| option for the \pkg{lwarp-newproject} package: +% \begin{sourcedisplay} +% |\usepackage[lwarpmk]{lwarp-newproject}| +% \end{sourcedisplay} % \item When the tutorial is compiled with |pdflatex|, the file |lwarpmk.lua| % will be generated along with the other configuration files. % \item |lwarpmk.lua| may be used for this project: @@ -1882,10 +2059,12 @@ operating-system path separator used by \pkg{lwarp}. % % The \TeX\ utilities |xindy|, |latexmk|, and |pdfcrop| may be provided by % your operating system's package manager, and are also provided by -% the CTAN archive: \\ -% \hspace*{2em}\url{http://ctan.org/pkg/xindy} \\ -% \hspace*{2em}\url{http://ctan.org/pkg/latexmk} \\ -% \hspace*{2em}\url{http://ctan.org/pkg/pdfcrop} +% the \CTAN\ archive: +% \begin{sourcedisplay} +% \url{http://ctan.org/pkg/xindy} \\ +% \url{http://ctan.org/pkg/latexmk} \\ +% \url{http://ctan.org/pkg/pdfcrop} +% \end{sourcedisplay} % % % \item [To install the Poppler utilities to a Unix/Linux system:] \ @@ -1900,7 +2079,7 @@ operating-system path separator used by \pkg{lwarp}. % \item [To install the Poppler utilities to a MacOS machine:] \ % \begin{enumerate} % \item Install Homebrew from \url{https://brew.sh/}: -% \userentry{~ \\ \hspace*{-2in}/usr/bin/ruby -e "\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"} +% \userentry{\small~ \\ \hspace*{-2in}/usr/bin/ruby -e "\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"} % \item Install the Poppler utilities: % \userentry{brew install poppler} % \end{enumerate} @@ -1918,8 +2097,10 @@ operating-system path separator used by \pkg{lwarp}. % \item Choose the "Environment Variables" button. % \item Choose the "Path" variable, then the "Edit" button. % \item Choose the "New" button to make an additional entry. -% \item Enter the |bin| directory of the Poppler utilities, such as: \\ -% \hspace*{2em}|C:\Users\<myname>\Desktop\Poppler\poppler-0.5_x86\poppler-0.5\bin| +% \item Enter the |bin| directory of the Poppler utilities, such as: +% \begin{sourcedisplay} +% |C:\Users\<myname>\Desktop\Poppler\poppler-0.5_x86\poppler-0.5\bin| +% \end{sourcedisplay} % % Be sure to include |\bin|. % \item Click "Ok" when done. @@ -1931,8 +2112,10 @@ operating-system path separator used by \pkg{lwarp}. % \item Download and install a version of Perl, such as Straweberry Perl, % to a directory without a space in its name, such as |C:\Strawberry|. % \item Edit the Path as seen above for the Poppler utilities. -% \item Enter the |bin| directory of the Perl utility, such as: \\ -% \hspace*{2em}|C:\Strawberry\perl\bin| +% \item Enter the |bin| directory of the Perl utility, such as: +% \begin{sourcedisplay} +% |C:\Strawberry\perl\bin| +% \end{sourcedisplay} % % Be sure to include |\bin|. % \item Click "Ok" when done. @@ -1940,8 +2123,9 @@ operating-system path separator used by \pkg{lwarp}. % % \end{description} % -% \vspace{1in} +% \vfill % \textcolor{red}{\textbf{Any utilities installed by hand must be added to the |PATH|.}} +% \vfill % % % @@ -1970,7 +2154,7 @@ operating-system path separator used by \pkg{lwarp}. % % A listing is in \cref{fig:tutorial}, % which may be copied/pasted from the figure directly into your own editor, -% depending on the quality of the \acro{PDF} viewer and editor, or: +% depending on the quality of the \PDF\ viewer and editor, or: % % \item [Copy from the \pkg{lwarp} documentation directory:] \ % @@ -1980,7 +2164,7 @@ operating-system path separator used by \pkg{lwarp}. % \watchout[Note: |.txt| suffix!] % % This should be in the |doc/latex/lwarp/| directory along -% with this \acro{PDF} documentation. +% with this \PDF\ documentation. % Copy |lwarp_tutorial.txt| directly into your |tutorial| directory, % renamed as |tutorial.tex|. % \end{description} @@ -2005,7 +2189,7 @@ operating-system path separator used by \pkg{lwarp}. % Whenever a print version of the document is created while the |lwarp-newproject| % package is used, the configuration files for |lwarpmk| are updated to % record the operating system, \LaTeX\ program (|pdflatex|, |xelatex|, or |lualatex|), -% the filenames of the source code and \acro{HTML} output, and whether +% the filenames of the source code and \HTML\ output, and whether % the additional helper program |latexmk| will be used to compile the document.) % % @@ -2042,7 +2226,7 @@ operating-system path separator used by \pkg{lwarp}. % % % --- HTML FILENAME AND LATEXMK SETTINGS --- % % \newcommand{\HomeHTMLFilename}{index} % Filename of the homepage. -% % \newcommand{\HTMLFileName}{node-} % Filename prefix of other pages. +% % \newcommand{\HTMLfiveName}{node-} % Filename prefix of other pages. % % \newcommand{\UseLatexmk}{true}% Uncomment to use latexmk % % % --- LWARP IS LOADED NEXT --- @@ -2059,11 +2243,11 @@ operating-system path separator used by \pkg{lwarp}. % % --- LATEX AND HTML CUSTOMIZATION --- % \title{The Lwarp Tutorial} % \author{Some Author} -% \setcounter{tocdepth}{2} % Include subsections in the TOC. +% \setcounter{tocdepth}{2} % Include subsections in the \TOC. % \setcounter{secnumdepth}{2} % Number down to subsections. -% \setcounter{FileDepth}{1} % Split HTML files at sections +% \setcounter{FileDepth}{1} % Split \HTML\ files at sections % \booltrue{CombineHigherDepths} % Combine parts/chapters/sections -% \setcounter{SideTOCDepth}{1} % Include subsections in the sideTOC +% \setcounter{SideTOCDepth}{1} % Include subsections in the side\TOC % \SetFirstPageTop{Name and \fbox{HOMEPAGE LOGO}} % \SetPageTop{\fbox{LOGO}} % \SetPageBottom{Contact Information and Copyright} @@ -2109,20 +2293,20 @@ operating-system path separator used by \pkg{lwarp}. % \caption{Files created in a new project\label{fig:newprojectfiles}} % \begin{description} % -% \item [|tutorial.pdf|:] The \acro{PDF} output from \LaTeX. +% \item [|tutorial.pdf|:] The \PDF\ output from \LaTeX. % % \item [|tutorial\_html.tex|:] A small |.tex| file used to create -% a parallel \acro{HTML} version of the document, which co-exists with usual -% the \acro{PDF} version, and which will have its -% own auxiliary files. In this way, both \acro{PDF} and \acro{HTML} +% a parallel \HTML\ version of the document, which co-exists with usual +% the \PDF\ version, and which will have its +% own auxiliary files. In this way, both \PDF\ and \HTML\ % documents may co-exist side-by-side. % % \item [Auxiliary files:] The usual \LaTeX\ files |tutorial.aux|, |tutorial.log|. -% When an \acro{HTML} version of the document is created, |_html| versions +% When an \HTML\ version of the document is created, |_html| versions % of the auxiliary files will also be generated. % % \item [|lwarpmk.conf|:] A configuration file for |lwarpmk|, -% which is used to automate the compilation of \acro{PDF} or \acro{HTML} +% which is used to automate the compilation of \PDF\ or \HTML\ % versions of the document. % % \item [|tutorial.lwarpmkconf|:] Another configuration file used by |lwarpmk|, @@ -2133,13 +2317,13 @@ operating-system path separator used by \pkg{lwarp}. % These files are standard for \pkg{lwarp}, and are not meant to be modified % by the user. % -% \item [|sample\_project.css|:] An example of a user-customized \acro{CSS} file, +% \item [|sample\_project.css|:] An example of a user-customized \CSS\ file, % which may be used for project-specific changes to the \pkg{lwarp} defaults. % % \item [|lwarp\_html.xdy|:] Used by \pkg{lwarp} while creating an index. % This file should not need to be modified by the user. % -% \item [|lwarp\_mathjax.txt|:] Inserted into the \acro{HTML} files when +% \item [|lwarp\_mathjax.txt|:] Inserted into the \HTML\ files when % |MathJax| is used to display math. % This file should not need to be modified by the user. % @@ -2153,8 +2337,10 @@ operating-system path separator used by \pkg{lwarp}. % \begin{description} % \item [|lwarpmk.lua|:] A local copy of the |lwarpmk| utility. % -% On Unix-related operating systems this file must be made executable: \\ -% \hspace*{2em} |chmod u+x lwarpmk.lua| +% On Unix-related operating systems this file must be made executable: +% \begin{sourcedisplay} +% |chmod u+x lwarpmk.lua| +% \end{sourcedisplay} % % This may be useful to have to archive with a project for future use. % \end{description} @@ -2167,7 +2353,7 @@ operating-system path separator used by \pkg{lwarp}. % \subsection{Compiling the print version with \texttt{lwarpmk}} % % The |lwarpmk| utility program is used to compile either the printed or -% the \acro{HTML} version of the document. +% the \HTML\ version of the document. % % |lwarpmk print| is used to recompile a printed version of the document. % @@ -2197,7 +2383,10 @@ operating-system path separator used by \pkg{lwarp}. % Although, when using the utility |latexmk| (introduced later), the changed date is % ignored and an actual change in contents must occur to cause a recompile.} % -% \item Process the index. +% \item Process the index.\footnote{A \texttt{lwarpmk printglossary} command is also +% available to process a glossary produced with the \textsf{glossaries} package. +% Set its language using the \texttt{lwarpmklang} option for \pkg{lwarp-newproject} +% and \pkg{lwarp}.} % \userentry{lwarpmk printindex} % % \item Recompile again to include the index. @@ -2205,7 +2394,7 @@ operating-system path separator used by \pkg{lwarp}. % % \end{enumerate} % -% Note that the \acro{HTML} customization commands are ignored while making the +% Note that the \HTML\ customization commands are ignored while making the % print version. % % @@ -2213,10 +2402,10 @@ operating-system path separator used by \pkg{lwarp}. % % \subsection{Compiling the HTML version with \texttt{lwarpmk}} % -% |lwarpmk html| is used to recompile an \acro{HTML} version of the document. +% |lwarpmk html| is used to recompile an \HTML\ version of the document. % % \begin{enumerate} -% \item Compile the \acro{HTML} version: +% \item Compile the \HTML\ version: % \userentry{lwarpmk html} % % \begin{enumerate} @@ -2224,15 +2413,15 @@ operating-system path separator used by \pkg{lwarp}. % to create \\ % |tutorial_html.pdf|. % \item |pdftotext| is then used to convert into the file |tutorial_html.html|. -% This file is a plain-text file containing \acro{HTML} tags and +% This file is a plain-text file containing \HTML\ tags and % content for the entire document. % \item |lwarpmk| manually splits |tutorial_html.html| into -% individual \acro{HTML} files according to the \acro{HTML} settings. +% individual \HTML\ files according to the \HTML\ settings. % For this tutorial, the result is |tutorial.html| (the home page), % along with |First-chapter.html|\footnote{ % \texttt{First-chapter.html} % also contains the first section, even though the second -% section is its own \acro{HTML} page. This behavior is +% section is its own \HTML\ page. This behavior is % controlled by the boolean \texttt{CombineHigherDepths}.}, % |Some-math.html|, and the document's % index in |_Index.html|.\footnote{\texttt{index.html} is commonly @@ -2247,7 +2436,7 @@ operating-system path separator used by \pkg{lwarp}. % \margintag{math} % until the % images of the math expressions have not yet been generated. Math may be -% displayed as \acro{SVG} images or by a MathJax script, as seen in +% displayed as \SVG\ images or by a MathJax script, as seen in % \cref{sec:tutorialsvgmath,sec:tutorialmathjax}. % % \item Force a recompile: @@ -2255,7 +2444,10 @@ operating-system path separator used by \pkg{lwarp}. % \userentry{lwarpmk html} % \userentry{lwarpmk print} % -% \item Process the \acro{HTML} index and recompile: +% \item Process the \HTML\ index and recompile:\footnote{A \texttt{lwarpmk htmlglossary} command is also +% available to process a glossary produced with the \textsf{glossaries} package. +% Set its language using the \texttt{lwarpmklang} option for \pkg{lwarp-newproject} +% and \pkg{lwarp}.} % \userentry{lwarpmk htmlindex} % \userentry{lwarpmk html} % @@ -2271,8 +2463,8 @@ operating-system path separator used by \pkg{lwarp}. % \subsection{Generating the SVG images} % \label{sec:tutorialsvgmath} % -% By default \pkg{lwarp} represents math as \acro{SVG} images with -% \margintag{math as \acro{SVG} images} +% By default \pkg{lwarp} represents math as \SVG\ images with +% \margintag{math as \SVG\ images} % the \LaTeX\ source included in |alt| tags. In this way, % the math displays as it was drawn by \LaTeX, and the \LaTeX\ source % may be copied and pasted into some other document. @@ -2281,7 +2473,7 @@ operating-system path separator used by \pkg{lwarp}. % \margintag{\env{picture} and \tikz} % % \begin{enumerate} -% \item Create the \acro{SVG} images: +% \item Create the \SVG\ images: % \userentry{lwarpmk limages} % \userentry{lwarpmk html} % @@ -2295,10 +2487,10 @@ operating-system path separator used by \pkg{lwarp}. % % When a math expression, |picture|, or \tikz\ environment is added or % \watchout[Adding/removing] -% removed, the \acro{SVG} images must be re-created with |lwarpmk limages| +% removed, the \SVG\ images must be re-created with |lwarpmk limages| % to maintain the proper image file sequence numbers. % -% Expressing math as \acro{SVG} images has the advantage of representing +% Expressing math as \SVG\ images has the advantage of representing % the math exactly as \LaTeX\ would, but has the disadvantage of requiring % an individual file for each math expression. % \watchout[Lots of files!] @@ -2317,10 +2509,14 @@ operating-system path separator used by \pkg{lwarp}. % \margintag{math with MathJax} % % \begin{enumerate} -% \item In the tutorial's source code, change \\ -% \hspace*{2em} |\usepackage{lwarp}| \\ -% \hspace*{3em} to \\ -% \hspace*{2em} |\usepackage[mathjax]{lwarp}| +% \item In the tutorial's source code, change +% \begin{sourcedisplay} +% |\usepackage{lwarp}| +% \end{sourcedisplay} +% to +% \begin{sourcedisplay} +% |\usepackage[mathjax]{lwarp}| +% \end{sourcedisplay} % % \item Recompile \userentry{lwarpmk html} % @@ -2363,7 +2559,7 @@ operating-system path separator used by \pkg{lwarp}. % |lwarpmk html|, and then reload the webpage. % % A customized style may also be created. -% \margintag{Custom \acro{CSS}} +% \margintag{Custom \CSS} % For each new project a file % called |sample_project.css| is generated. This may be renamed to % |<project>.css| then used by assigning |\NewCSS{<project>.css|. @@ -2376,7 +2572,7 @@ operating-system path separator used by \pkg{lwarp}. % % |<project>.css| has an entry which loads |lwarp.css|, and this % entry may be changed to load |lwarp_formal.css| or |lwarp_sagebrush.css| if -% desired. Additional changes to the \acro{CSS} may be made by making entries +% desired. Additional changes to the \CSS\ may be made by making entries % later in the |<project>.css| file. % % \clearpage @@ -2386,13 +2582,13 @@ operating-system path separator used by \pkg{lwarp}. % \index{settings>HTML conversion} % \index{HTML>conversion settings} % -% Several settings may be used to customize the \acro{HTML} output. +% Several settings may be used to customize the \HTML\ output. % Watch for the correct placement of each!\watchout[Placement!] % % Note that if changes are made, % \watchout[Changes!] % it is best to first use |lwarpmk clearall| to -% clear all the \acro{HTML}, \acro{PDF}, and auxiliary files. +% clear all the \HTML, \PDF, and auxiliary files. % Also, if \cs{HomeHTMLFilename}, \cs{HTMLFileName}, or \cs{UseLatexmk} are % changed, it is necessary to reenable the |lwarp-newproject| package and % then recompile the print version in order to recreate the configuration @@ -2406,8 +2602,10 @@ operating-system path separator used by \pkg{lwarp}. % % \ItemDescribeMacro{\HomeHTMLFilename} Filename of the homepage, without % the ``|.html|'' suffix. -% Defaults to the \cs{BaseJobname}. A common setting is: \\ -% \hspace*{2em}|\newcommand{HomeHTMLFilename}{index}| \\ +% Defaults to the \cs{BaseJobname}. A common setting is: +% \begin{sourcedisplay} +% |\newcommand{HomeHTMLFilename}{index}| +% \end{sourcedisplay} % causing the % homepage to be the file |index.html|. Underscores are allowed in % \margintag{filename underscore} @@ -2416,14 +2614,16 @@ operating-system path separator used by \pkg{lwarp}. % \index{underscore>filename}\index{file>underscore} % \changes{v0.24}{2017/03/13}{Docs: Filename underscore.} % -% \ItemDescribeMacro{\HTMLFileName} A filename prefix for the rest of the \acro{HTML} web pages. +% \ItemDescribeMacro{\HTMLfiveName} A filename prefix for the rest of the \HTML\ web pages. % Useful for numbered web pages with a common prefix. May be empty. % % \ItemDescribeMacro{\UseLatexmk} A macro which controls whether % \pkg{lwarp} uses |latexmk| to % compile the document. This setting is written to |lwarpmk|'s configuration -% files. Defaults to false. Set to true with: \\ -% \hspace*{2em}|\newcommand*{\UseLatexmk}{true}| +% files. Defaults to false. Set to true with: +% \begin{sourcedisplay} +% |\newcommand*{\UseLatexmk}{true}| +% \end{sourcedisplay} % % \end{description} % @@ -2434,40 +2634,52 @@ operating-system path separator used by \pkg{lwarp}. % \ItemDescribeCounter{tocdepth} Sectioning depth of the table of contents. % See \cref{sec:stackdepths} for a list of \LaTeX{} stack depths. % -% \ItemDescribeCounter{SideTOCDepth} Sectioning depth of the side\acro{TOC}. -% Defaults to 1, causing the sidetoc to show sections but not subsections. +% \ItemDescribeCounter{SideTOCDepth} Sectioning depth of the side\TOC. +% Defaults to 1, causing the side\TOC\ to show sections but not subsections. % % Each subpage of the website has its own small table of contents -% \margintag{sideTOC} -% on the side (the ``side\acro{TOC}''). Its depth is set by |SideTOCDepth|. -% This side\acro{TOC} is only shown if the web page is wide enough. +% \margintag{side\TOC} +% on the side (the ``side\TOC''). Its depth is set by |SideTOCDepth|. +% This side\TOC\ is only shown if the web page is wide enough. % When using a narrow web browser window, -% ``responsive web design'' is used to show the side\acro{TOC} at the top of the +% ``responsive web design'' is used to show the side\TOC\ at the top of the % page and a link back to ``Home'' at the bottom. % % \label{sec:filedepth} -% It is recommended to set: \\ -% \hspace*{.25in} |SideTOCDepth|\,=\,|FileDepth|, or \\ -% \hspace*{.25in} |SideTOCDepth|\,=\,|FileDepth|+1 +% It is recommended to set: +% \begin{sourcedisplay} +% |SideTOCDepth|\,=\,|FileDepth| +% \end{sourcedisplay} +% or +% \begin{sourcedisplay} +% |SideTOCDepth|\,=\,|FileDepth|+1 +% \end{sourcedisplay} % % If |SideTOCDepth|\,<\,|FileDepth|, web pages will be inaccessible via the -% side\acro{TOC}. \watchout +% side\TOC. \watchout % \index{file>inaccessible} % \index{page>inacessible} % \index{missing sections} % \index{section>missing} % % \ItemDescribeCounter{FileDepth} Sectioning depth of file splits. -% Defaults to -5, causing the entire \acro{HTML} website to be one single file. +% Defaults to -5, causing the entire \HTML\ website to be one single file. % \begin{itemize} -% \item To place the entire file into one \acro{HTML} page, use: \\ -% \hspace*{.25in}|\setcounter{FileDepth}{-5}}| -% \item To split the \acro{HTML} file at \cs{section} depth, use: \\ -% \hspace*{.25in}|\setcounter{FileDepth}{1}}| -% \item To ensure that the \acro{HTML} pages/files are accessible: +% \item To place the entire file into one \HTML\ page, use: +% \begin{sourcedisplay} +% |\setcounter{FileDepth}{-5}}| +% \end{sourcedisplay} +% \item To split the \HTML\ file at \cs{section} depth, use: +% \begin{sourcedisplay} +% |\setcounter{FileDepth}{1}}| +% \end{sourcedisplay} +% \item To ensure that the \HTML\ pages/files are accessible: % \watchout\\ % Place a \cs{tableofcontents} somewhere before the first section -% break (therefore in the ``home page''), and set |tocdepth|\,>=\,|FileDepth|. +% break (therefore in the ``home page''), and set +% \begin{sourcedisplay} +% |tocdepth|\,>=\,|FileDepth| +% \end{sourcedisplay} % \index{file>inaccessible} % \index{page>inacessible} % \index{missing sections} @@ -2505,49 +2717,50 @@ operating-system path separator used by \pkg{lwarp}. % derived from a sanitized version of the section names. If false, web pages % are numbered. Either way, the \cs{HTMLFileName} is prefixed. % -% Example HTML filenames: -% \changes{v0.20}{2016/09/11}{Docs: Examples for generating HTML file names.} +% Example \HTML\ filenames: +% \changes{v0.20}{2016/09/11}{Docs: Examples for generating \HTML\ file names.} % \label{sec:filenameexamples} % \margintag{HTML filenames} % \index{HTML>filename generation} % \begin{description} -% \item[Numbered HTML nodes:] \ +% \item[Numbered \HTML\ nodes:] \ % % Example: Homepage |index.html|, and |node-1|, |node-2|. % (See \cs{SetHTMLFileNumber} to number grouped by chapter, for example.) % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] % \newcommand{\HomeHTMLFileName}{index} -% \newcommand{\HTMLFileName}{node-} +% \newcommand{\HTMLfiveName}{node-} % \usepackage{lwarp} % \boolfalse{FileSectionNames} % \end{Verbatim} % -% \item[Named HTML sections, no prefix:] \ +% \item[Named \HTML\ sections, no prefix:] \ % % Example: |index.html|, and |About.html|, |Products.html| % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] % \newcommand{\HomeHTMLFileName}{index} -% \newcommand{\HTMLFileName}{} +% \newcommand{\HTMLfiveName}{} % \usepackage{lwarp} % \booltrue{FileSectionNames} % \end{Verbatim} % -% \item[Named HTML sections, with prefix:] \ +% \item[Named \HTML\ sections, with prefix:] \ % % Example: Homepage |mywebsite.html|, and additional pages such % as |mywebsite-About.html|, etc. % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] % \newcommand{\HomeHTMLFileName}{mywebsite} -% \newcommand{\HTMLFileName}{mywebsite-} +% \newcommand{\HTMLfiveName}{mywebsite-} % \usepackage{lwarp} % \booltrue{FileSectionNames} % \end{Verbatim} % \end{description} % -% \ItemDescribeMacro{\abstractname} The name of the abstract. This may also be over-written +% \ItemDescribeMacro{\abstractname} The name of the abstract. +% This may also be over-written % by the \pkg{babel} package. Defaults to ``Abstract''. % -% \ItemDescribeMacro{\MetaLanguage} The \acro{HTML} language meta header. +% \ItemDescribeMacro{\MetaLanguage} The \HTML\ language meta header. % Defaults to {en-US}. % % \ItemDescribeMacro{\SetFirstPageTop} \marg{contents} \quad @@ -2589,20 +2802,20 @@ operating-system path separator used by \pkg{lwarp}. % % \begin{description} % \ItemDescribeMacro{\NewCSS} \marg{filename.css} \quad -% Sets the \acro{CSS} file to use for the following +% Sets the \CSS\ file to use for the following % files. May be changed before each each sectioning command which would % cause a file split. % -% The \acro{CSS} styles of the web pages are set by the \cs{NewCSS} command. +% The \CSS\ styles of the web pages are set by the \cs{NewCSS} command. % If \cs{NewCSS} is not used, a default plain style is used to mimic printed % \LaTeX\ output. |lwarp_sagebrush.css| is a semi-fancy colored style as shown % in this tutorial. Change it to |lwarp_formal.css| for a more formal look, % or comment out the \cs{NewCSS} command to see the default. -% \cs{NewCSS} may be used before each file break to set the \acro{CSS} for +% \cs{NewCSS} may be used before each file break to set the \CSS\ for % individual pagess of the website. % % \ItemDescribeMacro{\NewHTMLdescription} \marg{description} \quad -% Sets the \acro{HTML} description tag for +% Sets the \HTML\ description tag for % the following files. May be changed before each each sectioning command which would % cause a file split. % \end{description} @@ -2613,14 +2826,14 @@ operating-system path separator used by \pkg{lwarp}. % \begin{description} % \ItemDescribeEnv{warpprint} An environment which is only used % while generating print output. Place here anything which does not -% apply to \acro{HTML} and which may cause problems with \pkg{lwarp}. +% apply to \HTML\ and which may cause problems with \pkg{lwarp}. % If \pkg{lwarp} knows about and emulates or supports % a package then its related macros, lengths, counters, etc. probably won't have % to be placed inside a \env{warpprint} environment, but unknown packages % may cause problems which may be isolated from \pkg{lwarp} using this environment. % % \ItemDescribeEnv{warpHTML} An environment which is only used -% while generating \acro{HTML} output. This is useful for website logos and +% while generating \HTML\ output. This is useful for website logos and % other items which have no purpose in printed output. % % \ItemDescribeMacro{\warpprintonly} \marg{contents} \quad @@ -2642,12 +2855,14 @@ operating-system path separator used by \pkg{lwarp}. % % \begin{enumerate} % \item In the tutorial's source code, at ``HTML FILENAME AND LATEXMK SETTINGS'', -% insert the line: \\ -% \hspace*{2em}|\newcommand{\UseLatexmk}{true}| +% insert the line: +% \begin{sourcedisplay} +% |\newcommand{\UseLatexmk}{true}| +% \end{sourcedisplay} % % \item Directly recompile the printed version of the document. -% \userentry{pdflatex tutorial.tex} \watchout[NOT \texttt{lwarpmk}!] \\ -% \hspace*{2em}(Or |xelatex| or |lualatex|) +% \userentry{pdflatex tutorial.tex} \watchout[NOT \texttt{lwarpmk}!] +% (Or |xelatex| or |lualatex|) % % \begin{sloppy} % \pkg{lwarp} updates its own configuration files (|lwarpmk.conf| and \newline @@ -2679,8 +2894,10 @@ operating-system path separator used by \pkg{lwarp}. % \item Remove the auxiliary files for the project: % \userentry{lwarpmk cleanall} % -% \item Be sure that \\ -% \hspace*{2em} |\usepackage{lwarp-newproject}| \\ +% \item Be sure that +% \begin{sourcedisplay} +% |\usepackage{lwarp-newproject}| +% \end{sourcedisplay} % is still enabled in |tutorial.tex|. % % \item Use |xelatex| or |lualatex| to recompile the printed version. @@ -2700,12 +2917,45 @@ operating-system path separator used by \pkg{lwarp}. % \end{enumerate} % % +% +% \clearpage +% +% \subsection{Using a glossary} +% +% \changes{v0.29}{2017/04/15}{Docs: Using a glossary} +% +% \pkg{lwarp} supports the \pkg{glossaries} package. +% +% \DescribeOption[lwarp-newproject]{lwarpmklang} +% \DescribeOption[lwarp]{lwarpmklang} +% To assign a language to be used while processing the glossary, +% use the |lwarpmklang| option: +% \index{language>glossary} +% \index{glossary>language} +% +% \begin{Verbatim}[gobble=2,frame=lines] +% \usepackage[lwarpmklang=english]{lwarp-newproject} +% \usepackage[lwarpmklang=english]{lwarp} +% \end{Verbatim} +% +% \index{glossary>processing} +% To process the glossary for the print version: +% \userentry{lwarpmk printglossary} +% +% To process the glossary for the \HTML\ version: +% \userentry{lwarpmk htmlglossary} +% +% In each case, the document will have to be recompiled afterwards. +% +% +% +% % \clearpage % % \subsection{Cleaning auxiliary files} % -% To remove the auxiliary files |.aux|, |.toc|, |.lof|, |.lot|, |.idx|, |.ind|, and -% |.log|: +% To remove the auxiliary files |.aux|, |.toc|, |.lof|, |.lot|, |.idx|, |.ind|, |.log|, +% and |.gl*|: % \userentry{lwarpmk clean} % % @@ -2724,8 +2974,10 @@ operating-system path separator used by \pkg{lwarp}. % \userentry{pdflatex project\_a} % \userentry{pdflatex project\_b} % -% Each project is given its own configuration file: \\ -% \hspace*{2em}|project_a.lwarpmkconf|, |project_b.lwarpmkconf| +% Each project is given its own configuration file: +% \begin{sourcedisplay} +% |project_a.lwarpmkconf|, |project_b.lwarpmkconf| +% \end{sourcedisplay} % % To compile each project with |lwarkmk|: % \userentry{lwarpmk print project\_a} @@ -2735,12 +2987,14 @@ operating-system path separator used by \pkg{lwarp}. % \subsection{Using the \texttt{make} utility} % % |lwarpmk| has an action which may be useful for integration with the -% common |make| utility:\\ -% \hspace*{2em}|lwarpmk pdftohtml [project]| +% common |make| utility: +% \begin{sourcedisplay} +% |lwarpmk pdftohtml [project]| +% \end{sourcedisplay} % -% |make| may be used to compile the code to \acro{PDF} with \acro{HTML} +% |make| may be used to compile the code to \PDF\ with \HTML\ % tags (|project_html.pdf|), then |lwarpmk| may be used to -% convert each target to \acro{HTML} files. +% convert each target to \HTML\ files. % % % \clearpage @@ -2759,8 +3013,8 @@ operating-system path separator used by \pkg{lwarp}. % \changes{v0.16}{2016/04/08}{Docs: Font and UTF-8 support.} % \changes{v0.16}{2016/04/08}{Lwarp no longer selects fonts.} % -% \pkg{lwarp} uses |pdftotext| to convert \acro{PDF} output into UTF-8-encoded -% text. This process requires that UTF-8 information be embedded in the \acro{PDF} +% \pkg{lwarp} uses |pdftotext| to convert \PDF\ output into UTF-8-encoded +% text. This process requires that UTF-8 information be embedded in the \PDF\ % file, which usually prevents the use of bit-mapped fonts. % \index{font>bitmapped} % @@ -2770,10 +3024,14 @@ operating-system path separator used by \pkg{lwarp}. % \margintag{Computer Modern}% % \index{font>Computer Modern}\index{Computer Modern}% % \watchout% -% so simply add \\ -% \hspace*{.25in}|usepackage{lmodern}| \\ -% to the preamble to enable the related vector font instead, or use\\ -% \hspace*{.25in}|\usepackage{dejavu}| +% so simply add +% \begin{sourcedisplay} +% |usepackage{lmodern}| +% \end{sourcedisplay} +% to the preamble to enable the related vector font instead, or use +% \begin{sourcedisplay} +% |\usepackage{dejavu}| +% \end{sourcedisplay} % % \index{Deja Vu}% % \index{font>Deja Vu}% @@ -2801,7 +3059,7 @@ operating-system path separator used by \pkg{lwarp}. % \medskip % \pkg{lwarp} sets the following to turn off \TeX{} ligatures during % \margintag{ligatures} -% the generation of \acro{HTML} tags, and turn off common ligatures +% the generation of \HTML\ tags, and turn off common ligatures % in regular text, since older browsers may not display them correctly % and newer browsers can automatically re-create them. % \index{ligatures}\index{font>ligatures} @@ -2836,7 +3094,7 @@ operating-system path separator used by \pkg{lwarp}. % to turn off f,q,t,T,Q ligatures for the same % \margintag{ligatures} % browser-related reasons shown above. Also, the monospaced font is used -% during \acro{HTML} tag generation to turn off \TeX{} ligatures. +% during \HTML\ tag generation to turn off \TeX{} ligatures. % \index{ligatures}\index{font>ligatures} % \end{itemize} % \end{itemize} @@ -2859,14 +3117,14 @@ operating-system path separator used by \pkg{lwarp}. % \DescribeOption[lwarp]{warpprint} % \DescribeOption[lwarp]{warpHTML} % Select the |warpprint| option to generate print output (default), -% or the |warpHTML| option to generate \htmlfive{} output. +% or the |warpHTML| option to generate \HTMLfive{} output. % The default is print output, so the print version may be % compiled with the usual |pdflatex|, etc. % When \pkg{lwarp-newproject} is loaded in print mode, it creates % |<project>_html.tex|, which sets the |warpHTML| option before calling % the user's source code |<project>.tex|. In this way, |<project>.tex| % can |\usepackage{lwarp}| without any options to create a printed version, -% while |<project>_html.tex| will create an HTML version. +% while |<project>_html.tex| will create an \HTML\ version. % % \DescribeOption[lwarp]{mathsvg} % \DescribeOption[lwarp]{mathjax} @@ -2888,20 +3146,20 @@ operating-system path separator used by \pkg{lwarp}. % % The following environments and macros are used to select actions which only apply % to either traditional \LaTeX{} print-formatted PDF generation, -% or to \acro{HTML} generation. +% or to \HTML\ generation. % % For most of built-in \LaTeX\ and many additional packages % there is user-level source code support or emulation, % so no special handling will be required. % For those cases which \pkg{lwarp} does not handle by itself, the % following environments and macros may be used to isolate sections -% of code for print-only or \acro{HTML}-only. +% of code for print-only or \HTML-only. % % These environments are also useful for creating a special version of -% the titlepage for print and another for \acro{HTML}. +% the titlepage for print and another for \HTML. % \DescribeEnv{warpHTML} -% Anything which is to be done only for \htmlfive{} output +% Anything which is to be done only for \HTMLfive{} output % is surrounded by a |warpHTML| environment: % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] % \begin{warpHTML} @@ -2928,7 +3186,7 @@ operating-system path separator used by \pkg{lwarp}. % \end{Verbatim} % % -% Macros are also provided for print-only or \acro{HTML}-only code: +% Macros are also provided for print-only or \HTML-only code: % % \DescribeMacro{\warpprintonly} \marg{actions} % @@ -2936,7 +3194,7 @@ operating-system path separator used by \pkg{lwarp}. % % \DescribeMacro{\warpHTMLonly} \marg{actions} % -% Performs the given actions only when \acro{HTML} output is being generated. +% Performs the given actions only when \HTML\ output is being generated. % % % @@ -2947,7 +3205,7 @@ operating-system path separator used by \pkg{lwarp}. % % Certain print-related commands should always be placed % inside a \env{warpprint} environment, or may need other special handling. -% These are unrelated to \acro{HTML} output, but are hard to isolate automatically. +% These are unrelated to \HTML\ output, but are hard to isolate automatically. % For example: % % \begin{itemize} @@ -2959,7 +3217,7 @@ operating-system path separator used by \pkg{lwarp}. % \end{itemize} % % Some packages require additional setup commands. Where these packages are emulated -% for \acro{HTML}, setup commands may work for the emulated \acro{HTML} output as well as for print +% for \HTML, setup commands may work for the emulated \HTML\ output as well as for print % output. See the details for each package in this document for more information. % % Also see \cref{sec:troubleshooting}: \nameref{sec:troubleshooting}. @@ -2969,14 +3227,14 @@ operating-system path separator used by \pkg{lwarp}. % \label{sec:successfulcommands} % \index{HTML>commands for a successful conversion} % -% \changes{v0.14}{2016/03/26}{Docs: Commands for a successful HTML conversion.} +% \changes{v0.14}{2016/03/26}{Docs: Commands for a successful \HTML\ conversion.} % % Some commonly-used \LaTeX{} expressions should be modified to allow -% for a smooth conversion to both \acro{HTML} and print-formatted outputs: +% for a smooth conversion to both \HTML\ and print-formatted outputs: % % \begin{description} % -% \item [Page references:] The printed page does not translate to the \acro{HTML} +% \item [Page references:] The printed page does not translate to the \HTML\ % page, so references to page numbers are converted to parentheses containing % \cs{pagerefPageFor}, which defaults to ``see '', % followed by a hyperlink to the appropriate @@ -3002,8 +3260,10 @@ operating-system path separator used by \pkg{lwarp}. % % Escape underscores in % \margintag{filename underscore} -% the filenames: \\ -% \hspace*{2em}|\item[\href{file\_name.pdf}{text}]| +% the filenames: +% \begin{sourcedisplay} +% |\item[\href{file\_name.pdf}{text}]| +% \end{sourcedisplay} % \index{underscore>filename}\index{file>underscore} % \changes{v0.24}{2017/03/13}{Docs: Filename underscore.} % @@ -3012,12 +3272,12 @@ operating-system path separator used by \pkg{lwarp}. % Place side-by-side minipages inside a |center| environment, % with horizontal space between them, such as \cs{quad}, \cs{qquad}, % \cs{hspace}, or \cs{hfill}. The result is similar in print and -% \acro{HTML}. Do not use space commands at the start or end of the line. +% \HTML. Do not use space commands at the start or end of the line. % % \item [\cs{fbox} around a minipage:] ~ % % \cs{fbox} can only be used around inline items during -% \acro{HTML} output. +% \HTML\ output. % % For an \cs{fbox} around a minipage, you may: % \index{fbox>around a minipage} @@ -3029,7 +3289,7 @@ operating-system path separator used by \pkg{lwarp}. % ^^A \item Use the \env{example} or \env{sidebar} environments. % \item Use a custom environment to create a sidebar, % containing a \env{BlockClass} environment -% with custom \acro{CSS} formatting, +% with custom \CSS\ formatting, % and |\warpprintonly{\hrule}| command: % \begin{Verbatim}[gobble=2,frame=lines] % \begin{BlockClass}{frameminipage}% ignored in print output @@ -3062,7 +3322,7 @@ operating-system path separator used by \pkg{lwarp}. % \published{Optional Journal Name \\ Optional multiple lines} % \end{Verbatim} % -% The title is used in the meta tags in the \acro{HTML} files, and the rest are used +% The title is used in the meta tags in the \HTML\ files, and the rest are used % in |\maketitle|. % % @@ -3082,40 +3342,40 @@ operating-system path separator used by \pkg{lwarp}. % \DescribeMacro{\title} \marg{title} % Avoid newlines in the |\title|; these will interfere with the -% file break and \acro{CSS} detection. +% file break and \CSS\ detection. % \watchout % Use the |\subtitle| command instead. -% In \acro{HTML}, the title will appear in a heading |h1|. +% In \HTML, the title will appear in a heading |h1|. % % \DescribeMacro{\author} \marg{author} % % In |\author|, use |\protect| before formatting commands such as |\textsc|. % \watchout -% In \acro{HTML}, the author will appear in a \tag{div} class |author|. +% In \HTML, the author will appear in a \tag{div} class |author|. % \cs{affiliation} is a new addition to \pkg{lwarp}. % % \DescribeMacro{\date} \marg{date} % % |\date| works as expected. -% In \acro{HTML}, this will appear in a \tag{div} class |titledate|. +% In \HTML, this will appear in a \tag{div} class |titledate|. % % \DescribeMacro{\subtitle} \marg{subtitle} % % A new command which sets a subtitle. Newlines are allowed. % The default is empty. -% In \acro{HTML}, this will appear in a \tag{div} class |subtitle|. +% In \HTML, this will appear in a \tag{div} class |subtitle|. % % \DescribeMacro{\published} \marg{published} % % A new command which sets a publisher. % The default is empty. -% In \acro{HTML}, this will appear in a \tag{div} class |published|. +% In \HTML, this will appear in a \tag{div} class |published|. % % % \DescribeMacro{\thanks} \marg{text} % % \cs{thanks} are allowed in the titlepage fields, and will be rendered -% as \acro{HTML} notes at the bottom of the title page. +% as \HTML\ notes at the bottom of the title page. % % % \subsection{HTML page meta descriptions} @@ -3127,7 +3387,7 @@ operating-system path separator used by \pkg{lwarp}. % \DescribeMacro{\NewHTMLdescription} \marg{A description of the web page.} % \quad The default is no description. % -% Each page of \acro{HTML} output should have its own \acro{HTML} meta description, +% Each page of \HTML\ output should have its own \HTML\ meta description, % which usually shows up in web search results, % \margintag{limitations} % is limited to around @@ -3139,25 +3399,36 @@ operating-system path separator used by \pkg{lwarp}. % and also just before each sectioning command such as \cs{chapter} or \cs{section} % where a new file will be generated, depending on |FileDepth|. For example, if |FileDepth| is 1, % use \cs{NewHTMLdescription} just before each \cs{section} command, and that description will be -% placed inside the \acro{HTML} page for that \cs{section}. The same descrition will be used for -% all following \acro{HTML} files as well, until reset by a new \cs{NewHTMLdescription}. It is best -% to use a unique description for each \acro{HTML} file. +% placed inside the \HTML\ page for that \cs{section}. The same descrition will be used for +% all following \HTML\ files as well, until reset by a new \cs{NewHTMLdescription}. It is best +% to use a unique description for each \HTML\ file. % -% To disable the generation of \acro{HTML} description meta tags, +% To disable the generation of \HTML\ description meta tags, % \margintag{disabling} % use:\\ % \hspace*{1em} |\NewCSSdescription{}| % % +% \subsection{HTML page meta author} +% +% \index{HTML>meta tag>author} +% \index{author>HTML meta tag} +% \index{meta tag, HTML>author} +% \DescribeMacro{\HTMLauthor} \marg{author} \quad Sets the contents +% of the web page \tag{meta name="author"} tag. +% Defaults to |\HTMLauthor{\theauthor}|. +% May be set empty to cancel the meta author tag. +% +% % \subsection{CSS} % % \label{sec:projectcss} % \DescribeFile{lwarp.css}\DescribeFile{project.css}\DescribeFile{sample_project.css}\label{sec:lwarpcss}It is best -% to make a local project-specific \acro{CSS} file such as |project.css|, containing only +% to make a local project-specific \CSS\ file such as |project.css|, containing only % things which are different from |lwarp.css|. % |project.css| should refer to |lwarp.css| as follows: % \index{CSS>project-specific changes}\index{CSS>lwarp.css} -% \index{settings>\acro{CSS} project-specific} +% \index{settings>\CSS\ project-specific} % \vspace{-2ex} % \VerbatimInput[frame=lines]{sample_project.css} % @@ -3166,10 +3437,10 @@ operating-system path separator used by \pkg{lwarp}. % \label{sec:setcss} % % \DescribeMacro{\NewCSS} -% For each section at which \acro{HTML} files are split, -% |\NewCSS| may be used before the sectioning command to select a \acro{CSS} file for that and all +% For each section at which \HTML\ files are split, +% |\NewCSS| may be used before the sectioning command to select a \CSS\ file for that and all % following sections. This may be changed numerous times throughout the file, resulting in -% different \acro{HTML} pages having different \acro{CSS} files assigned. +% different \HTML\ pages having different \CSS\ files assigned. % \index{CSS>file selection} % \index{CSS>per HTML page} % \index{settings>CSS selection} @@ -3217,6 +3488,11 @@ operating-system path separator used by \pkg{lwarp}. % \limitstabular % % +% \subsubsection{Longtable} +% +% \limitslongtable +% +% % \subsubsection{Save Boxes} % % \changes{v0.27}{2017/04/04}{Docs: Limitations of saveboxes.} @@ -3299,6 +3575,12 @@ operating-system path separator used by \pkg{lwarp}. % \limitsbabeltwo % % +% \subsubsection{\pkg{glossaries} package} +% +% \DescribePackage{glossaries} +% \limitsglossaries +% +% % \subsubsection{\pkg{enumitem} package} % % \DescribePackage{enumitem} @@ -3312,11 +3594,196 @@ operating-system path separator used by \pkg{lwarp}. % % % -% \section{Expanding the code base} +% +% +% \clearpage +% +% \section{EPUB conversion} +% \label{sec:epub} +% +% \pkg{lwarp} does not produce \EPUB\ documents, +% but it may be told to modify its \HTML\ output +% to greatly assist in the conversion. +% An external program may then be used to finish the conversion +% to \EPUB. +% +% To assign the author's name for regular \pkg{lwarp} \HTML\ +% \margintag{\tag{meta} author} +% files, and also for the \EPUB, +% use \cs{HTMLauthor} \marg{name}. This assigns the name to the +% \tag{meta} author tag. It may be set empty, and it defaults to +% \cs{theauthor}. +% +% A special boolean is provided to simplify the process of +% converting \pkg{lwarp} \HTML\ output to \EPUB: +% +% \DescribeBoolean{FormatEPUB} +% \begin{docsidebar} +% \raggedright +% Default false. +% |FormatEPUB| changes \HTML\ output for easy \EPUB\ conversion +% via an external program. Removes per-file headers, footers, and nav. +% Adds footnotes per chapter/section. +% \end{docsidebar} +% \index{EPUB>HTML conversion settings} +% \index{HTML>conversion settings>EPUB} +% +% To help convert \pkg{lwarp} \HTML\ output to \EPUB, add +% \begin{sourcedisplay} +% |\booltrue{FormatEPUB}| +% \end{sourcedisplay} +% to the project's source preamble after |\usepackage{lwarp}|. +% The \EPUB\ version of the document cannot co-exist with the +% regular \HTML\ version, so \userentry{lwarpmk cleanall} then +% \userentry{lwarpmk html} +% to recompile with the |FormatEPUB| boolean turned on. +% Several changes are then made to the \HTML\ output: +% \begin{itemize} +% \item Headers, footers, and navigation are removed at file splits. +% \item Any accumulated footnotes are printed at the bottom of each file split. +% \end{itemize} +% +% The resulting files will be ready to be loaded into an \EPUB\ conversion +% program, such as the open-source program Calibre (\url{https://calibre-ebook.com/}). +% \index{Calibre}\index{EPUB>conversion software}\margintag{Calibre} +% +% The \EPUB\ conversion program must know what order the files are included. +% For \pkg{lwarp} projects, set the \EPUB\ conversion software to +% \watchout[search order] +% do a breadth-first search of the files. +% For Calibre, this option is found in +% \begin{UIdisplay} +% \textsf{Preferences $\to$ Plugins $\to$ File type plugins $\to$ HTML to Zip} +% \end{UIdisplay} +% Check the box \textsf{Add linked files in breadth first order.} +% +% The \EPUB-conversion program must also know where the section breaks are located. +% \watchout[section breaks] +% For a list of \pkg{lwarp}'s section headings, +% see \cref{tab:depthsheadings}. +% For example, an |article| +% class document would break at \cs{section}, which is mapped to \HTML\ +% heading level \tag{h4}, whereas a |book| class document would break at \cs{chapter}, +% which is \HTML\ heading level \tag{h3}. +% For Calibre, this option is found in +% \begin{UIdisplay} +% \textsf{Preferences $\to$ Conversion (Common Options) $\to$ +% Structure Detection $\to$ Detect chapters at (XPath expression)} +% \end{UIdisplay} +% Select the ``magic wand'' to the right of this entry box, and set +% the first entry +% \begin{UIdisplay} +% Math HTML tags with tag name: +% \end{UIdisplay} +% to \tag{h4}. (Or \tag{h3} for document classes with \cs{chapter}s.) +% The \textsf{Detect chapters at} field should then show +% \begin{UIdisplay} +% //h:h4 \qquad \textrm{---\,or\,---} \qquad //h:h3 +% \end{UIdisplay} +% +% This option is also available on the main tool bar at the \textsf{Convert books} +% button. +% +% Once these settings have been made, the \pkg{lwarp}-generated \HTML\ files +% may be loaded by Calibre, and then converted to an \EPUB. +% +% \begin{docsidebar}[MathJax support] +% MathJax may be used in \EPUB\ documents. +% Some e-readers include MathJax, but any given reader +% may or may not have a recent version, and may or may not include +% extensions such as support for \pkg{siunitx}. +% +% \pkg{lwarp} adds some modifications to \MathML\ to support equations numbered +% by chapter. These modifications may not be compatible with the e-reader's +% version of MathJax, so \pkg{lwarp} requests that a known version be loaded +% instead. In some cases chapter numbering of equations still doesn't work. +% +% Until math support in \EPUB\ documents is improved, it is recommended to use +% \SVG\ images instead of MathJax, especially for equations numbered by chapter, +% or where \pkg{siunitx} support is important. +% \end{docsidebar} +% +% +% +% +% \clearpage +% +% \section{Word-processor conversion} +% +% \pkg{lwarp} may be told to modify its \HTML\ output to make it +% easier to import the \HTML\ document into a word processor. +% At the time of this writing, it seems that LibreOffice works best at +% preserving table layout, but it still has some limitations, such as +% an inability to automatically assign figure and table +% frames and captions according to user-selected \HTML\ classes. +% \pkg{lwarp} provides some assistance in locating these frame boundaries, +% as shown below. +% +% +% A special boolean is provided to simplify the process of +% converting \pkg{lwarp} \HTML\ output to \EPUB: +% +% \DescribeBoolean{FormatWordProcessor} +% \begin{docsidebar} +% \raggedright +% Default false. +% Changes \HTML\ output for easier conversion +% by a word processor. +% Removes headers and nav, prints footnotes per section, +% and also forces single-file output and turns off \HTML\ debug +% comments. +% \end{docsidebar} +% \index{word processor>HTML conversion settings} +% \index{HTML>conversion settings>word processor} +% +% To help modify \pkg{lwarp} \HTML\ output for easier +% import to a word processor, add +% \begin{sourcedisplay} +% |\booltrue{FormatWordProcessor}| +% \end{sourcedisplay} +% to the project's source preamble after \pkg{lwarp} is loaded. +% Several changes are then made to the \HTML\ output: +% \begin{itemize} +% \item Headers, footers, and navigation are removed at file splits. +% \item Any accumulated footnotes are printed at the bottom of each file split. +% These will have to be manually moved to their proper place in +% the document. \pkg{lwarp} does not know where the page breaks +% will be in the word processor's document, so the footnotes are +% simply moved to the end of each sectional break. +% \item Forces single-file output. +% \item Turns off \HTML\ debugging comments. +% These are comments appearing inside the \HTML\ code, +% marking the opening/closing of sections and \tag{div}s, +% but they are no longer useful when the document has been +% imported into a word processor. +% \end{itemize} +% +% An additional boolean may be set to help mark float boundaries: +% +% \DescribeBoolean{HTMLMarkFloats} +% \begin{docsidebar} +% \raggedright +% Default true. +% Adds |=== table begin| or |=== figure begin|, and |=== end| +% around floats while formatting for word processors. +% This helps identify boundaries of floats to be manually converted +% to word-processor frames. +% \end{docsidebar} +% \index{word processor>HTML conversion settings} +% \index{HTML>conversion settings>word processor} +% +% When enabled, markers are placed around each float, helping the +% user to identify float boundaries for further conversion to +% word processor frames and captions. +% +% +% \clearpage +% +% \section{Modifying \protect\pkg{lwarp}} % \pagestyle{pageheadfoot} % % Purely text-based packages probably will work as-is when generating -% \acro{HTML}. +% \HTML. % % Look to existing code for ideas on how to expand into new code. % @@ -3324,26 +3791,26 @@ operating-system path separator used by \pkg{lwarp}. % with an image of the resulting \LaTeX{} output. % See \cref{sec:picture} for an example of the |picture| environment. % -% To create a custom \acro{HTML} block or inline \acro{CSS} class, +% To create a custom \HTML\ block or inline \CSS\ class, % see \cref{sec:highlevelclasses}. % -% \subsection{Creating an lwarp version of a package} +% \subsection{Creating an \protect\pkg{lwarp} version of a package} % -% When creating \acro{HTML}, +% When creating \HTML, % \pkg{lwarp} redefines the \cs{usepackage} and \cs{RequirePackage} % macros such that it first looks to see if a |lwarp-<packagename>.sty| % version exists. If so, the \pkg{lwarp} version is used instead. % This modular system allows users to create their own -% versions of packages for \pkg{lwarp} to use for \acro{HTML}, simply by creating +% versions of packages for \pkg{lwarp} to use for \HTML, simply by creating % a new package with a |lwarp-| prefix. If placed in the local % directory along with the source code, it will be seen by that project % alone. If placed alongside the other |lwarp-| packages where \TeX\ % can see it, then the user's new package will be seen by any documents % using \pkg{lwarp}. (Remember |mktexlsr| or |texhash|.) % -% An |lwarp-<packagename>.sty| package is only used during \acro{HTML} +% An |lwarp-<packagename>.sty| package is only used during \HTML\ % generation. Its purpose is to pretend to be the original package, -% while modify anything necessary to create a successful \acro{HTML} conversion. +% while modify anything necessary to create a successful \HTML\ conversion. % For many packages it is sufficient to simply provide nullified macros, % lengths, counters, etc. for anything which the original package does, % while passing the raw text on to be typeset. See the pre-existing @@ -3356,18 +3823,18 @@ operating-system path separator used by \pkg{lwarp}. % In many of these packages, most of the new definitions have a ``local'' prefix % according to the package name, and |@| characters inside the name, % which hides these names from the user. In most cases these macros -% will not need to be emulated for \acro{HTML} output. Only the ``user-facing'' +% will not need to be emulated for \HTML\ output. Only the ``user-facing'' % macros need to be nullified or emulated. % % Each |lwarp-| package should first call either \cs{LWR@ProvidesPackageDrop} % or \cs{LWR@ProvidesPackagePass}. If |Drop|ped, the original print-version % package is ignored, and only the |lwarp-| version is used. -% Use this where the original print version is useless for \acro{HTML}. +% Use this where the original print version is useless for \HTML. % If |Pass|ed, the original package is loaded first, with the user-supplied options, % then the |lwarp-| version continues loading as well. % See \cref{sec:ntheorem} (\nameref{sec:ntheorem}) % for an example of selectively disabling user options for a package. -% Use this when \acro{HTML} +% Use this when \HTML\ % output only requires some modifications of the original package. % For a case where the original package is usable without changes, there is no % need to create a |lwarp-| version. @@ -3378,8 +3845,8 @@ operating-system path separator used by \pkg{lwarp}. % \changes{v0.25}{2017/03/22}{Docs: Testing \protect\pkg{lwarp}.} % % When changes have been made, test the print output before testing the -% \acro{HTML}. The print output compiles faster, and any errors in the printed -% version will be easier to figure out than the \acro{HTML} version. +% \HTML. The print output compiles faster, and any errors in the printed +% version will be easier to figure out than the \HTML\ version. % % The package \pkg{lwarp-newproject} must be loaded to set up the configuration % files, but may be commented out from then on unless the configuration changes. @@ -3389,13 +3856,67 @@ operating-system path separator used by \pkg{lwarp}. % printed version of the document, and when \pkg{lwarp-newproject} is enabled. % % Sometimes it is worth checking the |<project>_html.pdf| file, which is the -% \acro{PDF} containing \acro{HTML} tags. Also, |<project>_html.html| has +% \PDF\ containing \HTML\ tags. Also, |<project>_html.html| has % the text conversion of these tags, before the file is split into individual -% \acro{HTML} files. +% \HTML\ files. % % It is also worth checking the browser's tools for verifying the correctness -% of \acro{HTML} and \acro{CSS} code. +% of \HTML\ and \CSS\ code. +% +% +% \subsection{Modifying \protect\texttt{lwarpmk}} +% +% \changes{v0.28}{2017/04/14}{Docs: Modfying lwarpmk and index processing.} +% +% \DescribeProgram{lwarpmk} +% \DescribeFile{lwarpmk.lua} +% In most installations, |lwarpmk.lua| is an executable file located somewhere +% \index{lwarpmk>customizing} +% the operating system knows about, and it is called by typing ``|lwarpmk|'' into +% a terminal. +% +% A project-local copy of |lwarpmk.lua| may be generated, modified, and then used to +% compile documents: +% \begin{enumerate} +% \item Add the |lwarpmk| option to the \pkg{lwarp-newproject} package. +% \item Recompile the printed version of the document. +% The |lwarpmk| option causes \pkg{lwarp-newproject} to create a local +% copy of |lwarpmk.lua| +% \item The |lwarpmk| option may now be removed from the \pkg{lwarp-newproject} package. +% \item Copy and rename |lwarpmk.lua| to a new file such as |mymake.lua|. +% \item Modify |mymake.lua| as desired. +% \item If necessary, make |mymake.lua| executable. +% \item Use |mymake.lua| instead of |lwarpmk.lua|. +% \end{enumerate} +% +% To adjust the command-line arguments for compiling the document, +% look in |mymake.lua| for ``|latexname|''. % +% To adjust the command-line arguments for processing the index, +% look for ``|xindy|''. +% +% +% \subsection{Modifying \protect\texttt{xindy} index processing} +% +% \DescribeProgram{xindy} +% \DescribeFile{lwarp_html.xdy} +% \index{lwarp\_html.xdy>customizing} +% \index{xindy>customizing} +% \pkg{lwarpmk} uses the file |lwarp_html.xdy| to process the index. +% This file is over-written by \pkg{lwarp-newproject} whenever a print version of +% the document is processed. +% +% To customize index processing: +% \begin{enumerate} +% \item Copy |lwarp_html.xdy| to a new filename such as |projectname.xdy| +% \item Make changes to |projectname.xdy| +% \item Make a new version of |lwarpmk|, as previously described, +% which uses |xindy| with |projectname.xdy| instead of |lwarp_html.xdy|. +% \end{enumerate} +% +% +% +% \clearpage % % \section{Troubleshooting} % \label{sec:troubleshooting} @@ -3417,19 +3938,19 @@ operating-system path separator used by \pkg{lwarp}. % % \item [Text is not converting:] ~ % \begin{itemize} -% \item Font-related UTF-8 information must be embedded in the \acro{PDF} file. +% \item Font-related UTF-8 information must be embedded in the \PDF\ file. % See \cref{sec:fonts} regarding vector fonts. % \end{itemize} % -% \item [Undefined HTML settings:] \ -% \item See the warning regarding the placement of the \acro{HTML} settings +% \item [Undefined \HTML\ settings:] \ +% \item See the warning regarding the placement of the \HTML\ settings % at \cref{sec:htmlsettings}. % % \item [Obscure error messages:] ~ % \begin{itemize} % \item Be sure that a print version of the document compiles and % that your document's \LaTeX{} code is correct, before attempting -% to generate an \acro{HTML} version. +% to generate an \HTML\ version. % \end{itemize} % % \item [Missing sections:] ~ @@ -3439,8 +3960,8 @@ operating-system path separator used by \pkg{lwarp}. % and the use of \cs{tableofcontents} in the home page. % \end{itemize} % -% \item [Missing HTML files:] \ -% \item See the warning regarding changes to the \acro{HTML} settings +% \item [Missing \HTML\ files:] \ +% \item See the warning regarding changes to the \HTML\ settings % at \cref{sec:htmlsettings}. % % \item [Missing / incorrect cross-references:] ~ @@ -3462,7 +3983,7 @@ operating-system path separator used by \pkg{lwarp}. % the captions |above| or |below| to match their use in the source code. % \end{description} % -% \item [Print document contains HTML tags:] ~ +% \item [Print document contains \HTML\ tags:] ~ % \begin{itemize} % \item Be sure that the document % selects |\usepackage[warpprint]{lwarp}| instead of |[warpHTML]|. @@ -3487,14 +4008,14 @@ operating-system path separator used by \pkg{lwarp}. % % \item [Plain-looking document:] ~ % \begin{itemize} -% \item The document's \acro{CSS} stylesheet may not be available, or may be +% \item The document's \CSS\ stylesheet may not be available, or may be % linked incorrectly. Verify any \cs{NewCSS} statements point to -% a valid \acro{CSS} file. +% a valid \CSS\ file. % \end{itemize} % % \item [Broken fragments of HTML:] ~ % \begin{itemize} -% \item Check the \acro{PDF} file used to create \acro{HTML} +% \item Check the \PDF\ file used to create \HTML\ % to see if the tags overflowed the margin. % (This is why such large page size and margins are used.) % \end{itemize} @@ -3505,9 +4026,9 @@ operating-system path separator used by \pkg{lwarp}. % You may have been looking at an older version of the document. % If you changed a section name, you may have been looking at % the file for the old name. -% \item See the warning regarding changes to the \acro{HTML} settings +% \item See the warning regarding changes to the \HTML\ settings % at \cref{sec:htmlsettings}. -% \item Verify that the proper \acro{CSS} is actually being used. +% \item Verify that the proper \CSS\ is actually being used. % \item The browser may compensate for some subtle changes, such as % automatically generating ligatures, reflowing text, etc. % \end{itemize} @@ -3575,15 +4096,15 @@ operating-system path separator used by \pkg{lwarp}. % The author is open to ideas and suggestions. % % Packages were patched for re-use where they provided significant functionality. -% Examples include \pkg{xcolor} with its color models and conversion to \acro{HTML} +% Examples include \pkg{xcolor} with its color models and conversion to \HTML\ % color output, and \pkg{siunitx} which provides many number and unit-formatting % options, almost all of which are available in pure-text form, and thus % easily used by \cmds{pdftotext}. % % Packages were emulated where their primary purpose was visual formatting which is not -% relevent to \acro{HTML} output. For example, packages related to sectioning +% relevent to \HTML\ output. For example, packages related to sectioning % are already patched by numerous other packages, creating a difficult number of -% combinations to try to support, and yet in \acro{HTML} output all of the +% combinations to try to support, and yet in \HTML\ output all of the % formatting is thrown away, so these packages are merely emulated. % % Packages with graphical output are allowed as-is, but must be nested inside a @@ -3604,20 +4125,20 @@ operating-system path separator used by \pkg{lwarp}. % \index{section>depths}\index{stack depths} % % Stacks are created to track depth inside the \LaTeX{} document structure. -% This depth is translated to \acro{HTML} headings as shown +% This depth is translated to \HTML\ headings as shown % in \cref{tab:depthsheadings}. % ``Depth'' here is not % depth in the traditional computer-science stack-usage sense, but rather a % representation of the nesting depth inside the \LaTeX{} document structure. % % When starting a new section, the program first must close out any existing -% sections and lists of a deeper level to keep the \acro{HTML} tags nested correctly. +% sections and lists of a deeper level to keep the \HTML\ tags nested correctly. % % \begin{table} % \caption{Section depths and HTML headings\label{tab:depthsheadings}} % \begin{tabular}{lcl} % \toprule -% Section & \parbox[c]{.35in}{\LaTeX{} depth} & \acro{HTML} headings \\ +% Section & \parbox[c]{.35in}{\LaTeX{} depth} & \HTML\ headings \\ % \midrule % title of the entire website & & h1 \\ % none & -5 & new for this package \\ @@ -3634,13 +4155,16 @@ operating-system path separator used by \pkg{lwarp}. % \end{tabular} % \end{table} % -% Support for the \pkg{memoir} package will require the addition of a \cmds{book} -% level, which will push the \acro{HTML} headings down a step, and also cause \cmds{subsubsection} -% to become a \cmds{div} due to a limit of six \acro{HTML} headings. +% Support for the \pkg{memoir} package will require the addition of a |book| +% level, which may push the \HTML\ headings down a step, and also cause +% |subsubsection| to become a \tag{div} due to a limit of six \HTML\ headings. % -% It is possible to use \htmlfive{} \cmds{section} and \cmds{H1} for all levels, +% It is possible to use \HTMLfive{} \cmds{section} and \cmds{H1} for all levels, % but this may not be well-recognized by older browsers. % +% Fixed levels for parts and chapters allow the \CSS\ to remain fixed as well. +% +% % \clearpage % % @@ -3763,15 +4287,18 @@ operating-system path separator used by \pkg{lwarp}. % \DescribeBoolean{warpingprint} % \DescribeBoolean{warpingHTML} % \DescribeBoolean{mathjax} +% % Set to true/false depending on the package option selections for -% print/\acro{HTML} output and mathsvg/mathjax: +% print/\HTML/\EPUB\ output and mathsvg/mathjax: % \begin{macrocode} \newbool{warpingprint} \newbool{warpingHTML} \newbool{mathjax} % \end{macrocode} - - +% +% +% +% % \begin{macro}{\warpprintonly} \marg{contents} % % Only process the contents if producing printed output. @@ -3784,7 +4311,7 @@ operating-system path separator used by \pkg{lwarp}. % % \begin{macro}{\warpHTMLonly} \marg{contents} % -% Only process the contents if producing \acro{HTML} output. +% Only process the contents if producing \HTML\ output. % \changes{v0.19}{2016/06/06}{Added.} % \begin{macrocode} \newcommand{\warpHTMLonly}[1]{\ifbool{warpingHTML}{#1}{}} @@ -3795,7 +4322,7 @@ operating-system path separator used by \pkg{lwarp}. % \begin{environment}{warpall} -% Anything in the |warpall| environment will be generated for print or \acro{HTML} outputs. +% Anything in the |warpall| environment will be generated for print or \HTML\ outputs. % \begin{macrocode} \includecomment{warpall} % \end{macrocode} @@ -3823,7 +4350,7 @@ operating-system path separator used by \pkg{lwarp}. % \end{environment} % \begin{environment}{warpHTML} -% Anything in the |warpHTML| environment will be generated for \acro{HTML} output only. +% Anything in the |warpHTML| environment will be generated for \HTML\ output only. % % \DescribeOption[lwarp]{warpHTML} % If the |warpHTML| option is given, boolean |warpingHTML| is true and boolean |warpingprint| is false, @@ -3847,7 +4374,7 @@ operating-system path separator used by \pkg{lwarp}. % % \changes{v0.19}{2016/05/25}{Options: mathsvg and mathjax} % \DescribeOption[lwarp]{mathsvg} -% Option |mathsvg| selects \acro{SVG} math display: +% Option |mathsvg| selects \SVG\ math display: % \index{math>mathsvg option} % \index{SVG>mathsvg option} % If the |mathsvg| option is given, boolean |mathjax| is false, and may be used for |\ifbool| tests. @@ -3874,7 +4401,7 @@ operating-system path separator used by \pkg{lwarp}. % Option |BaseJobname| sets the \cs{BaseJobname} for this document. % % This is the \cs{jobname} of the printed version, even if currently -% compiling the \acro{HTML} version. +% compiling the \HTML\ version. % I.e. this is the \cs{jobname} without |_html| appended. % This is used to set \cs{HomeHTMLFileName} if the user did not provide one. % \begin{macrocode} @@ -3883,8 +4410,19 @@ operating-system path separator used by \pkg{lwarp}. +% \DescribeOption[lwarp]{lwarpmklang} Sets the language to be assigned +% in |lwarpmk|'s configuration files. This is then used by |lwarpmk| while +% processing the glossary. +% +% \changes{v0.29}{2017/04/15}{Add: \protect\texttt{lwarpmklang} option for \pkg{lwarp}.} +% +% \begin{macrocode} +\DeclareStringOption[english]{lwarpmklang} +% \end{macrocode} + + % The default is print output, -% and \acro{SVG} math if the user chose \acro{HTML} output. +% and \SVG\ math if the user chose \HTML\ output. % \begin{macrocode} \includecomment{warpprint}% \excludecomment{warpHTML}% @@ -3924,8 +4462,10 @@ operating-system path separator used by \pkg{lwarp}. % Several packages should only be loaded before \pkg{lwarp}, and % others should only be loaded after. % -% Packages which should only be loaded before \pkg{lwarp} have their own \\ -% \hspace*{2em}|lwarp-<packagename>.sty| \\ +% Packages which should only be loaded before \pkg{lwarp} have their own +% \begin{sourcedisplay} +% |lwarp-<packagename>.sty| +% \end{sourcedisplay} % which will trigger an error if they are loaded after % \pkg{lwarp}. % Examples include \pkg{fontspec}, \pkg{inputenc}, \pkg{fontenc}, @@ -4017,6 +4557,7 @@ Please use the #2 package instead} \LWR@loadafter{floatflt} \LWR@loadafter{ftnright} \LWR@loadafter{geometry} +\LWR@loadafter{glossaries} % \LWR@loadafter{graphics}% pre-loaded by xunicode % \LWR@loadafter{graphicx}% pre-loaded by xunicode \LWR@loadafter{hyperref} @@ -4057,6 +4598,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} @@ -4085,7 +4627,7 @@ Please use the #2 package instead} % \changes{v0.16}{2016/04/08}{Lwarp no longer selects fonts.} % These packages are automatically loaded by \pkg{lwarp} when generating -% \acro{HTML} output. Some of them are also automatically loaded when +% \HTML\ output. Some of them are also automatically loaded when % generating print output, but some are not. % % In the document preamble, create a \env{warpprint} environment, and place @@ -4151,7 +4693,7 @@ Please use the #2 package instead} % ^^A \setmainfont{DejaVu Serif} % ^^A \setsansfont{DejaVu Sans} % ^^A \setmonofont{DejaVu Sans Mono} -% The monospaced font is used for \acro{HTML} tags, +% The monospaced font is used for \HTML\ tags, % so turn off its TeX ligatures and common ligatures: % \begin{macrocode} \defaultfontfeatures[\rmfamily]{Ligatures={NoCommon,TeX}} @@ -4179,7 +4721,7 @@ Please use the #2 package instead} % ^^A % \pdflatexonly % ^^A % % ^^A % |pdftotext| works better with a vector font. -% ^^A % This font choice does not control the HTML file, but it does appear in the +% ^^A % This font choice does not control the \HTML\ file, but it does appear in the % ^^A % images generated from math expressions. % ^^A % \begin{macrocode} % ^^A \RequirePackage{lmodern} @@ -4208,7 +4750,7 @@ Please use the #2 package instead} % % \DescribePackage{microtype} -% \changes{v0.18}{2016/05/18}{Microtype disabled during HTML generation} +% \changes{v0.18}{2016/05/18}{Microtype disabled during \HTML\ generation} % % Older browsers don't % \index{ligatures} @@ -4288,13 +4830,15 @@ Please use the #2 package instead} % Tactics to avoid unwanted page breaks and margin overflow: % \begin{itemize} % \item Uses a very long and wide page to minimize page breaks and margin overflow. -% \item Will also use a scriptsize font. -% \item Also uses extra space at the margin to avoid \acro{HTML} tag overflow off the page. -% \item Will also force a new page before environments. +% \item Uses a scriptsize font. +% \item Uses extra space at the margin to avoid \HTML\ tag overflow off the page. +% \item Forces a new PDF page before some environments. +% \item Forces line break between major pieces of long tags. % \end{itemize} % % \changes{v0.20}{2017/01/12}{Page geometry set to 6in wide with large margins.} % \changes{v0.27}{2017/04/04}{Page geometry modified to reduce line overflow.} +% \changes{v0.28}{2017/04/13}{Forced oneside to maintain large right margin.} % % \codehtml % \begin{macrocode} @@ -4303,6 +4847,8 @@ Please use the #2 package instead} left=2in,right=12in,% top=1in,bottom=1in,% ]{geometry} +\@twosidefalse +\@mparswitchfalse \end{warpHTML} % \end{macrocode} @@ -4460,7 +5006,7 @@ top=1in,bottom=1in,% % \DescribePackage{enumitem} % -% \pkg{enumitem} is patched to support |\newlist| with \acro{HTML}. +% \pkg{enumitem} is patched to support |\newlist| with \HTML. % \begin{macrocode} \RequirePackage{enumitem} \setlist[itemize]{leftmargin=0em} @@ -4507,7 +5053,7 @@ top=1in,bottom=1in,% % \DescribePackage{amsmath} % \changes{v0.16}{2016/04/09}{Fix: amsmath options clash} % -% Equation numbers are placed to the left for \acro{HTML}. +% Equation numbers are placed to the left for \HTML. % % \pkg{newtxmath} automatically loads \pkg{amsmath}, % so the options |leqno| and |fleqn| are passed beforehand to be @@ -4522,7 +5068,7 @@ top=1in,bottom=1in,% % \DescribePackage{environ} % -% Used to encapsulate math environments for re-use in \acro{HTML} ALT text. +% Used to encapsulate math environments for re-use in \HTML\ ALT text. % % \begin{macrocode} \RequirePackage{environ} @@ -4537,12 +5083,12 @@ top=1in,bottom=1in,% % \DescribePackage{titleps} % \changes{v0.19}{2016/05/27}{titleps: null \cs{pagestyle} and \cs{thispagestyle} for HTML.} % -% Used to place an \acro{HTML} comment into the footer of a page below the footnotes. +% Used to place an \HTML\ comment into the footer of a page below the footnotes. % This comment is used for |lateximage| environments, including math. % % The |nopatches| option prevents titleps from trying to patch sectioning commands. % -% \cs{pagestyle} and \cs{thispagestyle} are nullified for \acro{HTML} output. +% \cs{pagestyle} and \cs{thispagestyle} are nullified for \HTML\ output. % % \begin{macrocode} \RequirePackage[nopatches]{titleps} @@ -4573,7 +5119,7 @@ top=1in,bottom=1in,% % \DescribePackage{xfrac} % -% Patched for \acro{HTML} use. +% Patched for \HTML\ use. % See \cref{sec:xfrac}. % \begin{macrocode} @@ -4602,7 +5148,7 @@ top=1in,bottom=1in,% -% \section{Loading Packages} +% \section{Loading packages} % % % \codehtml @@ -4758,8 +5304,8 @@ top=1in,bottom=1in,% % \begin{macro}{\LWR@copyfile} \marg{source filename} \marg{destination filename} % -% Used to copy the |.toc| file to |.sidetoc| to re-print the \acro{TOC} in -% the side\acro{TOC} navigation pane. +% Used to copy the |.toc| file to |.sidetoc| to re-print the \TOC\ in +% the side\TOC\ navigation pane. % \begin{macrocode} \newcommand*{\LWR@copyfile}[2]{% \newwrite\copyfile % open the file to write to @@ -4787,6 +5333,10 @@ top=1in,bottom=1in,% % \section{Debugging messages} +% \begin{macrocode} +\begin{warpall} +% \end{macrocode} + % \DescribeBoolean{LWR@tracinglwarp} True if tracing is turned on. % \begin{macrocode} \newbool{LWR@tracinglwarp} @@ -4814,6 +5364,82 @@ top=1in,bottom=1in,% % \end{macro} +% \DescribeBoolean{HTMLDebugComments} Default false. +% Add comments in \HTML\ +% about closing \tag{div}s, sections, etc. +% \index{HTML>conversion settings>debug comments} +% \index{debugging>HTML debug comments} +% \index{troubleshooting>HTML debug comments} +% +% \changes{v0.28}{2017/04/09}{Added boolean \texttt{HTMLDebugComments.}} +% +% \begin{macrocode} +\newbool{HTMLDebugComments} +\boolfalse{HTMLDebugComments} +% \end{macrocode} + + + + +% \section{HTML-conversion output modifications} +% +% These booleans modify the \HTML\ output in various ways +% to improve conversion to \EPUB\ or word processor imports. +% +% +% \DescribeBoolean{FormatEPUB} Default false. +% Changes \HTML\ output for easy \EPUB\ conversion +% via an external program. Removes per-file headers, footers, and nav. +% Adds footnotes per chapter/section. +% \index{EPUB>HTML conversion settings} +% \index{HTML>conversion settings>EPUB} +% +% \changes{v0.28}{2017/04/09}{Added boolean \texttt{FormatEPUB}.} +% +% \begin{macrocode} +\newbool{FormatEPUB} +\boolfalse{FormatEPUB} +% \end{macrocode} +% +% +% \DescribeBoolean{FormatWordProcessor} Default false. +% Changes \HTML\ output for easier conversion +% by a word processor. +% Removes headers and nav, prints footnotes per section, +% and also forces single-file output and turns off \HTML\ debug +% comments. +% \index{word processor>HTML conversion settings} +% \index{HTML>conversion settings>word processor} +% +% \changes{v0.28}{2017/04/09}{Added boolean \texttt{FormatWordProcessor}.} +% +% \begin{macrocode} +\newbool{FormatWordProcessor} +\boolfalse{FormatWordProcessor} +% \end{macrocode} +% +% +% \DescribeBoolean{HTMLMarkFloats} Default true. +% Adds |=== table begin| or |=== figure begin|, and |=== end| +% around floats while formatting for word processors. +% This helps identify boundaries of floats to be manually converted +% to word-processor frames. +% (Perhaps some day word processors will have \HTML\ import options +% for identifying \tag{div} classes for figures and tables.) +% \index{word processor>HTML conversion settings} +% \index{HTML>conversion settings>word processor} +% +% \changes{v0.28}{2017/04/09}{Added boolean \texttt{HTMLMarkFloats}} +% +% \begin{macrocode} +\newbool{HTMLMarkFloats} +\booltrue{HTMLMarkFloats} +% \end{macrocode} + +% \begin{macrocode} +\end{warpall} +% \end{macrocode} + % \section{Remembering original formatting macros} @@ -4824,7 +5450,7 @@ top=1in,bottom=1in,% % Remember original definitions of formatting commands. -% Will be changed to \acro{HTML} commands for most uses. +% Will be changed to \HTML\ commands for most uses. % Will be temporarily restored to original meaning inside any lateximage environment. % Also nullify unused commands. % \begin{macrocode} @@ -5131,8 +5757,10 @@ top=1in,bottom=1in,% % |name| has no backslash, |index| can be a number or a text name, % and an empty |value| must be |\relax| instead of empty. % -% To assign an empty value: \\ -% \hspace*{2em}|\LWR@setexparray{name}{index}{\relax}| +% To assign an empty value: +% \begin{sourcedisplay} +% |\LWR@setexparray{name}{index}{\relax}| +% \end{sourcedisplay} % % \changes{v0.20}{2017/01/07}{Added single-expansion data arrays.} % @@ -5169,7 +5797,7 @@ top=1in,bottom=1in,% \begin{warpHTML} % \end{macrocode} -% \acro{HTML} entites and \acro{HTML} Unicode entities: +% \HTML\ entites and \HTML\ Unicode entities: % \begin{macrocode} \let\LWR@origampersand\& % \end{macrocode} @@ -5211,7 +5839,7 @@ top=1in,bottom=1in,% % % The filename of the homepage is set to |\HomeHTMLFileName.html|. -% The filenames of additional sections start with |\HTMLFileName|, to which is +% The filenames of additional sections start with |\HTMLfiveName|, to which is % appended a section number or a simplified section name, depending on |FileSectionNames|. % @@ -5223,7 +5851,7 @@ top=1in,bottom=1in,% % \begin{macro}{\BaseJobname} % The \cs{jobname} of the printed version, even if currently -% compiling the \acro{HTML} version. +% compiling the \HTML\ version. % I.e. this is the \cs{jobname} without |_html| appended. % This is used to set \cs{HomeHTMLFileName} if the user did not provide one. % \begin{macrocode} @@ -5231,14 +5859,14 @@ top=1in,bottom=1in,% % \end{macrocode} % \end{macro} -% \begin{macro}{\HTMLFileName} +% \begin{macro}{\HTMLfiveName} % \changes{v0.19}{2016/05/28}{Docs: Escape filename underscores.} % \changes{v0.20}{2016/12/18}{No longer escape underscores.} -% The prefix for all generated \acro{HTML} files other than the home page, +% The prefix for all generated \HTML\ files other than the home page, % defaulting to empty. See \cref{sec:filenameexamples}. % % \begin{macrocode} -\providecommand*{\HTMLFileName}{} +\providecommand*{\HTMLfiveName}{} % \end{macrocode} % \end{macro} % @@ -5271,7 +5899,7 @@ top=1in,bottom=1in,% % \end{macro} % \DescribeBoolean{FileSectionNames} -% Selects how to create \acro{HTML} file names. +% Selects how to create \HTML\ file names. % % Defaults to use section names in the filenames. % \begin{macrocode} @@ -5292,7 +5920,7 @@ top=1in,bottom=1in,% % \DescribeCounter{LWR@htmlfilenumber} -% Records the number of each \acro{HTML} file as it is being created. +% Records the number of each \HTML\ file as it is being created. % Number 0 is the home page. % \begin{macrocode} \newcounter{LWR@htmlfilenumber} @@ -5303,12 +5931,12 @@ top=1in,bottom=1in,% % \begin{macro}{\LWR@htmlsectionfilename} \marg{htmlfilenumber or name} % % \changes{v0.14}{2016/03/28}{Fix: Links to home page.} -% \changes{v0.17}{2016/04/11}{Fix: Links when entire doc is one HTML page.} +% \changes{v0.17}{2016/04/11}{Fix: Links when entire doc is one \HTML\ page.} % \changes{v0.20}{2016/09/11}{HTMLFileName: removed additional trailing '-', and may be empty.} % \changes{v0.20}{2016/09/11}{Sections called ``Index'' or ``index'' have an underscore % prepended to their filenames if no prefix.} % -% Prints the filename for a given section: |\HTMLFileName{}filenumber/name.html| +% Prints the filename for a given section: |\HTMLfiveName{}filenumber/name.html| % \begin{macrocode} \newcommand*{\LWR@htmlsectionfilename}[1]{% \LWR@traceinfo{LWR@htmlsectionfilename A}% @@ -5337,12 +5965,12 @@ top=1in,bottom=1in,% }% % \end{macrocode} % For a \LaTeX\ section named ``Index'' or ``index'' without a prefix, create a filename -% with a leading underscore to avoid colliding with the HTML filename |index.html|: +% with a leading underscore to avoid colliding with the \HTML\ filename |index.html|: % \begin{macrocode} {% \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.}% @@ -5350,7 +5978,7 @@ top=1in,bottom=1in,% % \end{macrocode} % Otherwise, create a filename with the chosen prefix: % \begin{macrocode} -{\HTMLFileName#1.html}% +{\HTMLfiveName#1.html}% }% \LWR@traceinfo{LWR@htmlsectionfilename Z}% } @@ -5398,7 +6026,7 @@ top=1in,bottom=1in,% % \begin{macro}{\LWR@topnavigation} % % Creates a link to the homepage at the top of the page for use when the window is too -% narrow for the sidetoc. +% narrow for the side\TOC. % \begin{macrocode} \newcommand*{\LWR@topnavigation}{ \LWR@htmlelementclassline{nav}{topnavigation}{\LinkHome} @@ -5409,7 +6037,7 @@ top=1in,bottom=1in,% % \begin{macro}{\LWR@botnavigation} % % Creates a link to the homepage at the bottom of the page for use when the window is too -% narrow for the sidetoc. +% narrow for the side\TOC. % \begin{macrocode} \newcommand*{\LWR@botnavigation}{ \LWR@htmlelementclassline{nav}{botnavigation}{\LinkHome} @@ -5494,6 +6122,31 @@ top=1in,bottom=1in,% +% \section{Forcing a new PDF page} + +% \codehtml +% \begin{macrocode} +\begin{warpHTML} +% \end{macrocode} + + +% \begin{macro}{\LWR@forcenewpage} New \PDF\ page a before major environment. +% +% This is used just before major environments, such as \env{verse}. +% Reduces the chance of an environment overflowing the \HTML\ \PDF\ output page. +% +% \changes{v0.28}{2017/04/13}{Forces new PDF page before major environments.} +% \begin{macrocode} +\newcommand{\LWR@forcenewpage}{% +\LWR@stoppars\LWR@orignewpage\LWR@startpars% +} +% \end{macrocode} +% \begin{macrocode} +\end{warpHTML} +% \end{macrocode} +% \end{macro} + + % \section{HTML tags, spans, divs, elements} @@ -5528,7 +6181,7 @@ top=1in,bottom=1in,% % \subsection{HTML tags} % \begin{macro}{\LWR@htmltagc} \marg{tag} -% Break ligatures and use upright apostrophes in \acro{HTML} tags. +% Break ligatures and use upright apostrophes in \HTML\ tags. % %|\protect| is in case the tag appears in TOC, LOF, LOT. % \begin{macrocode} @@ -5603,7 +6256,7 @@ top=1in,bottom=1in,% % \begin{macro}{\LWR@htmltag} \marg{tag} -% print an HTML tag: \textless{}tag\textgreater{} +% Print an \HTML\ tag: \textless{}tag\textgreater{} % \begin{macrocode} \newcommand*{\LWR@htmltagb}[1]{% \LWR@htmltagc{#1}% @@ -5619,29 +6272,33 @@ top=1in,bottom=1in,% % \subsection{Block tags and comments} -% In the following, |\origtexttt| breaks ligatures, which may not be used for \acro{HTML} codes: +% In the following, |\origttfamily| breaks ligatures, which may not be used for \HTML\ codes: % % \begin{macro}{\LWR@htmlopencomment} % \begin{macro}{\LWR@htmlclosecomment} % \begin{macrocode} \newcommand*{\LWR@htmlopencomment}{% -% \LWR@origtexttt{\LWR@origtextbf{\LWR@origtextless{}!{-}{-}}}% -\begingroup\LWR@origttfamily\LWR@origtextless{}!{-}{-}\endgroup% +{\LWR@origttfamily\LWR@origtextless{}!{-}{-}}% } \newcommand*{\LWR@htmlclosecomment}{% -% \LWR@origtexttt{\LWR@origtextbf{{-}{-}\LWR@origtextgreater{}}}% -\begingroup\LWR@origttfamily{-}{-}\LWR@origtextgreater{}\endgroup% +{\LWR@origttfamily{-}{-}\LWR@origtextgreater{}}% } % \end{macrocode} % \end{macro} % \end{macro} % \begin{macro}{\LWR@htmlcomment} \marg{comment} +% +% \changes{v0.28}{2017/04/13}{Breaks ligatures in \HTML\ comments.} +% % \begin{macrocode} \newcommand{\LWR@htmlcomment}[1]{% \LWR@htmlopencomment{}% -\LWR@origtextrm{#1}% +{% +\LWR@origttfamily% break ligatures +#1% +}% \LWR@htmlclosecomment{}} % \end{macrocode} % \end{macro} @@ -5658,7 +6315,7 @@ top=1in,bottom=1in,% % \end{macrocode} % \end{macro} -% \begin{macro}{\LWR@htmlblocktag} \marg{tag} print a stand-alone \acro{HTML} tag +% \begin{macro}{\LWR@htmlblocktag} \marg{tag} print a stand-alone \HTML\ tag % \begin{macrocode} \newcommand*{\LWR@htmlblocktag}[1]{% \LWR@stoppars% @@ -5668,20 +6325,10 @@ top=1in,bottom=1in,% % \end{macrocode} % \end{macro} -% \begin{macro}{\LWR@htmlblocktagcomment} \marg{tag} \marg{HTML comment} -% \begin{macrocode} -\NewDocumentCommand{\LWR@htmlblocktagcomment}{m +m}{% -\LWR@stoppars% -\LWR@htmltag{#1}\LWR@htmlcomment{#2}\LWR@orignewline% -\LWR@startpars% -} -% \end{macrocode} -% \end{macro} % \subsection{Div class and element class} - % \begin{macro}{\LWR@subhtmlelementclass} \marg{element} \marg{class} \oarg{style} % % Factored and reused in several places. @@ -5721,7 +6368,9 @@ top=1in,bottom=1in,% \newcommand*{\LWR@htmlelementclassend}[2]{% \LWR@stoppars% \LWR@htmltag{/#1}% +\ifbool{HTMLDebugComments}{% \LWR@htmlcomment{End of #1 ``#2''}% +}{}% \LWR@startpars% } % \end{macrocode} @@ -5797,7 +6446,7 @@ top=1in,bottom=1in,% % These are high-level commands which allow the creation of % arbitrary block or inline -% sections which may be formatted with \acro{CSS}. +% sections which may be formatted with \CSS. % For other direct-formatting commands, see \cref{sec:directformatting}. @@ -5885,25 +6534,25 @@ top=1in,bottom=1in,% \begin{warpHTML} % \end{macrocode} -% Sections H1, H2, etc.\ do not need a closing \acro{HTML} tag, but we add a comment for readability: +% Sections H1, H2, etc.\ do not need a closing \HTML\ tag, but we add a comment for readability: % \begin{macrocode} \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}}{}} % \end{macrocode} -% Lists require closing \acro{HTML} tags: +% Lists require closing \HTML\ tags: % \begin{macrocode} \newcommand*{\LWR@printcloselistitem} {\LWR@htmltag{/li}} @@ -5928,7 +6577,7 @@ top=1in,bottom=1in,% % \section{Paragraph handling} % \label{sec:parhanding} % -% These commands generate the HTML paragraph tags when allowed and +% These commands generate the \HTML\ paragraph tags when allowed and % required. % % Paragraph tags are or are not allowed depending on many conditions. @@ -5949,7 +6598,7 @@ top=1in,bottom=1in,% % \DescribeCounter{LWR@spandepth} -% Do not create paragraph tags inside of an \acro{HTML} span. +% Do not create paragraph tags inside of an \HTML\ span. % \begin{macrocode} \newcounter{LWR@spandepth} \setcounter{LWR@spandepth}{0} @@ -6025,7 +6674,7 @@ top=1in,bottom=1in,% \ifnumcomp{\@listdepth}{>}{0}% {% % \end{macrocode} -% If so, leave some horizontal room in the \LaTeX{} \acro{PDF} output for list labels: +% If so, leave some horizontal room in the \LaTeX{} \PDF\ output for list labels: % \begin{macrocode} \LWR@orighspace{1in}% }{}% @@ -6128,7 +6777,7 @@ top=1in,bottom=1in,% % \section{Paragraph start/stop handling} % \label{sec:parstartstop} -% These commands allow/disallow the generation of \acro{HTML} +% These commands allow/disallow the generation of \HTML\ % paragraph tags. % % \Cref{sec:parhanding} has the commands which actually generate @@ -6144,13 +6793,13 @@ top=1in,bottom=1in,% % \begin{macro}{\LWR@startpars} -% Begin handling \acro{HTML} paragraphs. -% This allows an \acro{HTML} paragraph to start, but one has not yet begun. +% Begin handling \HTML\ paragraphs. +% This allows an \HTML\ paragraph to start, but one has not yet begun. % \begin{macrocode} \newcommand*{\LWR@startpars}% {% % \end{macrocode} -% See if currently handling \acro{HTML} paragraphs: +% See if currently handling \HTML\ paragraphs: % \begin{macrocode} \ifbool{LWR@doingstartpars}% % \end{macrocode} @@ -6185,17 +6834,17 @@ top=1in,bottom=1in,% % \begin{macro}{\LWR@stoppars} -% Stop handling \acro{HTML} paragraphs. -% Any currently open \acro{HTML} paragraph is closed, and no more will be opened. +% Stop handling \HTML\ paragraphs. +% Any currently open \HTML\ paragraph is closed, and no more will be opened. % \begin{macrocode} \newcommand*{\LWR@stoppars}% {% % \end{macrocode} -% See if currently handling \acro{HTML} paragraphs: +% See if currently handling \HTML\ paragraphs: % \begin{macrocode} \ifbool{LWR@doingapar}% % \end{macrocode} -% if currently in an \acro{HTML} paragraph: +% if currently in an \HTML\ paragraph: % \begin{macrocode} {% % \end{macrocode} @@ -6204,7 +6853,7 @@ top=1in,bottom=1in,% \unskip% \LWR@htmltagc{/\LWR@tagregularparagraph}% % \end{macrocode} -% No longer have an open HTML paragraph: +% No longer have an open \HTML\ paragraph: % \begin{macrocode} \global\boolfalse{LWR@doingapar}% % \end{macrocode} @@ -6215,11 +6864,11 @@ top=1in,bottom=1in,% }% an intentionally blank line % \end{macrocode} -% If was not in an \acro{HTML} paragraph: +% If was not in an \HTML\ paragraph: % \begin{macrocode} {}% % \end{macrocode} -% See if currently allowing \acro{HTML} paragraphs: +% See if currently allowing \HTML\ paragraphs: % \begin{macrocode} \ifbool{LWR@doingstartpars}% % \end{macrocode} @@ -6320,9 +6969,9 @@ top=1in,bottom=1in,% \begin{warpHTML} % \end{macrocode} -% \begin{macro}{\LWR@currentcss} The \acro{CSS} filename to use. +% \begin{macro}{\LWR@currentcss} The \CSS\ filename to use. % This may be changed mid-document using \cs{NewCSS}, -% allowing different \acro{CSS} files to be used +% allowing different \CSS\ files to be used % for different sections of the document. % \begin{macrocode} @@ -6332,7 +6981,7 @@ top=1in,bottom=1in,% % \begin{macro}{\NewCSS} \marg{new-css-filename.css} % -% Assigns the \acro{CSS} file to be used by the following \acro{HTML} pages. +% Assigns the \CSS\ file to be used by the following \HTML\ pages. % \begin{macrocode} \newcommand*{\LWR@newcssb}[1]{% \renewcommand*{\LWR@currentcss}{#1} @@ -6356,47 +7005,62 @@ top=1in,bottom=1in,% -% \section{HTML meta description} +% \section{HTML meta description and author} +% % \changes{v0.20}{2016/06/27}{Added \cs{NewHTMLdescription}.} +% \changes{v0.28}{2017/04/06}{Added \cs{HTMLauthor}.} -% \codehtml + +% \codeall % \begin{macrocode} -\begin{warpHTML} +\begin{warpall} % \end{macrocode} -% \begin{macro}{\LWR@currentHTMLdescription} The \acro{HTML} meta description to use. +% \begin{macro}{\HTMLauthor} \marg{authorname} \qquad The author to place into an \HTML\ meta tag. % -% This is placed inside an \acro{HTML} meta tag at the start of each file. -% This may be changed mid-document using \cs{NewHTMLdescription}, -% allowing different \acro{HTML} descriptions to be used -% for different sections of the document. +% \index{HTML>meta tag>author} +% \index{author>HTML meta tag} +% \index{meta tag, HTML>author} % -% Do not use double quotes, and do not exceed 150 characters. - % \begin{macrocode} -\newcommand{\LWR@currentHTMLdescription}{} +\newcommand{\theHTMLauthor}{\theauthor} + +\newcommand{\HTMLauthor}[1]{\renewcommand{\theHTMLauthor}{#1}} % \end{macrocode} % \end{macro} -% \begin{macro}{\NewHTMLdescription} \marg{New \acro{HTML} meta description.} +% \begin{macrocode} +\end{warpall} +% \end{macrocode} + + +% \codeall +% \begin{macrocode} +\begin{warpall} +% \end{macrocode} + +% This is placed inside an \HTML\ meta tag at the start of each file. +% This may be changed mid-document using \cs{NewHTMLdescription}, +% allowing different \HTML\ descriptions to be used +% for different sections of the document. +% +% Do not use double quotes, and do not exceed 150 characters.\watchout + +% \begin{macro}{\NewHTMLdescription} \marg{New \HTML\ meta description.} \qquad +% Assigns the \HTML\ file's description meta tag. % -% Assigns the \acro{HTML} file's description meta tag % \index{HTML>meta tag>description} % \index{description>HTML meta tag} % \index{meta tag, HTML>description} +% % \begin{macrocode} +\newcommand{\LWR@currentHTMLdescription}{} + \newcommand{\NewHTMLdescription}[1]{% \renewcommand{\LWR@currentHTMLdescription}{#1} } -\end{warpHTML} -% \end{macrocode} -% -% \codeprint -% \begin{macrocode} -\begin{warpprint} -\newcommand{\NewHTMLdescription}[1]{} -\end{warpprint} +\end{warpall} % \end{macrocode} % \end{macro} @@ -6415,12 +7079,12 @@ top=1in,bottom=1in,% % as thanks in the titlepage. Each of these is handle differently. % % \subsection{Regular page footnotes} -% In \acro{HTML} documents, footnotes are placed at the +% In \HTML\ documents, footnotes are placed at the % bottom of the web page using the \LaTeX\ box \cs{LWR@footnotes}. % Using this instead of the original \cs{footins} box % avoids having footnotes be printed by the output routine, -% since footnotes should be printed per \acro{HTML} page -% instead of per \acro{PDF} page. +% since footnotes should be printed per \HTML\ page +% instead of per \PDF\ page. % % See \cref{sec:footnotesregular} for the implementation. % @@ -6500,6 +7164,7 @@ top=1in,bottom=1in,% % \begin{macrocode} \newcommand*{\LWR@printpendingfootnotes}{% \ifvoid\LWR@footnotes\else +\LWR@forcenewpage \begin{BlockClass}{footnotes} \LWR@origmedskip \unvbox\LWR@footnotes @@ -6508,6 +7173,15 @@ top=1in,bottom=1in,% \fi } % \end{macrocode} +% +% Used to print footnotes before sections only if formatting for an \EPUB\ or word processor: +% \begin{macrocode} +\newcommand*{\LWR@epubprintpendingfootnotes}{% +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}% +{\LWR@printpendingfootnotes}% +{}% +} +% \end{macrocode} % \begin{macrocode} \end{warpHTML} @@ -6545,9 +7219,9 @@ top=1in,bottom=1in,% % \begin{itemize} % \item Files are split according to |FileDepth| and |CombineHigherDepths|. % \item Filenames are sanitized by |\LWR@filenamenoblanks|. -% \item |\LWR@newhtmlfile| finishes an \acro{HTML} page, +% \item |\LWR@newhtmlfile| finishes an \HTML\ page, % adds a comment to tell where and how to split the file, -% then starts a new \acro{HTML} page. +% then starts a new \HTML\ page. % \end{itemize} @@ -6557,8 +7231,8 @@ top=1in,bottom=1in,% % \end{macrocode} % \DescribeCounter{FileDepth} \marg{section depth} determines how deeply -% to break into new \acro{HTML} files, similar to |tocdepth|. -% The default of -5 produces one large \acro{HTML} file. +% to break into new \HTML\ files, similar to |tocdepth|. +% The default of -5 produces one large \HTML\ file. % \begin{macrocode} \newcounter{FileDepth} \setcounter{FileDepth}{-5} @@ -6719,12 +7393,13 @@ top=1in,bottom=1in,% % \begin{macro}{\LWR@newhtmlfile} \marg{section name} -% \changes{v0.18}{2016/04/23}{Sidetoc after title, improving responsive design.} +% \changes{v0.18}{2016/04/23}{side\TOC\ after title, improving responsive design.} % \changes{v0.21}{2017/02/22}{Skip title if not given.} +% \changes{v0.28}{2017/04/06}{If \texttt{FormatEPUB} or \texttt{FormatWordProcessor}: skips headers, footers, nav.} % -% Finishes the current \acro{HTML} page with footnotes, footer, navigation, -% then starts a new \acro{HTML} page with an \acro{HTML} comment telling where to -% split the page and what the new filename and \acro{CSS} are, then adds +% Finishes the current \HTML\ page with footnotes, footer, navigation, +% then starts a new \HTML\ page with an \HTML\ comment telling where to +% split the page and what the new filename and \CSS\ are, then adds % navigation, side TOC, header, and starts the text body. % \begin{macrocode} \newcommand*{\LWR@newhtmlfile}[1]{ @@ -6737,24 +7412,36 @@ top=1in,bottom=1in,% \LWR@printpendingfootnotes +% \end{macrocode} +% +% No footer between files if \EPUB: +% +% \begin{macrocode} +\ifbool{FormatEPUB} +{} +{ \LWR@htmlelement{footer} \LWR@pagebottom \LWR@htmlelementend{footer} +} % \end{macrocode} - -% No bottom navigation if are finishing the home page: -% Presumably has a table-of-contents printed. +% +% No bottom navigation if are finishing the home page or +% formatting for \EPUB\ or a word-processor. % \begin{macrocode} -\ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{} +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{\ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{}} % \end{macrocode} -% End of this \acro{HTML} file: +% End of this \HTML\ file: % \begin{macrocode} \LWR@stoppars \LWR@htmltag{/body}\LWR@orignewline \LWR@htmltag{/html}\LWR@orignewline +\LWR@orignewpage \addtocounter{LWR@htmlfilenumber}{1}% % \end{macrocode} @@ -6769,14 +7456,14 @@ top=1in,bottom=1in,% {\renewcommand*{\LWR@thisfilename}{\theLWR@htmlfilenumber}} % \end{macrocode} -% Include an \acro{HTML} comment to instruct lwarpmk +% Include an \HTML\ comment to instruct lwarpmk % where to split the files apart. % Uses pipe-separated fields for |split_html.gawk|. % Uses monospaced font with ligatures disabled for everything except the title. % \begin{macrocode} \LWR@htmlblockcomment{% -\LWR@origtexttt{|Start file|% -\LWR@htmlsectionfilename{\LWR@thisfilename}|}% +|Start file|% +\LWR@htmlsectionfilename{\LWR@thisfilename}|% } % \end{macrocode} @@ -6784,24 +7471,67 @@ top=1in,bottom=1in,% % \begin{macrocode} \LWR@stoppars +% \end{macrocode} +% +% +% \begin{macrocode} \LWR@filestart{ — #1}% there is an EMdash in front of the #1 -\LWR@topnavigation +% \end{macrocode} +% +% No navigation between files if formatting for an \EPUB\ or word processor: +% \begin{macrocode} +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{\LWR@topnavigation} +% \end{macrocode} +% +% No header if between files if formatting for an \EPUB\ or word processor: +% \begin{macrocode} +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{ \LWR@htmlelement{header} \LWR@pagetop \LWR@htmlelementend{header} +} -\ifcsvoid{thetitle}{}{\LWR@printthetitle} +% \end{macrocode} +% +% Print title only if there is one. +% Skip if formatting for an \EPUB\ or word processor: +% \begin{macrocode} +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{\ifcsvoid{thetitle}{}{\LWR@printthetitle}} -\LWR@sidetoc +% \end{macrocode} +% +% No side\TOC\ if formatting for an \EPUB\ or word processor: +% \begin{macrocode} +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{\LWR@sidetoc} +% \end{macrocode} +% +% Start of the \tag{textbody}: +% \begin{macrocode} \LWR@htmlelementclass{section}{textbody} +% \end{macrocode} +% +% Keep paragraph tags disabled for now: +% \begin{macrocode} \LWR@stoppars +% \end{macrocode} +% +% Track the page numbers: +% \begin{macrocode} \setcounter{LWR@latestautopage}{\value{page}} } % \end{macrocode} @@ -6819,7 +7549,7 @@ top=1in,bottom=1in,% % % Sectioning and cross-references have been emulated from scratch, rather % than try to patch several layers of existing \LaTeX{} code and packages. -% Formatting is handled by \acro{CSS}, so the emulated code has much less +% Formatting is handled by \CSS, so the emulated code has much less % work to do than the print versions. % % Section names and the resulting filenames with accented characters @@ -6850,7 +7580,7 @@ top=1in,bottom=1in,% % % Declare the main matter section of the document. Does not reset the page number, % \watchout -% which must be consecutive arabic numbers for the \acro{HTML} conversion. +% which must be consecutive arabic numbers for the \HTML\ conversion. % \begin{macrocode} \newbool{LWR@mainmatter} \DeclareDocumentCommand{\mainmatter}{}{% @@ -6947,7 +7677,7 @@ top=1in,bottom=1in,% % % \DescribeCounter{LWR@prevFileDepth} Remembers the previous |LWR@FileDepth|. % -% Initialized to a deep level so that any section will trigger a new \acro{HTML} +% Initialized to a deep level so that any section will trigger a new \HTML\ % page after the home page. % \begin{macrocode} \newcounter{LWR@prevFileDepth} @@ -6970,15 +7700,16 @@ top=1in,bottom=1in,% % \begin{macrocode} \global\boolfalse{LWR@minipagethispar}% % \end{macrocode} -% Generate a new LaTeX page so that TOC and index page number points to the section: +% Start a new \HTML\ file if not starred, and is a shallow sectioning depth: % \begin{macrocode} -\LWR@orignewpage% - +\LWR@traceinfo{LWR@section: testing whether to start a new HTML file}% +\IfBooleanTF{#1}{% starred % \end{macrocode} -% Start a new \acro{HTML} file if not starred, and is a shallow sectioning depth: +% Generate a new LaTeX page so that \TOC\ and index page number points to the section: % \begin{macrocode} -\LWR@traceinfo{LWR@section: testing about to start a new HTML file}% -\IfBooleanTF{#1}{}{% not starred +\LWR@orignewpage% + +}{% not starred \ifthenelse{% \cnttest{\csuse{LWR@depth#4}}{<=}{\value{FileDepth}}% \AND% @@ -6988,7 +7719,7 @@ top=1in,bottom=1in,% \)% }% % \end{macrocode} -% If so: start a new \acro{HTML} file: +% If so: start a new \HTML\ file: % \begin{macrocode} {% new file \LWR@traceinfo{LWR@section: new HTML file}% @@ -7006,9 +7737,15 @@ top=1in,bottom=1in,% {\LWR@newhtmlfile{#2}}% }% new file % \end{macrocode} -% Else: No new \acro{HTML} file: +% Else: No new \HTML\ file: +% \begin{macrocode} +{% not new file +% \end{macrocode} +% Generate a new LaTeX page so that \TOC\ and index page number points to the section: % \begin{macrocode} -{}% not new file +\LWR@orignewpage% + +}% not new file }% not starred % \end{macrocode} % Remember this section's name for \cs{nameref}: @@ -7020,7 +7757,9 @@ top=1in,bottom=1in,% % ex: ``section'' ``Introduction'' % \begin{macrocode} +\ifbool{HTMLDebugComments}{% \LWR@htmlcomment{Opening #4 ``#3''{}} +}{} % \end{macrocode} % For inline sections paragraph and subparagraph, start a new paragraph now: @@ -7124,13 +7863,13 @@ top=1in,bottom=1in,% {}% % \end{macrocode} % If not starred, remember the previous depth to -% possibly trigger a new \acro{HTML} page. +% possibly trigger a new \HTML\ page. % -% A starred section does not trigger a new \acro{HTML} page at the beginning +% A starred section does not trigger a new \HTML\ page at the beginning % of this macro, so it should not affect it here at the end either. % This became an issue when a \cs{listoftables} was tested in the middle of % the document. The \cs{chapter*} for the list was not allowing -% a new \acro{HTML} page for the section following it +% a new \HTML\ page for the section following it % while |CombineHigherDepths| was true. % \begin{macrocode} \IfBooleanTF{#1}{}{% not starred @@ -7151,6 +7890,7 @@ top=1in,bottom=1in,% {} {% \DeclareDocumentCommand{\part}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthpart}{\LWR@printclosepart}% @@ -7163,12 +7903,15 @@ top=1in,bottom=1in,% % \begin{macro}{\chapter} * \oarg{TOC name} \marg{name} +% +% \changes{v0.28}{2017/04/06}{If \EPUB, prints footnotes before each section.} % \begin{macrocode} \@ifundefined{chapter} {} {% \DeclareDocumentCommand{\chapter}{s o m}{% \LWR@traceinfo{chapter #3}% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthchapter}{\LWR@printclosechapter}% @@ -7184,6 +7927,7 @@ top=1in,bottom=1in,% % \begin{macro}{\section} * \oarg{TOC name} \marg{name} % \begin{macrocode} \DeclareDocumentCommand{\section}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthsection}{\LWR@printclosesection}% @@ -7198,6 +7942,7 @@ top=1in,bottom=1in,% % \begin{macro}{\subsection} * \oarg{TOC name} \marg{name} % \begin{macrocode} \DeclareDocumentCommand{\subsection}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthsubsection}{\LWR@printclosesubsection}% @@ -7212,6 +7957,7 @@ top=1in,bottom=1in,% % \begin{macro}{\subsubsection} * \oarg{TOC name} \marg{name} % \begin{macrocode} \DeclareDocumentCommand{\subsubsection}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthsubsubsection}% @@ -7228,6 +7974,7 @@ top=1in,bottom=1in,% % \begin{macro}{\paragraph} * \oarg{TOC name} \marg{name} % \begin{macrocode} \DeclareDocumentCommand{\paragraph}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthparagraph}{\LWR@printcloseparagraph}% @@ -7242,6 +7989,7 @@ top=1in,bottom=1in,% % \begin{macro}{\subparagraph} * \oarg{TOC name} \marg{name} % \begin{macrocode} \DeclareDocumentCommand{\subparagraph}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthsubparagraph}{\LWR@printclosesubparagraph}% @@ -7268,7 +8016,7 @@ top=1in,bottom=1in,% \begin{warpHTML} % \end{macrocode} -% \begin{macro}{\MetaLanguage} Default language for the \acro{HTML} |lang| tag. +% \begin{macro}{\MetaLanguage} Default language for the \HTML\ |lang| tag. % \index{language HTML metadata} % \begin{macrocode} \newcommand*{\MetaLanguage}{en-US} @@ -7278,10 +8026,11 @@ top=1in,bottom=1in,% % \begin{macro}{\LWR@filestart} \marg{title\_suffix} -% Creates the opening \acro{HTML} tags. +% Creates the opening \HTML\ tags. % \changes{v0.19}{2016/05/25}{lwarp\_mathjax.txt loaded.} % \changes{v0.20}{2016/06/27}{Adds meta description.} % \changes{v0.21}{2017/02/22}{Skip title if not given.} +% \changes{v0.28}{2017/04/06}{Adds \HTML\ meta author.} % % \begin{macrocode} \newcommand*{\LWR@filestart}[1]{ @@ -7303,7 +8052,7 @@ top=1in,bottom=1in,% \RenewDocumentCommand{\LWR@htmlspanclass}{m o +m}{##3} \DeclareExpandableDocumentCommand{\InlineClass}{m o m}{##3} % \end{macrocode} -% Create the page's \acro{HTML} header: +% Create the page's \HTML\ header: % \begin{macrocode} \LWR@htmltag{!DOCTYPE html}\LWR@orignewline % \end{macrocode} @@ -7319,6 +8068,14 @@ top=1in,bottom=1in,% % \begin{macrocode} \LWR@htmltag{meta charset="UTF-8" /}\LWR@orignewline % \end{macrocode} +% +% Author: +% \begin{macrocode} +\ifcsempty{theHTMLauthor}{}{ +\LWR@htmltag{meta name="author" content="\theHTMLauthor" /}\LWR@orignewline +} +% \end{macrocode} +% % \pkg{lwarp} is the generator: % \index{HTML>meta tag>generator} % \index{generator>HTML meta tag} @@ -7364,7 +8121,7 @@ script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"{}}% link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@orignewline % \end{macrocode} -% Optional MathJax support. The \acro{HTML} tags must be turned off +% Optional MathJax support. The \HTML\ tags must be turned off % during the verbatim input, and the paragraph handling which was % turned on at the end of verbatim input must be immediately turned off % again. @@ -7410,17 +8167,29 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macro}{\LWR@LwarpStart} % \changes{v0.19}{2016/06/01}{Enabled \textbackslash\textbackslash{} equal to \cs{newline}.} % \changes{v0.21}{2017/02/22}{Changed \texttt{lateximages} to a \texttt{.txt} file.} +% \changes{v0.28}{2017/04/09}{\texttt{FormatWordProcessor} forces single-file output.} % Executed at the beginning of the entire document. % \begin{macrocode} \newcommand*{\LWR@LwarpStart} {% % \end{macrocode} +% +% If formatting for a word processor, +% force filedepth to single-file only, +% force \HTML\ debug comments off. +% \begin{macrocode} +\ifbool{FormatWordProcessor}{% +\setcounter{FileDepth}{-5}% +\boolfalse{HTMLDebugComments}% +}{} +% \end{macrocode} +% % Expand and detokenize \cs{HomeHTMLFileName} and \cs{HTMLFileName}: % \begin{macrocode} \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}} % \end{macrocode} % Force onecolumn: % \begin{macrocode} @@ -7430,7 +8199,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \LWR@origscriptsize% % \end{macrocode} -% In \acro{PDF} output, don't allow line breaks to interfere with \acro{HTML} tags: +% In \PDF\ output, don't allow line breaks to interfere with \HTML\ tags: % \begin{macrocode} \LWR@origraggedright% \let\\\LWR@endofline% @@ -7450,7 +8219,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \immediate\openout\LWR@file=lateximages.txt % \end{macrocode} % -% Removes space after the caption in the \acro{HTML}: +% Removes space after the caption in the \HTML: % \begin{macrocode} \setlength{\belowcaptionskip}{-3ex} % \end{macrocode} @@ -7458,7 +8227,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \renewcommand{\ps@plain}{} % \end{macrocode} -% Not used in the \acro{HTML} environment: +% Not used in the \HTML\ environment: % \DescribeMacro{\centering} % \DescribeMacro{\raggedleft} % \DescribeMacro{\raggedright} @@ -7488,7 +8257,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \cs{ltx@label} is used in \pkg{amsmath} environments and is also % patched by \pkg{cleveref}. % \index{label>in HTML} -% \margintag{Label in \acro{HTML}} +% \margintag{Label in \HTML} % \changes{v0.20}{2017/01/30}{Fix: math cross references.} % \begin{macrocode} \let\LWR@origltx@label\ltx@label @@ -7515,7 +8284,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \global\boolfalse{LWR@doingapar} \global\boolfalse{LWR@doingstartpars} % \end{macrocode} -% Start a new \acro{HTML} file and a header: +% Start a new \HTML\ file and a header: % \begin{macrocode} \LWR@filestart{} \LWR@htmltag{header}\LWR@orignewline @@ -7550,7 +8319,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \catcode`\&=\active % \end{macrocode} -% Allow \acro{HTML} paragraphs to begin: +% Allow \HTML\ paragraphs to begin: % \begin{macrocode} \LWR@startpars } @@ -7590,7 +8359,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macro}{\LWR@LwarpEnd} -% Final stop of all \acro{HTML} output: +% Final stop of all \HTML\ output: +% +% \changes{v0.28}{2017/04/06}{If \texttt{FormatEPUB} or \texttt{FormatWordProcessor}, no bottom nav.} % \begin{macrocode} \newcommand*{\LWR@LwarpEnd} { @@ -7616,15 +8387,21 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@htmlelementend{footer} % \end{macrocode} -% No bottom navigation if are finishing the home page: \\ -% Presumably has a table-of-contents printed. +% No bottom navigation if are finishing the home page, +% or if formatting for an \EPUB\ or word processor. +% +% Presumably has a table-of-contents. % \begin{macrocode} +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{ \ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{} +} % \end{macrocode} % \begin{macrocode} \LWR@stoppars% final stop of all paragraphs % \end{macrocode} -% Finish the HTML file: +% Finish the \HTML\ file: % \begin{macrocode} \LWR@htmltag{/body}\LWR@orignewline \LWR@htmltag{/html}\LWR@orignewline @@ -7712,7 +8489,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % % \subsection{Setting the title, etc.} % -% The following provide setting commands for both \acro{HTML} and print outputs. +% The following provide setting commands for both \HTML\ and print outputs. % % \DescribeMacro{@published} % \DescribeMacro{@title} @@ -7751,7 +8528,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % with \cs{and} placing commas between multiple authors. % Thus, these commands are to be used in the main text whenever the user % wishes to refer to the document's title and such. One practical use for this -% is to place the authors at the bottom of each \acro{HTML} page, such as: +% is to place the authors at the bottom of each \HTML\ page, such as: % % \DescribeMacro{\SetPageBottom} \marg{text} % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] @@ -7883,11 +8660,14 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % % % \begin{environment}{titlepage} -% Sets up a titlepage div with a \LaTeX{} \acro{PDF} minipage inside. +% Sets up a titlepage div with a \LaTeX{} \PDF\ minipage inside. % \begin{macrocode} \renewenvironment*{titlepage} - {\BlockClass{titlepage}\LWR@subminipage} - {\LWR@endsubminipage\endBlockClass} +{ +\LWR@forcenewpage +\BlockClass{titlepage}\LWR@subminipage +} +{\LWR@endsubminipage\endBlockClass} % \end{macrocode} % \end{environment} % @@ -7896,7 +8676,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \renewenvironment*{titlingpage} {% % \end{macrocode} -% Start an HTML titlepage div: +% Start an \HTML\ titlepage div: % \begin{macrocode} \begin{titlepage} % \end{macrocode} @@ -7908,7 +8688,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% { % \end{macrocode} % At the end of the environment, -% end the HTML titlepage div: +% end the \HTML\ titlepage div: % \begin{macrocode} \end{titlepage} % \end{macrocode} @@ -7956,7 +8736,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % % The following are for printing the title, etc. % in a \env{titlepage} or a \env{titlingpage} -% in \acro{HTML}: +% in \HTML: % % \codehtml % \begin{macrocode} @@ -7965,7 +8745,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % % % -% Patch the pre/post title/author/date to add \acro{HTML} tags, +% Patch the pre/post title/author/date to add \HTML\ tags, % then initilize: % \begin{macrocode} \newcommand{\prepublished}[1]{% @@ -8057,7 +8837,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macro}{\LWR@printthetitle} % % A private version which prints the title without footnotes, -% used to title each \acro{HTML} page. +% used to title each \HTML\ page. % \begin{macrocode} \newcommand*{\LWR@printthetitle} { @@ -8295,10 +9075,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \subsection{\protect\textbackslash{}maketitle for HTML output} % \label{sec:titlehtml} % -% An \acro{HTML} div of class |titlepage| is created, inside of which -% a \LaTeX{} \acro{PDF} minipage is generated (without \acro{HTML} tags), +% An \HTML\ div of class |titlepage| is created, inside of which +% a \LaTeX{} \PDF\ minipage is generated (without \HTML\ tags), % allowing the |\thanks| footnotes to be generated immediately at the end -% of the title page during \acro{HTML} output. This is desirable when +% of the title page during \HTML\ output. This is desirable when % a large table of contents immediately follows the title. % % |\thanks| are a form of footnotes used in the title page. @@ -8363,7 +9143,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macro}{\@fnsymbol} \marg{counter} % -% Re-defined to use an \acro{HTML} entity for the double vertical bar symbol. +% Re-defined to use an \HTML\ entity for the double vertical bar symbol. % The original definition used \cs{\textbar} which was not being found by \cmds{pdftotext}. % \begin{macrocode} \def\@fnsymbol#1{\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or @@ -8372,16 +9152,16 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{macrocode} % \end{macro} % -%\begin{macro}{\maketitle} Creates an \acro{HTML} titlepage div +%\begin{macro}{\maketitle} Creates an \HTML\ titlepage div % and typesets the title, etc. % % Code from the \pkg{titling} package is adapted, simplified, and -% modified for \acro{HTML} output. +% modified for \HTML\ output. % % \begin{macrocode} \renewcommand*{\maketitle}{% % \end{macrocode} -% An \acro{HTML} titlepage div is used for all classes. +% An \HTML\ titlepage div is used for all classes. % \begin{macrocode} \begin{titlepage} % \end{macrocode} @@ -8397,7 +9177,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \@thanks % \end{macrocode} -% Close the \acro{HTML} titlepage div: +% Close the \HTML\ titlepage div: % \begin{macrocode} \end{titlepage} % \end{macrocode} @@ -8408,7 +9188,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{macrocode} % \end{macro} -% \begin{macro}{\@maketitle} Typesets the title, etc. for \acro{HTML}: +% \begin{macro}{\@maketitle} Typesets the title, etc. for \HTML: % \begin{macrocode} \DeclareDocumentCommand{\@maketitle}{}{% \maketitlehooka @@ -8436,7 +9216,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macro}{\LWR@titlingmaketitle} -% \cs{maketitle} for use inside an \acro{HTML} \env{titlingpage} environment. +% \cs{maketitle} for use inside an \HTML\ \env{titlingpage} environment. % \begin{macrocode} \newcommand*{\LWR@titlingmaketitle}{% % \end{macrocode} @@ -8457,7 +9237,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % % Sets the type of footnote marks used by |\thanks|, % where type is `arabic', `roman', `fnsymbol', etc. Modified to -% use the \LaTeX{} \acro{PDF} minipage which is included with the title page. +% use the \LaTeX{} \PDF\ minipage which is included with the title page. % \begin{macrocode} \renewcommand{\thanksmarkseries}[1]{% \def\@mpbsmarkseries{% @@ -8501,6 +9281,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \DeclareDocumentEnvironment{abstract}{} { +\LWR@forcenewpage \BlockClass{abstract} \BlockClassSingle{abstracttitle}{\abstractname} } @@ -8574,11 +9355,17 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{environment}{quote} % \begin{macrocode} \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{macrocode} % \end{environment} @@ -8598,21 +9385,21 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \begin{warpall} % \end{macrocode} % -% The following lengths may be set in either print or \acro{HTML} output, -% but are only used in \acro{HTML}. +% The following lengths may be set in either print or \HTML\ output, +% but are only used in \HTML. % This allows the user to set \cs{vleftskip} and \cs{leftmargini} for -% print output, and optionally select different values for \acro{HTML}. +% print output, and optionally select different values for \HTML. % % \DescribeLength{HTMLvleftskip} -% Sets \cs{vleftskip} inside a \env{verse} environment in \acro{HTML}. +% Sets \cs{vleftskip} inside a \env{verse} environment in \HTML. % \begin{macrocode} \newlength{\HTMLvleftskip} \setlength{\HTMLvleftskip}{1em} % \end{macrocode} % \DescribeLength{HTMLleftmargini} -% Sets \cs{leftmargini} inside a \env{verse} environment in \acro{HTML}. +% Sets \cs{leftmargini} inside a \env{verse} environment in \HTML. % \begin{macrocode} \newlength{\HTMLleftmargini} \setlength{\HTMLleftmargini}{4.5em} @@ -8640,7 +9427,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % % \begin{macrocode} \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} } % \end{macrocode} @@ -8661,7 +9451,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{macrocode} % % -% \DescribeLength{\VerbatimHTMLWidth} Width to use in HTML Verbatim environment. +% \DescribeLength{\VerbatimHTMLWidth} Width to use in \HTML\ |Verbatim| environment. % % This width is used when placing line numbers to the right. % Ignored during print output. @@ -8678,7 +9468,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{macrocode} % % \DescribeBoolean{LWR@verbtags} Used to temporarily turn off verbatim tags -% while doing \env{VerbatimInput} in the \acro{HTML} head. +% while doing \env{VerbatimInput} in the \HTML\ head. % \begin{macrocode} \newbool{LWR@verbtags} \booltrue{LWR@verbtags} @@ -8697,7 +9487,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macro}{\LWR@atbeginverbatim} \marg{class} % -% Encloses a verbatim environment with the given \acro{CSS} class. +% Encloses a verbatim environment with the given \CSS\ class. % \begin{macrocode} \newcommand*{\LWR@atbeginverbatim}[1] {% @@ -8706,7 +9496,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \setlength{\parskip}{0ex}% % \end{macrocode} -% Stop generating \acro{HTML} paragraph tags: +% Stop generating \HTML\ paragraph tags: % \begin{macrocode} \LWR@stoppars% % \end{macrocode} @@ -8716,11 +9506,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{macrocode} % Use a mono-spaced font to preserve horizontal positioning. % If horizontal alignment is important for the user, use a mono-spaced font -% in the \acro{CSS} for the |verse| class. +% in the \CSS\ for the |verse| class. % \begin{macrocode} \LWR@origttfamily% % \end{macrocode} -% Do not produce \acro{HTML} tags for \cs{hspace} inside a verse |par|. +% Do not produce \HTML\ tags for \cs{hspace} inside a verse |par|. % Restore plain \LaTeX{} \cs{hspace} functionality: % \begin{macrocode} \let\hspace\LWR@orighspace% @@ -8760,7 +9550,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % % \begin{environment}{VerbatimClass} \marg{class} \oarg{Verbatim options} % -% Creates a \env{Verbatim} enclosed in a \acro{DIV} of the given class. +% Creates a \env{Verbatim} enclosed in a \tag{div} of the given class. % \begin{macrocode} \NewDocumentEnvironment{VerbatimClass}{m O{}} {% @@ -8794,6 +9584,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % % \begin{macrocode} \renewcommand*{\Verbatim}{% +\LWR@forcenewpage \renewcommand*{\LWR@Verbatimclass}{fancyvrb}% \LWR@origVerbatim% } @@ -8955,6 +9746,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \AtBeginEnvironment{BVerbatim} { +\LWR@forcenewpage \LWR@atbeginverbatim{bverbatim} } @@ -9015,15 +9807,15 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \section{Theorems} % -% \changes{v0.25}{2017/03/17}{Basic \LaTeX\ theorems: improved \acro{CSS}.} +% \changes{v0.25}{2017/03/17}{Basic \LaTeX\ theorems: improved \CSS.} % % % \DescribeMacro{\newtheorem} \marg{text} \oarg{counter} -or- \oarg{oldname} \marg{text} % -% A few minor changes are made to supply \acro{HTML} tags. +% A few minor changes are made to supply \HTML\ tags. % % \begin{itemize} -% \item The entire theorem is placed into a div of class |theorem|. +% \item The entire theorem is placed into a div of class |theoremcontents|. % \item The label for each theorem is placed inside a span of class |theoremlabel|. % \item The contents are placed inside a div of class |theoremcontents|. % \end{itemize} @@ -9036,6 +9828,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macro}{\@begintheorem} \marg{name} \marg{number} % \begin{macrocode} \renewcommand{\@begintheorem}[2]{% +\LWR@forcenewpage \BlockClass{theoremcontents} \InlineClass{theoremlabel}{#1\ #2\ } } @@ -9044,6 +9837,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macro}{\@opargbegintheorem} \marg{name} \marg{number} \marg{oparg} % \begin{macrocode} \renewcommand{\@opargbegintheorem}[3]{% +\LWR@forcenewpage \BlockClass{theoremcontents} \InlineClass{theoremlabel}{#1\ #2\ (#3)\ } } @@ -9102,7 +9896,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % To have a blank item, use |\mbox{}|. % This forces a new line in print output, matching the new line which -% will appear in \acro{HTML} output. +% will appear in \HTML\ output. % Ex: %\begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] %\begin{itemize} @@ -9138,7 +9932,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \subsection{Enumerate} -% An \acro{HTML} unordered list is used with customized \LaTeX-generated labels. +% An \HTML\ unordered list is used with customized \LaTeX-generated labels. % \begin{environment}{enumerate} \oarg{enumitem options} % \begin{macrocode} @@ -9333,7 +10127,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \DescribeBoolean{LWR@intabularmetadata} % True if are in a tabular but not in a data cell. -% Used to prevent extra \acro{HTML} breaks if not inside table data. +% Used to prevent extra \HTML\ breaks if not inside table data. % \begin{macrocode} \newbool{LWR@intabularmetadata} \boolfalse{LWR@intabularmetadata} @@ -9405,7 +10199,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macro}{&} Will behave depending on whether it is being used inside \env{tabular}. % % |&| is redefined to test whether it is inside a tabular environment, -% in which case it performs special processing for \acro{HTML} conversion. +% in which case it performs special processing for \HTML\ conversion. % If not, it behaves normally. % % The |\catcode| allows the |&| character to be redefined. @@ -9442,7 +10236,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \pkg{tikz} has been loaded. % % \cs{LWR@lwarpStart} finally makes |&| active at the beginning of the -% \acro{HTML} conversion. +% \HTML\ conversion. % \end{macro} % @@ -9774,7 +10568,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \subsection{Parsing the column specifications} -% \acro{HTML} \acro{CSS} cannot exactly match the \LaTeX{} concept of a baseline for +% \HTML\ \CSS\ cannot exactly match the \LaTeX{} concept of a baseline for % a table row. % \watchout % \Cref{tab:baseline} shows the \LaTeX{} results for various @@ -9801,10 +10595,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{table} % % \Cref{tab:columnconversions} describes how each kind of column is -% converted to \acro{HTML}. +% converted to \HTML. % % \begin{table} -% \caption{Tabular \acro{HTML} column conversions\label{tab:columnconversions}} +% \caption{Tabular \HTML\ column conversions\label{tab:columnconversions}} % \index{tabular>HTML colummn conversion} % \index{HTML>tabular column conversion} % @@ -9813,21 +10607,21 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \hrule % \begin{description}[parsep=.5ex] % \item [l, r, c:] Converted to table cells without paragraph tags. \\ -% Uses \acro{CSS} |vertical-align:middle| so that top or bottom-aligned cells may go above or below this cell. +% Uses \CSS\ |vertical-align:middle| so that top or bottom-aligned cells may go above or below this cell. % \item [p:] Converted to table cells with paragraph tags. % Ref: \Cref{tab:baseline}, % \LaTeX{} places the top line of a parbox -% aligned with the rest of the text line, so \acro{CSS} |vertical-align:bottom| is used to -% have the \acro{HTML} result appear with the paragraph extending below the L, R, C cells at the middle, if possible. -% This may be confusing as a P cell may not top-align with an L,R,C cell in the \acro{HTML} +% aligned with the rest of the text line, so \CSS\ |vertical-align:bottom| is used to +% have the \HTML\ result appear with the paragraph extending below the L, R, C cells at the middle, if possible. +% This may be confusing as a P cell may not top-align with an L,R,C cell in the \HTML\ % conversion, especially in the presence of a B cell, and two P cells side-by-side will % be aligned at the bottom instead of the top. -% Some adjustment of the \acro{CSS} may be desired, changing +% Some adjustment of the \CSS\ may be desired, changing % |td.tdp|, |td.tdP|, |td.tdprule|, and |td.tdPrule| to |vertical-align: middle|. % Another possibility is to change L,R,C, and P to |vertical-align: top| and not worry % about the alignment of B and M cells or trying to approximate \LaTeX{} baselines. -% \item [m:] With paragraph tags, \acro{CSS} |vertical-align:middle|. -% \item [b:] With paragraph tags, \acro{CSS} |vertical-align:top| so that the bottom of the +% \item [m:] With paragraph tags, \CSS\ |vertical-align:middle|. +% \item [b:] With paragraph tags, \CSS\ |vertical-align:top| so that the bottom of the % text is closest to the middle of the text line. % \item [P, M, B:] Horizontally-centered versions. % \item [S:] Converted to 'r'. From the \pkg{siunitx} package. @@ -9859,6 +10653,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % Added tabular \texttt{D}, \texttt{!!}, \texttt{X} columns.} % % \changes{v0.23}{2017/03/02}{Fix for vert bar column type.} +% \changes{v0.28}{2017/04/11}{Added L, C, R, J column types.} % % \begin{macrocode} \newcommand*{\LWR@parsetablecols}[1]{% @@ -9926,6 +10721,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}{}% @@ -9946,6 +10745,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \IfStrEq{\LWR@strresult}{X}{\LWR@parsenormalcolumn{X}}{}% % \end{macrocode} % \begin{docsidebar} +% \raggedright % Many people define centered versions ``|P|'', ``|M|'', and ``|B|'': \\ % \hspace*{1em}|\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}| % \end{docsidebar} @@ -10027,7 +10827,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \LWR@strresult% % \end{macrocode} -% If this column has a cmidrule, add ``rule'' to the end of the \acro{HTML} class tag: +% If this column has a cmidrule, add ``rule'' to the end of the \HTML\ class tag: % \begin{macrocode} \ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}{rule}{}% "{}}% @@ -10153,7 +10953,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \StrChar{#1}{\theLWR@tablemulticolspos}[\LWR@strresult]% % \end{macrocode} -% Add to the \acro{HTML} tag depending on which column type is found: +% Add to the \HTML\ tag depending on which column type is found: % \begin{macrocode} \IfStrEq{\LWR@strresult}{l}{l}{}% \IfStrEq{\LWR@strresult}{c}{c}{}% @@ -10332,7 +11132,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \LWR@parsemulticolumnalignment{#2}{\LWR@printmccoltype}% % \end{macrocode} -% If this column has a cmidrule, add ``rule'' to the end of the \acro{HTML} class tag. +% If this column has a cmidrule, add ``rule'' to the end of the \HTML\ class tag. % % If this position had a ``Y'' then add ``rule''. % \begin{macrocode} @@ -10415,7 +11215,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% }% }{}% % \end{macrocode} -% Create an \acro{HTML} caption. Afterwards, maybe make a LOT entry. +% Create an \HTML\ caption. Afterwards, maybe make a LOT entry. % \begin{macrocode} \LWR@htmlblocktag{figcaption}% \csuse{fnum@\LTcaptype}\CaptionSeparator#3% @@ -10510,7 +11310,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \StrChar{\LWR@tablecolspec}{\theLWR@tablecolspos}% % \end{macrocode} -% If this column has a cmidrule, add ``rule'' to the end of the \acro{HTML} class tag: +% If this column has a cmidrule, add ``rule'' to the end of the \HTML\ class tag: % \begin{macrocode} \ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}{rule}{}% "{}} @@ -10536,7 +11336,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \subsection{Checking for a new table cell} % \begin{macro}{\LWR@tabledatacolumntag} -% Open a new \acro{HTML} table cell unless the next token is for a macro +% Open a new \HTML\ table cell unless the next token is for a macro % which does not create data, such as |\hline|, |\toprule|, etc: % \begin{macrocode} \newbool{LWR@exitingtabular} @@ -10668,6 +11468,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % Create the |table| tag: % \begin{macrocode} \global\booltrue{LWR@intabularmetadata}% +\LWR@forcenewpage \LWR@htmlblocktag{table}% % \end{macrocode} % Parse the table columns: @@ -10778,7 +11579,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \smallskip % \begin{description}[nosep] % \raggedright -% \item [Original \LaTeX:] \hfill (print and \acro{HTML}) +% \item [Original \LaTeX:] \hfill (print and \HTML) % \begin{description} % \item [\cs{refstepcounter}:] Steps the couunter and sets \cs{@currentlabel}. % \item [\cs{@currentlabel}:] \cs{p@<ctr>}\cs{the<ctr>} Updated by \cs{refstepcounter}. @@ -10789,9 +11590,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \item [\cs{ref}:] Returns the first part of \cs{r@<label>}. % \item [\cs{pageref}:] Returns the second part of \cs{r@<label>}. % \end{description} -% \item [Added by \pkg{lwarp}:] \hfill (\acro{HTML} only) +% \item [Added by \pkg{lwarp}:] \hfill (\HTML\ only) % \begin{description} -% \item [\cs{label}:] Adds \acro{HTML} tags (\cref{sec:labels}), +% \item [\cs{label}:] Adds \HTML\ tags (\cref{sec:labels}), % plus \cs{splabel} data (\cref{sec:zrefsetup}): % \begin{description} % \item [zLWR@name:] The section name for this label. @@ -10801,16 +11602,16 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{description} % \item [\cs{nameref}:] Emualted from \pkg{hyperref} for \pkg{lwarp}. % See \cref{sec:references}. -% \item [\cs{ref} and \cs{nameref}:] Adds \acro{HTML} tags. +% \item [\cs{ref} and \cs{nameref}:] Adds \HTML\ tags. % See \cref{sec:references}. % \end{description} -% \item [Added by \pkg{amsmath}:] \hfill (print and \acro{HTML}) +% \item [Added by \pkg{amsmath}:] \hfill (print and \HTML) % \begin{description} % \item [\cs{label}:] Execution is delayed until the math environment is completed. % \item [\cs{ltx@label}:] \LaTeX\ \cs{label}, -% (\acro{HTML:}patched by \pkg{lwarp},) later patched by \pkg{cleveref}. +% (\HTML: patched by \pkg{lwarp},) later patched by \pkg{cleveref}. % \end{description} -% \item [Added by \pkg{cleverref}:] \hfill (print and \acro{HTML}) +% \item [Added by \pkg{cleverref}:] \hfill (print and \HTML) % \begin{description} % \item [\cs{refstepcounter:}] Added: sets \cs{cref@currentlabel}. % \item [\cs{cref@currentlabel}:] (|<type>|=|<ctr>| unless an alias is used): @@ -10825,7 +11626,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \item [Cross-referencing names:] \cs{crefname} and \cs{Crefname} assign % human-readable names for references to this counter type. % \end{description} -% \item [Additionally patched by \pkg{lwarp}:] \hfill (\acro{HTML} only) +% \item [Additionally patched by \pkg{lwarp}:] \hfill (\HTML\ only) % \begin{description} % \item [\cs{cref}, etc.:] Modified for \pkg{lwarp}. % See \cref{sec:cleveref}. @@ -10983,18 +11784,18 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macro}{\LWR@subsublabel} \marg{label} \quad -% Creates an \acro{HTML} id tag. +% Creates an \HTML\ id tag. % \begin{macrocode} \newcommand*{\LWR@subsublabel}[1]{% % \end{macrocode} -% Create an \acro{HTML} id tag unless are inside a lateximage, +% Create an \HTML\ id tag unless are inside a lateximage, % since it would appear in the image: % \begin{macrocode} \ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}% {}% {% not lateximage % \end{macrocode} -% If not doing a lateximage, create an \acro{HTML} ID tag: +% If not doing a lateximage, create an \HTML\ ID tag: % (To be factored\dots) % \begin{macrocode} \ifbool{LWR@doingstartpars}% @@ -11020,7 +11821,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % % \begin{macro}{\LWR@newlabel} \marg{label} \oarg{type} % -% \cs{label} during \acro{HTML} output when not in math mode, +% \cs{label} during \HTML\ output when not in math mode, % removing extra spaces around the label, as done by regular \LaTeX\ \cs{label}. % % \pkg{clevereref} later encases this to add its own cross-referencing. @@ -11060,12 +11861,14 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macro}{\LWR@startref} \marg{label} \quad % (Common code for |\ref| and |\nameref|.) % -% Open an \acro{HTML} tag reference to a filename, \# character, and a label. +% Open an \HTML\ tag reference to a filename, \# character, and a label. +% +% \changes{v0.28}{2017/04/13}{Removed space.} % % \begin{macrocode} \newcommand*{\LWR@startref}[1] {% -\edef\LWR@lidref{\LWR@lateximagedepthref{#1}} +\edef\LWR@lidref{\LWR@lateximagedepthref{#1}}% \LWR@traceinfo{LWR@startref A: !#1!}% % \end{macrocode} % Create the filename part of the link: @@ -11087,7 +11890,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % so create a link with an unknown destination: % \begin{macrocode} {% -\LWR@traceinfo{LWR@startref D0: ??} +\LWR@traceinfo{LWR@startref D0: ??}% ??}% % \end{macrocode} % If |LWR@lateximagedepth| is known. @@ -11188,7 +11991,7 @@ lateximage\LWR@lateximagenumberref{#1}% % \begin{macro}{\Nameref} \marg{label} -% In print, adds the page number. In \acro{HTML}, does not. +% In print, adds the page number. In \HTML, does not. % \begin{macrocode} \let\Nameref\nameref % \end{macrocode} @@ -11220,7 +12023,7 @@ lateximage\LWR@lateximagenumberref{#1}% % Create a link with a text name: % \begin{macro}{\LWR@subhyperref} \marg{URL} \marg{text} -% \changes{v0.18}{2016/04/14}{Improved HTML output linebreaks.} +% \changes{v0.18}{2016/04/14}{Improved \HTML\ output linebreaks.} % \begin{macrocode} \NewDocumentCommand{\LWR@subhyperref}{m +m}{% \LWR@htmltag{a href="{#1}" target="\_{}blank"\LWR@orignewline}#2\LWR@htmltag{/a}% @@ -11230,7 +12033,7 @@ lateximage\LWR@lateximagenumberref{#1}% % \end{macro} % \begin{macro}{\LWR@subhyperrefclass} \marg{URL} \marg{text} \marg{htmlclass} -% \changes{v0.18}{2016/04/14}{Improved HTML output linebreaks.} +% \changes{v0.18}{2016/04/14}{Improved \HTML\ output linebreaks.} % \begin{macrocode} \NewDocumentCommand{\LWR@subhyperrefclass}{m +m m}{% \LWR@htmltag{a href="{#1}" @@ -11376,6 +12179,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % Begins a \cs{newfloat} environment. % \begin{macrocode} \NewDocumentCommand{\LWR@floatbegin}{m o}{% +\ifthenelse{\boolean{FormatWordProcessor}\AND\boolean{HTMLMarkFloats}}{% + +=== #1 begin + +}{}% \LWR@stoppars % \end{macrocode} % There is a new float, so increment the unique float counter: @@ -11391,7 +12199,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macrocode} \LWR@origraggedright % \end{macrocode} -% Open an \acro{HTML} |figure| tag: +% Open an \HTML\ |figure| tag: % \begin{macrocode} \LWR@htmltag{figure id="autofloat-\arabic{LWR@thisfloat}" class="#1"} % \end{macrocode} @@ -11424,6 +12232,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \endgroup% \boolfalse{LWR@freezethisfloat}% \LWR@startpars% +\ifthenelse{\boolean{FormatWordProcessor}\AND\boolean{HTMLMarkFloats}}{% + +=== end + +}{}% } % \end{macrocode} % \end{macro} @@ -11493,16 +12306,16 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \subsubsection{Caption and LOF linking and tracking} -% When a new \acro{HTML} file is marked in the \LaTeX\ \acro{PDF} file, +% When a new \HTML\ file is marked in the \LaTeX\ \PDF\ file, % the \LaTeX\ page number at that point is stored in |LWR@latestautopage|, % (and the associated filename is remembered by the special \LaTeX\ labels). -% This page number is used to generate an |autofloat| \acro{HTML} \acro{ID} -% in the \acro{HTML} output at the start of the new \acro{HTML} file. -% Meanwhile, there is a float counter used to generate an \acro{HTML} |autofloat| -% \acro{ID}s at the start of the float itself in the \acro{HTML} file. +% This page number is used to generate an |autofloat| \HTML\ \tag{id} +% in the \HTML\ output at the start of the new \HTML\ file. +% Meanwhile, there is a float counter used to generate an \HTML\ |autofloat| +% \tag{id} at the start of the float itself in the \HTML\ file. % The |autopage| and |autofloat| values to use for each float are written to the % |.lof|, etc. files just before each float's entry. These values are used -% by \cs{l@figure}, etc. to create the \acro{HTML} links in the List of Figures, etc. +% by \cs{l@figure}, etc. to create the \HTML\ links in the List of Figures, etc. % % \DescribeCounter{LWR@nextautofloat} Tracks autofloat for floats. % \DescribeCounter{LWR@nextautopage} Tracks autopage for floats. @@ -11518,7 +12331,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % % This is written to the |.lof| file just before each float's usual entry. % The autopage and autofloat are remembered for \cs{l@figure} to use when -% creating the \acro{HTML} links. +% creating the \HTML\ links. % % \begin{macrocode} \newcommand*{\LWRsetnextfloat}[2]{% @@ -11529,11 +12342,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \end{macro} % \DescribeCounter{LWR@latestautopage} -% Updated each time a new \acro{HTML} file is begun. +% Updated each time a new \HTML\ file is begun. % \cs{LWRsetnextfloat} is written with this and the autofloat % by the modified \cs{addcontentsline} just before each float's entry. % \begin{macrocode} -\newcounter{LWR@latestautopage}% updated each new HTML file +\newcounter{LWR@latestautopage} \setcounter{LWR@latestautopage}{1} % \end{macrocode} @@ -11544,7 +12357,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \end{macrocode} % \begin{macro}{\LWR@caption@begin} -% Low-level patches to create \acro{HTML} tags for captions. +% Low-level patches to create \HTML\ tags for captions. % \begin{macrocode} \newcommand{\LWR@caption@begin} { @@ -11563,7 +12376,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}% \RenewDocumentCommand{\parbox}{O{t} o O{t} m +m}{##5}% % \end{macrocode} -% Enclose the original caption code inside an \acro{HTML} tag: +% Enclose the original caption code inside an \HTML\ tag: % \begin{macrocode} \LWR@htmlblocktag{figcaption}% \LWR@origcaption@begin% @@ -11572,13 +12385,13 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \end{macro} % \begin{macro}{\LWR@caption@end} -% Low-level patches to create \acro{HTML} tags for captions. +% Low-level patches to create \HTML\ tags for captions. % \begin{macrocode} \newcommand{\LWR@caption@end} {% \LWR@origcaption@end% % \end{macrocode} -% Subcaptions were being over-written by the closing \acro{HTML} tag: +% Subcaptions were being over-written by the closing \HTML\ tag: % \begin{macrocode} \vspace*{\baselineskip}% % \end{macrocode} @@ -11594,7 +12407,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macro}{\caption@begin} % \begin{macro}{\caption@end} -% Low-level patches to create \acro{HTML} tags for captions. +% Low-level patches to create \HTML\ tags for captions. % \begin{macrocode} \AtBeginDocument{ \let\caption@begin\LWR@caption@begin @@ -11607,7 +12420,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macro}{\captionlistentry} % Tracks the float number for this caption used outside a float. -% Patched to create an \acro{HTML} anchor. +% Patched to create an \HTML\ anchor. % \begin{macrocode} \let\LWR@origcaptionlistentry\captionlistentry @@ -11656,7 +12469,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macro}{\captionof} % Patched to track the float number since this is used outside a float, -% and also create an \acro{HTML} anchor for the virtual float. +% and also create an \HTML\ anchor for the virtual float. % \begin{macrocode} \AtBeginDocument{ \let\LWR@origcaptionof\captionof @@ -11685,13 +12498,13 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % % The |.toc|, |.lof|, and |.lot| files are named by the source code \cs{jobname}. % -% In \acro{HTML}, the printed tables are placed inside a div of class |.toc|, |.lof|, or |.lot|. +% In \HTML, the printed tables are placed inside a div of class |.toc|, |.lof|, or |.lot|. % % A ``sidetoc'' is provided which prints a subset of the TOC on the side of each page other % than the homepage. % % The regular \LaTeX{} infrastructure is used for TOC, -% along with some patches to generate \acro{HTML} output. +% along with some patches to generate \HTML\ output. % \codehtml % \begin{macrocode} @@ -11704,13 +12517,13 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macro}{\LWR@myshorttoc} \marg{toc/lof/lot} % \changes{v0.18}{2016/05/19}{Reorganize \cs{HomeHTMLFilename} logic.} % -% Reads in and prints the \acro{TOC}/\acro{LOF}/\acro{LOT} at the current position. +% Reads in and prints the \TOC/\LOF/\LOT\ at the current position. % While doing so, makes the |@| character into a normal letter to allow % formatting commands in the section names. % Unlike in regular \LaTeX{}, the file is not reset after being read, since -% the \acro{TOC} may be referred to again in each \acro{HTML} page, and is -% used for the side\acro{TOC}. +% the \TOC\ may be referred to again in each \HTML\ page, and is +% used for the side\TOC. % \begin{macrocode} \newcommand*{\LWR@myshorttoc}[1]{ \LWR@ensuredoingapar @@ -11736,7 +12549,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \fi \makeatletter % \end{macrocode} -% Read in the \acro{TOC} file: +% Read in the \TOC\ file: % \begin{macrocode} \@input{\jobname.#1} % \makeatother @@ -11769,7 +12582,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macrocode} \@ifundefined{chapter}{\section*{#2}}{\chapter*{#2}} % \end{macrocode} -% Create a new \acro{HTML} |nav| containing the TOC/LOF/LOT: +% Create a new \HTML\ |nav| containing the TOC/LOF/LOT: % \begin{macrocode} \LWR@htmlelementclass{nav}{#1} % \end{macrocode} @@ -11785,7 +12598,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \end{macro} % -% Patch \cs{@starttoc} to encapsulate the \acro{TOC} inside \acro{HTML} tags: +% Patch \cs{@starttoc} to encapsulate the \TOC\ inside \HTML\ tags: % \begin{macrocode} \let\LWR@orig@starttoc\@starttoc @@ -11802,24 +12615,35 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \let\LWR@origtableofcontents\tableofcontents \let\LWR@origlistoffigures\listoffigures \let\LWR@origlistoftables\listoftables + \renewcommand*{\tableofcontents}{% % \end{macrocode} -% Copy the |.toc| file to |.sidetoc| for printing the sidetoc. +% Do not print the table of contents if formatting for a word processor, +% which will presumably auto-generate its own updated table of contents: +% \begin{macrocode} +\ifbool{FormatWordProcessor}{}{ +% \end{macrocode} +% Copy the |.toc| file to |.sidetoc| for printing the side\TOC. % The original |.toc| file is renewed when \cs{tableofcontents} is finished. % \begin{macrocode} \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 } +} % \end{macrocode} @@ -11849,11 +12673,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % % It may be renamed by redefining \cs{sidetocname}, and may contain paragraphs. % -% \acro{CSS} may be used to format the sideTOC: +% \CSS\ may be used to format the sideTOC: % % \begin{docsidebar}[CSS related to sideTOC:] +% \raggedright % \begin{description}[parsep=0ex] -% \item [|nav.sidetoc|:] The entire sideTOC. +% \item [|nav.sidetoc|:] The entire side\TOC. % \item [|div.sidetoctitle|:] The title. % \item [|div.sidetoccontents|:] The table of contents. % \end{description} @@ -11878,7 +12703,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \end{macrocode} % \begin{macro}{\sidetocname} -% Holds the default name for the sidetoc. +% Holds the default name for the side\TOC. % % \begin{macrocode} \newcommand{\sidetocname}{Contents} @@ -11899,10 +12724,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % Creates the actual side-TOC. % \begin{macrocode} \newcommand*{\LWR@sidetoc}{ +\LWR@forcenewpage \LWR@stoppars % \end{macrocode} -% The entire sideTOC is placed into a |nav| of class |sidetoc|. +% The entire side\TOC\ is placed into a |nav| of class |sidetoc|. % \begin{macrocode} \LWR@htmlelementclass{nav}{sidetoc} @@ -11966,8 +12792,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}{% \LWR@startpars% % \end{macrocode} -% Create an \acro{HTML} link to filename\#autosec-(page), with text of the caption, -% of the given \acro{HTML} class. +% Create an \HTML\ link to filename\#autosec-(page), with text of the caption, +% of the given \HTML\ class. % \begin{macrocode} \LWR@subhyperrefclass{% \LWR@htmlrefsectionfilename{autopage-#4}\#autosec-#4}{#3}{toc#2}% @@ -11978,13 +12804,13 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \end{macrocode} % \end{macro} -% \DescribeCounter{lofdepth} \acro{TOC} depth for figures. +% \DescribeCounter{lofdepth} \TOC\ depth for figures. % \begin{macrocode} \newcounter{lofdepth} \setcounter{lofdepth}{1} % \end{macrocode} -% \DescribeCounter{lotdepth} \acro{TOC} depth for tables. +% \DescribeCounter{lotdepth} \TOC\ depth for tables. % \begin{macrocode} \newcounter{lotdepth} \setcounter{lotdepth}{1} @@ -12022,9 +12848,9 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifthenelse{\cnttest{#1}{<=}{\arabic{#3depth}}}{% \LWR@startpars% % \end{macrocode} -% Create an \acro{HTML} link to +% Create an \HTML\ link to % filename\#autofloat-(float number), with text of the caption, -% of the given \acro{HTML} class. +% of the given \HTML\ class. % \begin{macrocode} \LWR@subhyperrefclass{% \LWR@htmlrefsectionfilename{autopage-\arabic{LWR@nextautopage}}% @@ -12057,18 +12883,33 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% -% \section{Index} +% \section{Index and glossary} % See:\\ % \href{http://tex.stackexchange.com/questions/187038/how-to-mention-section-number-in-index-created-by-imakeidx} % {\texttt{http://tex.stackexchange.com/questions/187038/\\ % \hspace*{2em}how-to-mention-section-number-in-index-created-by-imakeidx}} +% Index links are tracked by the counter |LWR@autoindex|. +% This counter is used to create a label for each index entry, and +% a reference to this label for each entry in the index listing. +% This method allows each index entry to link directly to its exact position in the document. + % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} + +% \begin{macrocode} +\newcounter{LWR@autoindex} +\setcounter{LWR@autoindex}{0} + +\newcounter{LWR@autoglossary} +\setcounter{LWR@autoglossary}{0} +% \end{macrocode} + + % \begin{macro}{\LWR@indexsection} % % Controls whether the index will be in a section or a chapter, depending on @@ -12133,6 +12974,35 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \end{macro} +% \begin{macro}{\@wrindex} \marg{term} \qquad +% Redefined to write the |LWR@latestautopage| counter instead of |page| +% \changes{v0.28}{2017/04/13}{Improved indexing.} +% \begin{macrocode} +\def\@wrindex#1{% +\addtocounter{LWR@autoindex}{1}% +\LWR@newlabel{LWRindex-\theLWR@autoindex}% +\protected@write\@indexfile{}% +{\string\indexentry{#1}{\theLWR@autoindex}}% +\endgroup +\@esphack} +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\@wrglossary} \marg{term} \qquad +% Redefined to write the |LWR@latestautopage| counter instead of |page| +% \begin{macrocode} +\def\@wrglossary#1{% +\addtocounter{LWR@autoglossary}{1}% +\LWR@newlabel{LWRglossary-\theLWR@autoglossary}% +\protected@write\@glossaryfile{}% +{\string\glossaryentry{#1}{\theLWR@autoglossary}}% +\endgroup +\@esphack} +% \end{macrocode} +% \end{macro} + + % \begin{macro}{\hyperindexref} \marg{autosecnumber} % @@ -12140,18 +13010,10 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % the xindy style file |lwarp_html.xdy| % % \changes{v0.20}{2016/12/19}{Print mode provided in case hyperref not used.} +% \changes{v0.28}{2017/04/13}{Improved indexing.} % \begin{macrocode} \newcommand*{\hyperindexref}[1]{ -\LWR@htmltag{a href="% -% \end{macrocode} -% Create an \acro{HTML} reference to the autosection: -% \begin{macrocode} -\LWR@htmlrefsectionfilename{autopage-#1}\#autosec-#1"{}}% -% \end{macrocode} -% Add the section number and section name, then close the tag: -% \begin{macrocode} -\LWR@origref{autopage-#1}\enskip\LWR@nameref{autopage-#1}% -\LWR@htmltag{/a}% +\nameref{LWRindex-#1}% } % \end{macrocode} % \end{macro} @@ -12205,7 +13067,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \DescribeMacro{\$} -% Plain dollar signs appearing in the \acro{HTML} output may be interpreted +% Plain dollar signs appearing in the \HTML\ output may be interpreted % by MathJax to be math shifts. % For a plain text dollar |\$|, print it inside a span to avoid % it being interpreted by MathJax, unless are inside a lateximage, @@ -12226,7 +13088,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % % \DescribeCounter{LWR@externalfilecnt} -% Counter for the external files which are generated and then referenced from the \acro{HTML}: +% Counter for the external files which are generated and then referenced from the \HTML: % \begin{macrocode} \newcounter{LWR@externalfilecnt} % \end{macrocode} @@ -12237,12 +13099,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macrocode} \let\LWR@origdollar=$ -\let\secondorigdollar=$% balance for editor syntax highlighting +\let\LWR@secondorigdollar=$% balance for editor syntax highlighting % \end{macrocode} % \begin{macrocode} \let\LWR@origopenparen\( \let\LWR@origcloseparen\) +\let\LWR@origopenbracket\[ +\let\LWR@origclosebracket\] % \end{macrocode} % \DescribeObject{\$} @@ -12362,7 +13226,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % and number for the following equations. % % These MathJax commands are printed inside ``\cs{(}'' and ``\cs{)}'' characters. -% They are printed to \acro{HTML} output, not interpreted by \LaTeX. +% They are printed to \HTML\ output, not interpreted by \LaTeX. % \begin{macrocode} \newcommand*{\LWR@syncmathjax}{% % \end{macrocode} @@ -12391,7 +13255,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \addtocounter{LWR@nextequation}{1} % \end{macrocode} % Place the MathJax command inside ``\cs{(}'' and ``\cs{)}'' characters, -% to be printed to \acro{HTML}, not interpreted by \LaTeX. +% to be printed to \HTML, not interpreted by \LaTeX. % \begin{macrocode} \BlockClassSingle{hidden}{ \textbackslash( @@ -12407,7 +13271,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macro}{\LWR@restoremathlatexformatting} -% While producing math, use regular \LaTeX\ formatting instead of \acro{HTML} tags. +% While producing math, use regular \LaTeX\ formatting instead of \HTML\ tags. % \begin{macrocode} \newcommand*{\LWR@restoremathlatexformatting}{% \let\hspace\LWR@orighspace% @@ -12434,17 +13298,17 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macro}{\LWR@hidelatexequation} \marg{environment} \marg{contents} % % Creates the \LaTeX{} version of the equation -% inside an \acro{HTML} comment. +% inside an \HTML\ comment. % \begin{macrocode} \NewDocumentCommand{\LWR@hidelatexequation}{m +m}{% % \end{macrocode} -% Stop \acro{HTML} paragraph handling and open an \acro{HTML} comment: +% Stop \HTML\ paragraph handling and open an \HTML\ comment: % \begin{macrocode} \LWR@stoppars \LWR@htmlopencomment % \end{macrocode} -% Start the LaTeX math environment inside the \acro{HTML} comment: +% Start the LaTeX math environment inside the \HTML\ comment: % \begin{macrocode} \begingroup \csuse{LWR@orig#1} @@ -12454,22 +13318,22 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macrocode} \LWR@restoremathlatexformatting % \end{macrocode} -% ^^A When a label is encountered, the HTML comment is closed, +% ^^A When a label is encountered, the \HTML\ comment is closed, % ^^A the label is generated in an HTML-output context, -% ^^A then the HTML comment is opened again. +% ^^A then the \HTML\ comment is opened again. % See \cs{LWR@htmlmathlabel} in \cref{sec:amsmathsupport}. % % Print the contents of the equation: % \begin{macrocode} #2 % \end{macrocode} -% End the \LaTeX{} math environment inside the \acro{HTML} comment: +% End the \LaTeX{} math environment inside the \HTML\ comment: % \begin{macrocode} \csuse{LWR@origend#1} \endgroup % \end{macrocode} -% Close the \acro{HTML} comment and resume \acro{HTML} paragraph handling: +% Close the \HTML\ comment and resume \HTML\ paragraph handling: % \begin{macrocode} \LWR@htmlclosecomment \LWR@startpars @@ -12483,7 +13347,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % % Given the name of a math environment and its contents, % create a MathJax instance. -% The contents are printed to \acro{HTML} output, not interpreted by \LaTeX. +% The contents are printed to \HTML\ output, not interpreted by \LaTeX. % \begin{macrocode} \NewDocumentCommand{\LWR@addmathjax}{m +m}{% @@ -12492,7 +13356,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macrocode} \textbackslash{}begin\{#1\} % \end{macrocode} -% Print the contents, sanitizing for \acro{HTML} special characters. +% Print the contents, sanitizing for \HTML\ special characters. % \begin{macrocode} \LWR@HTMLsanitizeexpand{\detokenize\expandafter{#2}} % \end{macrocode} @@ -12527,16 +13391,16 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % which stores the contents of its environment in a % macro called \cs{BODY}. % -% For \acro{SVG} math output, +% For \SVG\ math output, % the contents are typeset using the original \env{equation} % inside a \env{lateximage}, along with an ALT tag % containing a detokenized copy of the \LaTeX\ source for % the math. % % For MathJax output, the contents are typeset in an -% original \env{equation} environment placed inside a \acro{HTML} +% original \env{equation} environment placed inside a \HTML\ % comment, with special processing for \cs{label}s. -% The contents are also printed to the \acro{HTML} output +% The contents are also printed to the \HTML\ output % for processing by the MathJax script. % \begin{macrocode} \NewEnviron{equation}{% @@ -12552,13 +13416,13 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macrocode} \LWR@syncmathjax % \end{macrocode} -% Print the \LaTeX\ math inside an \acro{HTML} comment: +% Print the \LaTeX\ math inside an \HTML\ comment: % \begin{macrocode} \LWR@hidelatexequation{equation}{\BODY} } % \end{macrocode} % SVG output: -% Create the |lateximage| along with an \acro{HTML} ALT tag +% Create the |lateximage| along with an \HTML\ ALT tag % having an equation number, the \LaTeX{} equation environment % commmands, and the contents of the environment's \cs{BODY}. % \begin{macrocode} @@ -12580,7 +13444,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% } % \end{macrocode} -% After the environment, if MathJax, print the math to the \acro{HTML} output +% After the environment, if MathJax, print the math to the \HTML\ output % for MathJax processing: % \begin{macrocode} }[\ifbool{mathjax}{\LWR@addmathjax{equation}{\BODY}}{}] @@ -12622,7 +13486,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \LWR@traceinfo{LWR@htmlmathlabel #1}% \ifbool{mathjax}{% % \end{macrocode} -% The combined \LaTeX\ \& \acro{HTML} label is printed in a \cs{text} field: +% The combined \LaTeX\ \& \HTML\ label is printed in a \cs{text} field: % \begin{macrocode} \text{ % \end{macrocode} @@ -12631,9 +13495,9 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macrocode} \ifbool{LWR@amsmultline}{}{\hspace*{\totwidth@}} % \end{macrocode} -% Temporarily end the \acro{HTML} comment, -% insert the \LaTeX{} \& \acro{HTML} label, then -% resume the \acro{HTML} comment. +% Temporarily end the \HTML\ comment, +% insert the \LaTeX{} \& \HTML\ label, then +% resume the \HTML\ comment. % \cs{@firstofone} is required to remove extra braces % introduced by the \pkg{amsmath} package.) % \begin{macrocode} @@ -12651,7 +13515,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macro}{\LWR@beginhideamsmath} -% Starts hiding \LaTeX\ math inside an \acro{HTML} comment. +% Starts hiding \LaTeX\ math inside an \HTML\ comment. % \begin{macrocode} \newcommand*{\LWR@beginhideamsmath}{ \LWR@stoppars @@ -12665,7 +13529,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \end{macro} % \begin{macro}{\LWR@endhideamsmath} -% Ends hiding \LaTeX\ math inside an \acro{HTML} comment. +% Ends hiding \LaTeX\ math inside an \HTML\ comment. % \begin{macrocode} \newcommand*{\LWR@endhideamsmath}{ \endgroup @@ -12686,14 +13550,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % The following \pkg{amsmath} environments already collect their contents % in \cs{@envbody} for further processing. % -% For \acro{SVG} math: Each envrionment is encapsulated inside a \env{lateximage} environment, +% For \SVG\ math: Each envrionment is encapsulated inside a \env{lateximage} environment, % along with a special |LWRAMSMATHBODY| argument -% telling \env{lateximage} to use as the \acro{HTML} ALT tag the environment's contents which +% telling \env{lateximage} to use as the \HTML\ ALT tag the environment's contents which % were automatically captured by the \AmS{} environment. % % For MathJax: Each environment is syched with \LaTeX's equation numbers, -% typeset with \LaTeX\ inside an \acro{HTML} comment, then -% printed to \acro{HTML} output for MathJax to process. +% typeset with \LaTeX\ inside an \HTML\ comment, then +% printed to \HTML\ output for MathJax to process. % % \begin{environment}{multline} @@ -12931,17 +13795,17 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \section{Lateximages} -% A |\lateximage| is typeset on its own \acro{PDF} page inside an \acro{HTML} comment +% A |\lateximage| is typeset on its own \PDF\ page inside an \HTML\ comment % which starts on the preceeding page and ends on following page, and instructions are written to -% |lateximage.txt| for |lwarpmk| to extract the |\lateximage| from the page of the \acro{PDF} file +% |lateximage.txt| for |lwarpmk| to extract the |\lateximage| from the page of the \PDF\ file % then generate an accompanying |.svg| file image file. Meanwhile, instructions to -% show this image are placed into the \acro{HTML} file after the comment. +% show this image are placed into the \HTML\ file after the comment. % -% An \acro{HTML} span is created to hold both the \acro{HTML} comment, +% An \HTML\ span is created to hold both the \HTML\ comment, % which will have the |pdftotext| conversion, % and also the link to the final |.svg| image. % -% A \LaTeX\ label is used to remember which \acro{PDF} page has the image. +% A \LaTeX\ label is used to remember which \PDF\ page has the image. % A label is used because footnotes, endnotes, and pagenotes may cause the image to appear % at a later time. The label is declared along with the image, and so it correctly remembers % where the image finally ended up. @@ -12982,7 +13846,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % % % \DescribeCounter{LWR@LIpage} -% Used to reference the \acro{PDF} page number of a lateximage +% Used to reference the \PDF\ page number of a lateximage % to be written into |lateximages.txt|. % \begin{macrocode} \newcounter{LWR@LIpage} @@ -13002,7 +13866,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macro}{\LateximageFontSizeName} % \changes{v0.19}{2016/05/29}{Add: User-adjustable math/lateximage font size.} % Declares how large to write text in the |\lateximage|. The |.svg| file text size -% should blend well with the surrounding \acro{HTML} text size. +% should blend well with the surrounding \HTML\ text size. % % \emph{Do not include the leading backslash in the name.} % \begin{macrocode} @@ -13025,7 +13889,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % % Math expressions are converted to |lateximage|s, and some math environments may contain % ``\&'', ``\textless'', or ``\textgreater'', which should not be allowed -% inside an \acro{HTML} ALT tag, so must convert them to \acro{HTML} entities. +% inside an \HTML\ ALT tag, so must convert them to \HTML\ entities. % % Two versions follow, depending on expansion needs. % There may be a better way\dots @@ -13119,7 +13983,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \setcounterpageref{LWR@LIpage}{LWRlateximage\theLWR@lateximagenumber}% \LWR@traceinfo{lateximage: LWR@LIpage is \arabic{LWR@LIpage}}% % \end{macrocode} -% Create an \acro{HTML} span which will hold the comment which contains the |pdftotext| translation +% Create an \HTML\ span which will hold the comment which contains the |pdftotext| translation % of the image's page, and also will hold the link to the |.svg| file: % \begin{macrocode} \LWR@htmltag{span id="lateximage\arabic{LWR@lateximagenumber}" % @@ -13130,13 +13994,13 @@ class="lateximagesource"{}} \LWR@orignewline \immediate\write\LWR@file{|\theLWR@LIpage|\theLWR@externalfilecnt|}% % \end{macrocode} % Place an open comment tag at the bottom of page; footnotes will be above this tag. -% This will hide any traces of the lateximage \acro{PDF} page which were picked up by +% This will hide any traces of the lateximage \PDF\ page which were picked up by % |pdftotext|. % \begin{macrocode} \LWR@htmlopencomment% \addtocounter{LWR@lateximagedepth}{1}% % \end{macrocode} -% Start the new \acro{PDF} page: +% Start the new \PDF\ page: % \begin{macrocode} \LWR@orignewpage% % \end{macrocode} @@ -13145,8 +14009,8 @@ class="lateximagesource"{}} \LWR@orignewline \LWR@origminipage{6in}% \csuse{LWR@orig\LateximageFontSizeName}% % \end{macrocode} -% Temporarily restore formatting to its \acro{PDF} definitions: -% Do not produce \acro{HTML} tags for \cs{hspace}, etc. inside a lateximage. +% Temporarily restore formatting to its \PDF\ definitions: +% Do not produce \HTML\ tags for \cs{hspace}, etc. inside a lateximage. % \begin{macrocode} \let\hspace\LWR@orighspace% \let\rule\LWR@origrule% @@ -13183,13 +14047,13 @@ class="lateximagesource"{}} \LWR@orignewline % \begin{macrocode} {% end of outer-most lateximage % \end{macrocode} -% Finish the lateximage minipage and start a new \acro{PDF} page: +% Finish the lateximage minipage and start a new \PDF\ page: % \begin{macrocode} \LWR@origendminipage% \LWR@orignewpage% \LWR@origscriptsize% % \end{macrocode} -% Close the \acro{HTML} comment which encapsulated any traces of the lateximage picked up by |pdftotext|: +% Close the \HTML\ comment which encapsulated any traces of the lateximage picked up by |pdftotext|: % \begin{macrocode} \LWR@htmlclosecomment{}\LWR@orignewline% \LWR@traceinfo{lateximage: The page after the image is \arabic{page}}% @@ -13219,10 +14083,12 @@ class="lateximagesource"{}} \LWR@orignewline % \begin{macrocode} \LWR@ensuredoingapar% % \end{macrocode} -% Close the \acro{HTML} span which has the |pdftotext| comment and also the link to the |.svg| image: +% Close the \HTML\ span which has the |pdftotext| comment and also the link to the |.svg| image: % \begin{macrocode} \LWR@htmltag{/span}% +\ifbool{HTMLDebugComments}{% \LWR@htmlcomment{End of lateximage}% +}{}% % \LWR@orignewline% Removed to prevent extra space. % \end{macrocode} % Undo one lateximage level: @@ -13253,10 +14119,13 @@ class="lateximagesource"{}} \LWR@orignewline % \begin{environment}{center} -% Replace \env{center} functionality with \acro{CSS} tags: +% Replace \env{center} functionality with \CSS\ tags: % \begin{macrocode} \renewenvironment*{center} -{\BlockClass{center}} +{ +\LWR@forcenewpage +\BlockClass{center} +} {\endBlockClass} % \end{macrocode} % \end{environment} @@ -13264,7 +14133,10 @@ class="lateximagesource"{}} \LWR@orignewline % \begin{environment}{flushright} % \begin{macrocode} \renewenvironment*{flushright} -{\BlockClass{flushright}} +{ +\LWR@forcenewpage +\BlockClass{flushright} +} {\endBlockClass} % \end{macrocode} % \end{environment} @@ -13272,7 +14144,10 @@ class="lateximagesource"{}} \LWR@orignewline % \begin{environment}{flushleft} % \begin{macrocode} \renewenvironment*{flushleft} -{\BlockClass{flushleft}} +{ +\LWR@forcenewpage +\BlockClass{flushleft} +} {\endBlockClass} % \end{macrocode} % \end{environment} @@ -13370,7 +14245,7 @@ class="lateximagesource"{}} \LWR@orignewline % % A scaled image in \LaTeX{} by default takes only as much space % on the page as it -% requires, but \acro{HTML} browsers use as much space as the +% requires, but \HTML\ browsers use as much space as the % \watchout[whitespace] % original unscaled image would have taken, % with the scaled image over- or under-flowing the area. @@ -13379,7 +14254,7 @@ class="lateximagesource"{}} \LWR@orignewline \renewcommand*{\unitspace}{} % \end{macrocode} -% Used to store the user's selected dimensions and \acro{HTML} class. +% Used to store the user's selected dimensions and \HTML\ class. % % The class defaults to ``inlineimage'' unless changed by a |class=xyx| option. % \begin{macrocode} @@ -13397,7 +14272,7 @@ class="lateximagesource"{}} \LWR@orignewline % Set the actions of each of the key/value combinations for % \cs{includegraphics}. Many are ignored. % -% If an optional width was given, set an \acro{HTML} style: +% If an optional width was given, set an \HTML\ style: % \begin{macrocode} \define@key{igraph}{width}{% \setlength{\LWR@igwidth}{#1}% @@ -13427,7 +14302,7 @@ class="lateximagesource"{}} \LWR@orignewline } % \end{macrocode} % -% If an optional height was given, set an \acro{HTML} style: +% If an optional height was given, set an \HTML\ style: % \begin{macrocode} \define@key{igraph}{height}{% \setlength{\LWR@igheight}{#1}% @@ -13558,20 +14433,28 @@ height:\rndprintlength{\LWR@igheight} % \newcommand*{\LWR@expgraphicsfilename}{} % \end{macrocode} -% \begin{macro}{\LWR@includegraphicsb} \oarg{options} \marg{filename} -% \changes{v0.18}{2016/04/14}{Improved HTML output linebreaks.} +% \begin{macro}{\LWR@includegraphicsb} * \oarg{2: options} \oarg{3: options} \marg{4: filename} +% +% \pkg{graphics} syntax is \cs{includegraphics} * \oarg{llx,lly} \oarg{urx,ury} \marg{file} +% +% \pkg{graphicx} syntax is \cs{includegraphics} \oarg{key values} \marg{file} +% +% If |#3| is empty, only one optional argument was given, thus \pkg{graphicx} syntax. +% +% \changes{v0.18}{2016/04/14}{Improved \HTML\ output linebreaks.} % \changes{v0.18}{2016/05/17}{Fix: \cs{linewidth}, \cs{textwidth}, \cs{textheight} % inside a minipage.} % \changes{v0.18}{2016/05/17}{em, ex, \%, px dimensions preserved.} % \changes{v0.18}{2016/05/17}{Add: svgz file extension.} % \changes{v0.20}{2016/08/20}{Fix: \cs{linewidth} in a floatrow.} % \changes{v0.20}{2017/01/12}{Fix: Expands filename.} +% \changes{v0.28}{2017/04/12}{Adapts to \pkg{graphics} syntax.} +% \changes{v0.29}{2017/04/15}{Fix: Error when no optional arguments.} % \begin{macrocode} - -\newcommand*{\LWR@includegraphicsb}[2][] +\NewDocumentCommand{\LWR@includegraphicsb}{s o o m} {% % \end{macrocode} -% Start the image tag on a new line, allow \acro{PDF} output word wrap: +% Start the image tag on a new line, allow \PDF\ output word wrap: % \begin{macrocode} \LWR@origtilde \LWR@orignewline% % \end{macrocode} @@ -13595,7 +14478,7 @@ height:\rndprintlength{\LWR@igheight} % % |\detokenize\expandafter| allows underscore characters in filenames. % % \begin{macrocode} -\edef\LWR@expgraphicsfilename{#2} +\edef\LWR@expgraphicsfilename{#4} \renewcommand*{\LWR@imageextension}{}% \IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR@expgraphicsfilename.jpg}% {\renewcommand*{\LWR@imageextension}{.jpg}}{}% @@ -13619,7 +14502,7 @@ height:\rndprintlength{\LWR@igheight} % {\renewcommand*{\LWR@imageextension}{.SVGZ}}{}% % \end{macrocode} % -% Convert a \acro{PDF} extension to \acro{SVG}, leave the result in |\LWR@strresult|: +% Convert a \PDF\ extension to \SVG, leave the result in |\LWR@strresult|: % % Must also |\detokenize| |.pdf| and |.svg| comparison strings. % \begin{macrocode} @@ -13646,12 +14529,15 @@ height:\rndprintlength{\LWR@igheight} % \renewcommand*{\LWR@igclass}{inlineimage}% % \end{macrocode} % -% Options are in |#1| -% +% If |#3| is empty, only one optional argument was given, thus \pkg{graphicx} syntax: % \begin{macrocode} -\setkeys{igraph}{#1}% +\IfValueTF{#3}{}{% +\IfValueTF{#2}% +{\setkeys{igraph}{#2}}% +{\setkeys{igraph}{}}% +}% % \end{macrocode} -% Create the \acro{HTML} reference with the graphicspath, filename, extension, +% Create the \HTML\ reference with the graphicspath, filename, extension, % alt tag, style, and class. % % The \cs{LWR@origtilde} adds space between tags in case this @@ -13711,7 +14597,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % Handles width and height, converted to fixed width and heights. -% Converts any |.pdf| references to |.svg| for \acro{HTML} +% Converts any |.pdf| references to |.svg| for \HTML\ % The user should always refer to |.pdf| in the document source. @@ -13719,7 +14605,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \renewcommand*{\includegraphics} {% % \end{macrocode} -% This graphic should trigger an \acro{HTML} paragraph even if alone, +% This graphic should trigger an \HTML\ paragraph even if alone, % so ensure that are doing paragraph handling: % \begin{macrocode} \LWR@ensuredoingapar% @@ -13760,7 +14646,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \begin{macro}{\LWR@originname} \marg{letter} % % Given one \LaTeX{} origin key value, -% translate into an \acro{HTML} origin word: +% translate into an \HTML\ origin word: % \begin{macrocode} \newcommand*{\LWR@originname}[1]{% \ifthenelse{\equal{#1}{t}}{top}{}% @@ -13776,7 +14662,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \begin{macro}{\LWR@originnames} \marg{letters} % % Given one- or two-letter \LaTeX{} origin key values, -% translate into \acro{HTML} origin words: +% translate into \HTML\ origin words: % \begin{macrocode} \newcommand*{\LWR@originnames}[1]{% \StrChar{#1}{1}[\LWR@strresult]% @@ -13817,7 +14703,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \begin{macrocode} \setkeys{krotbox}{#1}% % \end{macrocode} -% Select |inline-block| so that \acro{HTML} will transform this span: +% Select |inline-block| so that \HTML\ will transform this span: % \begin{macrocode} \LWR@htmltagc{span style="display: inline-block; % % \end{macrocode} @@ -13853,7 +14739,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \begin{macrocode} \NewDocumentCommand{\LWR@scalebox}{m o m}{% % \end{macrocode} -% Select |inline-block| so that \acro{HTML} will transform this span: +% Select |inline-block| so that \HTML\ will transform this span: % \begin{macrocode} \LWR@htmltagc{span style="display: inline-block; % % \end{macrocode} @@ -13894,7 +14780,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \subsection{Null functions} % -% These functions are not supported by \pkg{lwarp}'s \acro{HTML} conversion. +% These functions are not supported by \pkg{lwarp}'s \HTML\ conversion. % \codehtml % \begin{macrocode} @@ -13916,27 +14802,6 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline - - -% ^^A \RequirePackage[version=3]{mhchem} -% ^^A -% ^^A -% ^^A % use before and after environment hooks -% ^^A \let\LWR@origce\ce -% ^^A -% ^^A \renewcommand{\ce}[1]{ -% ^^A \begin{lateximage} -% ^^A \LWR@origce{#1} -% ^^A \end{lateximage} -% ^^A } -% ^^A -% ^^A -% ^^A \RequirePackage{rsphrase} - - - - - % \section{Cleverref} % \label{sec:cleveref} @@ -13947,9 +14812,9 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \margintag{loading order} % automatically preloaded at the end of the preamble via \cs{AtEndPreamble} % and \cs{AfterEndPreamble}. -% This is done because the \acro{HTML} conversion requires \pkg{cleveref}. +% This is done because the \HTML\ conversion requires \pkg{cleveref}. % The user's document may not require \pkg{cleveref}, thus the user -% may never explicitly load it, so during \acro{HTML} output \pkg{lwarp} loads it last. +% may never explicitly load it, so during \HTML\ output \pkg{lwarp} loads it last. % If the user's document preamble uses \pkg{cleveref} options, or functions such as % \cs{crefname}, then \pkg{cleveref} may be loaded in the user's preamble near the % end, and \pkg{lwarp}'s additional loading of \pkg{cleveref} will have no effect. @@ -14106,7 +14971,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \section{Boxes and Minipages} % -% A \acro{CSS} flexbox is used for minipages and parboxes, +% A \CSS\ flexbox is used for minipages and parboxes, % allowing external and internal vertical positioning. % % @@ -14179,15 +15044,15 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \end{macro} % \begin{macro}{\LWR@subminipage} -% Used to create a \acro{PDF} minipage without creating an \acro{HTML} minipage. +% Used to create a \PDF\ minipage without creating an \HTML\ minipage. % This allows footnotes to appear at the bottom of the minipage instead of -% the bottom of the \acro{HTML} page. +% the bottom of the \HTML\ page. % \begin{macrocode} \newcommand*{\LWR@subminipage}{% \LWR@stoppars \LWR@origminipage{6in} % \end{macrocode} -% |\raggedright| cancels hyphenation, which will be done by \acro{HTML} instead. +% |\raggedright| cancels hyphenation, which will be done by \HTML\ instead. % \begin{macrocode} \LWR@origraggedright% % \end{macrocode} @@ -14211,14 +15076,14 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \end{macro} -% \DescribeBoolean{LWR@minipagefullwidth} Should the next minipage have no \acro{HTML} |width|? +% \DescribeBoolean{LWR@minipagefullwidth} Should the next minipage have no \HTML\ |width|? % \begin{macrocode} \newbool{LWR@minipagefullwidth} \boolfalse{LWR@minipagefullwidth} % \end{macrocode} % % \begin{macro}{\minipagefullwidth} Requests that the next minipage -% have no |width| tag in \acro{HTML}: +% have no |width| tag in \HTML: % \changes{v0.19}{2016/05/28}{Added: No width tag for the next minipage in HTML.} % % \codehtml @@ -14295,6 +15160,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % Create the |<div>| tag with optional alignment style: % \begin{macrocode} \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 ; }{}% @@ -14328,13 +15194,13 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % Set the user-accessible minipage and text width and height values inside the minipage. % These do not affect the actual size of the large minipage created by % \cs{LWR@origminipage} above, but are used by any reference to \cs{linewidth}, etc. -% inside the \acro{PDF} minipage being created here. +% inside the \PDF\ minipage being created here. % \begin{macrocode} \setlength{\linewidth}{#4}% the original width \setlength{\textwidth}{6in}% \setlength{\textheight}{9in}% % \end{macrocode} -% |\raggedright| cancels hyphenation, which will be done by \acro{HTML} instead. +% |\raggedright| cancels hyphenation, which will be done by \HTML\ instead. % \begin{macrocode} \LWR@origraggedright% % \end{macrocode} @@ -14489,8 +15355,9 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \end{macro} % \begin{macro}{\textup} \marg{text} +% \changes{v0.28}{2017/04/13}{Fixed span class.} % \begin{macrocode} -\renewcommand{\textup}[1]{\LWR@htmlspan{textup}{#1}} +\renewcommand{\textup}[1]{\InlineClass{textup}{#1}} % \end{macrocode} % \end{macro} @@ -14671,7 +15538,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \let\LWR@origmedskip\medskip % \end{macrocode} -% Direct-formatting space commands become \acro{HTML} entities: +% Direct-formatting space commands become \HTML\ entities: % \begin{macrocode} \renewcommand*{\,}{\HTMLunicode{202f}} % HTML thin non-breakable space % \end{macrocode} @@ -14715,7 +15582,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \begin{macro}{\newline} -% Uses \acro{HTML} |<br />| tag +% Uses \HTML\ |<br />| tag % \begin{macrocode} \newcommand*{\LWR@newlinebr}{\unskip\LWR@htmltag{br /}\LWR@orignewline}% \let\newline\LWR@newlinebr @@ -14732,6 +15599,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % % Inside |tabular|, |\\| is temporarily changed to \cs{LWR@tabularendofline}. % \begin{macrocode} +\let\LWR@origendofline\\ \NewDocumentCommand{\LWR@endofline}{s o} {% \newline% @@ -14749,7 +15617,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \index{space>horizontal between minipages} % \index{horizontal space>between minipages} % Minipages are often placed side-by-side inside figures, with a bit of -% horizontal space to separate them. Since \acro{HTML} does not allow +% horizontal space to separate them. Since \HTML\ does not allow % a \tag{div} to be inside a |p|, paragraphs must be turned off during the % generation of the minipage, then turned on after the minipage is complete. % When this occurs between side-by-side minipages, |lwarp| correctly @@ -14770,10 +15638,10 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % |LWR@minipagethispar| is set, telling the following horizontal % whitespace commands to try to surpress their surrounding paragraph % tags. |LWR@minipagethispar| is cleared at the next -% end of paragraph, when the \acro{HTML} paragraph closing tag is +% end of paragraph, when the \HTML\ paragraph closing tag is % generated. % -% Placed just before \cs{hspace}, \cs{quad}, or \cs{qquad}'s \acro{HTML} output. +% Placed just before \cs{hspace}, \cs{quad}, or \cs{qquad}'s \HTML\ output. % \begin{macrocode} \newcommand*{\LWR@minipagestartpars}{% \ifbool{LWR@minipagethispar}% @@ -14785,7 +15653,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \end{macro} % \begin{macro}{\LWR@minipagestoppars} -% Placed just after \cs{hspace}, \cs{quad}, or \cs{qquad}'s \acro{HTML} output. +% Placed just after \cs{hspace}, \cs{quad}, or \cs{qquad}'s \HTML\ output. % \begin{macrocode} \newcommand*{\LWR@minipagestoppars}{% \ifbool{LWR@minipagethispar}% @@ -14843,7 +15711,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % Handles special minipage \& horizontal space interactions. % \changes{v0.18}{2016/05/13}{\cs{hspace} supported.} % \changes{v0.19}{2016/05/29}{Fix: \cs{hspace} length computations.} -% \changes{v0.20}{2016/08/22}{Add: Supports HTML thin breakable space.} +% \changes{v0.20}{2016/08/22}{Add: Supports \HTML\ thin breakable space.} % \changes{v0.24}{2017/03/14}{Add: \cs{hspace} \cs{fill} converts to 2em} % % Prints a span of a given width. Ignores the optional star. @@ -14868,7 +15736,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \begin{macrocode} \LWR@minipagestoppars% % \end{macrocode} -% Support the HTML thin wrappable space: +% Support the \HTML\ thin wrappable space: % \begin{macrocode} \ifthenelse{\dimtest{\LWR@tempwidth}{=}{.16667em}} {% @@ -14905,7 +15773,7 @@ span style="width:\printlength{\LWR@tempwidth}; display:inline-block;"% % \begin{macro}{\linebreak} \oarg{num} \qquad -% Inserts an \acro{HTML} |br| tag. +% Inserts an \HTML\ |br| tag. % \begin{macrocode} \renewcommand*{\linebreak}[1][]{\newline} % \end{macrocode} @@ -15001,13 +15869,13 @@ background:\LWR@currenttextcolor; % width:\printlength{\LWR@tempwidth}; % height:\printlength{\LWR@tempheight}; % % \end{macrocode} -% The raise height is converted to a \acro{CSS} transform. -% The |*2| raise multiplier is to approximately match \acro{HTML} output's X height. +% The raise height is converted to a \CSS\ transform. +% The |*2| raise multiplier is to approximately match \HTML\ output's X height. % Conversion to a \LaTeX\ length allows a typical \LaTeX\ expression to be % used as an argument for the raise, whereas printing the raise argument -% directly to \acro{HTML} output without conversion to a \LaTeX\ length +% directly to \HTML\ output without conversion to a \LaTeX\ length % limits the allowable syntax. To do:\ A superior method would compute a -% ratio of \LaTeX\ ex height, then print that to \acro{HTML} with an ex unit. +% ratio of \LaTeX\ ex height, then print that to \HTML\ with an ex unit. % \begin{macrocode} \IfValueTF{#1}% {% @@ -15080,13 +15948,13 @@ display:inline-block;"% % \section{\textbackslash{}LaTeX and other logos} -% Logos for \acro{HTML} and print modes: +% Logos for \HTML\ and print modes: % % Some of these logos may be redefined in a later package, % so after loading other packages, and at the beginning of the document, their definitions % are finally |\let| in |\LWR@LwarpStart|. % -% For \acro{CSS} conversions, see: \\ +% For \CSS\ conversions, see: \\ % \url{http://edward.oconnor.cx/2007/08/tex-poshlet} \\ % \url{http://nitens.org/taraborelli/texlogo} % @@ -15103,9 +15971,9 @@ display:inline-block;"% % \begin{macro}{\TeX} \TeX % \nopagebreak % -% |latexlogo| is a \acro{CSS} class used to properly typeset the E and A in \LaTeX{} and friends. +% |latexlogo| is a \CSS\ class used to properly typeset the E and A in \LaTeX{} and friends. % -% |latexlogofont| is a \acro{CSS} class used to select the font for the rest of the logo in +% |latexlogofont| is a \CSS\ class used to select the font for the rest of the logo in % \LaTeX, \LuaTeX, \ConTeXt, etc. % \begin{macrocode} \newcommand*{\LWR@TeX} @@ -15140,10 +16008,10 @@ display:inline-block;"% % \begin{macro}{\XeLaTeX} \XeTeX, \XeLaTeX % \nopagebreak % -% |xetexlogo| is a \acro{CSS} class which aligns the backwards E in \XeTeX{} and spaces \TeX{} +% |xetexlogo| is a \CSS\ class which aligns the backwards E in \XeTeX{} and spaces \TeX{} % appropriately. % -% |xelatexlogo| is a \acro{CSS} class which aligns the backwards E in \XeLaTeX{} and spaces +% |xelatexlogo| is a \CSS\ class which aligns the backwards E in \XeLaTeX{} and spaces % \LaTeX{} appropriately. % \begin{macrocode} \newcommand*{\Xe} @@ -15174,7 +16042,7 @@ display:inline-block;"% % \begin{macro}{\AmS} \AmS % \nopagebreak % -% |amslogo| is a \acro{CSS} class used for the \AmS logo. +% |amslogo| is a \CSS\ class used for the \AmS logo. % \begin{macrocode} \AtBeginDocument{\DeclareDocumentCommand{\AmS}{} {\InlineClass{amslogo}{\textit{A\textsubscript{M}S}}}} @@ -15188,7 +16056,7 @@ display:inline-block;"% % \begin{macro}{\LyX} \LyX % \nopagebreak % -% |lyxlogo| is a \acro{CSS} class used for the \LyX logo. +% |lyxlogo| is a \CSS\ class used for the \LyX logo. % \begin{macrocode} \newcommand*{\LyX}{\InlineClass{lyxlogo}{LyX}} % \end{macrocode} @@ -15229,7 +16097,7 @@ display:inline-block;"% % \begin{macro}{\LWR@LwarpStart} % \begin{macro}{\LWR@LwarpEnd} -% Automatically sets up the \acro{HTML}-related actions for the start and end of the +% Automatically sets up the \HTML-related actions for the start and end of the % document. % \begin{macrocode} \AfterEndPreamble{\LWR@LwarpStart} @@ -15265,10 +16133,12 @@ display:inline-block;"% % htmlfilename = "" -- or "projectname" if numbered HTML files % \end{Verbatim} % +% \changes{v0.29}{2017/04/15}{File \protect\texttt{lwarpmk.conf}: Add: \protect\texttt{language} option for config files.} +% % Defaults unless already over-ridden by the user: % \begin{macrocode} \providecommand*{\HomeHTMLFileName}{\BaseJobname} -\providecommand*{\HTMLFileName}{} +\providecommand*{\HTMLfiveName}{} \providecommand*{\UseLatexmk}{false} % \end{macrocode} @@ -15296,8 +16166,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} % \end{macrocode} @@ -15370,16 +16241,20 @@ homehtmlfilename = "\HomeHTMLFileName"% % % \cs{BaseJobname} is also written to |<project>_html.tex| as an option % given for the \pkg{lwarp} and \pkg{lwarp-newproject} packages during the -% creation of \acro{HTML} output. +% creation of \HTML\ output. % % \cs{BaseJobname} is the \cs{jobname} of the printed version, even while compiling -% the \acro{HTML} version, where \cs{jobname} has |_html| appended. +% the \HTML\ version, where \cs{jobname} has |_html| appended. % % \DescribeOption[lwarp-newproject]{lwarpmk} Tells |lwarp-newproject| to % generate a local copy of |lwarpmk| called |lwarpmk.lua|. % Useful for archiving for future use. % This file may be made executable and acts just like |lwarpmk|. % +% \DescribeOption[lwarp-newproject]{lwarpmklang} Sets the language to be assigned +% in |lwarpmk|'s configuration files. This is then used by |lwarpmk| while +% processing the glossary. +% % In the document source: % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4,formatcom={\unskip}] % \documentclass{article} % or book, report @@ -15387,7 +16262,7 @@ homehtmlfilename = "\HomeHTMLFileName"% % (font selection, input encoding) % ... % \newcommand*{\HomeHTMLFileName}{index}, or {projectname} -% \newcommand*{\HTMLFileName}{} +% \newcommand*{\HTMLfiveName}{} % \usepackage{lwarp-newproject} % \usepackage{lwarp} % ... @@ -15445,11 +16320,15 @@ homehtmlfilename = "\HomeHTMLFileName"% % \end{macrocode} % Process options: +% +% \changes{v0.29}{2017/04/15}{Add: \protect\texttt{lwarpmklang} option for \pkg{lwarp-newproject}.} +% % \begin{macrocode} \DeclareVoidOption{warpprint}{\booltrue{LWRNP@genconf}} \DeclareVoidOption{warpHTML}{\boolfalse{LWRNP@genconf}} \DeclareVoidOption{lwarpmk}{\includecomment{LWR@createlwarpmk}} \DeclareStringOption[\jobname]{BaseJobname} +\DeclareStringOption[english]{lwarpmklang} \booltrue{LWRNP@genconf}% warpprint @@ -15457,8 +16336,6 @@ homehtmlfilename = "\HomeHTMLFileName"% % \end{macrocode} - - % Assign the \cs{BaseJobname} if the user hasn't provided one: % \begin{macrocode} \providecommand*{\BaseJobname}{\LWRNP@BaseJobname} @@ -15469,7 +16346,7 @@ homehtmlfilename = "\HomeHTMLFileName"% % \ifbool{LWRNP@genconf}{ \providecommand*{\HomeHTMLFileName}{\BaseJobname} % }{} -\providecommand*{\HTMLFileName}{} +\providecommand*{\HTMLfiveName}{} \providecommand*{\UseLatexmk}{false} % \end{macrocode} % @@ -15481,7 +16358,7 @@ homehtmlfilename = "\HomeHTMLFileName"% % \subsection{project\_html.tex} % -% \DescribeFile{project_html.tex} Used to allow an \acro{HTML} version of the +% \DescribeFile{project_html.tex} Used to allow an \HTML\ version of the % document to exist alongside the print version. % % Only write |\jobname_html.tex| if generating the print version. @@ -15509,6 +16386,7 @@ homehtmlfilename = "\HomeHTMLFileName"% % % \DescribeFile{project.lwarpmkconf} The configuration file for |lwarpmk|. % +% \changes{v0.29}{2017/04/15}{File \protect\texttt{*.lwarpmkconf}: Add: \protect\texttt{language} option for config files.} % % \begin{macrocode} \ifbool{LWRNP@genconf}{ @@ -15532,8 +16410,9 @@ homehtmlfilename = "\HomeHTMLFileName"% \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 }{} % \end{macrocode} @@ -15544,10 +16423,10 @@ homehtmlfilename = "\HomeHTMLFileName"% % \subsection{lwarp.css} % \DescribeFile{lwarp.css} -% This is the base \acro{css} layer used by \pkg{lwarp}. +% This is the base \CSS\ layer used by \pkg{lwarp}. % % This must be present both when compiling the project -% and also when distributing the \acro{HTML} files. +% and also when distributing the \HTML\ files. % % \changes{v0.26}{2017/03/30}{\texttt{lwarp.css}: Improved responsive % \texttt{marginpar} and \texttt{marginblock}.} @@ -16742,11 +17621,11 @@ nav.botnavigation { display:none; } % \subsection{lwarp\_sagebrush.css} % \DescribeFile{lwarp_sagebrush.css} -% An optional \acro{css} which may be used for +% An optional \CSS\ which may be used for % a semi-modern appearance. % % If used, this must be present both when compiling the project -% and also when distributing the \acro{HTML} files. +% and also when distributing the \HTML\ files. % % \begin{macrocode} \begin{VerbatimOut}{lwarp_sagebrush.css} @@ -16989,11 +17868,11 @@ nav.sidetoc a:hover {color:#006000 ; text-decoration: none ; text-shadow:0px 0px % \subsection{lwarp\_formal.css} % \DescribeFile{lwarp_formal.css} -% An optional \acro{css} which may be used for +% An optional \CSS\ which may be used for % a more formal appearance. % % If used, this must be present both when compiling the project -% and also when distributing the \acro{HTML} files. +% and also when distributing the \HTML\ files. % % \begin{macrocode} \begin{VerbatimOut}{lwarp_formal.css} @@ -17210,10 +18089,10 @@ nav.botnavigation { % \subsection{sample\_project.css} % \DescribeFile{sample_project.css} -% The project-specific \acro{css} file. Use with \cs{NewCSS}. +% The project-specific \CSS\ file. Use with \cs{NewCSS}. % % If used, this must be present both when compiling the project -% and also when distributing the \acro{HTML} files. +% and also when distributing the \HTML\ files. % % \begin{macrocode} \begin{VerbatimOut}{sample_project.css} @@ -17241,7 +18120,7 @@ nav.botnavigation { % % This must be present when compiling the project, % but does not need to be present when distributing -% the resulting \acro{HTML} files. +% the resulting \HTML\ files. % % \begin{macrocode} \begin{VerbatimOut}{lwarp_html.xdy} @@ -17264,8 +18143,11 @@ nav.botnavigation { % % This must be present when compiling the project, % but does not need to be present when distributing -% the resulting \acro{HTML} files. - +% the resulting \HTML\ files. +% +% \changes{v0.28}{2017/04/11}{File lwarp\_mathjax.txt: Updated CDN repository.} +% +% % \begin{macrocode} \begin{VerbatimOut}{lwarp_mathjax.txt} <!-- https://groups.google.com/forum/#!topic/ @@ -17350,9 +18232,18 @@ MathJax.Hub.Config({ }); </script> +<!-- Alternative CDN provider: --> +<script type="text/javascript" async + src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML-full"> +</script> + +<!-- No longer supported after April 30, 2017: --> +<!-- <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full"> </script> +--> + \end{VerbatimOut} % \end{Verbatim}% for syntax highlighting % \end{macrocode} @@ -17367,12 +18258,13 @@ MathJax.Hub.Config({ \begin{LWR@createlwarpmk} % \end{macrocode} -% \DescribeFile{lwarpmk} Creates a local copy of |lwarpmk|: +% \DescribeProgram{lwarpmk} Creates a local copy of |lwarpmk|: % % \changes{v0.21}{2017/02/11}{lwarpmk: Fix: \protect\texttt{lwarpmk again} for Windows.} % \changes{v0.21}{2017/02/22}{lwarpmk: Fix: \protect\texttt{lwarpmk limages} for Windows.} % \changes{v0.21}{2017/02/22}{lwarpmk: Fix: \protect\texttt{lwarpmk} uses \texttt{lateximages} text file instead of shell script.} -% +% \changes{v0.28}{2017/04/14}{lwarpmk: Add: \protect\texttt{printglossary} and \protect\texttt{htmlglossary} commands.} +% \changes{v0.29}{2017/04/15}{lwarpmk: Add: \protect\texttt{language} option for config files.} % % \begin{macrocode} \begin{VerbatimOut}{lwarpmk.lua} @@ -17382,7 +18274,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.") ; @@ -17393,15 +18285,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. @@ -17422,6 +18316,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". @@ -17464,6 +18359,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.") @@ -17508,6 +18405,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" ) ; @@ -17606,7 +18504,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 @@ -17701,6 +18600,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 @@ -17752,6 +18667,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. @@ -17776,7 +18708,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 () @@ -17784,7 +18716,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 @@ -17863,7 +18795,10 @@ end -- not --version % \begin{macrocode} \AtBeginDocument{ -\BeforeBeginEnvironment{abstract}{\BlockClass{abstract}} +\BeforeBeginEnvironment{abstract}{ +\LWR@forcenewpage +\BlockClass{abstract} +} \AfterEndEnvironment{abstract}{\endBlockClass} } @@ -17981,8 +18916,6 @@ end -- not --version % \begin{macrocode} \LWR@ProvidesPackagePass{algorithmicx} % \end{macrocode} - - % % % Inside the \env{algorithmic} environment, level indenting is converted to a \tag{span} @@ -18046,7 +18979,10 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \begin{macrocode} \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} } % \end{macrocode} @@ -18134,7 +19070,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% } % \end{macrocode} -% Patched to enclose with \acro{CSS}: +% Patched to enclose with \CSS: % \begin{macrocode} \newcommand{\LWR@haveamsthmname}{ \renewcommand{\thmname}[1]{\InlineClass{amsthmname\LWR@thisthmstyle}{##1}} @@ -18153,9 +19089,10 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% \LWR@haveamsthmnote % \end{macrocode} % -% Patches for \acro{CSS}: +% Patches for \CSS: % \begin{macrocode} \def\@begintheorem#1#2[#3]{% +\LWR@forcenewpage% new \BlockClass{amsthmbody\LWR@thisthmstyle}% new \deferred@thm@head{ \the\thm@headfont \thm@indent @@ -18170,7 +19107,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% \ignorespaces} % \end{macrocode} % -% Patched for \acro{CSS}: +% Patched for \CSS: % \begin{macrocode} \def\@endtheorem{\endBlockClass\endtrivlist\@endpefalse } % \end{macrocode} @@ -18185,9 +19122,10 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% } % \end{macrocode} % -% Patched for \acro{CSS}: +% Patched for \CSS: % \begin{macrocode} \renewenvironment{proof}[1][\proofname]{\par +\LWR@forcenewpage% new \BlockClass{amsthmproof}% new \pushQED{\qed}% \normalfont \topsep6\p@\@plus6\p@\relax @@ -18217,7 +19155,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \section{Bookmark} % % \DescribePackage{bookmark} -% \pkg{bookmark} is emulated during \acro{HTML} output, and +% \pkg{bookmark} is emulated during \HTML\ output, and % the \pkg{bookmark} package is ignored. % \changes{v0.20}{2017/01/03}{\pkg{bookmark}: Added.} @@ -18258,7 +19196,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % % % \DescribePackage{booktabs} -% \pkg{booktabs} is emulated during \acro{HTML} output, and +% \pkg{booktabs} is emulated during \HTML\ output, and % the \pkg{booktabs} package is ignored. % \codehtml @@ -18418,7 +19356,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \changes{v0.22}{2017/02/24}{\pkg{dcolumn}: Added.} % % \DescribePackage{dcolumn} -% \pkg{dcolumn} is emulated during \acro{HTML} output, and +% \pkg{dcolumn} is emulated during \HTML\ output, and % the \pkg{dcolumn} package is ignored. % % \begin{macrocode} @@ -18447,7 +19385,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \changes{v0.20}{2017/01/11}{\pkg{draftwatermark}: Added.} % % \DescribePackage{draftwatermark} -% \pkg{draftwatermark} is emulated during \acro{HTML} output, and +% \pkg{draftwatermark} is emulated during \HTML\ output, and % the \pkg{draftwatermark} package is ignored. % \codehtml @@ -18485,7 +19423,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \changes{v0.25}{2017/03/16}{\pkg{ellipsis}: Added.} % % \DescribePackage{ellipsis} -% \pkg{ellipsis} is emulated during \acro{HTML} output, and +% \pkg{ellipsis} is emulated during \HTML\ output, and % the \pkg{ellipsis} package is ignored. % \begin{macrocode} @@ -18635,7 +19573,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % % % \DescribePackage{epigraph} -% \pkg{epigraph} is emulated during \acro{HTML} output, and +% \pkg{epigraph} is emulated during \HTML\ output, and % the \pkg{epigraph} package is ignored. % \codehtml @@ -18669,7 +19607,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% {\endBlockClass} % \end{macrocode} % -% Use \acro{CSS} to format epigraphs. +% Use \CSS\ to format epigraphs. % % The following are null commands for source compatibility: % \begin{macrocode} @@ -18708,7 +19646,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \changes{v0.20}{2017/01/11}{\pkg{eso-pic}: Added.} % % \DescribePackage{eso-pic} -% \pkg{eso-pic} is emulated during \acro{HTML} output, and +% \pkg{eso-pic} is emulated during \HTML\ output, and % the \pkg{eso-pic} package is ignored. % \codehtml @@ -18757,7 +19695,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \changes{v0.20}{2017/01/11}{\pkg{everypage}: Added.} % % \DescribePackage{everypage} -% \pkg{everypage} is emulated during \acro{HTML} output, and +% \pkg{everypage} is emulated during \HTML\ output, and % the \pkg{everypage} package is ignored. % \codehtml @@ -18878,7 +19816,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \label{sec:float} % % \DescribePackage{float} -% \pkg{float} is emulated during \acro{HTML} output, and +% \pkg{float} is emulated during \HTML\ output, and % the \pkg{float} package is ignored. % % \changes{v0.20}{2017/01/22}{Improved float caption type handling.} @@ -18993,14 +19931,13 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% \DeclareDocumentEnvironment{KFLT@marginfloat}{O{-1.2ex} m} {% start \LWR@maybeincthisfloat% -% \BlockClass{marginblock} +\LWR@forcenewpage \LWR@stoppars% \LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}"} \LWR@startpars% \captionsetup{type=#2}% } { -% \endBlockClass \LWR@htmldivclassend{div} } @@ -19032,7 +19969,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \label{sec:floatrow} % % \DescribePackage{floatrow} -% \pkg{floatrow} is emulated during \acro{HTML} output, and +% \pkg{floatrow} is emulated during \HTML\ output, and % the \pkg{floatrow} package is ignored. % \codehtml @@ -19207,6 +20144,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \begin{macrocode} \newenvironment*{floatrow}[1][2] { +\LWR@forcenewpage \BlockClass{floatrow} % \end{macrocode} % While inside the floatrow, divide the \cs{linewidth} by the number of floats. @@ -19308,7 +20246,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % ^^A \begin{macro}{\floatfoot} \marg{text} % % Places additional text inside a float, -% inside a \acro{CSS} \tag{div} of class |floatfoot|. +% inside a \CSS\ \tag{div} of class |floatfoot|. % \begin{macrocode} \NewDocumentCommand{\floatfoot}{s +m}{% \begin{BlockClass}{floatfoot} @@ -19334,6 +20272,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \end{macrocode} % The row of floats is placed into a \tag{div} of class |floatrow|: % \begin{macrocode} +\LWR@forcenewpage \BlockClass{floatrow} % \end{macrocode} % While inside the floatrow, |LWR@insubfloatrow| is set true, @@ -19436,7 +20375,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \changes{v0.26}{2017/03/27}{\pkg{footmisc}: Added.} % % \DescribePackage{footmisc} -% \pkg{footmisc} is emulated during \acro{HTML} output, and +% \pkg{footmisc} is emulated during \HTML\ output, and % the \pkg{footmisc} package is ignored. % % \begin{macrocode} @@ -19625,11 +20564,13 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \begin{macrocode} \renewenvironment{framed}{% +\LWR@forcenewpage \BlockClass{framed}% } {\endBlockClass} \renewenvironment{oframed}{% +\LWR@forcenewpage \BlockClass{framed}% } {\endBlockClass} @@ -19637,18 +20578,21 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% \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 {} @@ -19658,12 +20602,14 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% \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} @@ -19685,6 +20631,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \begin{macrocode} \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]% @@ -19809,6 +20756,39 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \fi % % +% +% +% \clearpage +% +% \iffalse +%<*glossaries> +% \fi +% +% \part{lwarp-glossaries.sty} + +% \section{Glossaries} +% +% \DescribePackage{glossaries} +% \limitsglossaries +% +% \changes{v0.28}{2017/04/14}{\pkg{glossaries}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\PassOptionsToPackage{xindy}{glossaries} +\LWR@ProvidesPackagePass{glossaries} +\setupglossaries{nonumberlist} +\setglossarystyle{index} +% \end{macrocode} +% +% \iffalse +%</glossaries> +% \fi +% +% +% +% % \clearpage % % \iffalse @@ -19820,21 +20800,23 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \section{Graphics} % % \DescribePackage{graphics} -% \pkg{graphics} is not used. -% The user is required to use \pkg{graphicx} instead. - +% \pkg{graphics} is emulated. +% +% \changes{v0.28}{2017/04/12}{\pkg{graphics}: Added.} +% % \codehtml % \begin{macrocode} -\LWR@loadnever{graphics}{graphicx} +\LWR@ProvidesPackageDrop{graphics} % \end{macrocode} - - +% % \iffalse %</graphics> % \fi % % % +% +% % \iffalse %<*graphicx> % \fi @@ -19844,9 +20826,8 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \section{Graphicx} % % \DescribePackage{graphicx} -% \pkg{graphicx} is emulated during \acro{HTML} output, and -% the \pkg{graphicx} package is ignored. - +% \pkg{graphicx} is emulated. +% % \codehtml % \begin{macrocode} \LWR@ProvidesPackageDrop{graphicx} @@ -19870,7 +20851,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \section{Hyperref} % % \DescribePackage{hyperref} -% \pkg{hyperref} is emulated during \acro{HTML} output, and +% \pkg{hyperref} is emulated during \HTML\ output, and % the \pkg{hyperref} package is ignored. % \changes{v0.20}{2017/01/03}{\pkg{hyperref}: Additional user macros.} @@ -19913,7 +20894,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % % % ^^A \begin{macro}{\hyperdef} \marg{1: category} \marg{2: name} \marg{3: text} -% Creates an HTML anchor to |category.name| with the given text. +% Creates an \HTML\ anchor to |category.name| with the given text. % % \begin{macrocode} \NewDocumentCommand{\hyperdef}{m m +m}{% @@ -19928,7 +20909,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % ^^A \begin{macro}{\LWR@hyperrefb} \marg{1: URL} \marg{2: category} % ^^A \marg{3: name} \marg{4: text} % -% Creates an HTML link to |URL#category.name| with the given text. +% Creates an \HTML\ link to |URL#category.name| with the given text. % \begin{macrocode} \NewDocumentCommand{\LWR@hyperrefb}{m m m +m}{% \LWR@htmltag{a href="#1\LWR@hashmark#2.#3"}% @@ -19941,7 +20922,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % ^^A \begin{macro}{\LWR@hyperrefc} \oarg{label} \marg{text} % -% Creates text as an HTML link to the \LaTeX\ label. +% Creates text as an \HTML\ link to the \LaTeX\ label. % \begin{macrocode} \NewDocumentCommand{\LWR@hyperrefc}{O{label} +m}{ \LWR@startref{#1}% @@ -19995,7 +20976,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % ^^A \begin{macro}{\autoref} * \marg{label} % -% For \acro{HTML}, \cs{cleverref} is used instead. +% For \HTML, \cs{cleverref} is used instead. % % \begin{macrocode} \NewDocumentCommand{\autoref}{s m}{% @@ -20007,7 +20988,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % % ^^A \begin{macro}{\autopageref} \marg{label} % -% For \acro{HTML}, \cs{cleverref} is used instead. +% For \HTML, \cs{cleverref} is used instead. % % \begin{macrocode} \NewDocumentCommand{\autopageref}{s m}{% @@ -20308,14 +21289,13 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% \DeclareDocumentEnvironment{KFLT@marginfloat}{O{-1.2ex} m} {% start \LWR@maybeincthisfloat% -% \BlockClass{marginblock} +\LWR@forcenewpage \LWR@stoppars% \LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}"} \LWR@startpars% \captionsetup{type=#2}% } { -% \endBlockClass \LWR@htmldivclassend{div} } % \end{macrocode} @@ -20479,7 +21459,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \changes{v0.25}{2017/03/16}{\pkg{lips}: Added.} % % \DescribePackage{lips} -% \pkg{lips} is emulated during \acro{HTML} output, and +% \pkg{lips} is emulated during \HTML\ output, and % the \pkg{lips} package is ignored. % \begin{macrocode} @@ -20581,6 +21561,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \begin{macrocode} \LWR@traceinfo{About to create verbatim.}% \let\lsthk@EveryPar\relax% +\LWR@forcenewpage \LWR@atbeginverbatim{programlisting}% \let\lsthk@EveryPar\LWR@origlsthkEveryPar% @@ -20676,7 +21657,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% {\begingroup \LWR@traceinfo{at the selected position}% % \end{macrocode} -% These space and box commands are not needed for \acro{HTML} output: +% These space and box commands are not needed for \HTML\ output: % \begin{macrocode} % \let\@@vskip\vskip % \def\vskip{\afterassignment\lst@vskip \@tempskipa}% @@ -20768,32 +21749,21 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % % % \DescribePackage{longtable} -% \pkg{longtable} is emulated during \acro{HTML} output, and +% \pkg{longtable} is emulated during \HTML\ output, and % the \pkg{longtable} package is ignored. % \codehtml % \begin{macrocode} \LWR@ProvidesPackageDrop{longtable} % \end{macrocode} - -% -% To emulate longtable: - -% For longtable |\endhead|, |\endfoot|, and |\endlastfoot| rows, use \\ -% \watchout -% \hspace*{.25in}|\warpprintonly{row contents}|\\ -% instead of \\ -% \hspace*{.25in}|\begin{warpprint}| \ldots |\end{warpprint}|. \\ -% Doing so helps avoid ``Misplaced |\noalign|.'' when using |\begin{warpprint}|. % -% Keep the |\endfirsthead| row, which is still relevent to \acro{HTML} output. +% \limitslongtable % % See: \\ % \href{http://tex.stackexchange.com/questions/43006/why-is-input-not-expandable} % {\texttt{http://tex.stackexchange.com/questions/43006/\\why-is-input-not-expandable}} % - - +% % \begin{environment}{longtable} * \oarg{horizalignment} \marg{colspec} % Emulates the \env{longtable} environment. % @@ -20845,9 +21815,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% \newlength{\LTpost} \newlength{\LTcapwidth} % \end{macrocode} -% |\kill| is ignored, place a |\kill| line inside \\ -% \hspace*{2em}|\begin{warpprint}| \ldots |\end{warpprint}| -% or \cs{warpingprintonly}. +% % \begin{macrocode} \renewcommand*{\kill}{\LWR@tabularendofline} % \end{macrocode} @@ -20901,7 +21869,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % % % \DescribePackage{ltcaption} -% \pkg{ltcaption} is emulated during \acro{HTML} output, and +% \pkg{ltcaption} is emulated during \HTML\ output, and % the \pkg{ltcaption} package is ignored. % \changes{v0.20}{2017/01/29}{\pkg{ltcaption}: Added.} @@ -21145,7 +22113,7 @@ endinnercode={\LWR@stoppars}, % \begin{macrocode} \LWR@stoppars% % \end{macrocode} -% Below, print HTML pt units: +% Below, print \HTML\ pt units: % \begin{macrocode} \uselengthunit{PT}% % \end{macrocode} @@ -21227,7 +22195,7 @@ box-shadow: \renewrobustcmd\mdfframedtitleenv[1]{% \LWR@origmdfframedtitleenv{% % \end{macrocode} -% Below, print HTML pt lengths: +% Below, print \HTML\ pt lengths: % \begin{macrocode} \uselengthunit{PT}% % \end{macrocode} @@ -21462,6 +22430,9 @@ solid % % % +% +% +% % \clearpage % % \iffalse @@ -21567,7 +22538,7 @@ solid % % % \DescribePackage{multicol} -% \pkg{multicol} is emulated during \acro{HTML} output, and +% \pkg{multicol} is emulated during \HTML\ output, and % the \pkg{multicol} package is ignored. % \codehtml @@ -21589,11 +22560,13 @@ solid % \begin{macrocode} \NewDocumentEnvironment{multicols}{s m o} % \end{macrocode} -% \acro{HTML} div class to contain everything: +% \HTML\ div class to contain everything: % \begin{macrocode} -{\BlockClass{multicols} +{ +\LWR@forcenewpage +\BlockClass{multicols} % \end{macrocode} -% Optional \acro{HTML} div class for the heading: +% Optional \HTML\ div class for the heading: % \begin{macrocode} \IfValueTF{#3}{\begin{BlockClass}{multicolsheading}#3\end{BlockClass}}{}} % \end{macrocode} @@ -21603,7 +22576,7 @@ solid % \end{macrocode} % ^^A \end{environment} -% Emulated null functions which are not used in \acro{HTML}: +% Emulated null functions which are not used in \HTML: % \begin{macrocode} \newcommand*{\columnbreak}{} \newcommand*{\RLmulticolcolumns}{} @@ -21648,7 +22621,7 @@ solid % \label{sec:multirow} % % \DescribePackage{multirow} -% \pkg{multirow} is emulated during \acro{HTML} output, and +% \pkg{multirow} is emulated during \HTML\ output, and % the \pkg{multirow} package is ignored. % \codehtml @@ -21704,7 +22677,7 @@ solid % \section{Needspace} % % \DescribePackage{needspace} -% \pkg{needspace} is not used during \acro{HTML} conversion. +% \pkg{needspace} is not used during \HTML\ conversion. % % \changes{v0.20}{2016/12/22}{\pkg{needspace}: Added.} % @@ -21834,7 +22807,7 @@ solid % \section{Nowidow} % % \DescribePackage{nowidow} -% \pkg{nowidow} is not used during HTML conversion. +% \pkg{nowidow} is not used during \HTML\ conversion. % % \changes{v0.20}{2017/01/03}{\pkg{nowidow}: Added.} % @@ -22027,7 +23000,7 @@ solid % % % Mimics a float by incrementing the float counter and generating -% an \acro{HTML} anchor. These are used for list-of-theorem cross-references. +% an \HTML\ anchor. These are used for list-of-theorem cross-references. % \begin{macrocode} \newcommand{\LWR@inctheorem}{% \addtocounter{LWR@thisfloat}{1}% @@ -22038,7 +23011,7 @@ solid % \end{macrocode} % % -% The following are patched for \acro{CSS}. +% The following are patched for \CSS. % % These were in individual files |thp.sty| for plain, % |thmb.sty| for margin break, etc. @@ -22053,10 +23026,12 @@ solid \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}% @@ -22154,7 +23129,7 @@ solid \InlineClass{theoremheaderplain}{##3}] \ \newline} % \end{macrocode} % -% The following manually adjust the \acro{CSS} for the standard configuration +% The following manually adjust the \CSS\ for the standard configuration % objects which are not a purely plain style: % \begin{macrocode} \ifbool{LWR@ntheoremamsthm}{}{ @@ -22173,7 +23148,7 @@ solid \InlineClass{theoremheadersc}{##1\ (##3)\theorem@separator}]} % \end{macrocode} % -% The following standard configuration is renewed using the new \acro{CSS}: +% The following standard configuration is renewed using the new \CSS: % \begin{macrocode} \theoremstyle{plainupright} \theorembodyfont{\upshape} @@ -22211,6 +23186,7 @@ solid \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 @@ -22218,6 +23194,7 @@ solid \InlineClass{theoremheaderplain}{##1\ ##2.} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembodyplain}% new \LWR@inctheorem% new \item[\hskip\labelsep @@ -22228,6 +23205,7 @@ solid \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 @@ -22235,6 +23213,7 @@ solid \InlineClass{theoremheaderplain}{##1.} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembodyplain}% new \LWR@inctheorem% new \item[\hskip\labelsep @@ -22245,6 +23224,7 @@ solid \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 @@ -22252,6 +23232,7 @@ solid \InlineClass{theoremheaderdefinition}{##1\ ##2.} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembodydefinition}% new \LWR@inctheorem% new \item[\hskip\labelsep @@ -22262,6 +23243,7 @@ solid \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 @@ -22269,6 +23251,7 @@ solid \InlineClass{theoremheaderdefinition}{##1.} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembodydefinition}% new \LWR@inctheorem% new \item[\hskip\labelsep @@ -22279,6 +23262,7 @@ solid \gdef\th@remark{% \def\theorem@headerfont{\itshape}\normalfont% \def\@begintheorem##1##2{% +\LWR@forcenewpage% new \BlockClass{theorembodyremark}% new \LWR@inctheorem% new \item[\hskip\labelsep @@ -22286,6 +23270,7 @@ solid \InlineClass{theoremheaderremark}{##1\ ##2.} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembodyremark}% new \LWR@inctheorem% new \item[\hskip\labelsep @@ -22296,6 +23281,7 @@ solid \gdef\th@nonumberremark{% \def\theorem@headerfont{\itshape}\normalfont% \def\@begintheorem##1##2{% +\LWR@forcenewpage% new \BlockClass{theorembodyremark}% new \LWR@inctheorem% new \item[\hskip\labelsep @@ -22303,6 +23289,7 @@ solid \InlineClass{theoremheaderremark}{##1.} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembodyremark}% new \LWR@inctheorem% new \item[\hskip\labelsep @@ -22313,6 +23300,7 @@ solid \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 @@ -22320,6 +23308,7 @@ solid \InlineClass{theoremheaderproof}{##1.} ]}% \def\@opargbegintheorem##1##2##3{% +\LWR@forcenewpage% new \BlockClass{theorembodyroof}% new \LWR@inctheorem% new \item[\hskip\labelsep @@ -22351,7 +23340,7 @@ solid }{}% amsthm option % \end{macrocode} % -% Patched for \acro{CSS}: +% Patched for \CSS: % \begin{macrocode} \let\LWR@origendtheorem\@endtheorem \renewcommand{\@endtheorem}{% @@ -22393,7 +23382,7 @@ solid % \end{macrocode} -% Patch for \acro{CSS}: +% Patch for \CSS: % \begin{macrocode} \def\listtheorems#1{ \LWR@htmlelementclass{nav}{lothm}% @@ -22500,7 +23489,7 @@ solid % \section{Placeins} % % \DescribePackage{placeins} -% \pkg{placeins} is not used during HTML conversion. +% \pkg{placeins} is not used during \HTML\ conversion. % % \changes{v0.20}{2017/01/19}{\pkg{placeins}: Added.} % @@ -22534,7 +23523,7 @@ solid % \section{Ragged2e} % % \DescribePackage{ragged2e} -% \pkg{ragged2e} is not used during HTML conversion. +% \pkg{ragged2e} is not used during \HTML\ conversion. % % \changes{v0.20}{2017/01/19}{\pkg{ragged2e}: Added.} % @@ -22590,10 +23579,10 @@ solid % \section{Rotating} % % \DescribePackage{rotating} -% \pkg{rotating} is emulated during \acro{HTML} output, and +% \pkg{rotating} is emulated during \HTML\ output, and % the \pkg{rotating} package is ignored. % -% All rotations are ignored in \acro{HTML} output. +% All rotations are ignored in \HTML\ output. % % \codehtml % \begin{macrocode} @@ -22635,7 +23624,7 @@ solid % \section{Setspace} % % \DescribePackage{setspace} -% \pkg{setspace} is not used during HTML conversion. +% \pkg{setspace} is not used during \HTML\ conversion. % % \changes{v0.20}{2016/12/22}{\pkg{setspace}: Improved support.} % @@ -22653,11 +23642,17 @@ solid \newcommand*{\doublespacing}{} \newenvironment*{singlespace} -{\BlockClass{singlespace}} +{ +\LWR@forcenewpage +\BlockClass{singlespace} +} {\endBlockClass} \newenvironment*{singlespace*} -{\BlockClass{singlespace}} +{ +\LWR@forcenewpage +\BlockClass{singlespace} +} {\endBlockClass} \newenvironment*{spacing}[1]{ @@ -22667,11 +23662,17 @@ solid } \newenvironment*{onehalfspace} -{\BlockClass{onehalfspace}} +{ +\LWR@forcenewpage +\BlockClass{onehalfspace} +} {\endBlockClass} \newenvironment*{doublespace} -{\BlockClass{doublespace}} +{ +\LWR@forcenewpage +\BlockClass{doublespace} +} {\endBlockClass} % \end{macrocode} @@ -22863,14 +23864,13 @@ solid \DeclareDocumentEnvironment{KFLT@marginfloat}{O{-1.2ex} m} {% start \LWR@maybeincthisfloat% -% \BlockClass{marginblock} +\LWR@forcenewpage \LWR@stoppars% \LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}"} \LWR@startpars% \captionsetup{type=#2}% } { -% \endBlockClass \LWR@htmldivclassend{div} } @@ -22938,7 +23938,7 @@ solid \newcommand*{\LWR@soulhlcolor}{} % \end{macrocode} % -% Basic markup with \acro{CSS}: +% Basic markup with \CSS: % \begin{macrocode} \newcommand{\so}[1]{\InlineClass{letterspacing}{#1}} \newcommand{\caps}[1]{\InlineClass{capsspacing}{#1}} @@ -23322,6 +24322,7 @@ solid % \pkg{tabularx} is emulated by \pkg{lwarp}. % % \changes{v0.22}{2017/03/01}{\pkg{tabularx}: Added.} +% \changes{v0.28}{2017/04/11}{\pkg{tabularx}: Fix for optional pos.} % % \codehtml % @@ -23331,12 +24332,12 @@ solid % \end{macrocode} % \begin{macrocode} -\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} % \end{macrocode} @@ -23346,6 +24347,53 @@ solid % % % +% \clearpage +% +% \iffalse +%<*tabulary> +% \fi + +% \part{lwarp-tabulary.sty} + +% \section{Tabulary} +% +% \DescribePackage{tabulary} +% \pkg{tabulary} is emulated by \pkg{lwarp}. +% +% \changes{v0.28}{2017/04/11}{\pkg{tabulary}: Added.} +% +% \codehtml +% +% Discard all options for \pkg{lwarp-tabulary}. +% +% Column types |L|, |C|, |R|, and |J| are emulated by \pkg{lwarp} +% core code. +% \begin{macrocode} +\LWR@ProvidesPackageDrop{tabulary} +% \end{macrocode} + +% \begin{macrocode} +\NewDocumentEnvironment{tabulary}{m o m} +{\tabular{#3}} +{\endtabular} + +\NewDocumentEnvironment{tabulary*}{m o m} +{\tabular{#3}} +{\endtabular} + +\newdimen\tymin +\newdimen\tymax +\def\tyformat{} +% \end{macrocode} + +% \iffalse +%</tabulary> +% \fi +% +% +% +% +% % % \clearpage % @@ -23361,7 +24409,7 @@ solid % \changes{v0.20}{2017/01/11}{\pkg{textpos}: Added.} % % \DescribePackage{textpos} -% \pkg{textpos} is emulated during \acro{HTML} output, and +% \pkg{textpos} is emulated during \HTML\ output, and % the \pkg{textpos} package is ignored. % \codehtml @@ -23502,7 +24550,7 @@ solid % \end{macrocode} % % -% The following are patched for \acro{CSS}. +% The following are patched for \CSS. % % These were in individual files |thp.sty| for plain, % |thmb.sty| for margin break, etc. @@ -23515,11 +24563,13 @@ solid % \begin{macrocode} \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)} @@ -23528,11 +24578,13 @@ solid \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 @@ -23541,11 +24593,13 @@ solid \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\ % @@ -23555,11 +24609,13 @@ solid \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\ % @@ -23569,11 +24625,13 @@ solid \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)} @@ -23582,11 +24640,13 @@ solid \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)} @@ -23594,7 +24654,7 @@ solid } % \end{macrocode} % -% Patched for \acro{CSS}: +% Patched for \CSS: % \begin{macrocode} \gdef\@endtheorem{\endBlockClass\endtrivlist} % \end{macrocode} @@ -23618,7 +24678,7 @@ solid % % % \DescribePackage{threeparttable} -% \pkg{threeparttable} is emulated during \acro{HTML} output, and +% \pkg{threeparttable} is emulated during \HTML\ output, and % the \pkg{threeparttable} package is ignored. % \codehtml @@ -23630,7 +24690,7 @@ solid % ^^A \begin{macro}{\LWR@printtablenote} \marg{text} % -% Prints the table note item header inside a \acro{CSS} class of |tnoteitemheader|. +% Prints the table note item header inside a \CSS\ class of |tnoteitemheader|. % \begin{macrocode} \newcommand{\LWR@printtablenote}[1]{\InlineClass{tnoteitemheader}{#1}} % \end{macrocode} @@ -23650,6 +24710,7 @@ solid % \begin{macrocode} \newenvironment*{tablenotes}[1][] {% +\LWR@forcenewpage \BlockClass{tnotes}% \setlist[description]{format=\LWR@printtablenote}% \description% @@ -23768,7 +24829,7 @@ solid % \section{Titleps} % % \DescribePackage{titleps} -% \pkg{titleps} is loaded and used by \pkg{lwarp} during \acro{HTML} output. +% \pkg{titleps} is loaded and used by \pkg{lwarp} during \HTML\ output. % All user options and macros are ignored and disabled. % \changes{v0.20}{2017/01/03}{\pkg{titleps}: Added.} @@ -24672,7 +25733,7 @@ solid \begin{warpall} % \end{macrocode} -% \textcolor{red}{For both print and HTML output:} +% \textcolor{red}{For both print and \HTML\ output:} % % When using \pkg{float}, \pkg{trivfloat}, or \pkg{algorithmicx} at the same time, % be aware of conflicting file usage. @@ -24691,11 +25752,11 @@ solid % \watchout % \pkg{algorithmicx} by starting \pkg{trivfloat}'s file extensions with |.lob|: % -% \begin{docsidebar} -% \cs{makeatletter} \\ -% \cs{setcounter\{tfl\@float\@cnt\}\{1\}} \% start trivfloats with .lob \\ -% \cs{makeatletter} -% \end{docsidebar} +% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] +% \makeatletter +% \setcounter{tfl@float@cnt}{1}} % start trivfloats with .lob +% \makeatletter +% \end{Verbatim} % \begin{macrocode} \end{warpall} @@ -24734,7 +25795,7 @@ solid \let\LWR@ulemorigtextbf\textbf % \end{macrocode} % -% Basic markup commands, using \acro{CSS}: +% Basic markup commands, using \CSS: % \begin{macrocode} \NewDocumentCommand{\uline}{+m}{% \InlineClass{uline}{#1}% @@ -24774,7 +25835,7 @@ solid % Nullified/emulated macros: % \begin{macrocode} \NewDocumentCommand{\markoverwith}{m}{} -\NewDocumentCommand{\ULon}{+m}{\uline{#1}} +\NewDocumentCommand{\ULon}{+m}{\uline{#1}\egroup} % \end{macrocode} % % \cs{useunder} only works with \cs{textbf}, etc, but not \cs{bfseries}, etc. @@ -24846,7 +25907,7 @@ solid % % \begin{environment}{verse} % \changes{v0.18}{2016/05/13}{Supports verse, memoir packages.} -% The \env{verse} environment will be placed inside a \acro{HTML} |pre|. +% The \env{verse} environment will be placed inside a \HTML\ |pre|. % \begin{macrocode} \AfterEndPreamble{ % \end{macrocode} @@ -24866,6 +25927,7 @@ solid \setlength{\vleftskip}{\HTMLvleftskip} \setlength{\leftmargini}{\HTMLleftmargini} }{} +\LWR@forcenewpage \LWR@atbeginverbatim{verse} \unskip\vspace{-\baselineskip} } @@ -24878,7 +25940,7 @@ solid \LWR@afterendverbatim } % \end{macrocode} -% Patch to place poemtitle inside an \acro{HTML} span of class |poemtitle|: +% Patch to place poemtitle inside an \HTML\ span of class |poemtitle|: % \begin{macrocode} \ifdef{\poemtitle}{ \DeclareDocumentCommand{\@vstypeptitle}{m}{% @@ -24913,7 +25975,7 @@ solid % \changes{v0.20}{2017/01/11}{\pkg{wallpaper}: Added.} % % \DescribePackage{wallpaper} -% \pkg{wallpaper} is emulated during \acro{HTML} output, and +% \pkg{wallpaper} is emulated during \HTML\ output, and % the \pkg{wallpaper} package is ignored. % \codehtml @@ -24962,7 +26024,7 @@ solid % \changes{v0.20}{2017/01/11}{\pkg{wrapfig}: Added.} % % \DescribePackage{wrapfig} -% \pkg{wrapfig} is emulated during \acro{HTML} output, and +% \pkg{wrapfig} is emulated during \HTML\ output, and % the \pkg{wrapfig} package is ignored. % \codehtml @@ -24971,7 +26033,7 @@ solid % \end{macrocode} % Computed width of a wrapped object. -% Used to print the \acro{HTML} style. +% Used to print the \HTML\ style. % \begin{macrocode} \newlength{\LWR@wrapwidth} % \end{macrocode} @@ -24993,10 +26055,7 @@ solid \setlength{\LWR@wrapwidth}{#2}% \addtolength{\LWR@wrapwidth}{4em}% \uselengthunit{PT}% -% \BlockClass{marginblock}[% -% width:\rndprintlength{\LWR@wrapwidth} ; % -% \LWR@wrapposition% -% ]% +\LWR@forcenewpage \LWR@stoppars% \LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}" style="width:\rndprintlength{\LWR@wrapwidth} ; % @@ -25066,7 +26125,7 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; % % \end{macrocode} -% ^^A \begin{macro}{\LWR@tempcolor} The color converted to \acro{HTML} colorspace. +% ^^A \begin{macro}{\LWR@tempcolor} The color converted to \HTML\ colorspace. % \begin{macrocode} \newcommand*{\LWR@tempcolor}{} % \end{macrocode} @@ -25087,14 +26146,14 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; % % % \changes{v0.19}{2016/06/01}{Supports colored \cs{rule}.} % -% Creates a styled span with a color converted to \acro{HTML} hex colorspace. +% Creates a styled span with a color converted to \HTML\ hex colorspace. % Uses |LWR@spandepth| to prevent paragraph tags inside the span. % If used for \cs{textcolor}, with a styletext of |color:|, then the new color is % copied into \\ \cs{LWR@currenttextcolor} for possible re-use in \cs{rule}. % \begin{macrocode} \NewDocumentCommand{\LWR@colorstyle}{m m m m}{% % \end{macrocode} -% Use the \pkg{xcolor} package to convert to an \acro{HTML} color space: +% Use the \pkg{xcolor} package to convert to an \HTML\ color space: % \begin{macrocode} \convertcolorspec{#2}{#3}{HTML}\LWR@tempcolor% % \end{macrocode} @@ -25103,7 +26162,7 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; % \ifthenelse{\equal{#1}{color:}}% {\renewcommand*{\LWR@currenttextcolor}{\#\LWR@tempcolor}}{}% % \end{macrocode} -% Create the \acro{HTML} \tag{span} with the styled color: +% Create the \HTML\ \tag{span} with the styled color: % \begin{macrocode} \LWR@htmltagc{span style="#1\#\LWR@tempcolor"{}}% \begin{LWR@nestspan}% @@ -25126,17 +26185,17 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; % % ^^A \DescribeMacro{\color} -% \cs{color} appears in the \LaTeX{} \acro{PDF} output, -% but is ignored by |pdftotext| and thus is ignored in the \acro{HTML} file. +% \cs{color} appears in the \LaTeX{} \PDF\ output, +% but is ignored by |pdftotext| and thus is ignored in the \HTML\ file. % Text styling by local group is not yet supported. % Each of the following macros is given a temporary name, and is |\let| to the final -% name once the \acro{HTML} conversion starts. +% name once the \HTML\ conversion starts. % ^^A \begin{macro}{\textcolor} % \cs{textcolor} % \oarg{model} \marg{color} \marg{text} -% is converted into an \acro{HTML} hex color span. +% is converted into an \HTML\ hex color span. % \begin{macrocode} \NewDocumentCommand{\LWR@textcolor}{O{named} m m}{% \begingroup% @@ -25159,7 +26218,7 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; % % ^^A \begin{macro}{\colorbox} % \cs{colorbox} % \oarg{model} \marg{color} \marg{text} -% is converted into an \acro{HTML} hex background color span. +% is converted into an \HTML\ hex background color span. % % \begin{macrocode} \NewDocumentCommand{\LWR@colorbox}{O{named} m m}{% @@ -25173,7 +26232,7 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; % % ^^A \begin{macro}{\fcolorbox} % \cs{fcolorbox} % \oarg{framemodel} \marg{framecolor} \oarg{boxmodel} \marg{boxcolor} \marg{text} -% is converted into a framed \acro{HTML} hex background color span. +% is converted into a framed \HTML\ hex background color span. % % A background color of "none" creates a colored frame without a background color. % @@ -25228,11 +26287,11 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; % % In the user's document preamble, \pkg{lwarp} should be loaded % after font-related setup. % \watchout[font size] -% During \acro{HTML} conversion, this font is used by \pkg{lwarp} -% to generate its initial \acro{PDF} output containing \acro{HTML} tags, +% During \HTML\ conversion, this font is used by \pkg{lwarp} +% to generate its initial \PDF\ output containing \HTML\ tags, % later to be converted by |pdftotext| to a plain text file. % While the text may be in any font which |pdftotext| can read, the math is -% directly converted into \acro{SVG} images using this same user-selected font. +% directly converted into \SVG\ images using this same user-selected font. % |xfrac| below is set for the Latin Modern (lmr) font. % If another font is used, it may be desirable to redefine % \cs{xfracHTMLfontsize} with a different em size. @@ -25244,9 +26303,9 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; % % % A text-mode instance for the default font is provided below. % The numerator and denominator formats are adjusted to encase everything -% in \acro{HTML} tags. \cs{scalebox} is made null inside the numerator and -% denominator, since the \acro{HTML} tags should not be scaled, and we do not -% want to introduce additional \acro{HTML} tags for scaling. +% in \HTML\ tags. \cs{scalebox} is made null inside the numerator and +% denominator, since the \HTML\ tags should not be scaled, and we do not +% want to introduce additional \HTML\ tags for scaling. % % In math mode, which will appear inside a \env{lateximage}, no adjustments % are necessary. @@ -25291,7 +26350,7 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; % \endLWR@nestspan% } % \end{macrocode} -% A nullified \cs{scalebox} command, to avoid introducing \acro{HTML} scaling tags: +% A nullified \cs{scalebox} command, to avoid introducing \HTML\ scaling tags: % \margintag{\cs{scalebox}} % \begin{macrocode} \NewDocumentCommand{\LWR@noscalebox}{m o m}{#3} @@ -25300,7 +26359,7 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; % % Instances of \pkg{xfrac} for various font choices: % \margintag{instances} % -% Produce \acro{HTML} tags for a small superscript numerator and +% Produce \HTML\ tags for a small superscript numerator and % a small (non-subscript) denominator. % % Scaling is turned off so that \cmds{pdftotext} correctly reads the result. diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.ins b/Master/texmf-dist/source/latex/lwarp/lwarp.ins index e381db11112..8811bb697af 100644 --- a/Master/texmf-dist/source/latex/lwarp/lwarp.ins +++ b/Master/texmf-dist/source/latex/lwarp/lwarp.ins @@ -66,6 +66,7 @@ version 2005/12/01 or later. \file{lwarp-framed.sty}{\from{lwarp.dtx}{framed}} \file{lwarp-ftnright.sty}{\from{lwarp.dtx}{ftnright}} \file{lwarp-geometry.sty}{\from{lwarp.dtx}{geometry}} +\file{lwarp-glossaries.sty}{\from{lwarp.dtx}{glossaries}} \file{lwarp-graphicx.sty}{\from{lwarp.dtx}{graphicx}} \file{lwarp-graphics.sty}{\from{lwarp.dtx}{graphics}} \file{lwarp-hyperref.sty}{\from{lwarp.dtx}{hyperref}} @@ -108,6 +109,7 @@ version 2005/12/01 or later. \file{lwarp-soul.sty}{\from{lwarp.dtx}{soul}} \file{lwarp-subfig.sty}{\from{lwarp.dtx}{subfig}} \file{lwarp-tabularx.sty}{\from{lwarp.dtx}{tabularx}} +\file{lwarp-tabulary.sty}{\from{lwarp.dtx}{tabulary}} \file{lwarp-textpos.sty}{\from{lwarp.dtx}{textpos}} \file{lwarp-theorem.sty}{\from{lwarp.dtx}{theorem}} \file{lwarp-threeparttable.sty}{\from{lwarp.dtx}{threeparttable}} 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} <!-- https://groups.google.com/forum/#!topic/ mathjax-users/jUtewUcE2bY --> @@ -1721,9 +1722,18 @@ MathJax.Hub.Config({ }); </script> +<!-- Alternative CDN provider: --> +<script type="text/javascript" async + src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML-full"> +</script> + +<!-- No longer supported after April 30, 2017: --> +<!-- <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full"> </script> +--> + \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}% } @@ -747,6 +766,14 @@ top=1in,bottom=1in,% \begin{warpHTML} +\newcommand{\LWR@forcenewpage}{% +\LWR@stoppars\LWR@orignewpage\LWR@startpars% +} +\end{warpHTML} + + +\begin{warpHTML} + \newcommand*{\LWR@tagpart}{h2} \newcommand*{\LWR@tagpartend}{/h2} @@ -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} |