% % \iffalse meta-comment % % Copyright 2016-2024 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. % % \fi % % \iffalse %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{lwarp} % [2024/02/22 v0.916 Allows LaTeX to directly produce HTML5 output.] % %<*driver> \documentclass{ltxdoc} \PassOptionsToPackage{quiet}{textcomp}% Not all chars supported in TT font. \usepackage{lmodern} % \usepackage{libertine} \usepackage[space]{erewhon} \usepackage[varqu,varl]{inconsolata} % typewriter % \usepackage{roboto}% conflicts with \textsc inside a float % \usepackage{sourcecodepro} % \usepackage{sourcesanspro} \usepackage{cabin} % \usepackage[tabular,semibold]{sourcesanspro} % \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{textcomp} % provides \degree, \textquotesingle, \textmu \usepackage{newunicodechar} \newunicodechar{ff}{ff} \newunicodechar{fi}{fi} \newunicodechar{fl}{fl} \newunicodechar{ffi}{ffi} \newunicodechar{ffl}{ffl} % \newunicodechar{°}{\degree} \newunicodechar{ρ}{\ensuremath{\rho}} \newunicodechar{⨯}{\texttimes} \newunicodechar{⁄}{\textfractionsolidus} % \newunicodechar{®}{\textregistered} % \newunicodechar{©}{\textcopyright} \newunicodechar{—}{---} \newunicodechar{–}{--} % \newunicodechar{”}{''} % \newunicodechar{“}{``} % \newunicodechar{§}{\S} % \newunicodechar{¶}{\P} % \newunicodechar{†}{\dag} \newunicodechar{‡}{\ddag} \newunicodechar{Á}{\'{A}} \newunicodechar{è}{\`{e}} \newunicodechar{ø}{\o{}} \newunicodechar{Æ}{\AE{}} \newunicodechar{â}{\^{a}} \newunicodechar{ô}{\^{o}} \newunicodechar{Ô}{\^{O}} \newunicodechar{ê}{\^{e}} \newunicodechar{Ω}{\textohm} \newunicodechar{μ}{\textmu} \newunicodechar{⁅}{\textlquill} \newunicodechar{⁆}{\textrquill} \newunicodechar{℗}{\textcircledP} \newunicodechar{—}{\texttwelveudash}% emdash \newunicodechar{—}{\textthreequartersemdash}% emdash \newunicodechar{℧}{\textmho} \newunicodechar{₦}{\textnaira} \newunicodechar{₱}{\textpeso} \newunicodechar{℞}{\textrecipe} \newunicodechar{‽}{\textinterrobang} \newunicodechar{⸘}{\textinterrobangdown} \newunicodechar{‰}{\textperthousand} \newunicodechar{‱}{\textpertenthousand} \newunicodechar{฿}{\textbaht} \newunicodechar{℠}{\textservicemark} % \usepackage[log-declarations=false]{xparse} \usepackage{xparse} \usepackage{ifptex}% in case TL2019 or earlier \usepackage[lwarpmk, warpdisable]{lwarp} \usepackage[erewhon]{newtxmath} \usepackage{titlesec} % \usepackage[nobottomtitles*]{titlesec} % \renewcommand{\bottomtitlespace}{.\textheight} \titleformat{\part}[hang] {\LARGE\ttfamily\bfseries}{}{0pt}{}[\marginpar{\hfill{}File\,\thepart}] \titlespacing*{\part}{0pt}{*5}{0ex} % redefine \part to modify \@currentlabelname: \makeatletter \LetLtxMacro\LWR@titlesec@part\part \RenewDocumentCommand{\part}{s o m}{% \def\@currentlabelname{#3}% \IfBooleanTF{#1}{% star \IfValueTF{#2}{% star opt \LWR@titlesec@part*[#2]{#3}% }{% star noopt \LWR@titlesec@part*{#3}% }% }{% no star \IfValueTF{#2}{% opt \LWR@titlesec@part[#2]{#3}% }{% noopt \LWR@titlesec@part{#3}% }% }% } \makeatother \usepackage{needspace} \usepackage[svgnames]{xcolor} \definecolor{myurlcolor}{rgb}{0,0,.7} \definecolor{mylinkcolor}{rgb}{.7,0,0} \definecolor{codecolor}{rgb}{0,.4,.2} \definecolor{overviewcolor}{rgb}{0,.2,.4} \usepackage[ left=2in, right=1.5in, top=1.5in, bottom=1in ]{geometry} \usepackage{pict2e}% for the Lwarp logo % Improve the LaTeX and related logos: \usepackage{metalogox} \usepackage{enumitem} \newlist{inlinedesc}{description*}{1} \usepackage{array} \usepackage{longtable} \usepackage{booktabs} \usepackage{threeparttable} \usepackage{multirow} \usepackage{bigdelim} \usepackage[normalem]{ulem} \usepackage{fancyvrb} \usepackage{capt-of} \usepackage{comment} % ^^A tocloft had issues with \textsc % \usepackage{tocloft} % \renewcommand{\cftpartfont}{\Large\bfseries} % \setlength{\cftsecnumwidth}{2.5em} % \setlength{\cftsubsecnumwidth}{3em} % \setlength{\cftsubsubsecindent}{2.8em} % \setlength{\cftsubsubsecnumwidth}{4em} \usepackage{titletoc} \dottedcontents{part}[0em]{\large\bfseries}{3.5em}{1pc} \dottedcontents{section}[2em]{\bfseries}{3.5em}{1pc} \dottedcontents{subsection}[4em]{}{3.5em}{1pc} \dottedcontents{subsubsection}[6em]{}{4em}{1pc} \usepackage[notbib,notindex,nottoc]{tocbibind} \usepackage{titleps} \newpagestyle{pageheadfoot}{ \headrule \sethead{\pkg{lwarp}}{}{\thepage} % \renewcommand{\makefootrule}{\rule[2.5ex]{\linewidth}{.4pt}} \setfoot{}{}{} } \pagestyle{pageheadfoot} % Indexing, logos, \Describexxxx, etc: \usepackage{dtxdescribe}[2023/01/03] \usepackage{splitidx} \newindex[Index of Objects]{idx} \newindex[General Index]{gen} \newindex[Troubleshooting Index]{trb} \newindex[Index of Indexes]{meta} \makeindex \newcommand*{\gindex}[1]{\sindex[gen]{#1}\ignorespaces} \usepackage{microtype} \usepackage[all,defaultlines=2]{nowidow} \AtBeginDocument{% \hypersetup{% colorlinks,% linkcolor=mylinkcolor,% urlcolor=myurlcolor,% pageanchor=true,% hyperfootnotes=false,% pdfinfo={% Title={LaTeX Lwarp package},% Author={Brian Dunn},% Subject={LaTeX to HTML conversion},% Keywords={LaTeX, HTML, conversion}% }} } \AddToHook{begindocument/before}{ \usepackage{cleveref} } \renewcommand{\partname}{Package} \renewcommand*{\thepart}{\arabic{part}} \renewenvironment{abstract} { \addvspace{\bigskipamount} \begin{center} \textbf{\abstractname} \end{center} % \small \setlength{\parindent}{2em} \setlength{\parskip}{0ex} } { \addvspace{\bigskipamount} } \makeatletter \newcommand*{\rulebreak}{% \bigskip\hfill\rule[.7ex]{.3\linewidth}{.4pt}\hspace*{\fill}\bigskip\@afterheading% } \makeatother \newcommand*{\goesto}{$\Rightarrow$} \newcommand*{\orelse}{---\,\textit{or}\,---} \newcommand*{\AV}{\acro{A}\Slash\acro{V}} \makeatletter \IfPackageLoadedTF{erewhon}{\renewcommand*{\HTMLfive}{\acro{HTML}\textosf{5}}}{} \makeatother \newcommand{\credits}[1]{{\footnotesize(\textit{Emulates or patches code by} \textsc{#1}.)}} \newcommand*{\codehtml}{\leavevmode\marginpar{\footnotesize\raggedleft\textcolor{codecolor}{\textbf{for HTML output:\quad}}}\vspace{-5.25ex}} \newcommand*{\codeprint}{\leavevmode\marginpar{\footnotesize\raggedleft\textcolor{codecolor}{\textbf{for PRINT output:\quad}}}\vspace{-5.25ex}} \newcommand*{\codeall}{\leavevmode\marginpar{\footnotesize\raggedleft\textcolor{codecolor}{\textbf{for HTML \& PRINT:\quad}}}\vspace{-5.25ex}} \newcommand*{\codeconfig}{\leavevmode\marginpar{\footnotesize\raggedleft\textcolor{codecolor}{\textbf{Config file:\quad}}}\vspace{-5.25ex}} \newcommand*{\testthis}{\textcolor{blue}{Please send bug reports!}\watchout[Not fully tested!]} \newcommand{\textred}[1]{\textcolor{red}{#1}} \newcommand{\textgreen}[1]{\textcolor{green!50!black}{#1}} \newcommand{\textcyan}[1]{\textcolor{cyan!70!black}{#1}} \newcommand{\textblue}[1]{\textcolor{blue!70!black}{#1}} \newcommand{\textgray}[1]{\textcolor{white!30!black}{#1}} % \newcommand{\spkg}[1]{\textcolor{green!30!gray}{\pkg{#1}}}% package supported as-is % \newcommand{\mpkg}[1]{\textcolor{cyan!30!gray}{\pkg{#1}}}% package modified for HTML % \newcommand{\epkg}[1]{\textcolor{blue!30!gray}{\pkg{#1}}}% package emulated for HTML % \newcommand{\ipkg}[1]{\textcolor{magenta!30!gray}{\pkg{#1}}}% package ignored % \newcommand{\wpkg}[1]{\textcolor{red!30!gray}{\pkg{#1}}}% package warning special case % green/blue/magenta/gray \newcommand{\spkg}[1]{\textcolor[Hsb]{120,1,.4}{\pkg{#1}}}% package supported as-is \newcommand{\mpkg}[1]{\textcolor[Hsb]{240,1,.4}{\pkg{#1}}}% package modified for HTML \newcommand{\epkg}[1]{\textcolor[Hsb]{300,1,.5}{\pkg{#1}}}% package emulated for HTML \newcommand{\ipkg}[1]{\textcolor[Hsb]{0,0,.4}{\pkg{#1}}}% package ignored \newcommand{\wpkg}[1]{\textcolor[Hsb]{0,1,.5}{\pkg{#1}}}% package warning special case \newcommand{\sjax}{\textsuperscript{\textcolor[Hsb]{120,1,.4}{MJ}}} \newcommand{\ejax}{\textsuperscript{\textcolor[Hsb]{300,1,.5}{MJ}}} \newcommand{\ijax}{\textsuperscript{\textcolor[Hsb]{0,0,.4}{MJ}}} % green/cyan/blue/magenta % \newcommand{\spkg}[1]{\textcolor[Hsb]{120,1,.4}{\pkg{#1}}}% package supported as-is % \newcommand{\mpkg}[1]{\textcolor[Hsb]{180,1,.4}{\pkg{#1}}}% package modified for HTML % \newcommand{\epkg}[1]{\textcolor[Hsb]{240,1,.5}{\pkg{#1}}}% package emulated for HTML % \newcommand{\ipkg}[1]{\textcolor[Hsb]{300,1,.5}{\pkg{#1}}}% package ignored % \newcommand{\wpkg}[1]{\textcolor[Hsb]{0,1,.5}{\pkg{#1}}}% package warning special case \newcommand{\ARIA}{\acro{ARIA}} \newcommand{\pdflatexonly}{ \textred{Only pre-loaded if \prog{pdflatex} is being used.} \marginpar{\raggedleft\textblue{\prog{pdflatex} only:}} } % \trouble[watchout phrase]{index entry} \newcommand*{\trouble}[2][]{% \ifblank{#1}{}{% \watchout[#1]% }% \sindex[trb]{#2}% \ignorespaces% } % The following text is used in multiple places in the documentation: \newcommand{\needhelp}{ \begin{minipage}{\linewidth} \hrule\smallskip \small See the \nameref{sec:indexgen} for ``how-to'', and the \nameref{sec:indextrb} if something doesn't work. A \nameref{sec:troubleshooting} section is also available. The \nameref{sec:indexidx} contains automated entries for each package, macro, environment, counter, boolean, and other objects; individually and also sorted by category. \smallskip \hrule \end{minipage}\margintag{Need help?} } \newcommand{\usedbykomascript}{ This package may be loaded standalone, but is also loaded automatically if \pkg{koma-script} classes are in use. \cs{DeclareDocumentCommand} is used to overwrite the \pkg{koma-script} definitions. } \makeatletter \newcommand{\maindocumentationnotes}{ Blue-colored tags in the left margin \margintag{subjects} aid in quickly identifying the subject of each paragraph. These are often the targets of index entries. Black-colored tags in the left marign are used to \DTXD@margintag{}{Lwarp}{Prog}% identify programming objects such as files, packages, environments, booleans, and counters. Items without a tag are command macros. Each of these also appears in the index as \margintag{index entries} individual entries, and are also listed together under ``files'', ``packages'', ``environments'', ``booleans'', and ``counters''. Special warnings are marked with a warning icon. \watchout[warnings] } \makeatother \newcommand{\codedocumentationnotes}{ The following sections document the actual implementation of the \pkg{lwarp} package. The small numbers at the left end of a line refer to line numbers \margintag{line numbers} in the \texttt{lwarp.sty} file. \maindocumentationnotes \codehtml\vspace*{5.25ex}\ignorespaces \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 \HTML, print, or both forms of output. } \newcommand{\describeImageAltText}{% \cs{includegraphics} and other images are assigned an \HTML\ \attribute{alt} tag according to \cs{ImageAltText} along with \cs{AltTextOpen} and \cs{AltTextClose}. This text is visible in the browser if images are not loaded, and appears when the text is copied and pasted. The default is ``\optn{image}'', and it may be changed according to the document's language. This may be set in the preamble, or changed as necessary inside the document, where it will affect the following \cs{includegraphics} and other images. } \newcommand{\describeThisAltText}{% \cs{ThisAltText} can be used to assign an \HTML\ \attribute{alt} text attribute to the next image generated by a \env{lateximage}, \env{picture}, \env{tikzpicture}, or any other similar environment which generates an image, or the next \SVG\ math expression. This tag is cleared after use. The tag is also cleared after each \MathJax\ expression, in case the user changes between \SVG\ math and \MathJax. \cs{ThisAltText} also may be used to add an \HTML\ \attribute{title} to a reference or hyperlink, such as a \cs{ref}, \cs{cref}, \cs{href}, \cs{url}, \cs{hyperref}, or \cs{hyperlink}. In each case, the alternative text is cleared after use. } \newcommand{\describeMathImageAltText}{% When creating an \SVG\ math image, its \HTML\ \attribute{alt} tag may be set to the math expression, which may be hashed for image reuse. In the case of \cs{ensuremath} or after \cs{inlinemathother}, where the contents require a unique image for each instance of the same expression, the \attribute{alt} tag is set to \cs{MathImageAltText}, along with \cs{AltTextOpen} and \cs{AltTextClose}, and the image is not reused. This \attribute{alt} expression is visible in the browser if images are not loaded, and appears when the text is copied and pasted. The default is ``\optn{math image}'', and it may be changed according to the document's language. This may be set in the preamble, or changed as necessary inside the document, where it will affect the following \SVG\ math images. } \newcommand{\describePackageDiagramAltText}{% For many packages, the output is placed inside a \env{lateximage} with an \HTML\ \attribute{alt} tag set to the package name followed by \cs{PackageDiagramAltText}. For example: \begin{sourcedisplay} (-xy- diagram) \end{sourcedisplay} This expression is visible in the browser if images are not loaded, and appears when the text is copied and pasted. The default is ``diagram'', and may it be changed according to the document's language. This may be set in the preamble, or changed as necessary inside the document, where it will affect the following package diagrams. } \newcommand{\describeAltTextOpenClose}{% \HTML\ \attribute{alt} text is enclosed by the macros \cs{AltTextOpen} and \cs{AltTextClose}, which default to an opening and closing parenthesis. } \newcommand{\limitscpageref}{% \pkg{cleveref} and \pkg{varioref} are supported, \trouble[\pkg{cleveref} page numbers]{page numbers} \trouble{reference>page number} but printed page numbers do not map to \HTML, so a section name or a text phrase are used for \cs{cpageref} and \cs{cpagerefrange}. This phrase includes \cs{cpagerefFor}, which defaults to ``for''. \needspace{3\baselineskip} Ex: \begin{sourcedisplay} \cs{cpageref}\{tab:first,tab:second\} \\ \hspace*{-2em} in \HTML\ becomes:\\ \rmfamily ``pages \textbf{for} table \textred{4.1} and \textbf{for} table \textred{4.2}'' \end{sourcedisplay} See \cs{cpagerefFor} at \cpageref{sec:cpagereffor} to redefine the message which is printed for page number references. } \newcommand{\limitshyperlinks}{% \pkg{lwarp} emulates \pkg{hyperref}, including the creation of active hyperlinks, but does not require that \pkg{hyperref} be loaded by the document. Do not place a comment with a \texttt{\%} character between arguments \trouble[comments between arguments]{hyperref=\pkg{hyperref}>comments between arguments} for \cs{hyperref}, etc., as it is neutralized for inclusion in \HTML\ \URL{}s. \pkg{lwarp} can also load \pkg{url}, but \pkg{url} should not be used at the same time as \pkg{hyperref}, since they both define the \cs{url} command. \pkg{lwarp} does not (yet) attempt to convert \pkg{url} links into hyperlinks during \HTML\ output, nor does the print version of \pkg{url} create hyperlinks. When generating \HTML, \pkg{lwarp}'s emulation of \pkg{hyperref} does not \trouble[\pkg{backref}]{hyperref=\pkg{hyperref}>backref=\pkg{backref}} \trouble{backref=\pkg{backref}} automatically load \pkg{backref}, so \pkg{backref} must be loaded explicitly. } \newcommand{\limitsabstract}{% If using the \optn{number} option with file splits, \trouble[missing \TOC]{abstract>missing \TOC} be sure to place the table of contents before the abstract. The \optn{number} option causes a section break which may cause a file split, which would put a table of contents out of the home page if it is after the abstract. } \newcommand{\limitstitlepage}{% \pkg{lwarp} supports the native \LaTeX\ titling commands, and also \margintag{package support} supports the packages \pkg{authblk} and \pkg{titling}. If both are \trouble[load order]{authblk=\pkg{authblk}>titling=\pkg{titling}} \trouble{titling=\pkg{titling}>authblk=\pkg{authblk}} used, \pkg{authblk} should be loaded before \pkg{titling}. If using the \pkg{titling} package, additional titlepage fields \margintag{\cs{published} and \cs{subtitle}} for \cs{published} and \cs{subtitle} may be added by using \cs{AddSubtitlePublished} in the preamble. See \cref{sec:publishedsubtitle}. } \newcommand{\limitsappendix}{% During \HTML\ conversion, the option \optn{toc} without \trouble[incorrect \TOC\ link]{appendix>incorrect \TOC\ link} the option \optn{page} results in a \TOC\ link to whichever section was before the \texttt{appendices} environment. It is recommended to use both \texttt{toc} and also \texttt{page} at the same time. } \newcommand{\limitspdftotextenc}{% The option \DescribeOption{pdftotextEnc} \DescribeDefault{UTF-8} \optn{pdftotextEnc} sets the encoding used by \prog{pdftotext}. This is passed to \prog{pdftotext} using its \optn{-enc} option, and is used when converting \LaTeX\ \PDF\ output with \HTML\ tags into a plain-text file with \HTML\ tags. } \newcommand{\limitsgloss}{% To process the \HTML\ glossary: \begin{sourcedisplay} bibtex \textred{\_html}.gls \end{sourcedisplay} } \newcommand{\limitsglossaries}{% \margintag{processing glossaries} \DescribeOption{GlossaryCmd}\DescribeDefault{makeglossaries} \DescribeOption[lwarpmk]{printglossary} \DescribeOption[lwarpmk]{htmlglossary} \prog{lwarpmk} has the commands \cmds{lwarpmk printglossary} and \cmds{lwarpmk htmlglossary}, which process the glossaries created by the \pkg{glossaries} package using that package's \prog{makeglossaries} program. The shell command to execute is set by the \pkg{lwarp} option \optn{GlossaryCmd}, which defaults to \cmds{makeglossaries}. The print or \HTML\ glossary filename is appended to this command. In some situations it may be required to modify the default command, \trouble[\prog{makeglossaries} not found]{makeglossaries=\prog{makeglossaries}>not found} \trouble{glossaries=\pkg{glossaries}>makeglossaries=\prog{makeglossaries} not found} such as to add the \cmds{perl} command in front: \begin{sourcedisplay} \cs{usepackage}[ \\ \fquad\ GlossaryCmd=\{\textred{perl} makeglossaries\}, \\ ] \{lwarp\} \end{sourcedisplay} To set the language to use for processing glossaries with \prog{xindy}: \margintag{\prog{xindy} language} \begin{sourcedisplay} \cs{usepackage}[ \\ \fquad\ GlossaryCmd=\{makeglossaries \textred{-L english}\}, \\ ] \{lwarp\} \end{sourcedisplay} Other options for \prog{makeglossaries} may be set as well. The glossaries may be placed in a numbered or unnumbered section, given \margintag{placement and \TOC\ options} a \TOC\ entry, and placed inline or on their own \HTML\ page: \begin{description} \item [Numbered section, on its own \HTML\ page:] \begin{sourcedisplay} \cs{usepackage}[xindy,toc,numberedsection=nolabel]\{glossaries\} \\ \dots \\ \cs{printglossaries} \end{sourcedisplay} \item [Unnumbered section, inline with the current \HTML\ page:] \begin{sourcedisplay} \cs{usepackage}[xindy,toc]\{glossaries\} \\ \dots \\ \cs{printglossaries} \end{sourcedisplay} \item [Unnumbered section, on its own \HTML\ page:] \begin{sourcedisplay} \cs{usepackage}[xindy,toc]\{glossaries\} \\ \dots \\ \cs{ForceHTMLPage} \\ \cs{printglossaries} \end{sourcedisplay} \end{description} The default \optn{style=item} option for \pkg{glossaries} conflicts \trouble[glossary style]{glossaries=\pkg{glossaries}>style} 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, \trouble[number list]{glossaries=\pkg{glossaries}>page numbers} which could become a very long string if many items are referenced. For now, the number list is simply turned off. The print and \HTML\ versions of the glossary differ \margintag{print/\HTML\ versions} in their internal page numbers. Separate commands for generating print and \HTML\ glossaries are used, even though the page number is currently ignored. } \newcommand{\limitsnomencl}{% To process the \HTML\ nomenclature: \begin{sourcedisplay} makeindex \textred{\_html}.nlo -s nomencl.ist -o \textred{\_html}.nls \end{sourcedisplay} } \newcommand{\limitstocbibind}{% An index may be placed inline with other \HTML\ text, or on its own \HTML\ page: \margintag{placement and \TOC\ options} \gindex{index>placement and \TOC\ options} \gindex{index>table of contents} \begin{description} \item [Inline, with a manual \TOC\ entry:] \ \DescribePackage{makeidx} A commonly-used method to introduce an index in a \LaTeX\ document: \begin{sourcedisplay} \cs{cleardoublepage} \\ \cs{phantomsection} \\ \cs{addcontentsline}\{toc\}\{section\}\{\cs{indexname}\}\% or chapter \\ \cs{printindex} \end{sourcedisplay} \needspace{3\baselineskip} \item [On its own \HTML\ page, with a manual \TOC\ entry:] \ \DescribePackage{makeidx} \begin{sourcedisplay} \cs{begin}\{warpprint\} \\ \cs{cleardoublepage} \\ \cs{phantomsection} \\ \cs{addcontentsline}\{toc\}\{section\}\{\cs{indexname}\}\% or chapter \\ \cs{end}\{warpprint\} \\ \cs{ForceHTMLPage} \\ \cs{ForceHTMLTOC} \\ \cs{printindex} \end{sourcedisplay} \item [Inline, with an automatic \TOC\ entry:] \ \DescribePackage{tocbibind} The \pkg{tocbibind} package may be used to automatically place an entry in the \TOC. \begin{sourcedisplay} \cs{usepackage}[nottoc]\{tocbibind\} \\ \dots \\ \cs{cleardoublepage} \\ \cs{phantomsection} \% to fix print-version index link \\ \cs{printindex} \end{sourcedisplay} \item [On its own \HTML\ page, with an automatic \TOC\ entry:] \ \DescribePackage{tocbibind} \begin{sourcedisplay} \cs{usepackage}[nottoc]\{tocbibind\} \\ \dots \\ \cs{cleardoublepage} \\ \cs{phantomsection} \% to fix print-version index link \\ \cs{ForceHTMLPage} \\ \cs{printindex} \end{sourcedisplay} \end{description} Use the \pkg{tocbibind} \optn{numindex} option to generate a numbered index. \DescribeOption[tocbibind]{numindex} Without this option, the index heading has no number. \margintag{numbered index section} Other packages, such as \pkg{imakeidx}, may also have options for including the index in the Table of Contents. } \newcommand*{\limitssplitidx}{% If the \optn{latexmk} option is selected for \pkg{lwarp}, \prog{latexmk} will compile the document but will \emph{not} compile the indexes. \cmds{lwarpmk printindex} and \cmds{lwarpmk htmlindex} will still be required. When using \cs{AtWriteToIndex} or \cs{AtNextWriteToIndex}, the user must not \trouble[\cs{thepage}]{splitidx=\pkg{splitidx}>\cs{thepage} and \cs{AtWriteToIndex}} refer to \cs{thepage} during \HTML\ output, as the concept of a page number is meaningless. Instead, do \begin{sourcedisplay} \cs{addtocounter}\{LWR@autoindex\}\{1\} \\ \cs{LWR@new@label}\{LWRindex-\cs{arabic}\{LWR@autoindex\}\} \\ \end{sourcedisplay} where the \cs{index}-like action occurs, and then refer to \texttt{\cs{arabic}\{LWR@autoindex\}} instead of \cs{thepage} where the reference should occur. See \cref{sec:specialindex} in the \pkg{lwarp-patch-memoir} package for the \cs{@@wrspindexhyp} macro as an example. } \newcommand{\limitsimakeidx}{% When using \prog{makeindex}, to match the print and \HTML\ output's \margintag{letter headings} \gindex{index>letter headings} display of index letter headings, specify the \filenm{lwarp.ist} style: \begin{sourcedisplay} \cs{makeindex}[options=\{-s lwarp.ist\}] \end{sourcedisplay} (For \HTML\ the \filenm{lwarp.ist} style is used automatically, which displays letter headings. When using \prog{xindy} the default style also displays letter headings.) See \cref{sec:indexingimakeidx} for how to setup \prog{lwarpmk} \margintag{index setup} to process the indexes with \pkg{imakeidx}, both with and without shell escape. } \newcommand{\limitstocloft}{% If using \pkg{tocloft} with \pkg{tocbibind}, \pkg{anonchap}, \DescribePackage{tocloft} \trouble[\pkg{tocloft} \& other packages]{tocloft=\pkg{tocloft}>chapter titles} \pkg{fncychap}, or other packages which change chapter title formatting, load \pkg{tocloft} with its \optn{titles} option, which tells \pkg{tocloft} to use standard \LaTeX\ commands to create the titles, allowing other packages to work with it. } \newcommand*{\limitspagenote}{% \pkg{pagenote} works as-is, but the \optn{page} option is disabled. Note that labels in page notes do not appear as expected, \trouble[labels]{pagenote=\pkg{pagenote}} even in the print version. } \newcommand*{\limitsendnotes}{% To place the endnotes in the \TOC, use: \margintag{table of contents} \begin{sourcedisplay} \cs{usepackage}\{endnotes\} \\ \cs{appto}\cs{enoteheading}\{\cs{addcontentsline}\{toc\}\{section\}\{\cs{notesname}\}\} \cs{renewcommand*}\{\cs{notesname}\}\{Endnotes\} \% optional \\ \end{sourcedisplay} To additionally have the endnotes on their own \HTML\ page, \margintag{\HTML\ page} if \texttt{FileDepth} allows: \begin{sourcedisplay} \cs{ForceHTMLPage} \\ \cs{theendnotes} \end{sourcedisplay} If using \MathJax, see \cref{sec:limitsfootnotes} \watchout[\cs{endnotemark}]\margintag{numbering} regarding the use of \cs{endnotemark} and \cs{endnotetext}. } \newcommand{\limitstext}{% \cs{textbf}, etc.\ are supported, \trouble[\cs{bfseries}, etc.]{text>\cs{bfseries} etc.} \trouble{formatting>\cs{bfseries} etc.} but \cs{bfseries}, etc.\ work only in some situations. \texttt{\&}, \texttt{\textless}, and \texttt{\textgreater} \trouble[HTML special chars]{HTML>entities} \trouble{HTML>\&, \textless, \textgreater} \trouble{text>\&, \textless, \textgreater} \trouble{HTML>sanitization} have special meanings in \HTML. If \cs{\&}, \cs{textless}, and \cs{textgreater} are used, proper \HTML\ entities will be used, but there may be \HTML\ parsing problems if these special characters occur unescaped in program listings or other verbatim text. \trouble{listings>HTML sanitization} \trouble{program listings>HTML sanitization} \trouble{HTML>sanitization} \trouble{verbatim=\pkg{verbatim}} \gindex{listings>HTML sanitization} \gindex{program listings>HTML sanitization} \gindex{HTML>sanitization} For program listings, the \pkg{listings} package is supported, \margintag{program listings} and its \optn{literate} option is used to automatically convert \texttt{\&}, \texttt{\textless}, and \texttt{\textgreater} to proper \HTML\ entities. \pkg{minted} sanitizes \HTML\ automatically by its colorizing, which splits the special characters from the rest of the tag. The \pkg{fancyvrb} and \pkg{fvextra} packages automatically sanitize \HTML\ entities, \trouble[verbatim]{verbatim>HTML sanitization} but the core \LaTeX\ \env{verbatim}-related environments do not, nor does the \pkg{verbatim} package, so care must be taken to avoid accidentally including valid \HTML\ code inside these environments. It may be sufficient to add a space on either side of \texttt{\&}, \texttt{\textless}, and \texttt{\textgreater}. \pkg{fancyvrb} does not sanitize \HTML\ when using the \optn{gobble} option. \watchout[\optn{gobble}] } \newcommand{\limitstextcomp}{% Some \pkg{textcomp} symbols do not have Unicode equivalents, and thus are not supported. Many \pkg{textcomp} symbols are not supported by many system \Slash browser fonts. \trouble[missing symbols]{textcomp=\pkg{textcomp}>missing symbols} \trouble{font>missing symbols} In the \CSS\ try referencing fonts which are more complete, but expect to see gaps in coverage. } \newcommand{\limitsaccents}{% Native \LaTeX\ accents such as \cs{"} will work, but many more kinds of accents are available when using Unicode-aware \XeLaTeX\ and \LuaLaTeX. If using accents in section names which will become file names, it is recommended to use the \LaTeX\ accents such as \cs{"} and \cs{v} instead of Unicode accents. The \LaTeX\ accents will have the accents stripped when creating the filenames, whereas the Unicode accents will appear in the file names, which may cause issues with some operating systems. } \newcommand{\limitsrelsize}{% For \HTML, only the inline macros are supported: \cs{textlarger}, \cs{textsmaller}, and \cs{textscale}. Each becomes an inline span of a modified \attribute{font-size}. \cs{relsize}, \cs{larger}, \cs{smaller}, and \cs{relscale} are ignored. While creating \SVG\ math for \HTML, the original definitions are temporarilty restored, and so should work as expected. The \HTML\ browser's setting for minumum font size \watchout[not small] may limit how small the output will be displayed. } \newcommand{\limitsreferences}{% Labels with special characters may be a problem. \margintag{labels} \trouble[label characters]{label>characters} \trouble{reference>label characters} It is best to stick with alpha-numeric, hyphen, underscore, and perhaps the colon (if not French). \cs{nameref} refers to the most recently-used section where the \cs{label} \margintag{\cs{nameref}} was defined. If no section has been defined before the \cs{label}, \trouble[empty link]{label>\cs{nameref} empty} the link will be empty. Index entries also use \cs{nameref} and have the same limitation. \trouble{index>empty link} \trouble{reference>empty link} \trouble{link>empty} } \newcommand{\limitspfnote}{ While emulating \pkg{pfnote}, \margintag{\pkg{pfnote}} \pkg{lwarp} is not able to reset \HTML\ footnote \trouble[\pkg{pfnote} numbers]{pfnote=\pkg{pfnote}>numbering} numbers per page number to match the printed version, as \HTML\ has no concept of page numbers. \pkg{lwarp} therefore uses continuous footnote numbering even for \pkg{pfnote}. } \newcommand{\limitsperpage}{ To have footnote numbers reset each time footnotes are printed: \margintag{footnote numbering} \begin{sourcedisplay} \cs{setcounter}\{footnoteReset\}\{1\} \end{sourcedisplay} For \pkg{bigfoot}, \pkg{manyfoot}, or \pkg{perpage}: \begin{sourcedisplay} \cs{MakePerPage}\{footnoteX\} \\ \textrm{--- or ---} \\ \cs{MakeSortedPerPage}\{footnoteX\} \end{sourcedisplay} The footnotes are reset when they are printed, according to section level as set by \ctr{FootnoteDepth}, which is not necessarily by \HTML\ page. This is recommended for \cs{alph}, \cs{Alph}, or \cs{fnsymbol} footnotes, due to the limited number of symbols which are available. } \newcommand{\limitsfootnotes}{ \pkg{lwarp} uses native \LaTeX\ footnote code, although with its own \cs{box} to avoid the \LaTeX\ output routine. The usual functions mostly work as-is. \limitsperpage % No longer true: % If using \MathJax, \cs{footnote} and \cs{endnote} work, % \watchout[MathJax, \cs{footnotemark}] % but for \cs{footnotemark}, after each math expression with a \cs{footnotemark} % adjust the \ctr{footnote} counter by the number of \cs{footnotemark}s: % \begin{sourcedisplay} % \cs{[} (math expression with \textgreen{two} instances of \cs{footnotemark}) \cs{]} \\ % \textred{\cs{warpHTMLonly}\{}\cs{addtocounter}\{footnote\}\{\textgreen{2}\}\textred{\}} % \end{sourcedisplay} % Similarly for \pkg{endnotes}, but \emph{not} \pkg{sidenotes}. Also for \MathJax, \cs{footnotename} is used for a \cs{footnotemark} \margintag{\MathJax} if the actual footnote number is not known. To redefine it, provide it before loading \pkg{lwarp}: \begin{sourcedisplay} \cs{providecommand}\{\cs{footnotename}\}\{something\} \\ \cs{usepackage}\{lwarp\} \end{sourcedisplay} Similar for \pkg{sidenotes}. For \pkg{endnotes}: \begin{sourcedisplay} \cs{def}\cs{endnotename}\{something\}\% \cs{def} allows name to start with "end" \end{sourcedisplay} For the \pkg{pagenote} package, there is no \cs{pagenotename} to define, since there is no \cs{pagenotemark} command. The \pkg{footmisc} \optn{stable} option is emulated by \pkg{lwarp}. \margintag{\pkg{footmisc}} When using footnotes in sectioning commands, \trouble[sectioning commands]{footnote>sectioning, \pkg{footmisc}} \trouble{footmisc=\pkg{footmisc}} to generate consistent results between print and \HTML, use the \pkg{footmisc} package with the \optn{stable} option, provide a short \TOC\ entry, and \cs{protect} the \cs{footnote}: \begin{sourcedisplay} \cs{usepackage}[\textred{stable}]\{footmisc\}\\ \dots\\ \cs{subsection}\textred{[Subsection Name]}\\ \fqquad\{Subsection Name\textred{\cs{protect}}\cs{footnote}\{A footnote.\}\} \end{sourcedisplay} If using \pkg{memoir} class, \margintag{\pkg{memoir} with \pkg{footmisc}} with which \pkg{lwarp} preloads \pkg{footmisc}, the \optn{stable} option must be declared before \pkg{lwarp} is loaded: \trouble[\pkg{memoir}]{footnote>memoir=\pkg{memoir}} \trouble{memoir=\pkg{memoir}>footmisc=\pkg{footmisc}} \begin{sourcedisplay} \cs{PassOptionsToPackage}\{\textred{stable}\}\{footmisc\} \\ \cs{usepackage}\{lwarp\} \\ \dots \end{sourcedisplay} Do not use a starred sectioning command. As an alternative, it may be possible to adjust \cs{secnumdepth} instead. % Attempting to use \cs{footnotemark} instead % of \cs{footnote} may result in misnumbered footnotes in the print document. } \newcommand{\limitsverbatimfootnotes}{% If using \pkg{fancybox} or \pkg{fancyvrb} with \cs{VerbatimFootnotes}, \margintag{\pkg{fancybox}, \pkg{fancyvrb}} \trouble[\cs{VerbatimFootnotes}]{footnote>VerbatimFootnotes=\cs{VerbatimFootnotes}} and using footnotes in a sectioning command or display math, \trouble[sectioning or displaymath]{footnote>sectioning, verbatim} \trouble{footnote>displaymath} \trouble{VerbatimFootnotes} \trouble{fancybox=\pkg{fancybox}>VerbatimFootnotes=\cs{VerbatimFootnotes}} \trouble{fancyvrb=\pkg{fancyvrb}>VerbatimFootnotes=\cs{VerbatimFootnotes}} \trouble{footnote>paragraph tags} use \cs{footnotemark} and \cs{footnotetext}: \begin{sourcedisplay} \cs{subsection}[Subsection Name]\\ \fqquad\{Subsection Name\cs{protect}\textred{\cs{footnotemark}}\} \\ \textred{\cs{footnotetext}}\{A footnote with \cs{verb}+verbtim+.\} \\ \end{sourcedisplay} and likewise for equations or display math. } \newcommand{\limitsmanyfootbigfoot}{% Verbatim footnotes are not yet supported. \margintag{\pkg{bigfoot}, \pkg{manyfoot}} \watchout[verbatim] If using the \pkg{bigfoot} package, and possibly also \pkg{manyfoot}, \trouble{bigfoot=\pkg{bigfoot}} \trouble{manyfoot=\pkg{manyfoot}} problems may occur with counter allocation because \pkg{lwarp} uses many counters, and there is a difference in how counters numbered 256 and up are handled in \pdfLaTeX. With \pkg{bigfoot} this has been known to show up as an error related to one footnote insert being forbidden inside another. Another problem showed up as a input stack error, and which of these problems occurred depended on how many counters were allocated. As a possible solution, try creating several new counters before defining \pkg{bigfoot} or \pkg{manyfoot} footnotes, hoping to shift the problematic counter above the 256 threshold. It may instead be necessary to use \XeLaTeX\ or \LuaLaTeX\ instead of \pdfLaTeX. } \newcommand{\limitskomascript}{ Many features are ignored during the \HTML\ conversion. The goal is source-level compatibility. \cs{captionformat}, \cs{figureformat}, and \cs{tableformat} are not yet emulated. \testthis Some features have not yet been tested. Please contact the author with any bug reports. } \newcommand{\limitsmemoir}{ \pkg{lwarp} uses \pkg{caption}, which causes a warning from \pkg{memoir}. \trouble[captions]{memoir=\pkg{memoir}>captions} This is normal. Adjust captions via \pkg{caption}, instead of \pkg{memoir}. While emulating \pkg{memoir}, \pkg{lwarp} pre-loads a number of packages (\cref{sec:patch-memoir-packages}). This can cause an options clash when the user's document later loads the same \trouble[options clash]{memoir=\pkg{memoir}>options clash} \trouble{options>clash with \pkg{memoir}} packages with options. To fix this problem, specify the options before loading \pkg{lwarp}: \begin{sourcedisplay} \cs{documentclass}\{memoir\} \\ \dots \\ \cs{PassOptionsToPackage}\{options\_list\}\{package\_name\} \\ \dots \\ \cs{usepackage\{lwarp\}} \\ \dots \\ \cs{usepackage\{package\_name\}} \end{sourcedisplay} \pkg{memoir} emulates a number of packages, and declares a version date for each \trouble[version numbers]{memoir=\pkg{memoir}>version clash} \trouble{package>version numbers with \pkg{memoir}} \trouble{version numbers>with \pkg{memoir}} which often does not match the date of the corresponding freestanding package. This can cause warnings about incorrect version numbers. Since \pkg{lwarp} is intended to support the freestanding packages, which are often newer than the date declared by \pkg{memoir}, it is hoped that \pkg{memoir} will update and change its emulated version numbers to match. \cs{label} accepts an optional \optn{(bookmark)} argument, but this is \margintag{\texttt{\cs{label}(bookmark)\{tag\}}} ignored in \HTML. The \env{comment} environment is from the \pkg{comment} package, and thus \trouble[\env{comment}]{comment=\env{comment}} \trouble{memoir=\pkg{memoir}>comment=\env{comment}} requires that the \cs{begin} and \cs{end} each be on its own line: \begin{sourcedisplay} \cs{begin}\{comment\} \\ This is a comment. \\ \cs{end}\{comment\} \end{sourcedisplay} Comments defined with \cs{newcomment} use \pkg{memoir}'s defintions, and \margintag{\cs{newcomment}} behave as expected, where the \cs{begin} and \cs{end} do have to each be on its own line. \cs{verbfootnote} is not supported.\watchout[verbatim footnotes] \cs{newfootnoteseries}, etc. are not supported.\watchout[\cs{newfootnoteseries}] \pkg{lwarp} loads \pkg{pagenote} to perform \pkg{memoir}'s pagenote functions, \watchout[page notes] but there are minor differences in \cs{pagenotesubhead} and related macros. To add support for pagenotes with \pkg{cleveref}, add: \margintag{page notes with cleveref} \trouble{memoir=\pkg{memoir}>page notes} \begin{sourcedisplay} \cs{crefname}\{pagenote\}\{page note\}\{page notes\} \\ \cs{Crefname}\{pagenote\}\{Page note\}\{Page notes\} \end{sourcedisplay} Note that for print mode, \margintag{page note \cs{nameref}} \cs{nameref} print the section name where the page notes are declared in the text, but for \HTML\ it prints the name where the page notes are printed. Poem numbering is not supported.\watchout[poems] The \env{verbatim} environment does not yet support the \pkg{memoir} enhancements. \watchout[\env{verbatim}] It is currently recommended to load and use \pkg{fancyvrb} instead. The \pkg{memoir} glossary system is not yet supported by \prog{lwarpmk}. \watchout[glossaries] The \pkg{glossaries} package may be used instead, but does require the glossary entries be changed from the \pkg{memoir} syntax to the \pkg{glossaries} syntax. } \newcommand{\limitsverse}{% When using \pkg{verse} or \pkg{memoir}, always place a \texttt{\textbackslash\textbackslash} after each line. \DescribeMacro{\attrib} 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 \HTML\ output. To combine the two so that \cs{attrib} is used for print and \cs{attribution} is used for \HTML: \begin{sourcedisplay} \cs{begin}\{warpHTML\} \\ \cs{let}\cs{attrib}\cs{attribution} \\ \cs{end}\{warpHTML\} \end{sourcedisplay} \DescribeLength{\vleftskip} \DescribeLength{\vleftmargini} These lengths are used by \pkg{verse} and \pkg{memoir} to control the left margin, 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 \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 \prog{pdftotext}'s ability to discern the layout \trouble[spacing]{verse>spacing} (\optn{-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. \trouble[\env{verse} margin]{verse=\pkg{verse}>margin} \trouble{memoir=\pkg{memoir}>verse>margin} During translation to \HTML, the stanza numbers are kept out of the left margin, which would have caused \prog{pdftotext} to shift everything over. } \newcommand{\limitslateximagefontsize}{% For the \env{lateximage} environment, the size of the math and text used \margintag{\SVG\ image font size} in the \SVG\ image may be adjusted \gindex{font>size>lateximage}% \gindex{font>size>math, SVG}% \gindex{math>font size --- SVG}% \gindex{lateximage>font size}% by setting \cs{LateximageFontSizeName} to a font size name \Dash \emph{without the backslash}, which defaults to: \begin{sourcedisplay} \cs{renewcommand}\{\cs{LateximageFontSizeName}\}\{\textred{normalsize}\} \end{sourcedisplay} For inline \SVG\ math, font size is instead controlled by \cs{LateximageFontScale}, which defaults to: \begin{sourcedisplay} \cs{newcommand}*\{\cs{LateximageFontScale}\}\{\textred{.75}\} \end{sourcedisplay} } \newcommand{\limitsmath}{% \subsubsection{Math in section names} \limitsmathinsectionnames \subsubsection{Math in custom environments} \trouble[math in environments]{math>custom environments} \trouble{mathjax=\MathJax>custom environments} To create an environment which places its contents inside math, instead of: \begin{sourcedisplay} \cs{newenvironment}\{mymathenv\}\{ \textgreen{\cs{(}} starting math\}\{ending math \textgreen{\cs{)}} \} \end{sourcedisplay} use: \begin{sourcedisplay} \cs{NewDocumentEnvironment}\{mymathenv\}\{b\} \\ \fquad \{ \\ \fqquad \textred{\cs{inlinemathother}} \\ \fqquad \textgreen{\cs{(}} starting math \textred{\#1} ending math \textgreen{\cs{)}} \\ \fqquad \textred{\cs{inlinemathnormal}} \\ \fquad \} \\ \fquad \{\} \end{sourcedisplay} or: \begin{sourcedisplay} \cs{usepackage}\{environ\} \\ \cs{NewEnviron}\{mymathenv\}\{ \\ \fquad \textred{\cs{inlinemathother}} \\ \fquad \textgreen{\cs{(}} starting math \textred{\cs{BODY}} ending math \textgreen{\cs{)}} \\ \fquad \textred{\cs{inlinemathnormal}} \\ \} \end{sourcedisplay} For display math, use \cs{[}, \cs{]}, \cs{displaymathother}, and \cs{displaymathnormal}. \subsubsection{Rendering tradeoffs} Math may be rendered \margintag{Math rendering} as \SVG\ graphics or using the \MathJax\ JavaScript display engine. \gindex{JavaScript=\brand{JavaScript}>mathjax=\MathJax} Rendering math as images creates a new \SVG\ file for each expression, \margintag{\SVG\ files} except that an MD5 hash is used to combine identical duplicates of the same inline math expression into a single file, which must be converted to \SVG\ only once. Display math is still handled as individual files, since it may contain labels or references which are likely to change. The \SVG\ images are currently stored separately, \margintag{\SVG\ inline} but they could be encoded in-line directly into the \HTML\ document. This may reduce the number of files and potentially speed loading the images, but slows the display of the rest of the document before the images are loaded. Others \LaTeX-to-\HTML\ converters 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 \SVG\ files are the preferred approach for scalable graphics. Conversion to \MathML\ might be a better approach, \margintag{\MathML} among other things 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. \subsubsection{\SVG\ option} For \SVG\ math, \margintag{\SVG\ math option} math is rendered as usual by \LaTeX{} into the initial \PDF\ file using the \gindex{math>SVG summary}% \gindex{SVG>math summary}% current font\footnote{See \cref{sec:xfrac} regarding fonts and fractions.}, then is captured from the \PDF\ and converted to \SVG\ graphics via a number of utility programs. 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 \HTML\ \attribute{alt} attribute carries the \LaTeX{} code which generated the math, allowing copy/paste of the \LaTeX{} math expression into other documents. \limitslateximagefontsize For \SVG\ math, text copy/paste from the \HTML\ \element{alt} tags lists the \margintag{\SVG\ math copy/paste} equation number or tag for single equations, along with the \LaTeX\ code for the math expression. For \AmS\ environments with multiple numbers in the same environment, only the first and last is copy/pasted, as a range. No tags are listed inside a starred \AmS\ environment, although the \cs{tag} macro will still appear inside the \LaTeX\ math expression. \SVG\ math sizing and baselines are improved if the \pkg{graphics} or \pkg{graphicx} \trouble[\SVG\ math size, baseline]{math>size incorrect} \trouble{math>baseline incorrect} \trouble{image>svg=\SVG\ math size and baseline} \trouble{SVG image>math size and baseline} package is loaded. An almost-invisible marker is placed at either end of the image to assist in cropping and computing the baseline. A warning is issued at the end of the compile if \pkg{graphics} or \pkg{graphicx} are not used. \SVG\ math does not work inside \TeX\ boxes, since a \cs{newpage} is required \trouble[\SVG\ math in \TeX\ boxes]{math>in \TeX\ boxes} before and after each image. \subsubsection{\MathJax\ option} \label{sec:limitsmathjax} The \MathJax\ (\url{mathjax.org}) \LaTeX-math to \HTML\ converter \margintag{\MathJax\ math option} may be used to display math. \DescribeProgram{MathJax} \gindex{math>mathjax=\MathJax\ summary} \gindex{mathjax=\MathJax>summary} When \MathJax\ is enabled, math is rendered twice: \begin{enumerate} \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 \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\ equation numbering system is ignored in favor of the \LaTeX\ internal system, seamlessly integrating with the rest of the \HTML\ output, including any math appearing in non-\MathJax\ \SVG\ output. \end{enumerate} \subsubsection{\MathJax\ rendering options} \trouble[fonts]{mathjax=\MathJax>font} \trouble{mathjax=\MathJax>rendering} \trouble{font>mathjax=\MathJax} \gindex{mathjax=\MathJax>rendering} \gindex{mathjax=\MathJax>font} \gindex{font>mathjax=\MathJax} \MathJax\ v3 may render using \acro{chtml} or \SVG. \SVG\ display renders italic characters correctly. To select \SVG\ rendering, right-click on some math, and select \begin{UIdisplay} Math Settings $\to$ Math Renderer $\to$ SVG \end{UIdisplay} Wait a moment for the math to rerender. \subsubsection{Customizing \MathJax} \label{sec:limitscustomizemathjax} \gindex{mathjax=\MathJax>custom functions} \gindex{math>mathjax=\MathJax\ custom functions} \limitscustomizemathjax \subsubsection{\MathJax\ limitations} Limitations when using \MathJax\ include: \margintag{\MathJax\ limitations} \DescribeProgram{MathJax} \begin{itemize} \item \MathJax\ does not support \cs{multicolumn} or \pkg{multirow}. \trouble[\cs{multicolumn}, \pkg{multirow}]% {multicolumn=\cs{multicolumn}>mathjax=\MathJax} \trouble{multirow=\pkg{multirow}>mathjax=\MathJax} \trouble{array=\env{array}>mathjax=\MathJax} \trouble{mathjax=\MathJax>multicolumn=\cs{multicolumn}} \trouble{mathjax=\MathJax>multirow=\cs{multirow}} These may be used in text \env{tabular}s or \SVG\ math, but in \MathJax\ math \env{array}s they are emulated. \cs{multicolumn} only fills a single cell, resulting in a short row. \cs{multirow} simply prints its text on the first line. \item Footnotes are emulated when used inside a \MathJax\ expression. \watchout[footnotes] For an equation with a single footnote, the correct footnote number is used. For non-equations, \cs{footnotename} is used instead, since the actual number cannot be tracked. See \cref{sec:limitsfootnotes} regarding the use of footnotes with \MathJax. \item Inside a \MathJax\ expression, \trouble[references]{mathjax=\MathJax>references} \trouble{cross reference>mathjax=\MathJax} \trouble{reference>mathjax=\MathJax} references to equations work within the same \HTML\ web page, but do not work when referring to an equation in a different \HTML\ web page. Outside of a \MathJax\ expression, in the text body, references work as expected. \item Math appearing inside a lateximage, \margintag{lateximage} and therefore also inside a \TikZ\ or \env{picture} environment, is rendered as \SVG\ math even if \MathJax\ is used in the rest of the document. \item For \pkg{siunitx}, \margintag{\pkg{siunitx}} see \nameref{sec:limitssiunitx}, \cref{sec:limitssiunitx}. \item For \pkg{physics}, \margintag{\pkg{physics}} see \nameref{sec:limitsphysics}, \cref{sec:limitsphysics}. \item A \env{tabbing} environment is emulated using an \HTML\ \element{pre}.\margintag{tabbing}\ While \MathJax\ is enabled inside \env{tabbing}, the browser may not correctly render the horizontal alignment of the math and text following after on the same line. \item \MathJax\ includes the \prog{textmacros} extension, \margintag{\cs{text}} which supports various macros which are commonly used inside \cs{text}, such as \cs{textbf} and text accents. \pkg{Lwarp} supports this extension. \item If using \dviLaTeX\ or \pdfLaTeX, \trouble[Unicode]{Unicode>mathjax=\MathJax} \trouble{encoding>mathjax=\MathJax} \trouble{character encoding>mathjax=\MathJax} \trouble{mathjax=\MathJax>encoding} \trouble{mathjax=\MathJax>character encoding} \trouble{mathjax=\MathJax>Unicode} unicode input may not appear correctly in \MathJax. Either use \XeLaTeX\ or \LuaLaTeX, or replace Unicode special characters such as \begin{sourcedisplay} \cs{text}\{special character \ae\} \end{sourcedisplay} with their special macros, such as \begin{sourcedisplay} \cs{text}\{special character \cs{ae}\} \end{sourcedisplay} \item Many other math-related macros and packages are \trouble[other macros and packages]{mathjax=\MathJax>unsupported packages} \trouble{package>mathjax=\MathJax\ support} not directly supported by \MathJax, including \cs{ensuremath} and occasionally-used macros such as \cs{relax}. While using \MathJax, \pkg{lwarp} provides emulation for many of these macros, as well as for footnotes and emulation for dozens of packages (see \cref{tab:supported}). In many cases these emulations simply ignore the package in a source-compatible way. Others produce a result which represents the meaning, even if they don't look exact. Look up each package in this document for a description of the limitations of each. \end{itemize} } \newcommand{\limitsmathcatcode}{ The math shift character \texttt{\$} is not set for \HTML\ output until \margintag{preamble macros with math} after the preamble. Macros defined in the preamble which contain \texttt{\$} must be enclosed between \cs{StartDefiningMath} and \cs{StopDefiningMath} to temporarily change to the \HTML\ meaning of \texttt{\$}: \begin{sourcedisplay} \textred{\cs{StartDefiningMath}} \\ \cs{newcommand}\{\dots\} \\ \textred{\cs{StopDefiningMath}} \end{sourcedisplay} As an alternative, use \cs{(} and \cs{)} instead of \texttt{\$}, in which case \cs{StartDefiningMath} and \cs{StopDefiningMath} are not necessary. If a package defines macros using \texttt{\$}, it may be nessary to use \cs{StartDefiningMath} and \cs{StopDefiningMath} before and after loading the package. } \newcommand{\limitsmathinline}{ \DescribeMacro{\inlinemathnormal} \DescribeMacro{\inlinemathother} An inline math expression is usually converted to a reusable hashed \SVG\ math image, or a \MathJax\ expression. The hash or expression depends on the contents of the math expression. In most cases this math expression is static, such as \texttt{\$x+1\$}, so the image can be reused for multiples instances of the same expression. In some cases, \margintag{changing contents} the math expression includes a counter or other object which may change between uses. Another problem is complicated contents \margintag{complicated \attribute{alt} tag} which do not expand well in an \attribute{alt} tag. Yet another problem is math packages which are only partially emulated \margintag{\MathJax\ limitations} in \MathJax. The macro \cs{inlinemathother} may be used before a sequence of dynamic or complicated math expressions, and \cs{inlinemathnormal} after. Doing so tells \pkg{lwarp} to use unhashed \SVG\ math images for those particular expressins, even if \MathJax\ is otherwise in use. See \cref{sec:localizingdynamicmath}. } \newcommand*{\limitsmathdisplay}{ \DescribeMacro{\displaymathnormal} By default, or when selecting \cs{displaymathnormal}, \brand{Mathjax} math display environments print their contents as text into \HTML\ for \MathJax\ to interpret, and \SVG\ display math environments render their contents as \SVG\ images and use their contents as the \attribute{alt} tag of \HTML\ output. To do so, the contents are loaded into a macro for reuse. In some cases, such as complicated \TikZ\ pictures, compilation will fail. \DescribeMacro{\displaymathother} When selecting \cs{displaymathother}, it is assumed that the contents are more complicated than ``pure'' math. An example is an elaborate \TikZ\ picture, \margintag{\MathJax\ unsupported} which will not render in \MathJax\ and will not make sense as an \HTML\ \attribute{alt} tag. \margintag{complicated \attribute{alt} tag} In this mode, \MathJax\ is turned off, math display environments become \SVG\ images, even if \MathJax\ is selected, and the \HTML\ \attribute{alt} tags become simple messages. The contents are internally processed as an environment instead of a macro argument, so complicated objects such as \TikZ\ pictures are more likely to compile successfully. } \newcommand{\limitscustomizemathjax}{% \pkg{lwarp} detects and adjusts \MathJax\ equation numbering format for \margintag{equation numbering} \gindex{equation numbering>mathjax=\MathJax} \gindex{math>equation numbering, mathjax=\MathJax} \gindex{mathjax=\MathJax>equation numbering} \trouble{equation numbering>mathjax=\MathJax} \trouble{mathjax=\MathJax>equation numbering} \trouble{math>equation numbering>mathjax=\MathJax} \pkg{article} and \pkg{book} style equations as well as \pkg{amsmath} \cs{numberwithin} for chapters, sections, and subsections. Custom equation number formats may be set as follows, for example: \begin{sourcedisplay} \cs{renewcommand*}\{\cs{theequation}\}\{\cs{Alph}\{section\}.\cs{arabic}\{equation\}\} \\ \textred{\cs{AtBeginDocument}\{} \\ \fquad\cs{renewcommand*}\{\cs{theMathJaxsection}\}\{\cs{Alph}\{section\}.\} \\ \textred{\}} \end{sourcedisplay} The \pkg{amsmath} \env{subequations} environment is supported, but only \watchout[\env{subequation}] with \cs{alpha} subequation numbering. \MathJax\ does not have preexisting support every possible math function. \margintag{global customizations} Additional \MathJax\ function definitions may be defined in the preamble. These will be declared at the start of each \HTML\ page, and thus will have a global effect across all \HTML\ pages. Examples: \begin{sourcedisplay} \textred{\cs{begin}\{warpMathJax\}} \\ \cs{CustomizeMathJax}\{ \\ \fqquad\cs{newcommand}\{\cs{expval}\}[1]\{\cs{langle}\#1\cs{rangle}\} \\ \fqquad\cs{newcommand}\{\cs{abs}\}[1]\{\cs{lvert}\#1\cs{rvert}\} \\ \} \\ \cs{CustomizeMathJax}\{\cs{newcommand}\{\cs{arcsinh}\}\{\cs{text}\{arcsinh\}\}\} \\ \cs{CustomizeMathJax}\{\cs{newcommand}\{\cs{arccosh}\}\{\cs{text}\{arccosh\}\}\} \\ \cs{CustomizeMathJax}\{\cs{newcommand}\{\cs{NN}\}\{\cs{mathbb}\{N\}\}\} \\ \textred{\cs{end}\{warpMathJax\}} \end{sourcedisplay} To avoid a slowdown in compile speed, use \trouble[slow compilation]{mathjax=\MathJax>slow compilation} \trouble{compiling>slow \MathJax} the \env{warpMathJax} environment to prevent its contents from being processed in print or \SVG\ math output. Also, place each new definition inside its own \cs{CustomizeMathJax}. A warning to this effect is issued if an overly-long definition is attempted. \pkg{lwarp} already provides \MathJax\ customizations for some packages. When using \pkg{siunitx}, a similar process may be used to add custom units: \margintag{\pkg{siunitx}} \begin{sourcedisplay} \cs{begin}\{warpMathJax\} \\ \cs{CustomizeMathJax}\{\cs{newcommand}\{\cs{myunit}\}\{\cs{mathrm}\{WXYZ\}\}\} \\ \cs{CustomizeMathJax}\{\cs{newcommand}\{\cs{umyunit}\}\{\cs{mathrm}\{\cs{micro}\cs{myunit}\}\}\} \\ \cs{end}\{warpMathJax\} \end{sourcedisplay} For more advanced control over dynamically creating custom definitions, \margintag{advanced control} see as an example the \pkg{lwarp} definition for \cs{DeclarePairedDelimiterX}, in \cref{sec:mathtools}, \nameref{sec:mathtools}. For customizations local to the current \HTML\ page only, \margintag{local customizations} macros may be defined as follows: \begin{sourcedisplay} \textred{\cs{begin}\{warpMathJax\}} \\ \textred{\LWRbackslash(} \cs{newcommand}\{\LWRbackslash macroname\}\{\dots\} \textred{\LWRbackslash)}\\ \textred{\LWRbackslash(} \cs{newcommand}\{\LWRbackslash anothername\}\{\dots\} \textred{\LWRbackslash)}\\ \textred{\cs{end}\{warpMathJax\}} \end{sourcedisplay} To maintain compile speed, use the \env{warpMathJax} environment, and use a separate math environment for each definition. \DescribeMacro{\ifstar} For \MathJax, use \cs{ifstar} instead of \cs{@ifstar}: \gindex{starred macros} \gindex{ifnextstar=\cs{@ifnextstar} with \MathJax} \gindex{@ifstar=\cs{@ifstar} with \MathJax} \gindex{mathjax=\MathJax>starred macros} \trouble{mathjax=\MathJax>starred macros} \trouble{math>starred macros and mathjax=\MathJax} \gindex{mathjax=\MathJax>@ifstar=\cs{@ifstar} macros} \trouble{mathjax=\MathJax>@ifstar=\cs{@ifstar} macros} \trouble{math>@ifstar=\cs{@ifstar} macros and \MathJax} \begin{sourcedisplay} \cs{CustomizeMathJax}\{ \\ \fquad \cs{def}\cs{myname}\{\\ \fqquad \cs{ifstar}\cs{starredaction}\cs{unstarredaction} \\ \fqquad \% \textred{(Do not place anything after!)} \\ \fquad \} \} \end{sourcedisplay} \DescribeMacro{\ifnextchar} For \MathJax, use \cs{ifnextchar} instead of \cs{@ifnextchar}: \gindex{@ifnextchar=\cs{@ifnextchar} with \MathJax} \gindex{ifnextchar=\cs{@ifnextchar} with \MathJax} \gindex{mathjax=\MathJax>@ifnextchar=\cs{@ifnextchar} macros} \trouble{mathjax=\MathJax>@ifnextchar=\cs{@ifnextchar} macros} \trouble{math>@ifnextchar=\cs{@ifnextchar} macros and \MathJax} \begin{sourcedisplay} \cs{CustomizeMathJax}\{\cs{def}\cs{myname}\{\cs{ifnextchar} X \cs{found}\cs{notfound}\}\} \end{sourcedisplay} ``\texttt{X}'' may be a single \acro{ASCII} character, or a hex number inside braces, ex: \begin{sourcedisplay} \cs{CustomizeMathJax}\{\cs{def}\cs{myname}\{\cs{ifnextchar}\{0x7B\}\cs{found}\cs{notfound}\}\} \end{sourcedisplay} Use ``\texttt{(}'' or ``\texttt{\{0x28\}}'' for a left parenthesis, ``\texttt{\{0x7B\}}'' for a left brace, ``\texttt{\{0x7D\}}'' for a right brace, or ``\texttt{\{0x5C\}}'' for a backslash. } %\newcommand{\limitscustomizeKaTeX}{% %Ka\TeX\ does not have preexisting support every possible math function. %Additional Ka\TeX\ function definitions may be %defined. These will be declared at the start of each \HTML\ page, %and thus will have a global effect. %Examples: %\begin{sourcedisplay} %\cs{CustomizeKaTeX}\{ \\ %\fqquad\cs{gdef}\cs{expval}\#1\{\cs{langle}\#1\cs{rangle}\} \\ %\fqquad\cs{gdef}\cs{abs}\#1]\{\cs{lvert}\#1\cs{rvert}\} \\ %\} \\ %\cs{CustomizeKaTeX}\{\cs{gdef}\cs{arsinh}\{\cs{text}\{arsinh\}\}\} \\ %\cs{CustomizeKaTeX}\{\cs{gdef}\cs{arcosh}\{\cs{text}\{arcosh\}\}\} %\cs{CustomizeKaTeX}\{\cs{gdef}\cs{NN}\{\cs{mathbb}\{N\}\}\} %\end{sourcedisplay} %} \newcommand*{\limitsmathinsectionnames}{ If using named \HTML\ files, in section names use parentheses math \texttt{\textbackslash(x+y\textbackslash)} \trouble[math in section names]{filename>math in} \trouble{sectioning>math in name} \trouble{math>section name} \trouble{math>file name} instead of dollar math \texttt{\$x+y\$}. Parentheses math is removed from the file name. (Dollar math works, but it generates complicated filenames.) Or, use a short name for the \TOC\ entry without the math, or use \cs{texorpdfstring} from the \pkg{hyperref} package: \begin{sourcedisplay} \cs{section}[Simplified name]\{Name with \cs{(}1+2=3\cs{)} math\} \\ \cs{section}\{Some math \cs{texorpdfstring}\{\$1+2=3\$\}\{three\}\} \end{sourcedisplay} } \newcommand{\limitsmathtools}{% \trouble[equation numbering]{mathtools=\pkg{mathtools}} \optn{showonlyrefs} is disabled, as it conflicts with \pkg{cleveref}, which is used by \pkg{lwarp}. Equation numbers may not match the print version. \optn{mathic} is not emulated for \HTML. \watchout[italic correction] If using \MathJax: \trouble[\MathJax]{mathjax=\MathJax>mathtools=\pkg{mathtools}} \begin{itemize} \item Recent changes may not yet be updated in the \MathJax\ extension, which is used by \pkg{lwarp}. \item \pkg{mathtools} \optn{disallowspaces} does not work for \MathJax. Protect brackets which are not optional arguments, such as: \begin{sourcedisplay} \cs{begin}\{gathered\}\textred{\{\}} \\ {[}p{]}=1 \dots \\ \cs{end}\{gathered\} \end{sourcedisplay} \item \optn{showonlyrefs} does not work in \MathJax, and will result in a difference in equation numbering compared to the print version. \item \env{alignat} in \MathJax\ requires math mode, but in \LaTeX\ it doesn't. It may be required to use \env{warpHTML} and \env{warpprint} to isolate a version for each mode. \item \cs{DeclarePairedDelimiter} and related must be in the preamble before \linebreak \texttt{\cs{begin}\{document\}}. \end{itemize} } \newcommand{\limitsacro}{% Define acronymn formats using \cs{textbf} instead \watchout[formats] of \cs{bfseries} etc. } \newcommand{\limitschemfig}{% If using \cs{polymerdelim} to add delimiters to a \cs{chemfig}, wrap both inside a single \env{lateximage}: \begin{sourcedisplay} \cs{begin}\{lateximage\}[-chemfig-\textasciitilde\cs{PackageDiagramAltText}] \\ \cs{chemfig}\{\dots\} \\ \cs{polymerdelim}[\dots]\{\dots\} \\ \cs{end}\{lateximage\} \end{sourcedisplay} } \newcommand{\limitschemformula}{% \pkg{chemformula} works best without \MathJax. \trouble[\pkg{chemformula} with \MathJax]{mathjax=\MathJax>chemformula=\pkg{chemformula}} \trouble{chemformula=\pkg{chemformula}>mathjax=\MathJax} If \MathJax\ is used, \cs{displaymathother} must be used before \env{array}, and then \cs{displaymathnormal} may be used after. (The \pkg{chemformula} package adapts to \env{array}, but does not know about \brand{Mathjax}, and \MathJax\ does not know about \pkg{chemformula}.) While using \brand{Mathjax}, \cs{displaymathother} may also be used for other forms of display and inline math which contain \pkg{chemformula} expressions. } \newcommand{\limitstheorems}{% If the print version does not use \pkg{cleveref}, \trouble[cref reference format undefined]{ntheorem=\pkg{ntheorem}>cref reference format undefined} \trouble{cref reference format undefined} \trouble{cleveref=\pkg{cleveref}>cref reference format undefined} \trouble{theorem>cref reference format undefined} place all \cs{theoremstyle} and \cs{newtheorem} declarations in the preamble inside \cs{AtEndPreamble}.\footnote{% \pkg{lwarp} uses \pkg{cleveref} for the \HTML\ conversion, and loads \pkg{cleveref} \cs{AtEndPreamble}, just before \cs{AtBeginDocument}. This is also before the \filenm{.aux} file is read. } For some theorems, it may also be required to add inside \cs{AtEndPreamble} something such as: \begin{sourcedisplay} \cs{usepackage}\{etoolbox\} \% for \cs{ifdef}, \cs{AtEndPreamble} \\ \cs{AtEndPreamble}\{ \% if not using cleveref package \\ \fquad \cs{theoremstyle}\{definition\} \\ \fquad \cs{newtheorem}\{dtheorem\}\{Definition\} \\ \fquad \dots \\ \fquad \cs{ifdef}\{\cs{cref}\}\{ \\ \fqquad \cs{crefname}\{Proof\}\{Proof\}\{Proofs\} \\ \fquad \}\{\} \\ \} \end{sourcedisplay} } \newcommand{\limitsntheorem}{% This conversion is not total. \trouble[Font control]{ntheorem=\pkg{ntheorem}>font} Font control is via \CSS, and the custom \LaTeX\ font settings are ignored. \limitsntheoremnumbering } \newcommand{\limitsntheoremnumbering}{% \pkg{ntheorem} has a bug with equation numbering in \AmS\ environments \trouble[Equation numbering]{ntheorem=\pkg{ntheorem}>numbering} \trouble{math>equation numbering>ntheorem=\pkg{ntheorem}} \trouble{AMSmath>ntheorem=\pkg{ntheorem}>numbering} when the option \optn{thref} is used. \pkg{lwarp} does not share this bug, so equations with \cs{split}, etc, are numbered correctly with \pkg{lwarp}'s \HTML\ output, but not with the print output. It is recommended to use \pkg{cleveref} instead of \pkg{ntheorem}'s \optn{thref} option. } \newcommand{\limitsgraphics}{% Per \cref{tab:includegraphicsfilenames}, image filenames may be specified either with or without an extension. \trouble{image>not displayed>extension} \trouble{image>filename extension} \trouble{filename>image extension} \trouble{graphics>image not displayed>extension} \trouble{graphics>\cs{graphicspath}} \gindex{image>file names} \gindex{graphics>file names} \gindex{includegraphics=\cs{includegraphics}>file names} \gindex{filename>graphics} \gindex{filename>images} If an extension is given it will be used as-is, for either print or \HTML\ output. If no extension is given, a list of possible extensions is tried, which depends \margintag{file extensions} on whether print or \HTML\ is being generated. This allows a \PDF\ file for print and a \SVG\ file for \HTML, for example. If no extension is given, the automatic search will only return lowercase extensions, \watchout[case sensitive] even if the filename actually has an uppercase extension, and \pkg{lwarp} cannot get around this problem, so image file extensions must be lowercase to be seen by the \HTML\ browser with \pkg{lwarp}. For example, name the image file \filenm{image.pdf} instead of \filenm{image.PDF}, but refer to it in the source as \filenm{image}, without an extension. For images which may be used as-is with either print or \HTML, such as \JPG\ or \PNG, you may use a capitalized extension if it is specified in the source, such as \filenm{image.JPG}. For \cs{includegraphics} with \filenm{.pdf} or \filenm{.eps} files, \gindex{graphics>file formats} \gindex{image>file formats} \gindex{includegraphics=\cs{includegraphics}>using} \gindex{PDF image>using} \gindex{EPS image>using} \gindex{image>PDF or EPS>using} \margintag{\cs{includegraphics} file formats} the user must provide a \filenm{.pdf} or \filenm{.eps} image file for use in print mode, and also a \filenm{.svg}, \filenm{.png}, or \filenm{.jpg} version of the same image for use in \HTML. \begin{sourcedisplay} \cs{includegraphics}\{filename\} \% print:.pdf/.eps HTML:.svg, etc. \end{sourcedisplay} For print output, \pkg{lwarp} will automatically choose the \filenm{.pdf} or \filenm{.eps} format if available, or some other format otherwise. For \HTML, one of the other formats is used instead. If a \filenm{.pdf} or \filenm{.eps} image is referred to with its file extension, the extension will be changed to \filenm{.svg} for \HTML: \begin{sourcedisplay} \cs{includegraphics}\{filename.pdf\} \% uses .svg in \HTML \\ \cs{includegraphics}\{filename.eps\} \% uses .svg in \HTML \\ \end{sourcedisplay} \DescribeProgram{pdftocairo} \margintag{\PDF\ to \SVG} To convert a \PDF\ image to \SVG, use the utility \prog{pdftocairo}: \userentry{pdftocairo -svg filename.pdf} For a large number of images, use \prog{lwarpmk}: \DescribeProgram{lwarpmk pdftosvg} \userentry{lwarpmk pdftosvg *.pdf \qquad \textrm{(or a list of filenames)}} \DescribeProgram{lwarpmk epstopdf} \DescribeProgram{epstopdf} \margintag{\pkg{epstopdf} package} For \EPS\ images converted to \PDF\ using the package \pkg{epstopdf}, use \userentry{lwarpmk pdftosvg *.PDF} to convert to \SVG\ images. When using \DVI\ \prog{latex}, \margintag{\DVI\ \LaTeX} it is necessary to convert \EPS\ to \PDF\ and then to \SVG: \gindex{image>PDF or EPS>converting} \userentry{lwarpmk epstopdf *.eps\qquad \textrm{(or a list of filenames)}} \userentry{lwarpmk pdftosvg *.pdf\qquad \textrm{(or a list of filenames)}} For \PNG\ or \JPG \margintag{\PNG\ and \JPG} \gindex{image>PNG and JPG} \gindex{PNG images} \gindex{JPG images} while using \prog{pdflatex}, \prog{lualatex}, or \prog{xelatex}, the same file may be used in both print or \HTML\ versions, and may be used with a file extension, but will also be used without the file extension if it is the only file of its base name. \GIF\ files may be used for \HTML, \margintag{\GIF} \gindex{image>GIF} \gindex{GIF images} but another format must also be provided for print output. If a file extension is not used, \margintag{file extension priorities} \trouble{image>format priorities} \trouble{graphics>image format priorities} for \HTML\ the file extension priorities are: \SVG, \GIF, \PNG, then \JPG. A complication occurs if a file of the same name exists elsewhere in the \TeX\ tree, \margintag{duplicate files} \trouble[image not displayed]{graphics>image not displayed>duplicate file} \trouble{image>not displayed>duplicate file} \trouble{graphicspath=\cs{graphicspath}} such as a test image from some \LaTeX\ package. \TeX\ looks in the local document directory before considering the directories specified by \cs{graphicspath}, but the \TeX\ tree is found as ``local'', so any file in the tree is found before the directories in \cs{graphicspath}. To use such an image, it must be copied to the document's directory to be used for \HTML, and furthermore must be in the document's base directory instead of an images subdirectory. If using the older \pkg{graphics} syntax, use both optional arguments \trouble[\pkg{graphics} vs. \pkg{graphicx}]{graphics>optional arguments} \trouble{includegraphics=\cs{includegraphics}>optional arguments} for \cs{includegraphics}. A single optional parameter is interpreted as the newer \pkg{graphicx} syntax. Note that viewports are not supported by \pkg{lwarp} \Dash \trouble[viewport]{graphics>viewport} \trouble{image>viewport} \trouble{viewport} the entire image will be shown. For \cs{includegraphics}, avoid \texttt{px} and \% units for width and height, or \margintag{units} enclose them inside \env{warpHTML} environments. For font-proportional image sizes, use \texttt{ex} or \texttt{em}. For fixed-sized images, use \texttt{cm}, \texttt{mm}, \texttt{in}, \texttt{pt}, or \texttt{pc}. Use the keys \optn{width=.5\cs{linewidth}}, or similar for \cs{textwidth} or \cs{textheight} to give fixed-sized images proportional to a 6 by 9 inch text area. Do not use the \optn{scale} option, since it is not well supported by \HTML\ browsers. \cs{includegraphics} accepts \optn{width} and \optn{height}, \margintag{options} \optn{origin}, \optn{rotate} and \optn{scale}, plus new \optn{class} and \optn{alt} keys. (\optn{alt} has recently been incorportated into \pkg{graphicx} itself.) With \HTML\ output, \cs{includegraphics} accepts an optional \margintag{\HTML\ class} \optn{class=xyz} keyval combination, and if this is given then the \HTML\ output will include that class for the image. The class is ignored for print output. Likewise, the \cs{includegraphics} \optn{alt} key adds an \HTML\ \attribute{alt} tag to \margintag{\HTML\ \attribute{alt} tags} an image, and is ignored for print output. If not assigned, each image is given an \attribute{alt} tag according to \cs{ImageAltText}. \limitsincludegraphicsscale \cs{rotatebox} accepts the optional \optn{origin} key. \margintag{\cs{rotatebox}} \cs{rotatebox}, \cs{scalebox}, and \cs{reflectbox} depend \trouble[browser support]{graphics>\cs{rotatebox}, \cs{scalebox}, \cs{reflectbox}} on modern browser support. 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. } \newcommand*{\limitsincludegraphicsscale}{ Avoid using the \cs{includegraphics} \optn{scale} option. Change: \trouble[\optn{scale}]{scale=\optn{scale} (\cs{includegraphics} option)} \trouble{includegraphics=\cs{includegraphics}>scale=\optn{scale}} \trouble{graphics>scale=\optn{scale} option} \begin{sourcedisplay} \cs{includegraphics}[scale=]\{\,\dots\} \end{sourcedisplay} to: \begin{sourcedisplay} \cs{includegraphics}[width=\textbackslash{linewidth}]\{\,\dots\} \end{sourcedisplay} } \newcommand{\limitssvgimages}{% When a math expression, \env{picture}, or \TikZ\ environment is added or \trouble[adding/removing]{SVG image>out of order} \trouble{graphics>incorrect>added or removed} \trouble{image>incorrect>added or removed} \trouble{math>incorrect>added or removed} removed, the \SVG\ images must be re-created by entering \cmds{lwarpmk limages} to maintain the proper image-file associations. Inline \SVG\ math may be hashed and thus not need to be recreated, but display math and objects such as \TikZ\ may move to new image numbers when the document is changed. Before attempting to create the \SVG\ image files, \margintag{recompile first} \prog{lwarpmk} verifies that the \HTML\ version of the document exists and has correct internal image references.\footnote{This becomes important when dealing with a document containing thousands of images.} If it is necessary to recompile the document's \HTML\ version one more time, \prog{lwarpmk} usually will inform the user with an error message, but there are some conditions which cannot be detected, so the user should watch for the \LaTeX\ recompile warnings. If \HTML\ appears where an \SVG\ image should be, % \trouble[\HTML\ instead of images]{image>appears as \HTML\ code}% \trouble{math>appears as \HTML\ code}% \trouble{SVG image>appears as \HTML\ code}% \trouble{image>appears as \HTML\ code}% \trouble{HTML>image appear as \HTML\ code} recompile the document one more time to get the page numbers back in sync, then remake the images one more time. Incorrect \SVG\ images will also occur if the document changes the \progcode{page} counter: \trouble[page counter]{page counter>SVG images} \trouble{SVG image>incorrect>page counter} \trouble{image>incorrect>page counter} \trouble{graphics>incorrect>page counter} \begin{sourcedisplay} \cs{setcounter}\{page\}\{\} \end{sourcedisplay} The \texttt{page} counter must \emph{not} be adjusted by the user. 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!] For inline math, and some other objects, \pkg{lwarp} uses an MD5 hash on its \LaTeX\ source to combine multiple instances of identical inline expressions into a single image file, but display math and other environments such as \env{picture} and \TikZ\ require one image file each. For a document with a large amount of math, see \cref{sec:tutorialmathjax} to use \MathJax\ instead. } \newcommand{\limitstikz}{% If using display math with \env{tikzpicture} or \cs{tikz}, along \trouble[displaymath and matrices]{tikz>matrices, \&} with matrices with the \texttt{\&} character, the document must be modified as follows: \begin{sourcedisplay} \cs{usepackage}\{tikz\} \\ \cs{tikzset}\{every picture/.style=\{ampersand replacement=\textbackslash\&\}\} \\ \end{sourcedisplay} and each instance of \texttt{\&} in the \pkg{tikz} expression must be replaced with \texttt{\textbackslash\&}.\ } \newcommand{\limitsgrffile}{% \pkg{grffile} is supported as-is. File types known to the browser are displayed, and unknown file types are given a link. Each \PDF\ image for print mode should be accompanied \trouble[matching \PDF\ and \SVG]{grffile=\pkg{grffile}} by an \SVG, \PNG, or \JPG\ version for \HTML. } \newcommand{\limitscolor}{% \pkg{color} is superceded by \pkg{xcolor}, and \pkg{lwarp} requires several of the features of \pkg{xcolor}. When \pkg{color} is requested, \pkg{xcolor} is loaded as well. } \newcommand{\limitsxcolor}{% \cs{colorboxBlock} and \cs{fcolorboxBlock} are provided for \margintag{\cs{colorboxBlock} and \cs{fcolorboxBlock}} increased \HTML\ compatibility, and they are identical to \cs{colorbox} and \cs{fcolorbox} in print mode. In \HTML\ mode they place their contents into a \element{div} instead of a \element{span}. These \element{div}s are set to \attribute{display:~inline-block} so adjacent \cs{colorboxBlock}s appear side-by-side in \HTML, although text is placed before or after each. Print-mode definitions for \cs{colorboxBlock} and \cs{fcolorboxBlock} are created by \pkg{lwarp}'s core if \pkg{xcolor} is loaded. \cs{fcolorbox} and \cs{fcolorboxBlock} allow a background color of \optn{none}, \margintag{background: \optn{none}} in which case only the frame is drawn, which can be useful for \HTML. Color definitions, models, and mixing are fully supported \margintag{color support} without any changes required. \cs{textcolor}, \cs{colorbox}, and \cs{fcolorbox} are supported. \margintag{colored text and boxes} \cs{color} and \cs{pagecolor} are ignored. Use \CSS\ or \cs{textcolor} where possible. \margintag{\cs{color} and \cs{pagecolor}} } \newcommand{\limitsepstopdf}{% Images with an \filenm{.eps} extension will be converted to \filenm{.pdf}. The \HTML\ output uses the \filenm{.svg} version, so \trouble[convert to \filenm{.svg}]{epstopdf=\pkg{epstopdf}} use \userentry{lwarpmk pdftosvg } to generate \filenm{.svg} versions. } \newcommand{\limitspstricks}{% All \pkg{pstricks} content should be \trouble[use \env{pspicture}]{pstricks=\pkg{pstricks}} contained inside a \env{pspicture} environment. } \newcommand{\limitspdftricks}{% The \pkg{pdftricks} image files \filenm{-fig*.pdf} must be converted \trouble[convert image files]{pdftricks=\pkg{pdftricks}} to \filenm{.svg}, or else a missing file error will occur. The image files must also be converted again whenever they change. To convert the images:\userentry{lwarpmk pdftosvg -fig*.pdf} } \newcommand{\limitspsfrag}{% The \env{psfrags} environment is modified to use \env{lateximage} to encapsulate \watchout[use \env{psfrags}] the image. Always use a \env{psfrags} environment to contain any local \cs{psfrag} macros and the associated \cs{includegraphics} or \cs{epsfig} calls. Outside of a \env{psfrags} environment, \pkg{psfrags} adjustments will not be seen by \pkg{lwarp}. Tip: Use a mono-spaced font for the tags in the \EPS\ file. \watchout } \newcommand{\limitspstool}{% \cs{graphicspath} is ignored, and the file directory must be stated. The filename must not have a file extension. \trouble[path and filename]{pstool=\pkg{pstool}} Use \userentry{lwarpmk html} followed by \userentry{lwarpmk limages}. } \newcommand{\limitsasymptote}{% To compile: \begin{sourcedisplay} pdflatex project.tex \\ asy project-*.asy \\ pdflatex project.tex \\ [\baselineskip] lwarpmk print \\ asy project-*.asy \\ lwarpmk print1 \\ lwarpmk print1 \\[\baselineskip] lwarpmk html \\ asy project\textred{\_html}-*.asy \\ lwarpmk html1 \\ lwarpmk html1 \\ \textred{lwarpmk limages} \\ \end{sourcedisplay} } \newcommand{\limitsoverpic}{% The macros \cs{overpicfontsize} and \cs{overpicfontskip} are used during \trouble[scaling]{overpic=\pkg{overpic}} \HTML\ generation. These are sent to \cs{fontsize} to adjust the font size for scaling differences between the print and \HTML\ versions of the document. Renew these macros before using the \env{overpic} and \env{Overpic} environments. } \newcommand*{\limitsmultimedia}{% The packages \pkg{multimedia}, \pkg{movie15}, and \pkg{media9} are supported. \HTMLfive\ \element{audio} and \element{video} objects are created for \filenm{.mp3} and \filenm{.mp4} files. \HTMLfive\ \element{embed} objects are created for \filenm{http} and \filenm{ftp} links. \cs{href} links are created for other media types. (Unfortunately, there is not much overlap between the file types supported for print output and the file types supported by \HTMLfive.) For \pkg{media9}, a multimedia object is inserted for each \optn{addresource=}, as well as each \optn{flashvars} \optn{source=} and \optn{src=}. This may result in duplicate objects. Undesired objects may be nullified by placing them inside \cs{warpprintonly} or the \env{warpprint} environment. Each \HTML\ multimedia object includes the poster text, except for \element{embed} objects. For \pkg{movie15}, the \optn{text} option is supported to specify the poster text. The \optn{width}, \optn{height}, and \optn{totalheight} options are supported. The \HTML\ object is scaled according to the display width, correctly compensating for either tall or wide viewports. Other options are ignored. \pkg{media9} \cs{addmediapath} is supported. It is assumed that the same path structure will exist for the \HTML\ document. \HTMLfive\ media controls are always specified for each \element{audio} and \element{video} object. \pkg{media9} slideshows are not supported. \cs{hyperlinkmovie}, \cs{movieref}, and \cs{mediabutton} are not supported. 3D objects are not supported. If using a \brand{YouTube}\texttrademark\ video, use an ``embedded'' \URL\ with \dots\texttt{/embed/}\dots\ instead of \dots\texttt{/v/}\dots } \newcommand{\limitstabbing}{% The \env{tabbing} environment works, except that \SVG\ math and \env{lateximage}s do not yet work inside the environment. If math is used inside \env{tabbing}, \trouble[math in \env{tabbing}]{tabbing=\env{tabbing}>math} \trouble{math>tabbing=\env{tabbing}} place \env{tabbing} inside a \env{lateximage} environment, which will render the entire environment as a single \SVG\ image. } \newcommand{\limitstabular}{% Tabular mostly works as expected, but pay special attention to the following, especially if working with environments, macros inside tabulars, multirows, \pkg{siunitx} \texttt{S} columns, or the packages \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, or \pkg{xtab}. \begin{description} \item [Defining macros and environments:] \ \begin{itemize} \item When defining environments or macros which include \env{tabular} and \trouble[Misplaced alignment tab character \&]% {Misplaced alignment tab character \&>tabular>macros} \trouble{tabular=\env{tabular}>Misplaced alignment tab character \&>macros} instances of the \texttt{\&} character, it may be necessary to make \texttt{\&} active before the environment or macro is defined, then restore \texttt{\&} to its default catcode after, using the following commands. These are are ignored in print mode. \begin{sourcedisplay} \textred{\cs{StartDefiningTabulars}} \\ \\ \textred{\cs{StopDefiningTabulars}} \end{sourcedisplay} This includes before and after defining any macro \trouble[floatrow]{floatrow=\pkg{floatrow}>ttabbox=\cs{ttabbox}} which used \cs{ttabbox} from \pkg{floatrow}. \item \limitsresumetabular \item To automate the use of \cs{StartDefiningTabulars} \gindex{StartDefiningTabulars=\cs{StartDefiningTabulars}} \gindex{tabular=\env{tabular}>StartDefiningTabulars=\cs{StartDefiningTabulars}} \gindex{tabular=\env{tabular}>in environments, catcode of \&} \margintag{For developers:} and \cs{EndDefiningTabulars}, these macros may be embedded inside an \HTML\ environment definition to automatically change the catcode of \texttt{\&} before absorbing the arguments. Another environment may be embedded as well. \begin{sourcedisplay} \% Does the work after the catcode has been changed: \\ \cs{newcommand}*\{\textblue{\cs{LWR@HTML@subsomename}}\}[2]\{\% \\ \fquad \dots \\ \fquad \textgreen{\cs{otherenvironmentname} [] \{\}}\quad \% for example \\ \} \\ \% Change catcode before absorbing arguments: \\ \cs{newcommand}*\{\cs{LWR@HTML@somename}\{\% \\ \fquad \textred{\cs{StartDefiningTabulars}} \\ \fquad \textblue{\cs{LWR@HTML@subsomename}} \\ \} \\ \% Change catcode again at the end: \\ \cs{newcommand}*\{\cs{LWR@HTML@endsomename}\}\{\% \\ \fquad \dots \\ \fquad \textgreen{\cs{endotherenvironmentname}} \quad \% for example \\ \fquad \textred{\cs{StopDefiningTabulars}} \\ \} \\ \% Combine with the existing print definition: \\ \cs{LWR@formattedenv}\{somename\} \end{sourcedisplay} \end{itemize} \item [Cell contents:] \ \begin{itemize} \item Using a custom macro inside a tabular data cell \trouble[macro in a table]{tabular=\env{tabular}>macro inside} \trouble{tabular=\env{tabular}>row corruption} \gindex{tabular=\env{tabular}>macros inside} may result in an extra \HTML\ data cell tag, corrupting the \HTML\ table. To avoid this, use \cs{TabularMacro} just before the macro. This is ignored in print mode. \begin{sourcedisplay} \textred{\cs{TabularMacro}}\cs{somemacro} \& more row contents \textbackslash\textbackslash \end{sourcedisplay} \end {itemize} \item [Column specifiers:] \ \gindex{tabular=\env{tabular}>column specifier} \trouble{tabular=\env{tabular}>column specifier} \begin{itemize} \item Due to the way math is gathered for processing, \watchout[math] column specifiers such as \progcode{>\{\$\}c<\{\$\}} do not work with \pkg{lwarp}. Instead, each cell must specify math mode individually. \item Only one each of \texttt{@} and \texttt{!} \margintag{\texttt{@} and \texttt{!}} is used at each column, and they are used in that order. \item In \cs{multirow} cells, the print version may have extra \margintag{\cs{multirow}} instances of \texttt{\textless}, \texttt{\textgreater}, \texttt{@}, and \texttt{!} cells on the second and later rows in the \cs{multirow} which do not appear in the \HTML\ version. \item If \cs{newcolumntype} does not work for \HTML, \trouble[\cs{newcolumntype}]{tabular=\env{tabular}>newcolumntype=\cs{newcolumntype} and \cs{HTMLnewcolumntype}} \trouble{newcolumntype=\cs{newcolumntype}} add a simplified column type using \cs{HTMLnewcolumntype}. \item \pkg{lwarp} detects each of the following, \margintag{font and alignment} \trouble{tabular=\env{tabular}>text-align=\progcode{text-align}} \trouble{text-align=\progcode{text-align}} \gindex{text-align=\progcode{text-align}} \gindex{tabular=\env{tabular}>text-align=\progcode{text-align}} and sets \HTML\ \CSS\ appropriately: \begin{sourcedisplay} >\{\cs{centering}\cs{arraybackslash}\} \\ >\{\cs{raggedright}\cs{arraybackslash}\} \\ >\{\cs{raggedleft}\cs{arraybackslash}\} \\ >\{\cs{itshape}\} \\ >\{\cs{bfseries}\} \\ >\{\cs{bfseries}\cs{itshape}\} \end{sourcedisplay} These may be used with \cs{newcolumntype}, such as: \begin{sourcedisplay} \cs{newcolumntype}\{P\}[1]\{>\{\cs{centering}\cs{arraybackslash}\}p\{\#1\}\} \\ \end{sourcedisplay} \end{itemize} \item [Rules:] \ \begin{itemize} \item Doubled \cs{hline}s, \cs{midrule}s, and vertical rules are supported. \item Vertical rules next to either side of an \texttt{@} or \texttt{!} column \margintag{vertical rules} are displayed on both sides of the column. \item Width options are honored. Trim options are converted to \margintag{width and trim} rounded top corners. Trim corners are not rounded with \texttt{@} or \texttt{!} columns, and full-width rules ignore trim. When given an optional width, each cell is styled to create the custom border. Without an optional width, the entire row is given a class to assign the standard border. \item If you wish to use \cs{cmidrule} followed by \cs{bottomrule}, \margintag{combined rules} it may be necessary to use: \begin{sourcedisplay} \cs{cmidrule}\{2-3\} \textbackslash\textbackslash[-2ex] \\ \cs{bottomrule} \end{sourcedisplay} The optional \texttt{-2ex} is ignored in \HTML, but improves the visual formatting in the print output. \item For \cs{toprule} and \cs{bottomrule}, \trouble[\cs{warpprintonly}]{Misplaced \cs{noalign}>tabular>rules} \trouble{tabular=\env{tabular}>rules} when combined with a \env{warpprint} or \env{warpHTML} environment, \trouble[Misplaced \cs{noalign}]{tabular=\env{tabular}>Misplaced \protect\cs{noalign}}% if a ``Misplaced \cs{noalign}'' error occurs, change \begin{sourcedisplay} This \& That \cs{endhead} \end{sourcedisplay} to \begin{sourcedisplay} \textred{\cs{warpprintonly}\{}This \& That \cs{endhead}\textred{\}} \end{sourcedisplay} and likewise with the other \cs{end} headings. Keep the \cs{endfirsthead} row unchanged, as it is still relevent to \HTML\ output. \end{itemize} \needspace{3\baselineskip} \item[Other:] \ \begin{itemize} \item \pkg{tabularx} ignores the width, but \texttt{X} columns do produce paragraph columns or multicolumns. \item For \pkg{longtable}, place headings and footings which \margintag{\env{longtable} headings} do not apply to \HTML\ inside \cs{warpprintonly\{\}}. \item For S columns (from the \pkg{siunitx} package), \trouble[S columns]{siunitx=\pkg{siunitx}>S column} \trouble{tabular=\env{tabular}>S column} while producing print output, anything non-numeric must be placed inside \{ \} braces, including commands such as \cs{multirow}. 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 \HTML\ output, without the extra braces, such as: \\ \hspace*{.375in} \cs{warpprintonly}\{\texttt{1 \& 2 \& \textred{\{}\cs{multirow}\{2\}\{2cm\}\{Text\}\textred{\}} \& 3 \textbackslash\textbackslash\}} \\ \hspace*{.375in} \cs{warpHTMLonly}\{\texttt{1 \& 2 \& \cs{multirow}\{2\}\{2cm\}\{Text\} \& 3 \textbackslash\textbackslash\}} \item In \LaTeX, a \env{tabular} may be placed inside a \env{minipage}, \watchout[\env{tabular} inside a \element{span}] but in \HTML\ a \element{table} may not be inside a \element{span}. If this situation is detected, a warning is printed instructing the user to isolate the \element{span} using \cs{warpprintonly} or the \env{warpprint} environment. \end{itemize} \end{description} } \newcommand*{\limitsmultirow}{% \begin{itemize} \item Note that recent versions of \pkg{multirow} include a new optional \margintag{\optn{vposn}} \optn{vposn} argument. \item For \pkg{multirow}, insert \cs{mrowcell} into any empty multi-row cells. \margintag{multirow cells} This will be a null function for the print output, and is a placeholder for parsing the table for \HTML\ output. An error is generated if this is missed. \begin{sourcedisplay} \small \begin{tabular}{lll} \dots\ \& & \cs{multirow}\{2\}\{.5in\}\{text\} & \&\ \dots \\ \dots\ \& & \textred{\cs{mrowcell}} & \&\ \dots \\ \end{tabular} \end{sourcedisplay} \item The \pkg{multirow} documentation regarding colored cells recommends using \margintag{colored cells} a negative number of rows. This will not work with \pkg{lwarp}, so \cs{warpprintonly} and \cs{warpHTMLonly} must be used to make versions for print and \HTML. \item See \cref{sec:multicolumnmultirow} for \cs{multicolumrow}. \margintag{with \cs{multicolumn}} \pkg{lwarp} does not support \trouble[\cs{multicolumn} \& \cs{multirow}]{multirow=\cs{multirow} and \cs{multicolumn}} directly combining \cs{multicolumn} and \cs{multirow}. Use \cs{multicolumnrow} instead. To create a 2 column, 3 row cell: \begin{sourcedisplay} \cs{multicolumnrow}% \textcolor{blue}{\{2\}\{c\}}% \textgreen{[c]\{3\}[0]\{1in\}[0pt]}\{Text\} \end{sourcedisplay} The two arguments for \cs{multicolumn} come first, followed by the five arguments for \cs{multirow}, many of which are optional, followed by the contents. As per \cs{multirow}, \watchout[skipped cells] skipped cells to the right of the \cs{multicolumnrow} statement are not included in the source code on the same line. On the following lines, \cs{mcolrowcell} must be used for each cell \watchout[empty cells] of each column and each row to be skipped. An error is generated if this is missed. \begin{sourcedisplay} \small \begin{tabular}{lll} \dots\ \& & \cs{multicolumnrow}\{2\}\{c\}[c]\{3\}[0]\{1in\}[0pt]\{Text\} & \&\ \dots \\ \dots\ \& & \textred{\cs{mcolrowcell}} \hfill \& \hfill \textred{\cs{mcolrowcell}} & \&\ \dots \\ \dots\ \& & \textred{\cs{mcolrowcell}} \hfill \& \hfill \textred{\cs{mcolrowcell}} & \&\ \dots \\ \end{tabular} \end{sourcedisplay} \item \MathJax\ does not support \pkg{multirow}, so it is emulated \trouble[MathJax]{mathjax=\MathJax>multirow=\cs{multirow}} \trouble{multirow=\pkg{multirow}>mathjax=\MathJax} to only print its text on the first row. \cs{multirow} works as expected in text \env{tabular}s or \SVG\ math. \end{itemize} } \newcommand{\limitsresumetabular}{% When creating a new environment \trouble[\env{tabular} inside another environment]{tabular=\env{tabular}>inside an environment} \trouble{tabular=\env{tabular}>corrupt rows} which contains a \env{tabular} environment, \pkg{lwarp}'s emulation of the tabular does not automatically resume when the containing enviroment ends, resulting in corrupted \HTML\ rows. To fix this, use \cs{ResumeTabular} as follows. This is ignored in print mode. \begin{sourcedisplay} \textred{\cs{StartDefiningTabulars}} \% \quad (\& is used in a definition) \\ \cs{newenvironment}\{outerenvironment\} \\ \{ \\ \fquad \cs{tabular}\{cc\} \\ \fquad left \& right \textbackslash\textbackslash \\ \} \\ \{ \\ \fquad \textred{\cs{TabularMacro}\cs{ResumeTabular}} \\ \fquad left \& right \textbackslash\textbackslash \\ \fquad \cs{endtabular} \\ \} \\ \textred{\cs{StopDefiningTabulars}} \\ \end{sourcedisplay} } \newcommand{\limitslongtable}{% Use one of either \cs{endhead} or \cs{endfirsthead} for both print and \HTML, and use a \cs{warpprintonly} macro to disable the other head phrase, and also the \cs{endfoot} and \cs{endfirstfoot} phrases. (See \cref{sec:limitsthreeparttablex} if using \pkg{threeparttablex}.) \trouble{tabular=\env{tabular}>endhead=\cs{endhead}, \cs{endfoot}, \cs{endlastfoot}} \begin{sourcedisplay} \cs{begin}\{longtable\}\{ [column specifiers] \} \\ {[} \dots ] \cs{endfirsthead} \quad \textgreen{\% or \cs{endhead}, for print and HTML} \\ \textred{\cs{warpprintonly}\{} \qquad\qquad \textgreen{\% not used in HTML} \\ \fquad [ \dots ] \cs{endhead} \qquad \textgreen{\% or \cs{endfirsthead}} \\ \fquad [ \dots ] \cs{endfoot} \\ \fquad [ ] \cs{endlastfoot} \\ \textred{\}} \\ \dots\ \textblue{table contents} \dots \\ \textred{\cs{warpHTMLonly}\{} \\ \fquad {[} ] \quad \textgreen{\% HTML last footer, without \cs{endfoot} \\ \hspace*{\fill} \% or \cs{endlastfoot}.} \\ \textred{\}} \\ \cs{end}\{longtable\} \end{sourcedisplay} Use the \cs{warpprintonly} macro instead of the \env{warpprint} environment. \trouble[Misplaced \cs{noalign}]{Misplaced \cs{noalign}} Doing so helps avoid ``Misplaced \cs{noalign}.'' when using \cs{begin}\{warpprint\}. \cs{kill} is ignored, place a \cs{kill} line inside \trouble[\cs{kill}]{tabular=\env{tabular}>kill=\cs{kill}} \begin{sourcedisplay} \cs{begin}\{warpprint\} \ldots\ \cs{end}\{warpprint\} \end{sourcedisplay} or place it inside \cs{warpprintonly}. \pkg{longtable} is not supported inside a \env{lateximage}.% \watchout[lateximage] } \newcommand{\limitsthreeparttablex}{% \pkg{threeparttablex} is used with \pkg{longtable} and \pkg{booktabs} as follows: \begin{sourcedisplay} \cs{begin}\{longtable\}\{ [column specifiers] \} \\ {[} \dots ] \cs{endfirsthead} \quad \textgreen{\% or \cs{endhead}, for print and HTML} \\ \textred{\cs{warpprintonly}\{} \qquad\qquad \textgreen{\% not used in HTML} \\ \fquad [ \dots ] \cs{endhead} \qquad \textgreen{\% or \cs{endfirsthead}} \\ \fquad [ \dots ] \cs{endfoot} \\ \fquad \textblue{\cs{bottomrule} \cs{insertTableNotes} \cs{endlastfoot}} \\ \textred{\}} \\ \dots\ \textblue{table contents} \dots \\ \textred{\cs{warpHTMLonly}\{} \quad \textgreen{\% HTML last footer} \\ \fquad \textblue{\cs{bottomrule}} \\ \fquad \textblue{\cs{UseMinipageWidths}} \qquad \textgreen{\% optional} \\ \fquad \textblue{\cs{insertTableNotes}} \\ \fquad \textblue{\cs{endlastfoot}} \\ \textred{\}} \\ \cs{end}\{longtable\} \end{sourcedisplay} The table notes are created using a \cs{multicolumn}. \margintag{table width} By default the width is not specified to the browser, so long table notes can cause the table to be spread out horizontally. For \HTML\ output, \pkg{lwarp} guesses the width of the table depending on the number of columns, then restricts its guess to a min/max range. To use this guess for the width of the table notes, use \cs{UseMinipageWidths} before \cs{insertTableNotes}. The width is then specified, and in many cases the result is an improvement in overall table layout. } \newcommand{\limitssupertabular}{% For \cs{tablefirsthead}, etc., enclose them as follows: \trouble[Misplaced alignment tab character \&]% {Misplaced alignment tab character \&>supertabular=\pkg{supertabular}} \begin{sourcedisplay} \textred{\cs{StartDefiningTabulars}} \\ \cs{tablefirsthead} \\ \dots \\ \textred{\cs{StopDefiningTabulars}} \end{sourcedisplay} See \cref{sec:limitstabular}. \pkg{supertabular} and \pkg{xtab} are not supported inside a \env{lateximage}.\watchout[lateximage] } \newcommand{\limitsbigdelim}{% \cs{ldelim} and \cs{rdelim} use \cs{multirow}, so \trouble[use \cs{mrowcell}]{bigdelim=\pkg{bigdelim}} \cs{mrowcell} must be used in the proper number of empty cells in the same column below \cs{ldelim} or \cs{rdelim}, but not in cells which are above or below the delimiter: \begin{sourcedisplay} \hrule\smallskip \cs{begin}\{tabular\}\{lll\} \\ \textgreen{} \& a \& b \textbackslash\textbackslash \\ \cs{ldelim}\{\textbackslash\{\}\{3\}\{.25in\}[left ] \& c \& d \textbackslash\textbackslash \\ \textred{\cs{mrowcell}} \& e \& f \textbackslash\textbackslash \\ \textred{\cs{mrowcell}} \& g \& h \textbackslash\textbackslash \\ \textgreen{} \& i \& j \textbackslash\textbackslash \\ \cs{end}\{tabular\} \smallskip\hrule \begin{tabular}{lll} \textgreen{<->} & a & b \\ \ldelim{\{}{3}{.25in}[left ] & c & d \\ \mrowcell & e & f \\ \mrowcell & g & h \\ \textgreen{<->} & i & j \\ \end{tabular} \hrule \end{sourcedisplay} For \MathJax, limited emulation is provided which merely prints the delimter and optional text in the first row. } \newcommand{\limitscolortbl}{% Only use \cs{rowcolor} and \cs{cellcolor} at the start of a row, in that order. \trouble[row/cell color]{colortbl=\pkg{colortbl}} \pkg{colortbl} ignores the overhang arguments. \cs{rowcolors} is supported, except that the optional argument is ignored so far. \margintag{colored tables} } \newcommand{\limitsctable}{% Use \cs{StartDefiningTabulars} before one or more \cs{ctable}s, \trouble[Misplaced alignment tab character \&]% {Misplaced alignment tab character \&>ctable=\pkg{ctable}} and \cs{StopDefiningTabulars} after. These change the meaning of the ampersand \texttt{\&} character. } \newcommand{\limitsmakelabel}{% While inside a list environment, \pkg{lwarp} nullifies a number of \TeX\ horizontal skip and fill commands, allowing the user to define \cs{makelabel} for print mode while \HTML\ mode ignores those commands. When defining \cs{makelabel} in a \env{list} environment, use \trouble[label font]{lists>label formatting} \trouble{makelabel=\cs{makelabel}} \cs{textbf} etc. instead of \cs{bfseries}. } \newcommand{\limitslists}{% } \newcommand{\limitsmarginpars}{% \DescribeMacro{\marginpar} \oarg{left} \marg{right} \qquad \trouble{marginpar=\cs{marginpar}} \cs{marginpar} may contains paragraphs, but in order to remain inline with the surrounding text \pkg{lwarp} nullifies block-related macros inside the \cs{marginpar}. Paragraph breaks are converted to \element{br /} tags. \DescribeMacro{\marginparBlock} \oarg{left} \marg{right} \qquad To include block-related macros, use \cs{marginparBlock}, which takes the same arguments but creates a \element{div} instead of a \element{span}. A line break will occur in the text where the \cs{marginBlock} occurs. } \newcommand{\limitssaveboxes}{% \trouble{boxes} \trouble[\HTML\ corrupted]{HTML>corrupted} \trouble{savebox=\cs{savebox}} \trouble{sbox=\cs{sbox}} \trouble{lrbox=\env{lrbox}} \trouble{usebox=\cs{usebox}} \TeX\ boxes are placed inline and do not allow line breaks, so boxes \watchout[boxes] with long contents may overflow the line during \HTML\ conversion. \pkg{lwarp} uses methods which help avoid this problem. \cs{savebox} and related do not (yet) support \env{minipage} or \cs{parbox}. \watchout[\env{minipage}, \cs{parbox}] } \newcommand{\limitsminipage}{% A line of text with an inline \env{minipage} \trouble[inline]{minipage>inline} or \cs{parbox} will have the \env{minipage} or \cs{parbox} placed onto its own line, because a paragraph is a block element and cannot be made \attribute{inline-block}. \env{minipage}s and \cs{parbox}es will be placed side-by-side in \HTML\ \margintag{placement} unless you place a \cs{newline} between them. Side-by-side \env{minipage}s 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 \env{center} environment, the result is similar in print and \HTML. Paragraph tags are suppressed between side-by-side \env{minipage}s and these spacing commands, but not at the start or end of the paragraph. There is limited support for \env{minipage}s inside an \HTML\ \element{span}. \trouble[minipage in a span]{minipage>in a span} An \HTML\ \element{div} cannot appear inside a \element{span}. While in a \element{span}, \env{minipage}s, and \cs{parbox}es, and any enclosed lists have limited \HTML\ tags, resulting in an ``inline'' format, without markup except for \HTML\ breaks. Use \cs{newline} or \cs{par} for an \HTML\ break. When using \env{minipage}, \cs{parbox}, and \env{fminipage}, \trouble[minipage size]{minipage>size} a virtual $6 \times 9$ inch text area is used for \cs{linewidth}, \cs{textwidth}, and \cs{textheight}, both for sizing the minipage, and also for its contents. If a \env{minipage} or \cs{parbox} is assigned a width of exactly \cs{linewidth}, \margintag{if width is \cs{linewidth}} in \HTML\ it is automatically given no \HTML\ width, thus allowed to fill the line as needed, similar to how it appears in print output. A new macro \cs{minipagefullwidth} requests \margintag{full-width if \HTML} that, during \HTML\ output, the next single \env{minipage} or \cs{parbox} be generated without an \HTML\ \attribute{width} attribute, allowing it to be the full width of the display rather than the declared print-output width. This may be useful where the printed version's width makes no sense in \HTML. Inside a \env{tabular} or \env{multicols} environment, \trouble[\env{tabular}, \env{multicols}]{minipage>tabular=\env{tabular}, width in} \trouble{minipage>multicols=\env{multicols}, width in} where the width depends on the browser window, \cs{minipagefullwidth} is effectively used by default for every \env{minipage} or \cs{parbox} inside the environment. \DescribeMacro{\UseMinipageWidths} \DescribeMacro{\IgnoreMinipageWidths} \cs{UseMinipageWidths} may be used to tell \pkg{lwarp} to honor the specified widths of all following \env{minipage}s and \cs{parboxes} until the end of the local scope, and \cs{IgnoreMinipageWidths} may be used to tell \pkg{lwarp} to ignore the specified widths. Inside a \env{multicols}, \cs{linewidth} is divided by the specified number \trouble[\pkg{multicol}]{multicol=\pkg{multicol}>\cs{linewidth}} of columns. Nested \env{minipage}s adopt their parent's text alignment in \HTML, \trouble[text alignment]{minipage>alignment} whereas in regular \LaTeX{} \PDF\ output they do not. Use a \env{flushleft} or similar environment in the child \env{minipage} to force a text alignment. } \newcommand{\limitsfancybox}{% \pkg{fancybox}'s documentation has an example \env{FramedEqn} environment \margintag{framed equation example} which combines math, \cs{Sbox}, a \env{minipage}, and an \cs{fbox}. This combination requires that the entire environment be enclosed inside a \env{lateximage}, which is done by adding \cs{lateximage} at the very start of \env{FramedEqn}'s beginning code, and \cs{endlateximage} at the very end of the ending code. Unfortunately, the \HTML\ \attribute{alt} attribute is not used here. \begin{sourcedisplay} \cs{newenvironment}{FramedEqn} \\ \{ \\ \cs{lateximage}\% NEW \\ \cs{setlength}\{\cs{fboxsep}\}\{15pt\} \\ \dots\}\{\dots\\ \cs{[}\cs{fbox}\{\cs{TheSbox}\}\cs{]} \\ \cs{endlateximage}\% NEW \\ \} \end{sourcedisplay} \cs{fbox} works with \pkg{fancybox}. \margintag{framing alternatives} Also see \pkg{lwarp}'s \cs{fboxBlock} macro and \env{fminipage} environment for alternatives to \cs{fbox} for framing environments. The \pkg{fancybox} documentation's example of a framed table \margintag{framed table example} using an \cs{fbox} containing a \env{tabular} does not work with \pkg{lwarp}, but the \env{FramedTable} environment does work if \cs{fbox} is replaced by \cs{fboxBlock}. This method does lose some \HTML\ formatting. A better method is to enclose the table's contents inside a \env{fminipage} environment. The caption may be placed either inside or outside the \env{fminipage}: \begin{sourcedisplay} \cs{begin}\{table\}\\ \cs{begin}\{fminipage\}\{\cs{linewidth}\}\\ \cs{begin}\{tabular\}\{lr\}\\ \dots \\ \cs{end}\{tabular\}\\ \cs{end}\{fminipage\}\\ \cs{end}\{table\}\\ \end{sourcedisplay} \pkg{lwarp} does not support the \env{verbatim} environment inside a span, box, \trouble[framed verbatim]{verbatim>framed} or \pkg{fancybox}'s \cs{Sbox}, but a \env{verbatim} may be placed inside a \env{fminipage}. The \pkg{fancybox} documentation's example \env{FramedVerb} may be defined as: \begin{sourcedisplay} \cs{newenvironment}\{FramedVerb\}[1] \% width\\ \{\\ \fquad\cs{VerbatimEnvironment}\\ \fquad\cs{fminipage}\{\#1\}\\ \fquad\cs{begin}{Verbatim}\\ \}\{\\ \fquad\cs{end}{Verbatim}\\ \fquad\cs{endfminipage}\\ \} \end{sourcedisplay} \pkg{fancybox}'s \cs{VerbBox} may be used inside \cs{fbox}. \margintag{framed \cs{VerbBox}} \env{LVerbatim}, \cs{LVerbatimInput}, and \cs{LUseVerbatim} indent with horizontal \margintag{indented alignment} space which may not line up exactly with what \prog{pdftotext} detects. Some lines may be off slightly in their left edge. \pkg{lwarp} sanitizes \HTML\ for \pkg{fancybox} verbatims, except for the contents of \cs{VerbBox} and any \cs{verb} inside. } \newcommand{\limitsmdframed}{% Most basic functionality is supported, including \margintag{support} frame background colors and single-border colors and thickness, 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 \optn{framemethod=none}. \watchout[loading] For title font, use \margintag{font}% \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). Since \pkg{lwarp} does not support \cs{bfseries} and friends, only one font selection may be made at a time. \optn{theoremtitlefont} is not supported, since the following text is not \margintag{theoremtitlefont} in braces in the \pkg{mdframed} source. \optn{userdefinedwidth} and \optn{align} are currently ignored. \margintag{ignored options} Environments created or encapsulated by \pkg{mdframed} are enclosed in a \margintag{\CSS\ classes} \element{div} of class \attribute{mdframed}, and also class \attribute{md} for new environments. Frame titles are placed in a \element{div} of class |mdframedtitle|. Subtitles are in a \element{div} of class |mdframedsubtitle|, and likewise for subsubtitles. } \newcommand{\limitspackageloading}{% Package options may cause problems with \pkg{lwarp}, especially if they include curley braces. If selecting options with braces in \cs{usepackage} does not work: \begin{sourcedisplay} \cs{usepackage}[font=\textred{\{}it,small\textred{\}}]\{caption\}\% does not work \end{sourcedisplay} \dots\ try instead selecting the package options before loading \pkg{lwarp}: \begin{sourcedisplay} \cs{PassOptionsToPackage}\{font=\{it,small\}\}\{caption\} \\ \dots \\ \cs{usepackage\{lwarp\}} \\ \dots \\ \cs{usepackage\{caption\}} \end{sourcedisplay} \dots\ or try setting package options after the package has been loaded: \begin{sourcedisplay} \cs{usepackage}\{caption\} \\ \cs{captionsetup}\{font=\{it,small\}\} \end{sourcedisplay} } \newcommand{\limitscaption}{% \limitspackageloading To ensure proper float numbering, set caption positions such as: \trouble[numbering]{caption=\pkg{caption}>numbering} \trouble{float>numbering} \trouble{subcaption=\pkg{subcaption}>numbering} \begin{sourcedisplay} \cs{captionsetup}[figure]\{position=bottom\} \\ \cs{captionsetup}[subfigure]\{position=bottom\} \\ \cs{captionsetup}[table]\{position=top\} \\ \cs{captionsetup}[subtable]\{position=top\} \end{sourcedisplay} Similarly for \pkg{longtable}. These positions depend on where the user places the \cs{caption} command inside each float. } \newcommand{\limitscombiningfloats}{% If using \cs{newfloat}, \pkg{trivfloat}, and/or \pkg{algorithmicx} together, see \cref{sec:combiningfloats}. \watchout[package conflicts] } \newcommand{\limitssubfig}{% % At present, subfigures before the enclosing figure/table's \cs{caption} % \margintag{LOF/LOT} % would appear in the List of Figures/Tables before the enclosing figure/table, % therefore \pkg{lwarp} does not place subfigures in the LOF/LOT. To have correct sub table numbers: \trouble[table numbering]{table>numbering>subfig=\pkg{subfig}} \trouble{subfig=\pkg{subfig}>numbering} \trouble{subtable>numbering>subfig=\pkg{subfig}} \begin{sourcedisplay} \cs{usepackage}\{caption\}\\ \cs{captionsetup}[table]\{position=top\} \end{sourcedisplay} At present, the package options for \optn{lofdepth} and \optn{lotdepth} \trouble[\optn{lof/lotdepth}]{subfig=\pkg{subfig}>options} are not working. These counters must be set separately after the package has been loaded. In the document source, use \cs{hfill} and \cs{hspace*} \trouble[horizontal spacing]{subfig=\pkg{subfig}>inline} between subfigures to spread them apart horizontally. The use of other forms of whitespace may cause paragraph tags to be generated, resulting in subfigures appearing on the following lines instead of all on a single line. } \newcommand{\limitsfloatalignment}{% \cs{centering}, etc. are honored in a \env{figure} or \env{table} if \trouble[\env{figure} \& \env{table} alignment]{float>alignment} they are the first command inside the float: \begin{sourcedisplay} \cs{begin}\{table*\} \\ \cs{centering} \\ \cs{caption}\{A Table\} \\ \dots \end{sourcedisplay} } \newcommand{\limitsfloatrow}{% Use \cs{StartDefiningTabulars} and \cs{StopDefiningTabulars} before and after \trouble[Misplaced alignment tab character \&]% {Misplaced alignment tab character \&>floatrow=\pkg{floatrow}} defining macros using \cs{ttabbox} with a tabular inside. See \cref{sec:limitstabular}. When combined with the \pkg{subfig} package, \trouble[\pkg{subfig} package]{floatrow=\pkg{floatrow}>with \pkg{subfig}} \trouble{subfig=\pkg{subfig}>with \pkg{floatrow}} while inside a \env{subfloatrow} \cs{ffigbox} and \cs{ttabbox} must have the caption in the first of the two of the mandatory arguments. The emulation of \pkg{floatrow} does not support \cs{FBwidth} or \cs{FBheight}. These values are pre-set to \texttt{.3\cs{linewidth}} and \texttt{2in}. \trouble[\cs{FBwidth}, \cs{FBheight}]{floatrow=\pkg{floatrow}>\cs{FBwidth} and \cs{FBheight}} Possible solutions include: \begin{itemize} \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 \HTML\ output. This custom value will be used repeatedly, until it is manually changed to a new value. \end{itemize} } \newcommand{\limitskeyfloat}{% \trouble{keyfloat=\pkg{keyfloat}} If placing a \cs{keyfig}\optn{[H]} inside a \env{keywrap}, \watchout[\env{keywrap}] use an absolute width for \cs{keyfig}, instead of \optn{lw}-proportional widths. (The \optn{[H]} option forces the use of a minipage, which internally adjusts for a virtual 6-inch wide minipage, which then corrupts the \optn{lw} option.) For wrapped figures, overhang and number of lines are ignored. } \newcommand{\limitssiunitx}{% \pkg{siunitx} is well supported by \pkg{lwarp}. \paragraph{Limitations} Some general limitations: Due to \prog{pdftotext} limitations, fraction output is replaced by symbol \margintag{fractions} output for \optn{per-mode} and \optn{quotient-mode}. \cs{cancel} is not currently supported for \pkg{siunitx} v3. Negative values are not automatically colored. % Some units will require that the expression be placed inside math mode. % \trouble[math mode required]{siunitx=\pkg{siunitx}} Tabular \texttt{S} and {s} columns are rendered as simple \texttt{c} columns, although key settings will be set. \trouble[\env{tabular}]{siunitx=\pkg{siunitx}>tabular S and s columns} If using scientific notation, \optn{table-format}, \optn{table-align-uncertainty}, \optn{drop-exponent}, etc.. use \cs{tablenum} for each cell. This is especially required for \optn{drop-exponent}, \trouble[\optn{drop-exponent}]{siunitx=\pkg{siunitx}>drop-exponent=\optn{drop-exponent}} without which the value will be shown incorrectly. \optn{table-auto-round} is ignored. \trouble[\optn{table-auto-round}]{siunitx=\pkg{siunitx}>table-auto-round=\optn{table-auto-roound}} \paragraph{Math rendering} Math may be rendered in several ways in the same document: \begin{description} \item [For math mode with \SVG\ display:] The original \pkg{siunitx} code is used while generating the \SVG\ image. \item [For \HTML\ text mode:] \pkg{lwarp} uses \pkg{siunitx} code patched for \HTML, and simplified units. \item [For math expressions while using \MathJax:] A limited emulation is used. Most functions work reasonably well, but many options cannot be emulated. The result usually looks fine, and otherwise is enough to get the meaning across. \end{description} % \pkg{lwarp}'s \MathJax\ emulation for \pkg{siunitx} is meant to be a % stop-gap measure until an extension is included in \MathJax. % As of this writing, the third-party \pkg{siunitx} extension % for \MathJax\ is not currently hosted at any public CDN, % thus \pkg{siunitx} is not usable with this extension unless a local copy % of this extension is created first. % See \cs{MathJaxFilename} to select a custom \MathJax\ script, but \pkg{lwarp}'s % emulation would have to be diabled as well. \paragraph{Custom units} \pkg{siunitx} allows customized units: \DescribeMacro{\DeclareSIUnit} \marg{name} \marg{definition} \cs{DeclareSIUnit} declares a version of the unit for the print version. This is also used when the unit is printed in \SVG\ math or a \env{lateximage}. It is also used for \HTML\ if an \HTML-specific version is not defined with \cs{HTMLDeclareSIUnit}. \begin{sourcedisplay} \cs{DeclareSIUnit}\cs{myunit}\{\cs{ensuremath}\{\cs{text}\{m\}\_{}y\}\} \end{sourcedisplay} \DescribeMacro{\HTMLDeclareSIUnit} \marg{name} \marg{definition} Use this after the print unit has been defined. \trouble[v3 only!]{siunitx=\pkg{siunitx}>\cs{HTMLDeclareSIUnit}} For \pkg{siunitx} v3, \cs{HTMLDeclareSIUnit} declares a simplified version of the unit for \HTML, for example if the print-mode unit uses \TeX\ boxes or \cs{ensuremath}: \begin{sourcedisplay} \cs{HTMLDeclareSIUnit}\cs{myunit}\{\cs{text}\{m\}\cs{textsubscript}\{\cs{textit}\{y\}\}\} \end{sourcedisplay} It is also possible to provide a custom unit for \MathJax: \begin{sourcedisplay} \cs{CustomizeMathJax}\{\cs{newcommand}\{\cs{myunit}\}\{\cs{text}\{m\}\_{}y\}\} \end{sourcedisplay} \paragraph{Predefined units} Most units work as-is with \HTML. For the following units, \pkg{lwarp} has already set \cs{HTMLDeclareSIUnit}: \cs{celsius}, \cs{arcminute}, \cs{arcsecond}, \cs{elementarycharge}, \cs{clight}, \cs{bohr}, \cs{electronmass}, \cs{hartree}, \cs{planckbar}. \paragraph{Document modifications required for \MathJax} \trouble{siunitx=\pkg{siunitx}>mathjax=\MathJax} \trouble[MathJax]{mathjax=\MathJax>siunitx=\pkg{siunitx}} \begin{itemize} \item Place \cs{sisetup} in the preamble before \texttt{\cs{begin}\{document\}}. \watchout[\cs{sisetup}] Changes made later may be ignored, especially with \MathJax. The \MathJax\ emulation also ignores most macro options. \item Complex numbers are displayed as entered, \watchout[complex numbers] ignoring \optn{output-complex-root}. \item Custom units may be added with \cs{CustomizeMathJax}. \margintag{custom units} For example, from \pkg{lwarp-common-mathjax-siunitx}: \begin{sourcedisplay} \cs{CustomizeMathJax}\{\cs{newcommand}\{\cs{hartree}\}\{\cs{mathit}\{E\}\_{}\{\cs{mathrm}\{h\}\}\}\} \\ \cs{CustomizeMathJax}\{\cs{newcommand}\{\cs{angstrom}\}\{\cs{mathrm}\{\cs{unicode}\{x212B\}\}\}\} \end{sourcedisplay} \item Units work better using \texttt{\textasciitilde} between units \watchout[unit spacing] instead of using periods. \item To square or cube compound units, \watchout[\cs{square}, \cs{cubic}] enclose the following compound units in braces: \begin{sourcedisplay} \cs{cubic}\textred{\{}\cs{centi}\cs{meter}\textred{\}} \end{sourcedisplay} Single units do not require braces. \item For \cs{numlist}, the argument is printed as text as-is, so use space between semicolons for improved readability. \item If using \optn{parse-numbers = false}, also use \cs{num} or \cs{qty}. \watchout[\texttt{Missing \$\ inserted}]{siunitx=\pkg{siunitx}>Missing \$\ inserted.} \end{itemize} Also see \nameref{sec:limitsmathjax}, \cref{sec:limitsmathjax}. } \newcommand{\limitsnicefrac}{% \trouble{nicefrac=\pkg{nicefrac}} \trouble{units=\pkg{units}} \pkg{units} and \pkg{nicefrac} work with \pkg{lwarp}, but \MathJax\ does not have an extension for \pkg{units} or \pkg{nicefrac}. These packages do work with \pkg{lwarp}'s option \optn{svgmath}. } \newcommand{\limitsphysics}{% \pkg{physics} works as-is for \HTML\ with \SVG\ math. For \MathJax, the \MathJax\ v3 \pkg{physics} extension is used. % emulation is provided via \pkg{lwarp}'s \MathJax\ macros. % These are not the same as the third-party \MathJax\ extension. % % \begin{itemize} % \item The \optn{notrig} option is honored. % \item Most macros don't work with \cs{big}, etc.\watchout % \item Each of \cs{matrixquantity}, \cs{smallmatrixquantity}, % and \cs{matrixdeterminant} work, % while \cs{identitymatrix} and the following simply print a place-holder, % and must be replaced by hand using \env{warpprint} and \env{warpHTML}. % \end{itemize} } % \newcommand{\limitsbabelone}{% % If using \pkg{babel} with French, use % \watchout[French]% % \begin{sourcedisplay} % \cs{frenchbsetup\{StandardLists=true\}} % \end{sourcedisplay} % to preserve the special \HTML\ and list handling. % } \newcommand{\limitsbabeltwo}{% When French is used, the caption separator is \trouble[\cs{CaptionSeparator}]{babel=\pkg{babel}>French} changed to a dash. To restore it to a colon, the following may be placed before \pkg{lwarp} is loaded: \begin{sourcedisplay} \cs{renewcommand}*\{\cs{CaptionSeparator}\}\{:\textasciitilde\} \end{sourcedisplay} Also when French is used, \margintag{punctuation spaces} \pkg{lwarp} creates fixed-width space around punctuation by patching \cs{FBcolonspace}, \cs{FBthinspace}, \cs{FBguillspace}, \cs{FBmedkern}, \cs{FBthickkern}, \cs{FBtextellipsis}, and the tilde. If the user's document also changes these parameters, \watchout[customized spacing] the user's changes should be placed inside a \env{warpprint} environment so that the user's changes do not affect the \HTML\ output. } \newcommand{\limitspolyglossia}{% \trouble{Undefined control seq \dots\ begindocument>polyglossia=\pkg{polyglossia}} \trouble{polyglossia=\pkg{polyglossia}>Undefined control seq \dots\ begindocument} \pkg{lwarp} uses \pkg{cleveref}, which has some limitations when using \pkg{polyglossia}, possibly resulting in the error \begin{sourcedisplay} !~Undefined control sequence. \dots\ \cs{\_\_hook} begindocument \end{sourcedisplay} To test compatibility, add \begin{sourcedisplay} \cs{usepackage}\{cleveref\} \end{sourcedisplay} near the end of the preamble (as the last package to be loaded), and try to compile the print version. It may be necessary to set \begin{sourcedisplay} \cs{setdefaultlanguage}\{english\} \end{sourcedisplay} or some other language supported by \pkg{cleveref}, then select other languages using \cs{setotherlanguages}. Once the print version works with \pkg{cleveref} and \pkg{polyglossia}, the \HTML\ version should work as well using \pkg{lwarp}. } \newcommand{\limitsnewclude}{% \pkg{newclude} modifies \cs{label} in a non-adaptive way, so \pkg{newclude} must be loaded before \pkg{lwarp} is loaded: \trouble[loading]{newclude=\pkg{newclude}} \begin{sourcedisplay} \raggedright \cs{documentclass\{article\}} \\ \ldots \\ \cs{usepackage\{newclude\}} \\ \cs{usepackage[warpHTML]\{lwarp\}} \\ \ldots \end{sourcedisplay} } \newcommand{\limitstodonotes}{% \trouble{todonotes=\pkg{todonotes}} The documentation for \pkg{todonotes} and \pkg{luatodonotes} have an example with a todo inside a caption. If this example does not work it will be necessary to move the todo outside of the caption. } \newcommand{\limitsfixme}{% External layouts (\cs{fxloadlayouts}) are not supported. \trouble[external layouts]{fixme=\pkg{fixme}} Customized layouts are overwritten by \pkg{lwarp}'s versions \cs{AtBeginDocument} in order to provide the \HTML\ conversion. If creating a new layout, see \pkg{lwarp}'s changes to provide similar for the new layout, inside a \env{warpHTML} environment. User control is provided for setting the \HTML\ styling of the ``faces''. The defaults are as follows, and may be changed in the preamble after \pkg{fixme} is loaded: \begin{sourcedisplay} \cs{def}\cs{FXFaceInlineHTMLStyle}\{font-weight:bold\} \\ \cs{def}\cs{FXFaceEnvHTMLStyle}\{font-weight:bold\} \\ \cs{def}\cs{FXFaceSignatureHTMLStyle}\{font-style:italic\} \\ \cs{def}\cs{FXFaceTargetHTMLStyle}\{font-style:italic\} \end{sourcedisplay} \bigskip } % For use in the documentation update section: \newcommand*{\newlwarpmkconf}{ Due to changes in \prog{lwarpmk}, \watchout[Reset the configuration] \textred{recompile any existing project a single time} using \cmds{pdflatex filename.tex} or similar, after which \prog{lwarpmk} may then be used with the new configuration files. } \newcommand*{\newimagechecksums}{ Due to changes in how automatically-generated \watchout[New images] \SVG\ image file names are computed, after \cmds{lwarpmk html} use \cmds{lwarpmk cleanlimages} a single time, and then \cmds{lwarpmk limages} to generate the new images. } \newcommand*{\newlabelsystem}{ Due to changes in cross referencing, \watchout[New labels] \textred{execute \cmds{lwarpmk clean} before recompiling.} } \newcommand*{\describehashing}{% If starred, a hashed filename is used.\margintag{image filename hashing} \gindex{hash>SVG image filename} \gindex{filename>hashed} \gindex{image>hashed filename} \gindex{MD5 hash>SVG image filename} If so, the hash is based on the \attribute{alt} tag and also the additional hashing argument. This may be used to provide an expression with a simple \attribute{alt} tag but also enough additional information to provide a unique hash. An example is when the expression is a complicated \TeX\ expression, which would not copy/paste well. A simplified tag may be used, while the complicated expression is used in the additional hashing argument to ensure a unique image. Another example is when the expression is simple, but the image depends on options. These options may be decoded into text form and included in the additional hashing argument in order to make the hash unique according to the set of options, even if the simple \attribute{alt} tag is still the same. } \newcommand{\osportabilityusage}{% \trouble{operating system} \trouble{Mac OS=\brand{Mac OS}} \trouble{Linux=\brand{Linux}} \trouble{Unix=\brand{Unix}} \pkg{lwarp} tries to detect which operating system is being used. \DescribeProgram{Unix}\DescribeProgram{Mac OS}\DescribeProgram{Linux} \brand{Unix}~/ \brand{Mac~OS}~/ \brand{Linux} is the default (collectively referred to as ``\brand{Unix}'' in the configuration files), and \brand{MS-Windows} is supported as well. \trouble{MS-Windows=\brand{MS-Windows}} \trouble{Windows=\brand{Windows}} If \brand{MS-Windows} is not correctly detected, \DescribeProgram{MS-Windows} \DescribeProgram{Windows} use the \pkg{lwarp} option \optn{OSWindows}. \DescribeOption{OSWindows} When detected or specified, the operating-system path separator used by \pkg{lwarp} is modified, and the boolean \texttt{usingOSWindows} is set \texttt{true}. This boolean may be tested by the user for later use. } \setlength{\marginparsep}{1em} \setlength{\marginparpush}{.7ex} \setlength{\IndexMin}{40ex} \setcounter{IndexColumns}{2} % To color the text of the listing, but this makes it harder to read: % \apptocmd{\MacroFont}{\color{blue!40!black}}{}{} \DisableCrossrefs \CodelineIndex \RecordChanges \begin{document} \DocInput{lwarp.dtx} \end{document} % % % \fi % % % \iffalse %<*package> % \fi % % % \changes{v0.10}{2016/03/08}{\ 2016/03/08 Initial version} % \changes{v0.11}{2016/03/11}{\ 2016/03/11} % \changes{v0.11}{2016/03/10}{Test Suite: limages and index in README.txt} % \changes{v0.11}{2016/03/11}{Test Suite: \brand{MS-Windows} in README.txt} % \changes{v0.12}{2016/03/14}{\ 2016/03/14} % \changes{v0.12}{2016/03/14}{Global: Uses \textbackslash{}p@(type) in float captions.} % \changes{v0.12}{2016/03/14}{Test Suite: Sub-figures} % \changes{v0.13}{2016/03/24}{\ 2016/03/24} % \changes{v0.13}{2016/03/23}{Test Suite: Ordinals, Subcaption} % \changes{v0.13}{2016/03/24}{Removed package: subfig} % \changes{v0.14}{2016/03/31}{\ 2016/03/31} % \changes{v0.14}{2016/03/29}{Test Suite: Assigned cleveref name for Test Float.} % \changes{v0.14}{2016/03/31}{Test Suite: Floatrow} % \changes{v0.15}{2016/04/06}{\ 2016/04/06} % \changes{v0.15}{2016/03/31}{Files: lwarp\_formal.css added.} % \changes{v0.15}{2016/03/31}{Test Suite: test\_suite\_formal.css file added.} % \changes{v0.16}{2016/04/11}{\ 2016/04/11} % \changes{v0.16}{2016/04/07}{Test Suite: Supports XeLaTeX, LuaLaTeX.} % \changes{v0.16}{2016/04/08}{Test Suite: Lwarp no longer selects fonts.} % \changes{v0.16}{2016/04/08}{Removed package: suffix} % \changes{v0.17}{2016/04/14}{\ 2016/04/14} % \changes{v0.17}{2016/04/14}{Test Suite: Mdframed} % \changes{v0.17}{2016/04/14}{Test Suite: Fix: Print-version front-matter page numbers.} % \changes{v0.18}{2016/05/19}{\ 2016/05/19} % \changes{v0.18}{2016/04/23}{Files: lwarp.css and lwarp\_formal.css: Improved responsive design.} % \changes{v0.18}{2016/04/23}{File: lwarp.css: Improved \TOC\ outline display.} % \changes{v0.18}{2016/05/13}{Test Suite: Verse package} % \changes{v0.19}{2016/06/08}{\ 2016/06/08} % \changes{v0.19}{2016/05/25}{File: \filenm{lwarp_mathjax.txt} added.} % \changes{v0.19}{2016/06/01}{File: \filenm{lwarp.css}: \attribute{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/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}{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.} % \changes{v0.20}{2017/01/25}{\pkg{caption} and \pkg{subcaption} supported.} % \changes{v0.21}{2017/02/23}{\ 2017/02/23} % \changes{v0.22}{2017/03/02}{\ 2017/03/02} % \changes{v0.23}{2017/03/02}{\ 2017/03/02} % \changes{v0.24}{2017/03/15}{\ 2017/03/15} % \changes{v0.25}{2017/03/22}{\ 2016/03/22} % \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} % \changes{v0.30}{2017/04/29}{\ 2017/04/29} % \changes{v0.31}{2017/05/15}{\ 2017/05/15} % \changes{v0.32}{2017/06/09}{\ 2016/06/09} % \changes{v0.33}{2017/07/10}{\ 2017/07/10} % \changes{v0.34}{2017/08/08}{\ 2017/08/08} % \changes{v0.34}{2017/07/25}{File: \filenm{README.txt}: updated.} % \changes{v0.34}{2017/07/25}{Docs: Horizontal space limitations.} % \changes{v0.35}{2017/08/08}{\ 2017/08/08} % \changes{v0.36}{2017/08/15}{Source: Improved formatting.} % \changes{v0.36}{2017/08/17}{\ 2017/08/17} % \changes{v0.37}{2017/08/19}{\ 2017/08/19} % \changes{v0.38}{2017/08/27}{\ 2017/08/27} % \changes{v0.39}{2017/09/05}{\ 2017/09/05} % \changes{v0.40}{2017/09/25}{\ 2017/09/25} % \changes{v0.41}{2017/10/07}{\ 2017/10/07} % \changes{v0.42}{2017/10/30}{\ 2017/10/30} % \changes{v0.43}{2017/11/08}{\ 2017/11/08} % \changes{v0.44}{2017/11/22}{\ 2017/11/22} % \changes{v0.45}{2018/01/14}{\ 2018/01/14} % \changes{v0.46}{2018/01/23}{\ 2018/01/23} % \changes{v0.47}{2018/01/30}{\ 2018/01/30} % \changes{v0.48}{2018/02/14}{\ 2018/02/14} % \changes{v0.49}{2018/02/19}{\ 2018/02/19} % \changes{v0.50}{2018/03/03}{\ 2018/03/03} % \changes{v0.51}{2018/03/24}{\ 2018/03/24} % \changes{v0.52}{2018/04/01}{\ 2018/04/01} % \changes{v0.53}{2018/04/01}{\ 2018/04/01} % \changes{v0.54}{2018/04/22}{\ 2018/04/22} % \changes{v0.55}{2018/04/26}{\ 2018/04/26} % \changes{v0.56}{2018/05/12}{\ 2018/05/12} % \changes{v0.57}{2018/06/06}{\ 2018/06/06} % \changes{v0.58}{2018/07/07}{\ 2018/07/07} % \changes{v0.58}{2018/06/07}{Replaced each \cs{csuse} with \cs{@nameuse} to force error if undefined.} % \changes{v0.59}{2018/09/07}{\ 2018/09/07} % \changes{v0.60}{2018/09/19}{\ 2018/09/19} % \changes{v0.61}{2018/10/13}{\ 2018/10/13} % \changes{v0.62}{2018/11/19}{\ 2018/11/19} % \changes{v0.63}{2018/12/03}{\ 2018/12/03} % \changes{v0.64}{2018/12/08}{\ 2018/12/08} % \changes{v0.65}{2018/12/22}{\ 2018/12/22} % \changes{v0.66}{2019/02/08}{\ 2019/02/08} % \changes{v0.67}{2019/02/23}{\ 2019/02/23} % \changes{v0.68}{2019/03/05}{\ 2019/03/05} % \changes{v0.69}{2019/03/21}{\ 2019/03/21} % \changes{v0.70}{2019/04/03}{\ 2019/04/03} % \changes{v0.71}{2019/04/29}{\ 2019/04/29} % \changes{v0.72}{2019/06/08}{\ 2019/06/08} % \changes{v0.73}{2019/07/11}{\ 2019/07/11} % \changes{v0.74}{2019/09/02}{\ 2019/09/02} % \changes{v0.75}{2019/09/23}{\ 2019/09/23} % \changes{v0.76}{2019/10/08}{\ 2019/10/08} % \changes{v0.77}{2019/10/15}{\ 2019/10/15} % \changes{v0.78}{2019/11/07}{\ 2019/11/07} % \changes{v0.79}{2020/02/01}{\ 2020/02/01} % \changes{v0.80}{2020/02/19}{\ 2020/02/19} % \changes{v0.81}{2020/03/04}{\ 2020/03/04} % \changes{v0.82}{2020/03/25}{\ 2020/03/25} % \changes{v0.83}{2020/03/27}{\ 2020/03/27} % \changes{v0.84}{2020/04/24}{\ 2020/04/24} % \changes{v0.85}{2020/05/01}{\ 2020/05/01} % \changes{v0.86}{2020/05/12}{\ 2020/05/12} % \changes{v0.87}{2020/06/03}{\ 2020/06/03} % \changes{v0.88}{2020/07/19}{\ 2020/07/19} % \changes{v0.89}{2020/09/03}{\ 2020/09/03} % \changes{v0.891}{2020/09/22}{\ 2020/09/22} % \changes{v0.892}{2020/10/07}{\ 2020/10/07} % \changes{v0.893}{2020/11/26}{\ 2020/11/26} % \changes{v0.894}{2020/12/24}{\ 2020/12/24} % \changes{v0.895}{2021/02/18}{\ 2021/02/18} % \changes{v0.896}{2021/04/08}{\ 2021/04/08} % \changes{v0.897}{2021/05/24}{\ 2021/05/24} % \changes{v0.898}{2021/05/29}{\ 2021/05/29} % \changes{v0.899}{2021/06/29}{\ 2021/06/29} % \changes{v0.900}{2021/07/17}{\ 2021/07/17} % \changes{v0.901}{2021/08/27}{\ 2021/08/27} % \changes{v0.902}{2021/10/01}{\ 2021/10/01} % \changes{v0.903}{2021/12/23}{Now uses \cs{IfPackageLoadedTF}, etc.} % \changes{v0.903}{2022/02/01}{\ 2022/02/01} % \changes{v0.904}{2022/03/09}{\ 2022/03/09} % \changes{v0.904a}{2022/03/16}{\ 2022/03/16} % \changes{v0.904a}{2022/03/16}{Fixed missing \pkg{common-mathjax-siunitx}.} % \changes{v0.905}{2022/03/22}{\ 2022/03/22} % \changes{v0.906}{2022/06/23}{\ 2022/06/23} % \changes{v0.907}{2022/07/11}{\ 2022/07/11} % \changes{v0.908}{2022/07/13}{\ 2022/07/13} % \changes{v0.909}{2022/11/22}{\ 2022/11/22} % \changes{v0.910}{2023/01/03}{\ 2023/01/03} % \changes{v0.911}{2023/02/28}{\ 2023/02/28} % \changes{v0.912}{2023/08/28}{\ 2023/08/28} % \changes{v0.913}{2024/01/05}{\ 2024/01/05} % \changes{v0.914}{2024/01/11}{\ 2024/01/11} % \changes{v0.915}{2024/02/05}{\ 2024/02/05} % \changes{v0.916}{2024/02/22}{\ 2024/02/22} % \GetFileInfo{lwarp.sty} % % \DoNotIndex{\newcommand,\renewcommand,\addtocounter,\begin,\end,\begingroup,\endgroup} % \DoNotIndex{\global,\ifbool,\ifthenelse,\isequivalentto,\let} % \DoNotIndex{\booltrue,\boolfalse} % \expandafter\DoNotIndex\expandafter{\detokenize{\(,\),\,,\\,\#,\$,\%,\^,\_,\~,\ ,\&,\{,\}}} % % % \thispagestyle{empty} % \newgeometry{margin=1in} % % \begin{center} % % ^^A Generate the Lwarp logo: % \setlength{\unitlength}{1cm} % \begin{picture}(5,2) % \put(0,1){\textcolor[HTML]{74515b}{\fontsize{55}{65}\selectfont L\raisebox{.2ex}{\hspace*{-.1em}warp}}} % \put(0,.25){\parbox{5cm}{% % \textcolor[HTML]{8c6b1d}{\fontsize{22}{30}\selectfont \LaTeX} \hfill % \textcolor[HTML]{1d3d8c}{\fontsize{22}{30}\selectfont HTML5}% % }} % \end{picture} % % {\Huge The \pkg{lwarp} package} % % {\Large \LaTeX\ to \HTML} % % \fileversion{} \Dash \filedate % % {\small\textcopyright{} 2016--2024} Brian Dunn % % GitHub: \url{https://github.com/bdtc/lwarp} % % \end{center} % % \begin{abstract} % \noindent % The \pkg{lwarp} package converts \LaTeX\ to \HTML\ by using \LaTeX\ to process the % user's document and directly generate \HTML\ tags. External utility programs are only % used for the final conversion of text and images. Math may be represented % by \SVG\ images or \MathJax. % More than 500 \LaTeX\ packages and classes are supported, % of which more than 90 also support \MathJax. % % Documents may be produced by \DVI\ or \PDF\ \LaTeX, Lua\LaTeX, \XeLaTeX; % by several CJK engines, classes, and packages; % or by customized systems such as \pkg{perltex} and \pkg{pythontex}. % A \prog{texlua} script automates compilation, index, % glossary, and batch image processing, and also supports \prog{latexmk}. % Configuration is semi-automatic at the first manual compile. Support files % are self-generated. Print and \HTML\ versions of each document may coexist. % % Assistance is provided for \HTML\ import into \EPUB\ conversion software and % word processors. % % Requirements include the commonly-available \brand{Poppler} utilities % (included with \brand{MiKTeX}) and \brand{Perl}. % Detailed installation instructions are included for each of the % major operating systems and \TeX\ distributions. % % A quick-start tutorial is provided, as well as extensive documentation % for special cases, a general index, and a troubleshooting index. % Automatic error testing is provided for configuration files, package load order, % and image generation. % % \SVG\ math and many other generated images % include \LaTeX\ expressions in the \attribute{alt} tags. % \MathJax\ may be used with advanced equation numbering % under the direct control of \pkg{lwarp}. % % Complicated tables are supported, which copy/paste well into \brand{LibreOffice Writer}. % % Supported classes and packages include \pkg{memoir} and \pkg{koma-script}, % \pkg{cleveref}, \pkg{caption}, \pkg{mdframed}, \pkg{siunitx}, % and many popular packages for tabulars, floats, graphics, theorems, the title page, % bibliography, indexing, footnotes, and editorial work, as well as a number of CJK-related % classes and packages. % % \TeX\ is a self-modifying tokenized macro-expansion language. % Since \pkg{lwarp} is written directly in \LaTeX, it is able to interpret the document's % meaning at a deeper level than external conversions which merely approximate \TeX. % \HTML5 and \CSS3 are leveraged to provide advanced features such as % \pkg{booktabs} trim, multicolumns, side-by-side minipages, and % \brand{JavaScript}-free navigation. % % ^^A The \pkg{lwarp} package allows \LaTeX\ to directly produce \HTMLfive\ output, % ^^A using external utility programs only for the final conversion of text and images. % ^^A Math may be represented by \SVG\ files or \MathJax. % % ^^A Documents may be produced by \pdfLaTeX, \LuaLaTeX, or \XeLaTeX. % ^^A A \prog{texlua} script removes the need for system utilities such as \prog{make} and \prog{gawk}, % ^^A and also supports \prog{xindy} and \prog{latexmk}. Configuration is automatic at the % ^^A first manual compile. % % ^^A Print and \HTML\ versions of each document may coexist, each with its own % ^^A set of auxiliary files. Support files are self-generated on request. % ^^A Assistance is provided for import into \EPUB\ conversion software and word processors. % % ^^A A modular package-loading system uses the \pkg{lwarp} version of a package for % ^^A \HTML\ when available. % ^^A More than 300 \LaTeX\ packages are supported with these % ^^A high-level source-compatibility replacements, and many others work as-is. % % ^^A A tutorial is provided to quickly introduce the user to the major components % ^^A of the package. % % \end{abstract} % % \begin{center} % \setlength{\parskip}{1ex} % \color{blue} % For a quick-start tutorial, see \cref{sec:tutorial}, \nameref{sec:tutorial}. % % For a list of supported features, see \cref{tab:supported}: \nameref{tab:supported}. % % To update existing projects, see \cref{sec:updates}: \nameref{sec:updates}. % % Need help? See the \nameref{sec:indexgen} or the \nameref{sec:indextrb}. % % \color{red!30!black}\bfseries % \pkg{Lwarp} is still in development. Changes are likely. % % \end{center} % % \begin{description} % \footnotesize % \item[License:] \ % % 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. % \end{description} % % % % \clearpage % \phantomsection % % \restoregeometry % % \section*{Support \protect\TeX\ development} % \addcontentsline{toc}{section}{Support \protect\TeX\ development} % \label{sec:supportinglatex} % \changes{v0.42}{2017/10/30}{Docs: Added support page.} % % \begingroup % \setlength{\parindent}{0em} % \setlength{\parskip}{2ex} % % \TeX\ and related projects: % \begin{itemize}[nosep] % \item are mostly open-sourced and a volunteer effort; % \item benefit students, academics, scientists, engineers, and businesses; % \item help drive education, public and private research, and commercial activity; % \item are used in the fields of mathematics, science, engineering, and humanities; % \item are international in reach; % \item span decades of development; % \item are enduring \Dash many older packages are still actively used and maintained; % \item are largely backwards compatible; % \item are portable across all the major computing platforms; % \item are usable even on older computers and away from internet access; % \item are continuing to maintain relevance with modern improvements; % \item require no yearly subscription fees; % \item and are supported by an active community of knowledgeable volunteers. % \end{itemize} % % Please consider helping by joining and/or contributing to the \TeX\ Users Group, % a United States 501(c)(3) tax-exempt charitable organization. % Contributions are accepted by credit card, check, or Pay Pal, via the United Way, % or by USA or European bank transfer. % Membership in TUG supports the development of \TeX{}Live, the major \TeX\ distribution. % % Donations may be directed towards individual projects: % \begin{description}[nosep] % \item[TUG Bursary Fund:] Assistance for attending annual TUG meetings. % \item[CTAN:] The Comprehensive \TeX\ Archive Network \Dash Central storage for \TeX. % \item[TeX Development Fund:] Support for specific projects. % \item[EduTeX:] Teaching and using \TeX\ in schools and universities. % \item[GUST e-foundry fonts:] Enhanced for math and additional language groups. % \item[LaTeX Project:] Modernizing the \LaTeX\ core. % \item[Libre Font Fund:] Fonts, tools (FontForge), and distribution (the Open Font Library). % \item[LuaTeX:] Combining the \pdfTeX\ engine and the Lua language. % \item[MetaPost:] Postscript graphics. % \item[MacTeX:] \TeX\ for Mac. % \item[PDF Accessibility:] Modern \PDF\ standards. % \item[Other:] Additional projects may be specified. % \end{description} % % To make a contribution: \hfill % \href{https://www.tug.org/donate.html}{\texttt{https://www.tug.org/donate.html}} % % For country-specific \TeX\ users groups: \hfill % \href{http://tug.org/usergroups.html}{\texttt{http://tug.org/usergroups.html}} % % For users of MiK\TeX: \hfill % \href{https://miktex.org/donations.html}{\texttt{https://miktex.org/donations.html}} % % \endgroup % % \clearpage % % % \tableofcontents % % \clearpage % \phantomsection % % % \listoffigures % \listoftables % % % \thispagestyle{pageheadfoot} % % \clearpage % % \section{Updates} % \label{sec:updates} % % ^^A *updates % % The following is a summary of updates to \pkg{lwarp}, % highlighting new features and any special changes which must be made due % to improvements or modifications in \pkg{lwarp} itself. % % For a detailed list of the most recent changes, % see the end of the Change History on page \pageref{sec:changesend}. % % \begin{description} % \item[v0.916:] Now allows duplicate section names for file breaks. % \begin{itemize} % \item Adjusts file names to allow duplicate section names. % See \cref{sec:limitssectionnamesduplicates}. % \item Fixed \LaTeX3 key/value option handling. % \item Fixed \cs{} at end of a line. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.915:] \HTML\ list classes, meta tags. % \begin{itemize} % \item \LaTeX\ lists now given the class \attribute{itemize}, % \attribute{enumerate}, \attribute{description}, \attribute{hanging}. % \item \LaTeX\ list labels now given the class \attribute{listmarker}. % \item Added \cs{HTMLKeywords} for the keywords meta tag. % \item Added \cs{HTMLMeta} and \cs{HTMLAddMeta} for custom \attribute{meta} tags. % \item Added \attribute{data-nosnippet} to \MathJax\ customization \element{div}s. % \item Updated \pkg{pdfpages} to v0.5y. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.914:] Detects changing packages. % \begin{itemize} % \item Now verifies many definitions before patching, % warning of possible problems if the original has changed. % \item Fix: \pkg{fontawesome5} for \XeLaTeX, \LuaLaTeX. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.913:] \HTML\ sanitization for verbatims. % \begin{itemize} % \item Now at GitHub: \url{https://github.com/bdtc/lwarp} % \item Added bibliography usage info to docs and tutorial. % \item \cs{verb} now uses a \CSS\ class of \attribute{verb} % instead of \attribute{texttt}. % \item Improved \HTML\ sanitization for hyperlinks, % \pkg{fancybox}, \pkg{fancyvrb}, \pkg{fvextra}, \pkg{minted}. % \item Updated \pkg{fancyvrb}, \pkg{fvextra}, \pkg{simplebnf}. % \item \pkg{siunitx}: Updated, and improved complex i,j. % \item Added \pkg{doipubmed}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.912:] Updated for new \LaTeX\ label system. % \begin{itemize} % \item \newlabelsystem % \item Fixed for updated kernel label system, name and back references. % \item Updated \pkg{memoir}, \pkg{tcolorbox}. % \item \pkg{nameref}: Now allowed to load before \pkg{lwarp}, such as by \pkg{memoir}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.911:] Updated \pkg{mismath}, \pkg{tcolorbox}. % \needspace{2\baselineskip} % \item[v0.910:] Updated \pkg{fvextra}, \pkg{minted}. % \needspace{2\baselineskip} % \item[v0.909:] \cs{ref} fix. % \begin{itemize} % \item Fixed \cs{ref*}, \pkg{beamerarticle}, \pkg{lyluatex}, \pkg{realscripts}. % \item Updated \pkg{mismath}, \pkg{nicematrix}, \pkg{pablance}, % \pkg{pdfpages}, \pkg{simplebnf}, \pkg{tagpdf}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.908:] Bug fix. % \begin{itemize} % \item Fixed obscure cross-reference issue, seen in some citations. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.907:] Bug fix. % \begin{itemize} % \item Fixed \SVG\ images for \brand{Windows}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.906:] Screen readers % \begin{itemize} % \item For each \env{tabular}, add a hidden \HTML\ header cell to % convince screen readers that the tables are data not layout. % Also hide from the screen reader any final row % used only to produce bottom borders. % \item Adjusted \SVG\ math for a margin change in \prog{pdfcrop}. % \item Added \cs{Ref}. % \item Added docs regarding math in custom environments. % See \cref{sec:limitsmath}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.905:] Bug fixes, internal improvements. % \begin{itemize} % \item Fixed conflict between \pkg{cleveref} and \pkg{splitidx}. % \item Improved coexistence with \cs{AtEndDocument}. % \item \pkg{acronym}: Updated to v1.47, added hyper links. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.904a:] Fixed missing \pkg{lwarp-common-mathjax-siunitx} package. % \needspace{2\baselineskip} % \item[v0.904:] Added \pkg{siunitx} v3. % \begin{itemize} % \item Fixed \HTML\ tags inside non-Latin text. % \item \MathJax\ now defaults to \SVG\ rendering. % \item Added \pkg{siunitx} v3. Updated \pkg{siunitx-v2}. % See \cref{sec:limitssiunitx} for limitations. % \item Updated \pkg{caption}, \pkg{chemmacros}, \pkg{fbox}, \pkg{hyperref}, % \pkg{multicol}, \pkg{wrapfig2}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.903:] Various updates and improvements. % \begin{itemize} % \item Error if \prog{pdftotext} not available. % \margintag{\prog{lwarpmk}} % Ensures that \brand{poppler} programs are installed. % \item \prog{ps2pdf}: Allow transparency due to recent changes in \prog{ps2pdf}. % \margintag{core} % \item \newimagechecksums % \item Improved back refs. % \item Fixed \env{verbatim*}. % \item Various internal updates for recent \LaTeX\ release. % \item \pkg{cuted}: Updated to v2.0. % \margintag{packages} % \item \pkg{flushend}: Updated to v4.0. % \item \pkg{mathalpha}: Updated for v1.14+. % \item \pkg{minted}: Updated to v2.6. % \item \pkg{cases}: Updated to v3.2. % \item \pkg{siunitx} with \MathJax: Improved \cs{per}, \cs{numlist}, \cs{SIlist}, % comma decimal points. % \item Added \pkg{showlabels}, \pkg{wrapfig2}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.902:] \pkg{beamerarticle}, footnotes, paragraph tags. % \begin{itemize} % \item Fixed footnotes inside descriptions, minipages, \pkg{amsthm}, \cs{nameref}. % \margintag{core} % \item Improved various paragraph tags. % \item Improved \pkg{parnotes}, \pkg{sympytex}. % \margintag{packages} % \item Added \pkg{beamerarticle}. % \item Updated \pkg{luatexko}, \pkg{xetexko}, \pkg{tagpdf}. % \item Added missing standard international text symbols for \MathJax. % \margintag{\MathJax} % \end{itemize} % \needspace{2\baselineskip} % \item[v0.901:] Tabular columns, float caption \CSS, \MathJax\ packages. % \begin{itemize} % \item Added \env{warpsvg} to isolate \SVG\ math, as opposed to \env{warpMathJax}. % \margintag{core} % \item Improved float caption \CSS\ for newer browsers. % \item Improved emulation of \cs{newcolumntype}. % \item Added \cs{HTMLnewcolumntype}. See \cref{sec:htmlsettings}, % \item \progcode{>\{\cs{centering}\cs{arraybackslash}\}}, etc. % now sets \HTML\ \CSS\ \progcode{text-align}. % Also detects \cs{itshape}, \cs{bfseries}, and \cs{bfseries}\cs{itshape}. % See \cref{sec:limitstabular}. % \item Now uses \MathJax\ 3.2 packages for \pkg{centernot}, \pkg{colortbl}, % \margintag{\MathJax} % \pkg{gensymb}, \pkg{mathtools}, \pkg{textcomp}, \pkg{upgreek}. % \item \pkg{dcolumn}: Now works inside a \env{lateximage}. % \margintag{packages} % \item Added \pkg{mwe}. % \item Added \pkg{lltjp-tascmac}, which fixed \pkg{ascmac}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.900:] Package updates. % \begin{itemize} % \item Fix for detecting |\usepackage{lwarp}|. % \margintag{core} % \item \pkg{amsmath}: Fixed \env{alignat} with \MathJax. % \margintag{packages} % \item \pkg{changes}: Updated to v4.2.1. % \item \pkg{froufrou}: Updated to v1.4.0. % \item \pkg{lipsum}: Updated to v2.3. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.899:] Minor updates. % \begin{itemize} % \item \prog{lwarpmk}: Warns if |\usepackage{lwarp}| is not detected. % \margintag{core} % \item \pkg{graphics}: Added support for \optn{keepaspectratio}. % \margintag{packages} % \item \pkg{keyfloat}: Fix: \optn{lw} with \optn{h}. % \item \pkg{multicol}: Improved \CSS. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.898:] Minor updates. % \begin{itemize} % \item Fewer underfull \cs{hbox} warnings. % \item \pkg{wrapfig}: Improved integration with \pkg{keyfloat}. % \end{itemize} % \item[v0.897:] \pkg{siunitx} rollback. % \begin{itemize} % \item Added a table of file extensions to use with \cs{includegraphics}. % \margintag{docs} % See \cref{tab:includegraphicsfilenames}. % \item Added tests for additional incompatible packages. % \margintag{core} % \item \pkg{siunitx}: Supports rollback to v2. Does not yet support v3. % \margintag{packages} % \item \pkg{fixme}: Improved to work if the user modifies layouts. % \item \pkg{float}: Improved integration with \pkg{newfloat}, \pkg{keyfloat}. % \item Added \pkg{centerlastline}, \pkg{decorule}, \pkg{fancypar}, % \pkg{froufrou}, \pkg{pbalance}. % \item Verified works as-is with \pkg{fnpct}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.896:] Back references, accessibility. % \begin{itemize} % \item \newlabelsystem % \item Increased sectioning nesting stack depth. Error if overflow stack. % \item Fixed footnotes at the end of the document, % or inside a \env{description} label. % \item Added an error if using braces inside \cs{usepackage} options. % \item Fixed footnotes in bracket display math with \MathJax. % \margintag{\MathJax} % \item \LaTeX\ theorems, \pkg{amsthm}, \pkg{ntheorem}, \pkg{theorem}: % \margintag{theorems} % Print theorem footnotes following theorems. % \item Added \HTML\ \element{main} element to each page. % \margintag{accessibility} % \item Added \ARIA\ |math| role to \SVG\ math images, and |note| role to % margin notes, footnotes, etc. % \item Improved citation backreferences for various packages. % \margintag{packages} % \item \pkg{chemfig}: Updated to v1.6a. % \item \pkg{bigdelim}: Updated to v2.8. % \item \pkg{xetexko}: Updated to v3.1. % \item \pkg{hyperxmp}: Fix: Accept and discard additional keys. % \item \pkg{hyperef}: Fix: Added \cs{*autorefname} macros. % \item \pkg{biblatex}: Fix: Back references. % \item \pkg{tocloft}: Fix: \cs{cftpagenumbersoff}, \cs{cftpagenumberson}. % \item \pkg{threeparttablex}: Fix: \cs{TPTL@tnotex}. % \item \pkg{amsthm}: Fix: Footnotes inside environment optional argument. % \item \pkg{listings}: Fixed labels. Accepts but ignores escapes w/o error. % \item \pkg{pdflscape}: Fix: Added \env{landscape} environment. % \item Added \pkg{ccicons}, \pkg{classicthesis}, \pkg{orcidlink}. % \item Added \pkg{enotez}. % \item Verified support for \pkg{doi}, \pkg{doipubmed}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.895:] Vector packages, greatly improved \MathJax\ for \pkg{siunitx}. % \begin{itemize} % \item Fixed quotes in \HTML\ tags while using old font packages with % \margintag{core} % \XeLaTeX\ and \LuaLaTeX. % \item Added \cs{ifblank} and \cs{ifstrequal} to \MathJax\ emulation. % \margintag{\MathJax} % \item \pkg{multirow}: Allow \cs{par} per v2.7. % \margintag{packages} % \item \pkg{acro}: Updated to v3.5. % \item \pkg{fancyhdr}: Updated to v4.0. % \item \pkg{changes}: Updated to v4.0.1. % \item \pkg{epsfig}, \pkg{rotating}: Now work inside \env{lateximage}. % \item \pkg{amscdx}: Verified to work with \SVG\ math. % Warning added about use with \MathJax. % \item Added \MathJax\ emulation for \pkg{isomath}, \pkg{mattens}, % \pkg{maybemath}, \pkg{skmath}, \pkg{tensor}. % \item Improved \MathJax\ emulation for \pkg{siunitx} \cs{ang}, % \cs{num}, \cs{SI}. % \item Added \pkg{epsf}, \pkg{impnattypo}, \pkg{isotope}, % \pkg{lpic}, \pkg{luavlna}, % \pkg{mdwmath}, \pkg{pinlabel}, \pkg{rlepsf}, % \pkg{tikz-imagelabels}, \pkg{xevlna}. % \item Verified to work as-is: \pkg{tensind}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.894:] \MathJax\ additions and improvements. % \begin{itemize} % \item Improved warning message for enabling \SVG\ graphics for % \margintag{\MathJax} % select math expressions while using \MathJax. % \item Accept and ignore a star for \cs{hspace}. % \item Ignores \cs{arabic}, \cs{number}, \cs{noalign}. % \item Added \MathJax\ emulation for \pkg{backnaur}, % \pkg{colortbl}, \pkg{nicematrix}. % \margintag{packages} % \item \pkg{booktabs}: \MathJax\ emulation now absorbs and discards trim. % \item \pkg{menukeys}: Updated to v1.6.1. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.893:] Minor fixes, more packages. % \begin{itemize} % \item Added \MathJax\ emulation for \cs{mathnormal}. % \margintag{\MathJax} % \item Fixed \pkg{pstricks} \env{pspicture*}. % \margintag{packages} % \item Fixed \pkg{tikz} font macros. % \item \pkg{braket}: Now uses the \MathJax\ extension. % \item Added \pkg{esvect}, \pkg{fixmath}, \pkg{keystroke}, \pkg{mathastext}, % \pkg{menukeys}, \pkg{picinpar}, \pkg{plimsoll}, \pkg{repltext}, % \pkg{selectp}, \pkg{seqsplit}, \pkg{simplebnf}, \pkg{statistics}, % \pkg{swfigure}. % \item Added \MathJax\ emulation for \pkg{mathspec}. % \item Verified to work as-is for \pkg{apxproof}, \pkg{syntaxdi}, \pkg{venndiagram}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.892:] \pkg{minted}, \pkg{fvextra}, \MathJax\ \cs{left} \Slash \cs{right}. % \begin{itemize} % \item \pkg{fourier}, \pkg{libertinust1math}, \pkg{newpxmath}, \pkg{newtxmath}, % \margintag{\MathJax} % \pkg{newtxsf}, \pkg{unicode-math}: Added \MathJax % \cs{left} \Slash \cs{right} support for additional delimiters. % \item \pkg{textpos}: Updated to v1.10. % \margintag{packages} % \item \pkg{xcolor}: Fixed optional args for \cs{fcolorbox} and related. % \item Added \pkg{fvextra}, \pkg{minted}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.891:] \MathJax\ additions and improvements. % \begin{itemize} % \item Now displays inline \cs{verb} text as \cs{texttt}. % \margintag{core} % \item Fixed \pkg{alltt} and verbatims with \LaTeX\ lists. % \item Now generates an error if nested each of \env{warpHTML}, \env{warpprint}, \env{warpMathJax} % inside itself. % \item Added \MathJax\ \prog{textmacros} extension, allowing % \margintag{\MathJax} % formatting inside \cs{text}. % \item \pkg{biblatex}, \pkg{hyperref}: Added back page references. % \margintag{packages} % \item \pkg{fancyvrb}: Fixed \env{BVerbatim} with a label. % \item \pkg{listings}: Fixed \MathJax\ with captions, improved \HTML\ sanitation. % \item \pkg{babel-french}: Fixed \cs{texorpdfstring} conflict. % \item Now honors Greek package options for \pkg{mathdesign}, % \pkg{mathpazo}, \pkg{mathptmx}, % \pkg{newpxmath}, \pkg{newtxmath}. % \item Improved \MathJax\ for \pkg{colonequals}, \pkg{mathdesign}, % \pkg{mathdots}, \pkg{mathfixs}, \pkg{mathtools}, \pkg{multiobjective}, % \pkg{nicefrac}, \pkg{shuffle}, \pkg{units}. % \item \pkg{unicode-math}: Added Greek macros, as well as macros for % the first several categories listed in \cmds{texdoc unimath-symbols}. % Improved symbol shape macros with Greek. Improved documentation. % \item Added \pkg{bussproofs}, \pkg{cmbright}, \pkg{fourier}, % \pkg{kpfonts}, \pkg{kpfonts-otf}, % \pkg{libertinust1math}, \pkg{scalerel}, \pkg{txgreeks}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.89:] Additional \MathJax\ support. % \begin{itemize} % \item Adapted to upcoming \LaTeX\ kernel changes. % \margintag{core} % \item Allows load of \pkg{amsmath} before \pkg{lwarp}. % \item Also removes \filenm{*.bbl} when cleaning aux files.\margintag{\prog{lwarpmk}} % \item \MathJax: Neutralized \cs{protect}, \cs{mathcode} and related, % \margintag{\MathJax} % ligatures. Fixed nested environments. % \item \pkg{caption}: Updated for v3.5, fix for label sep. % \margintag{packages} % \item \pkg{thmtools}: Updated for v0.72. Fixed \optn{swapnumber}, \optn{margin}. % \item Improved \MathJax\ for \pkg{centernot}, \pkg{mathtools}, % \pkg{mismath}, \pkg{SIunits}, \pkg{siunitx}, \pkg{statmath}. % \item Added \MathJax\ emulation for \pkg{accents}, \pkg{hepunits}, % \pkg{hhtensor}, \pkg{mathalpha}, \pkg{mathdesign}, % \pkg{mathpazo}, \pkg{mathptmx}, % \pkg{mleftright}, \pkg{newpxmath}, \pkg{newtxmath}, \pkg{newtxsf}, % \pkg{pxfonts}, \pkg{shuffle}, \pkg{txfonts}, % \pkg{upgreek}, \pkg{ushort}. % \item Verified to work as-is: \pkg{authoraftertitle}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.88:] Indexing, boxing, theorems. % \begin{itemize} % \item \textgreen{Now has programmed support for more than 500 packages and classes, % of which more than 60 also support \MathJax.} % \item Fixed: \cs{ref*}, and also added \MathJax\ emulation. % \margintag{core} % \item If starting a new paragraph, \cs{hrulefill} creates a % \element{div} with a thin horizontal line across the page. % Use instead of \cs{hrule}. % \item Fixed: Use \cs{chaptername} where appropriate. % \item Fixed: Inline links causing extraneous paragraphs. % \item Added \cmds{lwarpmk -v} to print the version number. % \margintag{\prog{lwarpmk}} % \item Added the \optn{IndexRef} option to control the display of index entries. % \margintag{indexing} % See \cref{sec:optionindexref}. % \item Added \cs{IndexPageSeparator} and \cs{IndexRangeSeparator} for custom index styles. % \item Added support for \pkg{gindex}, \prog{xindex}. % \item Verified to work as-is with \pkg{varindex}. % \item \pkg{cleveref}, \pkg{varioref}: Fix for starred macros. % \margintag{packages} % \item \pkg{varioref}: Removed page-related text from \HTML\ output. % \item \pkg{xfakebold}: Updated to v0.08, using \pkg{pdfrender}. % \item \pkg{caption}, \pkg{scrextend}: Fixed \cs{caption*}. % \item Added \pkg{fbox}, \pkg{shadethm}, \pkg{tcolorbox}, \pkg{termcal}, % \pkg{thmbox}, \pkg{thmtools}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.87:] \MathJax, bibliography packages. % \begin{itemize} % \item Added boolean \bool{FixSmallCaps} for fonts which render small caps as % \margintag{core} % all caps. % \item Fixed \cs{bibliography} to use the \HTML\ version's \filenm{.bbl} file. % Previously the \HTML\ bibliography relied on the print version's \filenm{.bbl}, % thus would fail if the print document had not yet been created. % \item Added \cs{ifstar} and \cs{ifnextchar} to \MathJax, and % \margintag{\MathJax} % removed \cs{DeclareIfstar}. % \watchout[Removed \cs{DeclareIfstar}] % See \cref{sec:limitscustomizemathjax}. % \item \pkg{physics}: Now supports the \MathJax\ v3 extension. % \margintag{packages} % \item \pkg{mathtools}: Improved \cs{underbrakcet}, \cs{overbracket} for \MathJax. % \item \pkg{nccmath}: Improved \cs{underrel} for \MathJax. % \item \pkg{mhchem}: Now supports the \MathJax\ v3 extension for \cs{ce} inside math. % \item \pkg{cancel}: Now supports the \MathJax\ v3 extension. % \item \pkg{embrac}: Neutralized kerning for improved \HTML\ conversion. % \item Added \pkg{citeref}, \pkg{drftcite}, \pkg{jurabib}, \pkg{multibib}, \pkg{splitbib}. % \item Verified to work as-is with \pkg{bibtopic}, \pkg{collref}, \pkg{mciteplus}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.86:] \MathJax\ major updates. % \begin{itemize} % \item Fixed: Filename if named files with \filenm{*}, parens, period in section name. % \margintag{core} % \item Fixed: Labels in \env{eqnarray}, \env{lateximage}. % \item Updated to \MathJax\ v3. New repository. % \margintag{\MathJax} % \item Fixed forward references for \MathJax. % \item Improved \MathJax\ equation number formatting, now compatible with % \pkg{amsmath} \cs{numberwithin} for chapters, sections, subsections, % as well as \pkg{amsmath} \env{subequation}s. % See \cref{sec:limitscustomizemathjax}. % \item Added \cs{DeclareIfstar} to define starred \TeX\ macros in \MathJax. % See \cref{sec:limitscustomizemathjax}. % \item Generates an error if \cs{MathJaxFilename} file does not exist. % \item \pkg{mathtools}, \pkg{nccmath}, \pkg{physics}: % \margintag{packages} % Added starred macros for \MathJax. % \item \pkg{nccmath}: Fixed \cs{nr}, \cs{displaybreak} for \MathJax. % \item \pkg{xcolor}: Fixed \cs{textcolor} with \pkg{babel-french}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.85:] \pkg{fontspec} % \begin{itemize} % \item \pkg{fontspec}: Fixed core font change macros for world languages. % \margintag{packages} % \item \pkg{acro}: Due to v3 changes, when defining acronym formats, % \watchout[\pkg{acro} formats] % use \cs{textbf} instead of \cs{bfseries}, etc. % \item Fixed \pkg{idxlayout}, \pkg{mathtools}, \pkg{titlesec}, \pkg{url}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.84:] Previous/next page links, numerous fixes. % \begin{itemize} % \item Added documentation of \env{BlockClass} and \cs{InlineClass} % for \CSS\ \element{div}s and \element{span}s. % \margintag{docs} % See \cref{sec:classstyle}. % \item Added \cs{LinkPrevious}, \cs{LinkNext} page links. % See \cref{sec:htmlsettings}. % \item Added \cs{FirstPageBottom}. % \watchout[home page footer changed] % Home page no longer shares \cs{PageBottom}. % See \cref{sec:htmlsettings}. % \item Improved coexistence with \pkg{comment}, support for nested environments. % \margintag{core} % \item No longer requires but still supports the \pkg{caption} package. % \item Improved filenames and \HTML\ titles when using special characters. % \item Change: Append \filenm{-0} to section named Index % \watchout{previously \_index} % to distinguish from \filenm{index.html} % \item Fixed style tags for \cs{multicolumn}, \cs{multirow}. % \item Fixed spacing in \env{tabbing}. % \item Fixed \env{lateximage} for: \env{quote}, \env{quotation}, \env{verse}, % \env{center}, \env{flushleft}, \env{flushright}, % \element{par} tags, packages \pkg{verbatim}, \pkg{alltt}, \pkg{epigraph}. % \item Fixed \pkg{textcomp} due to integration into \LaTeX\ kernel. % \item Fixed \cs{itshape}, etc. Adapted to \LaTeX\ \pkg{fontaxes} integration. % \item Fixed \cs{@fnsymbol}. % \item Warns about section names with dollar-delimited math. % \item Warns about a \element{span} containing a float, caption, section, % \pkg{mdframed}, or other \element{div} object. % \item Only warn about \XeTeX\ logo and \pkg{graphics} if actually used \cs{Xe}. % \item \cmds{lwarpmk clean} also removes \filenm{comment_*.cut}. % \margintag{\prog{lwarpmk}} % \item \pkg{scrextend}, \pkg{scrartcl}, \pkg{scrbook}: Added \cs{titlehead}, % \margintag{packages} % \cs{subject}, \cs{subtitle}, \cs{publishers}. % \item \pkg{titling}: Fixed \cs{printthanks}. % \item \pkg{memoir}, \pkg{abstract}: Fixed for updated \pkg{memoir}. % \item \pkg{memoir}: Fixed \cs{newcomment}, pagenotes, crossreferences. % Fixed setting a recursive name. % \item Fixed or improved: \pkg{amsthm}, \pkg{backref}, \pkg{biblatex}, \pkg{fixme}, % \pkg{nfssext-cfr}, \pkg{ntheorem}, \pkg{parcolumns}, % \pkg{realscripts}, \pkg{rotfloat}, \pkg{titling}. % \item Added \pkg{boxedminipage}, renamed from \pkg{boxedminipage2e} per author. % \item Verified to work as-is with \pkg{mcite}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.83:] \pkg{memoir} fixes. % \begin{itemize} % \item \pkg{memoir}: Various fixes and updates. % \margintag{packages} % \item \pkg{physunits}: Updated to v1.0.4. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.82:] \MathJax\ notes, \pkg{xpinyin} improvements, various updates. % \begin{itemize} % \item Improved footnotes with \MathJax. % \margintag{\MathJax} % \item Added \MathJax\ emulation for \pkg{endnotes}, \pkg{marginnote}, % \pkg{nccfoots}, \pkg{pagenote}, \pkg{parnotes}, \pkg{sidenotes}. % \item \pkg{xpinyin}: Added pinyin with modern \HTML. % \margintag{packages} % \item \pkg{luatexko}: Added \cs{dotemph}, \cs{ruby}, \cs{uline}, etc. % \item \pkg{soul}: Fixed \cs{<}. % \item \pkg{chemfig}: Updated to v1.5. % \item \pkg{draftwatermark}: Updated to v2.0. % \item \pkg{ulem}: Fixed: \cs{dashuline}. % \item \pkg{amsmath}: Fixed: \cs{intertext} with \MathJax. % \item \pkg{endnotes}: Fixed: Marks in print mode. % \item \pkg{tocvsec2}, \pkg{tableof}: Verified to work as-is. % \item Added \pkg{etoc} (nullified). % \end{itemize} % \needspace{2\baselineskip} % \item[v0.81:] \MathJax\ speedup and additional emulations. % \begin{itemize} % \item Improved warning regarding \SVG\ math sizing \Slash baselines and % \margintag{core} % \pkg{graphics} \Slash \pkg{graphicx}. See \cref{sec:limitsmath}. % \item Improved \MathJax\ emulation processing speed. % \margintag{\MathJax} % \item Added \MathJax\ emulation for \pkg{accsupp}, \pkg{axessibiltiy}, % \pkg{colonequals}, % \pkg{decimal}, \pkg{dotlessi}, \pkg{econometrics}, \pkg{engtlc}, % \pkg{multiobjective}, \pkg{physunits}, \pkg{SIunits}, \pkg{stackrel}, % \pkg{statmath}. % \item \pkg{axessibility}: Updated to 2020/01/08 version. % \margintag{packages} % \item \pkg{gridset}: Updated to v0.3. % \item \pkg{SIunits}: Fixed for math mode. % \item Added \pkg{DotArrow}, \pkg{nolbreaks}, \pkg{luamplib}, \pkg{returntogrid}, % \pkg{statex2}, \pkg{tagpdf}. % \item Verified to work as-is with \pkg{icomma}, \pkg{mathpunctspace}, % \pkg{textualicomma}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.80:] \MathJax, \pkg{biblatex}. % \begin{itemize} % \item Added docs and warning/info messages % \margintag{\MathJax} % re: avoiding slow \MathJax\ compilation. % See \cref{sec:limitscustomizemathjax}, \nameref{sec:limitscustomizemathjax}. % \item Added \MathJax\ emulation for \pkg{accessibility}, \pkg{autobreak}, % \pkg{centernot}, \pkg{extarrows}, \pkg{fouridx}, \pkg{gensymb}, % \pkg{leftidx}, \pkg{mathcomp}, \pkg{mathdots}, \pkg{mathfixs}, \pkg{mismath}, % \pkg{nccmath}, \pkg{noitcrul}, % \pkg{pdfcomment}, \pkg{relsize}, \pkg{rmathbr}, % \pkg{subsupscripts}, \pkg{xfrac}. % \item Improved \MathJax\ emulation for \pkg{unicode-math}. % \item \pkg{biblatex}, \pkg{url}: Now create hyperlinks. % \margintag{packages} % \item \pkg{amsmath}: Fix to center starred environments. % \item \pkg{xcolor}, \pkg{graphics}: Made more macros robust. % \item \pkg{colortbl}: Fix: Rule color in a \env{lateximage}. % \item \pkg{chemmacros}: Updated to v5.10. % \item Added \pkg{fewerfloatpages}, \pkg{ghsystem}, \pkg{hhline}, % \pkg{mismath}, \pkg{nccmath}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.79:] \MathJax, nested \env{tabular}. % \begin{itemize} % \item Added or improved \MathJax\ emulation for % \margintag{\MathJax} % \pkg{amsmath}, \pkg{ar}, \pkg{arydshln}, \pkg{bm}, % \pkg{bigdelim}, \pkg{bigstrut}, \pkg{booktabs}, \pkg{braket}, % \pkg{mathtools}, \pkg{multirow}, \pkg{physics}, \pkg{siunitx}, \pkg{slashed}, % \pkg{unicode-math}, \pkg{xfakebold}. % \item Warn if using certain packages not supported by \MathJax. % \item \env{tabular}: Now may be nested. % \margintag{core} % \item \env{minipage}, \cs{parbox}, \env{fminipage}, % \cs{makebox}, \cs{framebox}: Fix: Adjust for virtual page size. % \item Uses new \pkg{iftex}. % \item \pkg{graphicx}: Fix: Negative angles. % \margintag{packages} % \item \pkg{caption}: Fix: \cs{captionlistentry} with \pkg{longtable}. % \item \pkg{multirow}: Fix: Centered vertical alignment. % \item \pkg{siunitx}: Fix: \cs{square}, \cs{cubed}. % \item \pkg{booktabs}: Fix: \pkg{memoir} with \env{lateximage}. % \item \pkg{babel} and \pkg{polyglossia}: Added troubleshooting warnings. % \item \pkg{fontawesome}, \pkg{fontawesome5}: Supports text color and size. % \item \pkg{transparent}: Fix: \env{lateximage}s. % \item \pkg{epigraph}: Updated to v1.5e. % \item \pkg{xurl}: Updated to v0.08. % \item \pkg{subcaption}: Fixed with \pkg{memoir}. % \item \pkg{floatrow}: Fix: \cs{linewidth}. No longer require \pkg{float}, \pkg{graphics}. % \item \pkg{floatflt}, \pkg{wrapfig}, \pkg{niceframe}: Fix: Adjust for virtual page size. % \item Added \pkg{widetable}, \pkg{witharrows}, \pkg{steinmetz}. % \item Added \pkg{awesomebox}, \pkg{catoptions}. % \item Added \pkg{svg}, supports \pkg{svg-extract}. % \item Added \pkg{parcolumns}, \pkg{pdfcolparcolumns}, % \item Added \pkg{parallel}, \pkg{pdfcolparallel}. % \item Added \pkg{pdfcol}, \pkg{pdfcolfoot}, \pkg{pdfcolmk}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.78:] Fixes for support files, \attribute{alt} tags, hyperlinks, and the 2019/10 \LaTeX\ release. % \begin{itemize} % \item Docs: Improved documentation regarding package options. % \margintag{docs} % See \cref{sec:thingstoavoid}. % \item Fix to overwrite existing support files % using new \env{filecontents} environment. % \item \pkg{breqn}: Previously broken by the 2019/10 \LaTeX\ update, but % \margintag{packages} % now working again. % \item \pkg{graphics}: Fix for \cs{includegraphics} \attribute{alt} tags. % \item \pkg{babel-french}: Fix for hyperlinks. % \item \pkg{media9}, \pkg{movie15}, \pkg{multimedia}: Fix for the 2019/10 \LaTeX\ update. % \item \pkg{accessibility}: Added. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.77:] Updates to fix recently-broken packages. % \begin{itemize} % \item \pkg{booktabs}: Updated to v1.6180339. % \item \pkg{chemformula}: Updated to v4.15. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.76:] \MathJax, updates for \LaTeX\ 2019/10 release. % \begin{itemize} % \item Docs: Expanded documentation regarding the use of multiple projects % \margintag{docs} % in the same directory. See \cref{sec:multipleprojects}. % \item \MathJax: Updated to v2.7.6. % \margintag{\MathJax} % \item \pkg{xr}: Updated to v5.05. % \margintag{packages} % \item \pkg{xr-hyper}: Updated to v6.1. % \item Verified works as-is with \pkg{xcite}. % \item \pkg{acro}: Updated to v2.10. % \item Currently broken in print mode by the 2019/10 \LaTeX\ update, % \watchout[broken] % and waiting for fixes: % \pkg{breqn}, \pkg{grffile}, \pkg{multimedia}, \pkg{movie15}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.75:] \pkg{keyfloat}, \pkg{wrapfig} % \begin{itemize} % \item \cs{minipage}: Fix for \cs{linewidth}. % \item \pkg{keyfloat}: Improved color control. % \margintag{packages} % \item \pkg{wrapfig}: Fix for \cs{linewidth}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.74:] Docs, \SVG\ math, \prog{lwarpmk}, \HTML\ \attribute{alt} and \attribute{title} text, \pkg{lyluatex} % \begin{itemize} % \item Added to the tutorial the section \nameref{sec:whatnext}. % \margintag{docs} % See \cref{sec:whatnext}. % \item Added documentation about localization options. % See \cref{sec:localization}. % \item Added documentation about accessibility options. % See \cref{sec:accessibility}. % \item Renamed and updated \HTML\ \attribute{alt} text macros: % \margintag{\HTML\ \attribute{alt} text} % \watchout[changed names] % \begin{center} % \begin{tabular}{cc} % Old & New \\ % \cmidrule(r){1-1}\cmidrule(l){2-2} % (hard coded as ``image'') & \cs{ImageAltText} \\ % \cs{mathimagename} & \cs{MathImageAltText} \\ % \cs{packagediagramname} & \cs{PackageDiagramAltText} \\ % \end{tabular} % \end{center} % \item Added \cs{ImageAltText} for the default \HTML\ \attribute{alt} text for % an image. See \cref{sec:ImageAltText}. % \item Added \cs{ThisAltText}, which may be used to assign a one-time % \HTML\ \attribute{alt} tag to the very next image generated by \pkg{lwarp}, % such as a \env{lateximage}, \env{picture}, \env{tikzpicture}, % an image generated by various chemistry or engineering packages, or % an \SVG\ math image. % This macro also adds a \attribute{title} tag to a reference or hyperlink. % See \cref{sec:ThisAltText}. % \item Adjusted \cs{LateximageFontScale} default from .75 to 1. % \margintag{\SVG\ math} % \item Fix: Font control for \SVG\ math. % \item Fix: Ignores negative \cs{hspace}. % \margintag{misc} % \item Warning if \ctr{SideTOCDepth} < \ctr{FileDepth}. % \item \prog{lwarpmk}: \cmds{lwarpmk clean} removes additional files. % \margintag{\prog{lwarpmk}} % \item \prog{lwarpmk}: \cmds{lwarpmk epstopdf} and \cmds{lwarpmk pdftosvg} % now honor directories. % \item \pkg{lyluatex}: Split images by \optn{system} or per \optn{fullpage}, % \margintag{packages} % improved margins and scaling. % \item Tested to work as-is with \pkg{mathspec}, \pkg{unicode-math}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.73:] \cs{include}, \pkg{memoir}, \pkg{koma-script}, \pkg{caption}, % \pkg{xy}, \pkg{datatool}, music scores. % \begin{itemize} % \item Fix for \cs{include}. % \item Warning for a \env{tabular} inside a \element{span}. % \item \cs{color}: Added \HTML\ support for rules and frames, % but not inline text. Use \cs{textcolor} if possible. % \item Improved many \HTML\ tags, reducing \prog{tidy} warnings. See Change History. % \item \pkg{memoir}: Fixes for \cs{frontmatter*} and \cs{mainmatter*}. % Added \cs{book}. % \margintag{packages} % \item \pkg{koma-script}: Fix for starred captions in the \TOC. % \item \pkg{caption}: Fix for starred captions. % \item \pkg{datatool}: Added pie, bar, and plot charts. % \item \pkg{threeparttable}: Added \env{measuredfigure}. % \item \pkg{intopdf}: Updated to v0.2.1. % \item \pkg{tocdata}: Updated to v2.03. % \item \pkg{quotchap}: Updated to v1.2. % \item \pkg{versonotes}: Updated to v0.4. % \item \pkg{backnaur}: Now uses \SVG\ images. Updated to v3.1. % \item \pkg{xy}: Fix for \cs{xybox}, improved \env{xy}, also now compatible with \pkg{qcircuit}. % \item \pkg{fancyvrb}: Fix for label \HTML\ tags. % \item Added \pkg{stackengine}. % \item Added \pkg{lyluatex}. (Music scores.) % \margintag{music} % \item \pkg{musicography}: Updated to 2019/05/28. % Added support for \env{lateximage}s. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.72:] Font control, \cs{multicolumn}, \pkg{xr} and \pkg{xr-hyper}. % \begin{itemize} % \item Due to internal changes, images for inline \SVG\ math and \env{lateximage}s % \watchout[images] % will have new hash values, and will have to be regenerated using % \userentry{lwarpmk cleanlimages} and % \userentry{lwarpmk limages} % \item Docs: Color-codes package names in the table of supported packages % and features, \cref{tab:supported}, according to each package's level % of support by \pkg{lwarp}. % \item \cs{multicolumn}: Fix for paragraph columns. % \item \pkg{xr}, \pkg{xr-hyper}: Fixes for references, \cs{externaldocument}. % \margintag{packages} % \item \pkg{soulutf8}: Fix: Loads \pkg{soul} for emulation. % \item \pkg{boxedminipage2e}: Added support for \env{lateximage}s. % \item \pkg{zhlineskip}: Updated to v1.0e. % \item Added \pkg{fontaxes}, \pkg{slantsc}, \pkg{tabfigures}. % \item Added \pkg{nfssext-cfr}, thus supporting \pkg{cfr-lm} and % several other font packages. % \item Added \pkg{backnaur}, \pkg{hypbmsec}, \pkg{minibox}, \pkg{pdfcrypt}, % \pkg{shapepar}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.71:] Error handling, multimedia, \env{tabular}. % \begin{itemize} % \item \env{tabular}: Added support for `\texttt{*}' columns. % Fix for paragraph tags. % \item \env{quotation}: Fix for \HTML\ tag. % \item Docs: Added a section about error conditions tested by \pkg{lwarp}. % See \cref{sec:errortestingmessages}. % \item \prog{lwarpmk}: If file \filenm{lwarpmk.conf} is an older version, % or the incorrect operating system, % displays the print command to use to recompile. % \item \pkg{chemfig}: Updated for v1.4. % \margintag{packages} % \item \pkg{endfloat}: Updated for v2.7. % \item \pkg{textpos}: Updated for v1.9.1. % \item Added \pkg{media9}, \pkg{movie15}, \pkg{multimedia}. % \margintag{multimedia} % \end{itemize} % \needspace{2\baselineskip} % \item[v0.70:] Error handling, \MathJax, \pkg{mathtools}. % \begin{itemize} % \item Error handling for ``Label(s) changed.'' % Refuses to \cmds{lwarpmk limages} until recompile first. % \item Fix: If Computer Modern font is used, ensures \pkg{cm-super} or \pkg{lmodern} % is used. % \item Fixes for \cs{makebox}. % \item Fixes for \cs{parbox} inside a \element{span}. % \item \MathJax: Updated to v2.7.5. % Loads the \filenm{autoload-all.js} extension. % Added \cs{MathJaxFilename} to select custom scripts. % \item \pkg{textcomp}, \pkg{xunicode}: Fix for \cs{textinterrobang}. % \margintag{packages} % \item \pkg{mhchem}: Works with \MathJax. See \cref{sec:mhchem}. % \item \pkg{changes}: Updated to v3.1.2. % \item Added \pkg{autonum}, \pkg{changelayout}, \pkg{inputtrc}, \pkg{mathtools}, \pkg{metalogox}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.69:] Error handling, many fixes, improved \pkg{keyfloat} \Slash \pkg{tocdata}. % \begin{itemize} % \item Fix for \HTML\ corruption of \env{lateximage} displays. % \item \cs{makebox}, \cs{framebox}: Fix for \parg{width,height} arguments. % \item \env{fminipage}: Honors \cs{minipagefullwidth}. % \item \pkg{array}, \pkg{longtable}: Fix for \cs{tabularnewline}. % \margintag{packages} % \item \pkg{tabularx}, \pkg{tabulary}: Fix to require the \pkg{array} package. % \item \pkg{supertabular}, \pkg{xtab}: Fix to clear caption after use. % \item \pkg{graphics}: Added a warning if used the \cs{includegraphics} % \optn{scale} option. % \item \pkg{multirow}: Added an error if didn't use % \cs{mrowcell} or \cs{mcolrowcell} when using \cs{multirow} or % \cs{multicolumnrow}. % \item \pkg{keyfloat}: Updated for v2.00, additional improvements. % \item Added \pkg{ctable}, \pkg{eqlist}, \pkg{eqparbox}, \pkg{ftcap}, % \pkg{listliketab}, \pkg{minitoc}, \pkg{tocdata}, \pkg{topcapt}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.68:] Error handling, tabulars, footnotes. % \begin{itemize} % \item \prog{lwarpmk}: Improved error handling for image generation if % \margintag{\prog{lwarpmk}} % compile was incomplete. % \item \env{tabular}: Fix for \cs{warpprintonly}. % \item \pkg{longtable}: Improved flexibility for \cs{endhead}, etc. % \margintag{packages} % Improved error reporting if \cs{endhead}, etc. incorrect for \pkg{lwarp}. % \item \pkg{threeparttable}: Fix for caption type. % \item \pkg{hyperref}: Fix for options with braces. % \item \pkg{morefloats}: Fix to be loaded early for print output. % \item \pkg{listings}: Updated for v1.7. % \item Added \pkg{bigfoot}, \pkg{fnpara}, \pkg{footnotebackref}, \pkg{manyfoot}, % \pkg{tablefootnote}, \pkg{threeparttablex}. % \item Added \pkg{layouts}, \pkg{niceframe}, % \pkg{perpage}, \pkg{showtags}. % \item Prevented \pkg{alg}, \pkg{algorithmic}, \pkg{pdfcprot}, \pkg{fncylab}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.67:] Filename generation, symbol fonts. % \begin{itemize} % \item Documentation fix for \filenm{-images}, \filenm{-images.txt}. % \margintag{docs} % \item Added discussion regarding section names. See \cref{sec:limitssectionnames}. % \item Added \cs{FilenameNullify} and \cs{FilenameSimplify} for filename % \margintag{filenames} % generation. See \cref{sec:limitssectionnames}. % \item Core, \pkg{textcomp}, \pkg{xunicode}: Nullified additional % symbols during filename generation. % \item \pkg{color}: Fix for version number warnings. % \margintag{packages} % \item Added \pkg{academicons}, \pkg{bbding}, \pkg{dingbat}, \pkg{eurosym}, % \pkg{fontawesome}, \pkg{fontawesome5}, \pkg{marvosym}, \pkg{pifont}, % \pkg{typicons}. % \item Added \pkg{changes}, % \pkg{easyReview}, \pkg{fitbox}, \pkg{foreign}, \pkg{gloss}, % \pkg{karnaugh-map}, \pkg{multicap}, \pkg{nomencl}, \pkg{notes}, % \pkg{struktex}, \pkg{umoline}, \pkg{xfakebold}. % \item Tested to work as-is with \pkg{askmaps}, \pkg{curves}, \pkg{euro}, % \pkg{karnaughmap}, \pkg{tikz-karnaugh}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.66:] \pkg{xr}, multiple projects, image names/directory, \HTML\ formatting % \begin{itemize} % \item \newlwarpmkconf % \item Adds options \optn{ImagesDirectory} and \optn{ImagesName} % \margintag{\env{lateximage}} % to assign directory and name prefixes for \env{lateximage} images. % The new defaults include the jobname, allowing the image directories for % multiple projects to coexist. % \item To reuse existing \filenm{lateximage} directories, add \pkg{lwarp} options % \watchout[existing projects] % \begin{sourceverb} % \usepackage[ % ImagesDirectory={lateximages}, % ImagesName={lateximage-} % ]{lwarp} % \end{sourceverb} % If not reused, the existing \filenm{lateximages} directory and % \filenm{lateximages.txt} file may be removed. % \item Added \cs{FilenameLimit} to control the maximum length of the % \margintag{filenames} % filenames generated by \pkg{lwarp}. % \item Improved filename generation % \watchout[Possible filename changes] % when special characters or macros are used in section names. % \item Fix for \cmds{lwarpmk cleanlimages} with \brand{Windows}. % \margintag{\brand{Windows}} % \item Fixes for floats in the home page. % \margintag{floats} % \item Improved \CSS\ for definition lists, table notes. % \margintag{lists, table notes} % \item \env{tabular}: Fixes for \cs{par} in column specifier, % minipage inside \env{tabular}. % \margintag{\env{tabular}} % \item Indexing: Fix for a long line of multiple entries. % \margintag{indexing} % \item \cs{minipagefullwidth}: Fix for global changes. % \margintag{\env{minipage}} % \item Added \cs{UseMinipageWidths} and \cs{IgnoreMinipageWidths}. % See \cref{sec:minipages}. % \item Improved \cs{fbox}, \cs{fboxBlock}, \cs{fminipage} to use current text color. % \margintag{colors} % \item Improved \HTML\ output formatting. % \margintag{\HTML} % \item Added discussion regarding invalid \HTML. See \cref{sec:invalidhtml}. % \margintag{docs} % \item Added discussion regarding math in section names, % \cs{imagegraphics} \optn{scale} option. See \cref{sec:convertexisting}. % \item Added discussion regarding international languages in section names. % See \cref{sec:international}. % \item \pkg{caption}: Fix for options clash. % \margintag{packages} % \item \pkg{xr}, \pkg{xr-hyper}: Now compatible. % \item \pkg{subcaption}: Improved horizontal spacing. % \item \pkg{multicol}: Fix for minipage inside \env{multicols}. % \item \pkg{multicolrule}: Updated for v1.2. % \item \pkg{tocbasic}: Minor update. % \item \pkg{acronym}: Fix for acronym in float caption. % \item \pkg{kotexutf}: Patch with \prog{pdflatex} and new % \pkg{lwarp} labels. % \item \pkg{extramarks}, \pkg{fancyhdr}: Updated for v3.10. % \item \pkg{memoir}: Added docs regarding version numbers. See \cref{sec:limitsmemoir}. % \item \pkg{zref}: No longer required. % \item Added \pkg{ar}, \pkg{ed}, \pkg{indentfirst}, \pkg{nameauth}, \pkg{truncate}. % \item Verified to work as-is with \pkg{changelog}. % \item Prevented \pkg{colortab}, \pkg{epsf}, \pkg{hyper}, % \pkg{picinpar}, \pkg{picins}, % \pkg{sistyle}, \pkg{ucs}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.65:] \CSS\ layout, \attribute{alt} tags, Japanese. % \begin{itemize} % \item Moved the side\TOC\ to the left side, % \margintag{page layout} % allowing improved \CSS\ for margin notes. % \item Improved page layout \CSS. % \item \pkg{graphicx} \cs{includegraphics}: Added the \optn{alt} key % \margintag{image \attribute{alt} tags} % to assign an \attribute{alt} tag to an image. Default is ``\optn{image}'', % assigned to pass validation. % \item Detects and causes an error % \margintag{duplicate \HTML\ files} % if duplicate \HTML\ file names are generated, % caused by identical or similar sectioning names. % \item Fix for \env{tabular*}. % \margintag{fixes} % \item Fix for tabular border colors. % \item Fixes \cs{quad}, \cs{enskip}, and figure captions to pass validation. % \item Added \pkg{ltj*} classes, % \margintag{Japanese} % \pkg{bounddvi}, \pkg{gentombow}, \pkg{lltjext}, \pkg{plarydshln}, % \pkg{plext}, \pkg{plextarydshln}, % \pkg{plextcolortbl}, \pkg{pxatbegshi}, % \pkg{pxeveryshi}, \pkg{pxftnright}, \pkg{pxjahyper}, \pkg{tascmac}. % \item Verified to work with \pkg{plarray}, \pkg{plautopatch}, % \pkg{plextarray}, \pkg{plextdelarray}, \pkg{pxgentombow}, % \pkg{plsiunitx}, \pkg{pxpdfpages}, \pkg{pxpgfrcs}, \pkg{pxpgfmark}. % \item Added support for \pkg{fontspec} \cs{textsi} and \cs{sishape}. % \margintag{packages} % \item Added \pkg{multicol}'s \cs{docolaction}. % \item Added \pkg{embrac}, \pkg{footnoterange}, \pkg{multicolrule}, \pkg{versonotes}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.64:] Koma-Script, Japanese, Chinese. % \begin{itemize} % \item Added \pkg{utarticle} and related classes. % \margintag{Japanese} % \item Improved \pkg{ujarticle} and related classes. % \item Fix for \pkg{biblatex} with C\TeX\ and other classes. % \margintag{Chinese} % \item Fixes for \pkg{scrlayer}, \pkg{scrlayer-scrpage}. % \margintag{Koma-Script} % \item \pkg{addlines}: Updated to v0.3. % \margintag{packages} % \item Added \pkg{bsheaders}, % \pkg{gmeometric}, \pkg{marginal}, % \pkg{rmpage}, \pkg{scrpage2}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.63:] \pkg{mdframed}, Chinese, Japanese, Korean % \begin{itemize} % \item Added \cs{linkhomename}: A user-definable name for the \UI{Home} link. % \margintag{localization} % \item Documented \cs{sidetocname}: A user-definable name for the side\TOC. % \item Fix: \cs{LinkHome} for print output. % \margintag{fixes} % \item Moved package load checks to the \pkg{lwarp} core % \margintag{optimizations} % to reduce the number of \filenm{lwarp-*} files. % \item \pkg{mdframed}: Fix with \pkg{amsthm}, improved titles and font control. % \margintag{packages} % Improved rule widths. % \item Fixes for \pkg{xeCJK}. % \margintag{Chinese} % \item Added \pkg{xpinyin}, \pkg{zhlineskip}. % \item Verified to work with \pkg{cjkpunct}, \pkg{upzhkinsoku}, \pkg{zhspacing}. % \item Verified to work with \pkg{zxjatype}, \pkg{luatexja}, \pkg{luatexja-fontspec}. % \margintag{Japanese} % \item Added \pkg{bxjsarticle} and related classes. % \item Added \pkg{ltjsarticle} and related classes. % \item Added p\LaTeX, up\LaTeX, \pkg{ujarticle} and related classes. % \item Prevented \pkg{utarticle} and related classes. % \item Prevented \pkg{bxcjkatype}. % \item Verified to work with \pkg{kotex}, \pkg{xetexko}, \pkg{luatexko}. % \margintag{Korean} % \end{itemize} % % \needspace{2\baselineskip} % \item[v0.62:] MiK\TeX\ docs, \HTML\ title, C\TeX, \pkg{xeCJK}, \pkg{bitpattern}. % \begin{itemize} % \item Docs: Setting a \UTF-8 locale. See \cref{sec:utf8locale}. % \margintag{docs} % \item MiK\TeX: Docs for \prog{MiKTeX Console} and \pkg{miktex-poppler-bin}. % \margintag{MiK\TeX} % \item \HTML\ subpage titles: Added \cs{HTMLTitleBeforeSection} and % \margintag{\HTML\ \element{title}} % \cs{HTMLTitleAfterSection} to select whether % the \HTML\ \element{title} displays the website name before or % after the section name. % See \cref{sec:htmlsettings}. % \item Fix for package options handling. % \margintag{fixes} % \item Fixes for horizontal white space between \env{fminipage}, \env{fcolorminipage}, % \env{colorboxBlock}, \env{fcolorboxBlock}. % \item Logos: Fix for \XeTeX\ logo, improved \CSS, made robust, % improved search-engine optimization. % \item |\\[$1]|: Additional \HTML\ \element{br} if $\$1 > 0\,\textrm{pt}$. % \item Fixes for \cs{includgraphics} filename, and with \bool{FormatWP}. % \item Fix: \CSS\ for \cs{textup}. % \item Fix: Added \cs{slshape}. % \item Added \pkg{ctex} package and related classes, \pkg{xeCJK}. % \margintag{Chinese} % \item Prevented \pkg{CJK}, \pkg{CJKutf8} unless \pkg{xeCJK}, \pkg{ctex} are used. % \item \pkg{chemfig}: Docs for new macro \cs{polymerdelim}. % \margintag{packages} % \item \pkg{asymptote}: Docs for compilation. % \item \pkg{chngpage}: Fix to load \pkg{lwarp-changepage}. % \item \pkg{algorithm2e}: Fix with non-\pkg{book} classes. % \item \pkg{register}: Updated to v1.8. % \item \pkg{nicefrac}: Improved font control and \CSS, honors \optn{nice} and \optn{ugly}. % \item \pkg{units}: Improved font control and \CSS, honors \optn{tight} and \optn{loose}. % \item \pkg{xfrac}: Improved \CSS. % \item \pkg{textcomp} and \pkg{xunicode}: Fix conflicts with \cs{textcircled}. % \item \pkg{ulem}: Improved compatibility with \pkg{CJKulem}, \env{lateximage}. % \item \MathJax\ and \pkg{siunitx}: Removed inoperable extension. % \item Added \pkg{bitpattern}, \pkg{pdfcomment}, % \pkg{pdfmarginpar}, \pkg{tram}, \pkg{unitsdef}, \pkg{xechangebar}. % \item Added \pkg{musicography}, \pkg{octave}, \pkg{semantic-markup}. % \item Added \pkg{2in1}, \pkg{flippdf}, \pkg{notespages}, \pkg{rviewport}, \pkg{twoup}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.61:] Custom compilation, \EPS-related packages, documentation, indexes. % \begin{itemize} % \item Split index into multiple indexes. % \margintag{docs} % \item Improved documentation regarding font selection. See \cref{sec:fonts}. % \item Added documentation regarding debugging options. % See \cref{sec:debuggingmessages}. % \item Added documentation regarding \HTML\ entities inside program listings. % See \cref{sec:avoidtextformatting}. % \item Added options to specify the shell commands to execute for % \margintag{custom compiling} % \cmds{lwarpmk print} and \cmds{lwarpmk html}, allowing % the use of \pkg{lwarp} with \pkg{perltex}, \pkg{pythontex}, etc. % If not specified, these are set automatically depending on the \LaTeX\ engine, % \optn{-\/-shell-escape}, and \pkg{lwarp} options. % See \cref{sec:customcompiling}. % \item Changed macro names to match % \watchout[changed names] % \cs{displaymathother}, \cs{displaymathnormal}: \\ % \begin{tabular}{cc} % \toprule % Old & New \\ % \midrule % \cs{StartDynamicMath} & \cs{inlinemathother} \\ % \cs{StopDynamicMath} & \cs{inlinemathnormal} \\ % \bottomrule % \end{tabular} % \item Fix: Paragraph tags in a \env{tabular}. % \margintag{fixes} % \item Fix: \pkg{supertabular} and \pkg{xtab} captions. % \item Fix: \DVI\ \LaTeX\ \cs{includegraphics} \EPS\ images. % \item Fix: \pkg{newfloat} lists. % \item Fix: \CSS\ footnotes text align, minipage tabular and footnote margins. % \item Added \pkg{epsfig}, \pkg{psfrag}, \pkg{psfragx}, \pkg{pstool}. % \margintag{packages} % \item Added \pkg{copyrightbox}, \pkg{pdfprivacy}, \pkg{thinsp}, % \pkg{threadcol}, \pkg{uspace}. % \item Added \pkg{chkfloat}, \pkg{cmdtrack}, \pkg{dprogress}, % \pkg{lua-visual-debug}, \pkg{refcheck}, % \pkg{srcltx}, \pkg{srctex}, \pkg{vpe}, \pkg{xbmks}. % \end{itemize} % \item[v0.60:] Fixes for \pkg{longtable}, \pkg{listings}. % \begin{itemize} % \item \pkg{longtable}, etc.: Fixes for slowdown and memory management for very long tables. % \margintag{fixes} % \item \pkg{listings}: Fix for \HTML\ entities, and also when used inside a list. % \item \pkg{diagbox}: Fix for incorrect \HTML\ par tags. % \item Added \pkg{2up}, \pkg{booklet}. % \margintag{packages} % \item Added \pkg{bophook}, \pkg{draftfigure}, \pkg{fullminipage}, % \pkg{grid-system}, \pkg{layaureo}. % \item Added \pkg{leading}, \pkg{widows-and-orphans}. % \item Added \pkg{fancytabs}, \pkg{thumb}, \pkg{thumbs}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.59:] \DVI\ \prog{latex}, \MathJax, \pkg{asymptote}, % \pkg{pdftricks} and \pkg{pstricks}, \pkg{epstopdf}, \pkg{brqen}. % \begin{itemize} % \item \newlwarpmkconf % \item Added an error if \filenm{lwarpmk.conf}'s format has changed and % \margintag{\prog{lwarpmk}} % the document must be recompiled. % \item Added a warning if the \filenm{lwarpmk.conf} configuration file appears % to be for the wrong operating system, in case files are transferred between % systems. % \item Added % \begin{sourcedisplay} % lwarpmk epstopdf % \end{sourcedisplay} % to quickly convert a document's \EPS\ images to \PDF\ or \SVG. % See \cref{sec:limitsgraphics}. % \item Added support for \DVI\ \prog{latex}. See \cref{sec:loading}. % \margintag{\DVI\ \prog{latex}} % \item Fix for \optn{-\/-shell-escape} with \prog{latexmk}. % \margintag{\prog{latexmk}} % \item Updated \MathJax\ script to v2.7.4. % \margintag{math} % \item Fix: \brand{Mathjax} chapter number removed from non-numeric tagged equations. % \item Added \MathJax\ support for \pkg{nicefrac}, \pkg{units}. % \item Fix for \cs{[} and \cs{]} with \cs{displaymathnormal}. % \item Fix for \cs{includegraphics} filename expansion. % \margintag{images} % \item \cs{includegraphics} now works with % \filenm{.pdf} and \filenm{.eps} filename extensions. % \item Moved \pkg{amsmath} out of the \pkg{lwarp} core. % \margintag{packages} % \item Fix for \pkg{chemformula} \cs{NMR}. % \item Added \pkg{asymptote}, \pkg{pdftricks}, \pkg{pstricks}, \pkg{pst-eps}. % \item Added \pkg{breqn}, \pkg{SIunits}. % \item Added \pkg{bxpapersize}, \pkg{canoniclayout}, \pkg{draftcopy}, % \pkg{fnbreak}, \pkg{nccfancyhdr}. % \item Added \pkg{accsupp}, \pkg{axessibility}. % \item Added \pkg{xunicode}. % \item Improved and now supports \pkg{epstopdf}. % \item Tested to work as-is: \pkg{eepic}, \pkg{sepfootnotes}. % \item Added information about setting up a development version of \pkg{lwarp}. % \margintag{docs} % \end{itemize} % \needspace{2\baselineskip} % \item[v0.58:] Extensive improvements in indexing, glossaries. % Adds \PDF-inclusion packages. % \begin{itemize} % \item \newlwarpmkconf % \item \prog{lwarpmk}: Added the |-p| option to specify the project name. % \margintag{\prog{lwarpmk}} % \item \prog{lwarpmk}: Now uses \prog{makeglossaries} for glossary generation, % \margintag{\pkg{glossaries}} % allowing the processing of multiple glossaries at once. % \item Added \pkg{lwarp} option \optn{GlossaryCmd} % to specify the shell command used by \cmds{lwarpmk printglossary} and % \cmds{lwarpmk htmlglossary}. Defaults to \cmds{makeglossaries}. % \item Docs: Extra indexing options. See \cref{sec:indexingoverview}. % \margintag{index and glossary} % \item Added support for \prog{makeindex}. (Previously supported only \prog{xindy}.) % Also added indexing packages listed below. % \item Added \pkg{lwarp} options \optn{PrintIndexCmd}, \optn{HTMLIndexCmd}, % and \optn{LatexmkIndexCmd} % to specify shell commands used by \cmds{lwarpmk printindex}, % \cmds{lwarpmk htmlindex}, and \prog{latexmk}. May be preset with the % \optn{makeindex} or \optn{xindy} \pkg{lwarp} options. See \cref{sec:loading}. % \item Added \pkg{lwarp} options \optn{makeindex} and \optn{xindy} to % set \optn{PrintIndexCmd}, \optn{HTMLIndexCmd}, and \optn{LatexmkIndexCmd} % to sensible values for a typical single index. See \cref{sec:loading}. % \item Added \pkg{lwarp} option \optn{makeindexStyle} to tell \prog{lwarpmk} to % use a custom style instead of \filenm{lwarp.ist}. % See \cref{sec:modifymakeindex}. % \item Fix for index entries with \cs{see}, \cs{seealso}, \cs{emph}, \cs{textbf}, etc. % \item Replaced each \cs{csuse} with \cs{@nameuse} for improved error detection. % \margintag{misc. fixes} % \item Additional internal print/\HTML\ macro selection improvements. % \item Fix: \cs{printindex} finishes pending \cs{index} writes first. % \item Fixes for \pkg{memoir}: \pkg{makeidx}, \pkg{ccaption}, multiple indexes, \cs{specialindex}. % \margintag{packages} % \item Fixes for \pkg{komascript}: Indexing improvements. % \item Added \pkg{imakeidx}, \pkg{index}, \pkg{repeatindex}, \pkg{splitidx}. % \item Added \pkg{attachfile}, \pkg{attachfile2}, \pkg{intopdf}, % \pkg{pdfpages}, \pkg{pdfx}. % \item Added \pkg{cases}. % \item Tested to work as-is: \pkg{notes2bib}, \pkg{hvindex}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.57:] \pkg{algorithm2e}, \pkg{float} styles, tabular packages, internal improvements. % \begin{itemize} % \item Added support for \MathJax\ equations with \cs{footnote}, \cs{footnotemark}. % \margintag{MathJax} % \item Added \cs{StartDefiningMath} and \cs{StopDefiningMath} for % \margintag{math macros} % use when defining macros in the preamble which contain \$. % See \cref{sec:mathcatcode}. % \item Added \cs{inlinemathother} and \cs{inlinemathnormal} to % \margintag{dynamic math} % delimit math expressions which depend on a variable condition % such as a counter. Such expressions will not be hashed for reuse, % and will be converted to \SVG\ math images even when \MathJax\ is enabled. % See \cref{sec:mathdynamic}. % \item Renamed \cs{EndDefiningTabulars} to \cs{StopDefiningTabulars}. % \watchout[new name] % \item Improved localization for \env{lateximage} \HTML\ \attribute{alt} tags. % \margintag{\env{lateximage} \attribute{alt} tags} % For \SVG\ math images, the \attribute{alt} tag under some conditions % will be set to \cs{MathImageAltText}, which defaults to \optn{math image}. % For packages, the \attribute{alt} tag is set using the package name followed by % \cs{PackageDiagramAltText}, which defaults to \optn{diagram}. Ex: % \begin{sourcedisplay} % (-xy- diagram) % \end{sourcedisplay} % See \cref{sec:PackageDiagramAltText}. % \item Fix: Improved print/\HTML\ macro selection. % \item Fix: \cs{href} text catcodes. % \margintag{misc. fixes} % \item Fix: \cs{subref} text. % \item Fixes: Colored \cs{rule} and \cs{boxframe}. % \item \pkg{float}, \pkg{rotfloat}: Adds support for float styles |ruled| and |boxed|. % \margintag{packages} % \item \pkg{float}: Fix: Do not create \cs{l@} until \cs{listof} is used. % \item \pkg{marginnote}: Fix: Long optional argument. % \item \pkg{ellipsis}: Adds \cs{midwordellipsis}. % \item \pkg{breakurl}: Fix for text catcodes. % \item Added \pkg{algorithm2e}, \pkg{register}, \pkg{ltablex}, \pkg{xltabular}, % \pkg{xellipsis}, \pkg{trimclip}, \pkg{errata}, \pkg{vowel}, \pkg{xpiano}. % \item Prevents \pkg{glossary}. % \item Tested to work as-is with \pkg{gauss}, \pkg{phonrule}, \pkg{piano}, % \pkg{SIunits}, \pkg{tikzcodeblocks}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.56:] Shell escape, tabular packages. % \begin{itemize} % \item Added % \margintag{\prog{lwarpmk}} % \begin{sourcedisplay} % lwarpmk pdftosvg % \end{sourcedisplay} % to quickly convert a document's \PDF\ images to \SVG, for use with \HTML. % See \cref{sec:limitsgraphics}. % \item Added support for \optn{-\/-shell-escape}. See \cref{sec:shellescape}. % \item Added support for \pkg{array} |w| and |W| columns. % \margintag{\env{tabular}} % \item Fix: \cs{multicolumn} parameter handling. % \item Added support for double \cs{hline}s, \cs{midrule}s, and vertical rules. % \item Added support for \pkg{arydshln} dashed lines % with \HTML\ \env{tabular}, but % reverts to plain rules for \env{lateximage} % and \SVG\ math \env{array}. % \item Fix: \cs{thinspace}. % \margintag{misc. fixes} % \item Fix: \pkg{paralist} compact environments. % \item Added \pkg{parnotes}, \pkg{quoting}, \pkg{lua-check-hyphen}, % \pkg{tocenter}, \pkg{underscore}. % \margintag{packages} % \item Added \pkg{bibunits}. % \item Tested to work as-is with \pkg{babelbib}, \pkg{bodegraph}, % \pkg{fast-diagram}, \pkg{nicematrix}, \pkg{structmech}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.55:] Various fixes. % \begin{itemize} % \item Fix: Extraneous space in file links, which also % \margintag{misc fixes} % prevented \prog{Calibre} \EPUB\ conversions. % \item Fix: Float optional argument regression. % \item Fix: \cs{ForceHTMLTOC} with \cs{phantomsection}. % \item Fix: Overfull boxes in \env{lateximage}s. % \item Fix: QED symbols in \env{lateximage}. % \item \pkg{koma-script}: Fix: Figure with \cs{centering}, etc. % \margintag{packages} % \item Added \pkg{clrdblpg}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.54:] Float \cs{centering}, improved image checks. % \begin{itemize} % \item \newlwarpmkconf % \item \progcode{lwarpmk limages} checks for the presence of the \HTML\ version % \margintag{\prog{lwarpmk}} % of the document and valid image references before attempting % to create the \env{lateximage}s. % \item \prog{lwarpmk}: Improved error message if configuration file % does not exist. % \item Added documentation for avoiding error with BibTeX and \cs{etalchar}. % \margintag{\BibTeX} % See \cref{sec:limitsbibtex}. % \item Added documentation regarding \pkg{polyglossia}. % \margintag{\pkg{polyglossia}} % See \cref{sec:limitspolyglossia}. % \item Added documentation regarding the use of macros in section names. % \margintag{macros in section names} % See \cref{sec:thingstoavoid}. % \item Renamed and added package options: % \margintag{document encoding} % \watchout[New and revised encoding options] % \begin{center} % \begin{tabular}{>{\ttfamily}c>{\ttfamily}c} % \toprule % \textrm{Old Package Option} & \textrm{New Package Option} \\ % \midrule % xdyFilename & xindyStyle \\ % IndexLanguage & xindyLanguage \\ % \midrule % --- & xindyCodepage \\ % --- & pdftotextEnc \\ % \bottomrule % \end{tabular} % \end{center} % Use these options along with \pkg{inputenc} or \pkg{inputenx} % to process documents in an encoding other than UTF-8. % See \cref{sec:fonts}. % % \item Floats now honor \cs{centering}, \cs{raggedright}, \cs{raggedleft}, % \margintag{floats with \cs{centering}, etc.} % and their \pkg{ragged2e} equivalents, % when placed directly after: % \begin{sourceverb} % \begin{floattype} % \centering % \end{sourceverb} % \item \pkg{tikz}: \cs{pgfpicture}, fit, align, font. % \margintag{misc. fixes} % \item \pkg{ragged2e}: \cs{centering} etc. % \item \pkg{hyperref}: \cs{hypertarget} was creating duplicate of \cs{label}. % \item \pkg{hyperref}: Active chars inside \cs{hyperref}, \cs{hyperlink}. % \item \pkg{hyperref}: \cs{ref} inside \cs{hyperlink} caused a nested \HTML\ link. % \item \pkg{glossaries}: Fix when not using \pkg{babel} or \pkg{polyglossia}. % \item \pkg{textcomp}: \cs{textperthousand}. % \item \LaTeX\ core \env{verse} environment: line spacing. % \item Removed \cs{citetitle}, adjusted \cs{attribution}. \watchout % \item \pkg{memoir}: Minor update for v3.7g. % \margintag{packages} % \item Added \pkg{inputenx}, \pkg{bibunits}, \pkg{chngpage}, % \pkg{forest}, \pkg{magaz}, \pkg{gridset}. % \item Prevents loading \pkg{ae}, \pkg{aecc}, \pkg{t1enc}, and \pkg{wasysym}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.53:] Improved image checks. % \begin{itemize} % \item \prog{lwarpmk}: Added a warning about corrupted images due to the % \margintag{\prog{lwarpmk}} % need to recompile the document one more time. % \item \prog{lwarpmk}: Added the \cmds{lwarpmk cleanlimages} command. % \item Added documentation for \cmds{lwarpmk cleanlimages} and % \cmds{lwarpmk pdftohtml}. % \end{itemize} % \needspace{2\baselineskip} % \item[v0.52:] Improved footnotes, \SVG\ math. % \begin{itemize} % \item Improved install instructions regarding \filenm{lwarp_baseline_marker.png}. % \margintag{documentation} % \item Added documentation regarding footnotes in section headings, % and footnotes with \cs{VerbatimFootnotes} % from \pkg{fancybox}, \pkg{fancyvrb}. See \cref{sec:limitsfootnotes}. % \item Added documentation regarding font selection when using % \XeLaTeX\ or \LuaLaTeX\ with \pkg{fontspec} and traditional font packages. % See \cref{sec:fonts}. % \item Fix: Limit the number of background tasks % \margintag{SVG math} % when generating \env{lateximage}s. % \item Added user-adjustable \SVG\ math font scaling. See \cref{sec:mathfontscale}. % \item Added warnings if \filenm{lwarp_baseline_marker.png} is not present, or % if \pkg{graphicx} or \pkg{graphics} is not loaded. % \item Improved \cs{ensuremath} hashing expansion. % \item Fix: \env{equation*} with \env{split}. % \item \env{tabbing} now works inside a \env{lateximage}. Use for math in \env{tabbing}. % \item Fix: \MathJax\ script was not executing in some conditions. % \margintag{MathJax} % \item Added \cs{CustomizeMathJax} to add custom functions. % See \cref{sec:limitsmath}. % \item Fix: Footnote numbering when using \progcode{HTMLDebugComments}. % \margintag{footnotes} % \item Fix: Footnote paragraph tags. % \item Fix: \progcode{FootnoteDepth} defaults to \cs{subsubsection}. % \item Fix: \cs{kill} in a \env{lateximage}. \margintag{misc. fixes} % \item Fix: \cs{FileDepth}, misc. others, when input encoding is not \optn{utf8}. % \item Fix: \cs{texorpdfstring} in a section name. % \item \pkg{hyperref} emulation: Fix for \progcode{\#}, \progcode{\%}, \margintag{packages} % \progcode{\&}, \progcode{\~}, \progcode{\_} characters in \URL{}s. % \item \pkg{fancybox}, \pkg{fancyvrb}: Initial support for \cs{VerbatimFootnotes}. % \item \pkg{nicefrac}: Added with fix for \cs{ensuremath}. % \item \pkg{graphicx}: Fix for option defaults. Added v1.1a/b options. % \item \pkg{endfloat}: Updated for v2.6. % \item \pkg{url}: Fixes for active characters. % \end{itemize} % ^^A % \needspace{2\baselineskip} % ^^A % \item[v0.51:] Improved \SVG\ math, added numerous chemistry packages. % ^^A % \begin{itemize} % ^^A % \item Docs: Added \nameref{sec:thingstoavoid}. % ^^A % \margintag{documentation} % ^^A % \item Docs: Added to \nameref{sec:convertexisting}. % ^^A % \item Docs: Multiple authors and affiliations with custom classes. % ^^A % See \cref{sec:authorsaffils}. % ^^A % \item Docs: \pkg{tikz} with matrices. See \cref{sec:limitstikz}. % ^^A % \item Improved \SVG\ math baseline.\margintag{SVG math} % ^^A % \item Improved \SVG\ math font and color. % ^^A % \item Faster \SVG\ math rendering. % ^^A % \item Improved support for display math containing complicated math objects, % ^^A % such as \pkg{tikz-cd}. See \cref{sec:displaymathother}. % ^^A % \item Fix: \cs{addcontentsline} inside \SVG\ math. % ^^A % \item Fix: \SVG\ math containing an embedded \env{lateximage}. % ^^A % \item \MathJax\ now handles \cs{ensuremath} in expressions.\margintag{MathJax} % ^^A % \item Fix: Added \env{alignat} environment. \margintag{misc. fixes} % ^^A % \item Fix: \pkg{afterpackage} no longer required, which conflicted with \pkg{scrlfile}. % ^^A % \item Fix: \pkg{titling} \cs{thanks} mark. % ^^A % \item Fix: \pkg{fancybox} improvements. % ^^A % \item Fix: \pkg{tikz} \cs{tikz} macro. (Previously only the \env{tikzpicture} environment worked.) % ^^A % \item Fix: \pkg{tikz} with optional argument. % ^^A % \item Added \pkg{mhchem}, \margintag{packages} % ^^A % \pkg{chemfig}, \pkg{chemformula}, \pkg{chemmacros}, \pkg{chemnum}, \pkg{chemgreek}, % ^^A % \pkg{epstopdf-base}, \pkg{grid}, \pkg{ltxgrid}. % ^^A % \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.50:] Improved \SVG\ math. % ^^A \begin{itemize} % ^^A \item \SVG\ math and other \env{lateximage}s now are % ^^A converted to \SVG\ using \margintag{\SVG\ math} % ^^A parallel background tasks, utilizing all available \acro{CPU} cores. % ^^A \item Inline \SVG\ math image file names now are MD5 hashes made from % ^^A their source \LaTeX\ code. % ^^A Identical inline math expressions, such as multiple instance of \$x\$, % ^^A now share a single image file. % ^^A This reduces the number of images to store, transmit, process, and display. % ^^A Each image file is only converted to \SVG\ a single time, and reused if it % ^^A already exists. % ^^A Display math and other forms of \SVG\ image such as \env{picture} and % ^^A \TikZ\ still use individual image files which are recreated each time % ^^A \cmds{lwarpmk limages} is run. % ^^A \item Fixes: \SVG\ math and/or \cs{underline} in a sectioning file name. % ^^A \item Improved \SVG\ display math and tags. % ^^A \item Improved \SVG\ math and \pkg{siunitx} \attribute{alt} tags. % ^^A \item Improved \pkg{siunitx} units. % ^^A \item Fix: \cs{ensuremath} with \MathJax\ now creates a \env{lateximage}. % ^^A \item Fix: \cs{centering}, etc. in \SVG\ math, \env{lateximage}, \TikZ. % ^^A \item Fix: Made various macros robust, % ^^A additionally fixing \pkg{authblk}.\margintag{misc. fixes} % ^^A \item Fix: \pkg{ntheorem} if neither \optn{standard} nor \optn{amsthm} selected. % ^^A \item Fix: \pkg{listings}: Improved column alignment. % ^^A \item Fix: Load \pkg{fontspec} if necessary. % ^^A \item Added \pkg{xy}, \pkg{epstopdf}, \pkg{diagbox}, \pkg{pbox}, \margintag{packages} % ^^A \pkg{bytefield}, \pkg{axodraw2}, \pkg{phfqit}, % ^^A \pkg{schemata}, % ^^A \pkg{dblfloatfix}, \pkg{nonfloat}, \pkg{morefloats}. % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.49:] \ % ^^A \begin{itemize} % ^^A \item Added \pkg{xcolor} \cs{rowcolors}.\margintag{tabular} % ^^A \item Fix: \cs{noalign} inside a \env{tabular}. % ^^A \item Fix: \cs{eqref} in a caption.\margintag{math} % ^^A \item Fix: Incorrect \PDF\ font size changes % ^^A caused occasional \HTML\ corruption.\margintag{misc fixes} % ^^A \item Fix: \pkg{printlen} changes are now grouped for \HTML\ output. % ^^A \item Added \pkg{vwcol}, \pkg{vertbars}, \pkg{hyphenat}, \margintag{packages} % ^^A \pkg{lineno}, \pkg{fnlineno}, \pkg{figsize}, \pkg{hypdestopt}, \pkg{pagegrid}, % ^^A \pkg{pdfrender}, \pkg{luacolor}, \pkg{resizegather}. % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.48:] \ % ^^A \begin{itemize} % ^^A \item Added some documentation % ^^A \margintag{documentation} % ^^A regarding converting an existing document. See \cref{sec:convertexisting}. % ^^A \item Updated compatibility for new \pkg{cleveref} v0.21.\margintag{\pkg{cleveref}} % ^^A \item Fix: Ignores optional tabular column arguments.\margintag{tabular} % ^^A \item Added \cs{leftline}, \cs{centerline}, % ^^A \cs{rightline}.\margintag{minor updates} % ^^A \item Lists have improved font control via \cs{makelabel}. % ^^A \item Print-mode \env{lateximage} now boxed to the natural width of its % ^^A multiline contents. % ^^A \item \env{abstract} now allows an optional name, as required by some classes. % ^^A \item Fix: Improved spacing, \cs{mbox}, and font sizes % ^^A with \SVG\ math, \TikZ.\margintag{math} % ^^A \item \pkg{siunitx}: Improved \SVG\ math, fraction compatibility, color output. % ^^A \item Fix: LOF/LOT links.\margintag{misc. fixes} % ^^A \item Fix: Virtual page size grouping caused excessive \PDF\ page breaks. % ^^A \item Fix: Parsing similar package names in a % ^^A single \cs{usepackage}. % ^^A \item Fix: Adapts to classes without \cs{part}. % ^^A \item Fix: \cs{newline} in \cs{title} was causing |
| in window title. % ^^A \item Fix: \cs{maketitle} with \cs{cr}, \cs{crcr}, \cs{noalign}, % ^^A for \pkg{IEEEtran} class. % ^^A \item Fix: \pkg{xfrac} neutralized \env{BlockClass} and others. % ^^A \item Fix: \pkg{todonotes} and \pkg{luatodonotes}: Improved \cs{todototoc}. % ^^A \item Added \pkg{colortbl}, \margintag{packages} % ^^A \pkg{chapterbib}, \pkg{acro}, \pkg{acronym}, % ^^A \pkg{hypernat}, \pkg{hypcap}, \pkg{stfloats}, % ^^A \pkg{vmargin}, \pkg{fancyheadings}. % ^^A \item \pkg{fancyref}: Now directly supported. % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.47:] \ % ^^A \begin{itemize} % ^^A \item Improved \SVG\ math baseline and sizing.\margintag{math} % ^^A \item Fixes: \SVG math in captions, subcaptions, \cs{nameref}. % ^^A \item Fixes: Line wrap at hyphen in \HTML\ output. % ^^A \item Added \pkg{endheads}, \pkg{multitoc}, \pkg{sectionbreak}, % ^^A \pkg{blowup}, \pkg{xurl}.\margintag{packages} % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.46:] \ % ^^A \begin{itemize} % ^^A \item \cs{PrintStack} changed to \cs{LWRPrintStack}.\watchout[name change] % ^^A \item Fix: Empty lines between \env{tabular} rows.\margintag{misc. fixes} % ^^A \item Fix: Stack unnesting. % ^^A \item Fix: \SVG\ math and \env{lateximage}s in numerous situations. % ^^A \item Fix: Spaces in \cs{usepackage}. % ^^A \item Fix: Now allows \MathJax\ inside \env{verse}. % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.45:] \ % ^^A \begin{itemize} % ^^A \item Improved \prog{MiKTeX} install instructions. % ^^A \margintag{documentation} % ^^A \item Improved graphics and \pkg{epstopdf} instructions. % ^^A \item Updates to the \nameref{sec:introduction}. % ^^A \item Added \pkg{memoir}, \pkg{memhfixc}. % ^^A See \cref{sec:limitsmemoir}.\margintag{memoir} % ^^A \item Fix: Now allows underscores in labels.\margintag{cross-references} % ^^A \item Fix: \cs{\_} and |\| in section/file names. % ^^A \item Fix: Now allows \MathJax\ inside \env{tabbing}.\margintag{math} % ^^A \item Fix: Bibliography \cs{em} names.\margintag{bibliography} % ^^A \item Added \pkg{cite}, \pkg{natbib}, \pkg{backref}. % ^^A (Also works as-is with \pkg{biblatex}.) % ^^A \item Fix: Empty lines between \env{tabular} rows.\margintag{misc. fixes} % ^^A \item Fix: ``Improper \cs{prevdepth}'' with minipages, lists. % ^^A \item Fix: Incorrect \SVG\ math and |lateximage|s with \pkg{subfig}. % ^^A \item Fix: Lateximages from incorrect pages with \brand{Mathjax}. % ^^A \item Fix: Missing sidetoc if using \pkg{listings}. % ^^A \item Fix: Added an \pkg{array} emulation package. % ^^A \item Added % ^^A \pkg{subfigure}, \pkg{prettyref}, \margintag{packages} % ^^A \pkg{hanging}, \pkg{midpage}, % ^^A \pkg{flafter}, \pkg{fltrace}, \pkg{changebar}, \pkg{endfloat}, % ^^A \pkg{continue}, \pkg{fwlw}, \pkg{turnthepage}, \pkg{footnpag}, % ^^A \pkg{pagesel}, \pkg{textfit}, \pkg{titleref}. % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.44:] \ % ^^A \begin{itemize} % ^^A \item Added \pkg{koma-script} classes (except \pkg{scrlttr2}, \pkg{scrjura}). % ^^A \margintag{\pkg{koma-script}} % ^^A \item Added \pkg{scrextend}, % ^^A \pkg{scrlayer}, \pkg{scrlayer-notecolumn}, \pkg{scrlayer-scrpage}, % ^^A \pkg{scrhack}, \pkg{tocstyle}, \pkg{tocbasic}. % ^^A \item Added \cs{HTMLTitle}. % ^^A \margintag{\HTML\ title and author} % ^^A Fixed web page title if \cs{HTMLTitle} empty and no \cs{title} given and % ^^A not using \pkg{titling} package. % ^^A \item Fixed web page author if \cs{HTMLauthor} is empty and \cs{author} is not given. % ^^A \item If using \prog{pdflatex}, automatically loads T1 and \UTF-8 encodings. % ^^A \margintag{encodings} % ^^A (Additional \pkg{fontenc} encodings may be loaded after \pkg{lwarp}.) % ^^A \item Added \env{list} and \env{trivlist} environments, \pkg{hang}.\margintag{lists} % ^^A \item Fix: \cs{multicolumn} alignment if formatting for a word processor. % ^^A \margintag{tabular} % ^^A \item Added \pkg{ltxtable}. % ^^A \item Fix: \MathJax\ combined with \env{lateximage}s.\margintag{math} % ^^A \item \pkg{algorithmicx}: Improved comment symbol and floating. % ^^A \item Completed \pkg{todonotes} and \pkg{luatodonotes}. % ^^A \margintag{\pkg{packages}} % ^^A \item Added \pkg{todo}, \pkg{easy-todo}, \pkg{fixmetodonotes}, \pkg{fixme}. % ^^A \item Added \pkg{soulutf8}, \pkg{soulpos}, \pkg{cancel}. % ^^A \item Added \pkg{section}, \pkg{fancyref}, \pkg{ifoddpage}. % ^^A \item Added \pkg{preview}, \pkg{atbegshi}, \pkg{watermark}. % ^^A \item Improved \pkg{tocloft} \cs{newlistof} and \cs{newlistentry}. % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.43:] \ % ^^A \begin{itemize} % ^^A \item Docs: Reorganized \HTML\ customization, added an \HTML\ settings table. % ^^A See \cref{sec:htmlsettings}. % ^^A \item Added \progcode{FootnoteDepth} to control the placement % ^^A \margintag{footnotes} % ^^A of pending footnotes before section breaks. % ^^A By default, pending footnotes are printed before % ^^A each \cs{subparagraph} or higher. % ^^A \item Fix: Expansion in section name. \margintag{sectioning} % ^^A \item Fix: Ignore spaces in tabular column specification. % ^^A \margintag{\env{tabular}} % ^^A \item Fix: Tabular rules at bottom or when finishing incomplete rows. % ^^A \item Fix: \cs{multicolumn} at/bang/before/after specifications, trim, % ^^A and vertical rules. % ^^A \item Fix: \pkg{supertabular} and \pkg{xtab} column misalignment. % ^^A \item Fix: \env{equation*}. % ^^A \margintag{math} % ^^A \item Fix: \SVG\ math in a section name. % ^^A \item Fix: \cs{ref} and \cs{eqref} in \SVG\ math. % ^^A \item Added \pkg{todonotes} and \pkg{luatodonotes} (but only |disabled|). % ^^A \margintag{packages} % ^^A \item Added \pkg{breakurl}. % ^^A \item \pkg{hyperref}: Fix: Several macros were made robust, \cs{Gauge} added. % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.42:] \ % ^^A \begin{itemize} % ^^A \item Added \TeX\ development support page. % ^^A (See page \pageref{sec:supportinglatex}.) % ^^A \margintag{Support \TeX!} % ^^A \item Improved assitance for word-processor conversions when % ^^A \margintag{word-processor conversion} % ^^A boolean |FormatWP| is set |true|. % ^^A See \cref{sec:wordprocessorconversion}. % ^^A \begin{itemize} % ^^A \item \textred{The} \watchout[name change] % ^^A \textred{boolean |FormatWordProcessor| has % ^^A been renamed |FormatWP|.} % ^^A \item \textred{The} \watchout[name change] % ^^A \textred{boolean |HTMLMarkFloats| has % ^^A been renamed |WPMarkFloats|.} % ^^A \item New booleans control whether to place additional % ^^A marks around minipages, at the table of contents, % ^^A at the \LOF\ and \LOT, and whether to % ^^A print math as \LaTeX\ source for copy/paste into the % ^^A \prog{LibreOffice Writer TeXMaths} extension. % ^^A \item Improved formatting for numerous objects. % ^^A See \cref{sec:wordprocessorconversion}. % ^^A \end{itemize} % ^^A \item Add: \env{tabbing} environment. % ^^A \margintag{\env{tabbing}} % ^^A \item Add: \pkg{overpic} package. See \cref{sec:overpic}. % ^^A \margintag{\pkg{overpic}} % ^^A \item Fix: Text copy/paste of \AmS\ math environment numbers and names. % ^^A \margintag{math} % ^^A \item Improved \cs{ensuremath}. % ^^A \item \MathJax\ with \pkg{siunitx}: Updated script and documentation. % ^^A \item \pkg{textcomp}: Improved \cs{textinterrobangdown}. % ^^A \margintag{symbols} % ^^A \item \pkg{realscripts}: Fix for subscripts in a \env{lateximage}. % ^^A \item \pkg{morewrites}: Enforces loading before \pkg{lwarp}. % ^^A \margintag{load order} % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.41:] \ % ^^A \begin{itemize} % ^^A \item Added tabular vertical rules, subject to some limitations. % ^^A \margintag{\env{tabular}} % ^^A See the rules section of \cref{sec:limitstabular}. % ^^A \item Improved \pkg{booktabs}: Width and trim are honored. % ^^A \item Added \cs{mcolrowcell} for empty cells inside a \cs{multicolumnrow}. % ^^A \watchout[new syntax] % ^^A \textred{Use \cs{mcolrowcell} instead of \cs{mrowcell} for two-dimensional % ^^A cells created by \cs{multicolumnrow}.} % ^^A Continue to use \cs{mrowcell} for empty cells in a \cs{multirow}. % ^^A See \cref{sec:multicolumnmultirow} on \cpageref{sec:multicolumnmultirow}. % ^^A \item Fix: Unfinished tabular rows are automatically filled. % ^^A \item Fix for tabular column specifiers while using \pkg{babel-french}. % ^^A (\cs{NoAutoSpacing} is activated then nullified inside the tabular, % ^^A due to a conflict with the tabular column parsing code.) % ^^A \end{itemize} % ^^A \item[v0.40:] \ % ^^A \begin{itemize} % ^^A \item \pkg{graphics} and \pkg{graphicx} have been moved from the % ^^A \margintag{\pkg{graphics}, \pkg{graphicx}} % ^^A \pkg{lwarp} core, and are only loaded if requested with \cs{usepackage}. % ^^A \item Improved \pkg{graphics} \cs{graphicspath} support. % ^^A \margintag{\cs{includegraphics} path} % ^^A Multiple image directories may now be used. % ^^A \textred{Refer to |.pdf| files without a file extension} % ^^A \watchout[image file extensions] % ^^A to allow the \HTML\ version % ^^A to use a |.svg|, |.png|, |.jpg|, or |.gif| version instead. % ^^A See \cref{sec:limitsgraphics}. % ^^A \item \pkg{grffile} is now directly supported instead of emulated. % ^^A \item Fix for \pkg{bigdelim}, and improved documentation. % ^^A \margintag{\pkg{bigdelim}} % ^^A See \cref{sec:bigdelim}. % ^^A \item Improved \LaTeX\ and \pkg{textcomp} symbols.\margintag{\pkg{symbols}} % ^^A \item Fix for \LaTeX\ logos and \cs{InlineClass}, etc. inside a \env{lateximage}. % ^^A \margintag{\pkg{fixes}} % ^^A \item Fix for \pkg{xltxtra} with \XeLaTeX. % ^^A \item Fixes for \pkg{tocbibind} with \cs{simplechapter}, etc. % ^^A \item Fixes for \cs{multicolumnrow} and \cs{nullfonts} with older versions % ^^A of \pkg{multirow} and \pkg{xparse}. % ^^A \item Added \cs{underline}. % ^^A \item Added \pkg{adjmulticol}.\margintag{margins} % ^^A \item Added \pkg{cuted}, \pkg{midfloat}.\margintag{columns} % ^^A \item Added \pkg{pfnote}, \pkg{fnpos}, \pkg{dblfnote}.\margintag{footnotes} % ^^A \item Added \pkg{stabular}, \pkg{tabls}.\margintag{tabular} % ^^A \item Added \pkg{sectsty}, \pkg{anonchap}, \pkg{quotchap}.\margintag{sectioning} % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.39:] \ % ^^A \begin{itemize} % ^^A \item Improved the titlepage \HTML\ code, \cs{thanks} notes, % ^^A \margintag{title pages} % ^^A and \cs{maketitle}. % ^^A \pkg{titling} is no longer required, but is still supported. % ^^A The \cs{published} and \cs{subtitle} fields are no longer provided, % ^^A \watchout[\cs{published} and \cs{subtitle}] % ^^A but \cs{AddSubtitlePublished} replicates them using \pkg{titling}. % ^^A See \cref{sec:publishedsubtitle}. % ^^A \pkg{authblk} is added, and should be loaded before \pkg{titling}. % ^^A \watchout[load order] % ^^A See \cref{sec:titles}. % ^^A \item \cs{multirow} now supports the new optional |vpos| argument. % ^^A \margintag{tabular} % ^^A \item Added \cs{multicolumnrow} for combined % ^^A \margintag{multi column/row cell} % ^^A \cs{multicolumn} and \cs{multirow}. % ^^A See \cref{sec:multicolumnmultirow}. % ^^A \item Tabular special cases: % ^^A \begin{itemize} % ^^A \item Added \cs{TabularMacro} to mark custom macros % ^^A \watchout[macros inside tabular] % ^^A inside tabular data cells, avoiding row corruption. % ^^A See \cref{sec:limitstabular}. % ^^A \item Added \cs{ResumeTabular} for use when a \env{tabular} environment % ^^A \watchout[tabular defined inside another environment] % ^^A is defined inside another environment. % ^^A See \cref{sec:limitstabular}. % ^^A \end{itemize} % ^^A \item Added \pkg{supertabular}, \pkg{xtab}, \pkg{bigstrut}, \pkg{bigdelim}. % ^^A \margintag{tabular} % ^^A \item Added \pkg{fullwidth}.\margintag{margins} % ^^A \item Added \pkg{addlines}, \pkg{anysize}, \pkg{a4}, \pkg{a4wide}, \pkg{a5comb}, % ^^A \margintag{page layout} % ^^A \pkg{textarea}, \pkg{zwpagelayout}, \pkg{typearea}, \pkg{ebook}. % ^^A \end{itemize} % ^^A \item[v0.38:] \ % ^^A \begin{itemize} % ^^A \item Added \cmds{lwarpmk print1} and \cmds{lwarpmk html1} actions to % ^^A \margintag{forced single-pass compile} % ^^A force a compile of the project a single time. % ^^A Useful when multiple passes are not needed, % ^^A or changes were not detected. % ^^A \item Added \cs{ForceHTMLPage} and \cs{ForceHTMLTOC} to force % ^^A \margintag{starred sections} % ^^A a starred sectional unit onto its own \HTML\ page % ^^A and with its own \TOC\ entry. % ^^A See \cref{sec:forcesectionstar}. % ^^A \item Modified the tutorial to use the new \cs{ForceHTMLPage} % ^^A \margintag{updated tutorial} % ^^A and \cs{ForceHTMLTOC} macros. % ^^A \item Added \pkg{appendix}, \pkg{tocbibind}, \pkg{fncychap}, \pkg{fix2col}. % ^^A \margintag{packages} % ^^A \item Added \pkg{relsize}, \pkg{scalefnt}.\margintag{font size} % ^^A \item Added \pkg{realscripts}, \pkg{metalogo}, \pkg{xltxtra}. % ^^A \item Added \pkg{grffile}, \pkg{romanbar}. % ^^A \item Added \pkg{arabicfront}, \pkg{chappg}, \pkg{nonumonpart}, \pkg{nopageno}, % ^^A \margintag{page numbering} % ^^A \pkg{romanbarpagenumber}. % ^^A \item Docs: Improved description of the use of front/back matter. % ^^A \margintag{front \& back matter} % ^^A See \cref{sec:frontbackmatter}. % ^^A \item Fix: \pkg{color} requests \pkg{xcolor}. % ^^A \item Fix: \cs{part} for \pkg{article} class. % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.37:] \ % ^^A \begin{itemize} % ^^A \item \cs{include} now maintains independent |.aux| files % ^^A \margintag{\cs{include} for \HTML} % ^^A for \HTML\ versions. % ^^A \item \pkg{comment}, used by \pkg{lwarp}, now maintains % ^^A \margintag{\prog{latexmk}} % ^^A independent cut files for print and \HTML\ versions, helping \prog{latexmk} to % ^^A better know whether to recompile. % ^^A \item Improved support for \LaTeX\ accents, % ^^A \margintag{accents and symbols} % ^^A \pkg{textcomp}, \pkg{siunitx} symbols. % ^^A \item Improved \pkg{babel-french} handling for % ^^A \margintag{\pkg{babel-french}} % ^^A load order and \textasciitilde\ tilde. % ^^A \end{itemize} % ^^A \item[v0.36:] \ % ^^A \begin{itemize} % ^^A \item Recorganized the documentation section regarding special cases and limitations. % ^^A (\Cref{sec:limitations}) % ^^A \item Improved source formatting. % ^^A \item \cs{fbox} and related now use \cs{fboxsep} and \cs{fboxrule}. % ^^A \margintag{boxes and frames} % ^^A \item \cs{makebox} and \cs{framebox} now use width and position. % ^^A \item \cs{fcolorbox} and related now work inside a \env{lateximage}. % ^^A \item \pkg{babel-french}: Improvements for French variants, load order, % ^^A \margintag{\pkg{babel-french}} % ^^A footnotes, ellipses. % ^^A \item Improved footnote numbering. % ^^A \margintag{footnotes} % ^^A \env{lateximage} footnotes now appear as regular footnotes to match % ^^A the numbering of the print version. % ^^A Also fixed a regression with \MathJax. % ^^A \item Improved \pkg{siunitx} units. % ^^A \margintag{\pkg{siunitx}} % ^^A \item Fix for filenames while using \MathJax. % ^^A \item Fix for \cs{rule} when \pkg{xcolor} is not loaded. % ^^A \item Added \pkg{transparent}, \pkg{upref}. % ^^A \end{itemize} % ^^A \item[v0.35:] Fix: \cs{textbf} and related. % ^^A \item[v0.34:] \ % ^^A \begin{itemize} % ^^A \item \env{BlockClass}'s optional argument has been moved % ^^A \watchout[Optional arguments] % ^^A in front of the mandatory argument: % ^^A \begin{sourcedisplay} % ^^A |BlockClass[style]{class}| \quad \textrm{(NEW)} % ^^A \end{sourcedisplay} % ^^A instead of: % ^^A \begin{sourcedisplay} % ^^A |BlockClass{class}[style]| \quad \textrm{(OLD)} % ^^A \end{sourcedisplay} % ^^A This change makes it more consistent with \LaTeX\ standards, % ^^A and avoids problems with space between arguments. % ^^A \item Likewise, \cs{InlineClass}'s optional argument now % ^^A \watchout[Optional arguments] % ^^A comes before the mandatory arguments: % ^^A \begin{sourcedisplay} % ^^A |\InlineClass[style]{class}{text}| % ^^A \end{sourcedisplay} % ^^A \item Improved compatibility between spans, minipages, lists, % ^^A \margintag{spans with minipages} % ^^A frames, and math. % ^^A Handles minipages and lists inside an \HTML\ span, % ^^A such as an \cs{fbox} containing a minipage, % ^^A although with minimal \HTML\ fomatting. % ^^A See \cref{sec:minipages}. % ^^A \cs{fboxBlock} is added to frame minipages, tables, % ^^A \margintag{framing minipages} % ^^A and lists with full \HTML\ formatting % ^^A but no longer inline, and behaves as \cs{fbox} for print output. % ^^A The \env{fminipage} environment is added for framed minipages, % ^^A as an environment with full \HTML\ formatting, % ^^A and draws a framed minipage in print output. % ^^A See \cref{sec:framedminipages}. % ^^A \cs{fbox} and minipages now often work in \SVG\ math and \env{lateximage}s. % ^^A \MathJax\ supports \cs{fbox}, but not \cs{fboxBlock} nor \env{fminipage}. % ^^A \item Improved compatibility between \env{lateximage} and % ^^A \margintag{\env{lateximage}, \SVG\ math, \env{tabular}} % ^^A \env{minipage}, \cs{parbox}, \cs{makebox}, \cs{fbox}, \cs{framebox}, % ^^A \cs{raisebox}, \cs{scalebox}, \cs{reflectbox}, \env{tabular}, \pkg{booktabs}. % ^^A \item Improved font control for \env{lateximage}es and \SVG\ math. % ^^A \item Added the \env{eqnarray} environments.\margintag{\env{eqnarray}} % ^^A \item \pkg{fancyvrb} is no longer required (preloaded), % ^^A \margintag{verbatim packages} % ^^A but is still supported. % ^^A \item Added \pkg{verbatim} and \pkg{moreverb}. % ^^A \item Added \pkg{fancybox}, \pkg{boxedminipage2e} and \pkg{shadow}. % ^^A \margintag{framing packages} % ^^A \item \pkg{enumitem} is no longer required, but is still supported. % ^^A \margintag{list packages} % ^^A \item Added \pkg{enumerate} and \pkg{paralist}. % ^^A \item \pkg{titleps} is no longer required, but is still supported. % ^^A \item Added \pkg{crop}. % ^^A \item Added \pkg{rotfloat}, \pkg{marginfit}, % ^^A and several minor packages; see the change log. % ^^A \item Adds fixed-width \HTML\ spaces around punctuation % ^^A \margintag{\pkg{babel-french}} % ^^A when using \pkg{babel-french}. % ^^A \LuaTeX\ does not yet use the extra punctuation spacing. % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.33:] \ % ^^A \begin{itemize} % ^^A \item Tabular |@| and |!| columns now havetheir own \HTML\ columns. % ^^A \item |&| catcode changes are localized, perhaps causing errors % ^^A about the tab alignment character |&|, % ^^A so any definitions of macros or environments % ^^A which themselves contain \env{tabular} and |&| must be enclosed within \cs{StartDefiningTabulars} % ^^A and \cs{StopDefiningTabulars} (previously called \cs{EndDefiningTabulars}. % ^^A See \cref{sec:localizingcatcodes}. % ^^A This change is not required for the routine use of tables, % ^^A but only when a table is defined inside another macro or environment, % ^^A and while also using the |&| character inside the definition. % ^^A This may include the use inside conditional expressions. % ^^A \item Several math environments were incorrectly placed inline. % ^^A Also, for \pkg{amsmath} with \SVG\ math, the \optn{fleqn} option has been removed, % ^^A resulting in improved spacing for aligned equations. % ^^A \item Bug fixes; see the changelog. % ^^A \end{itemize} % ^^A \item[v0.32:] Bug fixes; no source changes needed: % ^^A \begin{itemize} % ^^A \item \prog{lwarpmk} has been adjusted to work with the latest \prog{luatex}. % ^^A \item Spaces in the \cs{usepackage} and \cs{RequirePackage} package lists are now accepted and ignored. % ^^A \item Fix for the \pkg{glossaries} package and \cs{glo@name}. % ^^A \end{itemize} % ^^A \item[v0.31:] Bug fix; no source changes needed: % ^^A \begin{itemize} % ^^A \item Improved compatibility with \pkg{keyfloat}, % ^^A including the new \env{keywrap} environment. % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.30:] \ % ^^A \begin{itemize} % ^^A \item \pkg{lwarp-newproject} has been removed, and its functions % ^^A \watchout[\pkg{lwarp-newproject}] % ^^A have been combined with \pkg{lwarp}. % ^^A % ^^A To modify existing documents, remove from the document source: % ^^A \begin{sourceverb} % ^^A \usepackage{lwarp-newproject} % ^^A \end{sourceverb} % ^^A % ^^A The \pkg{lwarp} package now produces the configuration files during % ^^A print output, and also accepts the option \optn{lwarpmk} if desired. % ^^A % ^^A \item A number of macros % ^^A \watchout[HTML setup changes.] % ^^A related to \HTML\ settings have been converted to options, and % ^^A other macros and options have been renamed to create a consistent syntax: % ^^A \begin{center} % ^^A \begin{tabular}{cc} % ^^A \toprule % ^^A Old Macro & New Package Option \\ \midrule % ^^A \cs{HomeHTMLFileName} & |HomeHTMLFilename| \\ % ^^A \cs{HTMLFileName} & |HTMLFilename| \\ % ^^A \cs{useLatexmk} & |latexmk| \\ % ^^A \cs{warpOSwindows} & |OSWindows| \\[2.5ex] \toprule % ^^A Old Package Option & New Package Option \\ \midrule % ^^A \optn{lwarpmklang} & \optn{xindyLanguage} \\ % ^^A (new) & \optn{xindyStyle} \\[2.5ex] \toprule % ^^A Old Macro & New Macro \\ \midrule % ^^A \cs{MetaLanguage} & \cs{HTMLLanguage} \\ % ^^A \cs{HTMLauthor} & \cs{HTMLAuthor} \\ % ^^A \cs{NewHTMLdescription} & \cs{HTMLDescription} \\ % ^^A \cs{SetFirstPageTop} & \cs{HTMLFirstPageTop} \\ % ^^A \cs{SetPageTop} & \cs{HTMLPageTop} \\ % ^^A \cs{SetPageBottom} & \cs{HTMLPageBottom} \\ % ^^A \cs{NewCSS} & \cs{CSSFilename} \\ % ^^A \bottomrule % ^^A \end{tabular} % ^^A \end{center} % ^^A % ^^A \needspace{2\baselineskip} % ^^A \item Per the above changes, in existing documents, % ^^A modify the package load of \pkg{lwarp}, such as: % ^^A \begin{sourceverb} % ^^A \usepackage[ % ^^A HomeHTMLFilename=index, % ^^A HTMLFilename={}, % ^^A xindyLanguage=english % ^^A ]{lwarp} % ^^A \end{sourceverb} % ^^A % ^^A \item The file |lwarp_html.xdy| has been renamed |lwarp.xdy|. % ^^A To update each document's project: % ^^A \begin{enumerate} % ^^A \item Make the changes shown above. % ^^A \item Recompile the document in print mode. % ^^A This updates the project's configuration files, and also generates the % ^^A new file |lwarp.xdy|. % ^^A \item The old file |lwarp_html.xdy| may be deleted. % ^^A \end{enumerate} % ^^A % ^^A \item The new \pkg{lwarp} package option \optn{xindyStyle} may be used to tell % ^^A \prog{lwarpmk} to use a custom |.xdy| file instead of |lwarp.xdy|. % ^^A See \cref{sec:modifyxindy}. % ^^A % ^^A \item Improvements in index processing: % ^^A \begin{itemize} % ^^A \item \prog{xindy}'s language is now used for index processing % ^^A as well as glossary. % ^^A \item Print mode without \prog{latexmk} now uses \prog{xindy} instead of \prog{makeindex}. % ^^A \item \prog{texindy}/\prog{xindy} usage depends on \prog{pdflatex} vs \prog{xelatex}, \prog{lualatex}. % ^^A \item For \prog{pdflatex} and \prog{texindy}, the \optn{-C utf8} option is used. This is % ^^A supported in modern distributions, but a customized \filenm{lwarpmk.lua} may % ^^A need to be created for use with older distributions. % ^^A \end{itemize} % ^^A % ^^A \end{itemize} % ^^A % ^^A \needspace{2\baselineskip} % ^^A % ^^A \item[v0.29:] \ % ^^A \begin{itemize} % ^^A \item Add: \optn{lwarpmklang} option for \pkg{lwarp-newproject} and \pkg{lwarp}. % ^^A Sets the language to use while processing the glossary. % ^^A (As of v0.30, this has been changed to the \optn{IndexLanguage} option.) % ^^A (As of v0.54, this has been changed to the \optn{xindyLanguage} option.) % ^^A \item Fix: \cs{includegraphics} when no optional arguments. % ^^A \end{itemize} % ^^A \item[v0.28:] \ % ^^A \begin{itemize} % ^^A \item \cs{HTMLAuthor} \marg{name} assigns \HTML\ meta author if non-empty. % ^^A Defaults to \cs{theauthor}. % ^^A \item Booean |HTMLDebugComments| controls whether \HTML\ comments are % ^^A added for closing \element{div}s, opening and closing sections, etc. % ^^A \item Boolean |FormatEPUB| changes \HTML\ output for easy \EPUB\ conversion % ^^A via an external program. % ^^A Removes per-file headers, footers, and nav. Adds footnotes per chapter/section. % ^^A \item Boolean |FormatWordProcessor| changes \HTML\ output for easier conversion % ^^A by a word processor. Removes headers and nav, prints footnotes per section, % ^^A and also forces single-file output and turns off \HTML\ debug comments. % ^^A Name changed to |FormatWP| as of v0.42. % ^^A \item Boolean |HTMLMarkFloats| adds text marks around floats only if the boolean % ^^A |FormatWordProcessor| is |true|. % ^^A These make it easier to identify float boundaries, % ^^A which are to be manually converted to word-processor frames. % ^^A Name changed to |WPMarkFloats| as of v0.42. % ^^A \item Updated for the new \MathJax\ \acro{CDN} repository. % ^^A \item Adds \pkg{tabulary}. % ^^A \item Supports the options syntax for \pkg{graphics}. % ^^A \item Improved index references, now pointing exactly to their target. % ^^A \item Adds \pkg{glossaries}. % ^^A \prog{lwarpmk} is modified to add |printglosssary| and |htmlglossary| actions. % ^^A \end{itemize} % ^^A % ^^A \needspace{2\baselineskip} % ^^A \item[v0.27:] \ % ^^A \begin{itemize} % ^^A \item Improved documentation for \brand{MacOS} install. % ^^A \item Fix for \pkg{microtype} with \XeLaTeX\ and \LuaLaTeX. % ^^A \item Fix for table footnote paragraph tags. % ^^A \item Adds \pkg{lettrine}, \pkg{ulem}, and \pkg{soul}. % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.26:] \ % ^^A \begin{itemize} % ^^A \item Improved installation instructions for MiK\TeX\ regarding generating % ^^A the \prog{lwarpmk} executable. % ^^A \item Footnotes are now supported by \LaTeX\ boxes instead of pagenotes. % ^^A \pkg{pagenote} now works as per the print version. % ^^A \pkg{footnote}, \pkg{footnotehyper}, \pkg{footmisc}, \pkg{endnotes}, % ^^A \pkg{marginnote}, and \pkg{sidenotes} are also supported. % ^^A \item \LaTeX\ labels now are used to track the page numbers of |lateximage|s. % ^^A This allows the correct inclusion of |lateximage|s in footnotes, pagenotes, and endnotes. % ^^A \item \pkg{cutwin} and \pkg{floatflt} are also supported. % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.25:] \ % ^^A \begin{itemize} % ^^A \item Fix: Allows \pkg{graphicx} and \pkg{graphicx} before \pkg{lwarp} because % ^^A \XeLaTeX\ and \LuaLaTeX\ use \pkg{xunicode} which uses \pkg{graphics}. % ^^A \item Package support for \pkg{framed}, several theorem packages, and ellipses. % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.24:] \ % ^^A \begin{itemize} % ^^A \item \pkg{tikz}'s |babel| library is load automatically as needed. % ^^A \item \pkg{subfig} has been added, along with |lofdepth| and |lotdepth|. % ^^A \item \env{picture} and \env{tikzpicture} now may be inline. % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.22:] \ % ^^A \begin{itemize} % ^^A \item Support has been added for tabular column types |D|, |!|, and |X|. % ^^A Unknown column types are converted to |l|. % ^^A \item Additional packages are supported, including \pkg{abstract}, % ^^A \pkg{dcolumn}, \pkg{tabularx}, and \pkg{varioref}. % ^^A \end{itemize} % ^^A \item[v0.21:] \ % ^^A \begin{itemize} % ^^A \item Documentation for installing on \brand{Windows} has been updated and improved. % ^^A \item For \brand{Windows} compatibility, the |lateximages| shell script % ^^A has been replaced with a |lateximages.txt| file, which is parsed % ^^A by \prog{lwarpmk} to generate lateximages. % ^^A This does not require any changes in the user's code. % ^^A \item \brand{Windows} \cmds{lwarpmk again} now functions. % ^^A \item For improved error handling, \pkg{lwarp} now verifies the % ^^A order in which packages are loaded, and signals an error for misplaced packages. % ^^A \pkg{inputenc}, \pkg{fontenc}, \pkg{newunicode}, and \pkg{fontspec} % ^^A must be loaded before \pkg{lwarp}, and the other packages which % ^^A \pkg{lwarp} knows about must be loaded after. % ^^A \item \pkg{lwarp} no longer requires a \cs{title} be assigned. % ^^A \end{itemize} % ^^A \item[v0.20:] \ % ^^A \begin{itemize} % ^^A \item The |makefile| and related infrastructure % ^^A has been replaced by the \prog{lwarpmk} utility. % ^^A This provides increased portability, reduced dependencies, % ^^A and much simpler installation and setup. % ^^A \item The |lwarp-newproject| package is now used to locally create % ^^A support files. % ^^A \item The print and \HTML\ versions of a document may co-exist with their % ^^A own sets of auxiliary files. % ^^A \item Package handling is now controlled by a modular system which % ^^A looks for and loads an |lwarp-| version if available. % ^^A \item High-level source compatibility is provided for all supported % ^^A packages, almost totally eliminating the need % ^^A for |warpprint| and |warpHTML| environments. % ^^A \item A large number of additional packages are supported. % ^^A \item A new tutorial is included in the documentation, and % ^^A many obsolete sections have been removed. % ^^A \item \cs{NewHTMLdescription} sets the \HTML\ meta description tag for each file. % ^^A See \cref{sec:htmldescription}. (v0.30 changes this to \cs{HTMLDescription}.) % ^^A \item \cs{HTMLFilename} may now be empty, allowing filenames without a prefix. % ^^A Lwarp no longer automatically appends a |-| character. % ^^A \watchout % ^^A For existing projects, add a |-| to the end of \cs{HTMLFilename}. % ^^A \item \cs{HomeHTMLFilename} and \cs{HTMLFilename} no longer use % ^^A escaped underscore\watchout\ % ^^A characters. Underscores may be used in filenames as-is. % ^^A (Version 0.30 changes these to package options |HomeHTMLFilename| and % ^^A |HTMLFilename|.) % ^^A \item \pkg{lwarp} now tries to auto-detect the operating system, % ^^A and \cs{warpOSwindows} is only needed if the auto-detection % ^^A fails to detect \brand{Windows}. (As of v0.30, \cs{warpOSwindows} has been converted to % ^^A the \optn{OSWindows} option.) % ^^A \item Tabular column types |@|, |>|, and |<| are now supported. % ^^A \item |BlockClass| and \cs{InlineClass} add an optional style. % ^^A \item The |sidebar| and |example| environments have been moved to the % ^^A test suite, and are no longer included in \pkg{lwarp}. % ^^A \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.19:] \ % ^^A \begin{itemize} % ^^A \item \MathJax\ now may be used to display math via the \optn{mathjax} option. % ^^A See \cref{sec:loading,sec:limitsmath}. % ^^A To use \MathJax\ with a pre-existing project, % ^^A \watchout % ^^A copy or link the file |lwarp_mathjax.txt| to the project's directory. % ^^A \item \cs{rule} added, supporting width, height, raise, \cs{textcolor}. % ^^A \item \cs{LateximageFontSizeName} provides user-adjustable font size for math % ^^A and \env{lateximage}s. % ^^A \item \cs{minipagefullwidth} requests that the next minipage be % ^^A full-width in \HTML, but still the assigned width in print. % ^^A \item \env{minipage} improved side-by-side rendering. % ^^A \item \CSS\ class |tablenotes| is provided for table note items. % ^^A \item \cs{warpprintonly} replaces \cs{rowprintedonly}, % ^^A and \cs{warpHTMLonly} is added. These behave like the \env{warpprint} % ^^A \watchout % ^^A and \env{warpHTML} environments, and are generally useful, so they replace % ^^A the previously table-specific syntax. % ^^A \item \pkg{cleveref} is loaded \cs{AtEndPreamble} for improved reliability. % ^^A See \cref{sec:cleveref}. % ^^A \item \cs{xfracHTMLfontsize} controls \pkg{xfrac} font size in \HTML. % ^^A \item \TikZ\ improved catcode handling. % ^^A \end{itemize} % ^^A \item[v0.18:] \ % ^^A \begin{itemize} % ^^A \item The \pkg{verse} package and the verse-related commands from % ^^A the \pkg{memoir} package are now supported. % ^^A \item Responsive web design has been improved for the side\TOC. % ^^A \item \cs{includegraphics} now maintains relative sized for em, ex, and \%. % ^^A \end{itemize} % ^^A \item[v0.17:] \ % ^^A \begin{itemize} % ^^A \item \pkg{mdframed} package is supported. % ^^A \end{itemize} % ^^A \item[v0.16:] \ % ^^A \begin{itemize} % ^^A \item Font and input encoding are now controlled by the user, and % ^^A \pkg{lwarp} is loaded after fonts have been selected. % ^^A \item Support for \XeLaTeX{} and \LuaLaTeX. See \cref{sec:fonts}. % ^^A \end{itemize} % \end{description} % % \clearpage % % \section{Introduction} % \label{sec: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 \HTMLfive\ % interpretation, with only minor intervention on the user's part. % No attempt has been made to force \LaTeX{} to provide for every % \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 \HTML\ conversion. % % Several ``modern'' features of \HTMLfive, \CSSthree, and \SVG\ % are employed to allow a fairly feature-rich document % without relying on the use of \brand{Javascript}. % Limited testing on older browsers shows that these new features % degrade gracefully. % % \rulebreak % % \pkg{lwarp} is a native \LaTeX\ package, and operates by either patching or % emulating various functions. Source-level compatibility is a major goal, but % occasional user intervention is required in certain cases. % % As a package running directly in \LaTeX, \pkg{lwarp} has some advantages over % other methods of \HTML\ conversion. \TeX\ itself is still used, allowing a % wider range of \TeX\ trickery to be understood. % Lua expressions are still available with \LuaTeX. % Entire categories of % \LaTeX\ packages work as-is when used with \pkg{lwarp}: % definitions, file handling, utilities, internal data structures and calculations, % specialized math-mode typesetting for various fields of science and engineering, % and anything generating plain-text output. % Blocks of \PDF\ output may be automatically converted to \SVG\ images % while using the same font and spacing as the original print document, % directly supporting \TikZ\ and \env{picture}. % Numerous packages are easily adapted for \HTML\ versions, either % by loading and patching the originals, or by creating nullified or emulated % replacements, and all without resorting to external programming. % As a result, several hundred packages have already been adapted (\cref{tab:supported}), and % an uncounted number more work as-is. % % Packages have been selected according to several criteria: perceived importance, % popularity lists, recent CTAN updates, CTAN topics, mention in other packages, % support by other \HTML\ conversion methods, % and from sample documents taken from public archives. % These include some ``obsolete'' packages as well.\footnote{An amazing number of % decades-old packages are still in use today.} % % \rulebreak % % Assistance is also provided for modifying the \HTML\ output to suit the creation % of \EPUB\ documents, and for modifying the \HTML\ output to ease import into % a word processor. % % \rulebreak % % \prog{pdflatex}, \prog{xelatex}, or \prog{lualatex} may be used, % allowing \pkg{lwarp} to process the usual image formats. % While generating \HTML\ output, \SVG\ files are used in place of \PDF. % Other formats such as \PNG\ and \JPG\ are used as-is. % % \SVG\ images may be used for math, % and are also used for \env{picture}, \TikZ, and similar environments. % The \SVG\ format has better browser and e-book support % than \MathML\ (as of this writing), % while still allowing for high-quality display and printing of images % (again, subject to potentially % bug-ridden\footnote{\brand{Firefox} has had an on-again/off-again bug % for quite some time regareding printing \SVG{}s at high resolution.} browser % support). % % Furthermore, \SVG\ images allow math to be presented with % the same precise formatting as in the print version. % Math is accompanied by \element{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 % \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. % An MD5 hash is used to combine multiple instances of the same inline math expression % into a single image file, which then needs to be converted to \SVG\ only a single time. % % The \MathJax\ JavaScript display engine may be selected % for math display instead of using \SVG\ images. % Subject to browser support and Internet access, % \MathJax\ allows an \HTML\ page to display % math without relying on a large number of % external image files.\footnote{One \SVG\ image % file per math expression, except that duplicate inline math expressions are combined % into a single file according to the MD5 hash function of its contents. % A common scientific paper can easily include several thousand files, % and in one case the MD5 hash cut the number of files in half and the rendering % time by 30\%.} % \pkg{lwarp} maintains \LaTeX\ control for cross-referencing % and equation numbering, and attempts to force \MathJax\ to tag equations accordingly. % % \rulebreak % % A \prog{texlua} program called \prog{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 \PDF\ file which happens to have \HTMLfive\ tags, % to a number of \HTMLfive\ plain-text files and accompanying images. % % \pkg{lwarp} automatically generates the extra files necessary for % the \HTML\ conversion, such as \CSS\ and |.xdy| files, and configuration files % for the utility \prog{lwarpmk}. % Also included is a parallel version of the user's source document, % |-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 \HTML\ conversion, % \pkg{lwarp} first looks to see if it has its own modified version % to use instead of the standard \LaTeX\ version. % These |lwarp-packagename.sty| files contain % code used to emulate or replace functions for \HTML\ output. % % % \clearpage % % \subsection{Typesetting conventions} % % Font weight, family, and style are used to indicate various objects: % % \begin{table}[hbp] % \caption{Typesetting conventions} % \centering % \begin{tabular}{lp{3in}} % \toprule % \pkg{package} & \LaTeX\ package. \\ % \prog{program} & Program's executable name. \\ % \optn{option} & Program or package option. \\ % \midrule % \filenm{filename} & File name in the operating system. \\ % \brand{Brand Name} & Proper name for a program, operating system, etc. \\ % \midrule % \cmds{commands} & Commands to be entered by the user. \\ % \progcode{code} & Program code. \\ % \cs{macroname} & \LaTeX\ macro. \\ % \env{environment} & \LaTeX\ environment. \\ % \ctr{counter} & \LaTeX\ counter. \\ % \bool{boolean} & \LaTeX\ boolean. \\ % \midrule % \element{element} & \HTML\ element. \\ % \attribute{attribute} & \HTML\ attribute. \\ % \midrule % \UI{User Interface} & A user-interface item. \\ % \acro{ACRO} & Acronym. \\ % \bottomrule % \end{tabular} % \end{table} % % \maindocumentationnotes % % \clearpage % % \subsection{Supported packages and features} % % \changes{v0.15}{2016/04/05}{Docs: Moved the supported features table to the introduction.} % \changes{v0.38}{2017/08/22}{Docs: Enhanced \protect\textit{Supported Features} table.} % % \Cref{tab:supported} lists some of the various \LaTeX{} features and packages % which may be used. % % % Package names are colored according to their support level: % \begin{description} % \item[\spkg{name}:] Supported as-is. % \item[\mpkg{name}:] Modifed to work with \HTML\ output, and perhaps also % as print output in \SVG\ math or \env{lateximage} environments. % \item[\epkg{name}:] Emulated for \HTML\ output. % \item[\ipkg{name}:] Ignored for \HTML\ output, but provides source-level compatibility. % \item[\sjax:] Supported as-is for \MathJax, subject to limitations. % \item[\ejax:] Emulated for \MathJax\ using custom macros, subject to limitations. % \item[\ijax:] Ignored by \MathJax, but may be used in the document source. % May be converted to \SVG\ images. % \end{description} % % \renewcommand{\arraystretch}{1.5} % % \begingroup % \setlength{\parindent}{0em} % \setlength{\parskip}{2ex} % % ^^A *supported features % % \begin{longtable}{>{\raggedright}p{.3\linewidth}p{.6\linewidth}} % \caption{\LaTeX\ \pkg{lwarp} package --- Supported features\label{tab:supported}} \endfirsthead % \warpprintonly{\multicolumn{2}{c}{\pkg{lwarp} Supported Functions --- continued} \\ % Category & Status \\ \toprule \endhead} % % \toprule % % Category & Status and supported features. \\ % % \midrule % % Engines: & \dviLaTeX, \pdfLaTeX, \XeLaTeX, \LuaLaTeX, up\LaTeX \\ % % \LaTeX\ compiling: & \prog{latexmk}, \prog{make}, etc. \\ % % External compiling: & \prog{perltex}, \prog{pythontex}, \mpkg{sympytex} \\ % % \midrule % % Classes: & \pkg{article}, \pkg{book}, \pkg{report}, % \pkg{scrartcl}, \pkg{scrbook}, \pkg{scrreprt}, \pkg{memoir}, % CJK-related as listed below. \\ % % Koma-script: & \epkg{scrextend}, \ipkg{scrhack}, \epkg{scrlayer}. % Others as listed below. \\ % % Memoir: & \ipkg{memhfixc} \\ % % Beamer: & \mpkg{beamerarticle}, but not the \pkg{beamer} class. \\ % % \midrule % % Languages: & \spkg{babel}, \spkg{cjkpunct}, \ipkg{impnattypo}, \mpkg{luavlna}, % \spkg{polyglossia}, \spkg{xeCJK}, \mpkg{xevlna}. \\ % % Chinese: & C\TeX, \spkg{ctex}, % \spkg{upzhkinsoku}, % \mpkg{xpinyin}, \ipkg{zhlineskip}, \spkg{zhspacing}. \\ % % Japanese: & up\LaTeX, Lua\TeX-ja, \ipkg{gentombow}, \mpkg{lltjext}, % \spkg{plarray}, \epkg{plarydshln}, \spkg{plautopatch}, % \mpkg{plext}, \spkg{plextarray}, \epkg{plextarydshln}, % \epkg{plextcolortbl}, \spkg{plextdelarray}, \ipkg{pxatbegshi}, % \ipkg{pxeveryshi}, \ipkg{pxftnright}, \spkg{pxgentombow}, % \ipkg{pxjahyper}, \spkg{pxpdfpages}, \spkg{pxpgfrcs}, \spkg{pxpgfmark}, % \epkg{tascmac}, \spkg{zxjatype}. % \spkg{bxjsarticle} and related, % \spkg{ltjsarticle} and related, % \spkg{luatexja}, \spkg{luatexja-fontspec}, % \spkg{ujarticle} and related, % \spkg{utarticle} and related. \\ % % Korean: & \spkg{kotex}, \mpkg{luatexko}, \spkg{xetexko}. \\ % % \midrule % % Page layout: & \ipkg{2in1}, \ipkg{2up}, \ipkg{a4}, \ipkg{a4wide}, \ipkg{a5comb}, % \ipkg{addlines}, \ipkg{anysize}, \mpkg{atbegshi}, \ipkg{balance}, % \ipkg{blowup}, \ipkg{booklet}, \ipkg{bophook}, \ipkg{bounddvi}, % \ipkg{bxpapersize}, % \ipkg{canoniclayout}, \ipkg{centerlastline}, \mpkg{changelayout}, % \epkg{changepage}, \ipkg{chngpage}, \ipkg{clrdblpg}, % \ipkg{continue}, \ipkg{draftcopy}, \ipkg{draftfigure}, \ipkg{draftwatermark}, % \ipkg{ebook}, \ipkg{everyshi}, % \mpkg{fancyhdr}, \ipkg{fancytabs}, \ipkg{flippdf}, % \ipkg{fullminipage}, \ipkg{fullpage}, % \ipkg{fwlw}, \ipkg{geometry}, \ipkg{gmeometric}, % \ipkg{grid}, \mpkg{grid-system}, \ipkg{gridset}, % \ipkg{layaureo}, \ipkg{layout}, \ipkg{layouts}, \ipkg{leading}, \ipkg{lscape}, % \ipkg{ltxgrid}, \ipkg{nccfancyhdr}, \ipkg{notespages}, \ipkg{nowidow}, % \ipkg{pagegrid}, \ipkg{pagesel}, \epkg{parallel}, \epkg{parcolumns}, % \ipkg{pbalance}, % \ipkg{pdfcolparallel}, \ipkg{pdfcolparcolumns}, \ipkg{pdfcrypt}, % \ipkg{pdflscape}, \ipkg{pdfprivacy}, % \ipkg{preview}, \epkg{ragged2e}, \ipkg{returntogrid}, \ipkg{rmpage}, % \epkg{scrlayer-scrpage}, \epkg{scrpage2}, \epkg{setspace}, \ipkg{selectp}, % \ipkg{textarea}, \ipkg{threadcol}, % \ipkg{thumb}, \ipkg{thumbs}, \ipkg{titleps}, \ipkg{tocenter}, % \ipkg{turnthepage}, \ipkg{twoup}, \ipkg{typearea}, % \ipkg{underlin}, \ipkg{vmargin}, % \ipkg{watermark}, \ipkg{widows-and-orphans}, \ipkg{zwpagelayout}. % \\ % % \midrule % % Sectioning: & Adds \progcode{FileDepth} for splitting the \HTML\ output. % Files may be numbered sequentially or named according to section name. % Common short words and punctuation are removed from the filenames. % \epkg{anonchap}, \ipkg{bsheaders}, \mpkg{decorule}, \ipkg{fncychap}, % \mpkg{froufrou}, \epkg{hypbmsec}, % \epkg{indentfirst}, \epkg{quotchap}, % \ipkg{section}, \mpkg{sectionbreak}, \spkg{secdot}, \ipkg{sectsty}, % \ipkg{titlesec}, \spkg{tocvsec2}. % \\ % % Table of contents, figures, tables: & Supported, with hyperlinks. % \ipkg{etoc}, \ipkg{minitoc}, \ipkg{multitoc}, \spkg{shorttoc}, % \spkg{tableof}, \ipkg{titletoc}, % \ipkg{tocbasic}, \mpkg{tocbibind}, \mpkg{tocdata}, % \ipkg{tocloft}, \ipkg{tocstyle}, \spkg{tocvsec2}. \\ % % Title page: & \cs{maketitle}, \env{titlepage}, \mpkg{authblk}, % \spkg{authoraftertitle}, \mpkg{titling}. \\ % % Front \&\ back matter: & \mpkg{abstract}, \mpkg{appendix}. \\ % % Indexing: & \prog{makeindex}, \prog{xindy}, and \prog{xindex} are supported, % with hyperlinks. % % \smallskip % % \mpkg{gindex}, \spkg{hvindex}, \epkg{idxlayout}, \mpkg{imakeidx}, % \epkg{index}, \mpkg{makeidx}, % \epkg{repeatindex}, \mpkg{splitidx}, \spkg{varindex}, \spkg{xindex}. % \\ % % Glossary: & \mpkg{gloss}, \mpkg{glossaries} and \prog{xindy}, \mpkg{nomencl}.\\ % % Bibliography: & \spkg{babelbib}, \spkg{bibtopic}, \mpkg{backref}, % \mpkg{biblatex}, \mpkg{bibunits}, % \mpkg{chapterbib}, \mpkg{cite}, \mpkg{citeref}, \spkg{collref}, \mpkg{drftcite}, % \ipkg{hypernat}, \mpkg{jurabib}, \spkg{mcite}, \spkg{mciteplus}, \mpkg{multibib}, % \mpkg{natbib}, \spkg{notes2bib}, \mpkg{splitbib}, \ipkg{showtags}. % % \\ % % \midrule % % Cross-references: & % \ipkg{bookmark}, \epkg{breakurl}, \spkg{cleveref}, \mpkg{fancyref}, % \ipkg{hypdestopt}, \epkg{hyperref}, \epkg{perpage}, \mpkg{prettyref}, % \epkg{titleref}, \mpkg{url}, \mpkg{varioref}, \spkg{xcite}, % \mpkg{xr}, \mpkg{xr-hyper}, \ipkg{xurl}, \spkg{zref}. \\ % % \midrule % % Margin notes: & \ipkg{marginal}, \ipkg{marginfit}, \ipkg{marginfix}, % \epkg{scrlayer-notecolumn}, \epkg{versonotes}. \\ % % Footnotes: & Adds \progcode{FootnoteDepth} to print footnotes at section breaks. % \MathJax\ emulation for \cs{footnote}, and also as marked in the following: % \epkg{bigfoot}, \ipkg{dblfnote}, % \ipkg{endheads}, \mpkg{endnotes}\ejax, \mpkg{enotez}\ejax, \spkg{fixfoot}, % \ipkg{fnbreak}, \ipkg{fnpara}, \spkg{fnpct}, \ipkg{fnpos}, % \epkg{footmisc}, \mpkg{footnote}, \ipkg{footnotebackref}, % \mpkg{footnoterange}, \ipkg{footnpag}, \epkg{manyfoot}, % \epkg{marginnote}\ejax, \spkg{nccfoots}\ejax, \spkg{pagenote}\ejax, % \mpkg{parnotes}\ejax, \ipkg{pdfcolfoot}, \ipkg{pfnote}, \spkg{sepfootnotes}, % \mpkg{sidenotes}\ejax, \ipkg{tablefootnote}. % \\ % % \midrule % % Math: & Converted to \SVG\ images with \HTML\ \element{alt} tags containing the % \LaTeX\ source for the math expression. % \MathJax\ supported as an alternative. % \mpkg{amsmath}\ejax: \AmS\ environments are supported. % User-defined macros are available during converson, % due to native \LaTeX\ processing.\\ % % Theorems: & Native \LaTeX\ theorems, % \mpkg{amsthm}, \mpkg{apxproof}, \mpkg{ntheorem}, \mpkg{shadethm}, % \mpkg{theorem}, \mpkg{thmbox}, \mpkg{thmtools}. \\ % % Additional math: & Math fonts via \SVG\ images, % \spkg{accents}\ejax, \spkg{amscd}\sjax, \spkg{amscdx}, \spkg{autobreak}\ejax, \ipkg{autonum}, % \mpkg{backnaur}\ejax, \mpkg{bm}\ejax, \spkg{braket}\sjax, % \mpkg{breqn}\ijax, \mpkg{bussproofs}\sjax, \mpkg{cases}\ijax, % \spkg{centernot}\sjax, \spkg{cmbright}\ejax, % \spkg{colonequals}\ejax, \spkg{decimal}\ejax, % \spkg{delarray}, \mpkg{DotArrow}\ejax, \spkg{dotlessi}\ejax, \spkg{dotlessj}\sjax, % \spkg{esvect}\ejax, \spkg{extarrows}\ejax, \spkg{fixmath}\ejax, % \spkg{fouridx}\ejax, \spkg{fourier}\ejax, % \spkg{guass}, \spkg{hhtensor}\ejax, \spkg{icomma}\ijax, % \spkg{isomath}\ejax, \spkg{jkmath}, % \spkg{kpfonts}\ejax, \spkg{kpfonts-otf}\ejax, % \spkg{leftidx}\ejax, \spkg{libertinust1math}\ejax, \spkg{mathalpha}\ejax, % \spkg{mathastext}\ejax, \spkg{mathcomp}\ejax, \spkg{mathdesign}\ejax, % \spkg{mathdots}\ejax, \spkg{mathfixs}\ejax, % \spkg{mathpazo}\ejax, \spkg{mathptmx}\ejax, % \spkg{mathpunctspace}\ijax, % \spkg{mathspec}\ejax, \mpkg{mathtools}\sjax, \spkg{mattens}\ejax, % \spkg{maybemath}\ijax, \spkg{mdwmath}\ejax, % \mpkg{mismath}\ejax, \spkg{mleftright}\ejax, % \spkg{multiobjective}\ejax, \mpkg{nccmath}\ejax, % \spkg{nicematrix}\ejax, \spkg{noitcrul}\ejax, % \spkg{newpxmath}\ejax, \spkg{newtxmath}\ejax, \spkg{newtxsf}\ejax, % \spkg{pb-diagram}, % \spkg{pxfonts}\ejax, % \ipkg{resizegather}\ijax, \spkg{rmathbr}\ejax, \spkg{scalerel}\ejax, % \epkg{shuffle}\ejax, \spkg{skmath}\ejax, \spkg{stackrel}\ejax, % \mpkg{statex2}\ejax, \mpkg{statistics}, \spkg{statmath}\ejax, % \spkg{subsupscripts}\ejax, \spkg{tensind}, \spkg{tensor}\ejax, % \spkg{textualicomma}\ijax, % \spkg{txfonts}\ejax, \spkg{txgreeks}\ejax, % \spkg{unicode-math}\ejax, \spkg{upgreek}\sjax, % \spkg{ushort}\ejax, \mpkg{witharrows}\ejax, % \mpkg{xfakebold}\ejax, \mpkg{xy}. % Many others work as-is. \\ % % Display math with \cs{displaymathother}: & % % Complicated math objects in display math, such as \spkg{tikz-cd}, etc. \\ % % \midrule % % Units and fractions: & % \mpkg{nicefrac}\ejax, \mpkg{SIunits}\ejax, \mpkg{siunitx}\ejax, % \mpkg{units}\ejax, \mpkg{unitsdef}, \mpkg{xfrac}\ejax. \\ % % \midrule % % Floats: & Appear where declared. % \spkg{capt-of}, \mpkg{caption}, \epkg{cutwin}, % \ipkg{dblfloatfix}, \ipkg{endfloat}, \ipkg{fewerfloatpages}, % \ipkg{fix2col}, \ipkg{flafter}, % \epkg{float}, \epkg{floatflt}, \epkg{floatrow}, \ipkg{fltrace}, \ipkg{ftcap}, % \ipkg{hypcap}, \mpkg{keyfloat}, \ipkg{morefloats}, \ipkg{multicap}, \spkg{newfloat}, % \epkg{nonfloat}, \mpkg{picinpar}, \ipkg{placeins}, \epkg{rotfloat}, \ipkg{stfloats}, % \mpkg{subcaption}, \mpkg{subfig}, \epkg{subfigure}, \spkg{subfloat}, % \epkg{swfigure}, % \epkg{topcapt}, \epkg{trivfloat}, \epkg{wrapfig}, \epkg{wrapfig2}. \\ % % \midrule % % Tabular: & % \env{tabular} environment, \mpkg{array}\ejax, \epkg{arydshln}\ejax, % \mpkg{bigdelim}\ejax, \mpkg{bigstrut}\ejax, \mpkg{booktabs}\ejax, % \mpkg{colortbl}\sjax, \mpkg{ctable}, \mpkg{dcolumn}, \mpkg{diagbox}, % \mpkg{hhline}\ejax, \epkg{longtable}, % \epkg{ltablex}, \epkg{ltxtable}, % \mpkg{multirow}\ejax, \epkg{supertabular}, \epkg{tabularx}, \epkg{tabulary}, % \epkg{threeparttable}, \mpkg{threeparttablex}, % \epkg{widetable}, \epkg{xltabular}, \epkg{xtab}. \\ % % \midrule % % Graphics: & \mpkg{graphics} and \epkg{graphicx}. % \cs{includegraphics} supports \optn{width}, \optn{height}, % \optn{origin}, \optn{angle}, and \optn{scale} tags, and adds \optn{class}. % 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 \HTML\ can handle. % \epkg{rotating} is emulated but all objects are unrotated in \HTML. % \env{picture}, \mpkg{tikz}, and \mpkg{xy} are converted to an \SVG\ image. % % \smallskip % % \mpkg{asymptote}, \spkg{curves}, \spkg{datatool}, % \spkg{eepic}, \mpkg{epsf}, \epkg{epsfig}, \spkg{epstopdf}, % \epkg{figsize}, \ipkg{fitbox}, % \spkg{grffile}, \mpkg{lpic}, \mpkg{luamplib}, \epkg{media9}, % \epkg{movie15}, \epkg{multimedia}, \mpkg{overpic}, \spkg{pict2e}, \mpkg{pinlabel}, % \mpkg{psfrag}, \mpkg{psfragx}, \mpkg{pst-eps}, \mpkg{pstool}, \mpkg{pstricks}, % \mpkg{rlepsf}, % \spkg{rviewport}, \mpkg{svg}, \spkg{svg-extract}, \mpkg{tikz}, \spkg{tikz-3dplot}, % \mpkg{tikz-imagelabels}, \mpkg{xy} \\ % % \midrule % % \mpkg{xcolor}: & \textcolor{DarkGreen}{Full package color names}, any color models, % and \textcolor{red!70!black}{mixing}. % \textcolor{blue}{\cs{textcolor}}, % \colorbox{LightSteelBlue}{\cs{colorbox}}, % \fcolorbox{red}{NavajoWhite}{\cs{fcolorbox}}. % Enhanced for \HTML\ compatibility. \\ % % \midrule % % Lists: & Standard \LaTeX\ environments, % \spkg{enumerate}, \mpkg{enumitem}, \epkg{eqlist}, \epkg{hang}, % \ipkg{listliketab}, \mpkg{paralist}.\\ % % \midrule % % Environments: & Standard \LaTeX{} environments. \\ % % Paragraphs, \env{minipage}, \cs{parbox}: & Some \HTMLfive-imposed limitations. % Nested minipages are supported. \mpkg{eqparbox}, \mpkg{fancypar}, % \mpkg{minibox}, \epkg{pbox}, % \ipkg{shapepar}. \\ % % Quotations: & \epkg{copyrightbox}, \spkg{csquotes}, \epkg{epigraph}, % \mpkg{quoting}, \mpkg{verse}. \\ % % Verbatim: & % \mpkg{fancyvrb}, \mpkg{fvextra}, \mpkg{moreverb}, \spkg{shortvrb}, \mpkg{verbatim}. \\ % % Frames: & \mpkg{boxedminipage}, \mpkg{boxedminipage2e}, % \mpkg{fancybox}, \mpkg{fbox}\ejax, \mpkg{framed}, \mpkg{mdframed}, % \epkg{niceframe}, \epkg{shadow}, \mpkg{tcolorbox}\ejax, \epkg{vertbars}. \\ % % Multi-columns: & \epkg{adjmulticol}, \epkg{multicol}, % \ipkg{multicolrule}, \mpkg{vwcol}. \\ % % Margins: & \epkg{fullwidth}, \epkg{hanging}, \epkg{midpage}. \\ % % Line numbering: & \ipkg{fnlineno}, \ipkg{lineno}. \\ % % \midrule % % Direct formatting: & \cs{emph}, \cs{textsuperscript}, % \cs{textbf}, etc are supported. % \cs{bfseries}, etc.\ are only supported in some cases. % \mpkg{cancel}\sjax, \epkg{ellipsis}, \mpkg{embrac}, \spkg{enparen}, % \ipkg{hyphenat}, \epkg{lettrine}, \epkg{lips}, % \ipkg{lua-check-hyphen}, \ipkg{luacolor}, \epkg{magaz}, \ipkg{moresize}, % \epkg{nolbreaks}, \ipkg{normalcolor}, % \ipkg{pdfcol}, \ipkg{pdfcolmk}, % \ipkg{pdfrender}, \mpkg{realscripts}, \mpkg{relsize}\ejax, % \ipkg{scalefnt}, \mpkg{seqsplit}\ejax, \epkg{soul}, \epkg{soulpos}, % \epkg{soulutf8}, \mpkg{stackengine}, % \epkg{textfit}, \epkg{thinsp}, \ipkg{trimclip}, \ipkg{truncate}, % \mpkg{ulem}, \mpkg{umoline}, \ipkg{underscore}, \ipkg{uspace}, % \mpkg{xellipsis}. \\ % % Acronyms: & \mpkg{acro}, \mpkg{acronym}. \\ % % Ordinals: & \spkg{engord}, \spkg{fmtcount}, \spkg{nth}. \\ % % Text ligatures: & Ligatures for symbols are supported. % Ligatures for f, q, t are intentionally turned off % because many simpler browsers do not display them correctly. % Modern full-featured browsers re-create these ligatures on-the-fly.\\ % % Horizontal space: & % \HTML\ output for thin-unbreakable, unbreakable, % \cs{enskip}, \cs{quad}, \cs{qquad}, \cs{hspace}. \\ % % Rules: & \cs{rule} with width, height, raise, text color. \\ % % \HTML\ reserved characters: & \cs{\&}, \cs{textless}, and % \cs{textgreater} are converted to \HTML\ entities. \\ % % \midrule % % Fonts: & Used as-is. % Appear in \SVG\ math expressions or embedded image environments. % \mpkg{fontaxes}, \mpkg{nfssext-cfr}, \mpkg{slantsc}, \ipkg{tabfigures}. % % \smallskip % % Tested to work as-is: Special font macros in \spkg{cfr-lm} and others % which use \spkg{nfssext-cfr}. % % \smallskip % % Also see the math section for math and \MathJax\ support for math font packages. \\ % % Symbols: & Native \LaTeX\ diacriticals, \mpkg{academicons}, \spkg{amssymb}\sjax, % \mpkg{bbding}, \mpkg{ccicons}, % \mpkg{chemgreek}, \mpkg{dingbat}, \spkg{euro}, \mpkg{eurosym}, % \mpkg{fontawesome}, \mpkg{fontawesome5}, \spkg{gensymb}\sjax, \spkg{latexsym}\sjax, % \mpkg{marvosym}, % \mpkg{metalogo}, \mpkg{metalogox}, % \mpkg{pifont}, % \spkg{textalpha}, % \mpkg{textcomp}\sjax, \spkg{textgreek}, % \mpkg{typicons}, % \mpkg{xunicode}. % \\ % % \midrule % % Files: & % \mpkg{attachfile}, \mpkg{attachfile2}, \ipkg{hyperxmp}, % \mpkg{inputtrc}, \epkg{intopdf}, % \mpkg{pdfpages}, \ipkg{pdfx}, \ipkg{xmpincl}. \\ % % \midrule % % Science and engineering: & % \mpkg{algorithm2e}, \mpkg{algorithmicx}, \mpkg{ar}\ejax, \spkg{askmaps}, % \mpkg{axodraw2}, \mpkg{bitpattern}, \spkg{blochsphere}, \spkg{bodegraph}, % \spkg{bohr}, \mpkg{bytefield}, % \mpkg{chemfig}, \mpkg{chemformula}, \mpkg{chemgreek}, % \mpkg{chemmacros}, \mpkg{chemnum}, \spkg{circuitikz}, % \mpkg{doipubmed}, \spkg{econometrics}\ejax, \spkg{elements}, % \mpkg{engtlc}\ejax, \spkg{fast-diagram}, \mpkg{ghsystem}, % \spkg{hepnicenames}, \spkg{heppennames}, \spkg{hepunits}\ejax, % \mpkg{isotope}\ejax, % \spkg{karnaughmap}, \mpkg{karnaugh-map}, \mpkg{keystroke}, % \mpkg{listings}, \spkg{listingsutf8}, \spkg{linop}, \mpkg{menukeys}, % \mpkg{mhchem}\sjax, \mpkg{minted}, \spkg{pgfgantt}, % \mpkg{phfqit}, \spkg{physics}\sjax, \spkg{physunits}\ejax, % \spkg{plimsoll}\ejax, \spkg{qcircuit}, % \mpkg{register}, \mpkg{simplebnf}, \spkg{simpler-wick}, % \spkg{slashed}\ejax, \mpkg{steinmetz}\ejax, \spkg{structmech}, \mpkg{struktex}, % \spkg{syntaxdi}, % \spkg{tikz-karnaugh}, \spkg{tikzcodeblocks}, \spkg{venndiagram} \\ % % \midrule % % Arts and humanities: & \mpkg{foreign}, \mpkg{forest}, % \mpkg{lyluatex}, \mpkg{musicography}, % \mpkg{nameauth}, \mpkg{octave}, \spkg{phonrule}, \spkg{piano}, % \mpkg{schemata}, \mpkg{semantic-markup}, \spkg{tikz-dependency}, % \mpkg{vowel}, \mpkg{xpiano} \\ % % \midrule % % Academic: & \mpkg{academicons}, \epkg{classicthesis}, \spkg{doi}, % \spkg{doipubmed}, \mpkg{orcidlink}\ijax, \mpkg{termcal} \\ % % \midrule % % Admonitions: & \epkg{awesomebox}, \epkg{notes}. \\ % % Editorial: & \ipkg{changebar}, \spkg{changelog}, \mpkg{changes}, % \mpkg{easy-todo}, \spkg{easyReview}, \mpkg{ed}, \mpkg{errata}, \mpkg{fixme}, % \mpkg{fixmetodonotes}, % \ipkg{pdfcomment}\ejax, \ipkg{pdfmarginpar}, % \mpkg{todo}, \mpkg{todonotes}, \epkg{tram}, \ipkg{xechangebar}. % \\ % % \midrule % % Accessibility: & \epkg{accessibility}\ijax, \ipkg{accsupp}\ijax, % \ipkg{axessibility}\ijax, % \ipkg{pdfcomment}\ijax, \ipkg{repltext}\ijax, \mpkg{tagpdf}. \\ % % \midrule % % Package handling: & \spkg{catoptions}. \\ % % Debug: & \ipkg{chkfloat}, \ipkg{cmdtrack}, \ipkg{dprogress}, \mpkg{lipsum}, % \ipkg{lua-visual-debug}, \mpkg{mwe}, \ipkg{refcheck}, % \ipkg{showlabels}, \ipkg{showkeys}, % \ipkg{srcltx}, \ipkg{srctex}, \ipkg{vpe}, \ipkg{xbmks}. \\ % % \midrule % % Working as-is: & % Various utility, calculation, file, and text-only packages, such as % \spkg{calc}, % \spkg{fileerr}, % \spkg{somedefs}, % \spkg{trace}, % \spkg{xspace}. % Also, most math-only packages, including specialized typesetting for % various fields of science and engineering. \\ % % \bottomrule % % \end{longtable} % % \endgroup % % % % \clearpage % % \section{Alternatives} % % 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. % % \subsection{\pkg{internet} class} % % \changes{v0.21}{2017/02/15}{Docs: Added \pkg{internet} class.} % % The closest to \pkg{lwarp} in design principle is the % \DescribeClass{internet} % \verb+internet+ class by Andrew Stacey \Dash % an interesting project which directly produces several versions % of markdown, and also \HTML\ and \EPUB. % \url{https://github.com/loopspace/latex-to-internet} % % % % \subsection{\brand{TeX4ht}} % % \url{http://tug.org/tex4ht/}\DescribeProgram{TeX4ht}\DescribeProgram{htlatex} % % \bigskip\noindent % This system uses native \LaTeX{} processing to produce a \DVI\ file containing special commands, % and then uses additional post-processing for the \HTML\ conversion by way of numerous configuration % files. % 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 \HTML, including \ODT\ and % a direct path to \EPUB, and is still being developed. % % \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 \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)} % \item [T\textsubscript{T}H:] \url{http://hutchinson.belmont.ma.us/tth/} % \DescribeProgram{TtH} % \item [GELLMU:] \url{http://www.albany.edu/~hammond/gellmu/} % \DescribeProgram{GELLMU} % \item [\LaTeX{}ML:] \url{http://dlmf.nist.gov/LaTeXML/} % \DescribeProgram{LaTeXML} % \item [PlasTeX:] \url{https://github.com/tiarno/plastex} % \DescribeProgram{Plastex} % \item [\LaTeX2HTML:] \url{http://www.latex2html.org/} % \DescribeProgram{LaTeX2HTML} \\ % 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 \HTML: % \begin{description} % \item [Glad\TeX:] \url{http://humenda.github.io/GladTeX/} \DescribeProgram{GladTeX} % \end{description} % % \subsection{\brand{AsciiDoc} and \brand{Asciidoctor}} % % 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 \HTML. % \begin{description} % \item [Asciidoctor:] \url{http://asciidoctor.org/} (More active.)\DescribeProgram{AsciiDoc} % \item [AsciiDoc:] \url{http://asciidoc.org/} (The original project.)\DescribeProgram{AsciiDoctor} % \end{description} % % \subsubsection{\brand{Asciidoctor-\LaTeX}} % The Asciidoctor-LaTeX project is developing additional \LaTeX{}-related features. % \begin{description} % \item [Asciidoctor-LateX:] ~ \\ % \url{http://www.noteshare.io/book/asciidoctor-latex-manual} \\ % \url{https://github.com/asciidoctor/asciidoctor-latex} % \DescribeProgram{Asciidoctor-LaTeX} % \end{description} % % \subsection{\brand{Pandoc}} % \DescribeProgram{Pandoc} % A markup system which also reads and writes \LaTeX{} and \HTML. % \begin{description} % \item [Pandoc:] \url{http://pandoc.org/} % \end{description} % % (Watch for improvements in cross-references to figures and tables.) % % \subsection{Word processors} % % It should be noted that the popular word processors % \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. % See recent developments in \brand{Microsoft}\,\supregistered\ \prog{Word}\,\supregistered{} % and \brand{LibreOffice}\,\texttrademark\ \prog{Writer}. % % \subsection{Commercial systems} % % 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. % See \brand{Adobe}\,\supregistered{} \prog{FrameMaker}\,\supregistered{}, % \brand{Adobe} \prog{InDesign}\,\supregistered, % and \brand{Madcap} \prog{Flare}\,\texttrademark. % % \subsection{Comparisons} % \gindex{markup languages} % % AsciiDoc, Pandoc, and various other markup languages typically have a syntax which tries to be % natural and human-readable, but the use of advanced features tends to require % many combinations of special characters, resulting in a complicated mess of syntax. % By contrast, \LaTeX{} spells things out in readable words but takes longer to type, although % integrated editors exist which can provide faster entry and a graphic user interface. % For those functions which are covered by the typical markup language % it is arguable that \LaTeX{} is comparably easy to learn, while \LaTeX{} provides many more advanced % features where needed, along with a large number of pre-existing packages which provide solutions % to numerous common tasks. % % Text-based document-markup systems share some of the advantages of \LaTeX{} vs.\ a typical word % processor. Documents formats are stable. The documents themselves are portable, % work well with revision control, % do not crash or become corrupted, and are easily generated under program control. % Formatting commands are visible, % cross-referencing is automatic, and editing is responsive. % Search/replace with regular expressions provides a powerful tool for % the manipulation of both document contents and structure. % Markup systems and some commercial systems allow printed output % through a \LaTeX{} back end, yielding high-quality results especially when the \LaTeX{} % template is adjusted, but they lose the ability to use \LaTeX{} macros and % other \LaTeX{} source-document features. % % 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 \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 % through the usual \LaTeX\ optional macro parameters, % but further customization may require patching \LaTeX{} code. % % The popular word processors and professional document systems each has a large % base of after-market support including pre-designed styles and templates, and often include % content-management systems for topic reuse. % % % % % \clearpage % % \setlength{\parindent}{0em} % \setlength{\parskip}{2ex} % % \section{Installation} % % \Cref{tab:utility} shows the tools which are used for % the \LaTeX\ to \HTML\ conversion. % In most cases, these will be available via the % standard package-installation tools. % % Detailed installation instructions follow. % % \gindex{utility>programs} % \gindex{programs>utility} % % \begin{table}[hbp] % \changes{v0.45}{2017/11/30}{Docs: Moved table so doesn't interfere with install docs.} % \caption{Required software programs\label{tab:utility}} % \hrule % \begin{description} % % \item[Provided by your \LaTeX\ distribution:] \ % % From \TeX{}Live: \url{http://tug.org/texlive/}. % % \begin{description} % % \item[\LaTeX:] \prog{pdflatex}, \prog{xelatex}, or \prog{lualatex}. % \DescribeProgram[requirement]{pdfLaTeX} % \DescribeProgram[requirement]{XeLaTeX} % \DescribeProgram[requirement]{LuaLaTeX} % % \item[The \pkg{lwarp} package:] This package. % % \item[The \prog{lwarpmk} utility:] Provided along with this package. This % should be an operating-system executable in the same way that % \prog{pdflatex} or \prog{latexmk} is. It is possible to have the % \pkg{lwarp} package generate a local copy of \prog{lwarpmk} % called \filenm{lwarpmk.lua}. % See \cref{sec:genlatexmk}. % % \item[\prog{luatex}:] Used by the \prog{lwarpmk} program to simplify and automate document generation. % % \item [\prog{xindy}:] The \prog{xindy} program is used by \pkg{lwarp} to create % indexes. On a MiK\TeX\ system this may have to be acquired separately, % but it is part of the regular installer as of mid 2015. % % \item[\prog{latexmk}:] Optionally used by \prog{lwarpmk} to compile \LaTeX\ code. % On a MiK\TeX\ system, \prog{Perl} may need to be installed first. % % \item[\prog{pdfcrop}:] Used to pull images out of the \LaTeX{} \PDF. % \DescribeProgram[requirement]{pdfcrop} % % \end{description} % % \item[\brand{Poppler} \PDF\ utilities:] \ % % \begin{description} % % \item[\prog{pdftotext}:] Used to convert \PDF\ to text. % \DescribeProgram[requirement]{pdftotext}\gindex{Poppler=\brand{Poppler}} % % \item[\prog{pdfseparate}:] Used to pull images out of the \LaTeX{} \PDF. % \DescribeProgram[requirement]{pdfseparate} % % \item[\prog{pdftocairo}:] Used to convert images to \SVG. % \DescribeProgram[requirement]{pdftocairo} % % \end{description} % % These might be provided by your operating-system package manager, % and MiK\TeX\ provides \pkg{miktex-poppler-bin-*} packages. % % From \brand{Poppler}: \url{poppler.freedesktop.org}. % % For \brand{MacOS}\supregistered, see % \url{https://brew.sh/}, install \prog{Homebrew}, then % \userentry{brew install poppler} % % For \brand{Windows}, see Mik\TeX\ \pkg{miktex-poppler-bin-*}, or: \\ % \url{https://sourceforge.net/projects/poppler-win32/} \quad and: \\ % \url{http://blog.alivate.com.au/poppler-windows/} % % \item[\prog{Perl}:] \ % % This may be provided by your operating-system package manager, and may be % required for some of the \brand{Poppler} \PDF\ utilities. % % \url{strawberryperl.com} (recommended), \url{perl.org} % % \item[Automatically downloaded from the internet as required:] \ % \begin{description} % % \item[\MathJax:] Optionally used to display math. % From: \url{mathjax.org} % \DescribeProgram[requirement]{MathJax} % % \end{description} % \end{description} % % \hrule % \end{table} % \clearpage % % \subsection{Installing the \pkg{lwarp} package} % % There are several ways to install \pkg{lwarp}. These are listed here % with the preferred methods listed first: % % \begin{description} % \raggedright % % \item [Pre-installed:] Try entering into a command line: % \userentry{kpsewhich lwarp.sty} % % If a path to |lwarp.sty| is shown, then \pkg{lwarp} is already installed and % you may skip to the next section. % % \item [\TeX\ Live:] If using a \TeX\ Live distribution, % try installing via \prog{tlmgr}: % \userentry{tlmgr install lwarp} % % \item [MiK\TeX:] \ % \begin{enumerate} % \item For newer versions of MiK\TeX, install or update \pkg{lwarp} % using the \prog{MiKTeX Console} program. % \changes{v0.62}{2018/11/03}{Docs: \prog{MiKTeX Console}} % \item For older versions of MiK\TeX, % to install \pkg{lwarp} the first time, % use the \prog{MiKTeX Package Manager (Admin)}. % To update \pkg{lwarp}, use \prog{MiKTeX Update (Admin)}. % \item Either way, also update the package \pkg{miktex-misc}, which will install and % update the \prog{lwarpmk} executable. % \end{enumerate} % \changes{v0.26}{2017/03/23}{Docs: Improved MiK\TeX\ install instructions.} % \changes{v0.45}{2017/11/30}{Docs: Improved MiK\TeX\ install instructions.} % \changes{v0.62}{2018/11/03}{Docs: Improved MiK\TeX\ install instructions.} % % \item [Operating-system package:] The operating-system package manager may % already have \pkg{lwarp}, perhaps as part of a set of \TeX-related packages. % % \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 Find the \TeX\ |local| directory: % \begin{description} % \item[\TeX\ Live:] \ % % \userentry{kpsewhich -var-value TEXMFLOCAL} % \item[MiK\TeX:] \ % % In the \UI{Settings} window, \UI{Roots} tab, look for a local \TDS\ root. % \end{description} % This should be something like: % \begin{sourceverb} % /usr/local/texlive/texmf-local/ % \end{sourceverb} % \item Unpack the archive in the \TDS\ local directory. % \item Renew the cache: % \userentry{mktexlsr} \quad —\,or\,— % \userentry{texhash} % % Or, for \brand{Windows} MiK\TeX, start the program called \prog{MiKTeX Settings (Admin)} % and click on the button called \UI{Refresh FNDB}. % \end{enumerate} % % \item[CTAN \filenm{.dtx} and \filenm{.ins} files:] Another form of \TeX\ package % is |.dtx| and |.ins| source files. These files are used to create % the documentation and |.sty| files. % % \begin{enumerate} % \item See \url{http://ctan.org/pkg/lwarp} for the \pkg{lwarp} package. % \item Download the zip archive \filenm{lwarp.zip} into your own \filenm{lwarp} directory. % \item Unpack \filenm{lwarp.zip}. % \item Locate the contents \filenm{lwarp.dtx} and \filenm{lwarp.ins} % \item Create the |.sty| files: \userentry{pdflatex lwarp.ins} % \item Create the documentation: % \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines] % pdflatex lwarp.dtx (several times) % makeindex -s gglo.ist -o lwarp.gls lwarp.glo % makeindex -s gind.ist lwarp.idx % pdflatex lwarp.dtx (several times) % \end{Verbatim} % \item Copy the |.sty| files somewhere such as the \TeX\ Live local tree % found in the previous \CTAN\ \TDS\ section, under the subdirectory: % \begin{sourceverb} % /tex/latex/local/lwarp % \end{sourceverb} % \item Copy \filenm{lwarp_baseline_marker.png} and \filenm{lwarp_baseline_marker.eps} % to the same place as the \filenm{.sty} files. % \changes{v0.52}{2018/03/24}{Docs: Improved install instructions.} % \item Copy the documentation \filenm{lwarp.pdf} to a \filenm{source} directory in the local tree, % such as: % \begin{sourceverb} % /doc/local/lwarp % \end{sourceverb} % \item Renew the cache: % \userentry{mktexlsr} \quad —\,or\,— % \userentry{texhash} % % Or, for \brand{Windows} MiK\TeX, start the program called \prog{MiKTeX Settings (Admin)} % and click on the button called \UI{Refresh FNDB}. % % \item See \cref{sec:locallwarpmk} to generate your local copy of \prog{lwarpmk}. % \item Once the local version of \filenm{lwarpmk.lua} is installed, it may be made % available system-wide as per \cref{sec:installlwarpmk}. % \end{enumerate} % \item[Project-local \CTAN\ \filenm{.dtx} and \filenm{.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 \filenm{lwarpmk.lua} files % may be used as-is, so long as they are in the same directory % as the document source. % The files \filenm{lwarp_baseline_marker.png} and % \filenm{lwarp_baseline_marker.eps} must also be copied as well. % \changes{v0.52}{2018/03/24}{Docs: Improved install instructions.} % This approach is especially useful if % you would like to temporarily test\margintag{Just testing!}\ % \pkg{lwarp} before deciding whether to permanently install it. % \end{description} % % \subsection{Installing the \prog{lwarpmk} utility} % \label{sec:installlwarpmk} % % \changes{v0.21}{2017/02/22}{Docs: Installing on \brand{Windows}.} % % {\small % (Note: If \prog{lwarpmk} is not already installed, % it is easiest to use a local copy instead of installing it system-wide. % See \cref{sec:locallwarpmk}.) % } % % After the \pkg{lwarp} package is installed, % you may need to setup the \prog{lwarpmk} utility: % \begin{enumerate} % \item At a command line, try executing \cmds{lwarpmk}. % If the \prog{lwarpmk} help message appears, then \prog{lwarpmk} is already set up. % If not, it is easiest to generate and use a local copy. % See \cref{sec:locallwarpmk}. % % \item For MiK\TeX, try updating the \pkg{miktex-misc} package. This may install % the \prog{lwarpmk} executable for you. % \changes{v0.26}{2017/03/23}{Docs: Improved MiK\TeX\ install instructions.} % % Otherwise, continue with the following: % % \item Locate the file \filenm{lwarpmk.lua}, which should be in the |scripts| directory % 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. % See \cref{sec:locallwarpmk}.) % % \item Create \prog{lwarpmk}: % \begin{description} % \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: % \begin{sourceverb} % /usr/local/texlive/ % \end{sourceverb} % The binaries are then located in the |bin/| directory % under the root: % \begin{sourceverb} % /usr/local/texlive//bin// % \end{sourceverb} % In this directory you will find programs % such as \prog{pdflatex} and \prog{makeindex}. % \item In the binaries directory, % create a new symbolic link from the binaries directory to \filenm{lwarpmk.lua}: % \userentry{ln -s lwarpmk} % \item Make the link executable: % \userentry{chmod 0755 lwarpmk} % \end{enumerate} % \item [\brand{Windows} \TeX\ Live:] Create a new |lwarpmk.exe| file: % \begin{enumerate} % \item Locate the \TeX\ Live binaries as shown above for \brand{Unix}. % \item In the binaries directory, make a \emph{copy} of |runscript.exe| % and call it |lwarpmk.exe| % This will call the copy of \filenm{lwarpmk.lua} % which is in the |scripts| directory of the distribution. % \end{enumerate} % \item [\brand{Windows} MiK\TeX:] Create a new |lwarpmk.bat| file: % \begin{enumerate} % \item Locate the MiK\TeX\ binaries. These will be in a directory such as: % \begin{sourceverb} % C:\Program Files\MiKTeX 2.9\miktex\bin\x64 % \end{sourceverb} % In this directory you will find programs % such as |pdflatex.exe| and |makeindex.exe|. % \item Create a new file named |lwarpmk.bat| containing: % \begin{sourceverb} % texlua "C:\Program Files\MiKTeX 2.9\scripts\lwarp\lwarp.texlua" %* % \end{sourceverb} % This will call the copy of \filenm{lwarpmk.lua} % which is in the |scripts| directory of the distribution. % \end{enumerate} % \end{description} % \end{enumerate} % % \subsubsection{Using a local copy of \prog{lwarpmk}} % \label{sec:locallwarpmk} % It is also possible to use a local version of \prog{lwarpmk}: % \begin{enumerate} % \item When compiling the tutorial in \cref{sec:tutorial}, % use the \optn{lwarpmk} option for the \pkg{lwarp} package: % \begin{sourceverb} % \usepackage[lwarpmk]{lwarp} % \end{sourceverb} % \item When the tutorial is compiled with \prog{pdflatex}, the file \filenm{lwarpmk.lua} % will be generated along with the other configuration files. % \item \filenm{lwarpmk.lua} may be used for this project: % \begin{description} % \item[Unix:] \ % \begin{enumerate} % \item Make \filenm{lwarpmk.lua} executable: \userentry{chmod 0755 lwarpmk.lua} % \item Compile documents with % \userentry{./lwarpmk.lua html} % \userentry{./lwarpmk.lua print} \quad etc. % \item It may be useful to rename or link to a version without the |.lua| suffix. % \end{enumerate} % \item[\brand{Windows}:] \ % % Compile documents with either of the following, depending % on which command shell is being used: % \userentry{texlua lwarpmk.lua html} % \userentry{texlua lwarpmk.lua print} \quad etc. % % Or: % % \userentry{lwarpmk html} % \userentry{lwarpmk print} \quad etc. % \end{description} % \end{enumerate} % % % \subsection{Installing additional utilities} % % \changes{v0.27}{2017/04/02}{Docs: Installing utilities for \brand{MacOS}.} % % \trouble{poppler=\prog{poppler}>install} % \trouble{perl=\prog{perl}} % \trouble{pdfcrop=\prog{pdfcrop}} % \trouble{pdftotext=\prog{pdftotex}} % \trouble{pdfseparate=\prog{pdfseparate}} % \trouble{pdftocairo=\prog{pdftocairo}} % % \begin{description} % \item [To test for the existence of the additional utilities:] \ % % Enter the following in a command line. If each programs' version is % displayed, then that utility is already installed. % See \cref{tab:utility} on page \pageref{tab:utility}. % % \userentry{luatex -{}-version} % \userentry{xindy -{}-version} % \userentry{latexmk -{}-version} % \userentry{perl -{}-version} % \userentry{pdfcrop -{}-version} % \userentry{pdftotext -v} % \userentry{pdfseparate -{}-version} % \userentry{pdftocairo -v} % \changes{v0.45}{2017/11/30}{Docs: Fix for double hyphens.} % % \item [To install \prog{xindy}, \prog{latexmk}, and \prog{pdfcrop}:] \ % % The \TeX\ utilities \prog{xindy}, \prog{latexmk}, and \prog{pdfcrop} may be installed % in \prog{TexLive} with \prog{tlmgr}, installed by \prog{MiKTeX}, provided by % your operating system's package manager, or downloaded from the \prog{CTAN} archive: % \changes{v0.45}{2017/11/30}{Docs: Improved install instructions.} % \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 \brand{Poppler} utilities to a \brand{Unix}/\brand{Linux} system:] \ % \DescribeProgram[requirement]{pdftotext}\gindex{Poppler=\brand{Poppler}} % \DescribeProgram[requirement]{pdfseparate} % \DescribeProgram[requirement]{pdftocairo} % % The tools from the \brand{Poppler} project should be provided by your % operating system's package manager. % % % \item [To install the \brand{Poppler} utilities to a \brand{MacOS} machine:] \ % \begin{enumerate} % \item Install \prog{Homebrew} from \url{https://brew.sh/}: % \userentry{\small~ \\ \hspace*{-2in}/usr/bin/ruby -e "\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"} % \item Install the \brand{Poppler} utilities: % \userentry{brew install poppler} % \end{enumerate} % % % \item [To install the \brand{Poppler} utilities to a \brand{Windows} machine:] \ % % If using Mik\TeX, install a \pkg{miktex-poppler-bin-*} package. % \changes{v0.62}{2018/11/03}{Docs: \pkg{miktex-poppler-bin-*}} % Otherwise: % \begin{enumerate} % \item See \cref{tab:utility} on \cpageref{tab:utility}. % \item Download and extract the \brand{Poppler} utilities \prog{pdftotext}, \prog{pdfseparate}, % and \prog{pdfseparate} to a directory, such as |Poppler|. % \item In the \UI{Start} window, type "Path" to search for results % related to Path. Or, open the control panel and search for "Path". % \item Choose \UI{Edit the system environment variables} in the control panel. % \item Choose the \UI{Environment Variables} button. % \item Choose the \UI{Path} variable, then the \UI{Edit} button. % \item Choose the \UI{New} button to make an additional entry. % \item Enter the |bin| directory of the \brand{Poppler} utilities, such as: % \begin{sourcedisplay} % |C:\Users\\Desktop\Poppler\poppler-0.5_x86\poppler-0.5\bin| % \end{sourcedisplay} % % Be sure to include |\bin|. % \item Click \UI{Ok} when done. % \end{enumerate} % % \needspace{2\baselineskip} % \item [To install \brand{Perl} to a \brand{Windows} machine:] \ % \DescribeProgram[requirement]{perl}\gindex{Perl=\brand{Perl}} % \begin{enumerate} % \item Download and install a version of \brand{Perl}, such as \brand{Straweberry Perl}, % to a directory without a space in its name, such as |C:\Strawberry|. % \item Edit the \UI{Path} as seen above for the \brand{Poppler} utilities. % \item Enter the |bin| directory of the \prog{perl} utility, such as: % \begin{sourcedisplay} % |C:\Strawberry\perl\bin| % \end{sourcedisplay} % % Be sure to include |\bin|. % \item Click \UI{Ok} when done. % \end{enumerate} % % \end{description} % % \vfill % \textred{\textbf{Any utilities installed by hand must be added to the |PATH|.}} % \vfill % % % % \clearpage % % \section{Tutorial} % \label{sec:tutorial} % ^^A *tutorial % % This section shows an example of how to create an \pkg{lwarp} document. % % \needhelp % % \subsection{Starting a new project} % % \changes{v0.21}{2017/02/23}{File: \filenm{lwarp_tutorial.txt} added.} % % \begin{enumerate} % % \item Create a new project directory called |tutorial|. % % \item Inside the |tutorial| directory, % \DescribeFile{tutorial.tex} % create a new file called |tutorial.tex|. % This may be done several ways: % \begin{description} % \item [Copy from the documentation \PDF:] \ % % 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 \PDF\ viewer and editor, or: % % \item [Copy from the \pkg{lwarp} documentation directory:] \ % % Another copy may be found by entering into a command line: % \DescribeFile{lwarp_tutorial.txt} % \watchout[Note: |.txt| suffix!] % \userentry{texdoc -l lwarp\_tutorial.txt} % % This should be in the |doc/latex/lwarp/| directory along % with this \PDF\ documentation. % Copy |lwarp_tutorial.txt| directly into your |tutorial| directory, % renamed as |tutorial.tex|. % \end{description} % % \emph{When using \brand{Windows}, use an editor other than \brand{Notepad}, % \watchout[Bad formatting!] % since \brand{Notepad} does not accept the end-of-line from a \brand{Unix} text file.} % % \item Compile the project: \userentry{pdflatex tutorial.tex} % \quad (several times) % % (\prog{xelatex} or \prog{lualatex} may be used as well. % \pkg{lwarp} also supports \DVI\ \prog{latex} for use with \filenm{.eps} images.) % % \item View the resulting |tutorial.pdf| with a \PDF\ viewer. % % \end{enumerate} % % % A number of new files are created when |tutorial.tex| is compiled, as % shown in \cref{fig:newprojectfiles}. These files are created by % the |lwarp| package. % % (Two of the new files are configuration files for the helper program \prog{lwarpmk}. % Whenever a print version of the document is created, % the configuration files for \prog{lwarpmk} are updated to % record the operating system, \LaTeX\ engine (\prog{latex}, \prog{pdflatex}, \prog{xelatex}, or \prog{lualatex}), % the filenames of the source code and \HTML\ output, and whether % the additional helper program \prog{latexmk} will be used to compile the document.) % % % \clearpage % % \begingroup % \captionof{figure}{tutorial.tex listing} % \label{fig:tutorial} % % \begin{center} % \footnotesize % \textred{Note: There are two pages!} % \end{center} % % \small % % \VerbatimInput{lwarp_tutorial.txt} % % ^^A so they don't copy/paste the header: % \thispagestyle{empty} % % ^^A ************************************************************************** % ^^A NOTE: lwarp_tutorial.txt is located in the TDS doc directory! % ^^A Copy it to the source directory if you wish to recompile lwarp.dtx! % ^^A (It is stored in the doc directory so that texdoc can find it and % ^^A the user can copy it.) % ^^A ************************************************************************** % % \endgroup % % % \begin{table} % \caption{Configuration files created by print version\label{fig:newprojectfiles}} % \begin{description} % % \item [|tutorial.pdf|:] The \PDF\ output from \LaTeX. % The print version of the document. % % \item [|tutorial\_html.tex|:] A small |.tex| file used to create % 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 |.aux|, |.log|, |.out|, \filenm{.toc}, \filenm{.lof}, |.idx|. % 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 \prog{lwarpmk}, % which is used to automate the compilation of \PDF\ or \HTML\ % versions of the document. % % \item [|tutorial.lwarpmkconf|:] Another configuration file used by \prog{lwarpmk}, % which is only useful if you wish to have several projects % residing in the same directory. % % \item [|.css files|:] |lwarp.css|, |lwarp_formal.css|, |lwarp_sagebrush.css| % 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 \CSS\ file, % which may be used for project-specific changes to the \pkg{lwarp} defaults. % % \item [|lwarp.ist|:] Used by \pkg{lwarp} while creating an index using \prog{makeindex}. % This file should not be modified by the user. % A custom file may be used instead, if necessary. % % \item [|lwarp.xdy|:] Used by \pkg{lwarp} while creating an index using \prog{xindy}. % This file should not be modified by the user. % A custom file may be used instead, if necessary. % % \item [|lwarp\_one\_limage.txt|:] For \brand{Windows} only. % Used to process \SVG\ images in the background. Copied to % |lwarp_one_limage.cmd| when images are generated. % % \item [|lwarp\_mathjax.txt|:] Inserted into the \HTML\ files when % \MathJax\ is used to display math. % Do not modify, see \cs{MathJaxFilename} instead. % % \item [|comment\_*.cut|:] Temporary files used by \pkg{lwarp} to % conditionally process blocks of text. These files may be ignored. % \end{description} % % \hrule \medskip % \label{sec:genlatexmk} % When the \optn{lwarpmk} option is given to the \pkg{lwarp} package: % \begin{description} % \item [\filenm{lwarpmk.lua}:] A local copy of the \prog{lwarpmk} utility. % % On \brand{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} % \end{table} % % % % \clearpage % % \subsection{Compiling the print version with \prog{lwarpmk}} % % \newcommand*{\LWRenablelwarpmk}{% % If you have not yet done so, % \trouble[Enable \prog{lwarpmk}]{lwarpmk=\filenm{lwarpmk.conf}} % \trouble{lwarpmk=\prog{lwarpmk}} % add \texttt{\cs{usepackage}\{lwarp\}} to the document, % then compile the project a single time using \prog{pdflatex}, \prog{lualatex}, % or \prog{xelatex}. This generates the file \filenm{lwarpmk.conf}, % which then allows the \prog{lwarpmk} program to be used. % } % % The \prog{lwarpmk} utility program is used to compile either the printed or % the \HTML\ version of the document. % % |lwarpmk print| is used to recompile a printed version of the document. % % \begin{enumerate} % % \item \LWRenablelwarpmk % % \item Re-compile the print version: \userentry{lwarpmk print} % % \prog{lwarpmk} prints an introduction then checks to see if the document % must be recompiled. If it seems that the files are up-to-date, then % \prog{lwarpmk} informs you of that fact and then exits. % % \item Make a small change in the original document, % such as adding a space character. % % \item Recompile again. \userentry{lwarpmk print} % % The document is recompiled when a change is seen in the source. % Several compilations may be necessary to resolve cross-references. % % \item Force a recompile to occur. % \userentry{lwarpmk again} % \userentry{lwarpmk print} % % |lwarpmk again| updates the date code for the file, % triggering a recompile the next time the document is made.\footnote{ % Although, when using the utility \prog{latexmk} (introduced later), the changed date is % ignored and an actual change in contents must occur to cause a recompile.} % % \item Process the index.\gindex{index>processing}% % \footnote{The command \cmds{lwarpmk printglossary} is also % available to process a glossary produced with the \textsf{glossaries} package. % See \cref{sec:glossaries}.}% % \footnote{Also see \cref{sec:indexsetup} for index options.} % \userentry{lwarpmk printindex} % % \item Recompile again to include the index. % \userentry{lwarpmk print} % % \item To force a single recompile when needed, even if no changes were detected: % \userentry{lwarpmk print1} % % \end{enumerate} % % Note that the \HTML\ customization commands are ignored while making the % print version. % % % \clearpage % % \subsection{Compiling the \HTML\ version with \prog{lwarpmk}} % % |lwarpmk html| is used to recompile an \HTML\ version of the document. % % \begin{enumerate} % \item \LWRenablelwarpmk % \item Compile the \HTML\ version: % \userentry{lwarpmk html} % % \begin{enumerate} % \item \prog{lwarpmk} uses \LaTeX\ to process |tutorial_html.tex| % to create \\ % |tutorial_html.pdf|. % \item \prog{pdftotext} is then used to convert to the file |tutorial_html.html|. % This file is a plain-text file containing \HTML\ tags and % content for the entire document. % \item \prog{lwarpmk} manually splits |tutorial_html.html| into % 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 \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 % used as a homepage, so the document index is in \texttt{\_Index.html}.} % \end{enumerate} % % \item View the \HTML\ page in a web browser. % % \qquad Open the file |tutorial.html| in a web browser. % % Note that math images have not yet been generated, % \margintag{math images} % \changes{v0.903}{2022/01/24}{Docs: Math images.} % so math is still displayed as its \attribute{alt} tag, which is % set to the plain-text \LaTeX\ source for that expression. % Math may be displayed as \SVG\ images (\cref{sec:tutorialsvgmath}) % or by a \MathJax\ script (\cref{sec:tutorialmathjax}). % % \item Force a recompile: % \userentry{lwarpmk again} % \userentry{lwarpmk html} % \userentry{lwarpmk print} % % \item Process the \HTML\ index and recompile:\gindex{index>processing} % \footnote{The command \cmds{lwarpmk htmlglossary} is also % available to process a glossary produced with the \textsf{glossaries} package. % See \cref{sec:glossaries}.}\footnote{Also see \cref{sec:indexsetup} for index options.} % \userentry{lwarpmk htmlindex} % \userentry{lwarpmk html} % % |_Index.html| is updated for the new \LaTeX\ index. % % \item Reload the web page to see the added index. % % \item To force a single recompile when needed, even if no changes were detected: % \userentry{lwarpmk html1} % % \end{enumerate} % % % % \clearpage % % \subsection{Generating the \SVG\ images} % \label{sec:tutorialsvgmath} % % By default \pkg{lwarp} represents math as \SVG\ images, with % \margintag{math as \SVG\ images} % the \LaTeX\ source included in \attribute{alt} attributes. In this way, % the math is displayed as it was drawn by \LaTeX, and the \LaTeX\ source % may be copied and pasted into other documents. % % \pkg{lwarp} uses the same mechanism for \env{picture} and \TikZ\ environments. % \margintag{\env{picture} and \TikZ} % % \begin{enumerate} % \item Create the \SVG\ images: % \userentry{lwarpmk limages} % \userentry{lwarpmk html} % % \item Move to the tutorial's \HTML\ math page and reload the document in the browser. % % \item The math images are displayed using the same font and formatting % as the printed version. % % \item Copy/paste a math expression into a text editor to see the \LaTeX\ source. % \end{enumerate} % % \limitssvgimages % % \clearpage % % \subsection{Using \MathJax\ for math} % \label{sec:tutorialmathjax} % % Math may also be represented using the \MathJax\ \brand{Javascript} project. % \margintag{math with \MathJax} % % \begin{enumerate} % \item In the tutorial's source code, uncomment the \optn{mathjax} package option for \pkg{lwarp}: % \begin{sourcedisplay} % mathjax, \% Use MathJax to display math. % \end{sourcedisplay} % % \item Recompile \userentry{lwarpmk html} % % \item Reload the math page. % \end{enumerate} % % \MathJax\ requires web access unless a local copy of \MathJax\ is available, % \watchout[\MathJax\ requirements] % and it also requires that \brand{Javascript} is enabled for the web page. % The math is rendered by \MathJax. Right-click on math to see several % options for rendering, and for copying the \LaTeX\ source. % % While using \MathJax\ has many advantages, it may not be able to represent % complex expressions or spacing adjustments as well as \LaTeX, and it % may not support some math-related packages. % % % \clearpage % \subsection{Changing the \CSS\ style} % % For a formal \CSS\ style, add to the preamble: % \begin{sourcedisplay} % \cs{usepackage}\{lwarp\} \\ % \dots \\ % \textred{\cs{CSSFilename}\{lwarp\_formal.css\}} \\ % \dots \\ % \cs{begin}\{document\} \\ % \end{sourcedisplay} % % For a modern \CSS\ style, |lwarp_sagebrush.css| is also provided: % \begin{sourcedisplay} % \cs{CSSFilename}\{lwarp\_sagebrush.css\} % \end{sourcedisplay} % % See \cref{sec:csscustomization} for more information about modifying the \CSS\ styling % of the document. % % % % \subsection{Customizing the \HTML\ output} % % A number of settings may be made to control the \HTML\ output, including % filename generation, automatic compilation, math output, document splitting, % meta data, and page headers and footers. % % See \cref{sec:htmlsettings} for more information. % % % \clearpage % % \subsection{Using \prog{latexmk}} % % \prog{latexmk} is a \LaTeX\ utility used to monitor changes in source files % and recompile as needed. % % \begin{enumerate} % \item In the tutorial's source code uncomment the \optn{latexmk} option for the % \pkg{lwarp} package: % \begin{sourcedisplay} % latexmk, \% Use latexmk to compile. % \end{sourcedisplay} % % \item Recompile the printed version of the document. % \userentry{lwarpmk print} % % \begin{sloppy} % \pkg{lwarp} updates its own configuration files (|lwarpmk.conf| and \newline % |tutorial.lwarpmkconf|) whenever the printed version of the document % is compiled. These configuration files remember that \prog{lwarpmk} should % use \prog{latexmk} to compile the document. % \end{sloppy} % % \item Recompile the document. % \userentry{lwarpmk print} \quad and/or % \userentry{lwarpmk html} % \end{enumerate} % % Changes are detected by comparing checksums % rather than modification times, so |lwarpmk again| will not trigger a % recompile, but \prog{latexmk} has a much better awareness of changes than % the \prog{lwarpmk} utility does and it is likely to correctly know when to % recompile. A recompile may be forced by making a small change to the source, % and a single recompile may be forced with: % \margintag{forced single-pass recompile} % \userentry{lwarpmk print1} \quad and/or % \userentry{lwarpmk html1} % % % \clearpage % % \subsection{Using \XeLaTeX\ or \LuaLaTeX} % % \XeLaTeX\ or \LuaLaTeX\ may be used instead of \LaTeX. % % \begin{enumerate} % % \item Remove the auxiliary files for the project: % \userentry{lwarpmk cleanall} % % \item Use \prog{xelatex} or \prog{lualatex} to compile the printed version % a single time. % \userentry{xelatex tutorial.tex} \quad \orelse % \userentry{lualatex tutorial.tex} % % When the compile occurs, % the configuration files for \prog{lwarpmk} are modified to remember % which \TeX\ engine was used. \XeLaTeX\ or \LuaLaTeX\ will be used for % future runs of \prog{lwarpmk}. % % \item To recompile the document: % \userentry{lwarpmk print} \quad -and- % \userentry{lwarpmk html} % % \item Also remember to update the indexes and recompile again: % \userentry{lwarpmk htmlindex} % \userentry{lwarpmk html} % \userentry{lwarpmk printindex} % \userentry{lwarpmk print} % \end{enumerate} % % % \subsection{Using \DVI\ \LaTeX} % % \gindex{DVI \LaTeX} % % Traditional \DVI\ LaTeX may also be used along with \filenm{.eps} image files. % An \SVG\ version of each image must also be provided. % \prog{lwarpmk} may be used to convert image formats. % % To convert \EPS\ files to \PDF: % \userentry{lwarpmk epstopdf *.eps \qquad \textrm{(or a list of files)}} % % To convert \PDF\ files to \SVG: % \userentry{lwarpmk pdftosvg *.pdf \qquad \textrm{(or a list of files)}} % % See \cref{sec:fonts} regarding font selection % \watchout[bitmapped fonts] % to avoid the use of bitmapped fonts. % % % \clearpage % % \subsection{Using a bibliography} % % \changes{v0.913}{2023/10/01}{Docs: Update a bibliography.} % % To process the bibliography for the \HTML\ version: % \userentry{bibtex \_html} % or % \userentry{biber \_html} % % To see the bibliography in the \HTML\ version: % \userentry{lwarpmk html1} % as many times as neccesary. % % % \subsection{Using a glossary} % % \changes{v0.29}{2017/04/15}{Docs: Using a glossary} % % \pkg{lwarp} supports the \pkg{gloss} and \pkg{glossaries} packages, % although this tutorial does not supply an example. % % \subsubsection{\pkg{gloss} package} % % See \cref{sec:gloss}. % % \subsubsection{\pkg{glossaries} package} % \gindex{glossaries=\pkg{glossaries}>processing} % To process the glossary for the print version: % \userentry{lwarpmk printglossary} % % \fquad (If \cmds{makeglossaries} is not found, see \cref{sec:glossaries}.)\watchout % % To process the glossary for the \HTML\ version: % \userentry{lwarpmk htmlglossary} % % In each case, the document will have to be recompiled afterwards: % \userentry{lwarpmk html1} % \userentry{lwarpmk html} % \userentry{lwarpmk print1} % \userentry{lwarpmk print} % % See \cref{sec:glossaries} to set options for processing glossaries. % % % \clearpage % % \subsection{Cleaning auxiliary files} % % To remove the auxiliary files |.aux|, \filenm{.toc}, \filenm{.lof}, \filenm{.lot}, |.idx|, |.ind|, |.log|, % and |.gl*|, and a few others: % \userentry{lwarpmk clean} % % % \subsection{Cleaning auxiliary and output files} % % To remove the auxiliary files, and also remove the |.pdf| and |.html| files: % \userentry{lwarpmk cleanall} % % % \subsection{Cleaning the images from the \filenm{-images} directory} % \changes{v0.53}{2018/04/01}{Docs: \cmds{lwarpmk cleanlimages}.} % % The \filenm{-images} directory contains \SVG\ images % automatically generated for inline and display math, \pkg{tikz}, etc. % To remove all the images from the \filenm{-images} directory: % \userentry{lwarpmk cleanlimages} % % % \subsection{Converting \PDF\ or \EPS\ images to \SVG} % \changes{v0.56}{2018/04/29}{Docs: \cmds{lwarpmk pdftosvg}.} % \changes{v0.59}{2018/09/05}{Docs: \cmds{lwarpmk epstopdf}.} % % \HTML\ cannot display \PDF\ or \EPS\ images, so any external \PDF\ graphics images must % be converted to \SVG\ format. % \gindex{SVG>converting from \PDF\ or \EPS} % \gindex{PDF image>converting} % \gindex{EPS image>converting} % \gindex{image>PDF or EPS>converting} % \prog{pdftocairo} and \prog{epstopdf} may be used one image at a time, % but \prog{lwarpmk} also provides a way to convert \PDF\ or \EPS\ images in bulk: % \userentry{lwarpmk epstopdf *.eps \qquad \textrm{(or a list of files)}} % \userentry{lwarpmk pdftosvg *.pdf \qquad \textrm{(or a list of files)}} % Be sure to always provide \SVG\ files for \HTML\ output. % % % \subsection{Creating \HTML\ from an incomplete compile} % \changes{v0.53}{2018/04/01}{Docs: \cmds{lwarpmk pdftohtml}.} % % During testing it may be useful to finish the \HTML\ conversion even when % the document had errors and did not compile successfully. To attempt an % \HTML\ conversion of an incomplete document: % \userentry{lwarpmk pdftohtml [-p project]} % % % \subsection{Processing multiple projects in the same directory} % \label{sec:multipleprojects} % \gindex{multiple projects in a directory} % \gindex{projects} % \gindex{xr=\pkg{xr}} % \gindex{xr-hyper=\pkg{xr-hyper}} % \gindex{xcite=\pkg{xcite}} % \trouble{multiple projects in a directory} % \trouble{projects>multiple} % \trouble{file>multiple projects in directory} % \trouble[\pkg{xr}, \pkg{xr-hyper}, \pkg{xcite}]{xr=\pkg{xr}} % \trouble{xr-hyper=\pkg{xr-hyper}} % \trouble{xcite=\pkg{xcite}} % % \changes{v0.76}{2019/10/08}{Docs expanded: Multiple projects.} % % It is possible to have several projects in the same directory. % \prog{lwarpmk} has an optional parameter which is the document to compile. % % To create each project: % \userentry{pdflatex project\_a} % \userentry{pdflatex project\_b} % % 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 -p project\_a} % \userentry{lwarpmk print -p project\_b} % \userentry{lwarpmk html -p project\_a} % \userentry{lwarpmk html -p project\_b} % % To generate each project's images: % \userentry{lwarpmk limages -p project\_a} % \userentry{lwarpmk limages -p project\_b} % % To clean each project's images: % \userentry{lwarpmk cleanlimages -p project\_a} % \userentry{lwarpmk cleanlimages -p project\_b} % % To clean each project's auxiliary files: % \userentry{lwarpmk cleanall -p project\_a} % \userentry{lwarpmk cleanall -p project\_b} % % If using \prog{bibtex}, for example, the \HTML\ version must also be processed: % \userentry{bibtex project\_a\textred{\_html}} % % % \subsection{Using the \prog{make} utility} % % \prog{lwarpmk} has an action which may be useful for integration with the % common \prog{make} utility: % \begin{sourcedisplay} % |lwarpmk pdftohtml [-p project]| % \end{sourcedisplay} % % \prog{make} may be used to compile the code to \PDF\ with \HTML\ % tags (|project_html.pdf|), then \prog{lwarpmk} may be used to % convert each target to \HTML\ files. % % \clearpage % % \subsection{What next?} % \label{sec:whatnext} % % \begin{description} % \item [How do I do something?] See the \nameref{sec:indexgen}. % \item [Something do not work!] See the \nameref{sec:indextrb} % or \cref{sec:troubleshooting}: \nameref{sec:troubleshooting}. % \item [Package options:] See \cref{sec:packageoptions}, \nameref{sec:packageoptions}. % \item [\HTML\ and filename settings:] See \cref{sec:htmlsettings}, % \nameref{sec:htmlsettings}. % \item [Footnote placement:] See \cref{sec:htmlsettings}, % \nameref{sec:htmlsettings}. % \item [Title page, indexing, glossaries:] See \cref{sec:frontbackmatter}, % \nameref{sec:frontbackmatter}. % \item [Shell escape:] See \cref{sec:shellescape}, \nameref{sec:shellescape}. % \item [\CSS\ customization:] See \cref{sec:csscustomization}, % \nameref{sec:csscustomization}. % \item [\MathJax\ customization:] See \cref{sec:limitscustomizemathjax}, % \nameref{sec:limitscustomizemathjax}. % \item [Localization:] (languages) --- See \cref{sec:localization}, % \nameref{sec:localization}. % \item [Accessibility:] (\attribute{alt} and \attribute{title} tags) --- % See \cref{sec:accessibility}, \nameref{sec:accessibility}. % \item [Converting an existing document:] See \cref{sec:convertexisting}, % \nameref{sec:convertexisting}. % \item [\EPUB\ conversion:] See \cref{sec:epub}, \nameref{sec:epub}. % \item [Word processor conversion:] See \cref{sec:wordprocessorconversion}, % \nameref{sec:wordprocessorconversion}. % \end{description} % % \clearpage % % \section{Converting an existing document} % \label{sec:convertexisting} % % \gindex{modifying>document} % \gindex{adapting>document} % \gindex{converting>document} % \gindex{document>convert existing} % % \changes{v0.48}{2018/02/05}{Docs: Converting an existing document.} % \changes{v0.51}{2018/03/04}{Docs: Updated Converting an existing document.} % \changes{v0.66}{2019/02/07}{Docs: Updated Converting an existing document.} % % To convert an existing document for use with \pkg{lwarp}: % \begin{enumerate} % \item Arrange the document in the following order: % \begin{enumerate} % \item Declare the \cs{documentclass}. % \item Load text fonts. % \item Load \pkg{inputenc} or \pkg{inputenx}, \pkg{fontenc}, or \pkg{fontspec}. % \item Load \pkg{lwarp}. % \item Load remaining packages. % \end{enumerate} % \item Modify the document: % \begin{enumerate} % ^^A \item Remove \filenm{.pdf} file extensions. Change: % ^^A \begin{sourcedisplay} % ^^A \cs{includegraphics}\{filename.pdf\} % ^^A \end{sourcedisplay} to: % ^^A \begin{sourcedisplay} % ^^A \cs{includegraphics}\{filename\} % ^^A \end{sourcedisplay} % ^^A Other image formats may have a file extension. % \item \limitsmathinsectionnames % \item \limitsincludegraphicsscale % \item Possible changes to \env{tabular} environments include: % \watchout[tabular] % |*| columns, \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, \pkg{xtab}, % \pkg{bigdelim}. See \cref{sec:limitstabular}. % \item If using braces in package options, % \watchout[package options] % such as with \pkg{caption}, see \cref{sec:thingstoavoid}. % \item Possible option clashes with \pkg{memoir}. See \cref{sec:limitsmemoir}. % \item If using indexes, see \cref{sec:indexsetup}. % \watchout[indexes] % \item If using many indexes, glossaries, |.aux| files, etc., % see \cref{sec:indexsetup} regarding \pkg{morewrites}. % If \pkg{morewrites} is already used, be sure to add the setup with |allocate=10|. % \item Other changes as per \nameref{sec:limitations}, \cref{sec:limitations}. % \end{enumerate} % \item Convert any \PDF\ images to \SVG. See \cref{sec:limitsgraphics}. % \item Manually compile the print version with \prog{latex}, \prog{pdflatex}, % \prog{lualatex}, or \prog{xelatex}. % \item |lwarpmk print| to finish the print version. % \item |lwarpmk html| to create the \HTML\ version. % \item |lwarpmk limages| to create the \SVG\ images of any \SVG\ math, \env{lateximage}, \TikZ, etc. % \end{enumerate} % % \needhelp % % \clearpage % % \section{Additional details} % % % \subsection{Localization} % \label{sec:localization} % \gindex{localization} % \gindex{language>localization} % \gindex{sideTOC=side\TOC>name} % \gindex{settings>language} % % Regional localization is supported by \pkg{lwarp} via the package options % and macros shown in \cref{tab:localization}. % % \begin{table} % \caption{Localization settings} % \label{tab:localization} % \begin{description} % \item [Object names:] \LaTeX\ provides redefinable names for various objects, % and \pkg{lwarp} adds a few more. Use \cs{renewcommand} to change these. % \begin{description} % \item [\cs{abstractname}:] This macro is honored by \pkg{lwarp}. % \item [\cs{linkhomename}:] Displayed by the link to the homepage. % \item [\cs{linkpreviousname}:] Displayed by the link to the previous page % \item [\cs{linknextname}:] Displayed by the link to the next page. % \item [\cs{sidetocname}:] Displayed at the head of the side\TOC. % \end{description} % \item [\HTML\ settings:] See \cref{tab:htmlsettings} and % \cref{sec:htmlsettings} for details. % \begin{description}[style=unboxed] % \item [\cs{HTMLLanguage}:] The language to declare for each web page. % \item [\cs{ImageAltText}, \cs{MathImageAltText}, \cs{PackageDiagramAltText}, % \cs{AltTextOpen}, \cs{AltTextClose}:] The defaults used for \HTML\ % \attribute{alt} text for images. See \cref{sec:accessibility}. % \item [\cs{CSSFilename}:] The name of the \CSS\ file to use. % \item [\cs{MathJaxFilename}:] The name of the \MathJax\ script to use. % \end{description} % \item [Package options:] \ % \begin{description} % \item [\optn{ImagesName} and \optn{ImagesDirectory}:] These options control % the filenames used by \pkg{lwarp} when it automatically generates images. % See \cref{tab:options} and \cref{sec:loading}. % \item [\optn{xindyStyle}, \optn{xindyLanguage}, \optn{xindyCodepage}:] % When using \prog{xindy}, these options may be set according to % local use. See \cref{sec:modifyxindy}. % \item [\optn{pdftotextEnc}:] To adjust the encoding of \prog{pdftotext}. % \end{description} % \end{description} % \end{table} % % % \subsection{Accessibility} % \label{sec:accessibility} % % \gindex{accessibility} % \gindex{alt text=\attribute{alt} text} % \gindex{HTML>alt text=\attribute{alt} text} % \gindex{image>alt text=\attribute{alt} text} % \gindex{math>alt text=\attribute{alt} text} % \gindex{mathjax=\MathJax>accessibility} % \gindex{link>title=\attribute{title} text} % \gindex{hyperref=\pkg{hyperref}>title=\attribute{title} text} % \gindex{settings>accessibility} % \gindex{ARIA=\acro{ARIA}} % \gindex{roles>ARIA=\acro{ARIO}} % % \pkg{lwarp} provides several methods for improving access to % the document using tools such as text-only browsers, copy \Slash paste, % text-to-speech readers, or Braille readers. % \pkg{lwarp} can use the \HTML\ \attribute{alt} text attribute for images, % as describe below. % \pkg{lwarp} can also use the \HTML\ \attribute{title} attribute, which usually % generates a pop-up text. \pkg{lwarp} can add this to a reference or hyperlink. % \pkg{lwarp} also uses standard \HTML5 elements which are pre-assigned % \ARIA\ roles for increased accessibility, and \pkg{lwarp} assigns the |math| % role for \SVG\ math images, and the |note| role for footnotes, end notes, % margin paragraphs and notes, etc. % \MathJax\ also has provisions for improved accessibility % as well. See \cref{tab:accessibility}. % % \begin{table} % \caption{Accessibiltiy settings} % \label{tab:accessibility} % \begin{description} % \item [\cs{ImageAltText}:] The default \HTML\ \attribute{alt} text % for \cs{includegraphics} and \env{lateximage}s. % Set with \cs{renewcommand}. % % \item [\cs{includegraphics} \optn{alt} key:] % For \cs{includegraphics}, \pkg{lwarp} adds the \attribute{alt} key \Slash value. % For example: % \begin{sourceverb} % \includegraphics[alt={Some text.}]{filename} % \end{sourceverb} % % \item [\SVG\ math:] % For simple \SVG\ math, \pkg{lwarp} places the \LaTeX\ math expression in the % \attribute{alt} text, so that the \LaTeX\ expression may be copied and pasted to % another document as plain text. % % \item [\cs{MathImageAltText}:] % For complicated \SVG\ math, such as enclosed in % \cs{InlineMathOther} \Slash \cs{InlineMathNormal}, or % \cs{DisplayMathOther} \Slash \cs{DisplayMathNormal}, % the \HTML\ \attribute{alt} text will be set to \cs{MathImageAltText}. % Set with \cs{renewcommand}. % % \item [\MathJax:] % For \MathJax, the accessibility tools provided by \MathJax\ are % enabled by default by \pkg{lwarp}'s \MathJax\ scripts. % % \item [\cs{PackageDiagramAltText}:] % Various packages create diagrams which \pkg{lwarp} converts into \SVG\ images. % These are given \attribute{alt} text set to \cs{PackageDiagramAltText}. % Set with \cs{renewcommand}. % % \item [\cs{ThisAltText}:] % The \HTML\ \attribute{alt} text of the next image may be set with: % \margintag{custom \attribute{alt} text} % \begin{sourceverb} % \ThisAltText{Custom text about the image.} % % \end{sourceverb} % The next single image will be generated with the given text, % and the following images will revert to back to their defaults. % % \cs{ThisAltText} may also be used to assign an \HTML\ \attribute{title} to % \margintag{references and links} % the next reference or hyperlink. % \begin{sourceverb} % \ThisAltText{Custom text about the link.} % Text ... \ref{label_name} ... text. % \end{sourceverb} % See \cref{sec:ThisAltText}. % % \item [\cs{AltTextOpen} and \cs{AltTextClose}:] % By default, \HTML\ \attribute{alt} text is enclosed by parentheses. % This may be changed by redefining \cs{AltTextOpen} and \cs{AltTextClose}. % Set with \cs{renewcommand}. % \end{description} % \end{table} % % % % \subsection{Shell escape} % \label{sec:shellescape} % \gindex{shell escape} % % \DescribeOption{-\/-shell-escape} % Some documents require the use of an external program, % which is allowed when using the \optn{-\/-shell-escape} command-line option. % When the document is first compiled manually, % and also whenever the print version is recompiled, % \pkg{lwarp} detects and remembers % whether shell escape is enabled. If so, it will also be enabled when % the document is recompiled with \prog{lwarpmk}. % % % \subsection{Font and \UTF-8 support} % \label{sec:fonts} % \trouble{font>UTF-8} % \trouble{text>corrupted} % \trouble{font>selection} % \trouble{Unicode>fonts} % \gindex{font>selection} % \gindex{font>type 3 bitmapped} % \gindex{font>type 1 vector} % \gindex{type 1 vector fonts} % \gindex{type 3 bitmapped fonts} % \gindex{vector fonts} % \gindex{bitmapped fonts} % \gindex{Unicode>selection} % \gindex{UTF-8>selection} % \gindex{Computer Modern} % \gindex{Latin Modern font} % \gindex{DVI \LaTeX} % \changes{v0.16}{2016/04/08}{Docs: Font and UTF-8 support.} % \changes{v0.16}{2016/04/08}{Lwarp no longer selects fonts.} % \changes{v0.61}{2018/09/25}{Docs: Fonts.} % % \pkg{lwarp} uses \prog{pdftotext} to convert \PDF\ output into UTF-8-encoded % \watchout[type 3 bitmapped fonts] % text. This process requires that UTF-8 information be embedded in the \PDF\ % file, which may prevent the use of older ``type 3'' bit-mapped fonts, % and of older packages such as \pkg{ae}. % The \pkg{lwarp} option \optn{pdftotextEnc} may be useful in some situations. % See \cref{sec:loading}. % % While using older versions of \DVI\ \prog{latex} or \PDF\ \prog{pdflatex}, % \margintag{vector fonts} % if no font-related package is specified then the default % \brand{Computer Modern} font is used, % \margintag{Computer Modern}% % \gindex{font>Computer Modern}\gindex{Computer Modern}% % \watchout[\prog{pdflatex}]% % \watchout[\DVI\ \prog{latex}]% % which may be a ``type 3'' bit-mapped font which may not % convert well to plain text. A ``type 1'' vector font is required. % % \DescribePackage{cm-super} % To use the updated \pkg{cm-super}'s type 1 fonts instead of Computer Modern, % install the \pkg{cm-super} font package. % % \DescribePackage{lmodern} % To use Latin Modern instead, add % \begin{sourcedisplay} % |\usepackage{lmodern}| % \end{sourcedisplay} % to the preamble. % % \DescribePackage{dejavu} % Another useful option is the Deja Vu series of fonts, which have % \gindex{Deja Vu}% % \gindex{font>Deja Vu}% % \gindex{Unicode>enhanced coverage}% % \gindex{UTF-8>enhanced coverage}% % an increased coverage of language and glyphs: % \begin{sourcedisplay} % |\usepackage{dejavu}| % \end{sourcedisplay} % % % To avoid ``Missing character'' warnings and empty or missing % \trouble[Missing characters]{missing characters} % \trouble{characters>missing} % \trouble{font>missing characters} % \trouble{Unicode>missing characters} % characters in \HTML\ and math output, % if using a font with an enhanced set of characters % also specify a monospace font with similar coverage. % \pkg{lwarp} uses the mono font for \HTML\ and math output. % Many font packages provide a monospace font automatically. % \changes{v0.916}{2024/02/18}{Docs: Missing characters} % % % While using \DVI\ \prog{latex} or \PDF\ \prog{pdflatex}, % \margintag{\prog{latex}, \prog{pdflatex}, T1, UTF8} % \pkg{lwarp} automatically loads \pkg{fontenc} with T1 encoding. % \pkg{fontenc} may be loaded with an additional encoding after \pkg{lwarp}. % \pkg{inputenc} is automatically loaded with UTF8 encoding if it has not yet been loaded, % but may also be specified with another encoding such as |latin1|. % See the next section regarding index encoding. % % \XeLaTeX{} and \LuaLaTeX{} users must use the \pkg{fontspec} package. % \trouble[\prog{xelatex}, \prog{lualatex}, \pkg{fontspec}]{xelatex=xe\LaTeX} % \trouble{lualatex=lua\LaTeX} % \trouble{fontspec=\pkg{fontspec}>xelatex=with \XeLaTeX, \LuaLaTeX.} % Do NOT use \pkg{fontenc}! % % Place \pkg{fontspec} or \pkg{fontenc}, \pkg{xunicode}, and other font and UTF-8 related commands % after the \cs{documentclass} command and before |\usepackage{lwarp}|. % % In some cases, \trouble[package conflicts]{font>package conflicts} % a package conflict may require that a font package be loaded % after \pkg{lwarp}, which should work as well: % \begin{enumerate} % \item |documentclass{article/book/report}| comes first, followed by any of: % \item Font and UTF-8 related commands: % \begin{itemize} % \item For \XeLaTeX{} or \LuaLaTeX: % \begin{itemize} % \item \pkg{fontspec} and font choices % \DescribePackage{fontspec} % % \medskip % \pkg{lwarp} sets the following to turn off \TeX{} ligatures during % \margintag{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. % \gindex{ligatures} % \gindex{font>ligatures} % \trouble{font>ligatures} % \vspace{-1ex} % \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines] % \defaultfontfeatures[\rmfamily]{Ligatures={NoCommon,TeX}} % \defaultfontfeatures[\sffamily]{Ligatures={NoCommon,TeX}} % \defaultfontfeatures[\ttfamily]{Ligatures=NoCommon} % \end{Verbatim} % \end{itemize} % \item For \prog{pdflatex}: % \begin{enumerate} % \item |\usepackage{lmodern}|, or other font-related packages % \DescribePackage{lmodern} % \gindex{font>packages} % \item |\usepackage[T1]{fontenc}| % \DescribePackage{fontenc} % \item |\usepackage[utf8]{inputenc}|, or |latin1|, etc. Or use \pkg{inputenx}. % \DescribePackage{inputenc}\DescribePackage{inputenx} % \item |\usepackage{newunicodechar}| along with related definitions. % \DescribePackage{newunicodechar} % \item To assist with the \PDF-\HTML\ conversion: % \begin{enumerate} % \item |\input glyphtounicode.tex| % \DescribeFile{glyphtounicode.tex} % \item |\input glyphtounicode-cmr.tex% from the pdfx package| % \item |\pdfgentounicode=1| % \end{enumerate} % \item Another option to assist with the \PDF-\HTML\ conversion, such % as the dotless j (\cs{j}): % \trouble[dotless j]{dotless j} % \trouble{j=\cs{j}} % \begin{itemize} % \item |\usepackage{cmap}| \qquad \orelse % \DescribePackage{cmap} % \item |\usepackage{mmap}| \qquad \orelse % \DescribePackage{mmap} % \item |\usepackage[noTeX]{mmap}| % \end{itemize} % \item |\usepackage{textcomp}| % \DescribePackage{textcomp} % ^^A \item \pkg{microtype} is automatically used by \pkg{lwarp} % ^^A \DescribePackage{microtype} % ^^A to turn off f,q,t,T,Q ligatures for the same % ^^A \margintag{ligatures} % ^^A browser-related reasons shown above. Also, the monospaced font is used % ^^A during \HTML\ tag generation to turn off \TeX{} ligatures. % ^^A \gindex{ligatures}\gindex{font>ligatures} % \end{enumerate} % \end{itemize} % \item |\usepackage{newtxmath}| or other math-related font packages. % Many of these load \pkg{amsmath}, which may now be loaded before \pkg{lwarp}. % \item |\usepackage{lwarp}| (\cref{sec:loading}) is placed after any of the above, followed by: % \item |\setmonofont{TeX Gyre Cursor}| or similar may be required if using % \trouble[\pkg{fontspec} with monospaced fonts]{font>monospace} % \trouble{font>ligatures} % \trouble{ligatures} % \trouble{fontspec=\pkg{fontspec}>mono=with monospaced fonts} % \XeLaTeX\ or \LuaLaTeX\ and \pkg{fontspec} along with % traditional font packages such as \pkg{txfonts}, \pkg{newtxtext}, etc. % This is required to turn off the monospaced font's ligatures % with \pkg{fontspec} after loading the traditional font packages. % Monospaced output ligatures must be turned off % to produce the correct \HTML\ characters. % % Any monospace font with built-in ligatures may require these ligatures to % \changes{v0.84}{2020/04/15}{Docs: \brand{JetBrain Mono} font.} % be disabled for \HTML. In one example, \brand{JetBrain Mono}, % \trouble[\brand{JetBrain Mono}]{font>JetBrain Mono=\brand{JetBrain Mono}} % \trouble{jetbrain mono=\brand{JetBrain Mono}} % \trouble[\HTML\ corrupted]{HTML>corrupted} % \trouble{font>ligatures} % it is required to use % \begin{sourcedisplay} % \cs{setmonofont}\{JetBrains Mono\}[\% \\ % \dots \\ % \textgreen{Contextuals=AlternateOff,} \\ % ] % \end{sourcedisplay} % After \pkg{lwarp} is loaded, the ligature may be re-enabled for print mode % by using \cs{setmonofont} again inside a \env{warpprint} environment. % \item \ldots{} the rest of the preamble and the main document. % \end{enumerate} % % In some cases, an external program may require a \UTF-8 ``locale''. % \watchout[UTF-8 locale] % See \cref{sec:utf8locale}. % % % \subsubsection{Indexes, glossaries, and encoding} % \gindex{UTF-8>index} % \gindex{index>UTF-8} % % \pkg{lwarp} supports \prog{makeindex}, \prog{xindy}, \prog{xindex}, % and \pkg{glossaries}, \pkg{gloss}, and \pkg{nomencl}. % % See \cref{sec:indexingoverview} for indexing, and % \cref{sec:glossaries} for the \pkg{glossaries} package. % % % % \clearpage % % \subsection{\pkg{lwarp} package loading and options} % \label{sec:loading} % \gindex{settings>lwarp=\pkg{lwarp} package options} % % \begin{table} % \caption{\pkg{Lwarp} package options\label{tab:options}} % \centering % \renewcommand{\arraystretch}{1.2} % \begin{tabular}{>{\ttfamily}lp{3.25in}} % Option & Description \\ \midrule % mathsvg & Show math using \SVG\ images. \\ % mathjax & Show math using \MathJax. \\ % latexmk & Use \prog{latexmk} for compiling documents. \\ % dvips & Use \prog{dvips} and \prog{ps2pdf} to convert \DVI\ documents. \\ % dvipdfm & Use \prog{dvipdfm} to convert \DVI\ documents. \\ % dvipdfmx & Use \prog{dvipdfmx} to convert \DVI\ documents. \\ % HomeHTMLFilename & The filename of the home page. \\ % HTMLFilename & A prefix for the filenames of the remaining web pages. \\ % ImagesName & A prefix for the filenames of generated images. \\ % ImagesDirectory & The directory used to hold generated images. \\ % PrintLatexCmd & The shell commands for \cmds{lwarpmk print}. \\ % HTMLLatexCmd & The shell commands for \cmds{lwarpmk html}. \\ % \midrule % \multicolumn{2}{l}{\small For indexing (\cref{sec:indexsetup}) and glossaries (\cref{sec:glossaries}):} \\ % makeindex & Use \prog{makeindex} to generate indices. \\ % makeindexStyle & Set a custom style for \prog{makeindex}. \\ % xindy & Use \prog{xindy} to generate indices. \\ % xindyStyle & Set a custom style for \prog{xindy}. \\ % xindyLanguage & The \prog{xindy} language option used for index % ^^A and glossary % generation. \\ % xindyCodepage & The \prog{xindy} codepage option used for index % ^^A and glossary % generation. \\ % xindex & Use \prog{xindex} to generate indices. \\ % xindexConfig & Set a custom configuration file for \prog{xindex}. \\ % PrintIndexCmd & Shell commands executed by \cmds{lwarpmk printindex}. \\ % HTMLIndexCmd & Shell commands executed by \cmds{lwarpmk htmlindex}. \\ % LatexmkIndexCmd & Shell commands executed by \prog{latexmk}. \\ % IndexRef & How to format index links. \\ % GlossaryCmd & Shell command executed by \cmds{lwarpmk printglossary} and \cmds{lwarpmk htmlglossary}. \\ % \midrule % \multicolumn{2}{l}{\small Seldom necessary:} \\ % OSWindows & Force compatibility with \brand{MS-Windows}. \\ % pdftotextEnc & Set the encoding for \prog{pdftotext}. \\ % lwarpmk & Generate a local copy of \filenm{lwarpmk.lua}. \\ % \midrule % \multicolumn{2}{l}{\small Used internally by \pkg{lwarp}:} \\ % warpprint & Generate print output, and also generate configuration files. \\ % warpHTML & Generate \HTML\ output. \\ % BaseJobname & The \cs{jobname} to use. % Set to the \cs{jobname} of the printed version even while generating \HTML. \\ % warpdisable & Disables most of \pkg{lwarp} for testing purposes. \\ % \bottomrule % \end{tabular} % \end{table} % % % \pkg{lwarp} supports \pkg{book}, \pkg{report}, and \pkg{article} classes, % as well as the equivalent Koma-script classes and \pkg{memoir}, and % various CJK-related classes and packages. % % Load the \pkg{lwarp} package immediately after the font and UTF-8 setup commands. % % Package options may be set while loading \pkg{lwarp}, or later with % \begin{sourcedisplay} % \cs{lwarpsetup}\{\meta{key=value, \dots}\} % \end{sourcedisplay} % % \changes{v0.16}{2016/04/08}{Docs: Moved location of \cs{usepackage\{lwarp\}}.} % \changes{v0.19}{2016/05/25}{Docs: Math options.} % \DescribePackage{lwarp} % \gindex{lwarp=\pkg{lwarp}>loading} % \gindex{lwarp=\pkg{lwarp}>options} % \pkg{lwarp} package options are as follows: % % \begin{description}[itemsep=1\baselineskip] % % \item[\optn{mathsvg} \textmd{and} \optn{mathjax}:] % \DescribeOption{mathsvg} % \DescribeOption{mathjax} % \DescribeDefault{mathsvg} % Selects \SVG\ images or \MathJax\ for math display. % See \cref{sec:limitsmath}. % ^^A \DescribeOption{mathKaTeX} % ^^A For math display, select \optn{mathsvg} (default), \optn{mathjax}, % ^^A or \optn{mathKaTeX}. % % \ItemDescribeOption{latexmk} % \DescribeDefault{false} Tells \prog{lwarpmk} to use \prog{latexmk} to recompile the % document several times if necessary. % Otherwise, \prog{lwarpmk} attempts to determing for itself whether to recompile. % See \cref{sec:htmlsettings}. % % \ItemDescribeOption{dvips} % \DescribeDefault{false} Tells \prog{lwarpmk} to use \prog{dvips} and \prog{ps2pdf} to convert % \DVI\ output to \PDF. % % \ItemDescribeOption{dvipdfm} % \DescribeDefault{false} Tells \prog{lwarpmk} to use \prog{dvipdfm} to convert % \DVI\ output to \PDF. % % \ItemDescribeOption{dvipdfmx} % \DescribeDefault{false} Tells \prog{lwarpmk} to use \prog{dvipdfmx} to convert % \DVI\ output to \PDF. % % % \ItemDescribeOption{HomeHTMLFilename} % \DescribeDefault{\cs{BaseJobname}} % % Filename of the homepage, without % the ``\filenm{.html}'' suffix. % Defaults to the \cs{BaseJobname}. A common setting is: % \begin{sourcedisplay} % |HomeHTMLFilename=index| % \end{sourcedisplay} % causing the % homepage to be the file |index.html|. Underscores are allowed in % \margintag{filename underscores} % \optn{HomeHTMLFilename} and \optn{HTMLFilename} options, but may need to be escaped % elsewhere, such as when appearing in a list: % \gindex{underscore>filename}\gindex{filename>underscore in} % \changes{v0.24}{2017/03/13}{Docs: Filename underscore.} % \begin{sourcedisplay} % \cs{item} [\cs{href}\{file\textred{\textbackslash\_}name.pdf\}\{text\}] \textbackslash % \end{sourcedisplay} % See \cref{sec:filenameexamples} for examples of naming and numbering \HTML\ files. % % \ItemDescribeOption{HTMLFilename} % \DescribeDefault{} % A filename prefix for the rest of the \HTML\ web pages. % Useful for numbered web pages with a common prefix. May be empty. % See \cref{sec:filenameexamples} for examples of naming and numbering \HTML\ files. % % % \ItemDescribeOption{ImagesName} % \DescribeDefault{image-} % The prefix for the images automatically generated by \pkg{lwarp} % for objects such as \SVG\ math and \env{lateximage}s. % % % \ItemDescribeOption{ImagesDirectory} % \DescribeDefault{\cs{jobname}-images} % The directory for the images automatically generated by \pkg{lwarp} % for objects such as \SVG\ math and \env{lateximage}s. % By default, these images will appear in a directory named % \filenm{-images}, and the images will be named and numbered % \filenm{image-}. % % % \ItemDescribeOption{PrintLatexCmd} % \DescribeDefault{} Sets the shell commands executed by \cmds{lwarpmk print}. % If not specified, will automatically be set according to the detected \LaTeX\ engine % and the use of \optn{-\/-shell-escape}. % % % \ItemDescribeOption{HTMLLatexCmd} % \DescribeDefault{} Sets the shell commands executed by \cmds{lwarpmk html}. % If not specified, will automatically be set according to the detected \LaTeX\ engine % and the use of \optn{-\/-shell-escape}. % % % \ItemDescribeOption{makeindex} % \DescribeDefault{makeindex} Sets \optn{PrintIndexCmd}, \optn{HTMLIndexCmd}, % and \optn{LatexmkImageCmd} % to use \prog{makeindex} when generating indexes with % \cmds{lwarpmk printindex}, \cmds{lwarpmk htmlindex}, or \prog{latexmk}. % If neither \optn{makeindex} nor \optn{xindy} is used, \optn{makeindex} is assumed. % % % \ItemDescribeOption{makeindexStyle} % \DescribeDefault{lwarp.ist} % If you wish to use a custom |.ist| file for % index generation, see \cref{sec:modifymakeindex}. % % % \ItemDescribeOption{xindy} % \DescribeDefault{makeindex} Sets \optn{PrintIndexCmd}, \optn{HTMLIndexCmd}, % and \optn{LatexmkImageCmd} % to use \prog{xindy} when generating indexes with % \cmds{lwarpmk printindex}, \cmds{lwarpmk htmlindex}, or \prog{latexmk}. % % % \ItemDescribeOption{xindyStyle} % \DescribeDefault{lwarp.xdy} % If you wish to use a custom |.xdy| file for % index generation, see \cref{sec:modifyxindy}. % % % \ItemDescribeOption{xindyLanguage} % \DescribeDefault{english} If using an index or glossary, % see \cref{sec:packageoptions}. % % % \ItemDescribeOption{xindyCodepage} % \DescribeDefault{utf8} If using an index, % ^^A or glossary, % see \cref{sec:packageoptions}. % % % \ItemDescribeOption{xindex} % \DescribeDefault{makeindex} Sets \optn{PrintIndexCmd}, \optn{HTMLIndexCmd}, % and \optn{LatexmkImageCmd} % to use \prog{xindex} when generating indexes with % \cmds{lwarpmk printindex}, \cmds{lwarpmk htmlindex}, or \prog{latexmk}. % % % \ItemDescribeOption{xindexConfig} % \DescribeDefault{} % If you wish to use a custom |xindex-*.lua| file for % index generation, see \cref{sec:modifyxindex}. % % % \ItemDescribeOption{PrintIndexCmd} % \DescribeDefault{} Sets the shell commands executed by \cmds{lwarpmk printindex}. % If not specified, will be set by the selection of \optn{makeindex} or % \optn{xindy}. May be used to specify the creation of multiple indexes. % See \cref{sec:indexsetup}. % % \needspace{2\baselineskip} % Examples: % \begin{sourcedisplay} % \small % makeindex -s lwarp.ist projectname.idx \hfill (\prog{makeindex}) \\ % xindy -M lwarp.xdy -L english -C utf8 projectname.idx \hfill (\prog{xindy}) % \end{sourcedisplay} % % The use of the \optn{makeindex} or \optn{xindy} options sets \optn{PrintIndexCmd} % \margintag{automatic setting} % to sensible values for each of those programs while compiling a single index. % \pkg{lwarp}'s \optn{makeindexStyle}, \optn{xindyStyle}, % \optn{xindyLanguage}, and \optn{xindyCodepage} options will be used if specified. % % If specifying \optn{PrintIndexCmd} manually, % \trouble{PrintIndexCmd} % \trouble[xindy]{xindy=\prog{xindy}>options>PrintIndexCmd=\optn{PrintIndexCmd}} % be sure to assign an \prog{xindy} % language and codepage with the |-L| and |-C| \prog{xindy} options, as the % \pkg{lwarp} \optn{xindyLanguage} and \optn{xindyCodepage} options are not % used for the \optn{PrintIndexCmd} option when it is set manually. % % This option is stored in the configuration files \filenm{lwarpmk.conf} % and \filenm{*.lwarpmkconf}, and is then passed by the \cmds{lwarpmk printindex} % command to the operating system to compile the print indexes. % Since the command string is parsed by \TeX, written to a file, % read from the file by Lua\TeX, and finally passed to the operating system, % any attempt at quoting will be problematic. For complicated commands, % it would be best to create a shell script, and simply refer to the script % with the \pkg{lwarp} \optn{PrintIndexCmd} option. % % % \ItemDescribeOption{HTMLIndexCmd} % \DescribeDefault{} Sets the shell commands executed by \cmds{lwarpmk htmlindex}. % If not specified, will be set by the selection of \optn{makeindex} or % \optn{xindy}. May be used to specify the creation of multiple indexes. % See \cref{sec:indexsetup}. % % \needspace{2\baselineskip} % Example settings are similar to \optn{PrintIndexCmd}, % \trouble[filenames]{HTMLIndexCmd>filenames} % but append |_html| to the filenames: % \begin{sourcedisplay} % \small % makeindex -s lwarp.ist projectname\textred{\_html}.idx \hfill (\prog{makeindex}) \\ % xindy -M lwarp.xdy -L english -C utf8 projectname\textred{\_html}.idx \hfill (\prog{xindy}) % \end{sourcedisplay} % % The use of the \optn{makeindex} or \optn{xindy} options sets \optn{HTMLIndexCmd} % \margintag{automatic setting} % to sensible values for each of those programs while compiling a single index. % \pkg{lwarp}'s \optn{makeindexStyle}, \optn{xindyStyle}, % \optn{xindyLanguage}, and \optn{xindyCodepage} options will be used if specified. % % If specifying \optn{HTMLIndexCmd} manually, % \trouble[xindy]{xindy=\prog{xindy}>options>HTMLIndexCmd=\optn{HTMLIndexCmd}} % be sure to assign an \prog{xindy} % language and codepage with the |-L| and |-C| \prog{xindy} options, as the % \pkg{lwarp} \optn{xindyLanguage} and \optn{xindyCodepage} options are not % used for the \optn{HTMLIndexCmd} option when it is set manually. % % As with \optn{PrintIndexCmd}, to generate complicated indexes it may be % worthwhile to use a shell script, then refer to that script with \optn{HTMLIndexCmd}. % % % \ItemDescribeOption{LatexmkIndexCmd} % \DescribeDefault{} Sets the shell commands executed by \prog{latexmk}. % Unlike \optn{PrintIndexCmd} and \optn{HTMLIndexCmd}, \optn{LatexmkIndexCmd} % does not include any filenames, which will be provided instead by \prog{latexmk}. % See \cref{sec:indexsetup}. % % \needspace{2\baselineskip} % Example settings are similar to \optn{PrintIndexCmd}, but without a filename: % \begin{sourcedisplay} % \small % makeindex -s lwarp.ist \hfill (\prog{makeindex}) \\ % xindy -M lwarp.xdy -L english -C utf8 \hfill (\prog{xindy}) % \end{sourcedisplay} % % The use of the \optn{makeindex} or \optn{xindy} options sets \optn{LatexmkIndexCmd} % \margintag{automatic setting} % to either of the two settings show above. % \pkg{lwarp}'s \optn{makeindexStyle}, \optn{xindyStyle}, % \optn{xindyLanguage}, and \optn{xindyCodepage} options will be used if specified. % Unlike \optn{PrintIndexCmd} and \optn{HTMLIndexCmd}, % \prog{latexmk} uses either of the single-line settings of \optn{LatexmkIndexCmd} % shown above to compile each of multiple indexes if necessary. % % If specifying \optn{LatexmkIndexCmd} manually, % \trouble[xindy]{xindy=\prog{xindy}>options>LatexmkIndexCmd=\optn{LatexmkIndexCmd}} % be sure to assign an \prog{xindy} % language and codepage with the |-L| and |-C| \prog{xindy} options, as the % \pkg{lwarp} \optn{xindyLanguage} and \optn{xindyCodepage} options are not % used for the \optn{LatexmkIndexCmd} option when it is set manually. % % % \ItemDescribeOption{IndexRef} % \DescribeDefault{cref} % \label{sec:optionindexref} % Describes how to display the index entries for \HTML\ output. % Possible values are \optn{ref}, \optn{nameref}, \optn{refnameref}, % \optn{cref}, \optn{crefnameref}, \optn{autoref}, or a text string % such as \optn{(link)} or \optn{(*)} for each index entry reference. % (Adding parentheses around a single character makes the link % larger and easier to click on.) % The default is \optn{cref}, which is available even if the print document % does not use \pkg{cleveref}, as the \pkg{lwarp} package relies on \pkg{cleveref} % during \HTML\ output. % Option \optn{autoref} gives the same results as \optn{cref}. % % \cs{ref} and \cs{cref} to starred or otherwise unknown links will display as % |(*)| instead of |??|. % % If using \optn{cref} (the default), % \trouble[??]{index>?? and non-functional link} % \trouble{index>formatting} % and if a reference appears as |??| with a non-functional link, % use \pkg{cleveref}'s \cs{crefname} to give a name to that type of label. % % In general, \optn{crefnameref} gives the most information, % but the index can become quite verbose. % Using \optn{(*)} or similar yields a very compact index. % % % \ItemDescribeOption{GlossaryCmd} % \DescribeDefault{\cmds{makeglossaries}} Sets the shell command % executed by \cmds{lwarpmk printglossary} and \cmds{lwarpmk htmlglossary}. % The print or \HTML\ glossary filename is appended to this command. % See \cref{sec:glossaries}. % % % \ItemDescribeOption{OSWindows} % \pkg{lwarp} attempts to automatically sense \brand{Windows}, % but it may be forced with this option. % See \cref{sec:OSportabilityusage}. % % % \ItemDescribeOption{pdftotextEnc} % \DescribeDefault{UTF-8} % Used to specify % the encoding used by \prog{pdftotext} during the \PDF-\HTML\ conversion. % In most situations, the default is the correct choice. % % % \ItemDescribeOption{lwarpmk} % If you wish to have \pkg{lwarp} generate a local % copy of \filenm{lwarpmk.lua} for archival or local-installation purposes, % compile the print version with the \optn{lwarpmk} option set. % See \cref{sec:packageoptions}. % % \begin{quote} % \hrule % The following options are used internally by \pkg{lwarp}, and % usually are not used in the user's document: % \smallskip % \hrule % \end{quote} % % % \item[\optn{warpprint} \textmd{and} \optn{warpHTML}:] % \DescribeOption{warpprint} % \DescribeOption{warpHTML} % Usually controlled by \prog{lwarpmk}, and not set in the document. % Select the \optn{warpprint} option to generate print output (default), % or the \optn{warpHTML} option to generate \HTMLfive\ output. % The default is print output, so the print version may be % compiled with the usual \prog{pdflatex}, etc. % When \pkg{lwarp} is loaded in print mode, it creates % |_html.tex|, which sets the \optn{warpHTML} option before calling % the user's source code |.tex|. In this way, |.tex| % can |\usepackage{lwarp}| without any options to create a printed version, % while |_html.tex| will create an \HTML\ version. % % % \ItemDescribeOption{BaseJobname} % \DescribeDefault{\cs{jobname}} Not intended for the user. % Used internally by \pkg{lwarp} when % creating the |*_html.tex| file used to compile the \HTML\ version. % See \cref{sec:packageoptions}. % % \ItemDescribeOption{warpdisable} % Internally disables both \optn{warpprint} and \optn{warpHTML}. % This disables most of \pkg{lwarp}, which may be useful for testing % purposes to see whether \pkg{lwarp} is causing a problem. % % \end{description} % % \clearpage % % \subsection{Customizing the \HTML\ output} % \label{sec:htmlsettings} % \gindex{settings>HTML conversion} % \gindex{HTML>conversion settings} % \gindex{sidetoc=side\TOC>depth} % \gindex{settings>filenames} % % \changes{v0.43}{2017/11/04}{Docs: \HTML\ settings table.} % \changes{v0.43}{2017/11/06}{Docs: Reorganized \HTML\ customization.} % \changes{v0.61}{2018/09/25}{Docs: HTMLDebugComments} % \begin{table}[p] % \caption{\HTML\ settings} % \label{tab:htmlsettings} % \renewcommand{\arraystretch}{1.1} % \begin{threeparttable} % \begin{tabular}{>{\ttfamily}lcp{3in}} % \toprule % Macro \Slash Cntr \Slash Bool & Loc\tnote{*} & Description \\ \midrule % \cs{linkhomename} & P & Name of the link to the homepage. \\ % \cs{linkpreviousname} & P & Name of the link to the previous page. \\ % \cs{linknextname} & P & Name of the link to the next page. \\ % \midrule % SideTOCDepth & P & Sectioning depth of the side\TOC. \\ % \cs{sidetocname} & P & Name of the side\TOC. \\ % \midrule % FileDepth & P & Sectioning depth of the file splits. \\ % CombineHigherDepths & P & Combine higher section levels. \\ % FileSectionNames & P & Use section names for file names, else use numbers. \\ % \cs{FilenameLimit} & P & Maximum length of the generated filenames. \\ % \midrule % FootnoteDepth & P & Sectioning depth of footnotes. \\ % \midrule % \cs{abstractname} & P & The name of the abstract. \\ % \cs{ImageAltText} & PD & \cs{includegraphics} and other images' \attribute{alt} tag. \\ % \cs{ThisAltText} \marg{text} & PD & Assigns an \attribute{alt} \Slash \attribute{title} % tag for the next image or link. \\ % \cs{MathImageAltText} & PD & The \SVG\ math image \env{lateximage} \attribute{alt} tag. \\ % \cs{PackageDiagramAltText} & PD & The suffix for a package's \env{lateximage} \attribute{alt} tags. \\ % \cs{AltTextOpen} & PD & Start an \HTML\ \attribute{alt} tag. \\ % \cs{AltTextClose} & PD & End an \HTML\ \attribute{alt} tag. \\ % \midrule % \cs{CSSFilename} & PS & The \CSS\ for the following files. \\ % \cs{MathJaxFilename} & PS & The \MathJax\ script for the following files. \\ % \midrule % \cs{HTMLLanguage} & PS & The \HTML\ \attribute{lang} tag. \\ % \cs{HTMLTitle} & PS & The homepage's \element{title}, overriding \cs{title}. \\ % \cs{HTMLTitleBeforeSection} & PS & Set subpage \element{title}s to \newline % \fqquad \attribute{\cs{HTMLTitle} - sectionname} \\ % \cs{HTMLTitleAfterSection} & PS & Set subpage \element{title}s to \newline % \fqquad \attribute{sectioname - \cs{HTMLTitle}}\\ % \cs{HTMLAuthor} & PS & The \HTML\ \attribute{author} meta tag, overriding \cs{author}. \\ % \cs{HTMLDescription} & PS & The \HTML\ \attribute{meta} \attribute{description} tag. \\ % \cs{HTMLKeywords} & PS & The \HTML\ \attribute{meta} \attribute{keywords} tag. \\ % \cs{HTMLMeta} & PS & Clear and set the custom \attribute{meta} tag. \\ % \cs{HTMLAddMeta} & PS & Add another \attribute{meta} tag. \\ % \midrule % \cs{HTMLFirstPageTop} & P & Heading for the home page. \\ % \cs{HTMLFirstPageBottom} & P & Footer for the home page. \\ % \cs{HTMLPageTop} & PS & Heading for the other pages. \\ % \cs{HTMLPageBottom} & PS & Footer for the other pages. \\ % \midrule % \cs{HTMLnewcolumntype} & D & \cs{newcolumntype} for \HTML. \\ % \midrule % \cs{IndexPageSeparator} & P & Index page list separator. \\ % \cs{IndexRangeSeparator} & P & Index page range separator. \\ % \midrule % FixSmallCaps & P & Set \optn{true} if small caps rendered as all caps. \\ % HTMLDebugComments & P & Boolean to generate \HTML\ comments. \\ % \bottomrule % \end{tabular} % \begin{tablenotes} % \item [*] % \begin{inlinedesc} % \item [P:] Preamble, % \item [D:] Anywhere in the document. % \item [S:] Before a section. % \end{inlinedesc} \hspace*{\fill} % \end{tablenotes} % \end{threeparttable} % \end{table} % % \Cref{tab:htmlsettings} shows 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!] % \trouble{HTML>settings>changed} % it is best to first: % \begin{enumerate} % \item Clear all the \HTML, \PDF, and auxiliary files: \userentry{lwarpmk cleanall} % \item Recompile the print version in order to recreate % the configuration files for \prog{lwarpmk}: \userentry{lwarpmk print} % \item Finally, recompile the \HTML\ version with the new settings: \userentry{lwarpmk html} % \end{enumerate} % % \begin{description}[style=unboxed] % % \needspace{3\baselineskip} % \item[Placed in the preamble before \texttt{\cs{begin}\{document\}}:] \ % % \begin{description} % % \ItemDescribeMacro{\HTMLFirstPageTop} \marg{contents} \DescribeDefault{} \quad % A user-definable custom action applied % to the top of the home page. Useful for logos, etc. % \cs{LinkNext} may be used to link to the next web page. % Defaults empty. % Ignored in print output. % % \ItemDescribeMacro{\HTMLFirstPageBottom} \marg{contents} \DescribeDefault{} \quad % A user-definable custom action applied % to the bottom of the home page. Useful for logos, etc. % \cs{LinkNext} may be used to link to the next web page. % Defaults empty. % Ignored in print output. % % \ItemDescribeMacro{\linkhomename} \DescribeDefault{Home} % Name of the link to the home page. Paragraphs are allowed. % Redefine with \cs{renewcommand}. % \changes{v0.63}{2018/11/29}{Docs: \cs{linkhomename}.} % % \ItemDescribeMacro{\linkpreviousname} \DescribeDefault{Previous} % Name of the link to the previous page. Paragraphs are allowed. % Redefine with \cs{renewcommand}. % \changes{v0.84}{2020/04/24}{Docs: \cs{linkpreviousname}.} % % \ItemDescribeMacro{\linknextname} \DescribeDefault{Next} % Name of the link to the next page. Paragraphs are allowed. % Redefine with \cs{renewcommand}. % \changes{v0.84}{2020/04/24}{Docs: \cs{linkpreviousname}.} % % \ItemDescribeCounter{tocdepth} Sectioning depth of the table of contents. % See \cref{sec:stackdepths} for a list of \LaTeX{} stack depths. % % \ItemDescribeCounter{SideTOCDepth} \DescribeDefault{1} % 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{side\TOC} % on the side (the ``side\TOC''). Its depth is set by |SideTOCDepth|. % This side\TOC\ is only shown if the browser display is wide enough. % When using a narrow web browser window, % ``responsive web design'' is used to show the side\TOC\ at the top of the % page, as well as a link back to \UI{Home} at the top and bottom. % % \label{sec:filedepth} % It is recommended to set: % \begin{sourcedisplay} % |SideTOCDepth|\,=\,|FileDepth| % \end{sourcedisplay} % or % \begin{sourcedisplay} % |SideTOCDepth|\,=\,|FileDepth|+1 % \end{sourcedisplay} % % If |SideTOCDepth|\,<\,|FileDepth|, % \trouble[inaccessible pages]% % {HTML>missing pages>Side=\optn{SideTOCDepth} and \optn{FileDepth}} % web pages will be inaccessible via the side\TOC. % \trouble{file>inaccessible} % \trouble{page>inacessible} % \trouble{HTML>inaccessible pages} % \trouble{sectioning>missing} % % \ItemDescribeMacro{\sidetocname} \DescribeDefault{Contents} % Name of the side\TOC. Paragraphs are allowed. % Redefine with \cs{renewcommand}. % \changes{v0.63}{2018/11/29}{Docs: \cs{sidetocname}.} % % \ItemDescribeCounter{FileDepth} \DescribeDefault{-5} % Sectioning depth of file splits. % Defaults to -5, causing the entire \HTML\ website to be one single file. % \begin{itemize} % \item To place the entire file into one \HTML\ page, use: % \begin{sourcedisplay} % \cs{setcounter}\{FileDepth\}\{-5\} % \end{sourcedisplay} % \item To split the \HTML\ file at \cs{section} depth, use: % \begin{sourcedisplay} % \cs{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 % \begin{sourcedisplay} % tocdepth\,>=\,FileDepth % \end{sourcedisplay} % \trouble{file>inaccessible} % \trouble{page>inacessible} % \trouble{HTML>inaccessible pages} % \trouble{sectioning>missing} % \end{itemize} % % \ItemDescribeBoolean{CombineHigherDepths} \DescribeDefault{true} % Combine a higher section with % its first lower subsections, down to the |FileDepth|. % Defaults to true. Set to false to simulate the concept of a chapter % opening on its own page, for example. % % The file splits are controlled by the counter |FileDepth| and % the boolean |CombineHigherDepths|. % Setting |FileDepth| to 0 splits the file % at chapters, 1 at sections, etc. |CombineHigherDepths| controls whether % to combine pages at levels higher than the chosen |FileDepth|, such as % in this tutorial where the page which opens the chapter also contains the % first section. % Be careful to set |tocdepth| and |SideTOCDepth| to allow % \trouble[Inaccesible pages!]% % {HTML>missing pages>Side=\optn{SideTOCDepth} and \optn{tocdepth}} % access to each page of the website. Set |tocdepth| and |SideTOCDepth| to be % greater than or equal to |FileDepth|. % % When making changes to the file structure, % \trouble[Lost in an old page!]{HTML>page did not update} % it is possible to end up % with the web browser pointing to an old file which is no longer in use. % When this occurs, changes to the web site will not appear in the browser, % even if reloading the page, because that page is no longer in use. % It is best to return to the home page, clean the files (|lwarpmk cleanall|), % change |FileDepth| and/or |CombineHigherDepths|, then finally recompile and % renavigate to the desired page using the new file structure. % % \ItemDescribeBoolean{FileSectionNames} \DescribeDefault{true} % If true, web page filenames are derived from a sanitized version % of the section names. If false, web pages are numbered. % Either way, the \optn{HTMLFilename} option is used as a prefix. % See \cref{sec:filenameexamples} for examples of naming and numbering \HTML\ files. % The user must ensure that filenames are unique after being sanitized. % \trouble[Unique filename!]{HTML>missing pages>filename not unique} % For example, math in the section name is removed before creating the filename, % so the rest of the filename must be sufficiently unique to avoid name collisions. % \gindex{filename>unique} % % \ItemDescribeMacro{\FilenameLimit} \DescribeDefault{80} % \gindex{filename>length} % The maximum length of the filenames generated by \pkg{lwarp}. % ``\filenm{.html}'' is added to this length. % Redefine with \cs{renewcommand}. % % \ItemDescribeCounter{FootnoteDepth} \DescribeDefault{3} % Determines where to place pending footnotes. % |3| places footnotes before each break down to the \cs{subsubsection} level. % |1| places footnotes before each \cs{section} break. % Any pending footnotes are also placed at the bottom of each page % before each file break. % % \ItemDescribeBoolean{FixSmallCaps} \DescribeDefault{false} % Set |true| if \textsc{Small Caps} are rendering in all caps (``SMALL CAPS''). % May be required for some fonts (\pkg{erewhon}, \pkg{utopia}, \pkg{fbb}, et al.), % and packages such as \pkg{embrac}. % % \ItemDescribeBoolean{HTMLDebugComments} \DescribeDefault{false} % Set |true| to generate \HTML\ comments, such as which section or \element{div} % is being opened or closed. % % \ItemDescribeMacro{\abstractname} \DescribeDefault{Abstract} % The name of the abstract. % This may also be over-written % by the \pkg{babel} package. Defaults to ``|Abstract|''. % Redefine with \cs{renewcommand}. % % \ItemDescribeMacro{\IndexPageSeparator} \DescribeDefault{``, ''} % Index page list separator. Adjust to match index style file. % If using \pkg{gindex}, this is set automatically to \pkg{gindex}'s \cs{indexpagessep}. % % \ItemDescribeMacro{\IndexRangeSeparator} \DescribeDefault{``-\/-''} % Index page range separator. Adjust to match index style file. % If using \pkg{gindex}, this is set automatically to \pkg{gindex}'s \cs{indexrangesep}. % % \end{description} % % \needspace{3\baselineskip} % \item[Placed before \texttt{\cs{begin}\{document\}}, % or before any sectioning command which causes a file break:] \ % % \begin{description} % \ItemDescribeMacro{\CSSFilename} \marg{filename.css} \DescribeDefault{lwarp.css} \quad % Sets the \CSS\ file to use for the following % files. May be changed before each sectioning command which would % cause a file split. % % The \CSS\ styles of the web pages are set by the \cs{CSSFilename} command. % If \cs{CSSFilename} 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{CSSFilename} command to see the default. % \cs{CSSFilename} may be used before each file break to set the \CSS\ for % individual pages of the website. % % \ItemDescribeMacro{\MathJaxFilename} \marg{filename} % \DescribeDefault{\filenm{lwarp_mathjax.txt}} \quad % Sets the \MathJax\ script file to use for the following % files. May be changed before each sectioning command which would % cause a file split. % % The \MathJax\ script file is copied into the head of each \HTML\ file. % This may be used to point to a local repository, add extensions, or change % the script somewhere in the middle of the document. % \cs{MathJaxFilename} may be used before each file break to set the script file for % individual pages of the website. % % \ItemDescribeMacro{\HTMLLanguage} \marg{langauge} \DescribeDefault{en-US} \quad % The \HTML\ file's \HTML\ \attribute{lang} meta tag. % Defaults to \attribute{en-US}. % % \ItemDescribeMacro{\HTMLTitle} \marg{title} \DescribeDefault{\cs{thetitle}} \quad % \gindex{HTML>meta tag>title} % Overrides \cs{title} for the \HTML\ header's meta title. % Defaults to \cs{thetitle}, which is set by \cs{title}, or empty otherwise. % Unlike the author, \cs{thetitle} is set by \cs{title} even if not using the \pkg{titling} package. % % \ItemDescribeMacro{\HTMLTitleBeforeSection} \DescribeDefault{\cs{HTMLTitleBeforeSection}} % Sets subpage \element{title} tags to show the website title followed % by the section name. % % \ItemDescribeMacro{\HTMLTitleAfterSection} % Sets subpage \element{title} tags to show the section name % followed by the website title. % % To customize subpage \element{title}s, redefine \cs{theHTMLTitleSection}, % \margintag{custom \element{title}} % which defaults to: % \gindex{HTML>meta tag>title} % \begin{sourcedisplay} % \cs{def}\cs{theHTMLTitleSection}\{\% \\ % \fquad\cs{theHTMLTitle}\cs{theHTMLTitleSeparator}\cs{theHTMLSection}\% \\ % \} % \end{sourcedisplay} % % \ItemDescribeMacro{\HTMLAuthor} \marg{author} \DescribeDefault{\cs{theauthor}} \quad % The \HTML\ header's meta author. % Defaults to \cs{theauthor}, % which is set by \cs{author} if using the \pkg{titling} package, % but is empty otherwise. % There are several ways to represent the author and affiliations, % especially if using the \pkg{authblk} package, most of which do not result in % a sensible \cs{theauthor}, so \cs{HTMLAuthor} is useful to create a list of % authors without their affiliations. % % \ItemDescribeMacro{\HTMLDescription} \marg{description} \DescribeDefault{} \quad % Sets the \HTML\ \attribute{description} tag for % the following files. May be changed before each sectioning command which would % cause a file split. % % \ItemDescribeMacro{\HTMLKeywords} \marg{keywords} \DescribeDefault{} \quad % Sets the \HTML\ \attribute{keywords} tag for % the following files. May be changed before each sectioning command which would % cause a file split. % % \ItemDescribeMacro{\HTMLMeta} \marg{name} \marg{contents} \DescribeDefault{} \quad % Clears then sets a new user-definable custom \attribute{meta} tag % used for the following pages. % Replaces any prior custom \attribute{meta} tags previously set by \cs{HTMLMeta} % and \cs{HTMLAddMeta}. % % \ItemDescribeMacro{\HTMLAddMeta} \marg{name} \marg{contents} \DescribeDefault{} \quad % Add to the user-definable custom \attribute{meta} tags for the following pages. % May be used more than once to add multiple tags. % Use \cs{HTMLMeta} to empty and start over with a new tag. % % \ItemDescribeMacro{\HTMLPageTop} \marg{contents} \DescribeDefault{} \quad % A user-definable custom action applied to % the top of pages other than the home page. Useful for logos, etc. % Defaults empty. % \cs{LinkHome} may be used to place a link back to the homepage, as well as % \cs{LinkPrevious} and \cs{LinkNext}. % Ignored in print output. % % \ItemDescribeMacro{\HTMLPageBottom} \marg{contents} \DescribeDefault{} \quad % A user-definable custom action applied to the % bottom of pages other than the home page. % Useful for authors, copyright notices, contact information, etc. % Defaults empty. % \cs{LinkHome} may be used to place a link back to the homepage, as well as % \cs{LinkPrevious} and \cs{LinkNext}. % Ignored in print output. % % \ItemDescribeMacro{\LinkHome} Creates a link to the home page. % \gindex{link>home \Slash previous \Slash next page} % \gindex{navigation>link to home \Slash previous \Slash next page} % Usually used in \cs{HTMLPageTop} and related. % % \ItemDescribeMacro{\LinkPrevious} Creates a link to the previous \HTML\ page, % unless already at the home page. % Usually used in \cs{HTMLPageTop} and related. % % \ItemDescribeMacro{\LinkNext} Creates a link to the next \HTML\ page, unless % already at the end. % Usually used in \cs{HTMLPageTop} and related. % % \end{description} % % % \needspace{3\baselineskip} % \item[Placed in the home page before the first sectioning command which causes a file break:] \ % % \begin{description} % \ItemDescribeMacro{\tableofcontents} % Used to place a table of contents on the home page. % This command must be used before the first file split, % \trouble[TOC on the homepage!]{Table of Contents>missing} % \trouble{HTML>inaccessible pages} % so that a way is available to navigate to other files from the homepage. % % Links to each chapter/section are provided, as selected by |tocdepth|. % \end{description} % % % \needspace{2\baselineskip} % \item[Placed in the document wherever necessary:] \ % % \begin{description} % % \ItemDescribeMacro{\ImageAltText} \DescribeDefault{image} % \label{sec:ImageAltText} % Redefine with \cs{renewcommand}. % \describeImageAltText % % \ItemDescribeMacro{\ThisAltText} \marg{text} % \label{sec:ThisAltText} % \describeThisAltText % % \ItemDescribeMacro{\MathImageAltText} \DescribeDefault{math image} % \label{sec:MathImageAltText} % Redefine with \cs{renewcommand}. % \describeMathImageAltText % % \ItemDescribeMacro{\PackageDiagramAltText} \DescribeDefault{diagram} % \label{sec:PackageDiagramAltText} % Redefine with \cs{renewcommand}. % \describePackageDiagramAltText % % \ItemDescribeMacro{\AltTextOpen} \DescribeDefault{(} % Redefine with \cs{renewcommand}. % % \ItemDescribeMacro{\AltTextClose} \DescribeDefault{)} % Redefine with \cs{renewcommand}. % \describeAltTextOpenClose % % \ItemDescribeMacro{\HTMLnewcolumntype} % \cs{newcolumntype} may not always work with \pkg{lwarp} for \HTML\ output, % \trouble{newcolumntype=\cs{newcolumntype}} % \trouble{htmlnewcolumntype=\cs{HTMLnewcolumntype}} % \trouble{array=\env{array}>newcolumntype=\cs{newcolumntype} and \cs{HTMLnewcolumntype}} % \trouble{tabular=\env{tabular}>newcolumntype=\cs{newcolumntype} and \cs{HTMLnewcolumntype}} % \gindex{array=\env{array}>newcolumntype=\cs{newcolumntype} and \cs{HTMLnewcolumntype}} % \gindex{tabular=\env{tabular}>newcolumntype=\cs{newcolumntype} and \cs{HTMLnewcolumntype}} % \gindex{newcolumntype=\cs{newcolumntype} and \cs{HTMLnewcolumntype}} % \gindex{HTMLnewcolumntype=\cs{HTMLnewcolumntype} and \cs{newcolumntype}} % since it often involves \TeX\ boxes and fills. % To provide a simplified column type for \HTML, % add \cs{HTMLnewcolumntype} in addition. % % \ItemDescribeEnv{warpprint} An environment which is only used % while generating print output. Place inside anything which does not % 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. % % \emph{Do not place anything else on the same line as \texttt{\cs{end}\{warpprint\}}}. % \watchout % Also do not nest \env{warpprint} inside itself. % % \ItemDescribeEnv{warpHTML} An environment which is only included % while generating \HTML\ output. This is useful for website logos and % other items which have no purpose in printed output. % % \emph{Do not place anything else on the same line as \texttt{\cs{end}\{warpHTML\}}}. % \watchout % Also do not nest \env{warpHTML} inside itself. % % \ItemDescribeMacro{\warpprintonly} \marg{contents} \quad % A macro version of the \env{warpprint} environment. % % \ItemDescribeMacro{\warpHTMLonly} \marg{contents} \quad % A macro version of the \env{warpHTML} environment. % \end{description} % % \end{description} % % % \subsubsection{Example \HTML\ file naming} % \label{sec:filenameexamples} % \gindex{HTML>filename generation} % \changes{v0.20}{2016/09/11}{Docs: Examples for generating \HTML\ file names.} % % Examples of ways to name or number \HTML\ files: % \begin{description} % \item[Numbered \HTML\ nodes:] \ % % Example: Homepage |index.html|, and |node-1|, |node-2|. % \footnote{See \cs{SetHTMLFileNumber} to number in groups by chapter, for example.} % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] % \usepackage[ % HomeHTMLFilename=index, % HTMLFilename={node-} % ]{lwarp} % \boolfalse{FileSectionNames} % \end{Verbatim} % % \item[Named \HTML\ sections, no prefix:] \ % % Example: |index.html|, and |About.html|, |Products.html| % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] % \usepackage[ % HomeHTMLFilename=index, % HTMLFilename={} % ]{lwarp} % \booltrue{FileSectionNames} % \end{Verbatim} % % \item[Named \HTML\ sections, with prefix:] \ % % Example: Homepage |mywebsite.html|, and additional pages such % as \\ % |mywebsite-About.html|, |mywebsite-Products|, etc. % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] % \usepackage[ % HomeHTMLFilename=mywebsite, % HTMLFilename={mywebsite-} % ]{lwarp} % \booltrue{FileSectionNames} % \end{Verbatim} % \end{description} % % % \subsection{Customizing the \CSS} % \label{sec:csscustomization} % % \DescribeMacro{\CSSFilename} \marg{filename} \DescribeDefault{lwarp.css} % % \cs{CSSFilename} may be used to choose which |.css| file is used to display % each page of the web site. Use \cs{CSSFilename} before |\begin{document}| % to assign the style of the home page. % If different parts of the website should have different styles, % call \cs{CSSFilename} again before each section heading which creates a new file. % This may be changed numerous times throughout the file, resulting in % different \HTML\ pages having different \CSS\ files assigned: % \begin{Verbatim}[gobble=2,tabsize=4] % ... % \CSSFilename{myCSS.css} % \chapter{Another Chapter} % ... % \end{Verbatim} % \gindex{CSS>file selection} % \gindex{CSS>per \HTML\ page} % \gindex{settings>CSS selection} % % The styles provided by \pkg{lwarp} include: % \begin{description} % \item[|lwarp.css|:] A default style if \cs{CSSFilename} is not used. This % style is comparable to a plain \LaTeX\ document. % To set this style, you may use |\CSSFilename{lwarp.css}|, or no \cs{CSSFilename} call at all. % \item[|lwarp\_formal.css|:] A formal style with a serif fonts and a traditional % look. % \item[|lwarp\_sagebrush.css|:] A style with muted colors, gradient backgrounds, % additional borders, and rounded corners. % \end{description} % % To see each style in use, change the \cs{CSSFilename} entry in the tutorial, % |lwarpmk html| again, and then reload the tutorial webpage. % % A customized style may also be created. % \margintag{Custom \CSS} % For each new project a file % called |sample_project.css| is generated. This may be renamed to % |.css| then used by assigning |\CSSFilename{.css}|. % % Note that |sample_project.css| is overwritten whenever \pkg{lwarp} % is loaded in print mode. % It is therefore important to rename the file % \trouble[Rename it!]{sample=\filenm{sample_projects.css}>overwritten} % to something like |.css| before % using it, so that your own changes are not overwritten. % % |.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 \CSS\ may be made by making entries % later in the |.css| file. % % \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 \CSS\ file such as |project.css|, containing only % things which are different from |lwarp.css|. % The file |project.css| should refer to |lwarp.css| as follows: % \gindex{CSS>project-specific changes}\gindex{CSS>lwarp.css=\filenm{lwarp.css}} % \gindex{settings>CSS project-specific} % \vspace{-2ex} % \VerbatimInput[frame=lines]{sample_project.css} % % Finally use |\CSSFilename{.css}| in the document to activate the custom \CSS. % % % \subsection{Assigning \CSS\ classes and styles} % \label{sec:classstyle} % % \gindex{CSS>class=\attribute{class}} % \gindex{CSS>style=\attribute{span}} % \gindex{HTML>class=\attribute{class}} % \gindex{HTML>style=\attribute{style}} % \gindex{HTML>div=\element{div}} % \gindex{HTML>span=\element{span}} % % \HTML\ \CSS\ classes and styles may be assigned to fragments of the document. % % \DescribeEnv{BlockClass} \oarg{style} \marg{class} % % An entire block of text, including paragraphs, may be assigned a \CSS\ class % and optional \CSS\ style using the \env{BlockClass} environment. % The result is placed inside a \element{div}. % A \env{BlockClass} may nest other \env{BlockClass}es or \cs{InlineClass}es. % % \DescribeMacro{\InlineClass} % \parg{\acro{wp} \CSS\ style} \oarg{web \CSS\ style} % \marg{\CSS\ class} \marg{text} % % A section of text without paragraphs may be assinged a \CSS\ class and optional % \CSS\ style using the \cs{InlineClass} macro. % The result is placed inside a \element{span}. % \cs{InlineClass} may be nested, but per the \HTML\ standard it must not contain % \env{BlockClass}, nor may it contain a paragraph, nor several other objects % such as \HTML\ figures. % \cs{InlineClass} also accepts a second optional parameter, enclosed inside % parentheses, which assigns the style while generating output for a word processor, % while ignoring the web style. % % Nullified versions of \env{BlockClass} and \cs{InlineClass} are provided % for the print version, so they may be used in the document without % placing them inside \env{warpHTML} or \cs{warpHTMLonly}. % % % \subsection{Selecting the operating system} % \label{sec:OSportabilityusage} % \changes{v0.11}{2016/03/11}{Added section: Selecting the operating system.} % % \osportabilityusage % % % \subsection{Selecting actions for print, \HTML, or \MathJax\ output} % \label{sec:selectingoutput} % \gindex{settings>selecting print/\HTML\ output} % \changes{v0.15}{2016/04/05}{Docs: Clarify print/\HTML\ output.} % % The following environments and macros are used to select actions which only apply % to either traditional \LaTeX{} print-formatted \PDF\ generation, % or to \HTML\ generation, or to \HTML\ with \MathJax. % % 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 \HTML-only. % % These environments are also useful for creating a special version of % the titlepage for print and another for \HTML. % \DescribeEnv{warpHTML} % Anything which is to be done only for \HTMLfive\ output % is surrounded by a \env{warpHTML} environment: % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] % \begin{warpHTML} % ... something to be done only during \HTML\ generation % \end{warpHTML} % \end{Verbatim} % Do \emph{not} place anything else on the same line as |\end{warpHTML}|. % \trouble[\texttt{\cs{end}\{warpHTML\}}]{warpHTML} % The exact phrase is used to mark the end of the environment. % Do not nest \env{warpHTML} inside itself. \watchout[nesting] % \env{warpMathJax} may be used inside \env{warpHTML}. % % \DescribeEnv{warpprint} % Anything which is to be done only for print output % is surrounded by a \env{warpprint} environment: % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] % \begin{warpprint} % ... something to be done only during traditional \PDF\ generation % \end{warpprint} % \end{Verbatim} % As above, do not place anything else on the line with |\end{warpprint}|. % \trouble[\texttt{\cs{end}\{warpprint\}}]{warpprint} % Do not nest \env{warpprint} inside itself.\watchout[nesting] % % \DescribeEnv{warpall} % Anything which is to be done for any output % may be surrounded by a \env{warpall} environment. Doing so is optional. % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] % \begin{warpall} % ... something to be done during print \PDF\ or \HTML\ output % \end{warpall} % \end{Verbatim} % As above, do not place anything else on the line with |\end{warpall}|. % \trouble[\texttt{\cs{end}\{warpall\}}]{warpall} % Do not nest \env{warpall} inside itself.\watchout[nesting] % % % Macros are also provided for print-only or \HTML-only code: % % \DescribeMacro{\warpprintonly} \marg{actions} % % Performs the given actions only when print output is being generated. % % \DescribeMacro{\warpHTMLonly} \marg{actions} % % Performs the given actions only when \HTML\ output is being generated. % % \DescribeEnv{warpMathJax} % Anything which is to be done only while using \HTML\ output with \MathJax\ is % surrounded by a \env{warpMathJax} environment. % Usually, this is \cs{CustomizeMathJax}, used to add emulation macros. % |\end{warpMathJax}| must appear on its own line. % \trouble[\texttt{\cs{end}\{warpMathJax\}}]{warpMathJax} % Do not nest \env{warpMathJax} inside itself. \watchout[nesting] % \env{warpMathJax} may be used inside \env{warpHTML}. % % \DescribeEnv{warpsvg} % Anything which is to be done only while using print output or % \HTML\ output with \SVG\ math % is surrounded by a \env{warpsvg} environment. % |\end{warpsvg}| must appear on its own line. % \trouble[\texttt{\cs{end}\{warpsvg\}}]{warpsvg} % Do not nest \env{warpsvg} inside itself. \watchout[nesting] % \env{warpsvg} may be used inside \env{warpHTML}. % % To define macros or environments which behave differently depending % \margintag{\cs{LWR@formatted}} % on print or \HTML\ output, see \cref{sec:definingprinthtml}. % % % \subsection{Commands to be placed into the \env{warpprint} environment} % \label{sec:printcommands} % % \changes{v0.14}{2016/03/26}{Docs: Commands into a warpprint environment.} % % Certain print-related commands should always be placed % inside a \env{warpprint} environment, or may need other special handling. % These are unrelated to \HTML\ output, but are hard to isolate automatically. % For example: % % \begin{itemize} % \item Paragraph formatting: \cs{parindent} \cs{parskip} % \item Manual page positions such as the \pkg{textpos} package, which is % emulated but only in a limited way. % \item Anything changing the |page| counter. \pkg{lwarp} requires that the % |page| counter not be adjusted during \HTML\ output. % \end{itemize} % % Some packages require additional setup commands. Where these packages are emulated % 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}. % % % % % % % \subsection{Title page} % \label{sec:settitle} % \gindex{settings>title page} % % In the preamble, place an additional block of code to set the following: % \vspace{-2em} % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] % \title{Document Title} % One line only % \author{Author One\affiliation{Affiliation One} \and % Author Two\affiliation{Affiliation Two} } % \date{Optional date} % \end{Verbatim} % % The title is used in the meta tags in the \HTML\ files, % unless overridden by \cs{HTMLTitle}, and the rest are used in \cs{maketitle}. % To use a \cs{subtitle} or \cs{published} field, see \cref{sec:publishedsubtitle}. % % % \DescribeMacro{\maketitle} % Use \cs{maketitle} just after the |\begin{document}|, as this will establish % the title of the homepage. Optionally, use a \env{titlepage} environment instead. % % \DescribeEnv{titlepage} % The \env{titlepage} environment may be used to hold a custom title page. % The titlepage will be set in a \element{div} class |titlepage|, and \cs{printtitle}, etc.\ may be used % inside this environment. % % \DescribeEnv{titlingpage} % Another form of custom title page, where \cs{maketitle} is allowed, and % additional information may be included as well. % % \DescribeMacro{\title} \marg{title} % % Avoid newlines in the \cs{title}; these will interfere with the % \trouble[\HTML\ corrupted]{HTML>corrupted} % file break and \CSS\ detection. % \trouble[newlines]{title>newlines} % Use a \cs{subtitle} command instead (\cref{sec:publishedsubtitle}). % The title will appear in the document \cs{maketitle} as a heading \element{h1}. % The \HTML\ meta |title| tag will also have this title, unless \cs{HTMLTitle} % is used to set the meta title to something else instead. % % \DescribeMacro{\author} \marg{author} % % In \cs{author}, \cs{protect} may be needed before some formatting commands. % \trouble{author>formatting} % In \HTML, the author will appear in a \element{div} of class |author| in the % \cs{maketitle}. % If the \pkg{titling} package is used, the author will also appear in a \HTML\ meta tag, but % \cs{HTMLAuthor} may be necessary to create a plain list of names if % \cs{author} had affiliations added. % \cs{affiliation} is a new addition to \pkg{lwarp}. % % \DescribeMacro{\date} \marg{date} % % \cs{date} works as expected. % In \HTML, this will appear in a \element{div} class |titledate|. % % % \DescribeMacro{\thanks} \marg{text} % % \cs{thanks} are allowed in the titlepage fields, and will be rendered % as \HTML\ notes at the bottom of the title page. % % % \subsection{\HTML\ page meta descriptions} % % \label{sec:htmldescription} % \gindex{HTML>meta tag>description} % \gindex{description>HTML meta tag} % \gindex{meta tag, HTML>description} % \DescribeMacro{\HTMLDescription} \marg{A description of the web page.} % \DescribeDefault{(none)} % % Each page of \HTML\ output should have its own \HTML\ meta description, % which usually shows up in web search results. % \margintag{limitations} % Usually limited to around 150 characters in length, % and should not include the \acro{ASCII} double quote character ("). % % Use \cs{HTMLDescription} % \margintag{placement} % just before |\begin{document}| to set the description of the home page, % 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{HTMLDescription} just before each \cs{section} command, and that description will be % 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{HTMLDescription}. It is best % to use a unique description for each \HTML\ file. % % To disable the generation of \HTML\ description meta tags, % \margintag{disabling} % use: % \begin{sourcedisplay} % \fqquad \cs{HTMLDescription}\{\} % \end{sourcedisplay} % % % \subsection{\HTML\ page meta keywords} % % \label{sec:htmlkeywords} % \gindex{HTML>meta tag>keywords} % \gindex{keywords>HTML meta tag} % \gindex{meta tag, HTML>keywords} % \DescribeMacro{\HTMLKeywords} \marg{Keywords for the web page.} % \DescribeDefault{(none)} % % \cs{HTMLKeywords} behaves like \cs{HTMLDescription}, but adds \HTML\ meta keywords % for the following web pages. % % To disable the generation of \HTML\ keyword meta tags, % \margintag{disabling} % use: % \begin{sourcedisplay} % \fqquad \cs{HTMLKeywords}\{\} % \end{sourcedisplay} % % % \subsection{\HTML\ homepage meta title} % % \gindex{HTML>meta tag>title} % \gindex{title>HTML meta tag} % \gindex{meta tag, HTML>title} % \DescribeMacro{\HTMLTitle} \marg{title} % \DescribeDefault{\texttt{\cs{HTMLtitle}\{\cs{thetitle}\}}} % % Sets the contents of the web page \element{meta name="title"} element. % May be set empty to cancel the meta title tag. % % See \cref{sec:htmlsettings} for \cs{HTMLTitleBeforeSection} and % \cs{HTMLTitleAfterSection}, used to set the title for \HTML\ subpages. % % % \subsection{\HTML\ page meta author} % % \gindex{HTML>meta tag>author} % \gindex{author>HTML meta tag} % \gindex{meta tag, HTML>author} % \DescribeMacro{\HTMLAuthor} \marg{author} % \DescribeDefault{\texttt{\cs{HTMLAuthor}\{\cs{theauthor}\}}} % % Sets the contents of the web page \element{meta name="author"} element. % May be set empty to cancel the meta author tag. % % \cs{author} may be used to create a list of authors and their affiliations, % in several formats if using \pkg{authblk}, and these may not successfully parse % properly into a sensible list for \cs{theauthor}. % \cs{HTMLAuthor} may be used to set the meta tag to a simple list of names. % % % \clearpage % % \section{Special cases and limitations} % \label{sec:limitations} % % \label{sec:successfulcommands} % \gindex{HTML>conversion suggestions} % % \changes{v0.14}{2016/03/26}{Docs: Commands for a successful \HTML\ conversion.} % \changes{v0.36}{2017/08/11}{Docs: Reorganized: Special cases and limitations.} % % Some commonly-used \LaTeX{} expressions should be modified as follows to allow % for a smooth conversion to both \HTML\ and print-formatted outputs. % % \needhelp % % \subsection{Things to avoid} % \label{sec:thingstoavoid} % \changes{v0.51}{2018/03/04}{Docs: Things to avoid.} % % In the document, avoid the following: % % \begin{description} % \item [Package options:] \ % \trouble[options with braces]{options>with braces} % \trouble{caption=\pkg{caption}>options} % \trouble{package>options with braces} % \trouble{Missing \cs{begin}\{document\}>package options} % \limitspackageloading % \item [\texttt{page} counter:] Do not adjust the \texttt{page} counter. % If doing so is required for the print version, place the % adjustment inside a \env{warpprint} environment. % \item [Custom math environment macros:] Do not use expressions such as % \cs{beq} as a replacement for \texttt{\cs{begin}\{equation\}}. % \item [Custom macros in section, figure, table names:] Custom macros which appear in % sectioning commands or float captions then appear in the % \filenm{.toc}, \filenm{.lof}, and \filenm{.lot} lists, and should be made robust % using \cs{newrobustcmd} or \cs{robustify} from \pkg{etoolbox}, \pkg{xparse}, etc. % % \changes{v0.54}{2018/04/21}{Docs: Macros in sectioning names.} % When setting |FileSectionNames| to |true| to name the \HTML\ files from the % section names, the file names are created from sanitized versions of the chapter % or section names, but the section names must be plain text or something % which expands into plain text. Robust macros will not work at the sectioning % level which is used for file names, but a robust macro or other complicated % name may be used for the manditory argument of \cs{chapter}, \cs{section}, etc., % if a plain-text version is also included in the optional argument: % \begin{sourcedisplay} % \cs{chapter}[Plain Name]\{\cs{ARobustMacro\{Fancy Name\}}\} % \end{sourcedisplay} % \end{description} % % % \subsubsection{Invalid \HTML} % \label{sec:invalidhtml} % % \trouble{HTML>invalid} % \trouble{HTML>validation} % Additionally, some objects are valid \LaTeX, but invalid \HTML. % An example is a tabular inside \cs{textbf}, since \HTML\ does not allow a table % inside a span. \pkg{lwarp} will create the table, and the browser may support it, % but the result is technically invalid. % % % % \subsection{Formatting} % % \subsubsection{Text formatting} % \label{sec:avoidtextformatting} % \gindex{code listings} % \gindex{program listings} % \gindex{listings, program code} % \gindex{HTML>entities, conversion} % \gindex{HTML>verbatim, in} % \gindex{verbatim>code and \HTML\ tags} % % \changes{v0.61}{2018/09/25}{Docs: \HTML\ entities.} % % \limitstext % % % \subsubsection{Small caps} % % \DescribeBoolean{FixSmallCaps} % \trouble{font>small caps} % \trouble{small caps} % \trouble{font>CJK} % \trouble{CJK>font} % Some fonts, such as \pkg{erewhon}, \pkg{utopia}, or \pkg{fbb}, and some packages % such as \pkg{embrac}, copy/paste ``\textsc{Small Caps}'' % as all caps (``SMALL CAPS''), % which \pkg{lwarp} then reads as all caps, so the text is printed in all caps. % If small caps are being rendered as all caps, set: % \begin{sourceverb} % \booltrue{FixSmallCaps} % \end{sourceverb} % Some CJK fonts may not work if \bool{FixSmallCaps} is set \optn{true}. % \watchout[CJK fonts] % \trouble{Chinese>font} % \trouble{Japanese>font} % \trouble{Korean>font} % % % \subsubsection{Horizontal and vertical space and rules} % % \DescribeMacro{\hspace} % \gindex{space>horizontal and vertical} % \gindex{horizontal and vertical space} % \gindex{vertical space} % \cs{hspace} is converted to an inline \HTML\ span of the given width, % except that \texttt{0} width is ignored, % a width of \texttt{.16667em} is converted to % an \HTML\ thin breakable space (\texttt{U+2009}), % and a \cs{fill} is converted to a \cs{qquad}. % % \DescribeMacro{\vspace} % \cs{vspace} is ignored for \HTML. % % \gindex{\texttt{\textasciitilde}} % \gindex{\cs{,}} % \marginpar{\hspace*{\fill}\texttt{\~}} % \DescribeMacro{\,} % \texttt{\~} and \cs{,} are converted to \HTML\ entities. % % \DescribeMacro{\kern} % \DescribeMacro{\hskip} % \cs{kern} and \cs{hskip} are entered into the \HTML\ \PDF\ output as-is, % then interpreted by \prog{pdftotext}, and thus usually appear as a single space. % % \DescribeMacro{\rule} % \cs{rule} is converted to an \HTML\ rule of the same dimensions, % of the currently selected text color. % % \DescribeMacro{\hrule} % \DescribeMacro{\vrule} % \trouble{hrule=\cs{hrule}} % \gindex{hrule=\cs{hrule}} % Both \cs{hrule} and \cs{vrule} are ignored for \HTML. % To create a horizontal dividing rule across the page, % use \cs{hrulefill} in its own paragraph. % % \DescribeMacro{\hrulefill} % \gindex{rule>horizontal} % \gindex{horizontal rule} % \cs{hrulefill} usually creates a one-inch rule, similar to a ``fill in the blank''. % If it is used at the start of a new paragraph, it creates a \element{div} % with a thin horizontal border across the page, as would often be done with \cs{hrule}. % % % \subsubsection{Text alignment} % % Use the environments \env{center}, \env{flushright}, \env{flushleft} instead % of the macros \cs{centering}, \cs{raggedright}, \cs{raggedleft}. % % \limitsfloatalignment % % % \subsubsection{Accents} % % \limitsaccents % % % \subsubsection{\pkg{textcomp} package} % % \DescribePackage{textcomp} % \limitstextcomp % % \subsubsection{Superscripts and other non-math uses of math mode} % % Use \cs{textsuperscript\{x\}} instead of |$^{x}$| % % \subsubsection{Empty \cs{item} followed by a new line of text or a nested list:} % % Use a trailing backslash: |\item[label] \| % \margintag{lists} % \trouble{list>empty item} %% % % \subsubsection{\pkg{relsize} package} % % \DescribePackage{relsize} % \limitsrelsize % % % \subsection{Boxes and minipages} % % \subsubsection{Marginpars} % % \limitsmarginpars % % \subsubsection{Save Boxes} % % \changes{v0.27}{2017/04/04}{Docs: Limitations of saveboxes.} % % \limitssaveboxes % % % \subsubsection{Minipages} % \label{sec:minipages} % % \limitsminipage % % % \subsubsection{Side-by-side minipages} % % 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 % \HTML. Do not use space commands at the start or end of the line. % % \subsubsection{Framed minipages and other environments} % \label{sec:framedminipages} % % \cs{fbox} can only be used around inline \element{span} items during % \HTML\ output, but \HTML\ cannot place a block element such as a \element{div} for a minipage % or a list inside of a \element{span}. Several options are provided for framing an object, % depending on which kind of object and which packages are loaded: % % For a framed object, options include: % \DescribeMacro{\fbox} % \DescribeMacro{\fboxBlock} % \DescribeEnv{fminipage} % \gindex{minipage>framed} % \gindex{framed objects} % \trouble{frames} % \begin{description}[style=unboxed] % \item [To remove the frame in \HTML\ output:] Place the \cs{fbox} command and % its closing brace inside \env{warpprint} environments. % This will nullify the frame for \HTML\ output. % \item [To frame the contents inline with some formatting losses in HTML:] % This is the default action of \cs{fbox} when enclosing a minipage. % \margintag{For inline text:} % During \HTML\ output, \cs{fbox} nullifies the \HTML\ tags % for \env{minipage}, \cs{parbox}, % and lists. The contents are included as inline text inside the % \cs{fbox}'s \element{span} of class |framebox|. % For lists, line breaks are converted to \HTML\ breaks. % The result is a plain-text inline version of the contents, framed inline % with the surrounding text, but lacking any extra \HTML\ markup. % \item [To frame the contents on their own line with improved formatting in HTML:] A new % command \cs{fboxBlock} is included, % \margintag{For inline \env{minipage} and lists:} % intended to be a direct replacement % for \cs{fbox} for cases where the \cs{fbox} surrounds a minipage, table, or list. % For print output, this behaves as \cs{fbox}. % For \HTML\ output, the contents are placed % inside an \HTML\ \element{div} with the class |framed|, resulting in the contents % being placed on their own line with a frame surrounding them. % The contents preserve their \HTML\ formatting, so lists and minipages look nicer, % and valid \HTML\ is created for a \env{tabular}. % While an \cs{fbox} containing a \env{tabular} is valid \LaTeX\ code, the result % in \HTML\ is problematic since a table is a \element{div} not a \element{span}, % so use \cs{fboxBlock} around a \env{tabular}, or else place the \env{tabular} % inside a \env{minipage}, or use \env{fminipage}, described next. % Also see below regarding the ``Misplaced alignment tab character \&.'' error. % \item [To create a framed minipage in both print and HTML:] A new environment \env{fminipage} % \margintag{For display \env{tabular}, minipages, and lists:} % is included. For print output, this is identical to \env{minipage}, except that % it is also framed. % For \HTML\ output, this forms a \element{div} of class |framed|, the contents % preserve their \HTML\ formatting, and valid \HTML\ is created for a \env{tabular}. % Also see \cref{sec:xcolorpatches} for a new environment \env{fcolorminipage}. % Also see below regarding the ``Misplaced alignment tab character \&.'' error. % \item [To create colored frames and boxes:] See \cref{sec:xcolor} for \pkg{xcolor}'s % \margintag{colored boxes and frames:} % \cs{colorbox} and \cs{fcolorbox}, % and \pkg{lwarp}'s additional \cs{colorboxBlock} and \cs{fcolorboxBlock}. % \item [To frame tables or verbatim environments:] Place the contents % inside a \env{fminipage}, or perhaps a \cs{fboxBlock} for a \env{tabular}. % Also, if using \cs{fboxblock} with \env{tabular}, % \trouble[Misplaced alignment tab character \&] % {Misplaced alignment tab character \&>frames} % you will have to use \cs{StartDefiningTabulars} % before the start of the macro which uses \cs{fboxBlock} and the \env{tabular}, % and \cs{StopDefiningTabulars} afterwards. % Also see the \pkg{lwarp} documentation for the \pkg{fancybox} package. % \item [To frame equations:] See \cref{sec:fancybox} for the \pkg{fancybox} package. % \item [For fancy framed minipages:] See packages \pkg{boxedminipage}, % \pkg{shadow}, \pkg{fancybox}, \pkg{framed}, \pkg{mdframed}. % \item [Custom environments:] Use a custom environment to create a sidebar, % containing a \env{BlockClass} environment % with custom \CSS\ formatting, % and |\warpprintonly{\hrule}| command: % \begin{Verbatim}[gobble=2,frame=lines] % \begin{BlockClass}{frameminipage}% ignored in print output % % use \CSS\ to format div class framedminipage % \warpprintonly{\hrule} % only appears in print output % Contents % \warpprintonly{\hrule} % only appears in print output % \end{BlockClass} % \end{Verbatim} % \end{description} % % % \subsubsection{\pkg{fancybox} package} % % \DescribePackage{fancybox} % \limitsfancybox % % % \subsubsection{\pkg{mdframed} package} % % \DescribePackage{mdframed} % \limitsmdframed % % \subsubsection{\pkg{tcolorbox} package} % \label{sec:limitstcolorbox} % % \DescribePackage{tcolorbox} % \trouble{tcolorbox=\pkg{tcolorbox}} % \pkg{tcolorbox} is emulated for \HTML\ and \MathJax, and % supported as-is inside a \env{lateximage} or \SVG\ math. % % What has been tested to work (at least partly) includes: % \begin{itemize}[nosep] % \item \env{tcolorbox}, \cs{tcbox}. % \item Title, subtitle. % \item Upper, lower parts. % \item Colors and title fonts. % \item Floating objects. % \item Some layered box features. % \item Counters, labels, references. % \item \pkg{listings}, \pkg{listingsutf8}. % \item \optn{theorems}: % Theorems are supported. % \optn{math}, \optn{ams equation}, etc.\ are not supported. \watchout[math] % Use a \env{tcolorbox} with regular math inside it. % \cs{tcboxmath} and \cs{tcbhighmath} are suppored in \SVG\ math, and % emulated in \MathJax. % \item Fitting features: \cs{tcboxfit} becomes \cs{tcbox} in \HTML. % \item Footnote numbering does not match the printed output.\watchout[footnotes] % \item \MathJax\ emulation is provided for common macros. % \end{itemize} % % If using \pkg{cleveref}, % \trouble[undefined references]{reference>undefined>tcolorbox=\pkg{tcolorbox}} % it may be necessary to name theorems such as: % \begin{sourceverb} % \crefname{tcb@cnt@mytheo}{my theorem}{my theorems} % \end{sourceverb} % % % % \subsection{Section names} % \label{sec:limitssectionnames} % % If using named \HTML\ files, by selecting |\booltrue{FileSectionNames}|, % several steps should be taken to avoid problematic file names. % % \subsubsection{Formatting in section names} % % When using special formatting in the section name, % \trouble[macros in section names]{sectioning>macro in name} % use the optional short form: % \begin{sourceverb} % \section[Simplified name]{Fancy name with formatting} % \end{sourceverb} % Remember to \cs{protect} \LaTeX\ commands which appear in % section names and \TOC\ captions. % % \subsubsection{Math in section names} % % \limitsmathinsectionnames % % \subsubsection{Simplifying file names} % % The generated filenames may be simplified by using \cs{FilenameSimplify} % and \cs{FilenameNullify}: % % \DescribeMacro{\FilenameSimplify} \marg{text} % \gindex{filename>simplify} % \gindex{section>file names} % % To remove common short words from the automatically-generated filenames, % replacing each with a single hyphen ``|-|'', % use \cs{FilenameSimplify}: % \begin{sourceverb} % \FilenameSimplify*{-in-} % \FilenameSimplify*{A-} % \end{sourceverb} % The first example removes the word ''in'' in the middle of a filename, % and the second example removes ``A'' at the start of the filename. % The star forces the arguments to be detokenized, which is required for % a plain-text comparison. % (The unstarred form is used for a token-sensitive comparison, which is % seldom required by the user.) % After simplfication, repeated hyphen characters will be further simplified % to a single hyphen ``|-|''. % Finally, single hyphens at the start or end of the filename are removed. % % \DescribeMacro{\FilenameNullify} \marg{macros} % % Macro names may appear in the automatically-generated file names. % \trouble{filename>corrupted} % \trouble{filename>macro in name} % To remove these, create \emph{non-robust} nullified versions % of the macros, % ensuring that each line ends with a percent character |%| as shown below. % These are placed inside \cs{FilenameNullify}, which adds them to the % list of macros which are nullfiied during filename generation. % Low-level macros such as \cs{begingroup} will cause problems when % nullfied. Many macros such as \cs{textbf} are already nullfied. % \pkg{lwarp} also already nullifies built-in symbol and \pkg{textcomp} macros, % including if defined by \pkg{xunicode}, but not all \pkg{xunicode} macros. % See the definition of \cs{LWR@nullfonts} for a complete list. % \begin{sourcedisplay} % \cs{FilenameNullify}\{\textred{\%}\\ % \fquad\cs{renewcommand*}\{\cs{macroname}\}[1]\{\#1\}\textred{\%}\\ % \fquad\cs{renewcommand*}\{\cs{anothermacro}\}\{\}\textred{\%}\\ % \} % \end{sourcedisplay} % % \subsubsection{Preventing duplicate file names} % \label{sec:limitssectionnamesduplicates} % % Section names at levels which result in \HTML\ file splits may % \trouble[duplicate filename]{filename>duplicate} % \trouble{duplcate filename} % \trouble{sectioning>duplicate name} % be duplcates, but the resulting file names must be unique. % \pkg{lwarp} will generate a warning if a duplicate section name occurs, % then \pkg{lwarp} will append a unique file number to the resulting file name, % thus avoiding file name clashes. % These unique file numbers may change as sections are added or removed. % As a result, old and orphaned HTML files may be left behind. % To remove these leftover files, use \cmds{lwarpmk cleanall} and recompile. % Also, as file names are adjusted, external links from outside to these % files may be broken. % To use fixed file names, use the optional short-form name, % or use \cs{texorpdfstring} from \pkg{hyperref}: % \begin{sourceverb} % \section[Unique Name]{Duplicate name} % \section{\texorpdfstring{Duplcate Name}{Unique Name}} % \end{sourceverb} % % % \subsection{Cross-references} % % \limitsreferences % % \subsubsection{Page references} The printed page does not translate % to the \HTML\ % \trouble[\LaTeX\ page numbers]{page counter>references} % page, so \cs{pageref} references are converted to parentheses containing % \cs{pagerefPageFor}, which defaults to ``see~'', % followed by a hyperlink to the appropriate % object. % % Ex: % \begin{sourcedisplay} % \cs{ref}\{sec:name\} on page \cs{pageref}\{sec:name\} \\ % \rmfamily % \hspace*{-2em} in \HTML\ becomes: \\ % ``Sec.~\textred{1.23} % on page (\textbf{see} % sec.~\textred{1.23})''. % \end{sourcedisplay} % \cs{pagerefPageFor} may be redefined to ``page for '', empty, etc. % See \cpageref{sec:pagerefpagefor}. % % % \subsubsection{\pkg{cleveref} and \pkg{varioref} packages} % % \changes{v0.22}{2017/03/01}{\pkg{varioref}: Supported.} % % \DescribePackage{cleveref} % \DescribePackage{varioref} % \limitscpageref % % \pkg{cleveref} changes the behavior of \pkg{varioref} in that % \trouble[\pkg{varioref} types]{varioref=\pkg{varioref}} % the reference type is automatically printed if \pkg{cleveref} is loaded. % \pkg{Lwarp} requires \pkg{cleveref}, so the \HTML\ version will always % automatically print the reference types even if the print mode does not. % The simplest way to make them match is to require the \pkg{cleveref} package % for the document. % % \subsubsection{Hyperlinks, \pkg{hyperref}, and \pkg{url}} % % \DescribePackage{hyperref} % \DescribePackage{url} % \limitshyperlinks % % % \subsubsection{Footnotes, endnotes, and page notes} % \label{sec:limitsfootnotes} % % \trouble{footnote>numbering} % \gindex{footnotes>numbering} % \gindex{footnotes>mathjax=\MathJax} % \trouble{footnote>in sectioning command} % \trouble{mathjax=\MathJax>footnotes} % \trouble{math>footnote>mathjax=\MathJax} % \trouble{footnote>mathjax=\MathJax} % \trouble{sidenotes=\pkg{sidenotes}>numbering} % % \limitsfootnotes % % \trouble{footnote>verbatim} % \trouble{verbatim>footnote} % \trouble{footnote>in math} % \trouble{math>footnote} % \limitsverbatimfootnotes % % \limitspfnote % % \limitsmanyfootbigfoot % % % \subsubsection{\pkg{xr}, \pkg{xr-hyper}, and \pkg{xcite} packages} % % See \cref{sec:multipleprojects}. % % % \subsection{Front and back matter} % \label{sec:frontbackmatter} % % \subsubsection{Custom classes with multiple authors and affiliations} % \label{sec:authorsaffils} % \changes{v0.51}{2018/03/04}{Docs: Multiple authors and affiliations.} % % Some classes allow multiple authors and affiliations. % \gindex{author>multiple}\gindex{affiliation>multiple authors} % Often it is possible to emulate these using a standard class % along with \pkg{authblk}: % \begin{sourcedisplay} % \%\cs{documentclass}\{customclass\}~\% for print document \\ % \cs{documentclass}\{article\}~\% for \HTML\ document \\ % \\ % \cs{usepackage}\{lwarp\} \\ % \cs{begin}\{warpHTML\} \\ % \cs{usepackage}\{authblk\} \\ % \cs{let}\cs{affiliation}\cs{affil}~\% maybe required \\ % \cs{end}\{warpHTML\} % \end{sourcedisplay} % % \subsubsection{Starred chapters and sections} % \label{sec:forcesectionstar} % % \changes{v0.38}{2017/08/24}{Docs: Starred sections.} % % The following describes \cs{ForceHTMLPage} and \cs{ForceHTMLTOC}, % \margintag{\HTML\ page and \TOC} % which may be used for \pkg{endnotes}, \pkg{glossaries}, \pkg{tocbibind}, % bibliographies, and the index. % See the following sections where applicable. % Continue here if interested in the reason for adding these commands to \pkg{lwarp}. % \trouble{endnotes=\pkg{endnotes}>HTML=\HTML\ page and \TOC} % \trouble{glossaries=\pkg{glossaries}>HTML=\HTML\ page and \TOC} % \trouble{bibliography>HTML=\HTML\ page and \TOC} % \trouble{index>HTML=\HTML\ page and \TOC} % \gindex{endnotes>HTML=\HTML\ page and \TOC} % \gindex{glossaries=\pkg{glossaries}>HTML=\HTML\ page and \TOC} % \gindex{bibliography>HTML=\HTML\ page and \TOC} % \gindex{index>HTML=\HTML\ page and \TOC} % % Some packages use \cs{chapter*} or \cs{section*} to introduce reference % material such as notes or lists, often to be placed in the back matter of a book. % These starred sections are placed inline instead of on their own \HTML\ pages, % and they are not given \TOC\ entries. % % \pkg{lwarp} provides a method to cause a starred section to be on its own \HTML\ page, % subject to \texttt{FileDepth}, and also a method to cause the starred section % to have its own \TOC\ entry during \HTML\ output. % % \DescribeMacro{\ForceHTMLPage} % To place a starred section on its own \HTML\ page, use \cs{ForceHTMLPage} just before % the \cs{chapter*} or \cs{section*}. \pkg{lwarp} will create a new page for the % starred sectional unit. % % A starred sectional unit does not have a \TOC\ entry unless one is placed % manually. The typical method using \cs{phantomsection} and \cs{addcontentsline} % works for inline text but fails when the new starred section is given its own % webpage after the \TOC\ entry is created, or when creating an \EPUB\ where % the \TOC\ entry will point to the page before the starred section. % If the starred section has its own \HTML\ page but no correct \TOC\ entry % \trouble[inaccessible \HTML\ page]{HTML>inaccessible pages>starred section} % \trouble{sectioning>starred section} % pointing to that page, the page will be inaccessible unless some other link is created. % % \DescribeMacro{\ForceHTMLTOC} % To automatically force the \HTML\ version of the document to have a \TOC\ entry % for a starred section, use \cs{ForceHTMLTOC} just before % the \cs{chapter*} or \cs{section*}, % and place \cs{phantomsection} and \cs{addcontentsline} inside a \env{warpprint} % environment. % % For print output, \cs{ForceHTMLTOC} and \cs{ForceHTMLPage} have no effect. % % % % \subsubsection{\pkg{abstract} package} % % \DescribePackage{abstract} % \limitsabstract % % % \subsubsection{\pkg{titling} and \pkg{authblk}} % % \DescribePackage{titling} % \DescribePackage{authblk} % \limitstitlepage % % % \subsubsection{\pkg{tocloft} package} % % \DescribeOption[tocloft]{titles} % \DescribePackage{tocloft} % \limitstocloft % % % \subsubsection{\pkg{appendix} package} % % \DescribePackage{appendix} % \limitsappendix % % % \subsubsection{\pkg{pagenote} package} % % \DescribePackage{pagenote} % \limitspagenote % % % \subsubsection{\pkg{endnotes} package} % % \DescribePackage{endnotes} % \trouble{endnotes=\pkg{endnotes}>numbering} % \limitsendnotes % % % \subsubsection{\prog{BibTeX}} % \label{sec:limitsbibtex} % % \trouble{bibtex=\pkg{bibtex}>Update bibliography} % \trouble{bibliography>update} % \gindex{bibtex=\pkg{bibtex}>Update bibliography} % \gindex{bibliography>update} % To update the \HTML\ version of the bibliography: % \userentry{bibtex \_html} % \changes{v0.913}{2023/10/01}{Docs: Update a bibliography.} % % \DescribeMacro{\etalchar} Displays a superscript ``+'' to indicate ``and others''. % \changes{v0.54}{2018/03/09}{Docs: BibTeX.} % % When enough authors are cited for a source, % \watchout[Modify *.bib] % \trouble{Improper \cs{prevdepth}>bibtex=\pkg{bibtex}} % \trouble{bibtex=\pkg{bibtex}>Improper \cs{prevdepth}} % \trouble{bibtex=\pkg{bibtex}>\cs{etalchar}} % \trouble{etalchar=\cs{etalchar}} % \BibTeX\ may use the \cs{etalchar} command % to display a math superscript with a $+$ character to indicate ``and others''. % Without modification, this will result in an ``Improper \cs{prevdepth}'' error. % At present, \pkg{lwarp} requires that \cs{etalchar} be replaced by a text superscript. % To do so, add to the start of the \filenm{.bib} file the following: % \begin{sourcedisplay} % \hspace*{-6em}@PREAMBLE\{"\cs{let}\cs{etalchar}\cs{relax} % \cs{newcommand}\{\cs{etalchar}\}[1]\{\cs{textsuperscript}\{\#1\}\}"\} % \end{sourcedisplay} % % % \subsubsection{\prog{biber}} % %\trouble{biber=\pkg{biber}>Update bibliography} %\trouble{bibliography>update} %\gindex{biber=\pkg{biber}>Update bibliography} %\gindex{bibliography>update} % To update the \HTML\ version of the bibliography: % \userentry{biber \_html} % \changes{v0.913}{2023/10/01}{Docs: Update a bibliography.} % % % \subsubsection{\pkg{xcite} package} % % See \cref{sec:multipleprojects}. % % % \needspace{6\baselineskip} % \subsubsection{\pkg{gloss} package} % \label{sec:gloss} % % \DescribePackage{gloss} % \gindex{gloss=\pkg{gloss}} % \trouble[compiling]{gloss=\pkg{gloss}} % \limitsgloss % % \needspace{10\baselineskip} % \subsubsection{\pkg{glossaries} package} % \label{sec:glossaries} % % \DescribePackage{glossaries} % \gindex{glossaries=\pkg{glossaries}>options} % \gindex{language>glossaries=\pkg{glossaries}} % \gindex{glossaries=\pkg{glossaries}>language} % \limitsglossaries % % % \subsubsection{\pkg{nomencl} package} % \label{sec:nomencl} % % \DescribePackage{nomencl} % \gindex{nomencl=\pkg{nomencl}} % \trouble{nomencl=\pkg{nomencl}} % \limitsnomencl % % % \subsubsection{Indexing overview} % \label{sec:indexingoverview} % % There are many ways to process indexes for a \LaTeX\ document, % including native \LaTeX\ capabilities, a number of packages and classes, % the possible availability of shell escape and \prog{latexmk}, and the % need to process print and \HTML\ versions. % \pkg{lwarp} attempts to provide easy recompilation of indexes along with % the rest of the document, but the various indexing options must be set correctly. % Numerous examples are given below. % Some differ in minor details, so the important parts are highlighted in red, % and options are in green. % % Once set up properly, the entire document may be recompiled with % \cmds{lwarpmk print} and \cmds{lwarpmk html}. % In some cases, it will also be necessary to compile the indexes with % \cmds{lwarpmk printindex} and \cmds{lwarpmk htmlindex}. % A recompile may then be forced with \cmds{lwarpmk print1} and \cmds{lwarpmk html1}. % % The user may continue to process indexes manually or by shell script % \margintag{manual processing} % without the use of \prog{lwarpmk}, but adjustments will be required to % process \HTML\ indexes as well. In general, \filenm{*.idx} and \filenm{*.ind} files % will be accompanied by \filenm{*_html.idx} and \filenm{*_html.ind} files. % % If using a custom indexing style file, % \margintag{custom index style} % see \cref{sec:modifymakeindex,sec:modifyxindy,sec:modifyxindex}. % % To control how the index links appear in the \HTML\ output, % \margintag{link appearance} % see the \optn{IndexRef} option in \cref{sec:optionindexref}, % \cpageref{sec:optionindexref}. % % See \cref{sec:index} for \pkg{lwarp}'s core index and glossary code, % \margintag{source code} % \gindex{index>source code} % \cref{sec:indexpkg} for \pkg{index}, % \cref{sec:splitidx} for \pkg{splitidx}, % \cref{sec:imakeidx} for \pkg{imakeidx}, % \cref{sec:tocbibind} for \pkg{tocbibind}, % and \cref{sec:memoirbackmatter} for \pkg{memoir}'s indexing patches. % % % \subsubsection{Indexing with \pkg{makeidx}, \prog{makeindex}, % \prog{xindy}, \prog{xindex}, \pkg{gindex}} % \label{sec:indexsetup} % % \changes{v0.38}{2017/08/24}{Docs: Index, \pkg{tocbibind}.} % \changes{v0.58}{2018/06/14}{Docs: Index, \prog{makeindex}, \pkg{imakeidx}.} % % \gindex{xindy=\prog{xindy}>and \pkg{hyperref}} % \gindex{hyperref=\pkg{hyperref}>and \prog{xindy}} % \gindex{index>xindy=\prog{xindy}>hyperref=and \pkg{hyperref}} % \trouble{index>missing entries} % \gindex{index>see, seealso, ranges} % \gindex{index>processing} % % The following allow the user to process indexes automatically, or % \margintag{\prog{lwarpmk} processing} % using \prog{lwarpmk}'s commands: % \userentry{lwarpmk printindex} % \userentry{lwarpmk htmlindex} % % \begin{description} % % \needspace{2\baselineskip} % \item [For a single index using \prog{makeindex}:] % \DescribeProgram{makeindex} % \gindex{makeindex=\prog{makeindex}} % \gindex{index>makeindex=\prog{makeindex}>setup} % \begin{sourcedisplay} % \cs{usepackage}\textred{[makeindex\textgreen{,latexmk}]} % \{\textblue{lwarp}\} % \end{sourcedisplay} % The usual \filenm{.idx} and \filenm{.ind} files will be used, % along with the new \filenm{lwarp.ist} style file. % When creating the \HTML\ index, ``\filenm{_html}'' is automatically appended % to each of the names. % % \prog{lwarpmk} will use \prog{latexmk} if specified, in which case % \prog{latexmk} will create the index automatically. % Otherwise, use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} % to compile the indexes. % % To use a custom configuration file, see \cref{sec:modifymakeindex}. % % \needspace{8\baselineskip} % \item [For a single index using \prog{xindy}:] % \DescribeProgram{xindy} % \gindex{xindy=\prog{xindy}} % \gindex{index>xindy=\prog{xindy}>setup} % \begin{sourcedisplay} % \cs{usepackage}[ \\ % \fqquad \textred{xindy,} \\ % \fqquad \textgreen{xindyLanguage=english,} \hfill \textrm{} \\ % \fqquad \textgreen{xindyCodepage=utf8,} \hfill \textrm{} \\ % \fqquad \textgreen{latexmk} \hfill \textrm{}\\ % ]\{\textblue{lwarp}\} % \end{sourcedisplay} % The usual \filenm{.idx} and \filenm{.ind} files will be used, % along with the new \filenm{lwarp.xdy} style file. % % \prog{lwarpmk} will use \prog{latexmk} if specified, in which case % \prog{latexmk} will create the index automatically. % Otherwise, use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} % to compile the indexes. % % To use a custom configuration file, see \cref{sec:modifyxindy}. % % \needspace{8\baselineskip} % \item [For a single index using \prog{xindex}:] % \DescribeProgram{xindex} % \gindex{xindex=\prog{xindex}} % \gindex{index>xindex=\prog{xindex}>setup} % \begin{sourcedisplay} % \cs{usepackage}[ \\ % \fqquad \textred{xindex,} \\ % \fqquad \textgreen{latexmk} \hfill \textrm{}\\ % ]\{\textblue{lwarp}\} % \end{sourcedisplay} % The usual \filenm{.idx} and \filenm{.ind} files will be used. % % \prog{lwarpmk} will use \prog{latexmk} if specified, in which case % \prog{latexmk} will create the index automatically. % Otherwise, use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} % to compile the indexes. % % To use a custom configuration file, see \cref{sec:modifyxindex}. % % % \needspace{8\baselineskip} % \item [For a single index using \pkg{gindex}:] % \DescribePackage{gindex} % \gindex{gindex=\pkg{gindex}} % \gindex{index>gindex=\pkg{gindex}>setup} % \begin{sourcedisplay} % \cs{usepackage}[ \\ % \fqquad \textred{makeindex,} \\ % \fqquad \textred{makeindexStyle=gindex.ist,} \\ % \fqquad \dots\ or \dots \\ % \fqquad \textred{makeindexStyle=gindexh.ist,} \\ % \fqquad \textgreen{latexmk} \hfill \textrm{}\\ % ]\{\textblue{lwarp}\} % \end{sourcedisplay} % The usual \filenm{.idx} and \filenm{.ind} files will be used. % % \prog{lwarpmk} will use \prog{latexmk} if specified, in which case % \prog{latexmk} will create the index automatically. % Otherwise, use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} % to compile the indexes. % % To use a custom configuration file, copy \filenm{gindex.ist} to a new % file, modify, then specify it with \optn{MakeindexStyle} as above. % \pkg{lwarp} will automatically adapt to \pkg{gindex}'s \cs{indexpagessep} % and \cs{indexrangesep} settings. % \end{description} % % % \subsubsection{Indexing with \pkg{index}} % % \DescribeProgram{index} % \gindex{index>index=\prog{index}>setup} % % \pkg{lwarp} is told how to use \prog{makeindex} using the % \optn{PrintIndexCmd} and \optn{HTMLIndexCmd} options. % The file \filenm{lwarp.ist} is specified, which generates index letter heads for % print output and also allows special \HTML\ formatting for \HTML\ output. % % \begin{description} % % \needspace{20\baselineskip} % \item [For multiple indexes using \prog{makeindex} and \pkg{index}:] \ % % \textgreen{ % (Assuming that the second index has file extensions \filenm{.sist} and \filenm{.sind}) % } % \begin{sourcedisplay} % \cs{usepackage}[ \\ % \fquad\textred{makeindex,} \textgreen{latexmk,} \\ % \fquad\textred{PrintIndexCmd}=\{ \\ % \fqquad makeindex -s lwarp.ist .idx \textred{;} \\ % \fqquad makeindex -s lwarp.ist \\ % \fqqquad -o \textred{.sind} \textred{.sidx} \\ % \fquad\}, \\ % \fquad\textred{HTMLIndexCmd}=\{ \\ % \fqquad makeindex -s lwarp.ist \textred{\_html}.idx \textred{;} \\ % \fqquad makeindex -s lwarp.ist \\ % \fqqquad -o \textred{\_html.sind} \textred{\_html.sidx} \\ % \fquad\} \\ % ]\{\textblue{lwarp}\} \\ % \cs{usepackage}\{\textblue{index}\} \\ % \dots \\ % \cs{makeindex} \\ % \cs{newindex}\{secondname\}\{\textred{sidx}\}\{\textred{sind}\}\{Second Index\} % \end{sourcedisplay} % \emph{For \brand{Windows}, replace the two ``;'' characters with ``\&''.}\watchout[\brand{Windows}] % % When creating the \HTML\ index, ``\filenm{_html}'' is automatically appended % to the index filenames. % % Use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} % to compile the indexes. % % If the \optn{latexmk} option is selected for \pkg{lwarp}, % \prog{latexmk} will compile the document but will \emph{not} compile the indexes. % \cmds{lwarpmk printindex} and \cmds{lwarpmk htmlindex} will still be required. % % \end{description} % % % \subsubsection{Indexing with \pkg{splitidx}} % % \DescribeProgram{splitidx} % \gindex{index>splitidx=\prog{splitidx}>setup} % % \pkg{lwarp} is told how to use \prog{splitindex} using the % \optn{PrintIndexCmd} and \optn{HTMLIndexCmd} options. % The file \filenm{lwarp.ist} is specified, which generates index letter heads for % print output and also allows special \HTML\ formatting for \HTML\ output. % % \limitssplitidx % % \begin{description} % % \needspace{16\baselineskip} % \item [For multiple indexes using \prog{makeindex} and \pkg{splitidx}:] % \begin{sourcedisplay} % \cs{usepackage}[ \\ % \fquad\textred{makeindex,} \textgreen{latexmk,} \\ % \fquad\textred{PrintIndexCmd}=\{ \\ % \fqquad splitindex \textred{-\/- -s lwarp.ist} \\ % \fquad\}, \\ % \fquad\textred{HTMLIndexCmd}=\{ \\ % \fqquad splitindex \textred{\_html} \textred{-\/- -s lwarp.ist} \\ % \fquad\} \\ % ]\{\textblue{lwarp}\} \\ % \cs{usepackage}\{\textblue{splitidx}\} \\ % \dots \\ % \cs{makeindex} \\ % \cs{newindex}[Second Index]\{secondname\} \\ % \end{sourcedisplay} % When creating the \HTML\ index, ``\filenm{_html}'' is automatically appended % to each of the names. % % Use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} % to compile the indexes. % % \needspace{18\baselineskip} % \item [For multiple indexes using \prog{xindy} and \pkg{splitidx}:] % \begin{sourcedisplay} % \cs{usepackage}[ \\ % \fquad\textred{xindy,} \textgreen{latexmk,} \\ % \fquad\textred{PrintIndexCmd}=\{ \\ % \fqquad splitindex \textred{-m xindy} \textred{-\/- -M lwarp.xdy} \\ % \fqqquad \textgreen{-L english -C utf8} \hfill{} \\ % \fquad\}, \\ % \fquad\textred{HTMLIndexCmd}=\{ \\ % \fqquad splitindex \textred{-m xindy} \textred{\_html} \textred{-\/- -M lwarp.xdy} \\ % \fqqquad \textgreen{-L english -C utf8} \hfill{} \\ % \fquad\} \\ % ]\{\textblue{lwarp}\} \\ % \cs{usepackage}\{\textblue{splitidx}\} \\ % \dots \\ % \cs{makeindex} \\ % \cs{newindex}[Second Index]\{secondname\} \\ % \end{sourcedisplay} % When creating the \HTML\ index, ``\filenm{_html}'' is automatically appended % to each of the names. % % Use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} % to compile the indexes. % % \end{description} % % % \subsubsection{Indexing with \pkg{imakeidx}} % \label{sec:indexingimakeidx} % % \DescribeProgram{imakeidx} % \gindex{index>imakeidx=\prog{imakeidx}>setup} % % Due to the number of methods which may be used to process multiple indexes, % the options for style file and \prog{xindy} language and codepage must be % specified in one of several different ways. These are described in detail later in % this section, but are summarized here. % % If shell escape is used, \pkg{imakeidx} will automatically compile the indexes by itself. % Options specifying a custom style file and \prog{xindy} language and % codepage must be specified for each \cs{makeindex} command using its % \optn{options=} option, which must include % \pkg{lwarp}'s special \filenm{lwarp.ist} or \filenm{lwarp.xdy} file, % or a file based on them. % If using a custom indexing style file, % see \cref{sec:modifymakeindex,sec:modifyxindy,sec:modifyxindex}. % % The \optn{splitindex} option is also available of shell escape is used, % in which case the \pkg{splitidx} package and \prog{splitindex} program will also be used. % % If shell escape is not possible, \prog{latexmk} may be used to % automatically compile the indexes. % The style, language, and codepage options are specified with \pkg{lwarp}'s % \optn{makeindexStyle}, \optn{xindyStyle}, \optn{xindyLanguage}, and % \optn{xindyCodepage} options. These are passed to \prog{latexmk} by % \prog{lwarpmk}'s \cmds{lwarpmk} \cmds{printindex} and \cmds{lwarpmk} \cmds{htmlindex} commands. % % Where shell escape and \prog{latexmk} are not possible, % \prog{lwarpmk} may be used to manually compile the indexes. % \pkg{lwarp}'s \optn{PrintIndexCmd} and \optn{HTMLIndexCmd} options are used. % % \begin{description} % \needspace{2\baselineskip} % \item [For a single or multiple indexes using \prog{makeindex} and \pkg{imakeidx}:] \ % % The index style \filenm{lwarp.ist} is automatically used for \HTML\ output. % This file turns on letter headings, so it may be desirable to specify it as % an option, in which case it will also be used for print output, which will % help match the print and \HTML\ output. % \begin{sourcedisplay} % \cs{usepackage}\textred{[makeindex\textgreen{,latexmk}]} % \{\textblue{lwarp}\} \\ % \cs{usepackage}\textred{[makeindex]}\{\textblue{imakeidx}\} \\ % \dots \\ % \cs{makeindex}[\textgreen{options=\{-s lwarp.ist\}}] \\ % \cs{makeindex}[name=secondname,\textgreen{options=\{-s lwarp.ist\}}] \\ % \end{sourcedisplay} % \pkg{imakeidx} will automatically compile the indexes. % Shell escape is not required while using \prog{makeindex}. % \optn{latexmk} may be specified, and if so it will be used for % \cmds{lwarpmk print} and \cmds{lwarpmk html}, but \prog{imakeidx} will actually % create the indexes. % % \needspace{2\baselineskip} % \item [For a single or multiple indexes using \prog{makeindex} and \prog{splitindex} with \pkg{imakeidx}:] \ % % The index style \filenm{lwarp.ist} is automatically used for \HTML\ output. % This file turns on letter headings, so it may be desirable to specify it as % an option, in which case it will also be used for print output, which will % help match the print and \HTML\ output. % \begin{sourcedisplay} % \cs{usepackage}\textred{[makeindex\textgreen{,latexmk}]} % \{\textblue{lwarp}\} \\ % \cs{usepackage}\textred{[makeindex,splitindex]}\{\textblue{imakeidx}\} \\ % \dots \\ % \cs{makeindex}[\textgreen{options=\{-s lwarp.ist\}}] \\ % \cs{makeindex}[name=secondname,\textgreen{options=\{-s lwarp.ist\}}] \\ % \end{sourcedisplay} % Shell escape is required while using \prog{splitindex}. % For the first compile, use % \watchout[enable shell escape] % \userentry{pdflatex \textred{-\/-shell-escape} projectname.tex} % \userentry{pdflatex \textred{-\/-enable-write18} projectname.tex \quad \textrm{(MiKTeX)}} % or similar with \prog{xelatex} or \prog{lualatex}. % \pkg{lwarp} will remember that shell escape was used. % % \prog{imakeidx} will automatically execute \prog{splitindex}, % and will also use \prog{makeindex} to compile the indexes. % % \optn{latexmk} may be specified, and if so it will be used for % \cmds{lwarpmk print} and \cmds{lwarpmk html}, but \prog{imakeidx} will actually % create the indexes. % % \needspace{2\baselineskip} % \item [For multiple indexes using \prog{xindy} and \pkg{imakeidx}, using shell escape:] \ % % Options may be given to \pkg{imakeidx}'s \cs{makeindex} command. % The style file \filenm{lwarp.xdy} is automatically used for \HTML\ output, % and is not necessary for print output since the output will be similar. % If language or codepage must be set, they should be specified as % options for \cs{makeindex}, since \pkg{imakeidx} will process the indexes. % \begin{sourcedisplay} % \cs{usepackage}\textred{[xindy\textgreen{,latexmk}]} % \{\textblue{lwarp}\} \\ % \cs{usepackage}\textred{[xindy\textgreen{,splitindex}]}\{\textblue{imakeidx}\} \\ % \dots \\ % \cs{makeindex}[ \\ % \fquad \textgreen{options=\{ -M lwarp.xdy \textgreen{-L english -c utf8} \}} \\ % ] \\ % \cs{makeindex}[ \\ % \fquad name=secondname, \\ % \fquad \textgreen{options=\{ -M lwarp.xdy \textgreen{-L english -c utf8} \}} \\ % ] \\ % \end{sourcedisplay} % For the first compile, use % \watchout[enable shell escape] % \userentry{pdflatex \textred{-\/-shell-escape} projectname.tex} % \userentry{pdflatex \textred{-\/-enable-write18} projectname.tex \quad \textrm{(MiKTeX)}} % or similar with \prog{xelatex} or \prog{lualatex}. % \pkg{lwarp} will remember that shell escape was used. % % \prog{imakeidx} will automatically execute \prog{splitindex} if selected, % and will also use \prog{xindy} to compile the indexes. % % If selected, \prog{latexmk} will automatically recompile the entire document % as necessary. % % \needspace{14\baselineskip} % \item [For indexes using \prog{xindy} and \prog{imakeidx}, without shell escape, % but \emph{with} \prog{latexmk}:] \ % % \pkg{lwarp}'s options are used, and are passed to \prog{latexmk}. % % \begin{sourcedisplay} % \cs{usepackage}[ \\ % \fquad\textred{xindy,} \\ % \fquad \textgreen{xindyLanguage=english,} \hfill \textrm{} \\ % \fquad \textgreen{xindyCodepage=utf8,} \hfill \textrm{} \\ % \fquad\textred{latexmk,} \\ % ]\{\textblue{lwarp}\} \\ % \cs{usepackage}\textred{[xindy]}\{\textblue{imakeidx}\} \\ % \dots \\ % \cs{makeindex} \\ % \cs{makeindex}[name=secondname] \\ % \end{sourcedisplay} % \prog{latexmk} will create the indexes automatically when % \cmds{lwarpmk print} and \cmds{lwarpmk html} are executed. % % \needspace{20\baselineskip} % \item [For indexes using \prog{xindy} and \prog{imakeidx}, without shell escape, % and \emph{without} \prog{latexmk}:] \ % % \prog{lwarpmk} must be told how to create the indexes: % \begin{sourcedisplay} % \cs{usepackage}[ \\ % \fquad\textred{xindy,} \\ % \fquad\textred{PrintIndexCmd}=\{ \\ % \fqquad xindy \textred{-M lwarp.xdy} \textgreen{-L english -C utf8} \\ % \fqqquad .idx \textred{;} \\ % \fqquad xindy \textred{-M lwarp.xdy} \textgreen{-L english -C utf8} \\ % \fqqquad secondname.idx \\ % \fquad\}, \\ % \fquad\textred{HTMLIndexCmd}=\{ \\ % \fqquad xindy \textred{-M lwarp.xdy} \textgreen{-L english -C utf8} \\ % \fqqquad \textred{\_html}.idx \textred{;} \\ % \fqquad xindy \textred{-M lwarp.xdy} \textgreen{-L english -C utf8} \\ % \fqqquad secondname\textred{\_html}.idx \\ % \fquad\} \\ % ]\{\textblue{lwarp}\} \\ % \cs{usepackage}\textred{[xindy]}\{\textblue{imakeidx}\} \\ % \dots \\ % \cs{makeindex} \\ % \cs{makeindex}[name=secondname] \\ % \end{sourcedisplay} % \emph{For \brand{Windows}, replace the two ``;'' characters with ``\&''.}\watchout[\brand{Windows}] % % \texttt{} is the \cs{jobname}: % if compiling ``\filenm{name.tex}'', use the filenames \filenm{name.idx} and % \filenm{name_html.idx}. % % Use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} % to compile the indexes. % % \needspace{2\baselineskip} % \item [For multiple indexes using \prog{xindex} and \pkg{imakeidx}, using shell escape:] \ % % \prog{xindex}, \prog{makeindex}, \prog{imakeidx}, and \prog{splitindex} can % all work together: % \begin{sourcedisplay} % \cs{usepackage}\textred{[\% \\ % \fquad xindex, \\ % \fquad xindexConfig=-imakeidx, \\ % \fquad \textgreen{latexmk} \\ % ]} % \{\textblue{lwarp}\} \\ % \cs{usepackage}\textred{[makeindex\textgreen{,splitindex}]}\{\textblue{imakeidx}\} \\ % \dots \\ % \cs{makeindex}[\% \\ % \fquad \textgreen{options=\{ -s lwarp.ist\} \}} \\ % ] \\ % \cs{makeindex}[ \\ % \fquad name=secondname, \\ % \fquad \textgreen{options=\{ -s lwarp.ist\} \}} \\ % ] \\ % \end{sourcedisplay} % For the first compile, use: % \watchout[enable shell escape] % \userentry{pdflatex \textred{-\/-shell-escape} projectname.tex} % \userentry{pdflatex \textred{-\/-enable-write18} projectname.tex \quad \textrm{(MiKTeX)}} % or similar with \prog{xelatex} or \prog{lualatex}. % \pkg{lwarp} will remember if shell escape was used. % % \prog{xindex} will use \prog{imakeidx}, % and \prog{imakeidx} will automatically execute \prog{splitindex} if selected. % % If selected, \prog{latexmk} will automatically recompile the entire document % as necessary. % \end{description} % % % \subsubsection{Indexes with \pkg{memoir}} % % \gindex{index>memoir=\pkg{memoir}>setup} % % \begin{description} % \needspace{7\baselineskip} % \item [For a single index with \pkg{memoir} and \prog{makeindex}:] % \begin{sourcedisplay} % \cs{documentclass}\{\textblue{memoir}\} \\ % \cs{usepackage}\textred{[makeindex\textgreen{,latexmk}]}\{\textblue{lwarp}\} \\ % \dots \\ % \cs{makeindex} % \end{sourcedisplay} % The usual \filenm{.idx} and \filenm{.ind} files will be used, % along with the \filenm{lwarp.ist} style file. % % \prog{lwarpmk} will use \prog{latexmk} if specified, in which case % \prog{latexmk} will create the index automatically. % Otherwise, use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} % to compile the indexes. % % \needspace{9\baselineskip} % \item [For multiple indexes with \pkg{memoir} and \prog{makeindex}, % using \prog{latexmk}:] \ % % \pkg{lwarp}'s options are used, and are passed to \prog{latexmk}. % \begin{sourcedisplay} % \cs{documentclass}\{\textblue{memoir}\} \\ % \cs{usepackage}\textred{[makeindex,latexmk]}\{\textblue{lwarp}\} \\ % \dots \\ % \cs{makeindex} \\ % \cs{makeindex}[secondname] % \end{sourcedisplay} % \prog{lwarpmk} will use \prog{latexmk} to create the indexes automatically % when the user executes \cmds{lwarpmk print} and \cmds{lwarpmk html}. % % \needspace{19\baselineskip} % \item [For multiple indexes with \pkg{memoir} and \prog{makeindex}, % \emph{without} \pkg{latexmk}:] \ % % \prog{lwarpmk} must be told how to create the indexes: % \begin{sourcedisplay} % \cs{documentclass}\{\textblue{memoir}\} \\ % \cs{usepackage}[ \\ % \fquad\textred{makeindex,} \\ % \fquad\textred{PrintIndexCmd}=\{ \\ % \fqquad makeindex \textred{-s lwarp.ist} .idx \textred{;} \\ % \fqquad makeindex \textred{-s lwarp.ist} secondname.idx \\ % \fquad\}, \\ % \fquad\textred{HTMLIndexCmd}=\{ \\ % \fqquad makeindex \textred{-s lwarp.ist} \textred{\_html}.idx \textred{;} \\ % \fqquad makeindex \textred{-s lwarp.ist} secondname\textred{\_html}.idx \\ % \fquad\} \\ % ]\{\textblue{lwarp}\} \\ % \dots \\ % \cs{makeindex} \\ % \cs{makeindex}[secondname] \\ % \end{sourcedisplay} % \emph{For \brand{Windows}, replace the two ``;'' characters with ``\&''.}\watchout[\brand{Windows}] % % \texttt{} is the \cs{jobname}: % if compiling ``\filenm{name.tex}'', use the filenames \filenm{name.idx} and % \filenm{name_html.idx}. % % Use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} % to compile the indexes. % % \needspace{13\baselineskip} % \item [For a single index with \pkg{memoir} and \prog{xindy}:] % \begin{sourcedisplay} % \cs{documentclass}\{\textblue{memoir}\} \\ % \cs{usepackage}[ \\ % \fqquad \textred{xindy,} \\ % \fqquad \textgreen{xindyLanguage=english,} \hfill \textrm{} \\ % \fqquad \textgreen{xindyCodepage=utf8,} \hfill \textrm{} \\ % \fqquad \textgreen{latexmk} \hfill \textrm{}\\ % ]\{\textblue{lwarp}\} \\ % \dots \\ % \textred{\cs{xindyindex}} \\ % \cs{makeindex} % \end{sourcedisplay} % The usual \filenm{.idx} and \filenm{.ind} files will be used, % along with the \filenm{lwarp.xdy} style file. % % \prog{lwarpmk} will use \prog{latexmk} if specified, in which case % \prog{latexmk} will create the index automatically. % Otherwise, use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} % to compile the indexes. % % \needspace{17\baselineskip} % \item [For multiple indexes with \pkg{memoir} and \prog{xindy}, % using \pkg{latexmk}:] \ % % \pkg{lwarp}'s options are used, and are passed to \prog{latexmk}. % \begin{sourcedisplay} % \cs{documentclass}\{\textblue{memoir}\} \\ % \cs{usepackage}[ \\ % \fqquad \textred{xindy,} \\ % \fqquad \textgreen{xindyLanguage=english,} \hfill \textrm{} \\ % \fqquad \textgreen{xindyCodepage=utf8,} \hfill \textrm{} \\ % \fqquad \textred{latexmk} \\ % ]\{\textblue{lwarp}\} \\ % \dots \\ % \textred{\cs{xindyindex}} \\ % \cs{makeindex} \\ % \cs{makeindex}[secondname] \\ % \end{sourcedisplay} % \prog{lwarpmk} will use \prog{latexmk} to create the indexes automatically. % % \needspace{24\baselineskip} % \item [For multiple indexes with \pkg{memoir} and \prog{xindy}, % \emph{without} \pkg{latexmk}:] \ % % \prog{lwarpmk} must be told how to create the indexes: % \begin{sourcedisplay} % \cs{documentclass}\{\textblue{memoir}\} \\ % \cs{usepackage}[ \\ % \fquad\textred{xindy,} \\ % \fquad\textred{PrintIndexCmd}=\{ \\ % \fqquad xindy \textred{-M lwarp.xdy} \textgreen{-L english -C utf8} \\ % \fqqquad .idx \textred{;} \\ % \fqquad xindy \textred{-M lwarp.xdy} \textgreen{-L english -C utf8} \\ % \fqqquad secondname.idx \\ % \fquad\}, \\ % \fquad\textred{HTMLIndexCmd}=\{ \\ % \fqquad xindy \textred{-M lwarp.xdy} \textgreen{-L english -C utf8} \\ % \fqqquad \textred{\_html}.idx \textred{;} \\ % \fqquad xindy \textred{-M lwarp.xdy} \textgreen{-L english -C utf8} \\ % \fqqquad secondname\textred{\_html}.idx \\ % \fquad\} \\ % ]\{\textblue{lwarp}\} \\ % \dots \\ % \textred{\cs{xindyindex}} \\ % \cs{makeindex} \\ % \cs{makeindex}[secondname] \\ % \end{sourcedisplay} % \emph{For \brand{Windows}, replace the four ``;'' characters with ``\&''.}\watchout[\brand{Windows}] % % \texttt{} is the \cs{jobname}: % if compiling ``\filenm{name.tex}'', use the filenames \filenm{name.idx} and % \filenm{name_html.idx}. % % Use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} % to compile the indexes. % \end{description} % % % \subsubsection{Using a custom \prog{makeindex} style file} % \label{sec:modifymakeindex} % % \DescribeProgram{makeindex} % \DescribeFile{lwarp.ist} % When using \prog{makeindex}, \prog{lwarpmk} uses the file |lwarp.ist| to process the index. % \gindex{lwarp.ist=\filenm{lwarp.ist}>customizing} % \gindex{makeindex=\prog{makeindex}>customizing} % \gindex{index>makeindex=\prog{makeindex}>custom style file} % This file is over-written by \pkg{lwarp} whenever a print version of % the document is processed. % % To use a custom \prog{makeindex} style file: % \begin{enumerate} % \item Copy |lwarp.ist| to a new filename such as |projectname.ist| % \item Make changes to |projectname.ist|. % Keep the lines which refer to \cs{hyperindexref}. % These lines creates the hyperlinks for the \HTML\ index. During print output % \cs{hyperindexref} becomes a null function. % \item If changing % \begin{sourceverb} % delim_n -and- delim_r % \end{sourceverb} % in \filenm{projectname.ist}, then in the document preamble redefine % \begin{sourceverb} % \IndexPageSeparator -and- \IndexRangeSeparator % \end{sourceverb} % to match. % \item In the document source use the \optn{makeindexStyle} option for \pkg{lwarp}: % \DescribeOption{makeindexStyle} % \begin{sourcedisplay} % \cs{usepackage}[ \\ % \fquad \dots\ other options \dots \\ % \fquad \textred{makeindex}, \\ % \fquad \textred{makeindexStyle=projectname.ist}, \\ % ]\{lwarp\} % \end{sourcedisplay} % Likewise, refer to the custom style file if using \cs{PrintIndexCmd}, % \cs{HTMLIndexCmd}, or \cs{LatexmkIndexCmd}. % \item Recompile the print version, which causes % \pkg{lwarp} to rewrite the |lwarpmk.conf| configuration file. % This tells \prog{lwarpmk} to use the custom |projectname.ist| file % instead of |lwarp.ist|. % \end{enumerate} % % % \subsubsection{Using a custom \prog{xindy} style file} % \label{sec:modifyxindy} % % \DescribeProgram{xindy} % \DescribeFile{lwarp.xdy} % When using \prog{xindy}, \prog{lwarpmk} uses the file |lwarp.xdy| to process the index. % \gindex{lwarp.xdy=\filenm{lwarp.xdy}>customizing} % \gindex{xindy=\prog{xindy}>customizing} % \gindex{index>xindy=\prog{xindy}>custom style file} % This file is over-written by \pkg{lwarp} whenever a print version of % the document is processed. % % To use a custom \prog{xindy} style file: % \begin{enumerate} % \item Copy |lwarp.xdy| to a new filename such as |projectname.xdy| % \item Make changes to |projectname.xdy|. % % Keep the lines which refer to \cs{hyperindexref}: % \begin{Verbatim}[gobble=2,tabsize=4] % (define-attributes (("hyperindexref"))) % (markup-locref :open "\hyperindexref{" :close "}") % ... % (markup-locref :open "\textit{\hyperindexref{" :close "}}" :attr "textit") % \end{Verbatim} % These lines create the hyperlinks for the \HTML\ index. During print output % \cs{hyperindexref} becomes a null function. % % To create custom styles, refer to the lines for \cs{textbf} and \cs{textit}. % \item If changing any of % \begin{sourceverb} % markup-locref-list :sep % markup-locclass-list :open % markup-locclass-list :sep % markup-crossref-layer-list :sep % markup-range :sep % \end{sourceverb} % in \filenm{projectname.xdy}, then in the document preamble redefine % \begin{sourceverb} % \IndexPageSeparator -and- \IndexRangeSeparator % \end{sourceverb} % to match. % \item In the document source use the \optn{xindyStyle} option for \pkg{lwarp}: % \DescribeOption{xindyStyle} % \begin{sourcedisplay} % \cs{usepackage}[ \\ % \fquad \dots\ other options \dots \\ % \fquad \textred{xindy}, \\ % \fquad \textred{xindyStyle=projectname.xdy}, \\ % ]\{lwarp\} % \end{sourcedisplay} % Likewise, refer to the custom style file if using \cs{PrintIndexCmd}, % \cs{HTMLIndexCmd}, or \cs{LatexmkIndexCmd}. % \item Recompile the print version, which causes % \pkg{lwarp} to rewrite the |lwarpmk.conf| configuration file. % This tells \prog{lwarpmk} to use the custom |projectname.xdy| file instead of |lwarp.xdy|. % \end{enumerate} % % % \subsubsection{Using a custom \prog{xindex} style file} % \label{sec:modifyxindex} % % \DescribeProgram{xindex} % \gindex{xindex=\prog{xindex}>customizing} % \gindex{index>xindex=\prog{xindex}>custom configuration file} % To use a custom \prog{xindex} style file: % \begin{enumerate} % \item Copy |xindex-cfg.lua| to a new filename such as \filenm{xindex-projectname.lua}. % The filename must start with \filenm{xindex-} and end with \filenm{.lua}.\watchout[filename] % \item Make changes to \filenm{xindex-projectname.lua}. % \item If changing % \begin{sourceverb} % itemPageDelimiter -and- rangeSymbol % \end{sourceverb} % in \filenm{xindex-projectname.lua}, then in the document preamble redefine % \begin{sourceverb} % \IndexPageSeparator -and- \IndexRangeSeparator % \end{sourceverb} % to match. % \item In the document source use the \optn{xindexConfig} option for \pkg{lwarp}: % \DescribeOption{xindexConfig} % \begin{sourcedisplay} % \cs{usepackage}[ \\ % \fquad \dots\ other options \dots \\ % \fquad \textred{xindex}, \\ % \fquad \textred{xindexConfig=projectname}, \quad \% \textgreen{(without xindex- or .lua)} \\ % ]\{lwarp\} % \end{sourcedisplay} % Likewise, refer to the custom style file if using \cs{PrintIndexCmd}, % \cs{HTMLIndexCmd}, or \cs{LatexmkIndexCmd}. % \item Recompile the print version, which causes % \pkg{lwarp} to rewrite the |lwarpmk.conf| configuration file. % This tells \prog{lwarpmk} to use the custom % \filenm{xindex-projectname.lua} file instead of the default |xindex-cfg.lua|. % \end{enumerate} % % % \subsubsection{Additional indexing limitations} % \prog{xindy} and \pkg{hyperref} may not work well together for print output % \trouble[\prog{xindy} with \pkg{hyperref}]{xindy=\prog{xindy}>hyperref=and \pkg{hyperref}} % \trouble{index>xindy=\prog{xindy}>hyperref=and \pkg{hyperref}} % \trouble{index>see and seealso} % \trouble{index>reference ranges} % \trouble{index>styling references} % with ``see'', ``see also'', reference ranges, or stylized index references. % It may be necessary to turn off hyper-referencing for indexes: % \begin{sourcedisplay} % \cs{usepackage}\textred{[hyperindex=false]}\{hyperref\} % \end{sourcedisplay} % % If an \HTML\ index is empty, it may be necessary to add the following % \trouble[empty index]{index>empty} % \trouble{morewrites=\pkg{morewrites}} % before \pkg{lwarp} is loaded: % \begin{sourcedisplay} % \textred{\cs{usepackage}\{morewrites\}} \\ % \textred{\cs{morewritessetup}\{allocate=10\}} \\ % \dots \\ % \cs{usepackage}\{lwarp\} % \end{sourcedisplay} % % When using \prog{makeindex}, custom display styles are possible: % \gindex{index>custom display styles} % \margintag{\prog{makeindex} custom display styles} % \begin{sourcedisplay} % \cs{begin}\{warpprint\} \\ % \cs{newcommand}\{\cs{notesstyle}\}[1]\{\#1nn\} \\ % \cs{end}\{warpprint\} \\ % ~ \\ % \cs{begin}\{warpHTML\} \\ % \cs{makeatletter} \\ % \cs{newcommand}\{\cs{notesstyle}\}[1]\{\cs{LWR@doindexentry}\{\#1\} notes \} \\ % \cs{makeatother} \\ % \cs{end}\{warpHTML\} \\ % \dots \\ % A sentence.\cs{index}\{key\textbar{}notesstyle\} % \end{sourcedisplay} % % For custom styles with \prog{xindy}, % \margintag{\prog{xindy} custom display styles} % see \filenm{lwarp.xdy} for \cs{textbf} and \cs{textit} as examples. % % % \subsubsection{Index positions, \TOC, \pkg{tocbibind}} % \gindex{index>placement} % \gindex{index>tocbibind=\pkg{tocbibind}} % % \limitstocbibind % % \limitstocloft % % % % \subsection{Math} % % \changes{v0.42}{2017/10/30}{Docs: Reorganized math limitations.} % \changes{v0.906}{2022/05/12}{Docs: Math in custom environments.} % \label{sec:limitsmath} % % \limitsmath % % \subsubsection{Catcode changes} % \label{sec:mathcatcode} % \limitsmathcatcode % % \subsubsection{Complicated inline math objects} % \label{sec:mathdynamic} % \gindex{inline math>complicated objects} % \gindex{math>inline with complicated objects} % \gindex{math>dynamic} % \gindex{dynamic math} % \limitsmathinline % % \subsubsection{Complicated display math objects} % \label{sec:displaymathother} % \gindex{display math>complicated objects} % \gindex{math>display with complicated objects} % \gindex{math>dynamic} % \gindex{dynamic math} % \trouble{math>tikz=\TikZ} % \trouble{tikz>in math} % \trouble{mathjax=\MathJax>errors} % \trouble{HTML>alt tags} % \trouble{alt tags} % % \limitsmathdisplay % % % \subsubsection{Theorems} % \limitstheorems % \changes{v0.896}{2021/03/25}{Docs: Theorem references.} % % \subsubsection{\pkg{ntheorem} package} % % \DescribePackage{ntheorem} % \limitsntheorem % % % \subsubsection{\pkg{mathtools} package} % % \DescribePackage{mathtools} % \limitsmathtools % % % \subsubsection{\pkg{siunitx} package} % \label{sec:limitssiunitx} % % \DescribePackage{siunitx} % \limitssiunitx % % % \subsubsection{\pkg{units} and \pkg{nicefrac} packages} % % \DescribePackage{units} % \DescribePackage{nicefrac} % \limitsnicefrac % % % \subsubsection{\pkg{physics} package} % \label{sec:limitsphysics} % % \trouble{mathjax=\MathJax>physics=\pkg{physics}} % \trouble{physics=\pkg{physics}>mathjax=\MathJax} % % \DescribePackage{physics} % \limitsphysics % % % % \subsection{Graphics} % \label{sec:limitsgraphics} % % \DescribePackage{graphics}% % \DescribePackage{graphicx}% % \begin{table} % \caption{\cs{includegraphics} and file names} % \label{tab:includegraphicsfilenames} % \begin{center} % \begin{threeparttable} % \begin{tabular}{ccl} % \toprule % Print image file & \HTML\ image file & Command to use \\ % \midrule % \filenm{image.pdf}\tnote{a} & \filenm{image.svg}\tnote{a} & |\includegraphics{image}| \\ % \filenm{image.eps}\tnote{a} & \filenm{image.svg}\tnote{a} & |\includegraphics{image}| \\ % \filenm{image.jpg} & ---\tnote{b} & |\includegraphics{image}| \\ % \filenm{image.png} & ---\tnote{b} & |\includegraphics{image}| \\ % \filenm{image.JPG} & ---\tnote{b} & |\includegraphics{image.JPG}|\tnote{c} \\ % \filenm{image.PNG} & ---\tnote{b} & |\includegraphics{image.PNG}|\tnote{c} \\ % \filenm{image.jpg} & \filenm{image.gif} & |\includegraphics{image}| \\ % \bottomrule % \end{tabular} % \begin{tablenotes} % \item[a:] Must be a lowercase file extension. % \item[b:] The same file is used for print and \HTML. % \item[c:] The uppercase extension must be specified. % \end{tablenotes} % \end{threeparttable} % \end{center} % \end{table} % \limitsgraphics % % % \subsubsection{\pkg{tikz} package} % \label{sec:limitstikz} % % \DescribePackage{tikz} % \limitstikz % \changes{v0.51}{2018/03/18}{Docs: \pkg{tikz} limitations.} % % % \subsubsection{\pkg{grffile} package} % % \DescribePackage{grffile} % \limitsgrffile % % % \subsubsection{\pkg{color} package} % % \DescribePackage{color} % \limitscolor % % % \subsubsection{\pkg{xcolor} package} % % \DescribePackage{xcolor} % \limitsxcolor % % % \subsubsection{\pkg{epstopdf} package} % % \DescribePackage{epstopdf} % \limitsepstopdf % % % \subsubsection{\pkg{pstricks} package} % % \DescribePackage{pstricks} % \limitspstricks % % % \subsubsection{\pkg{pdftricks} package} % % \DescribePackage{pdftricks} % \limitspdftricks % % % \subsubsection{\pkg{psfrag} package} % % \DescribePackage{psfrag} % \trouble{psfrag=\pkg{psfrag}} % \limitspsfrag % % % \subsubsection{\pkg{pstool} package} % % \DescribePackage{pstool} % \trouble{pstool=\pkg{pstool}} % \limitspstool % % % \needspace{15\baselineskip} % \subsubsection{\pkg{asymptote} package} % \changes{v0.62}{2018/10/16}{Docs: \pkg{asymptote}.} % % \DescribePackage{asymptote} % \limitsasymptote % % % \subsubsection{\pkg{overpic} package} % % \DescribePackage{overpic} % \limitsoverpic % % % \subsubsection{Multimedia packages} % % \DescribePackage{multimedia} % \DescribePackage{movie15} % \DescribePackage{media9} % \trouble{multimedia=\pkg{multimedia}} % \trouble{media9=\pkg{media9}} % \trouble{movie15=\pkg{movie15}} % \trouble{graphics>multimedia} % \trouble{video} % \trouble{audio} % \gindex{video} % \gindex{audio} % \gindex{multimedia} % \limitsmultimedia % % % % \subsection{Tabbing} % \limitstabbing % % % \subsection{Tabular} % % \subsubsection{\env{tabular} environment} % \label{sec:limitstabular} % \changes{v0.39}{2017/08/30}{Docs: Reorganized tabular discussion.} % \limitstabular % % \subsubsection{\pkg{multirow} package} % \gindex{multirow=\pkg{multirow}>mrowcell=\cs{mrowcell} and \cs{mcolrowcell}} % \gindex{tabular=\env{tabular}>multirow=\pkg{multirow} \cs{mrowcell} and \cs{mcolrowcell}} % \gindex{mrowcell=\cs{mrowcell}} % \gindex{mcolrowcell=\cs{mcolrowcell}} % \trouble{multirow=\pkg{multirow}>mrowcell=\cs{mrowcell} and \cs{mcolrowcell}} % \trouble{tabular=\env{tabular}>multirow=\pkg{multirow} \cs{mrowcell} and \cs{mcolrowcell}} % \trouble{mrowcell=\cs{mrowcell}} % \trouble{mcolrowcell=\cs{mcolrowcell}} % \gindex{multicolumn=\cs{multicolumn}>with \cs{multirow}} % \gindex{multirow=\cs{multirow}>with \cs{multicolumn}} % \gindex{tabular=\env{tabular}>multicolumn=\cs{multicolumn} with \cs{multirow}} % \trouble{tabular=\env{tabular}>multicolumn=\cs{multicolumn} with \cs{multirow}} % \limitsmultirow % % \subsubsection{\pkg{longtable} package} % % \DescribePackage{longtable} % \trouble{longtable=\pkg{longtable}>endhead=\cs{endhead}, etc.} % \trouble{endhead=\cs{endhead}, etc.} % \limitslongtable % % % \subsubsection{\pkg{threeparttablex} package} % \label{sec:limitsthreeparttablex} % \DescribePackage{threeparttablex} % \trouble{threeparttablex=\pkg{threeparttablex}} % \limitsthreeparttablex % % % \subsubsection{\pkg{supertabular} and \pkg{xtab} packages} % % \DescribePackage{supertabular} % \DescribePackage{xtab} % \limitssupertabular % % \subsubsection{\pkg{colortbl} package} % % \DescribePackage{colortbl} % \limitscolortbl % % \subsubsection{\pkg{ctable} package} % \trouble{ctable=\pkg{ctable}} % \gindex{ctable=\pkg{ctable}} % \limitsctable % % \subsubsection{\pkg{bigdelim} package} % % \DescribePackage{bigdelim} % \limitsbigdelim % % % \subsection{Floats} % % \subsubsection{Float contents alignment} % % \limitsfloatalignment % % % \subsubsection{\pkg{float}, \pkg{trivfloat}, and/or \pkg{algorithmicx} together} % % \DescribePackage{float} % \DescribePackage{trivfloat} % \DescribePackage{algorithmicx} % \limitscombiningfloats % % % \subsubsection{\pkg{caption} and \pkg{subcaption} packages} % % \DescribePackage{caption} % \DescribePackage{subcaption} % \label{sec:limitscaption} % \limitscaption % % % % % \subsubsection{\pkg{subfig} package} % % \DescribePackage{subfig} % \limitssubfig % % % \subsubsection{\pkg{floatrow} package} % % \DescribePackage{floatrow} % \limitsfloatrow % % % \subsubsection{\pkg{keyfloat} package} % % \DescribePackage{keyfloat} % \limitskeyfloat % % % \subsection{\brand{Koma-Script} classes} % % \DescribeClass{komascript} % \limitskomascript % % % \subsection{\brand{Memoir} class} % \label{sec:limitsmemoir} % % \changes{v0.66}{2019/02/06}{\pkg{memoir}: Docs re: version numbers.} % % \DescribeClass{memoir} % \limitsmemoir % % The custom frame commands in the \pkg{memoir} manual may be emulated by % \trouble[\env{framewithtitle}, \env{titledframe}]{framewithtitle=\env{framewithtitle}} % \trouble{titledframe=\env{titledframe}} % \trouble{memoir=\pkg{memoir}>\env{framewithtitle}, \env{titledframe}} % \gindex{memoir=\pkg{memoir}>\env{framewithtitle}, \env{titledframe}} % placing the original defintions in the preamble inside \env{warpprint} % environments, and then providing an \HTML\ equivalent: % \begin{sourceverb} % \begin{warpHTML} % \newcommand{\FrameTitle}[2]{% % \textbf{#2} % } % % \newenvironment{framewithtitle}[2][\FrameFirst@Lab\ (cont.)]{% % \begin{fminipage}{\linewidth} % \textbf{#2} % \begin{minipage}{\linewidth} % } % {\end{minipage}\end{fminipage}} % % \newcommand{\TitleFrame}[2]{% % \par % \textbf{#1}\par % \fboxBlock{#2} % } % % \newenvironment{titledframe}[2][\FrameFirst@Lab\ (cont.)]{% % \par % \textbf{#2} % \begin{fminipage}{\linewidth} % } % {\end{fminipage}} % \end{warpHTML} % \end{sourceverb} % % % \subsection{International languages} % \label{sec:international} % % If using \prog{pdflatex} with the setting |\booltrue{FileSectionNames}|, % \trouble[section and file names]{sectioning>international language} % \trouble{filename>corrupted} % \trouble{filename>international, \UTF-8} % \gindex{international>section names} % \gindex{foreign>section names} % \gindex{section>international languages} % \gindex{filename>international languages} % non-\acro{ASCII} text in section names can result in corrupted \HTML\ file names. % \prog{pdflatex} may be used if setting |\boolfalse{FileSectionNames}|, in which case % \HTML\ file numbers will be generated. % % For correct \HTML\ file names, use \prog{xelatex}, \prog{lualatex}, % or dedicated document classes \Slash engines. % % (As of this writing, this warning is only relevent to the \pkg{kotex} package.) % % % \subsection{Miscellaneous packages} % % \subsubsection{\pkg{verse} and \pkg{memoir}} % % \DescribePackage{verse} % \DescribeClass{memoir} % \limitsverse % % % \subsubsection{\pkg{newclude} package} % % \changes{v0.14}{2016/03/29}{Docs: Newclude limitations.} % % \DescribePackage{newclude} % \limitsnewclude % % % % \subsubsection{\pkg{babel} package} % % \DescribePackage{babel} % ^^A \limitsbabelone % \limitsbabeltwo % % % \subsubsection{\pkg{polyglossia} package} % \label{sec:limitspolyglossia} % % \DescribePackage{polyglossia} % \limitspolyglossia % % % \subsubsection{\pkg{todonotes} and \pkg{luatodonotes} packages} % % \DescribePackage{todonotes} % \DescribePackage{luatodonotes} % \limitstodonotes % % % \subsubsection{\pkg{fixme}} % % \DescribePackage{fixme} % \limitsfixme % % % \subsubsection{\pkg{acro} package} % \limitsacro % \trouble{acro=\pkg{acro}} % % \subsubsection{\pkg{chemfig} package} % % \limitschemfig % \trouble{chemfig=\pkg{chemfig}} % % % \subsubsection{\pkg{chemformula} package} % \limitschemformula % \trouble{array=\env{array}>chemformula=\pkg{chemformula}} % \trouble{math>chemformula=\pkg{chemformula}} % % % \subsubsection{\pkg{mhchem} package} % % See \cref{sec:mhchem}. % % % \subsubsection{\pkg{kotex} package} % % \DescribePackage{kotex} % See \cref{sec:international} regarding \prog{pdflatex} and % Korean section names. % \trouble[Korean section names]{filename>Korean} % % % \clearpage % % \section{Compiling using custom shell commands} % \label{sec:customcompiling} % \gindex{compiling>custom} % % \changes{v0.61}{2018/09/21}{Docs: Compiling using custom shell commands.} % % \pkg{lwarp} and \prog{lwarpmk} try to make it easy to process % print and \HTML\ compilation tasks in most situations. % Depending on the operating system, command-line options, \TeX\ engine, % and \pkg{lwarp} options, the commands \cmds{lwarpmk print} and % \cmds{lwarpmk html} are automatically set up to correctly recompile the project. % These actions may be overridden using \pkg{lwarp} options, thus allowing the use % of packages such as \pkg{perltex} and \pkg{pythontex}. % % \subsection{Command options} % % \DescribeOption{PrintLatexCmd} % \DescribeOption{HTMLLatexCmd} % The \pkg{lwarp} options \optn{PrintLatexCmd} and \optn{HTMLLatexCmd} % are used to set customized commands to be executed by % \cmds{lwarpmk print} and \cmds{lwarpmk html}. % \begin{description} % \item[\optn{PrintLatexCmd}] should be set to shell commands which take \filenm{project.tex} % and generate \filenm{project.pdf}. % \item[\optn{HTMLLatexCmd}] should be set to take \filenm{project_html.tex} and % generate \filenm{project_html.pdf}. % \prog{lwarpmk} will then take \filenm{project_html.pdf} and % automatically convert it and generate \filenm{project.html}. % \end{description} % % \subsection{Literal character macros} % The \pkg{lwarp} package options are parsed by \TeX, and so some characters % require the use of a special macro to represent them. See \cref{tab:literalchars}. % \cs{LWRopquote} and \cs{LWRopseq} may be used to increase operating-system portability. % \cs{jobname} must have |_html| appended for processing \HTML. % \cs{space} may be necessary between other macros. % % To use these macros, either \pkg{kvoptions-patch} must be loaded before \pkg{lwarp}: % \trouble[macro not found]{LWRopseq=\cs{LWRopseq}} % \trouble{LWRpercent=\cs{LWRpercent}} % \trouble{LWRdollar=\cs{LWRdollar}} % \trouble{LWRhash=\cs{LWRhash}} % \trouble{LWRbackslash=\cs{LWRbackslash}} % \trouble{LWRopquote=\cs{LWRopquote}} % \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines] % \usepackage{kvoptions-patch} % \usepackage[ % PrintLatexCmd={ ... } , % HTMLLatexCmd={ ... } % ]{lwarp} % \end{Verbatim} % \needspace{18\baselineskip} % or \cs{lwarpsetup} must be used to set \optn{PrintLatexCmd} and \optn{HTMLLatexCmd}: % \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines] % \usepackage[...]{lwarp} % \lwarpsetup{ % PrintLatexCmd= % { % latex tm \LWRopseq % dvips -o tm-pics.ps tm.dvi \LWRopseq % ps2pdf -dALLOWPSTRANSPARENCY tm-pics.ps \LWRopseq % pdflatex tm.tex % } , % HTMLLatexCmd= % { % latex tm_html \LWRopseq % dvips -o tm_html-pics.ps tm_html.dvi \LWRopseq % ps2pdf -dALLOWPSTRANSPARENCY tm_html-pics.ps \LWRopseq % pdflatex tm_html.tex % } % } % \end{Verbatim} % % \begin{table} % \centering % \caption{Literal character macros} % \label{tab:literalchars} % \begin{tabular}{cll} % Character & Macro & Comment \\ % |%| & \cs{LWRpercent} & \\ % |$| & \cs{LWRdollar} & \\ % |&| & \cs{LWRamp} & \\ % |%| & \cs{LWRhash} & \\ % |\| & \cs{LWRbackslash} & \\ % \texttt{\textquotesingle} or |"| & \cs{LWRopquote} & Depends on the operating system. \\ % |&| or |&&| & \cs{LWRopseq} & Depends on the operating system. \\ % (space) & \cs{space} & Forces an extra space. \\ % (jobname) & \cs{jobname} & Without file extension. \\ % \end{tabular} % \hrule % \end{table} % % % \needspace{6\baselineskip} % % \subsection{\prog{latexmk}} % % \DescribeProgram{latexmk} % If \prog{latexmk} is used for a project, it may be easiest to continue % using it. % \begin{description} % \item[\cmds{latexmk project.tex}] would create \filenm{project.pdf} as normal. % \item[\cmds{latexmk project\_html.tex}] would create \filenm{project_html.pdf}, % then % \item [\cmds{lwarpmk pdftohtml project\_html.pdf}] would take % \filenm{project_html.pdf} and convert it to \filenm{project.html}. % \end{description} % % \prog{latexmk} may simplify the use of packages such as \pkg{sagetex}. % \DescribePackage{sagetex} % % % \subsection{\pkg{perltex} package} % % The \pkg{lwarp} package option settings to use \pkg{perltex} would be similar to: % \DescribePackage{perltex} % \begin{sourcedisplay} % \cs{usepackage}[ \\ % \fquad \dots \\ % \fquad PrintLatexCmd=\{perltex -latex=pdflatex project.tex\} , \\ % \fquad HTMLLatexCmd=\{perltex -latex=pdflatex project\textgreen{\_html}.tex\} , \\ % \fquad \dots \\ % ]\{lwarp\} % \end{sourcedisplay} % % Place \pkg{perltex} math expressions between % \trouble[``impure'' math]{perltex=\pkg{perltex}} % \cs{displaymathother} and \cs{displaymathnormal}, or % \cs{inlinemathother} and \cs{inlinemathnormal}. % See \cref{sec:displaymathother}. % % % \subsection{\pkg{pythontex} package} % % \DescribePackage{pythontex} % An example using \pkg{pythontex}: % \begin{sourcedisplay} % \cs{usepackage}[ \\ % \fquad \dots \\ % \fquad PrintLatexCmd=\{ \\ % \fqquad pdflatex project.tex \cs{LWRopseq} \\ % \fqquad pythontex project \cs{LWRopseq} \\ % \fqquad pdflatex project.tex \\ % \fquad \} , \\ % \fquad HTMLLatexCmd=\{ \\ % \fqquad pdflatex project\textgreen{\_html}.tex \cs{LWRopseq} \\ % \fqquad pythontex project\textgreen{\_html} \cs{LWRopseq} \\ % \fqquad pdflatex project\textgreen{\_html}.tex \\ % \fquad \} , \\ % \fquad \dots \\ % ]\{lwarp\} % \end{sourcedisplay} % % Another possibility is to use \prog{latexmk}, placing the % \cmds{latexmk \dots} commands in the \optn{PrintLatexCmd} and \optn{HTMLLatexCmd} % options. % While using these options, the \pkg{lwarp} option \optn{latexmk} would not be used. % % No attempt has yet been made to make \pkg{pythontex} robust with \HTML\ output. % Some math objects must be surrounded by % \trouble[``impure'' math]{pythontex=\pkg{pythontex}} % \cs{displaymathother} \dots\ \cs{displaymathnormal}, % or \cs{inlinemathother} \dots\ \cs{inlinemathnormal}. % Displays of code may have to be % enclosed inside a \env{lateximage} environment % \watchout[HTML look-alike] % to prevent |<|, |>| and similar from being interpreted by the browser % as \HTML\ entities. % % % \subsection{\pkg{sympytex} package} % % \DescribePackage{sympytex} % \trouble{sympytex=\pkg{sympytex}} % For \pkg{sympytex}: % % \begin{sourcedisplay} % \cs{usepackage}[ \\ % \fquad \dots \\ % \fquad PrintLatexCmd=\{ \\ % \fqquad pdflatex project.tex \cs{LWRopseq} \\ % \fqquad python project.sympy \cs{LWRopseq} \\ % \fqquad pdflatex project.tex \\ % \fquad \} , \\ % \fquad HTMLLatexCmd=\{ \\ % \fqquad pdflatex project\textgreen{\_html}.tex \cs{LWRopseq} \\ % \fqquad python project\textgreen{\_html}.sympy \cs{LWRopseq} \\ % \fqquad pdflatex project\textgreen{\_html}.tex \\ % \fquad \} , \\ % \fquad \dots \\ % ]\{lwarp\} % \end{sourcedisplay} % % Also see the warnings for \pkg{pythontex}, above. % \subsection{Other packages} % % \DescribePackage{rterface} % \trouble{rterface=\pkg{rterface}} % Other packages such as \pkg{rterface} would be set up % similar to \pkg{pythontex}, and the same warnings would apply. % % % \subsection{\prog{make} program} % \gindex{make utility} % % \DescribeProgram{make} % To use \pkg{lwarp} with the \prog{make} program, % have the \filenm{makefile} take \filenm{project.tex} and % generate the print version \filenm{project.pdf}, as normal. % |\usepackage{lwarp}| must be used, and it generates \filenm{lwarpmk.conf} % when the print version is created. % % To generate \HTML, first have \filenm{project_html.tex} be compiled to % generate \filenm{project_html.pdf}. % This must be in \PDF\ format. % Finally, have \filenm{project_html.pdf} be converted to \HTML\ using % \cmds{lwarpmk pdftohtml project\_html.pdf}, % and convert \SVG\ math with \cmds{lwarpmk limages}. % % % \subsection{\UTF-8 locale} % \label{sec:utf8locale} % \gindex{locale} % \gindex{UTF-8>locale} % % \changes{v0.62}{2018/10/20}{Docs: UTF-8 locale.} % % \prog{lwarpmk} uses the \prog{texlua} program, which sets the ``locale'' to ``|C|'', % \trouble[UTF-8 locale]{UTF-8>locale} % \trouble{Unicode>UTF-8 locale} % \trouble{locale} % including for external operating-system calls such as when executing \cmds{lwarpmk html}. % In some cases, an external program called from the user's document % may require the use of a \UTF-8 ``locale''. % For \brand{Unix}-related operating systems, it may be required to use \pkg{lwarp}'s % custom compilation options to add a locale change: % \begin{sourcedisplay} % \cs{usepackage}\{lwarp\}[\\ % \fquad PrintLatexCmd=\{\\ % \fqquad \textred{env LC\_CTYPE=en\_US.UTF-8} \\ % \fqqquad xelatex --shell-escape project.tex \\ % \fquad \} \\ % \fquad HTMLLatexCmd=\{\\ % \fqquad \textred{env LC\_CTYPE=en\_US.UTF-8} \\ % \fqqquad xelatex --shell-escape project\textgreen{\_html}.tex \\ % \fquad \} \\ % ] \\ % \end{sourcedisplay} % % \DescribePackage{ditaa} % The only example seen so far where this is required is the \pkg{ditaa} package, % \trouble{ditaa=\pkg{ditaa}} % where the locale change allows the use of UTF-8 with Xe\LaTeX\ and \pkg{ditaa}. % To use Lua\LaTeX\ instead, the locale change would have to be made inside the % \pkg{ditaa} package where its calls the \prog{ditaa} program. % % % \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{\element{meta} author} % files, and also for the \EPUB, % use \cs{HTMLAuthor} \marg{name}. This assigns the name to the % \element{meta} author element. 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: % % \begin{docsidebar}[\bool{FormatEPUB}] % \DescribeBoolean{FormatEPUB} \DescribeDefault{false} % \raggedright % |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} % \gindex{EPUB>HTML conversion settings} % \gindex{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} % \userentry{lwarpmk html} % \userentry{lwarpmk limages} % 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 section. % \end{itemize} % % The resulting files will be ready to be loaded into an \EPUB\ conversion % program, such as the open-source program \prog{Calibre} (\url{https://calibre-ebook.com/}). % \gindex{Calibre=\prog{Calibre}} % \gindex{EPUB>conversion software}\margintag{\prog{Calibre}} % % The \EPUB\ conversion program must know what order the files are included. % For \pkg{lwarp} projects, set the \EPUB\ conversion software to % \trouble[search order]{EPUB>search order} % \trouble{EPUB>page order} % \trouble{Calibre=\prog{Calibre}>EPUB conversion} % do a breadth-first search of the files. % For \prog{Calibre}, this option is found in % \begin{UIdisplay} % Preferences $\to$ Plugins $\to$ File type plugins $\to$ \HTML\ to Zip % \end{UIdisplay} % Check the box \textsf{Add linked files in breadth first order.} % Set the document encoding as |utf-8|\trouble[encoding]{EPUB>encoding}, % which is what \pkg{lwarp} generates for \HTML, % even if the original printed document uses some other encoding. % % The \EPUB-conversion program must also know where the section breaks are located. % \trouble[section breaks]{EPUB>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 \element{h4}, whereas a |book| class document would break at \cs{chapter}, % which is \HTML\ heading level \element{h3}. % For \prog{Calibre}, this option is found in % \begin{UIdisplay} % 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} % Match \HTML\ tags with tag name: % \end{UIdisplay} % to ``h4''. (Or ``h3'' for document classes with \cs{chapter}s.) % The \textsf{Detect chapters at} field should then show % \begin{UIdisplay} % //h:h4 \qquad \textmd{\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 \prog{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} % \label{sec:wordprocessorconversion} % \gindex{word processor>HTML conversion settings} % \gindex{HTML>conversion settings>word processor} % \gindex{LibreOffice=\brand{LibreOffice}>import into} % \gindex{export>to word processor} % \trouble{word processor>import} % \trouble{LibreOffice=\prog{LibreOffice}>import} % % \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 \brand{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. % % % \subsection{Activating word-processor conversion} % % A special boolean is provided to simplify the process of % converting \pkg{lwarp} \HTML\ output to \EPUB: % \begin{docsidebar}[\bool{FormatWP}] % \DescribeBoolean{FormatWP} \DescribeDefault{false} % \raggedright % 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. % Additionally, honors the booleans |WPMarkFloats|, |WPMarkMinipages|, % |WPMarkTOC|, and |WPMarkLOFT|. % \end{docsidebar} % % To help modify \pkg{lwarp} \HTML\ output for easier % import to a word processor, add % \begin{sourcedisplay} % |\booltrue{FormatWP}| % \end{sourcedisplay} % to the project's source preamble after \pkg{lwarp} is loaded. % The following changes are then made to the \HTML\ output: % \margintag{formatting adjustments} % \begin{itemize} % \item If using a class without chapters, \cs{section} and lower are % shifted up in level for the \HTML\ heading tags. The \CSS\ has % not been changed, so the section heading formats will not match the normal % \HTML\ output, but when imported to \prog{LibreOffice Writer} the higher % section headings will import as \UI{Heading~1} for the title, \UI{Heading~2} % for \cs{section}, etc. % \item Headers, footers, and navigation are removed at file splits. % \item Any accumulated footnotes are printed at the bottom of each section. % \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 \element{div}s, % but they are no longer useful when the document has been % imported into a word processor. % \item An additional \element{div} with an \attribute{id} encapsulates % each float and minipage, which on import into \prog{LibreOffice Writer} % causes a thin frame to appear around the text block for each. % \item Float captions are given an explicit italic formatting. % \item Tabular rule borders are made explicit for \prog{LibreOffice Writer}. % \brand{LibreOffice} displays a light border around each cell while editing, % even those which have no border when printed, % and \pkg{lwarp} also uses a light border for thin rules, % so it will be best to judge the results using % the print preview instead of while editing in \brand{LibreOffice}. % \item \cs{includegraphics} and \SVG\ math width and height % are made explicit for \brand{LibreOffice}. % \item \cs{hspace} is approximated by a number of \cs{quad}s, % and rules are approximated by a number of underscores. % \item Explicit \HTML\ styles are given to: % \begin{itemize} % \item \cs{textsc}, etc. % \item \cs{underline}, \pkg{soul} and \pkg{ulem} markup. % \item \env{center}, \env{flushleft}, \env{flushright}. % \item \cs{marginpar}, \pkg{keyfloat}, \pkg{sidenotes}, \pkg{floatflt}, % and \pkg{wrapfig}. % \item \pkg{fancybox} \cs{shadowbox}, etc. % \item The \LaTeX\ and \TeX\ logos. % \end{itemize} % \item Honors several booleans: % \begin{description} % \item[\texttt{WPMarkFloats}:] Marks the begin and end of floats. % \item[\texttt{WPMarkMinipages}:] Marks the begin and end of minipages. % \item[\texttt{WPMarkTOC}:] Marks the location of the Table of Contents. % \item[\texttt{WPMarkLOFT}:] Marks the locations of the List of Figures/Tables. % \item[\texttt{WPMarkMath}:] Prints \LaTeX\ math instead of using images. % \item[\texttt{WPTitleHeading}:] Adjusts title and section headings. % \end{description} % Several of these may be used to add markers to the \HTML\ text % which help determine where to adjust the word processor document after % import. % \end{itemize} % % % \subsection{Additional modifications} % % \newcommand{\describeWPMarkFloats}{ % Adds % \begin{sourcedisplay} % === begin table === \\ % \dots \\ % === end === % \end{sourcedisplay} % or % \begin{sourcedisplay} % === begin figure === \\ % \dots \\ % === end === % \end{sourcedisplay} % around floats while formatting for word processors. % This helps identify boundaries of floats to be manually converted % to word-processor frames and captions. % } % % \begin{docsidebar}[\bool{WPMarkFloats}] % \DescribeBoolean{WPMarkFloats} \DescribeDefault{false} % \raggedright % \describeWPMarkFloats % \end{docsidebar} % % % \newcommand{\describeWPMarkMinipages}{ % Adds % \begin{sourcedisplay} % === begin minipage === \\ % \dots \\ % === end minipage === % \end{sourcedisplay} % around minipages while formatting for word processors. % This helps identify boundaries of minipages to be manually converted % to word-processor frames. % } % % \begin{docsidebar}[\bool{WPMarkMinipages}] % \DescribeBoolean{WPMarkMinipages} \DescribeDefault{false} % \raggedright % \describeWPMarkMinipages % \end{docsidebar} % % % \newcommand{\describeWPMarkTOC}{ % While formatting for word processors, adds % \begin{sourcedisplay} % === table of contents === \\ % \end{sourcedisplay} % where the Table of Contents would have been. % This helps identify where to insert the actual \TOC. % % \emph{If set |false|, the actual \TOC\ is printed instead.} % } % % \begin{docsidebar}[\bool{WPMarkTOC}] % \DescribeBoolean{WPMarkTOC} \DescribeDefault{true} % \raggedright % \describeWPMarkTOC % \end{docsidebar} % % % \newcommand{\describeWPMarkLOFT}{ % While formatting for word processors, adds % \begin{sourcedisplay} % === list of figures === \quad \textrm{\textit{and\,/\,or}} \\ % === list of tables === \\ % \end{sourcedisplay} % where each of these lists would have been. % This helps identify where to insert the actual lists. % % \emph{If set |false|, the actual lists are printed instead.} % } % % \begin{docsidebar}[\bool{WPMarkLOFT}] % \DescribeBoolean{WPMarkLOFT} \DescribeDefault{false} % \raggedright % \describeWPMarkLOFT % \end{docsidebar} % % % \newcommand{\describeWPMarkMath}{ % While formatting for word processors, % prints math as \LaTeX\ code instead of creating \SVG\ images or \MathJax. % This is useful for cut/paste into the \prog{LibreOffice Writer TeXMaths} extension. % } % % \begin{docsidebar}[\bool{WPMarkMath}] % \trouble{TeXMaths} % \trouble{siunitx=\pkg{siunitx}>with \prog{TeXMaths}} % \margintag{siunitx} % \DescribeBoolean{WPMarkMath} \DescribeDefault{false} % \DescribeProgram{TeXMaths} % \raggedright % \describeWPMarkMath % % When using the \pkg{siunitx} package, enter % \begin{sourcedisplay} % \cs{usepackage}\{siunitx\} % \end{sourcedisplay} % in the \prog{TeXMaths} preamble. % Equation numbering is problematic for \AmS\ math environments. % \end{docsidebar} % \gindex{siunitx>with \prog{TeXMaths}} % \gindex{math>word processor conversion} % % % \newcommand*{\describeWPTitleHeading}{ % While formatting for word processors, % |true| sets the document title to \element{h1}, which is expected for \HTML\ documents, % but also causes the lower-level section headings to start at \UI{Heading 2} when % imported into \brand{LibreOffice}. % Set to |false| to cause the title to be plain text, and the section headings % to begin at \UI{Heading 1}. % % See \cref{tab:WPsectionheadings} on \cpageref{tab:WPsectionheadings}. % } % % \begin{docsidebar}[\bool{WPTitleHeading}] % \DescribeBoolean{WPTitleHeading} \DescribeDefault{false} % \margintag{section headings} % \raggedright % \describeWPTitleHeading % \end{docsidebar} % \gindex{section>heading, word processor} % \gindex{heading, word processor} % \gindex{word processor>section headings} % \gindex{LibreOffice=\brand{LibreOffice}>section headings} % \trouble{sectioning>word processor import} % \trouble{word processor>sectioning headings} % % \begin{table} % \centering % \begin{threeparttable} % \caption{Section \HTML\ headings for word-processor conversion} % \label{tab:WPsectionheadings} % \begin{tabular}{lcccc} % \toprule % ~ & \multicolumn{4}{c}{\HTML\ headings\tnote{\textasteriskcentered}} \\ % \cmidrule{2-5} % ~ & \multicolumn{2}{c}{With \cs{chapter}} & \multicolumn{2}{c}{Without \cs{chapter}} \\ % \cmidrule(r){2-3} \cmidrule(l){4-5} % ~ & \multicolumn{2}{c}{|WPTitleHeading|} & \multicolumn{2}{c}{|WPTitleHeading|} \\ % Section & |true| & |false| & |true| & |false| \\ % \midrule % Title & \element{h1} & plain & \element{h1} & plain \\ % \cs{book} & \element{div} & \element{div} & \element{div} & \element{div} \\ % \cs{part} & \element{h2} & \element{h1} & \element{h2} & \element{h1} \\ % \cs{chapter} & \element{h3} & \element{h2} & --- & --- \\ % \cs{section} & \element{h4} & \element{h3} & \element{h3} & \element{h2} \\ % \cs{subsection} & \element{h5} & \element{h4} & \element{h4} & \element{h3} \\ % \cs{paragraph} & \element{h6} & \element{h5} & \element{h5} & \element{h4} \\ % \cs{subparagraph} & \element{span} & \element{h6} & \element{h6} & \element{h5} \\ % \bottomrule % \end{tabular} % \begin{tablenotes} % \footnotesize % \item[\textasteriskcentered] For default depths when not |FormatWP|, % see \cref{tab:depthsheadings} on \cpageref{tab:depthsheadings}. % \end{tablenotes} % \end{threeparttable} % \smallskip\hrule % \end{table} % % \subsection{Recommendations} % \gindex{word processor>conversion recommendations} % \gindex{LibreOffice=\brand{LibreOffice}>conversion recommendations} % % For use with \prog{LibreOffice Writer}, it is recommended to: % \margintag{TOC, LOF, LOT} % \begin{enumerate}[nosep] % \item Set |\booltrue{FormatWP}| % \item Set |\booltrue{WPMarkTOC}| and |\boolfalse{WPMarkLOFT}| % \item Use \pkg{lwarp} to generate the \HTML\ document. % \item Copy/paste from the \HTML\ document into an empty \prog{LibreOffice Writer} document. % \item Manually insert a \brand{LibreOffice} \TOC\ in the \brand{LibreOffice} document. % \item Manually add frames around each float, adding a caption which is cut/pasted from % each float's simulated caption. % \item Manually create cross references. % \end{enumerate} % This process yields a document with an actual \brand{LibreOffice} Table of Contents, % but a simulated List of Figures and List of Tables. % % For \pkg{siunitx}, remember to adjust the preamble as mentioned above. % \margintag{siunitx} % % \brand{LibreOffice} has options in the \UI{View} menu to turn on/off the display of % \margintag{LO view border options} % thin borders around table cells and text objects. % % % \subsection{Limitations} % % Floats and captions are not explicitly converted to \brand{LibreOffice} floats with their % own captions. Floats are surrounded by a thin frame in the \brand{LibreOffice} editor, % and may be marked with |WPMarkFloats|, but are not given a proper \brand{LibreOffice} % object frame. % Captions are given an explicit italic formatting, % but not a proper \brand{LibreOffice} paragraph style. % % Cross references are not actual \brand{LibreOffice} linked cross references. % % The List of Figures and List of Tables are not linked. % The pasted pseudo \LOF\ and \LOT\ match the numbering % of the \LaTeX\ and \HTML\ versions. % % Equation numbering is not automatic, but the equation numbers in \SVG\ math % will match the \LaTeX\ and \HTML\ output. % \SVG\ math is recommended when using the \AmS\ environments, which may have % multiple numbered equations per object. % % As of when last checked, \brand{LibreOffice} ignores the following: % \begin{itemize} % \item Minipage alignment. % \item Tabular cell vertical alignment. % \item Image rotation and scaling. % \item Rounded border corners, which are also used by: % \begin{itemize} % \item \cs{textcircled} % \item \pkg{booktabs} trim % \end{itemize} % \item \cs{hspace} and rules, also used by \pkg{algorithmic}. % \item Coloring of text decorations, used by \pkg{soul} and \pkg{ulem}. % \item Overline text decoration, used by \pkg{romanbar}. % \end{itemize} % % \brand{LibreOffice} also has limitations with frames and backgrounds: % \begin{itemize} % \item Multiple lines in an object are framed individually instead of as a whole. % \item Nested frames are not handled correctly. % \item Images inside boxes are not framed correctly. % \item Spans with background colors and frames are not displayed correctly. % \end{itemize} % % % % % % % \clearpage % % \section{Modifying \pkg{lwarp}} % \pagestyle{pageheadfoot} % % To quickly find the source for a package in |lwarp.dtx|, % \margintag{locating something} % search for |*packagename|, % such as |*siunitx|. % % Likewise, to quickly find the source for a file in |lwarp.dtx|, % search for |*filename|, such as |*lwarp.css|. % % Purely text-based packages probably will work as-is when generating % \HTML. % % Look to existing code for ideas on how to expand into new code. % % An environment may be converted to a |lateximage| then displayed % \margintag{image of \TeX\ output} % with an image of the resulting \LaTeX{} output. % See \cref{sec:picture} for an example of the |picture| environment. % % To create a custom \HTML\ block or inline \CSS\ class, % \margintag{\CSS\ classes} % see \cref{sec:highlevelclasses}. % % To create print and \HTML\ versions of the same macro or environment, % \margintag{print/HTML macros} % see \cref{sec:definingprinthtml}. % % Any \TeX\ boxes must be undone, as \SVG\ math or \env{lateximage}s % \watchout[\TeX\ boxes] % require \cs{newpage}, which will not work in a \TeX\ box. % % % % \subsection{Creating a development system} % % The following creates a local development system for \pkg{lwarp} on a TeXLive system % in a \brand{Unix}-like environment. % Doing so allows anything requesting \pkg{lwarp} to use the development version % instead of whichever version is installed in TeXLive. % % \begin{description} % \item [Create a development directory:] \ % % Place into this directory \filenm{lwarp.dtx} and \filenm{lwarp.ins}. % % To create \filenm{lwarp.sty}, % execute \userentry{pdflatex lwarp.ins} which creates \filenm{lwarp.sty} and several % hundred additional \filenm{lwarp-*.sty} files for the various packages which are % supported. % % To create the initial documentation \filenm{lwarp.pdf}, % execute \userentry{pdflatex lwarp.dtx} % % \item[To make the development files visible to other projects:] \ % % Create the directory % \begin{quote} % \filenm{/usr/local/texlive/texmf-local/tex/latex/local/lwarp} % \end{quote} % % Inside this directory, create the file \filenm{update}, containing: % \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines] % rm lwarp-*.sty % ln -s /path_to_dev_directory/lwarp*.sty . % ln -s /path_to_dev_directory/lwarp_baseline_marker.png . % ln -s /path_to_dev_directory/lwarp_baseline_marker.eps . % mktexlsr % \end{Verbatim} % Run ./update now, and whenever a new lwarp-* package is added. % \item[To make the development version of \prog{lwarpmk} visible to other projects:] \ % % \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines] % cd /opt % ln -s /usr/local/texlive/texmf-local/bin/x86_64-linux texbin_local % cd texbin_local % ln -s ../../scripts/lwarp/lwarpmk.lua lwarpmk % cd /usr/local/texlive/texmf-local/scripts/ % mkdir lwarp % cd lwarp % ln -s /path_to_dev_directory/lwarpmk.lua lwarpmk % \end{Verbatim} % Verify that the correct version is found with \userentry{which lwarpmk} % % \item [To make the local versions visible to the shell:] \ % % Paths must be set by the shell startup, such as in \filenm{.bashrc} and \filenm{.cshrc}: % % In \filenm{.bashrc}: % \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines] % PATH=/opt/texbin_local:/opt/texbin:$PATH % \end{Verbatim} % % In \filenm{.cshrc}: % \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines] % setenv PATH ${HOME}/bin:/opt/texbin_local:/opt/texbin:${PATH} % \end{Verbatim} % % \item[To fully compile the \pkg{lwarp} documentation and indexes:] \ \null % \changes{v0.57}{2018/05/28}{Docs: Recreating the index for \pkg{lwarp} source.} % \changes{v0.87}{2020/05/17}{Docs: Updated docs to compile \pkg{lwarp} documentation.} % \gindex{documentation>compile} % \gindex{lwarp=\pkg{lwarp}>compiling documentation} % \begin{sourcedisplay} % pdflatex lwarp.ins \\ % pdflatex lwarp.dtx \\ % pdflatex lwarp.dtx \hfill \textgreen{} \\ % makeindex -s gglo.ist -o lwarp.gls lwarp.glo \hfill \textgreen{} \\ % splitindex lwarp.idx -- -s gind.ist \\ % pdflatex lwarp.dtx \\ % pdflatex lwarp.dtx \hfill \textgreen{} \\ % makeindex -s gglo.ist -o lwarp.gls lwarp.glo \hfill \textgreen{} \\ % splitindex lwarp.idx -- -s gind.ist \hfill \textgreen{} \\ % pdflatex lwarp.dtx \\ % pdflatex lwarp.dtx \hfill \textgreen{} \\ % \end{sourcedisplay} % (The multiple rounds of index processing are required to fully resolve the % final Index of Indexes.) % % To make it easier to update the documentation after a minor change, % it is useful to create a command script called \filenm{make_index}, containing: % \begin{sourceverb} % makeindex -s gglo.ist -o lwarp.gls lwarp.glo % splitindex lwarp.idx -- -s gind.ist % \end{sourceverb} % % Note that Index of Indexes and the cross-references to the indexes % \trouble[references]{index>documentation references} % \trouble{documentation>index cross-references} % may not be correct until the above has been accomplished. % % \end{description} % % % % \subsection{Modifying a package for \pkg{lwarp}} % % \gindex{package>modifying for \pkg{lwarp}} % \gindex{modifying>package} % \gindex{adapting>package} % \gindex{converting>package} % % If a class loads additional packages, it will be required to modify the % class for \pkg{lwarp}, since \pkg{lwarp} must be loaded before most other packages. % % To work with \pkg{lwarp}, a class must first set up anything which replicates % the functions of the basic \LaTeX\ classes, load any required fonts, % then load \pkg{lwarp}, then finally load and adjust any other required packages. % % When creating \HTML, % \pkg{lwarp} redefines the \cs{usepackage} and \cs{RequirePackage} % macros such that it first looks to see if a |lwarp-.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 \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-.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 \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 % |lwarp-| packages for examples. % % Anything the user might expect of the original package % must be replaced or emulated by the new |lwarp-| package, including % package options, user-adjustable counters, lengths, and booleans, and % conditional behaviors. % 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 \HTML\ output. Only the ``user-facing'' % macros need to be nullified or emulated. % % Each |lwarp-*| package should first call either of: % \begin{sourcedisplay} % \cs{LWR@ProvidesPackage\textblue{Drop}} \\ % \fquad \textrm{\orelse} \\ % \cs{LWR@ProvidesPackage\textblue{Pass}} % \end{sourcedisplay} % 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 \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 \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. % % % \subsubsection{Adding a package to the \pkg{lwarp.dtx} file} % % When adding a package to |lwarp.dtx| for permanent inclusion in \pkg{lwarp}, % provide the |lwarp-| code in |lwarp.dtx|, % add its entry into |lwarp.ins|, and also remember to add % \begin{sourcedisplay} % \cs{LWR@loadafter}\{\textless{}packagename\textgreater\} % \end{sourcedisplay} % to |lwarp.dtx| in \cref{sec:loadafter}. This causes \pkg{lwarp} to stop with % an error if \pkg{packagename} is loaded before \pkg{lwarp}. % Finally, add an entry in \cref{tab:supported}, \nameref{tab:supported}, % and also the Updates section. % % % \subsection{Modifying a class for \pkg{lwarp}} % % \gindex{class>modifying for \pkg{lwarp}} % \gindex{modifying>class} % \gindex{adapting>class} % \gindex{converting>class} % % If a class loads additional packages, it will be required to modify the % class for \pkg{lwarp}, since \pkg{lwarp} must be loaded before most other packages. % % To work with \pkg{lwarp}, a class must first set up anything which replicates % the functions of the basic \LaTeX\ classes, load any required fonts, % then load \pkg{lwarp}, then finally load and adjust any other required packages. % % % \subsection{Testing \pkg{lwarp}} % % \changes{v0.25}{2017/03/22}{Docs: Testing \pkg{lwarp}.} % % Compiling \filenm{lwarp.ins} generates all the \filenm{*.sty} files for \pkg{lwarp}. % It can be useful to create additional \filenm{*.ins} files to be able to % recompile only the pieces which have changed. % % For example, % \margintag{compiling individual packages} % to be able to recompile the \pkg{lwarp} core alone, % \DescribeFile{core.ins} % copy \filenm{lwarp.ins} to \filenm{core.ins}, % then modify \filenm{core.ins} to only compile: % \begin{sourceverb} % \generate{ % \file{lwarp.sty}{\from{lwarp.dtx}{package}} % } % \end{sourceverb} % % For individual packages, create \filenm{packagename.ins}, set to compile only: % \begin{sourceverb} % \generate{ % \file{lwarp-packagename.sty}{\from{lwarp.dtx}{packagename}} % } % \end{sourceverb} % % When changes have been made, test the print output before testing the % \HTML. The print output compiles faster, and any errors in the printed % version will be easier to figure out than the \HTML\ version. % % Remember that the configuration files % \margintag{compiling \CSS\ and other generated files} % are only rewritten when compiling the % printed version of the document. % % \changes{v0.57}{2018/05/28}{Docs: Recompiling \prog{lwarpmk} or \CSS\ files.} % When changing the source to \prog{lwarpmk} or a \CSS\ file in \filenm{lwarp.dtx}: % \begin{enumerate} % \item Change the source in \filenm{lwarp.dtx}. % \item |pdflatex lwarp.ins| -or- |pdflatex core.ins| % \item If modifying \prog{lwarpmk} the new version should now be active. % \item If modifying \CSS\ files or other files generated by \pkg{lwarp}: % \begin{enumerate} % \item For the document, |lwarpmk print| to update the \CSS\ files % in the project. % \item Reload the \HTML\ document to see the effect of the new \CSS\ files. % \end{enumerate} % \item If done testing, |pdflatex lwarp.dtx| to update the \pkg{lwarp} documentation. % \end{enumerate} % % Sometimes it is worth checking the |_html.pdf| file, which is the % \PDF\ containing \HTML\ tags. Also, |_html.html| has % the text conversion of these tags, before the file is split into individual % \HTML\ files. % % It is also worth checking the browser's tools for verifying the correctness % of \HTML\ and \CSS\ code. % % % \subsection{Modifying \prog{lwarpmk}} % \label{sec:modifylwarpmk} % % \changes{v0.28}{2017/04/14}{Docs: Modfying lwarpmk and index processing.} % % \DescribeProgram{lwarpmk} % \DescribeFile{lwarpmk.lua} % In most installations, \filenm{lwarpmk.lua} is an executable file located somewhere % \gindex{lwarpmk=\prog{lwarpmk}>customizing} % the operating system knows about, and it is called by typing \cmds{lwarpmk} into % a terminal. % % A project-local copy of \filenm{lwarpmk.lua} may be generated, modified, and then used to % compile documents: % \begin{enumerate} % \item Add the \optn{lwarpmk} option to the \pkg{lwarp} package. % \item Recompile the printed version of the document. % The \optn{lwarpmk} option causes \pkg{lwarp} to create a local copy of \filenm{lwarpmk.lua} % \item The \optn{lwarpmk} option may now be removed from the \pkg{lwarp} package. % \item Copy and rename \filenm{lwarpmk.lua} to a new file such as \filenm{mymake.lua}. % \item Modify \filenm{mymake.lua} as desired. % \item If necessary, make \filenm{mymake.lua} executable. % \item Use \filenm{mymake.lua} instead of \filenm{lwarpmk.lua}. % \end{enumerate} % % % % \clearpage % % ^^A *troubleshooting % \section{Troubleshooting} % \label{sec:troubleshooting} % \gindex{FAQ}\gindex{Frequently Asked Questions}\gindex{bugs} % \gindex{troubleshooting}\gindex{problems}\gindex{error messages} % \gindex{debugging} % \trouble{error messages} % \trouble{warning messages} % % % \subsection{\pkg{lwarp} package error conditions and warnings} % \label{sec:errortestingmessages} % \changes{v0.71}{2019/04/11}{Docs: Error testing.} % % \pkg{lwarp} tests for a number of error conditions and prints appropriate % warnings. The following is a summary of these conditions. % % \subsubsection{Configuration file \filenm{lwarpmk.conf}} % % \begin{description} % \item[File does not exist:] The configuration file must exist for \pkg{lwarpmk}. % \item[Incorrect \optn{Unix} \slash \optn{Windows} selection:] The operating % system which was detected by \pkg{lwarp}. So far only \optn{Unix} and \optn{Windows} % are supported. % \item[Incorrect delimiter characters.] Older versions of \prog{lwarpmk} used % a different delimiter. % \item[Source name is set to \optn{lwarp}:] % \pkg{lwarp} has recently been recompiled in this directory, % which overwrote the project's configuration files. % This also occurs if \prog{lwarpmk} is executed in \pkg{lwarp}'s source directory. % \item[Incorrect operating system:] The configuratio file was set for a % different operating system, perhaps due to sharing in a collaborative project. % \item[Outdated configuration files:] \pkg{lwarp} has % been updated since this projects was last compiled. % If there appears to be a valid print command in the file, \pkg{lwarpmk} displays % this to instruct the user how to recompile the print version, which then % updates the configuration files. % \item[The designated source file does not exist:] For whatever reason\dots % \item[Unknown engine:] \pkg{lwarp} cannot determing which engine is being used. % Supported are \DVI\ \LaTeX, \PDF\ \LaTeX, \XeLaTeX, \LuaLaTeX, and up\LaTeX. % \end{description} % % \subsubsection{Image generation with \cmds{lwarpmk limages}} % % \begin{description} % \item[``Wait a moment for the images to complete before reloading page.'':] \ % % Images % are generated by background tasks. If the document is reloaded before these % tasks are complete, some images may not yet be generated. % \prog{lwarpmk} tries to wait for background tasks to complete before exiting. % \item[\HTML\ version does not exist:] Images are extracted from the \HTML\ version, % which must be compiled before images are generated. % \item[\filenm{*-images.txt} does not exist:] This file tells which images to % extract from the \HTML\ file. If the file does not exist, it may be that % no \SVG\ math or \env{lateximage}s were used. % If so, \cmds{lwarpmk limages} is not necessary. % \item[Cross references are not correct:] The document must have up-to-date % cross references to locate the images to extract. % A number of conditions may cause incorrect cross references. % \item[``WARNING: Images will be incorrect.'':] An image reference was not found. % Recompile. % \item[\cmds{lwarpmk epstopdf *} or \cmds{lwarpmk pdftosvg *}:] Errors if % filenames are not found. % \end{description} % % \subsubsection{Default bitmapped font} % % \pkg{lwarp} requires the use of a vector font. % If \pkg{lwarp} detects that the document uses the default % \brand{Computer Modern} font, and the \pkg{cm-super} package is not installed, % it is assumed that the font is bitmapped. % An error is generated, along with the recommendation to install \pkg{cm-super} % or use \pkg{lmodern}. % % \subsubsection{Packages} % % \begin{description} % \item[Loaded before \pkg{lwarp}:] Some packages and classes must be loaded % before \pkg{lwarp}. These include input and font encoding, % \pkg{morewrites} and \pkg{newclude}, % and a number of CJK-related packages and classes. % \item[Loaded after \pkg{lwarp}:] Most packages which are modified by % \pkg{lwarp} must be loaded after \pkg{lwarp}. % \item[Loaded never:] Some packages do not work with \pkg{lwarp}. % An error is generated, along with a list of alternatives to consider. % \item[Specific packages:] Some packages enforce a specific load order vs. % certain other packages. % \item[Patching error:] \pkg{lwarp} tries to patch some packages using % \pkg{xpatch}. If the original package has been updated more recently than % \pkg{lwarp}, a patch may not work. It may be necessary to use an older version % of the package until \pkg{lwarp} is updated. % \item[\pkg{longtable}:] \pkg{lwarp}'s \pkg{longtable} package issues % detailed error messages regarding the use of the table headers and footers. % \item[\pkg{polyglossia}:] If used, an informative message is printed to % instruct the user to be sure to set a language, without which an error will occur. % \item[\pkg{babel} or \pkg{polyglossia}:] An informative message is printed to % note that not all langauges are supported by \pkg{cleveref}. % \end{description} % % \subsubsection{Compiling} % % \begin{description} % \item[\ctr{SideTOCDepth} < \ctr{FileDepth}:] A warning is displayed if these % counters are set such that the side\TOC\ will not be able to access all pages % of the website. % \item[Filenames:] \pkg{lwarp} may generate file names from section names. % While doing so, the filenames are simplified, and special characters % and math are removed. % If this process generates a duplicate filename, and warning is generated, % describing the filename and which section name generated it, % and a unique file number is appended to the file name. % A warning is also issued if dollar-delimited math is used. % Parenthesis-delimited math is recommended instead. % \item[Multirow:] When \cs{multirow} or \cs{multicolrow} are used, % \trouble[\HTML\ corrupted]{HTML>corrupted} % \cs{mrowcell} or \cs{mcolrowcell} must be placed in the appropriate cells to % avoid corrupted \HTML\ output. % \item[(width,height) missing a comma:] \cs{makebox} and \cs{framebox} can accept % a parenthesis-delimited width and height, which must be separated by a comma. % \item[``Load graphicx or graphics for improved \SVG\ math baselines.'':] \SVG\ math % sizing and baselines are improved if either of these packages are used. % \item[``Load graphicx or graphics for improved XeTeX logo.'':] If these packages % are loaded, the \XeLaTeX\ logo can use the reversed ``E''. % \item[``It is recommended to use \texttt{[width=xx\cs{linewidth}]} % instead of % \texttt{[scale=yy]} % '':] Browser support of \optn{scale} does not have the same effect as in \LaTeX. % \end{description} % % % \subsection{Using the \pkg{lwarp} package} % % The following address problems which may occur, and possible solutions to each. % % Also see: \\ % \Cref{sec:printcommands}: \nameref{sec:printcommands} \\ % \Cref{sec:limitations}: \nameref{sec:limitations} % % \changes{v0.14}{2016/03/26}{Docs: Troubleshooting cross-references.} % \changes{v0.16}{2016/04/08}{Docs: Text not converting.} % \changes{v0.34}{2017/08/08}{Docs: Misplaced alignment character.} % \changes{v0.42}{2017/10/13}{Docs: Improper \cs{prevdepth}.} % \changes{v0.58}{2018/06/07}{Docs: Misplaced \cs{omit}.} % % \begin{description} % % \item [Text is not converting correctly / corrupted \HTML\ tags:] ~ % \trouble[\HTML\ corrupted]{HTML>corrupted} % \begin{itemize} % \item Font-related UTF-8 information must be embedded in the \PDF\ file. % See \cref{sec:fonts} regarding bitmapped vs. vector fonts. % \item See \cref{sec:avoidtextformatting} regarding \HTML\ entities and % the characters |&|, |<|, and |>|. % \end{itemize} % % \item [Dotless j (\cs{j}):] See \cref{sec:fonts} regarding \pkg{cmap}, \pkg{mmap}. % \trouble[\pkg{dotlessj}]{dotlessj=\pkg{dotlessj}} % % \item [Undefined \HTML\ settings:] \ % \trouble{HTML>settings>undefined} % \begin{itemize} % \item See the warning regarding the placement of the \HTML\ settings % at \cref{sec:htmlsettings}. % \end{itemize} % % \item [Tabular problems:] See \cref{sec:limitstabular}. % % \item [Obscure error messages:] ~ % \begin{description} % \setlength{\parskip}{1ex} % \item [Print first:] Be sure that a print version of the document compiles and % that your document's \LaTeX{} code is correct, before attempting % to generate an \HTML\ version. % % \item [\texttt{\cs{end}\{warpHTML\}, \cs{end}\{warpprint\}, % \cs{end}\{warpall\}, \cs{end}\{warpMathJax\}}:] ~ \\ % \trouble{warpHTML} % \trouble{warpprint}\trouble{warpall}\trouble{warpMathJax} % Each of these must be without any other characters on the same line. % \watchout[\env{warpHTML}, \env{warpprint}, \env{warpMathJax}, \env{warpall}] % % \item[``\texttt{Runaway argument? File ended while scanning use of \cs{next}}:] ~ \\ % \trouble{warpHTML} % \trouble{warpprint}\trouble{warpall}\trouble{warpMathJax} % \trouble{Runaway argument? File ended \dots} % \trouble{File ended while scanning use of \cs{next}} % Don't use \env{warpHTML}, \env{warpprint}, \env{warpall}, or % \env{warpMathJax} inside itself. % % \item [Options clash:] If using \pkg{memoir}, see \cref{sec:limitsmemoir}. % % \item [``Missing \cs{begin}\{document\}.'':] % Some packages require that their options be % specified before \pkg{lwarp} is loaded, or via the package's setup % macro, especially if these options include the use of braces. % See \cref{sec:thingstoavoid}. % % \item [``No room for a new \cs{write}.'':] Before |\usepackage{lwarp}|, add: % \trouble{No room for a new \cs{write}} % \trouble{morewrites=\pkg{morewrites}} % \begin{sourcedisplay} % \cs{usepackage}\{morewrites\} \\ % \cs{morewritessetup}\{allocate=10\} % \end{sourcedisplay} % % \item [''! TeX capacity exceeded, sorry {[}text input levels=15{]}.'':] Packages % \trouble{Text input levels equals 15} % \trouble{TeX capacity exceeded>Text input levels equals 15} % were nested too many levels deep. Locate the file \filenm{texmf.cnf} % for your distribution, and add the line % \begin{sourcedisplay} % max\_in\_open = 30 % \end{sourcedisplay} % % \item [``Missing \$ inserted.'':] If using a filename or URL in a % footnote or \cs{item}, escape underscores with \cs{\_}. % \trouble{Missing \$ inserted>filename or URL} % \trouble{URL>Missing \$ inserted} % \trouble{filename>Missing \$ inserted} % % \item [``Label(s) may have changed. Rerun to get cross-references right.'':] \ % % This warning may repeat endlessly if a math expression is used in a caption. % Simple math expressions such as \$X=1\$ may be replaced with % \begin{sourcedisplay} % \cs{textit}\{X\}\cs{,}=\cs{,}1 % \end{sourcedisplay} % \trouble{Label(s) may have changed} % % \item [``Temporary page! LaTeX was unable to guess the total % number of pages \dots'':] \ % Harmless. Recompile the document one more time. % \trouble{Temporary page \dots\ unable to guess \dots} % \trouble{LaTeX was unable to guess the total\dots} % % \item [``Leaders not followed by proper glue'':] ~ \\ % This can be caused by % a missing |l@| or |l@| definition. % See \pkg{lwarp}'s definitions for examples. % \trouble{Leaders not followed by proper glue} % % \item [``Improper \cs{prevdepth}'':] % \trouble{Improper \cs{prevdepth}>boxes} % \env{lateximage}s and \SVG\ math require \cs{newpage}, which % cannot work inside \TeX\ boxes or \cs{ensuremath}. % Anything using \cs{newsavebox}, \cs{newbox}, \env{lrbox}, % \cs{savebox}, \cs{hbox}, \cs{vbox}, \cs{usebox}, \cs{sbox}, % etc., must be modified to work without box commands. % % \trouble{ensuremath=\cs{ensuremath}} % If you find something using \cs{ensuremath}, have it temporarily set: % \begin{sourcedisplay} % \cs{LetLtxMacro}\cs{@ensuredmath}\cs{LWR@origensuredmath} % \end{sourcedisplay} % inside a group first. % % As a stop-gap measure, you may wish to try incrementing % \label{sec:troubletexboxes} % \margintag{\ctr{LWR@texboxdepth}} % the counter \ctr{LWR@texboxdepth} before the problematic % macro, and then decrementing it after. % Doing so tells \pkg{lwarp} to avoid using a \cs{newpage} inside % the macro, which may avoid this error. % % Also, custom macros which appear inside a section, % \trouble[macros in section, table, figure names]{sectioning>macro in name} % \trouble{table>macro in name} % \trouble{figure>macro in name} % figure, or table name should be % made robust since they appear inside the \filenm{.toc}, \filenm{.lof}, or % \filenm{.lot} files. % Use \cs{newrobustcmd} or \cs{robustify} from \pkg{etoolbox}, \pkg{xparse}, etc. % % If using BibTeX, see \cref{sec:limitsbibtex}.\watchout[BibTeX] % % \item[``\texttt{!~Undefined control sequence. \dots\ \cs{\_\_hook} begindocument''}:] ~ % \watchout[\pkg{polyglossia}] \\ % See \cref{sec:limitspolyglossia} % if using \pkg{polyglossia}. % % \item[``\texttt{\cs{begin}\{equation\} ended by \cs{end}\{document\}}'':] Do not % \trouble[custom macros for environments]{math>custom macros} % use custom macros such as \cs{beq} and \cs{eeq} to replace % \begin{sourcedisplay} % \cs{begin}\{equation\} \\ % \dots \\ % \cs{end}\{equation\} % \end{sourcedisplay} % % \item[``\texttt{Misplaced \cs{omit}}'':] If using \cs{LWR@formatted} to % \watchout[\cs{LWR@formatted}] % define new macros for print and \HTML\ modes, see \cref{sec:definingprinthtml} % regarding \cs{LWR@expandableformatted}. % % \item[''\texttt{Token not allowed in a PDF string}'':] This \pkg{hyperref} % \trouble{Token not allowed in a PDF string} % \trouble{hyperref=\pkg{hyperref}>Token not allowed in a PDF string} % warning appears while creating the print-mode document, not \HTML. % A low-level macro is being used in a section name which appears % in the \PDF\ bookmarks. \pkg{hyperref} removes this macro from % the bookmark, and warns of doing so. % To avoid this warning, use \cs{pdfstringdefDisableCommands} in % the preamble to define simplified replacement macros for each, or use % \cs{texorpdfstring} in the \cs{section} or related macro % to declare what to use for the \TeX\ text, v.s. the \PDF\ bookmark. % See the \pkg{hyperref} manual. % % \item[``\texttt{Command \cs{textquoteright} invalid in math mode}'':] This % \trouble[quote character]{Command \cs{textquoteright} invalid in math mode} % \trouble{math>Command \cs{textquoteright} invalid in math mode} % \trouble{textquoteright=\cs{textquoteright} invalid in math mode} % can occur when the document source has math containing % the slanted quote |’| character, instead of using % the upright quote |'| character. % % \item[Complicated objects inside math:] Some objects, such as \TikZ, % \trouble[``impure'' math objects]{math>non-math contents} % may not compile in \pkg{lwarp}'s normal math emulation. % Insert % \begin{sourcedisplay} % \cs{displaymathother} \textrm{\orelse} \cs{inlinemathother} % \end{sourcedisplay} % before the math, and then % \begin{sourcedisplay} % \cs{displaymathnormal} \textrm{\orelse} \cs{inlinemathnormal} % \end{sourcedisplay} % when displaying ``normal'' math. % See \cref{sec:displaymathother}. % \item[Slow compliation of math objects:] Complicated math objects % \trouble{math>slow or failed compile} % \trouble{math>alt tags} % \trouble{alt tags} % can also cause problems with \attribute{alt} tags, resulting in % very slow compilation, large \attribute{alt} tags, and possible % crashes. Use \cs{inlinemathother} \dots\ \cs{inlinemathnormal} or % \cs{displaymathother} \dots\ \cs{displaymathnormal} around the % math expression. % \end{description} % % \needspace{3\baselineskip} % \item [Incorrect \MathJax:] Some objects do not convert to \brand{Mathjax}. % \trouble[\MathJax]{mathjax=\MathJax>errors} % \trouble{mathjax=\MathJax>unsupported packages} % Use \cs{displaymathother} before these objects, then \cs{displaymathnormal} to return % to ``normal'' display math. % See \cref{sec:displaymathother}. % % \needspace{3\baselineskip} % \item [Missing sections:] See \cref{sec:filedepth} regarding the % |FileDepth| and |SideTOCDepth| counters, % and the use of \cs{tableofcontents} in the home page. % % \item [Misnumbered footnotes from section headings:] See \cref{sec:limitsfootnotes}. % % \item [Missing \HTML\ files:] \ % \begin{itemize} % \item See the warning regarding changes to the \HTML\ settings % at \cref{sec:htmlsettings}. % \item Ensure that the filenames are unique after math and short words are removed. % See \optn{FileSectionNames} at \cref{sec:htmlsettings}. % \end{itemize} % % \item [Missing / incorrect cross-references:] \ % \trouble{reference>missing or incorrect} % \trouble{cross reference>missing} % \begin{itemize} % \item Use |lwarpmk again| followed % by |lwarpmk html| or |lwarpmk print| to compile the document one more time. % \item \limitsreferences % \item \limitscpageref % \end{itemize} % % \item [BibTeX errors with \cs{etalchar}:] See \cref{sec:limitsbibtex}. % % \item [Malformed URLs:] Do not use the \texttt{\%} character between % \trouble{hyperref=\pkg{hyperref}>incorrect link} % \trouble{reference>incorrect link} % \trouble{cross reference>incorrect link} % \trouble{reference>\% character between arguments} % arguments of \cs{hyperref}, etc., as this character is among those which % is neutralized for inclusion in \HTML\ \URL{}s. % % \item [Em-dashes or En-dashes in listing captions and titles:] \ % % Use \XeLaTeX\ or \LuaLaTeX. % \trouble{listings=\pkg{listings}} % % \item [Floats out of sequence:] ~ % \trouble{float>out of sequence} % \begin{description} % \item [Mixed ``Here'' and floating:] Floats [H]ere and regular floats may % become out of order. \cs{clearpage} if necessary. % \item [Caption setup:] With \cs{captionsetup} set the positions for % the captions |above| or |below| to match their use in the source code. % \end{description} % % \item [Images are appearing in strange places:] ~ % \trouble{image>incorrect>added or removed} % \trouble{graphics>incorrect>added or removed} % \trouble{SVG image>incorrect>added or removed} % \trouble{math>incorrect>added or removed} % \begin{itemize} % \item When images are added or removed, % Enter \cmds{lwarpmk limages} to refresh the \env{lateximage} images. % \end{itemize} % % \item[\SVG\ images:] \ % % \limitssvgimages % % \needspace{3\baselineskip} % \item [Plain-looking document:] \ % \trouble{CSS} % \begin{itemize} % \item The document's \CSS\ stylesheet may not be available, or may be % linked incorrectly. Verify any \cs{CSSFilename} statements point to % a valid \CSS\ file. % \end{itemize} % % \item [Broken fragments of HTML:] ~ % \trouble[\HTML\ corrupted]{HTML>corrupted} % \begin{itemize} % \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} % % \item [Changes do not seem to be taking effect:] ~ % \trouble{HTML>page did not update} % \trouble{HTML>missing pages>recompile} % \begin{itemize} % \item Be sure to |lwarpmk clean|, recompile, then start by reloading the home page. % 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 \HTML\ settings % at \cref{sec:htmlsettings}. % \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} % % \item [Un-matched conditional compiles:] ~ % \begin{itemize} % \item Verify the proper |begin|/|end| of |warpprint|, |warpHTML|, and |warpall| environments. % \end{itemize} % % \end{description} % % % \subsubsection{Debug tracing output} % % \DescribeMacro{\tracinglwarp} % \trouble{tracing lwarp} % When \cs{tracinglwarp} is used, \pkg{lwarp} will add extra % tracing messages to the |.log| file. The last several messages % may help track down errors. % % Place \cs{tracinglwarp} just after |\usepackage{lwarp}| to % activate tracing. % % % % % \subsection{Compiling the \filenm{lwarp.dtx} file} % % \begin{description} % \item [\filenm{lwarp_tutorial.tex}:] Copy or link \filenm{lwarp_tutorial.txt} % from the \TDS\ |doc| directory to the |source| directory, % or wherever you wish to compile the documentation. % This file is included verbatim in the documentation, but is in the \filenm{doc} % directory so that it may be found by \prog{texdoc} and copied by the user. % \item [Illogical error messages caused by an out-of-sync \filenm{lwarp.sty} file:] ~ % \begin{enumerate} % \item Delete the \filenm{lwarp.sty} file. % \item Enter \cmds{pdflatex lwarp.ins} to generate a new \filenm{lwarp.sty} file. % \item Enter \cmds{pdflatex lwarp.dtx} to recompile the \filenm{lwarp.pdf} documentation. % \end{enumerate} % % \item [Un-nested environments:]~ % % Be sure to properly nest: % \begin{itemize} % \item |\begin{macrocode}| and |\end{macrocode}| % \item |\begin{macro}| and |\end{macro}| % \item |\begin{environment}| and |\end{environment}| % \end{itemize} % \end{description} % % % % \clearpage % \section{Trademarks} % % \changes{v0.14}{2016/03/29}{Docs: Trademarks section.} % % \begin{itemize} % \item \TeX\ is a trademark of American Mathematical Society. % \item \brand{Adobe}® and \brand{Adobe} \prog{Framemaker}® are either registered trademarks or % trademarks of \brand{Adobe Systems Incorporated} in the United States and/or other countries. % \item \brand{Linux}® is the registered trademark of Linus Torvalds in the U.S.\ and other countries. % \item \brand{Mac\,OS}® is a trademark of \brand{Apple Inc.} % \item \brand{MadCap Flare}™ is the property of \brand{MadCap Software, Inc.} % \item \MathJax\ is copyright 2009 and later. % The \brand{MathJax Consortium} is a joint venture of the \brand{American Mathematical Society} (AMS) % and the \brand{Society for Industrial and Applied Mathematics} (SIAM) % to advance mathematical and scientific content on the web. % \item \brand{Microsoft}®, \brand{Encarta}, \brand{MSN}, and \brand{Windows}® are either registered trademarks or % trademarks of \brand{Microsoft Corporation} in the United States and/or other countries. % \item \brand{UNIX}® is a registered trademark of \brand{The Open Group}. % \item \brand{YouTube}™ is trademark of \brand{Google LLC}. % \end{itemize} % % % % \changes{v0.61}{2018/09/27}{Docs: Multiple indexes.} % % \makeatletter % % \StopEventually{ % ^^A \part{Change History and Index} % ^^A \part{Change History} % % % \pagestyle{plain} % % ^^A Each index has a prologue which creates its own \part, label, % ^^A and meta index entry. % \GlossaryPrologue{ % \part{Change History} % \section{Chg Hist} % \label{sec:changehistory} % \sindex[meta]{Change History} % \markboth{{Change History}}{{Change History}} % % For the most recent changes, see page \pageref{sec:changesend}. % % } % \PrintChanges % \phantomsection % \label{sec:changesend} % % % ^^A The instructions for the Index of Objects: % \IndexPrologue{ % \clearpage % \expandafter\part\expandafter{\indexname} % \label{sec:index\indexshortcut} % \sindex[meta]{\indexname} % \markboth{Index of Objects}{Index of Objects}% % % This is an index of macros, environments, booleans, counters, lengths, % packages, classes, options, keys, files, and various other programming objects. % Each is listed by itself, and also by category. % In some cases, they are further subdivided by [class]. % % Numbers written in italic refer to the page % where the corresponding entry is described; % numbers underlined refer to the % \ifcodeline@index % code line of the % \fi % definition. % ^^A ; numbers in roman refer to the % ^^A \ifcodeline@index % ^^A code lines % ^^A \else % ^^A pages % ^^A \fi % ^^A where the entry is used. % } % % \printindex[idx][Index of Objects] % % % ^^A The instructions for the General Index: % \IndexPrologue{ % \clearpage % \expandafter\part\expandafter{\indexname} % \label{sec:index\indexshortcut} % \sindex[meta]{\indexname} % % This is an index of instructions and concepts. % Look here when wondering how to do something, and % check the Troubleshooting Index when something goes wrong. % } % % \printindex[gen][General Index] % % % ^^A The instructions for the Troubleshooting Index: % \IndexPrologue{ % \clearpage % \expandafter\part\expandafter{\indexname} % \label{sec:index\indexshortcut} % \sindex[meta]{\indexname} % % This index is a sorted reference of problems and solutions. % In order to make it easier to locate a solution, % the same issue may be addressed by more than one entry. % % Entries starting with page \pageref{source} are often duplicates of entries with % lower page numbers, as the same warning may occur within the user manual % and again within the source code. % } % % \printindex[trb][Troubleshooting Index] % % % ^^A The meta index does not get a meta index entry pointing to itself: % \IndexPrologue{ % \clearpage % \expandafter\part\expandafter{\indexname} % \label{sec:index\indexshortcut} % } % % \printindex[meta][Index of Indexes] % } % % \makeatother % % % \clearpage % % \part{lwarp.sty} % % % \section{Implementation} % % % This package is perhaps best described as a large collection of smaller % individual technical challenges, % in many cases solved through a number of \sout{crude hacks} clever tricks. % Reference sources are % given for many of the solutions, and a quick internet search will provide % additional possibilities. % % Judgement calls were made, and are often commented. Improvements are possible. % 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 \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 \prog{pdftotext}. % % Packages were emulated where their primary purpose was visual formatting which is not % 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 \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 % \env{lateximage} environment to preserve the graphics. % % % % Testing has primarily been done with the Iceweasel/Firefox browser. % % % \clearpage % % \section{Section depths and \HTML\ headings} % \label{sec:stackdepths} % \gindex{HTML>headings} % \gindex{section>depths}\gindex{stack depths} % % Stacks are created to track depth inside the \LaTeX{} document structure. % 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 \HTML\ tags nested correctly. % % \begin{table} % \centering % \begin{threeparttable} % \caption{Section depths and \HTML\ headings\label{tab:depthsheadings}} % \begin{tabular}{lcl} % \toprule % Section & \parbox[b]{.35in}{\centering\LaTeX\ depth} & % \HTML\ headings \tnote{\textasteriskcentered} \\ % \midrule % Title of the entire website & & \element{h1} \\ % (none) & -5 & new for this package \\ % book & -2 & \element{div class = "book"} \\ % part & -1 & \element{h2} \\ % chapter & 0 & \element{h3} \\ % section & 1 & \element{h4} \\ % subsection & 2 & \element{h5} \\ % subsubsection & 3 & \element{h6} \\ % paragraph & 4 & \element{span class = "paragraph"} \\ % subparagraph & 5 & \element{span class = "subparagraph"} \\ % listitem & 7 & new for this package, used for list items \\ % \bottomrule % \end{tabular} % \begin{tablenotes} % \footnotesize % \item{\textasteriskcentered} If |FormatWP| is true, % section headings may be adjusted, depending on |WPTitleHeading|. % See \cref{tab:WPsectionheadings} on \cpageref{tab:WPsectionheadings}. % \end{tablenotes} % \end{threeparttable} % \smallskip % \hrule % \end{table} % % 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 \element{div} due to a limit of six \HTML\ headings. % % It is possible to use \HTMLfive{} \element{section} and \element{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 % % % % \section{Source code} % % ^^A *source % \label{source} % % This is where the documented source code for \pkg{lwarp} begins, % continuing through the following sections all the way to the % change log and index at the end of this document. % % \gindex{numbers>left margin}\gindex{line numbers} % \gindex{margin>numbers}\gindex{margin>tags} % \codedocumentationnotes % \gindex{warning icon}\gindex{danger icon}\gindex{icon>warning} % \changes{v0.15}{2016/04/05}{Docs: Added warning icons for items needing % special attention.} % % \vfill % % \begin{center} % --- \pkg{lwarp} source code begins on the following page --- % \end{center} % % % % \clearpage % % \section{Detecting the \TeX\ engine — \prog{pdflatex}, \prog{lualatex}, \prog{xelatex}} % % \changes{v0.16}{2016/04/07}{Added XeLaTeX, LuaLaTeX support.} % See: \url{http://tex.stackexchange.com/a/47579}. % % Detects \XeTeX{} and \LuaLaTeX: % \gindex{Xe\LaTeX>detection}\gindex{Lua\LaTeX>detection} % % \changes{v0.63}{2018/11/25}{Added p\TeX support.} % \changes{v0.79}{2020/01/05}{\pkg{luatex85}: Removed.} % \changes{v0.79}{2020/01/05}{\pkg{ifpdf}, \pkg{ifptex}: Provided by \pkg{iftex}.} % \changes{v0.87}{2020/05/21}{\pkg{ifpdf}, \pkg{ifptex}: Restored to work on TL2019 and earlier.} % ^^A *8* remove ifpdf, ifptex % \begin{macrocode} \RequirePackage{iftex}[2019/11/07] \RequirePackage{ifpdf} \RequirePackage{ifptex}% in case TL2019 or earlier \newif\ifxetexorluatex \ifXeTeX \xetexorluatextrue \else \ifLuaTeX \xetexorluatextrue \else \xetexorluatexfalse \fi \fi % \end{macrocode} % % % % \section{Early package requirements} % % % \DescribePackage{etoolbox} Provides \cs{ifbool} and other functions. % % \begin{macrocode} \RequirePackage{etoolbox}[2020/10/05]% % \end{macrocode} % % Patch to fix copy of environment with a \cs{par}: % % \href{https://github.com/josephwright/etoolbox/issues/35} % {https://github.com/josephwright/etoolbox/issues/35} % % \changes{v0.903}{2021/12/21}{\pkg{etoolbox}: Patch for \cs{NewCommandCopy}.} % \begin{macrocode} \long\def\etb@carsquare#1#2#3\@nil{#1#2}% % \end{macrocode} % \DescribePackage{verifycommand} Verify macros before patching. % % \begin{macrocode} \RequirePackage{verifycommand} % \end{macrocode} % \DescribePackage{xpatch} Patches macros with optional arguments. % % \begin{macrocode} \RequirePackage{xpatch} % \end{macrocode} % \DescribePackage{ifplatform} % Provides \cs{ifwindows} to try to automatically detect % \brand{Windows} OS. % % \begin{macrocode} \RequirePackage{ifplatform}% sense op-system platform % \end{macrocode} % % % % % \DescribePackage{letltxmacro} % % \begin{macrocode} \RequirePackage{letltxmacro} % \end{macrocode} % % % % \section{Package load order} % % \changes{v0.21}{2017/02/22}{Add: Errors for misplaced packages.} % % % Several packages must never be used with \pkg{lwarp}, % others should only be loaded before \pkg{lwarp}, % and others should only be loaded after. % The \pkg{lwarp} core checks most of these cases. % In some \filenm{lwarp-*} packages, \cs{LWR@loadbefore} is used to trigger an error % if they are loaded after \pkg{lwarp}, while additional code provides necessary % patches for when they are loaded before. % % Packages which must be loaded after \pkg{lwarp} are enfoced by % a large number of \cs{LWR@loadafter} statements, below. % Some packages are emulated by \pkg{memoir}, and so these are tested by % \cs{LWR@notmemoirloadafter}, which does not cause an error if \pkg{memoir} is used. % % \cs{LWR@checkloadfilename} is used to check each filename to see if % it must never be loaded, or must always be loaded before \pkg{lwarp}. % % % \subsection{Tests of package load order} % % \begin{macro}{\LWR@loadafter} \marg{packagename} \quad % Error if this package was loaded before \pkg{lwarp}. % % \label{sec:loadafter} % % \begin{macrocode} \newcommand*{\LWR@loadafter}[1]{% \IfPackageLoadedTF{#1} { \PackageError{lwarp} {% Package #1,\MessageBreak or one which uses #1,\MessageBreak must be loaded after Lwarp.\MessageBreak Enter 'H' for possible solutions% } {% Move ``\protect\usepackage{#1}'' after ``\protect\usepackage{lwarp}''.\MessageBreak Package #1 may also be loaded by something else,\MessageBreak which must also be moved after Lwarp.% } } {\relax} } % \end{macrocode} % \end{macro} % \begin{macro}{\LWR@notmemoirloadafter} \marg{packagename} \quad % Error if not \pkg{memoir} class and this package was loaded before \pkg{lwarp}. % % \pkg{memoir} emulates many packages, and pretends that they have already been loaded. % % \changes{v0.45}{2017/12/03}{Added.} % \begin{macrocode} \IfClassLoadedTF{memoir} {\newcommand*{\LWR@notmemoirloadafter}[1]{}} {\LetLtxMacro\LWR@notmemoirloadafter\LWR@loadafter} % \end{macrocode} % \end{macro} % \begin{macro}{\LWR@notltjloadafter} \marg{packagename} \quad % Error if not a \pkg{ltjs*} class and this package was loaded before \pkg{lwarp}. % % \changes{v0.63}{2018/11/24}{Added.} % \changes{v0.63}{2018/12/20}{Added more classes.} % \begin{macrocode} \LetLtxMacro\LWR@notltjloadafter\LWR@loadafter \IfClassLoadedTF{ltjarticle}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} \IfClassLoadedTF{ltjbook}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} \IfClassLoadedTF{ltjreport}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} \IfClassLoadedTF{ltjsarticle}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} \IfClassLoadedTF{ltjsbook}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} \IfClassLoadedTF{ltjsreport}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} \IfClassLoadedTF{ltjspf}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} \IfClassLoadedTF{ltjskiyou}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} \IfClassLoadedTF{ltjtarticle}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} \IfClassLoadedTF{ltjtbook}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} \IfClassLoadedTF{ltjtreport}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} % \end{macrocode} % \end{macro} % \begin{macro}{\LWR@loadbefore} \marg{packagename} \quad % Error if this package is loaded after \pkg{lwarp}. % % \changes{v0.33}{2017/07/06}{Fix: No \cs{PackageError} if already loaded.} % % \begin{macrocode} \newcommand*{\LWR@loadbefore}[1]{% \IfPackageLoadedTF{#1} {\relax} { \PackageError{lwarp} {% Package #1 must be loaded before lwarp.\MessageBreak Enter 'H' for possible solutions% } {Move ``\protect\usepackage{#1}'' before ``\protect\usepackage{lwarp}''.} } } % \end{macrocode} % \end{macro} % \begin{macro}{\LWR@checkloadbefore} % \marg{packagename} % % Given \cs{LWR@tempone} is the package name to compare to, % if package names match, error if it is loaded after \pkg{lwarp}. % % \changes{v0.63}{2018/12/02}{Added.} % % \begin{macrocode} \newcommand*{\LWR@checkloadbefore}[1]{% \ifdefstring{\LWR@tempone}{#1}{% \LWR@loadbefore{#1}% }{}% } % \end{macrocode} % \end{macro} % \begin{macro}{\LWR@loadnever} \marg{badpackagename} \marg{replacementpkgnames} % % The first packages is not supported, so tell the user to use the second instead. % Factored from \cs{LWR@checkloadnever} and \cs{LWR@earlyloadnever}. % % \changes{v0.25}{2017/03/16}{Added the ability to prevent conflicting packages.} % \changes{v0.897}{2021/05/08}{Replacements now optional.} % % \begin{macrocode} \newcommand*{\LWR@loadnever}[2]{% \PackageError{lwarp} {% Package #1 is not yet supported\MessageBreak by lwarp's HTML conversion% \ifblank{#2}{}{% .\MessageBreak Package(s)\MessageBreak \space\space#2\MessageBreak may be useful instead% }% } {% Package #1 might conflict with lwarp in some way,\MessageBreak or is superceded by another package.% \ifblank{#2}{}{% \MessageBreak For possible alternatives, see package(s) #2.% }% } } % \end{macrocode} % \end{macro} % % % % \begin{macro}{\LWR@afterloadnever} % \marg{badpackagename} \marg{replacementpkgnames} % % Given: \cs{LWR@tempone} is set to the package name being tested against, % if this package name is the bad packagename, suggest the replacements instead. % This is used when loading packages after \pkg{lwarp}. % % \changes{v0.897}{2021/05/08}{Refactored.} % % \begin{macrocode} \newcommand*{\LWR@afterloadnever}[2]{% \ifdefstring{\LWR@tempone}{#1}{% \LWR@loadnever{#1}{#2}% }{}% } % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@earlyloadnever} \marg{badpackagename} \marg{replacementpkgname} % % The first package is not supported, so tell the user to use the second instead. % This version checks immediately for packages which % may have been loaded before \pkg{lwarp}. % % \changes{v0.897}{2021/05/08}{Refactored.} % % \begin{macrocode} \newcommand*{\LWR@earlyloadnever}[2]{% \IfPackageLoadedTF{#1}{% \LWR@loadnever{#1}{#2}% }{}% } % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@earlyclassloadnever} \marg{badclassname} \marg{replacementclassname} % % The first class is not supported, so tell the user to use the second instead. % This version checks immediately for classes which may have been loaded before \pkg{lwarp}. % % \changes{v0.63}{2018/11/25}{Added.} % \changes{v0.897}{2021/05/08}{Replacements now optional.} % % \begin{macrocode} \newcommand*{\LWR@earlyclassloadnever}[2]{% \IfClassLoadedTF{#1}{% \PackageError{lwarp} {% Class #1 is not supported\MessageBreak by lwarp's HTML conversion% \ifblank{#2}{}{% .\MessageBreak #2 may be useful instead% }% } {% Class #1 might conflict with lwarp in some way,\MessageBreak or is superceded by another class.% \ifblank{#2}{}{% \MessageBreak For a possible alternative, see #2.% }% } }{\relax}% } % \end{macrocode} % \end{macro} % % % \subsection{Error for disallowed packages and classes loaded before lwarp} % % \changes{v0.54}{2018/04/06}{Added early check for disallowed packages.} % \changes{v0.54}{2018/09/26}{Never load \pkg{aecompl}.} % \changes{v0.62}{2018/11/18}{Added early checks for \pkg{CJK}, \pkg{CJKutf8}.} % \changes{v0.65}{2018/12/15}{Added early checks for \pkg{jarticle}, \pkg{tarticle}, and related.} % \changes{v0.66}{2019/01/04}{Added early checks for \pkg{colortab}, \pkg{epsf}, \pkg{hyper}, % \pkg{picinpar}, \pkg{picins}, \pkg{sistyle}, \pkg{ucs}.} % \changes{v0.68}{2019/02/26}{Prevented \pkg{alg}, \pkg{algorithmic}, \pkg{fncylab}, \pkg{pdfcprot}.} % \changes{v0.80}{2020/02/15}{Prevented \pkg{formula}, \pkg{shadethm}, \pkg{slashbox}.} % \changes{v0.81}{2020/02/15}{Prevented \pkg{statex}.} % \changes{v0.87}{2020/05/14}{Prevented \pkg{csvtools}.} % \changes{v0.88}{2020/07/07}{Prevented \pkg{shadethm}.} % \changes{v0.891}{2020/09/16}{Prevented \pkg{libgreek}.} % \changes{v0.893}{2020/11/15}{Allowed \pkg{picinpar}.} % \changes{v0.895}{2021/01/19}{Allowed \pkg{epsf}.} % % % \begin{macro}{\LWR@checkloadnevers} % Checks against a list of incompatible packages. % % \changes{v0.897}{2021/05/08}{Refactored.} % % ^^A *earlyloadnever *loadnever % \begin{macrocode} \newcommand*{\LWR@checkloadnevers}{ \LWR@checkloadnever{ae}{cm-super, lmodern} \LWR@checkloadnever{aecompl}{cm-super, lmodern} \LWR@checkloadnever{aecc}{cm-super, lmodern} \LWR@checkloadnever{alg}{algorithm2e, algorithmicx} \LWR@checkloadnever{algorithmic}{algorithm2e, algorithmicx} \LWR@checkloadnever{bitfield}{bytefield} % \end{macrocode} % \pkg{bxcjkatype} is based on \pkg{CJK}: % \begin{macrocode} \LWR@checkloadnever{bxcjkjatype}{upLaTeX, bxjsarticle, ujarticle, utarticle} % \end{macrocode} % \begin{macrocode} \LWR@checkloadnever{caption2}{caption} % \LWR@checkloadnever{ccaption}{caption}% might be preloaded by memoir \LWR@checkloadnever{colortab}{colortbl} \LWR@checkloadnever{csvtools}{datatool} \LWR@checkloadnever{doublespace}{setspace} \LWR@checkloadnever{fancyheadings}{fancyhdr} \LWR@checkloadnever{fncylab}{cleveref} \LWR@checkloadnever{formula}{siunitx} \LWR@checkloadnever{glossary}{glossaries} % \end{macrocode} % \pkg{hangul} is not in TeXLive, and is not tested: % \begin{macrocode} \LWR@checkloadnever{hangul}{kotex, xetexko, luatexko} % \end{macrocode} % \begin{macrocode} \LWR@checkloadnever{hyper}{hyperref} \LWR@checkloadnever{libgreek}{libertinust1math, newtx} \LWR@checkloadnever{newthm}{ntheorem} \LWR@checkloadnever{pdfcprot}{microtype} \LWR@checkloadnever{picins}{floatflt, wrapfig, wrapfig2} \LWR@checkloadnever{rplain}{fancyhdr} \LWR@checkloadnever{si}{siunitx} \LWR@checkloadnever{sistyle}{siunitx} \LWR@checkloadnever{slashbox}{diagbox} \LWR@checkloadnever{statex}{statex2} \LWR@checkloadnever{t1enc}{fontenc, inputenc, inputenx} \LWR@checkloadnever{ucs}{inputenc, inputencx} \LWR@checkloadnever{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol} % \end{macrocode} % % The following may one day be supported by lwarp: % % ^^A *notyet % \begin{macrocode} % \LWR@checkloadnever{adjustbox}{}% req'd for menukeys \LWR@checkloadnever{animate}{} \LWR@checkloadnever{auto-pst-pdf}{} \LWR@checkloadnever{auto-pst-pdf-lua}{} \LWR@checkloadnever{algorithms}{} \LWR@checkloadnever{arraycols}{} \LWR@checkloadnever{bidi}{} \LWR@checkloadnever{cals}{} % \end{macrocode} % \changes{v0.903}{2022/01/06}{Alternative for \pkg{cellspace}.} % \begin{macrocode} \LWR@checkloadnever{cellspace}{tabls} % \end{macrocode} % \begin{macrocode} \LWR@checkloadnever{cgloss4e}{} \LWR@checkloadnever{collcell}{} \LWR@checkloadnever{colophon}{} \LWR@checkloadnever{cooltooltips}{} \LWR@checkloadnever{covington}{} \LWR@checkloadnever{crbox}{} \LWR@checkloadnever{decision-table}{} \LWR@checkloadnever{dvgloss}{} \LWR@checkloadnever{ednotes}{} \LWR@checkloadnever{edfnotes}{} \LWR@checkloadnever{eledform}{} \LWR@checkloadnever{eledmac}{} \LWR@checkloadnever{embedfile}{} \LWR@checkloadnever{endnotes-hy}{endnotes} \LWR@checkloadnever{expex}{} \LWR@checkloadnever{fancytooltips}{} \LWR@checkloadnever{fixocgx}{} \LWR@checkloadnever{flowfram}{} \LWR@checkloadnever{gb4e}{} \LWR@checkloadnever{gmverse}{} \LWR@checkloadnever{graphbox}{} \LWR@checkloadnever{graphicxbox}{} \LWR@checkloadnever{hvfloat}{} \LWR@checkloadnever{inline-images}{} \LWR@checkloadnever{isorot}{rotating} \LWR@checkloadnever{ledmac}{} \LWR@checkloadnever{linguex}{} \LWR@checkloadnever{longdiv}{} \LWR@checkloadnever{longfigure}{} \LWR@checkloadnever{longtabu}{} \LWR@checkloadnever{mdwenv}{} \LWR@checkloadnever{mdwlist}{} \LWR@checkloadnever{mdwtab}{} \LWR@checkloadnever{navigator}{} \LWR@checkloadnever{nccpic}{} \LWR@checkloadnever{nccsect}{} \LWR@checkloadnever{newvbtm}{} \LWR@checkloadnever{ocg-p}{} \LWR@checkloadnever{ocgtools}{} \LWR@checkloadnever{ocgx}{} \LWR@checkloadnever{ocgx2}{} \LWR@checkloadnever{parrun}{} \LWR@checkloadnever{poemscol}{} \LWR@checkloadnever{poetry}{} \LWR@checkloadnever{program}{} \LWR@checkloadnever{proofread}{} \LWR@checkloadnever{pst-pdf}{} \LWR@checkloadnever{refstyle}{} \LWR@checkloadnever{robustindex}{} \LWR@checkloadnever{robustglossary}{} \LWR@checkloadnever{semioneside}{} \LWR@checkloadnever{slemph}{} \LWR@checkloadnever{snotez}{sidenotes} \LWR@checkloadnever{spacingtricks}{} \LWR@checkloadnever{sverb}{verbatim, fancyvrb} \LWR@checkloadnever{syntax}{} \LWR@checkloadnever{tablists}{} \LWR@checkloadnever{tabto}{} \LWR@checkloadnever{tabu}{} \LWR@checkloadnever{tabularht}{} \LWR@checkloadnever{tabularkv}{} \LWR@checkloadnever{thumby}{} \LWR@checkloadnever{titles}{} \LWR@checkloadnever{typehtml}{} \LWR@checkloadnever{unicode-bidi}{} \LWR@checkloadnever{vcell}{} \LWR@checkloadnever{xhfill}{} } % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@checkloadnever} \marg{badpackagename} \marg{replacementpkgname} % % The first package is not supported, so tell the user to use the second instead. % % When \pkg{lwarp} is first loaded, this is set to \cs{LWR@earlyloadnever} % to check for incompatible packages which were loaded before \pkg{lwarp}. % After \pkg{lwarp} is loaded, this is changed to \cs{LWR@afterloadnever} to % check for incompatible packages during \cs{usepackage}. % % \changes{v0.897}{2021/05/08}{Refactored.} % % \begin{macrocode} \LetLtxMacro\LWR@checkloadnever\LWR@earlyloadnever % \end{macrocode} % \end{macro} % % % Now check for incompatible packages which have been loaded before \pkg{lwarp}: % \begin{macrocode} \LWR@checkloadnevers % \end{macrocode} % % % The older \pkg{CJK} and \pkg{CJKutf8} only work with \pkg{xeCJK}: % \begin{macrocode} \IfPackageLoadedTF{xeCJK}{}{ \LWR@checkloadnever{CJK}{ctex, xeCJK} \LWR@checkloadnever{CJKutf8}{ctex, xeCJK} } % \end{macrocode} % % % Some classes do not work with \pkg{lwarp}: % \changes{v0.902}{2021/09/15}{Forbid \pkg{beamer}.} % \begin{macrocode} \LWR@earlyclassloadnever{beamer}{beamerarticle} \LWR@earlyclassloadnever{jarticle}{ujarticle} \LWR@earlyclassloadnever{jbook}{ujbook} \LWR@earlyclassloadnever{jreport}{ujreport} \LWR@earlyclassloadnever{tarticle}{utarticle} \LWR@earlyclassloadnever{tbook}{utbook} \LWR@earlyclassloadnever{treport}{utreport} \LWR@earlyclassloadnever{novel}{} \LWR@earlyclassloadnever{powerdot}{} % \end{macrocode} % % % % \subsection{Enforcing package loading after \pkg{lwarp}} % % Packages which should only be loaded after \pkg{lwarp} are tested % here to trip an error of they have already been loaded. % % \changes{v0.25}{2017/03/16}{Fix: Allows XE\LaTeX\ and % \LuaLaTeX\ to preload graphics and graphicx.} % \changes{v0.45}{2017/12/03}{Allows \pkg{memoir}'s preloaded packages.} % \changes{v0.58}{2018/06/21}{Fix: \pkg{memoir} and \pkg{ccaption}.} % \changes{v0.82}{2020/03/17}{\pkg{syntonly}: Added to \cs{LWR@loadafter}.} % \changes{v0.89}{2020/08/12}{Allow preload of \pkg{amsmath}, \pkg{amsthm}, \pkg{centernot}.} % % The following packages must be loaded after \pkg{lwarp}: % ^^A *loadafter % \begin{macrocode} \LWR@loadafter{2in1} \LWR@loadafter{2up} \LWR@loadafter{a4} \LWR@loadafter{a4wide} \LWR@loadafter{a5comb} \LWR@notmemoirloadafter{abstract} \LWR@loadafter{academicons} \LWR@loadafter{accents} \LWR@loadafter{accessibility} \LWR@loadafter{accsupp} \LWR@loadafter{acro} \LWR@loadafter{acronym} \LWR@loadafter{adjmulticol} \LWR@loadafter{addlines} \LWR@loadafter{afterpage} \LWR@loadafter{algorithm2e} \LWR@loadafter{algorithmicx} \LWR@loadafter{alltt} \LWR@loadafter{amscdx} % \LWR@loadafter{amsmath}% may be preloaded % \LWR@loadafter{amsthm}% may be preloaded \LWR@loadafter{anonchap} \LWR@loadafter{anysize} \LWR@notmemoirloadafter{appendix} \LWR@loadafter{apxproof} \LWR@loadafter{ar} \LWR@loadafter{arabicfront} \LWR@notmemoirloadafter{array} \LWR@loadafter{arydshln} \LWR@loadafter{asymptote} % \LWR@loadafter{atbegshi}% now in LaTeX core, also used by morewrites \LWR@loadafter{attachfile} \LWR@loadafter{attachfile2} \LWR@loadafter{authblk} \LWR@loadafter{authoraftertitle}% Supported as-is, but must be loaded after. \LWR@loadafter{autobreak} \LWR@loadafter{autonum} \LWR@loadafter{awesomebox} \LWR@loadafter{axessibility} \LWR@loadafter{axodraw2} \LWR@loadafter{backnaur} \LWR@loadafter{backref} \LWR@loadafter{balance} \LWR@loadafter{bbding} \LWR@loadafter{beamerarticle} \LWR@loadafter{bigdelim} \LWR@loadafter{bigfoot} \LWR@loadafter{bigstrut} \LWR@loadafter{bitpattern} \LWR@loadafter{blowup} \LWR@loadafter{bm} \LWR@loadafter{booklet} \LWR@loadafter{bookmark} \LWR@notmemoirloadafter{booktabs} \LWR@loadafter{bophook} \LWR@loadafter{bounddvi} \LWR@loadafter{boxedminipage} \LWR@loadafter{boxedminipage2e} \LWR@loadafter{braket} \LWR@loadafter{breakurl} \LWR@loadafter{breqn} \LWR@loadafter{bsheaders} \LWR@loadafter{bussproofs} \LWR@loadafter{bxpapersize} \LWR@loadafter{bytefield} \LWR@loadafter{ccicons} \LWR@loadafter{cancel} \LWR@loadafter{canoniclayout} \LWR@loadafter{caption} \LWR@loadafter{caption2} \LWR@loadafter{caption3} \LWR@loadafter{cases} % catoptions is supported by the lwarp core % \LWR@loadafter{ccaption}% may be preloaded by memoir \LWR@loadafter{centerlastline} % \LWR@loadafter{centernot}% may be preloaded by newtx \LWR@loadafter{changebar} \LWR@loadafter{changelayout} \LWR@notmemoirloadafter{changepage} \LWR@loadafter{changes} \LWR@loadafter{chappg} \LWR@loadafter{chapterbib} \LWR@loadafter{chemfig} \LWR@loadafter{chemformula} \LWR@loadafter{chemgreek} \LWR@loadafter{chemmacros} \LWR@loadafter{chemnum} \LWR@loadafter{chkfloat} \LWR@notmemoirloadafter{chngpage} \LWR@loadafter{cite} \LWR@loadafter{citeref} \LWR@loadafter{classicthesis} \LWR@loadafter{cleveref} % cmbright may be preloaded \LWR@loadafter{cmdtrack} \LWR@loadafter{colonequals} \LWR@loadafter{color} \LWR@loadafter{colortbl} \LWR@loadafter{continue} \LWR@loadafter{copyrightbox} \LWR@notmemoirloadafter{crop} % ctex must be loaded before lwarp \LWR@loadafter{ctable} \LWR@loadafter{cuted} \LWR@loadafter{cutwin} \LWR@loadafter{dblfloatfix} \LWR@loadafter{dblfnote} \LWR@notmemoirloadafter{dcolumn} \LWR@loadafter{decimal} \LWR@loadafter{decorule} \LWR@loadafter{diagbox} \LWR@loadafter{dingbat} \LWR@loadafter{doipubmed} \LWR@loadafter{DotArrow} \LWR@loadafter{dotlessi} \LWR@loadafter{dprogress} \LWR@loadafter{draftcopy} \LWR@loadafter{draftfigure} \LWR@loadafter{draftwatermark} \LWR@loadafter{drftcite} \LWR@loadafter{easy-todo} \LWR@loadafter{ebook} \LWR@loadafter{econometrics} \LWR@loadafter{ed} \LWR@loadafter{ellipsis} \LWR@loadafter{embrac} \LWR@loadafter{emptypage} \LWR@loadafter{endfloat} \LWR@loadafter{endheads} \LWR@loadafter{endnotes} \LWR@loadafter{engtlc} \LWR@loadafter{enotez} \LWR@notmemoirloadafter{enumerate} \LWR@loadafter{enumitem} \LWR@notmemoirloadafter{epigraph} \LWR@loadafter{epsf} \LWR@loadafter{epsfig} \LWR@loadafter{epstopdf} \LWR@loadafter{epstopdf-base} \LWR@loadafter{eqlist} \LWR@loadafter{eqparbox} \LWR@loadafter{errata} \LWR@loadafter{eso-pic} \LWR@loadafter{esvect} \LWR@loadafter{etoc} \LWR@loadafter{eurosym} \LWR@loadafter{everypage} % \LWR@loadafter{everyshi}% now in LaTeX core \LWR@loadafter{extarrows} \LWR@loadafter{extramarks} \LWR@loadafter{fancybox} \LWR@loadafter{fancyhdr} \LWR@loadafter{fancypar} \LWR@loadafter{fancyref} \LWR@loadafter{fancytabs} \LWR@loadafter{fancyvrb} \LWR@loadafter{fbox} \LWR@loadafter{fewerfloatpages} \LWR@loadafter{figcaps} \LWR@loadafter{figsize} \LWR@loadafter{fitbox} \LWR@loadafter{fix2col} \LWR@loadafter{fixmath} \LWR@loadafter{fixme} \LWR@loadafter{fixmetodonotes} \LWR@loadafter{flafter} \LWR@loadafter{flippdf} \LWR@loadafter{float} \LWR@loadafter{floatflt} \LWR@loadafter{floatpag} \LWR@loadafter{floatrow} \LWR@loadafter{fltrace} \LWR@loadafter{flushend} \LWR@loadafter{fnbreak} \LWR@loadafter{fncychap} \LWR@loadafter{fnlineno} \LWR@loadafter{fnpara} \LWR@loadafter{fnpos} \LWR@loadafter{fontawesome} \LWR@loadafter{fontawesome5} % fontenc must be loaded before lwarp % fontspec must be loaded before lwarp \LWR@loadafter{footmisc} \LWR@loadafter{footnote} \LWR@loadafter{footnotebackref} \LWR@loadafter{footnotehyper} \LWR@loadafter{footnoterange} \LWR@loadafter{footnpag} \LWR@loadafter{foreign} \LWR@loadafter{forest} \LWR@loadafter{fouridx} % fourier may be loaded before lwarp \LWR@loadafter{framed} \LWR@loadafter{froufrou} \LWR@loadafter{ftcap} \LWR@loadafter{ftnright} \LWR@loadafter{fullminipage} \LWR@loadafter{fullpage} \LWR@loadafter{fullwidth} \LWR@loadafter{fvextra} \LWR@loadafter{fwlw} \LWR@loadafter{gensymb} \LWR@loadafter{gentombow} % geometry is always loaded by lwarp, and lwarp-geometry is AtBeginDocument \LWR@loadafter{ghsystem} \LWR@loadafter{gindex} \LWR@loadafter{glossaries} \LWR@loadafter{gmeometric} % \LWR@loadafter{graphics}% pre-loaded by xunicode % \LWR@loadafter{graphicx}% pre-loaded by xunicode \LWR@loadafter{gloss} \LWR@loadafter{glossary} \LWR@loadafter{grffile} \LWR@loadafter{grid} \LWR@loadafter{grid-system} \LWR@loadafter{gridset} \LWR@loadafter{hang} \LWR@loadafter{hanging} \LWR@loadafter{hepunits} \LWR@loadafter{hhline} \LWR@loadafter{hhtensor} \LWR@loadafter{hypbmsec} \LWR@loadafter{hypcap} \LWR@loadafter{hypdestopt} \LWR@loadafter{hypernat} \LWR@loadafter{hyperref} \LWR@loadafter{hyperxmp} \LWR@loadafter{hyphenat} \LWR@loadafter{idxlayout} \LWR@loadafter{ifoddpage} \LWR@loadafter{imakeidx} \LWR@loadafter{impnattypo} \LWR@notmemoirloadafter{index} % inputenc must be loaded before lwarp % inputenx must be loaded before lwarp % inputtrc may be loaded before lwarp \LWR@loadafter{intopdf} \LWR@loadafter{isomath} \LWR@loadafter{isotope} \LWR@loadafter{jurabib} \LWR@loadafter{karnaugh-map} \LWR@loadafter{keyfloat} \LWR@loadafter{keystroke} % kpfonts may be loaded before lwarp % kpfonts-otf may be loaded before lwarp \LWR@loadafter{layaureo} \LWR@loadafter{layout} \LWR@loadafter{layouts} \LWR@loadafter{leading} \LWR@loadafter{leftidx} \LWR@loadafter{letterspace} \LWR@loadafter{lettrine} % libertinust1math may be loaded before lwarp \LWR@loadafter{lineno} \LWR@loadafter{lips} \LWR@loadafter{listings} \LWR@loadafter{listliketab} \LWR@loadafter{lltjp-siunitx} \LWR@loadafter{lltjp-tascmac} \LWR@loadafter{longtable} \LWR@loadafter{lpic} \LWR@loadafter{lscape} \LWR@loadafter{ltablex} \LWR@loadafter{ltcaption} \LWR@loadafter{ltxgrid} \LWR@loadafter{ltxtable} \LWR@loadafter{lua-check-hyphen} \LWR@loadafter{lua-visual-debug} \LWR@loadafter{luacolor} \LWR@loadafter{luamplib} \LWR@loadafter{luatodonotes} \LWR@loadafter{luavlna} \LWR@loadafter{lyluatex} \LWR@loadafter{magaz} \LWR@notmemoirloadafter{makeidx} \LWR@loadafter{manyfoot} \LWR@loadafter{marginfit} \LWR@loadafter{marginfix} \LWR@loadafter{marginnote} \LWR@loadafter{marvosym} % mathalpha may be loaded before lwarp \LWR@loadafter{mathastext} \LWR@loadafter{mathcomp} \LWR@loadafter{mathdesign} \LWR@loadafter{mathdots} \LWR@loadafter{mathfixs} \LWR@loadafter{mathpazo} \LWR@loadafter{mathptmx} \LWR@loadafter{mathspec} \LWR@loadafter{mathtools} \LWR@loadafter{mattens} \LWR@loadafter{maybemath} \LWR@loadafter{mcaption} \LWR@loadafter{mdframed} \LWR@loadafter{mdwmath} \LWR@loadafter{media9} \LWR@loadafter{memhfixc} \LWR@loadafter{menukeys} \LWR@loadafter{metalogo} \LWR@loadafter{metalogox} \LWR@loadafter{mhchem} \LWR@loadafter{microtype} \LWR@loadafter{midfloat} \LWR@loadafter{midpage} \LWR@loadafter{minibox} \LWR@loadafter{minitoc} \LWR@loadafter{minted} \LWR@loadafter{mismath} \LWR@loadafter{mleftright} % morefloats must be allowed early for print mode \LWR@notmemoirloadafter{moreverb} % morewrites must be loaded before lwarp \LWR@notmemoirloadafter{movie15} \LWR@notmemoirloadafter{mparhack} \LWR@loadafter{multibib} \LWR@loadafter{multicap} %\LWR@loadafter{multicol}% loaded by ltxdoc \LWR@loadafter{multicolrule} \LWR@loadafter{multimedia} \LWR@loadafter{multiobjective} \LWR@loadafter{multirow} \LWR@loadafter{multitoc} \LWR@loadafter{musicography} \LWR@loadafter{mwe} \LWR@loadafter{nameauth} \LWR@loadafter{natbib} \LWR@notmemoirloadafter{nccfancyhdr} \LWR@loadafter{nccfoots} \LWR@loadafter{nccmath} \LWR@notmemoirloadafter{needspace} % newclude must be loaded before lwarp % newpxmath may be preloaded % newtxmath may be loaded before lwarp % newtxsf may be loaded before lwarp % newunicodechar must be loaded before lwarp \LWR@notmemoirloadafter{nextpage} \LWR@loadafter{nicefrac} \LWR@loadafter{niceframe} \LWR@loadafter{nicematrix} \LWR@loadafter{noitcrul} \LWR@loadafter{nolbreaks} \LWR@loadafter{nomencl} \LWR@loadafter{nonfloat} \LWR@loadafter{nonumonpart} \LWR@loadafter{nopageno} \LWR@loadafter{notes} \LWR@loadafter{notespages} \LWR@loadafter{nowidow} \LWR@loadafter{ntheorem} \LWR@loadafter{octave} \LWR@loadafter{orcidlink} \LWR@loadafter{overpic} \LWR@loadafter{pagegrid} \LWR@notmemoirloadafter{pagenote} \LWR@loadafter{pagesel} \LWR@loadafter{paralist} \LWR@loadafter{parallel} \LWR@loadafter{parcolumns} \LWR@loadafter{parnotes} \LWR@notmemoirloadafter{parskip} \LWR@loadafter{pbalance} \LWR@loadafter{pbox} \LWR@loadafter{pdfcol} \LWR@loadafter{pdfcolfoot} \LWR@loadafter{pdfcolmk} \LWR@loadafter{pdfcolparallel} \LWR@loadafter{pdfcolparcolumns} \LWR@loadafter{pdfcomment} \LWR@loadafter{pdfcrypt} \LWR@loadafter{pdflscape} \LWR@loadafter{pdfmarginpar} \LWR@loadafter{pdfpages} \LWR@loadafter{pdfprivacy} \LWR@loadafter{pdfrender} \LWR@loadafter{pdfsync} \LWR@loadafter{pdftricks} \LWR@loadafter{pdfx} \LWR@loadafter{perpage} \LWR@loadafter{pfnote} \LWR@loadafter{phfqit} \LWR@loadafter{physics} \LWR@loadafter{physunits} \LWR@loadafter{picinpar} \LWR@loadafter{pifont} \LWR@loadafter{pinlabel} \LWR@loadafter{placeins} \LWR@loadafter{plarray} \LWR@loadafter{plarydshln} \LWR@loadafter{plextarray} \LWR@loadafter{plextarydshln} \LWR@loadafter{plcolortbl} \LWR@loadafter{plextdelarray} \LWR@loadafter{plimsoll} \LWR@loadafter{prelim2e} \LWR@loadafter{prettyref} \LWR@loadafter{preview} \LWR@loadafter{psfrag} \LWR@loadafter{psfragx} \LWR@loadafter{pst-eps} \LWR@loadafter{pstool} \LWR@loadafter{pstricks} % \LWR@loadafter{pxatbegshi}% may be used by morewrites \LWR@loadafter{pxeveryshi} % \LWR@loadafter{pxfonts}% may be loaded before lwarp \LWR@loadafter{pxftnright} \LWR@loadafter{pxjahyper} \LWR@loadafter{quotchap} \LWR@loadafter{quoting} \LWR@loadafter{ragged2e} \LWR@loadafter{refcheck} \LWR@loadafter{register} \LWR@loadafter{relsize} \LWR@loadafter{repeatindex} \LWR@loadafter{resizegather} \LWR@loadafter{returntogrid} \LWR@loadafter{rlepsf} \LWR@loadafter{rmathbr} \LWR@loadafter{rmpage} \LWR@loadafter{romanbar} \LWR@loadafter{romanbarpagenumber} \LWR@loadafter{rotating} \LWR@loadafter{rotfloat} \LWR@loadafter{rviewport} \LWR@loadafter{savetrees} % scalefnt is loaded by babel-french \LWR@loadafter{scalerel} \LWR@loadafter{schemata} \LWR@loadafter{scrextend} \LWR@loadafter{scrhack} \LWR@loadafter{scrlayer} \LWR@loadafter{scrlayer-notecolumn} \LWR@loadafter{scrlayer-scrpage} \LWR@loadafter{scrpage2} \LWR@loadafter{section} \LWR@loadafter{sectionbreak} \LWR@loadafter{sectsty} \LWR@loadafter{selectp} \LWR@loadafter{semantic-markup} \LWR@notmemoirloadafter{setspace} \LWR@loadafter{shadow} \LWR@loadafter{shapepar} \LWR@notmemoirloadafter{showidx} \LWR@loadafter{showlabels} \LWR@loadafter{showkeys} \LWR@loadafter{showtags} \LWR@loadafter{shuffle} \LWR@loadafter{sidecap} \LWR@loadafter{sidenotes} \LWR@loadafter{simplebnf} \LWR@loadafter{SIunits} \LWR@loadafter{siunitx} \LWR@loadafter{siunitx-v2} \LWR@loadafter{skmath} \LWR@loadafter{slantsc} \LWR@loadafter{slashed} \LWR@loadafter{soul} \LWR@loadafter{soulpos} \LWR@loadafter{soulutf8} \LWR@loadafter{splitbib} \LWR@loadafter{splitidx} \LWR@loadafter{srcltx} \LWR@loadafter{srctex} \LWR@loadafter{stabular} \LWR@loadafter{stackengine} \LWR@loadafter{stackrel} \LWR@loadafter{statex2} \LWR@loadafter{statistics} \LWR@loadafter{statmath} \LWR@loadafter{steinmetz} \LWR@notltjloadafter{stfloats} \LWR@loadafter{struktex} \LWR@loadafter{subcaption} \LWR@loadafter{subfig} \LWR@loadafter{subfigure} \LWR@loadafter{subsupscripts} \LWR@loadafter{supertabular} \LWR@loadafter{svg} \LWR@loadafter{swfigure} \LWR@loadafter{sympytex} \LWR@loadafter{syntonly} \LWR@loadafter{t1inc} \LWR@loadafter{tabfigures} \LWR@loadafter{tabls} \LWR@loadafter{tablefootnote} \LWR@notmemoirloadafter{tabularx} \LWR@loadafter{tabulary} \LWR@loadafter{tagpdf} \LWR@loadafter{tagpdf-mc-code-generic} \LWR@loadafter{tagpdf-mc-code-lua} \LWR@loadafter{tascmac} \LWR@loadafter{tcolorbox} \LWR@loadafter{tensor} \LWR@loadafter{termcal} \LWR@loadafter{textarea} % \LWR@loadafter{textcomp}% maybe before lwarp with font packages \LWR@loadafter{textfit} \LWR@loadafter{textpos} \LWR@loadafter{theorem} \LWR@loadafter{thinsp} \LWR@loadafter{thm-listof} \LWR@loadafter{thm-restate} \LWR@loadafter{thmbox} \LWR@loadafter{thmtools} \LWR@loadafter{threadcol} \LWR@loadafter{threeparttable} \LWR@loadafter{threeparttablex} \LWR@loadafter{thumb} \LWR@loadafter{thumbs} \LWR@loadafter{tikz} \LWR@loadafter{tikz-imagelabels} \LWR@loadafter{titleps} \LWR@loadafter{titlesec} \LWR@loadafter{titletoc} \LWR@notmemoirloadafter{titling} % \LWR@loadafter{tocbasic}% preloaded by koma-script classes \LWR@notmemoirloadafter{tocbibind} \LWR@loadafter{tocdata} \LWR@loadafter{tocenter} \LWR@notmemoirloadafter{tocloft} \LWR@loadafter{tocstyle} \LWR@loadafter{todo} \LWR@loadafter{todonotes} \LWR@loadafter{topcapt} \LWR@loadafter{tram} \LWR@loadafter{transparent} \LWR@loadafter{trimclip} \LWR@loadafter{trivfloat} \LWR@loadafter{truncate} \LWR@loadafter{turnthepage} \LWR@loadafter{twoup} % \LWR@loadafter{txfonts}% may be loaded before lwarp % txgreeks may be loaded before lwarp % \end{macrocode} % \changes{v0.44}{2017/11/19}{Adjustment for \pkg{koma-script}.} % \begin{macrocode} % \LWR@loadafter{typearea}% preloaded by koma-script classes \LWR@loadafter{typicons} % \LWR@loadafter{ulem}% preloaded by ctexart and related classes \LWR@loadafter{umoline} \LWR@loadafter{underscore} % unicode-math may be loaded before lwarp \LWR@loadafter{units} \LWR@loadafter{unitsdef} \LWR@loadafter{upgreek} \LWR@loadafter{upref} \LWR@loadafter{url} \LWR@loadafter{ushort} \LWR@loadafter{uspace} \LWR@loadafter{varioref} \LWR@notmemoirloadafter{verse} \LWR@loadafter{versonotes} \LWR@loadafter{vertbars} \LWR@loadafter{vmargin} \LWR@loadafter{vowel} \LWR@loadafter{vpe} \LWR@loadafter{vwcol} \LWR@loadafter{wallpaper} \LWR@loadafter{watermark} \LWR@loadafter{widetable} \LWR@loadafter{widows-and-orphans} \LWR@loadafter{witharrows} \LWR@loadafter{wrapfig} \LWR@loadafter{wrapfig2} \LWR@loadafter{xbmks} \LWR@loadafter{xcolor} \LWR@loadafter{xechangebar} \LWR@loadafter{xellipsis} % xetexko must be loaded before lwarp \LWR@loadafter{xevlna} \LWR@loadafter{xfakebold} \LWR@loadafter{xfrac} \LWR@loadafter{xltabular} \LWR@loadafter{xltxtra} \LWR@loadafter{xmpincl} \LWR@loadafter{xpiano} \LWR@loadafter{xpinyin} \LWR@loadafter{xr} \LWR@loadafter{xr-hyper} \LWR@loadafter{xtab} % xunicode must be loaded before lwarp \LWR@loadafter{xurl} \LWR@loadafter{xy} \LWR@loadafter{zwpagelayout} % \end{macrocode} % % % % % \section{MD5 hashing} % % The MD5 hash is used for \env{lateximage} filenames for \SVG\ math. % % \begin{macrocode} \newcommand{\LWR@mdfive}[1]{% \PackageError{lwarp} {No MD5 macro was found} {% Lwarp must find the macros \protect\pdfmdfivesum\space or \protect\mdfivesum.% } } % \end{macrocode} % % The default for \pdfLaTeX, \dviLaTeX, up\LaTeX, etc: % \changes{v0.63}{2018/11/30}{Fix: Default \cs{LWR@mdfive}.} % \changes{v0.913}{2023/12/09}{Fix: Default \cs{LWR@mdfive}.} % \begin{macrocode} \ifdef{\pdfmdfivesum} {\let\LWR@mdfive\pdfmdfivesum} {} % \end{macrocode} % % For \LuaLaTeX: % \begin{macrocode} \ifLuaTeX \RequirePackage{pdftexcmds} \let\LWR@mdfive\pdf@mdfivesum \fi % \end{macrocode} % % For \XeLaTeX: % \begin{macrocode} \ifXeTeX \@ifundefined{pdffivesum}{} {\let\LWR@mdfive\pdfmdfivesum} \@ifundefined{mdfivesum}{} {\let\LWR@mdfive\mdfivesum} \fi % \end{macrocode} % % % \section{\pdfLaTeX\ T1 and \UTF-8 encoding} % % When using \pdfLaTeX, \pkg{lwarp} requires T1 font encoding, % and recommends \UTF-8 input encoding. % % If some other input encoding is already defined, \pkg{lwarp} will % try to use it instead, and hope for the best. % % \XeLaTeX\ and Lua\LaTeX\ are both \UTF-8 by nature. % % \changes{v0.44}{2017/11/16}{If pdfLaTeX, require T1 and \UTF-8 encoding.} % \changes{v0.52}{2018/03/26}{If pdfLaTeX, allow other input encoding.} % \changes{v0.63}{2018/11/25}{p\TeX: Encoding.} % % \begin{macro}{\LWR@pdfencoding} % Sets \optn{T1}, and also \optn{utf8} if not already set. % \begin{macrocode} \newcommand*{\LWR@pdfencoding}{% \RequirePackage[T1]{fontenc} \IfPackageLoadedTF{inputenc}{}{ \IfPackageLoadedTF{inputenx}{}{ \RequirePackage[utf8]{inputenc} } } } % \end{macrocode} % \end{macro} % % \begin{macrocode} \ifPDFTeX% pdflatex or dvi latex \LWR@pdfencoding \fi \ifpTeX \LWR@pdfencoding \fi % \end{macrocode} % % % % \section{Unicode input characters} % \changes{v0.18}{2016/05/17}{PDF=\PDF\ Unicode input characters.} % \gindex{Unicode>input characters} % % \codeall % % If using \prog{pdflatex}, convert a minimal set of Unicode characters. % Additional characters may be defined by the user, as needed. % % A commonly-used multiply symbol is declared to be \cs{texttimes}. % % The first arguments of \cs{newunicodechar} below are text ligatures in % the source code, even though they are not printed in the following % listing. % % \changes{v0.63}{2018/11/25}{p\TeX: No \pkg{newunicodechar}.} % \begin{macrocode} \ifpTeX \else \RequirePackage{newunicodechar} \newunicodechar{⨯}{\texttimes} \ifPDFTeX% pdflatex or dvi latex \newunicodechar{ff}{ff}% Here, the first arguments are ligatures. \newunicodechar{fi}{fi} \newunicodechar{fl}{fl} \newunicodechar{ffi}{ffi} \newunicodechar{ffl}{ffl} \newunicodechar{—}{---} \newunicodechar{–}{--} \fi \fi % \end{macrocode} % % % \section{Avoid a bitmapped font} % % If \DVI\ or \PDF\ \LaTeX, % and if the default Computer Modern is the selected font family, % ensure that \pkg{cm-super} or \pkg{lmodern} is used to provide a vector font. % % \changes{v0.70}{2019/03/25}{Ensure vector font.} % \begin{macrocode} \ifxetexorluatex \else \ifdefstring{\f@family}{cmr}{ \IfFileExists{type1ec.sty}% found in cm-super {} {% cm-super not installed \IfFileExists{lmodern.sty}{ \PackageInfo{lwarp}{cm-super not installed, loading lmodern} \RequirePackage{lmodern} }{ \PackageError{lwarp} {% Lwarp requires a vector font.\MessageBreak Install and load cm-super, lmodern, or another\MessageBreak Type-1 vector font before loading lwarp.\MessageBreak Enter 'H' for possible solutions% } {% Install cm-super or lmodern.\MessageBreak If lmodern, load it before lwarp:\MessageBreak \space\space\protect\usepackage{lmodern}\MessageBreak \space\space\protect\usepackage{lwarp}% } } }% cm-super not installed }{}% f@family \fi % \end{macrocode} % % % \section{Upright quotes} % % In \pdfTeX, preserve upright quotes in verbatim text. % \pkg{upquote} also loads \pkg{textcomp}. % % \changes{v0.63}{2018/11/25}{p\TeX: Load \pkg{upquote}.} % \begin{macrocode} \ifPDFTeX \RequirePackage{upquote} \fi \ifpTeX \RequirePackage{upquote} \fi % \end{macrocode} % % % % \section{Avoid bad font combinations} % % For \XeLaTeX\ and \LuaLaTeX, certain font combinations cause problems % with \pkg{lwarp}. % % \pkg{libertinus-otf} has special handling for \cs{textquotedbl}. % Search for \cs{LWR@orig@textquotedbl}. % % \changes{v0.895}{2021/01/14}{Use \pkg{kpfonts-otf} if \LuaLaTeX, \XeLaTeX.} % % \begin{macrocode} \ifxetexorluatex \AtBeginDocument{ \IfPackageLoadedTF{kpfonts}{ \PackageError{lwarp} {% When using XeLaTeX or LuaLaTeX,\MessageBreak use kpfonts-otf instead of kpfonts% } {% Replace: \protect\usepackage{kpfonts}\MessageBreak with: \protect\usepackage{kpfonts-otf} } }{} } \fi % \end{macrocode} % % % \section{Miscellaneous tools} % % % \subsection{Variables} % % \begin{macrocode} \newlength{\LWR@templengthone} \newlength{\LWR@templengthtwo} \newlength{\LWR@templengththree} \newcounter{LWR@tempcountone} % \end{macrocode} % % % \subsection{Lengths and units} % % \begin{macro}{\LWR@providelength} \marg{\cs{lengthname}} % Provides the length if it isn't defined yet. % % Used to provide source compatibility for lengths which will be ignored, % but might or might not be already provided by other packages. % % \changes{v0.46}{2018/01/23}{Added.} % \begin{macrocode} \newcommand*\LWR@providelength[1]{% \ifdeflength{#1}{}{\newlength{#1}}% } % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@convertto} \marg{dest unit} \marg{length} % % Prints a length in the given units, without printing the unit itself. % \begin{macrocode} \newcommand*{\LWR@convertto}[2]{\strip@pt\dimexpr #2*65536/\number\dimexpr 1#1} % \end{macrocode} % \end{macro} % \begin{macro}{\LWR@printpercentlength} \marg{smaller} \marg{larger} % % Prints a percent ratio of the two lengths. % \begin{macrocode} \newcommand*{\LWR@printpercentlength}[2]{% \setcounter{LWR@tempcountone}{100*\ratio{#1}{#2}}% \arabic{LWR@tempcountone}% } % \end{macrocode} % \end{macro} % \subsection{Counters} % \begin{macro}{\defaddtocounter} \marg{name} \marg{value} % % Locally add to a counter. % \begin{macrocode} \providecommand*{\defaddtocounter}[2]{% \defcounter{#1}{\value{#1}+#2}% } % \end{macrocode} % \end{macro} % \subsection{Patching macros} % \begin{macro}{\LWR@patcherror} \marg{packagename} \marg{macroname} % % Prints an error if could not patch a macro. % \changes{v0.89}{2020/09/01}{Improved message.} % \begin{macrocode} \newcommand*{\LWR@patcherror}[2]{% \PackageError{lwarp}% {% Unable to patch package #1,\MessageBreak macro \LWRbackslash #2.\MessageBreak Lwarp or #1 may need to be updated% }% {Please contact the maintainer of the Lwarp package.}% } % \end{macrocode} % \end{macro} % % % \subsection{Copying macros} % % \begin{macro}{\csNewCommandCopycs} \marg{dest csname} \marg{source csname} % % Given a cs-name for each, copies a macro to a new definition. % % \changes{v0.903}{2021/12/21}{Added.} % \begin{macrocode} \providecommand*{\csNewCommandCopycs}[2]{% \expandafter\NewCommandCopy\csname#1\expandafter\endcsname% \csname#2\endcsname% } % \end{macrocode} % \end{macro} % % \begin{macro}{\NewEnvironmentCopy} \marg{dest} \marg{source} % % Copies an environment to a new definition. % % \changes{v0.903}{2021/12/21}{Added.} % \begin{macrocode} \providecommand*{\NewEnvironmentCopy}[2]{% \csNewCommandCopycs{#1}{#2}% \csNewCommandCopycs{end#1}{end#2}% } % \end{macrocode} % \end{macro} % % % \subsection{Chinese text isolation} % % \begin{macro}{\LWR@isolate} \marg{text} % Isolates Chinese characters from the surrounding text. % This is required to avoid extra spaces on either side of the Chinese % characters, especially when written to a file. % % \changes{v0.62}{2018/11/17}{Added.} % \changes{v0.63}{2018/11/24}{Fix for \pkg{xeCJK}.} % % \begin{macrocode} \newcommand{\LWR@isolate}[1]{#1}% \IfPackageLoadedTF{ctexpatch}{ \renewcommand{\LWR@isolate}[1]{\null#1\null}% }{} \IfPackageLoadedTF{xeCJK}{ \renewcommand{\LWR@isolate}[1]{\null#1\null}% }{} % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@disablepinyin} Disable \pkg{xpinyin} during % file, side\acro{TOC}, and footnote generation. % Set by \pkg{xpinyin}. % \changes{v0.82}{2020/03/25}{Added.} % \begin{macrocode} \newcommand*{\LWR@disablepinyin}{} % \end{macrocode} % \end{macro} % % % \subsection{Inserting vertical space} % % \begin{macro}{\LWR@forceemptyline} Extra vertical space in the \HTML\ output. % Use after \cs{LWR@stoppars}. % \changes{v0.73}{2019/06/26}{Added.} % \begin{macrocode} \newcommand*{\LWR@forceemptyline}{% \LWR@origrule{0pt}{1\baselineskip}% \LWR@orignewline% } % \end{macrocode} % \end{macro} % % % \subsection{Argument selection} % % \changes{v0.905}{2022/03/21}{Added last of three, four.} % \begin{macro}{\LWR@thirdofthree} \marg{first} \marg{second} \marg{third} % \begin{macro}{\LWR@fourthoffour} \marg{first} \marg{second} \marg{third} \marg{fourth} % \begin{macro}{\LWR@firstoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth} % \changes{v0.63}{2019/01/25}{Added.} % \changes{v0.896}{2021/04/05}{Changed to firstoffive instead of four.} % \begin{macro}{\LWR@secondoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth} % \begin{macro}{\LWR@thirdoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth} % \begin{macro}{\LWR@fourthoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth} % \begin{macro}{\LWR@fifthoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth} % % Expands to the nth of the five arguments. % Used for extra cross referencing. % % \begin{macrocode} \long\def\LWR@thirdofthree#1#2#3{#3}% \long\def\LWR@fourthoffour#1#2#3#4{#4}% \long\def\LWR@firstoffive#1#2#3#4#5{#1} \long\def\LWR@secondoffive#1#2#3#4#5{#2} \long\def\LWR@thirdoffive#1#2#3#4#5{#3} \long\def\LWR@fourthoffive#1#2#3#4#5{#4} \long\def\LWR@fifthoffive#1#2#3#4#5{#5} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % % % \begin{macro}{\LWR@edeffirstoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth} % \cs{edef}s to the first of five arguments. % Used for back referencing. % \changes{v0.912}{2023/08/24}{Added.} % \begin{macrocode} \long\def\LWR@edeffirstoffive#1#2#3#4#5{% \edef\@tempa{#1}% }% % \end{macrocode} % \end{macro} % \subsection{Inside boxes} % % Greater than zero if currently inside a \TeX\ box, % thus should not use \cs{LWR@orignewpage}. % See \cref{sec:troubletexboxes}. % \changes{v0.88}{2020/06/06}{Added \ctr{LWR@texboxdepth}.} % \begin{macrocode} \newcounter{LWR@texboxdepth} \setcounter{LWR@texboxdepth}{0} % \end{macrocode} % % \begin{macro}{\LWR@maybe@orignewpage} % Only do \cs{LWR@orignewpage} if not inside a \TeX\ box. % Avoids nested paragraph tags. % \changes{v0.88}{2020/06/06}{Added.} % \begin{macrocode} \newcommand*{\LWR@maybe@orignewpage}{% \LWR@traceinfo{LWR@maybe@orignewpage}% \ifnumgreater{\value{LWR@texboxdepth}}{0}% {}% {\LWR@orignewpage}% \LWR@traceinfo{LWR@maybe@orignewpage done}% } % \end{macrocode} % \end{macro} % % % \subsection{Global boxes} % % \begin{macro}{\LWR@gsavebox} \marg{macroname} \marg{contents} % % From % \href{https://tex.stackexchange.com/questions/288702/savebox-forgets-its-content-across-columns-inside-align} % {https://tex.stackexchange.com/questions/288702/ \\ \fqquad\ savebox-forgets-its-content-across-columns-inside-align} % % \changes{v0.73}{2019/06/11}{Added global save boxes.} % % \begin{macrocode} \DeclareRobustCommand\LWR@gsavebox[1]{% \@ifnextchar(%) {\LWR@@gsavepicbox#1}{\@ifnextchar[{\LWR@@gsavebox#1}{\LWR@gsbox#1}}}% \long\def\LWR@gsbox#1#2{\global\setbox#1\hbox{% \color@setgroup#2\color@endgroup}} \def\LWR@@gsavebox#1[#2]{% \@ifnextchar [{\LWR@@igsavebox#1[#2]}{\LWR@@igsavebox#1[#2][c]}} \long\def\LWR@@igsavebox#1[#2][#3]#4{% \LWR@gsbox#1{\@imakebox[#2][#3]{#4}}} \def\LWR@@gsavepicbox#1(#2,#3){% \@ifnextchar[%] {\LWR@@igsavepicbox#1(#2,#3)}{\LWR@@igsavepicbox#1(#2,#3)[]}} \long\def\LWR@@igsavepicbox#1(#2,#3)[#4]#5{% \LWR@gsbox#1{\@imakepicbox(#2,#3)[#4]{#5}}} % \end{macrocode} % \end{macro} % \begin{environment}{LWR@glrbox} \marg{macroname} % \begin{macrocode} \def\LWR@glrbox#1{% \edef\reserved@a{% \endgroup \global\setbox#1\hbox{% \begingroup\aftergroup}% \def\noexpand\@currenvir{\@currenvir}% \def\noexpand\@currenvline{\on@line}}% \reserved@a \@endpefalse \color@setgroup \ignorespaces} \let\LWR@endglrbox\LWR@endlrbox % \end{macrocode} % \end{environment} % % % \subsection{Converting a macro name to a cs name} % % \begin{macro}{\macrotocsname} \marg{macro name with backslash} % % Results in the macro name without the leading backslash. % % Ref: \href{https://tex.stackexchange.com/questions/42318/removing-a-backslash-from-a-character-sequence} % {\texttt{https://tex.stackexchange.com/questions/42318/ \\ % \hspace*{\fill}removing-a-backslash-from-a-character-sequence}} % % \changes{v0.79}{2020/01/18}{Added.} % \begin{macrocode} \newcommand*{\macrotocsname}[1]{% \ifcat\relax\noexpand#1% \expandafter\expandafter\expandafter\@gobble\expandafter\string \fi #1% } % \end{macrocode} % \end{macro} % % % \subsection{Title case} % % \begin{macro}{\LWRtexttitlecase} % \begin{macrocode} \ExplSyntaxOn \newcommand*{\LWRtexttitlecase}[1]{% \text_titlecase:n{#1}% } \ExplSyntaxOff % \end{macrocode} % \end{macro} % % % \subsection{LetLtxMacrocs} % % \begin{macro}{\LWR@LetLtxMacrocs} \marg{newcsname} \marg{oldcsname} % % \cs{LetLtxMacro} with cs names. % % \changes{v0.88}{2020/07/05}{Added.} % \begin{macrocode} \newcommand*{\LWR@LetLtxMacrocs}[2]{% \expandafter\LetLtxMacro\csname #1\expandafter\endcsname% \csname#2\endcsname% } % \end{macrocode} % \end{macro} % % % \subsection{Absorbing a star} % % \begin{macro}{\LWR@absorbstar} \marg{csname} % % Modifies a macro to aborb a star. % Used for \pkg{cleveref}, since \pkg{hyperref} is emulated, so the % starred macros are not created by \pkg{cleveref}. % % \changes{v0.88}{2020/07/05}{Added.} % \begin{macrocode} \newcommand*{\LWR@absorbstar}[1]{% \LWR@LetLtxMacrocs{LWR@origns@#1}{#1}% \csdef{#1}{\@ifstar{\csuse{LWR@origns@#1}}{\csuse{LWR@origns@#1}}} \expandafter\robustify\csname #1\endcsname } % \end{macrocode} % \end{macro} % % % % \section{Operating-System portability} % \label{sec:OSportability} % \changes{v0.11}{2016/03/11}{Added section: Operating-System portability.} % % \osportabilityusage % % % % \subsection{Literal characters} % % Literal characters to be used in \optn{PrintLatexCmd} and \optn{HTMLLatexCmd}. % These are defined without |@| to easily allow their inclusion in the user's document. % % The literal |%| character: % \begin{macrocode} \let\LWRpercent\@percentchar % \end{macrocode} % % % The literal |$| character: % \begin{macrocode} \catcode`\$=12 \def\LWRdollar{$} \def\LWRdollar{$}% syntax highlighting \catcode`\$=3 % \end{macrocode} % % % The literal |&| character: % \begin{macrocode} \catcode`\&=12 \def\LWRamp{&} \catcode`\&=4 % \end{macrocode} % % % The literal |\| character. % The ampersand is temporarily set to the escape character during the % definition of the backslash macro. % \begin{macrocode} \catcode`\&=0 &catcode`&\=12 &def&LWRbackslash{\} &catcode`&\=0 \catcode`\&=4 % \end{macrocode} % % % The literal |{| character. % The ampersand is temporarily set to the begin group character during the % definition of the leftbrace macro. % \begin{macrocode} \catcode`\&=1 \catcode`\{=12 \def\LWRleftbrace&{} \catcode`\{=1 \catcode`\&=4 % \end{macrocode} % % % The literal |}| character. % The ampersand is temporarily set to the end group character during the % definition of the leftbrace macro. % \begin{macrocode} \catcode`\&=2 \catcode`\}=12 \def\LWRrightbrace{}& \catcode`\}=2 \catcode`\&=4 % \end{macrocode} % % % The literal |#| character: % \begin{macrocode} \catcode`\#=12 \def\LWRhash{#} \catcode`\#=6 % \end{macrocode} % % % \begin{macro}{\LWRopquote} % The operating system's quote mark, \brand{Unix} default. % For \brand{Windows}, see \cs{LWR@setOSWindows}, below. % \begin{macrocode} \def\LWRopquote{'} % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWRopseq} % The operating system's sequential execution command, \brand{Unix} default. % For \brand{Windows}, see \cs{LWR@setOSWindows}, below. % \changes{v0.61}{2018/10/06}{Added spaces.} % \begin{macrocode} \def\LWRopseq{\space\LWRamp\LWRamp\space\space} % \end{macrocode} % \end{macro} % % % \subsection{Common portability code} % % \DescribeBoolean{usingOSWindows} Set if the \optn{OSWindows} option is used, % or if \brand{Windows} is automatically detected. % \begin{macrocode} \newbool{usingOSWindows} \boolfalse{usingOSWindows} % \end{macrocode} % \subsection{\brand{Unix}, \brand{Linux}, and \brand{Mac\,OS}} % \begin{macro}{\OSPathSymbol} % Symbol used to separate directories in a path. % \begin{macrocode} \newcommand*{\OSPathSymbol}{/} % \end{macrocode} % \end{macro} % \subsection{\brand{MS-Windows}} % For \brand{MS-Windows}: % % \begin{macro}{\LWR@setOSWindows} % Set defaults for the \brand{MS-Windows} operating system. % \pkg{lwarp} attempts to auto-detect the operatings system, % and the \optn{OSWindows} option may also be used to force % \brand{MS-Windows} compatibility. % % \changes{v0.20}{2016/12/19}{Auto-detects operating system.} % % \begin{macrocode} \newcommand*{\LWR@setOSWindows} { \booltrue{usingOSWindows} \renewcommand*{\OSPathSymbol}{\@backslashchar} \def\LWRopquote{"} \def\LWRopseq{\space\LWRamp\space\space} } % \end{macrocode} % \end{macro} % % Test for windows during compile. The user may also specify % \optn{OSWindows} package option in case this test fails. % \begin{macrocode} \ifwindows \LWR@setOSWindows \fi % \end{macrocode} % % \section{Package options} % \label{sec:packageoptions} % % % \DescribePackage{kvoptions} % Allows key/value package options. % \begin{macrocode} \RequirePackage{kvoptions} \SetupKeyvalOptions{family=LWR,prefix=LWR@} % \end{macrocode} % \begin{macro}{\lwarpsetup} % A user interface to set the keys: % \changes{v0.61}{2018/09/21}{Added.} % \begin{macrocode} \newcommand{\lwarpsetup}[1]{\setkeys{LWR}{#1}} % \end{macrocode} % \end{macro} % \DescribeBoolean{warpingprint} % \DescribeBoolean{warpingHTML} % \DescribeBoolean{mathjax} % \DescribeBoolean{LWR@origmathjax} % ^^A \DescribeBoolean{mathKaTeX} % % Set to true/false depending on the package option selections for % print/\HTML/\EPUB\ output and mathsvg/mathjax. % % \optn{LWR@origmathjax} remembers the original setting to be restored % by \cs{displaymathnormal}. % \begin{macrocode} \newbool{warpingprint} \newbool{warpingHTML} \newbool{mathjax} \newbool{LWR@origmathjax} % \end{macrocode} % ^^A % \begin{macrocode} % ^^A \newbool{mathKaTeX} % ^^A % \end{macrocode} % % % The default is print output, % \margintag{defaults} % and \SVG\ math if the user chose \HTML\ output. % \begin{macrocode} \booltrue{warpingprint}% \boolfalse{warpingHTML}% \boolfalse{mathjax}% % \end{macrocode} % % % % \DescribeOption{warpdisable} % If the \optn{warpdisable} option is given, % both boolean |warpingprint| and boolean |warpingHTML| are false, % and may be used for \cs{ifbool} tests. % This option may be used to disable almost all of \pkg{lwarp}, % for testing purposes. % % \changes{v0.909}{2022/11/21}{Added option \optn{warpdisable}.} % \begin{macrocode} \DeclareVoidOption{warpdisable}{% \PackageInfo{lwarp}{Using option 'warpdisable'} \boolfalse{warpingprint}% \boolfalse{warpingHTML}% } % \end{macrocode} % \DescribeOption{warpprint} % If the \optn{warpprint} option is given, % boolean |warpingprint| is true and boolean |warpingHTML| is false, % and may be used for \cs{ifbool} tests. % % % \begin{macrocode} \DeclareVoidOption{warpprint}{% \PackageInfo{lwarp}{Using option 'warpprint'} \booltrue{warpingprint}% \boolfalse{warpingHTML}% } % \end{macrocode} % \DescribeOption{warpHTML} % Anything in the |warpHTML| environment will be generated for \HTML\ output only. % % \DescribeOption{warpHTML} % If the \optn{warpHTML} option is given, % boolean |warpingHTML| is true and boolean |warpingprint| is false, % and may be used for \cs{ifbool} tests. % % \begin{macrocode} \DeclareVoidOption{warpHTML}{% \PackageInfo{lwarp}{Using option 'warpHTML'}% \booltrue{warpingHTML}% \boolfalse{warpingprint}% } % \end{macrocode} % % % % % \changes{v0.19}{2016/05/25}{Options: mathsvg and mathjax} % \DescribeOption{mathsvg} % Option \optn{mathsvg} selects \SVG\ math display: % \gindex{math>mathsvg=\optn{mathsvg} option} % \gindex{SVG>mathsvg=\optn{mathsvg} option} % If the \optn{mathsvg} option is given, boolean |mathjax| is false, % and may be used for \cs{ifbool} tests. % \begin{macrocode} \DeclareVoidOption{mathsvg}{% \PackageInfo{lwarp}{Using option 'mathsvg'} \boolfalse{mathjax}% \boolfalse{LWR@origmathjax}% % \end{macrocode} % ^^A % \begin{macrocode} % ^^A \boolfalse{mathKaTeX}% % ^^A % \end{macrocode} % \begin{macrocode} } % \end{macrocode} % % \DescribeOption{mathjax} % Option \optn{mathjax} selects \MathJax\ math display: % \gindex{math>mathjax=\optn{mathjax} option} % \gindex{mathjax=\MathJax>mathjax=\optn{mathjax} option} % If the \optn{mathjax} option is given, boolean |mathjax| is true, may be used for \cs{ifbool} tests. % \begin{macrocode} \DeclareVoidOption{mathjax}{% \PackageInfo{lwarp}{Using option 'mathjax'} \booltrue{mathjax}% \booltrue{LWR@origmathjax}% % \end{macrocode} % ^^A % \begin{macrocode} % ^^A \boolfalse{mathKaTeX}% % ^^A % \end{macrocode} % \begin{macrocode} } % \end{macrocode} % ^^A \DescribeOption{mathKaTeX} % ^^A Option \optn{mathKaTeX} selects Ka\TeX\ math display: % ^^A \gindex{math>mathKaTeX=\optn{mathKaTeX} option} % ^^A \gindex{KaTeX=Ka\TeX>mathKaTeX=\optn{mathKaTeX} option} % ^^A If the \optn{mathKaTeX} option is given, boolean |mathKaTeX| is true, % ^^A may be used for \cs{ifbool} tests. % ^^A Boolean |mathjax| is also set true, as most code is shared with % ^^A \MathJax\ functions. % ^^A \begin{macrocode} % ^^A \DeclareVoidOption{mathKaTeX}{% % ^^A \PackageInfo{lwarp}{Using option 'mathKaTeX'} % ^^A \booltrue{mathjax}% % ^^A \booltrue{LWR@origmathjax}% % ^^A \booltrue{mathKaTeX}% % ^^A } % ^^A \end{macrocode} % \DescribeOption{BaseJobname} % \DescribeDefault{\cs{jobname}} % Option \optn{BaseJobname} sets the \cs{BaseJobname} for this document. % % This is the \cs{jobname} of the printed version, even if currently % 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} \DeclareStringOption[\jobname]{BaseJobname} % \end{macrocode} % \DescribeOption{ImagesDirectory} % \DescribeDefault{\cs{jobname}-images} % Option \optn{ImagesDirectory} sets the name of the directory % to use for the \env{lateximage} images. % % \changes{v0.66}{2019/01/27}{Added option \optn{ImagesDirectory}.} % \begin{macrocode} \DeclareStringOption[\BaseJobname-images]{ImagesDirectory} % \end{macrocode} % \DescribeOption{ImagesName} % \DescribeDefault{image-} % Option \optn{ImagesName} sets the prefix % to use for the \env{lateximage} images. % % \changes{v0.66}{2019/01/27}{Added option \optn{ImagesName}.} % \begin{macrocode} \DeclareStringOption[image-]{ImagesName} % \end{macrocode} % \DescribeOption{makeindexStyle} Selects a custom |.ist| file. % \DescribeDefault{lwarp.ist} % A customized file should be based on |lwarp.ist|. % See \cref{sec:modifymakeindex}. % % \changes{v0.58}{2018/06/21}{Added option \optn{makeindexStyle.}} % % \begin{macrocode} \DeclareStringOption[lwarp.ist]{makeindexStyle} % \end{macrocode} % \DescribeOption{xindyStyle} Selects a custom |.xdy| file. % \DescribeDefault{lwarp.xdy} % A customized file should be based on |lwarp.xdy|. % See \cref{sec:modifyxindy}. % % \changes{v0.30}{2017/04/28}{Option \optn{xdyFilename} added.} % \changes{v0.54}{2018/04/06}{Option \optn{xdyFilename} changed to \optn{xindyStyle.}} % % \begin{macrocode} \DeclareStringOption[lwarp.xdy]{xindyStyle} % \end{macrocode} % \DescribeOption{xindyLanguage} Sets the \prog{xindy} language to be assigned % \DescribeDefault{english} % in \prog{lwarpmk}'s configuration files. This is then used by \prog{lwarpmk} while % processing the index and glossary. % % \changes{v0.29}{2017/04/15}{Add: \optn{lwarpmklang} option for \pkg{lwarp}.} % \changes{v0.30}{2017/04/28}{Option \optn{lwarpmklang} changed to \optn{IndexLanguage}.} % \changes{v0.54}{2018/04/06}{Option \optn{IndexLanguage} changed to \optn{xindyLanguage}.} % % \begin{macrocode} \DeclareStringOption[english]{xindyLanguage} % \end{macrocode} % \DescribeOption{xindyCodepage} Sets the \prog{xindy} codepage to be assigned % \DescribeDefault{utf8} % in \prog{lwarpmk}'s configuration files. This is then used by \prog{lwarpmk} while % processing the index. % ^^A and glossary. % % \changes{v0.54}{2018/04/06}{Add: \optn{xindyCodepage}.} % % \begin{macrocode} \DeclareStringOption[utf8]{xindyCodepage} % \end{macrocode} % \DescribeOption{xindexConfig} Selects a custom |xindex-*.lua| file. % \DescribeDefault{} % A customized file should be based on |xindex-cfg.lua|. % See \cref{sec:modifyxindex}. % \changes{v0.88}{2020/07/08}{Option \optn{xindexConfig} added.} % \begin{macrocode} \DeclareStringOption[]{xindexConfig} % \end{macrocode} % \limitspdftotextenc % % \changes{v0.54}{2018/04/06}{Add: \optn{pdftotextEnc}.} % % \begin{macrocode} \DeclareStringOption[UTF-8]{pdftotextEnc} % \end{macrocode} % \DescribeOption{lwarpmk} Tells \pkg{lwarp} to % generate a local copy of \prog{lwarpmk} called \filenm{lwarpmk.lua}. % Useful for archiving for future use. % This file may be made executable and acts just like \prog{lwarpmk}. % % If \optn{lwarpmk} option, creates a local copy of \filenm{lwarpmk.lua}: % \begin{macrocode} \newbool{LWR@creatinglwarpmk} \boolfalse{LWR@creatinglwarpmk} \DeclareVoidOption{lwarpmk}{ \PackageInfo{lwarp}{Using option 'lwarpmk'} \booltrue{LWR@creatinglwarpmk} } % \end{macrocode} % \DescribeOption{OSWindows} Tells \pkg{lwarp} to use \brand{MS-Windows} compatibility. % Auto-detection of the operating system is attempted, and this option is only % necessary if the auto-detection fails. % See the automatically-generated |lwarpmk.conf| file to find out % whether the operating system was detected correctly. % % \changes{v0.30}{2017/04/27}{Option \optn{OSWindows} replaces macro \cs{warpOSwindows}.} % % \begin{macrocode} \DeclareVoidOption{OSWindows}{ \PackageInfo{lwarp}{Using option 'OSWindows'} \LWR@setOSWindows } % \end{macrocode} % \DescribeOption{HomeHTMLFilename} \DescribeDefault{\cs{BaseJobname}} % The filename of the homepage. % The default is the jobname. % This option is stored into \cs{LWR@HomeHTMLFilename}, % and later transferred into \cs{HomeHTMLFilename} for internal use. % % \changes{v0.30}{2017/04/27}{Options \optn{HomeHTMLFilename} and \optn{HTMLFilename} % replace macros \cs{HomeHTMLFilename} and \cs{HTMLFilename}.} % % \begin{macrocode} \DeclareStringOption[]{HomeHTMLFilename} % \end{macrocode} % \DescribeOption{HTMLFilename} \DescribeDefault{} % The filename prefix of web pages after the homepage. % The default is empty, no prefix. % This option is stored into \cs{LWR@HTMLFilename}, % and later transferred into \cs{HTMLFilename} for internal use. % % \begin{macrocode} \DeclareStringOption[]{HTMLFilename} % \end{macrocode} % \DescribeOption{PrintLatexCmd} \DescribeDefault{} % The shell commands to use to compile the print document. % % \changes{v0.61}{2018/09/20}{Added \optn{PrintLatexCmd} option.} % \begin{macrocode} \DeclareStringOption[]{PrintLatexCmd} % \end{macrocode} % \DescribeOption{HTMLLatexCmd} \DescribeDefault{} % The shell commands to use to compile the \HTML\ document. % % \changes{v0.61}{2018/09/20}{Added \optn{HTMLLatexCmd} option.} % \begin{macrocode} \DeclareStringOption[]{HTMLLatexCmd} % \end{macrocode} % \DescribeOption{PrintIndexCmd} \DescribeDefault{} % The shell commands to use to compile the print indexes. % % \begin{macrocode} \DeclareStringOption[]{PrintIndexCmd} % \end{macrocode} % \DescribeOption{HTMLIndexCmd} \DescribeDefault{} % The shell commands to use to compile the \HTML\ indexes. % % \begin{macrocode} \DeclareStringOption[]{HTMLIndexCmd} % \end{macrocode} % \DescribeOption{LatexmkIndexCmd} \DescribeDefault{} % The shell commands to by used by \prog{latexmk} to compile the print indexes. % Unlike \optn{PrintIndexCmd} and \optn{HTMLIndexCmd}, % \optn{LatexmkIndexCmd} does not include the filename, which will be % provided by \prog{latexmk}. % % \begin{macrocode} \DeclareStringOption[]{LatexmkIndexCmd} % \end{macrocode} % \DescribeOption{makeindex} Tells \pkg{lwarp} to % use \prog{makeindex} for index generation. % When \filenm{lwarpmk.conf} and \filenm{*.lwarpmkconf} are generated, % \optn{PrintIndexCmd} and \optn{HTMLIndexCmd} will be set for \prog{makeindex} % with a single index file. % \changes{v0.58}{2018/06/20}{Added \optn{makeindex} option.} % \begin{macrocode} \DeclareBoolOption[false]{makeindex} % \end{macrocode} % \DescribeOption{xindy} Tells \pkg{lwarp} to % use \prog{xindy} for index generation. % When \filenm{lwarpmk.conf} and \filenm{*.lwarpmkconf} are generated, % \optn{PrintIndexCmd} and \optn{HTMLIndexCmd} will be set for \prog{xindy} % with a single index file. % \changes{v0.58}{2018/06/20}{Added \optn{xindy} option.} % \begin{macrocode} \DeclareBoolOption[false]{xindy} % \end{macrocode} % \DescribeOption{xindex} Tells \pkg{lwarp} to % use \prog{xindex} for index generation. % When \filenm{lwarpmk.conf} and \filenm{*.lwarpmkconf} are generated, % \optn{PrintIndexCmd} and \optn{HTMLIndexCmd} will be set for \prog{xindex} % with a single index file. % \changes{v0.88}{2020/07/08}{Added \optn{xindex} option.} % \begin{macrocode} \DeclareBoolOption[false]{xindex} % \end{macrocode} % \DescribeOption{IndexRef} % \DescribeDefault{cref} % Tells \pkg{lwarp} how to % display the index entries in \HTML output. % See \cref{sec:optionindexref}. % \changes{v0.88}{2020/07/18}{Added \optn{IndexRef} option.} % \begin{macrocode} \DeclareStringOption[cref]{IndexRef} % \end{macrocode} % \DescribeOption{GlossaryCmd} \DescribeDefault{makeglossaries} % The shell command to use to compile the glossary. % The print or \HTML\ version of the glossary filename will be appended to this command. % % \begin{macrocode} \DeclareStringOption[makeglossaries]{GlossaryCmd} % \end{macrocode} % \DescribeOption{latexmk} % Option \optn{latexmk} tells \prog{lwarpmk} to use \prog{latexmk} when compiling documents. % % \changes{v0.30}{2017/04/29}{Option \prog{latexmk} replaces macro \cs{UseLatexmk}.} % % \begin{macrocode} \DeclareBoolOption[false]{latexmk} % \end{macrocode} % \DescribeOption{dvips} % Option \optn{dvips} tells \prog{lwarpmk} to use \prog{dvips} % when compiling \DVI\ \prog{latex} documents. % % \changes{v0.59}{2018/09/02}{Added option \optn{dvips}.} % % \begin{macrocode} \DeclareBoolOption[false]{dvips} % \end{macrocode} % \DescribeOption{dvipdfm} % Option \optn{dvipdfm} tells \prog{lwarpmk} to use \prog{dvipdfm} % when compiling \DVI\ \prog{latex} documents. % % \changes{v0.59}{2018/09/02}{Added option \optn{dvipdfm}.} % % \begin{macrocode} \DeclareBoolOption[false]{dvipdfm} % \end{macrocode} % \DescribeOption{dvipdfmx} % Option \optn{dvipdfmx} tells \prog{lwarpmk} to use \prog{dvipdfmx} % when compiling \DVI\ \prog{latex} documents. % % \changes{v0.59}{2018/09/02}{Added option \optn{dvipdfmx}.} % % \begin{macrocode} \DeclareBoolOption[false]{dvipdfmx} % \end{macrocode} % Execute the package options, with the defaults which have been set just above: % \margintag{Execute options} % \begin{macrocode} \ProcessKeyvalOptions*\relax % \end{macrocode} % \subsection{Additional options support} % Assign the \cs{BaseJobname} if the user hasn't provided one: % \begin{macrocode} \providecommand*{\BaseJobname}{\LWR@BaseJobname} % \end{macrocode} % Defaults unless already over-ridden by the user: % \begin{macrocode} \ifcsempty{LWR@HomeHTMLFilename}{ \newcommand*{\HomeHTMLFilename}{\BaseJobname} }{ \csedef{HomeHTMLFilename}{\LWR@HomeHTMLFilename} } \csedef{HTMLFilename}{\LWR@HTMLFilename} % \end{macrocode} % % % Special handling for underscores in labels and filenames. % % \begin{macro}{\LWR@sanitized} The sanitized version of what was given % to \cs{LWR@sanitize}. % Characters are set to their detokenized versions. % Required for underscores in labels and filenames. % \begin{macrocode} \newcommand*{\LWR@sanitized}{} % \end{macrocode} % \end{macro} % \begin{macro}{\LWR@sanitize} \marg{text} % % Sanitizes the text and returns the result in \cs{LWR@sanitized}. % \begin{macrocode} \newcommand*{\LWR@sanitize}[1]{% \edef\LWR@sanitized{#1}% \edef\LWR@sanitized{\detokenize\expandafter{\LWR@sanitized}}% } % \end{macrocode} % \end{macro} % Sanitize some string options to neutralize underscores. % \changes{v0.66}{2019/01/28}{Sanitize filenames.} % \begin{macrocode} \LWR@sanitize{\LWR@BaseJobname} \edef\LWR@BaseJobname{\LWR@sanitized} \LWR@sanitize{\LWR@ImagesDirectory} \edef\LWR@ImagesDirectory{\LWR@sanitized} \LWR@sanitize{\LWR@ImagesName} \edef\LWR@ImagesName{\LWR@sanitized} % \end{macrocode} % % % % \cs{LWR@PrintIndexCmd} and \cs{LWR@HTMLIndexCmd} are tested to see if they are empty. % If so, they are set to a reasonable defaults for a single index using \prog{makeindex}, % then possibly set to defaults for \prog{xindy} % if the \pkg{lwarp} \optn{xindy} option was selected, % then likewise for \prog{xindex} if the \optn{xindex} option was selected. % % \begin{macrocode} \ifdefempty{\LWR@PrintIndexCmd}{ \renewcommand{\LWR@PrintIndexCmd}{% makeindex -s \LWR@makeindexStyle \space \jobname.idx% } \ifbool{LWR@xindy}{ \renewcommand{\LWR@PrintIndexCmd}{% xindy -M \LWR@xindyStyle \space -L \LWR@xindyLanguage \space -C \LWR@xindyCodepage \space \jobname.idx% } }{} \ifbool{LWR@xindex}{ \ifdefvoid{\LWR@xindexConfig}{ \renewcommand{\LWR@PrintIndexCmd}{% xindex \jobname.idx% } }{ \renewcommand{\LWR@PrintIndexCmd}{% xindex -c \LWR@xindexConfig \space \jobname.idx% } } }{} }{} \ifdefempty{\LWR@HTMLIndexCmd}{ \renewcommand{\LWR@HTMLIndexCmd}{% makeindex -s \LWR@makeindexStyle \space \jobname_html.idx% } \ifbool{LWR@xindy}{ \renewcommand{\LWR@HTMLIndexCmd}{% xindy -M \LWR@xindyStyle \space -L \LWR@xindyLanguage \space -C \LWR@xindyCodepage \space \jobname_html.idx% } }{} \ifbool{LWR@xindex}{ \ifdefvoid{\LWR@xindexConfig}{ \renewcommand{\LWR@HTMLIndexCmd}{% xindex \jobname_html.idx% } }{ \renewcommand{\LWR@HTMLIndexCmd}{% xindex -c \LWR@xindexConfig \space \jobname_html.idx% } } }{} }{} \ifdefempty{\LWR@LatexmkIndexCmd}{ \renewcommand{\LWR@LatexmkIndexCmd}{% makeindex -s \LWR@makeindexStyle% } \ifbool{LWR@xindy}{ \renewcommand{\LWR@LatexmkIndexCmd}{% xindy -M \LWR@xindyStyle \space -L \LWR@xindyLanguage \space -C \LWR@xindyCodepage% } }{} \ifbool{LWR@xindex}{ \ifdefvoid{\LWR@xindexConfig}{ \renewcommand{\LWR@LatexmkIndexCmd}{% xindex } }{ \renewcommand{\LWR@LatexmkIndexCmd}{% xindex -c \LWR@xindexConfig } } }{} }{} % \end{macrocode} % % % \subsection{Conditional compilation} % % \begin{macro}{\warpprintonly} \marg{contents} % % Only process the contents if producing printed output. % \changes{v0.19}{2016/06/06}{Replaces \cs{rowprintedonly}.} % \begin{macrocode} \newcommand{\warpprintonly}[1]{\ifbool{warpingprint}{#1}{}} % \end{macrocode} % \end{macro} % % % \begin{macro}{\warpHTMLonly} \marg{contents} % % Only process the contents if producing \HTML\ output. % \changes{v0.19}{2016/06/06}{Added.} % \begin{macrocode} \newcommand{\warpHTMLonly}[1]{\ifbool{warpingHTML}{#1}{}} % \end{macrocode} % \end{macro} % % % \DescribePackage{comment} Provides conditional code blocks. % % Attempts to use \pkg{versions} or \pkg{verbatim} fail in some cases, and do not % provide much of a speed benefit even when they do work. % % \begin{macrocode} \RequirePackage{comment} % \end{macrocode} % \begin{macro}{\LWR@includecomment} \marg{env name} \marg{partial filename} % \begin{macro}{\LWR@excludecomment} \marg{env name} \marg{partial filename} % % Use many \pkg{comment} cut files to avoid collision in case the % user uses the \pkg{comment} package. Each filename is ``|comment_#2.cut|''. % Based on the \pkg{comment} package. % \changes{v0.84}{2020/03/30}{Independent cut files.} % \changes{v0.891}{2020/09/15}{Error if nested comment.} % \begin{macrocode} \def\LWR@includecomment #1#2{\message{Lwarp: Including comment '#1'}% \csarg\def{After#1Comment}{% \CloseAndInputCutFile% \csundef{LWR@#1commentused}% } \csarg\def{#1}{% \endgroup \ifcsdef{LWR@#1commentused}{ \PackageError{lwarp}% {Nested #1 environment}% {% Environment #1 cannot be nested.\MessageBreak This can happen when a package is loaded from inside a\MessageBreak #1 environment.% }% }{\relax} \csdef{LWR@#1commentused}{} \message{Including '#1' comment.}% \def\CommentCutFile{comment_#2.cut} \SetUpCutFile \ProcessComment{#1} }% \CommentEndDef{#1} } \def\LWR@excludecomment #1#2{\message{Lwarp: Excluding comment '#1'}% \csarg\def{#1}{ \endgroup \message{Excluding '#1' comment.}% \begingroup \def\CommentCutFile{comment_#2.cut} \def\ProcessCutFile{}% \def\ThisComment####1{}% \ProcessComment{#1} }% \csarg\def{After#1Comment}{\CloseAndInputCutFile \endgroup} \CommentEndDef{#1}} % \end{macrocode} % \end{macro} % \end{macro} % \begin{environment}{warpall} % Anything in the |warpall| environment will be generated for print or \HTML\ outputs. % \begin{macrocode} \LWR@includecomment{warpall}{all} % \end{macrocode} % \end{environment} % \begin{environment}{warpHTML} % % For \HTML\ output: % \begin{macrocode} \ifbool{warpingHTML} {\LWR@includecomment{warpHTML}{html}} {\LWR@excludecomment{warpHTML}{html}} % \end{macrocode} % \end{environment} % \begin{environment}{warpprint} % % Anything in the |warpprint| environment will be generated for print output only. % \begin{macrocode} \ifbool{warpingprint} {\LWR@includecomment{warpprint}{print}} {\LWR@excludecomment{warpprint}{print}} % \end{macrocode} % \end{environment} % If \optn{warpdisable}, turn off both print and HTML output: % \changes{v0.909}{2022/11/21}{Added option \optn{warpdisable}.} % \begin{macrocode} \ifboolexpr{bool {warpingprint} or bool {warpingHTML}} {} { \LWR@excludecomment{warpHTML}{html} \LWR@excludecomment{warpprint}{print} \LWR@excludecomment{warpMathJax}{mathjax} } % \end{macrocode} % \begin{environment}{warpMathJax} % Only if \MathJax\ is being used along with \HTML. % \changes{v0.79}{2020/01/26}{Added.} % \begin{macrocode} \begin{warpprint} \LWR@excludecomment{warpMathJax}{mathjax} \end{warpprint} \begin{warpHTML} \ifbool{mathjax} {\LWR@includecomment{warpMathJax}{mathjax}} {\LWR@excludecomment{warpMathJax}{mathjax}} \end{warpHTML} % \end{macrocode} % \end{environment} % \begin{environment}{warpsvg} % Only if \SVG\ math is being used along with \HTML, % or in print mode. % \changes{v0.901}{2021/08/26}{Added.} % \begin{macrocode} \begin{warpprint} \LWR@includecomment{warpsvg}{mathsvg} \end{warpprint} \begin{warpHTML} \ifbool{mathjax} {\LWR@excludecomment{warpsvg}{mathsvg}} {\LWR@includecomment{warpsvg}{mathsvg}} \end{warpHTML} % \end{macrocode} % \end{environment} % \begin{environment}{LWRcreatelwarpmk} % Optionally generate a local copy of \prog{lwarpmk}. % Default to no. % \begin{macrocode} \ifbool{LWR@creatinglwarpmk} {\LWR@includecomment{LWRcreatelwarpmk}{lwarpmk}} {\LWR@excludecomment{LWRcreatelwarpmk}{lwarpmk}} % \end{macrocode} % \end{environment} % % % % % % ^^A *required % \section{Required packages} % \label{sec:requiredpackages} % \gindex{package>required} % \changes{v0.16}{2016/04/08}{Lwarp no longer selects fonts.} % These packages are automatically loaded by \pkg{lwarp} when generating % \HTML\ output. Some of them are also automatically loaded when % generating print output, but some are not. % % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} % ^^A % ^^A % ^^A % For \XeTeX{} or \LuaLaTeX, use \pkg{fontspec}. % ^^A % \marginpar{\textcolor{blue}{\XeTeX{} or \LuaLaTeX{} only:}} % ^^A % % ^^A % See:\\ % ^^A % \href % ^^A % {http://tex.stackexchange.com/questions/2984/frequently-loaded-packages-differences-between-pdflatex-and-xelatex} % ^^A % {http://tex.stackexchange.com/questions/2984/\\ % ^^A % \hspace*{.25in}frequently-loaded-packages-differences-between-pdflatex-and-xelatex} % ^^A % % ^^A % \gindex{font>during conversion} % ^^A % For \XeLaTeX{} and \LuaLaTeX, uses DejaVu Serif for enhanced Cyrillic and Greek coverage. % ^^A % \gindex{Unicode>XeLaTeX \& LuaLaTeX} % ^^A % ^^A % % \DescribePackage{fontspec} % Load \pkg{fontspec} if necessary: % \changes{v0.50}{2018/02/24}{Fix: Load \pkg{fontspec} if necessary.} % \begin{macrocode} \ifxetexorluatex \IfPackageLoadedTF{fontspec}{}{ \usepackage[no-math]{fontspec} } % \end{macrocode} % ^^A \defaultfontfeatures{Ligatures=Common} % ^^A \setmainfont{DejaVu Serif} % ^^A \setsansfont{DejaVu Sans} % ^^A \setmonofont{DejaVu Sans Mono} % The monospaced font is used for \HTML\ tags, % so turn off its TeX ligatures and common ligatures: % \begin{macrocode} \defaultfontfeatures[\rmfamily]{Ligatures={NoCommon,TeX}} \defaultfontfeatures[\sffamily]{Ligatures={NoCommon,TeX}} \defaultfontfeatures[\ttfamily]{Ligatures=NoCommon} \else % \end{macrocode} % ^^A % For \prog{pdflatex}, use \pkg{fontenc} and \pkg{lmodern}: % ^^A % \marginpar{\textcolor{blue}{\prog{pdflatex} only:}} % ^^A % \gindex{Unicode>pdfLaTeX} % ^^A % \gindex{pdfLaTeX>Unicode support} % ^^A % \begin{macrocode} % ^^A \RequirePDFTeX % error if not pdflatex % ^^A % ^^A \input glyphtounicode.tex % ^^A \input glyphtounicode-cmr.tex% from the pdfx package % ^^A \pdfgentounicode=1 % ^^A % ^^A \usepackage{cmap}% help map Russian to unicode % ^^A \defaulthyphenchar=127% % ^^A % \end{macrocode} % ^^A % ^^A % \DescribePackage{lmodern} % ^^A % % ^^A % \pdflatexonly % ^^A % % ^^A % \prog{pdftotext} works better with a vector font. % ^^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} % ^^A % \end{macrocode} % ^^A % ^^A % ^^A % \DescribePackage{fontenc} % ^^A % % ^^A % \pdflatexonly % ^^A % % ^^A % \begin{macrocode} % ^^A \RequirePackage[T1]{fontenc} % ^^A % \end{macrocode} % ^^A % ^^A % ^^A % \DescribePackage{inputenc} % ^^A % % ^^A % \pdflatexonly % ^^A % % ^^A % \begin{macrocode} % ^^A \RequirePackage[utf8]{inputenc} % ^^A % \end{macrocode} % ^^A % \pdflatexonly % % \DescribePackage{microtype} % \changes{v0.18}{2016/05/18}{Microtype disabled during \HTML\ generation} % % Older browsers don't % \gindex{ligatures} % display ligatures. % \margintag{ligatures} % Turn off letter ligatures, keeping % \LaTeX{} dash and quote ligatures, which may fail on older browers % but at least won't corrupt written words. % \begin{macrocode} \RequirePackage{microtype} \microtypesetup{ protrusion=false, expansion=false, tracking=false, kerning=false, spacing=false} % \begin{macrocode} % % Disable ligatures for typewriter fonts. % The comma was causing issues with \MathJax\ and \cs{,} followed by a comma. % Ligatures for f, q, t, etc used to be disabled for non-typewriter fonts, but % are now allowed. % \changes{v0.89}{2020/08/01}{Disable typewriter ligatures.} % ^^A \DisableLigatures[{,},f,q,t,T,Q]{encoding = *,family = *}% previous % \begin{macrocode} \DisableLigatures{encoding = *,family = tt*} % \end{macrocode} % ^^A % ^^A % ^^A % \DescribePackage{newunicodechar} % ^^A % % ^^A % % ^^A % \pdflatexonly % ^^A % % ^^A % Note that the font used by the source code listing may not correctly display the % ^^A % \watchout % ^^A % actual Unicode character contained in the \cs{newunicode\{\}} expression. % ^^A % The listing printout may not display ligatures or the dashes correctly. % ^^A % \begin{macrocode} % ^^A \RequirePackage{newunicodechar} % ^^A \newunicodechar{Í}{\IeC {\'I}} % ^^A \newunicodechar{ff}{ff}% ligatures % ^^A \newunicodechar{fi}{fi} % ^^A \newunicodechar{fl}{fl} % ^^A \newunicodechar{ffi}{ffi} % ^^A \newunicodechar{ffl}{ffl} % ^^A %% \newunicodechar{°}{\degree} % ^^A \newunicodechar{ρ}{\ensuremath{\rho}} % ^^A \newunicodechar{⨯}{\texttimes} % ^^A %% \newunicodechar{®}{\textregistered} % ^^A %% \newunicodechar{©}{\textcopyright} % ^^A \newunicodechar{—}{---}% emdash % ^^A \newunicodechar{–}{--}% endash % ^^A %% \newunicodechar{”}{''}% closing quote % ^^A %% \newunicodechar{“}{``}% opening quote % ^^A %% \newunicodechar{§}{\S} % ^^A %% \newunicodechar{¶}{\P} % ^^A %% \newunicodechar{†}{\dag} % ^^A %% \newunicodechar{‡}{\ddag} % ^^A % \end{macrocode} % ^^A % ^^A % ^^A % \DescribePackage{textcomp} % ^^A % % ^^A % % ^^A % \pdflatexonly % ^^A % % ^^A % Provides \cs{degree}, \cs{textquotesingle}, \cs{textmu}. % ^^A % \begin{macrocode} % ^^A \RequirePackage{textcomp} % ^^A % \end{macrocode} % ^^A % \begin{macrocode} \fi % \end{macrocode} % ^^A % \marginpar{\textcolor{blue}{End of \XeLaTeX, \LuaLaTeX, \pdfLaTeX\ choices.}} % ^^A % \begin{macrocode} \end{warpHTML} % \end{macrocode} % \DescribePackage{geometry} % 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 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.} % \changes{v0.52}{2018/03/31}{Fix: \MathJax\ script line wraps. Reduced right margin.} % \changes{v0.74}{2019/08/13}{Remembers user's geometry.} % % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} % % If \pkg{geometry} has not yet been loaded, % use the preexising page and text sizes to be preserved for % later reuse. % These will be replaced by \pkg{lwarp} \cs{AtBeginDocument} % with a very large page size to reduce \HTML\ tag overflow off the page. % \begin{macrocode} \IfPackageLoadedTF{geometry} {}{ \RequirePackage[ reset, paperwidth=\paperwidth, paperheight=\paperheight, textwidth=\textwidth, textheight=\textheight, left=\oddsidemargin, top=\topmargin, marginparsep=\marginparsep, marginparwidth=\marginparwidth, ]{geometry} } % \end{macrocode} % % Remember the original definitions for later reuse. % If the \pkg{geometry} package is loaded by the user, % \pkg{lwarp-geometry} will nullify the user-level originals. % \begin{macrocode} \LetLtxMacro\LWR@origgeometry\geometry \LetLtxMacro\LWR@orignewgeometry\newgeometry \LetLtxMacro\LWR@origrestoregeometry\restoregeometry \LetLtxMacro\LWR@origsavegeometry\savegeometry \LetLtxMacro\LWR@origloadgeometry\loadgeometry % \end{macrocode} % % % \DescribeBoolean{LWR@allowanothergeometry} % \pkg{geometry} may be loaded by the user before \pkg{lwarp}, % after \pkg{lwarp}, or not at all. % If before \pkg{lwarp}, it will have already been loaded by now % and its page layout has already been saved. % If \pkg{geometry} is loaded after \pkg{lwarp}, % its layout will be set at that time and the user macros nullified. % \cs{AtEndPreamble} this layout will be saved. % If the user never loads \pkg{geometry}, % \pkg{lwarp-geometry} will be loaded \cs{AtBeginDocument}, % but it should not change the page layout set here. % This is controlled by the boolean \bool{LWR@allowanothergeometry}. % Geometry may be adjusted throughout the preamble until % \cs{AtEndPreamble}, when this boolean is set \optn{false}. % \begin{macrocode} \newbool{LWR@allowanothergeometry} \booltrue{LWR@allowanothergeometry} % \end{macrocode} % % Use \cs{AtEndPreamble} to avoid class and option conflict by % changing settings after other packages load, % instead of using \pkg{geometry} package options: % \changes{v0.63}{2018/11/24}{\pkg{geometry}: Fix for \pkg{bxjs*} classes.} % \changes{v0.65}{2018/12/21}{\pkg{geometry}: Fix for \pkg{bxjs*} classes.} % \begin{macrocode} \AtEndPreamble{ % \end{macrocode} % % Whatever geometry choices the user has made in the preamble, % either before or after \pkg{lwarp} was loaded, % are now saved for possible temporary reuse, such as by \pkg{lyluatex}. % % See the \pkg{lwarp-geometry} section for what happens if \pkg{geometry} % is loaded after \pkg{lwarp}. % \begin{macrocode} \LWR@origsavegeometry{LWR@usergeometry} % \end{macrocode} % % The user's paper size is saved for later reuse, % such as by the \pkg{pdfpages} or \pkg{parallel} packages. % \changes{v0.79}{2019/12/29}{\pkg{geometry}: Also save \cs{textwidth}, \cs{textheight}.} %% \begin{macrocode} \newlength{\LWR@userspaperwidth} \setlength{\LWR@userspaperwidth}{\paperwidth} \newlength{\LWR@userspaperheight} \setlength{\LWR@userspaperheight}{\paperheight} \newlength{\LWR@usersmarginparwidth} \setlength{\LWR@usersmarginparwidth}{\marginparwidth} \newlength{\LWR@userstextwidth} \setlength{\LWR@userstextwidth}{\textwidth} \newlength{\LWR@userstextheight} \setlength{\LWR@userstextwidth}{\textheight} % \end{macrocode} % % For \pkg{lwarp}, use a very large page and margins % to help avoid letting \HTML\ tags run off the edge: % \begin{macrocode} \LWR@origgeometry{ reset, paperheight=190in, paperwidth=20in, left=2in, right=6in, top=1in, bottom=1in, heightrounded,% } % \end{macrocode} % % The \pkg{lwarp} page geometry is saved for future restore: % \begin{macrocode} \LWR@origsavegeometry{LWR@lwarpgeometry} % \end{macrocode} % % No longer adjust the page layout when \pkg{lwarp-geometry} is % loaded \cs{AtBeginDocument}: % \begin{macrocode} \boolfalse{LWR@allowanothergeometry}% % \end{macrocode} % % \pkg{ltjsbook} and other classes can print vertically, % and require these to be reset by \pkg{lwarp}: % \begin{macrocode} \setlength{\textheight}{0.8\paperheight} \setlength{\textwidth}{0.7\paperwidth} \@twosidefalse \@mparswitchfalse }% \AtEndPreamble \end{warpHTML} % \end{macrocode} % \codeall % \begin{macrocode} \begin{warpall} % \end{macrocode} % \DescribePackage{xparse} % % \LaTeX{}3 command argument parsing % ^^A \RequirePackage[log-declarations=false]{xparse} % \begin{macrocode} \RequirePackage{xparse} % \end{macrocode} % \changes{v0.51}{2018/03/06}{\pkg{afterpackage}: No longer required.} % \DescribePackage{calc} % \changes{v0.62}{2018/11/10}{\pkg{calc}: Fix: Required for print version.} % \begin{macrocode} \RequirePackage{calc} % \end{macrocode} % \begin{macrocode} \end{warpall} % \end{macrocode} % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} % \DescribePackage{expl3} % % \LaTeX{}3 programming % \begin{macrocode} \RequirePackage{expl3} % \end{macrocode} % ^^A % \DescribePackage{l3regex} % ^^A % % ^^A % \LaTeX{}3 regular expression handling % ^^A % \begin{macrocode} % ^^A \RequirePackage{l3regex} % ^^A % \end{macrocode} % ^^A % \begin{macro}{\EmulatesPackage} \marg{pkg name} \oarg{yyyy/mm/dd and comments} % ^^A % % ^^A % Similar to \cs{ProvidesPackage}. Used where the \pkg{lwarp} package emulates % ^^A % other packages. % ^^A % For example, \pkg{trivfloat} wants to load \pkg{float}, which is emulated by \pkg{lwarp}. % ^^A % Since |\EmulatesPackage{float}| is declared by \pkg{lwarp}, % ^^A % \pkg{trivfloat} will not load \pkg{float} on its own. % ^^A % Doing so would have over-written the \pkg{lwarp} emulation. % ^^A % % ^^A % Do not use \cs{EmulatesPackage} for packages which are patched by other % ^^A % \watchout % ^^A % packages. The emulated code cannot be patched correctly. % ^^A % % ^^A % \begin{macrocode} % ^^A \NewDocumentCommand{\EmulatesPackage}{m O{}}{% % ^^A \expandafter\xdef\csname ver@#1.sty\endcsname{#2 --- % ^^A Emulated by package \@currname.} % ^^A } % ^^A \@onlypreamble\EmulatesPackage % ^^A % \end{macrocode} % ^^A % \end{macro} % ^^A % \DescribePackage{gettitlestring} % % Used to emulate \cs{nameref}. % \begin{macrocode} \RequirePackage{gettitlestring} \end{warpHTML} % \end{macrocode} % \codeall % \begin{macrocode} \begin{warpall} % \end{macrocode} % \DescribePackage{filecontents} % % Used to write helper files while creating the print version. % % \changes{v0.34}{2017/08/02}{\pkg{filecontents}: Required. Patched for \pkg{morewrites}.} % \changes{v0.78}{2019/11/05}{\pkg{filecontents}: Fix to overwrite existing files using new \env{filecontents} environment.} % % Recent versions of \LaTeX\ (as of Fall 2019) now include the functionality % of the \pkg{filecontents} package, but with a new optional argument % used to specify whether to force the overwriting of an existing file. % If an older \LaTeX\ kernel is used, the original \pkg{filecontents} package is used, % but it is patched to throw away the new optional argument. % % \begin{macrocode} \@ifundefined{filec@ntents@opt}{% older kernel, discard optional args \RequirePackage{filecontents} \LetLtxMacro\LWR@orig@filec@ntents\filec@ntents \IfPackageAtLeastTF{filecontents}{2011/10/08} { % \end{macrocode} % For a newer version of the \pkg{filecontents} package, simply % discard the optional argument. % \begin{macrocode} \renewcommand*{\filec@ntents}[1][]{\LWR@orig@filec@ntents} } {% patch older package for morewrites % \end{macrocode} % For an older version of \pkg{filecontents}, % discard the optional argument, and also patch to work with \pkg{morewrites}, per % \href % {https://tex.stackexchange.com/questions/312830/does-morewrites-not-support-filecontents-and-can-i-write-body-of-environment-us/312910} % {\texttt{https://tex.stackexchange.com/questions/312830/\\ % does-morewrites-not-support-filecontents-and-can-i-write-body-of-environment-us/\\ % 312910}} % \begin{macrocode} \newwrite\fcwrite \renewcommand*{\filec@ntents}[1][]{% \def\chardef##1\write{\let\reserved@c\fcwrite}% \LWR@orig@filec@ntents% } } }% older kernel {% newer kernel % \end{macrocode} % For a newer kernel with a \env{filecontents} environment which accepts the % optional \optn{overwrite} argument, use the environment as-is. % \begin{macrocode} }% newer kernel, filecontents env accepts optional args, do not load package % \end{macrocode} % \begin{macrocode} \end{warpall} % \end{macrocode} % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} % \DescribePackage{xifthen} % \begin{macrocode} \RequirePackage{xifthen} % \end{macrocode} % \DescribePackage{verbatim} % \begin{macrocode} \RequirePackage{verbatim} % \end{macrocode} % \DescribePackage{refcount} % % Provides \cs{setcounterref}, \cs{setcounterpageref}, etc. % \begin{macrocode} \RequirePackage{refcount} % \end{macrocode} % \DescribePackage{newfloat} % \begin{macrocode} \RequirePackage{newfloat} % \end{macrocode} % \changes{v0.24}{2017/03/06}{No longer preloads \pkg{subcaption}; % conflicted with \pkg{subfig}.} % \begin{macrocode} \end{warpHTML} % \end{macrocode} % \codeall % \begin{macrocode} \begin{warpall} % \end{macrocode} % \DescribePackage{xstring} % There was a short-term bug in \pkg{xstring} regarding \cs{IfInteger} which affected % \pkg{lwarp}'s index generation. The updated version is requested here. % \trouble[index]{index>xstring=\pkg{xstring} bug} % \trouble{index>numbers, not links} % \trouble{xstring=\pkg{xstring}} % \begin{macrocode} \RequirePackage{xstring}[2019/02/01] % \end{macrocode} % \DescribePackage{environ} % Used to encapsulate math environments for re-use in \HTML\ \element{alt} text. % % \begin{macrocode} \RequirePackage{environ} % \end{macrocode} % \begin{macrocode} \end{warpall} % \end{macrocode} % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} % \changes{v0.40}{2017/09/07}{\pkg{xfrac}: No longer preloaded.} % \changes{v0.66}{2019/01/27}{\pkg{zref}: No longer used.} % \DescribePackage{printlen} % Used to convert lengths for image width/height options. % % \begin{macrocode} \RequirePackage{printlen} % \end{macrocode} % \begin{macro}{\LWR@printlength} \marg{length} % % Prints a length using a locally-controlled unit and space. % Rounding is used unless the length is small. % % \changes{v0.49}{2018/02/19}{Fix: Group \pkg{printlen} changes.} % \begin{macrocode} \newrobustcmd*{\LWR@printlength}[1]{% \begingroup% \uselengthunit{PT}% \renewcommand*{\unitspace}{}% \ifdimless{#1}{10pt}{% \printlength{#1}% }{% \rndprintlength{#1}% }% \endgroup% } % \end{macrocode} % \end{macro} % \begin{macrocode} \end{warpHTML} % \end{macrocode} % \section{Loading packages} % % % \cs{RequirePackage} and \cs{usepackage} are modified to error-check % for certain packages, and for \HTML\ they load the \pkg{lwarp-} version if % it exists. % % \codeall % \begin{macrocode} \begin{warpall} % \end{macrocode} % % Remember the original \cs{RequirePackage}: % \begin{macrocode} \LetLtxMacro\LWR@origRequirePackage\RequirePackage \LetLtxMacro\LWR@origRequirePackageWithOptions\RequirePackageWithOptions % \end{macrocode} % \begin{macro}{\LWR@requirepackagenames} % Stores the list of required package names. % \begin{macrocode} \newcommand*{\LWR@requirepackagenames}{} % \end{macrocode} % \end{macro} % \begin{macro}{\LWR@parsedrequirepackagenames} % Stores the parsed list of required package names % after spaces are removed and |lwarp-| is prepended. % \changes{v0.48}{2018/02/03}{Fix: Parsing similar package names.} % \begin{macrocode} \newcommand*{\LWR@parsedrequirepackagenames}{} % \end{macrocode} % \end{macro} % \begin{macro}{\LWR@nullifycomment} % % Remove the preexisting \env{comment} environment. % Certain packages define it for their own use. % % \begin{macrocode} \newcommand*{\LWR@nullifycomment}{% \PackageInfo{lwarp}% {Nullifying the comment environment before loading \LWR@strresulttwo,}% \let\comment\relax% \let\endcomment\relax% } % \end{macrocode} % \end{macro} % \begin{macro}{\LWR@findword} \oarg{1: separator} \marg{2: list} % \marg{3: index} \oarg{4: destination} % % Note that argument 4 is passed directly to \cs{StrBetween}. % \begin{macrocode} \newcommand*\LWR@findword[3][,]{% \StrBetween[#3,\numexpr#3+1]{#1#2#1}{#1}{#1}% } % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@checkloadnever} \marg{bad package name} \marg{replacement package names} % % From now on, check for incompatible packages loaded via \cs{usepackage}, % instead of packages loaded before \pkg{lwarp}: % \begin{macrocode} \LetLtxMacro\LWR@checkloadnever\LWR@afterloadnever % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@checkloadfilename} \marg{filename} % Checks if this filename should be loaded after \pkg{lwarp}, % or never at all. % % \changes{v0.63}{2018/12/02}{Added to reduce number of \filenm{lwarp-*} files.} % \changes{v0.64}{2018/12/07}{Prevented \pkg{bitfield}, \pkg{doublespace}, % \pkg{newthm}, \pkg{rplain}, \pkg{si}.} % \changes{v0.66}{2019/01/04}{Prevented \pkg{colortab}, \pkg{epsf}, \pkg{hyper}, \pkg{picinpar}, % \pkg{picins}, \pkg{sistyle}, \pkg{ucs}.} % \changes{v0.68}{2019/02/26}{Prevented \pkg{alg}, \pkg{algorithmic}, \pkg{fncylab}, \pkg{pdfcprot}.} % \changes{v0.79}{2020/01/09}{Prevented \pkg{bxcjkjatype}, \pkg{hangul}.} % \changes{v0.80}{2020/02/15}{Prevented \pkg{formula}, \pkg{shadethm}, \pkg{slashbox}.} % \changes{v0.81}{2020/02/28}{Prevented \pkg{statex}.} % \changes{v0.87}{2020/05/14}{Prevented \pkg{csvtools}.} % \changes{v0.88}{2020/07/07}{Prevented \pkg{shadethm}.} % \changes{v0.891}{2020/09/16}{Prevented \pkg{libgreek}.} % \changes{v0.893}{2020/11/15}{Allowed \pkg{picinpar}.} % \changes{v0.895}{2021/01/19}{Allowed \pkg{epsf}.} % % ^^A *checkload % \begin{macrocode} \newcommand*{\LWR@checkloadfilename}[1]{% % \end{macrocode} % % Remember the package name to compare with, to be used % by \cs{LWR@checkloadnever} and \cs{LWR@checkloadbefore}. % \begin{macrocode} \edef\LWR@tempone{#1}% % \end{macrocode} % % Check against the list of packages which should never be loaded: % % \changes{v0.897}{2021/05/08}{Refactored.} % \begin{macrocode} \LWR@checkloadnevers % \end{macrocode} % % % ^^A *loadbefore % The following should only be loaded before \pkg{lwarp}: % \changes{v0.895}{2021/01/14}{\pkg{kpfonts} load before \pkg{lwarp}.} % \begin{macrocode} \LWR@checkloadbefore{ctex} \LWR@checkloadbefore{fontspec} \LWR@checkloadbefore{inputenc} \LWR@checkloadbefore{inputenx} \LWR@checkloadbefore{nfssext-cfr} \LWR@checkloadbefore{fontaxes} \LWR@checkloadbefore{kotex} \LWR@checkloadbefore{kpfonts}% textcomp option clash \LWR@checkloadbefore{luatexja} \LWR@checkloadbefore{luatexja-fontspec} \LWR@checkloadbefore{luatexko} \LWR@checkloadbefore{morewrites} \LWR@checkloadbefore{newclude} \LWR@checkloadbefore{newunicodechar} \LWR@checkloadbefore{plext} \LWR@checkloadbefore{xeCJK} \LWR@checkloadbefore{xetexko} \LWR@checkloadbefore{zxjatype} } % \end{macrocode} % \end{macro} % \begin{macro}{\LWR@lookforpackagename} \marg{index} % % If \HTML, and if this is an \pkg{lwarp}-supported package name, % re-direct it to the \pkg{lwarp} version % by renaming it |lwarp-| followed by the original name. % % Looks |index| deep into the list of package names, \cs{LWR@requirepackagenames}, and % builds \cs{LWR@parsedrequirepackagenames} which is the modified list of names. % \changes{v0.48}{2018/02/03}{Fix: Parsing similar package names.} % \begin{macrocode} \newcommand*{\LWR@lookforpackagename}[1]{% % \end{macrocode} % Find the |index|'th package name from the list: % \begin{macrocode} \LWR@findword{\LWR@requirepackagenames}{#1}[\LWR@strresult]% % \end{macrocode} % Remove blanks. % The original name with blanks is in |LWR@strresult| and % the final name with no blanks goes into |LWR@strresulttwo|. % \begin{macrocode} \StrSubstitute[100]{\LWR@strresult}{ }{}[\LWR@strresulttwo]% % \end{macrocode} % See if the package name was found: % \begin{macrocode} \IfStrEq{\LWR@strresulttwo}{}% {}% no filename {% yes filename was found % \end{macrocode} % Possible adjustments before loading the package. % Maybe nullify the \env{comment} environment if the new package % will be redefining it for a new purpose. % \changes{v0.67}{2019/02/15}{\pkg{easyReview}: Supported.} % \changes{v0.70}{2019/03/23}{\pkg{changes}: Updated to v3.1.2.} % \begin{macrocode} \ifdefstring{\LWR@strresulttwo}{easyReview}{\LWR@nullifycomment}{}% \ifdefstring{\LWR@strresulttwo}{changes}{\LWR@nullifycomment}{}% % \end{macrocode} % If \HTML, check if the package should be loaded before \pkg{lwarp}, % or never at all: % \begin{macrocode} \ifbool{warpingHTML}{\LWR@checkloadfilename{\LWR@strresulttwo}}{}% % \end{macrocode} % If \HTML, and if found, and if an \pkg{lwarp}-equivalent name exists, % use |lwarp-|* instead. % \begin{macrocode} \ifboolexpr{ bool{warpingHTML} and test{\IfFileExists{lwarp-\LWR@strresulttwo.sty}} }% {% lwarp-* file found \ifdefvoid{\LWR@parsedrequirepackagenames}{% \edef\LWR@parsedrequirepackagenames{lwarp-\LWR@strresulttwo}% }{% \edef\LWR@parsedrequirepackagenames{% \LWR@parsedrequirepackagenames,lwarp-\LWR@strresulttwo% }% }% }% {% % \end{macrocode} % Otherwise, use the current package name. % \changes{v0.46}{2018/01/23}{Fix: Spaces in \cs{usepackage}.} % \begin{macrocode} \ifdefvoid{\LWR@parsedrequirepackagenames}{% \edef\LWR@parsedrequirepackagenames{\LWR@strresulttwo}% }{% \edef\LWR@parsedrequirepackagenames{% \LWR@parsedrequirepackagenames,\LWR@strresulttwo% }% }% }% no lwarp-* file }% yes filename } % \end{macrocode} % \end{macro} % % \begin{macro}{\RequirePackage} \oarg{1: options} \marg{2: package names} \oarg{3: version} % % For each of many package names in a comma-separated list, % if an \pkg{lwarp} version of a package exists, % select it instead of the \LaTeX\ version. % % \changes{v0.32}{2017/06/09}{Fix: Ignores blanks in package list.} % % \begin{macrocode} \RenewDocumentCommand{\RequirePackage}{o m o}{% % \end{macrocode} % % Redirect up to twenty names:\footnote{This was originally nine names, but % then I came across a package which used twelve...} % \changes{v0.61}{2018/10/02}{Support up to 20 packages.} % \begin{macrocode} \renewcommand*{\LWR@requirepackagenames}{#2}% \renewcommand*{\LWR@parsedrequirepackagenames}{}% \LWR@lookforpackagename{1}% \LWR@lookforpackagename{2}% \LWR@lookforpackagename{3}% \LWR@lookforpackagename{4}% \LWR@lookforpackagename{5}% \LWR@lookforpackagename{6}% \LWR@lookforpackagename{7}% \LWR@lookforpackagename{8}% \LWR@lookforpackagename{9}% \LWR@lookforpackagename{10}% \LWR@lookforpackagename{11}% \LWR@lookforpackagename{12}% \LWR@lookforpackagename{13}% \LWR@lookforpackagename{14}% \LWR@lookforpackagename{15}% \LWR@lookforpackagename{16}% \LWR@lookforpackagename{17}% \LWR@lookforpackagename{18}% \LWR@lookforpackagename{19}% \LWR@lookforpackagename{20}% % \end{macrocode} % % Error if braces are used in optional argument. % This can cause an error, so tell how to avoid. % \changes{v0.896}{2021/03/14}{Warn if package option has braces.} % \changes{v0.897}{2021/05/08}{Fixed warning.} % \begin{macrocode} \IfSubStr{\detokenize\expandafter{#1}}{\LWRleftbrace}% {% \PackageError{lwarp}{% You used:\MessageBreak \protect\usepackage[#1]{#2}\MessageBreak Braces in the package options will fail with Lwarp.\MessageBreak Instead, use:\MessageBreak \protect\PassOptionsToPackage{#1}{#2}\MessageBreak \protect\usepackage{#2}\MessageBreak near the line number given below.\MessageBreak Enter 'h' for more info% }% {% See the Lwarp manual troubleshooting index entry for\MessageBreak ``package, options with braces''% }% }% {}% no brace % \end{macrocode} % % \cs{RequirePackage} depending on the options and version: % \begin{macrocode} \IfValueTF{#1}% {% options given % \end{macrocode} % % The \LaTeX3 key/value handler does not appear to expand the option % argument, so it is pre-expanded here. % This was a problem for \pkg{mathspec}, which passed options % to \pkg{fontspec}. % \changes{v0.916}{2024/02/17}{Fix for \LaTeX3 key/val option handling.} % \begin{macrocode} \edef\LWR@packageoptions{#1}% \IfValueTF{#3}% version given? {% \expandafter\LWR@origRequirePackage% \expandafter[\LWR@packageoptions]% {\LWR@parsedrequirepackagenames}[#3]% }% {% \expandafter\LWR@origRequirePackage% \expandafter[\LWR@packageoptions]% {\LWR@parsedrequirepackagenames}% }% }% {% no options given \IfValueTF{#3}% version given? {\LWR@origRequirePackage{\LWR@parsedrequirepackagenames}[#3]}% {\LWR@origRequirePackage{\LWR@parsedrequirepackagenames}}% }% } \LetLtxMacro\usepackage\RequirePackage \@onlypreamble\RequirePackage \@onlypreamble\usepackage % \end{macrocode} % \end{macro} % \begin{macrocode} \end{warpall} % \end{macrocode} % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} % \begin{macro}{\LWR@ProvidesPackagePass} \marg{pkgname} \oarg{version} % % Uses the original package, including options. % \begin{macrocode} \NewDocumentCommand{\LWR@ProvidesPackagePass}{m o}{ \PackageInfo{lwarp}{% Using package `#1',\MessageBreak and adding lwarp modifications, including options,\MessageBreak% }% \IfValueTF{#2}% {\ProvidesPackage{lwarp-#1}[#2]}% {\ProvidesPackage{lwarp-#1}}% \DeclareOption*{% \PassOptionsToPackage{\CurrentOption}{#1}% }% \ProcessOptions\relax% % \end{macrocode} % % If using \pkg{catoptions}, an error occurs if a package is loaded with an option % then loaded again with no options. \pkg{lwarp} does this if a package is preloaded % then later patched. To avoid an error while using \pkg{catoptions}, % if a package has already been loaded, it is loaded again with its original options. % \changes{v0.79}{2019/12/31}{Fix: \pkg{catoptions}.} % \begin{macrocode} \IfPackageLoadedTF{#1}{% \edef\LWR@tempone{\csuse{opt@#1.sty}}% \IfValueTF{#2}% {% \expandafter\LWR@origRequirePackage% \expandafter[\LWR@tempone]{#1}[#2]% }% {% \expandafter\LWR@origRequirePackage% \expandafter[\LWR@tempone]{#1}% }% }{% \IfValueTF{#2}% {\LWR@origRequirePackage{#1}[#2]}% {\LWR@origRequirePackage{#1}}% }% % \end{macrocode} % In some cases, the following seems to be required % to avoid an ``unknown option'' error, such % as when loading \pkg{xcolor} with options. % \changes{v0.62}{2018/11/11}{Fix: Unknown option error.} % \begin{macrocode} \DeclareOption*{}% \ProcessOptions\relax% } % \end{macrocode} % \end{macro} % \begin{macro}{\LWR@ProvidesPackageDropA} \marg{name} \marg{date or -NoValue-} % % Declares the package. Factored for reuse. % % \begin{macrocode} \newcommand*{\LWR@ProvidesPackageDropA}[2]{% \PackageInfo{lwarp}{% Replacing package `#1' with the lwarp version,\MessageBreak and discarding options,% }% \IfValueTF{#2} {\ProvidesPackage{lwarp-#1}[#2]} {\ProvidesPackage{lwarp-#1}} } % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@ProvidesPackageDropB} % Nullifies then processes the options. % % Seems to be required when options contain curly braces, which were causing % ``|Missing \begin{document}|''. % \changes{v0.48}{2018/02/04}{Fix: Options with braces.} % \begin{macrocode} \newcommand*{\LWR@ProvidesPackageDropB}{% % \ProcessOptions\relax% original LaTeX code \let\ds@\@empty% from the original \ProcessOptions \edef\@curroptions{}% lwarp modification to \ProcessOptions \@process@ptions\relax% from the original \ProcessOptions } % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@ProvidesPackageDrop} \marg{pkgname} \oarg{version} % % Ignores the original package and uses lwarp's version instead. % Drops/discards all options. % % \begin{macrocode} \NewDocumentCommand{\LWR@ProvidesPackageDrop}{m o}{ % \end{macrocode} % Declare the package: % \begin{macrocode} \LWR@ProvidesPackageDropA{#1}{#2} % \end{macrocode} % Ignore all options: % \begin{macrocode} \DeclareOption*{} % \end{macrocode} % Process the options: % \begin{macrocode} \LWR@ProvidesPackageDropB } % \end{macrocode} % \end{macro} % \begin{macrocode} \end{warpHTML} % \end{macrocode} % \section{File handles} % Defines file handles for writes. % \changes{v0.37}{2017/08/19}{File handles reorganized.} % \codeall % \begin{macrocode} \begin{warpall} % \end{macrocode} % \begin{macro}{\LWR@quickfile} % For quick temporary use only. % This is reused in several places. % \begin{macrocode} \newwrite\LWR@quickfile% % \end{macrocode} % \end{macro} % \begin{macrocode} \end{warpall} % \end{macrocode} % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} % \begin{macro}{\LWR@lateximagesfile} % For \filenm{-images.txt}: % \begin{macrocode} \newwrite\LWR@lateximagesfile % \end{macrocode} % \end{macro} % \begin{macrocode} \end{warpHTML} % \end{macrocode} % \section{Include a file} % % During \HTML\ output, |\include{}| causes the following to occur: % % \begin{enumerate} % \item \pkg{lwarp} creates |_html_inc.tex| whose contents are: % \begin{sourcedisplay} % \cs{input} \textless{}filename\textgreater.tex % \end{sourcedisplay} % \item |_html_inc.tex| is then \cs{include}d instead of |.tex|. % \item |_html_inc.aux| is automatically generated and used by \LaTeX. % \end{enumerate} % % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} % \begin{macro}{\@include} \marg{filename} Modified to load |_html_inc| files. % % (Below, \cs{clearpage} caused missing text, and was changed to \cs{newpage}.) % % \changes{v0.37}{2017/08/19}{Maintains independent \filenm{aux} files for \protect\HTML.} % \changes{v0.73}{2019/06/20}{Fix: \cs{newpage} instead of \cs{clearpage}.} % \begin{macrocode} \def\@include#1 {% \immediate\openout\LWR@quickfile #1_html_inc.tex% lwarp \immediate\write\LWR@quickfile{\string\input{#1.tex}}% lwarp \immediate\closeout\LWR@quickfile% lwarp \LWR@maybe@orignewpage% changed from clearpage \if@filesw \immediate\write\@mainaux{\string\@input{#1_html_inc.aux}}% changed \fi \@tempswatrue \if@partsw \@tempswafalse \edef\reserved@b{#1}% \@for\reserved@a:=\@partlist\do {\ifx\reserved@a\reserved@b\@tempswatrue\fi}% \fi \if@tempswa \let\@auxout\@partaux \if@filesw \immediate\openout\@partaux #1_html_inc.aux % changed \immediate\write\@partaux{\relax}% \fi \@input@{#1_html_inc.tex}% changed \LWR@maybe@orignewpage% changed from clearpage \@writeckpt{#1}% \if@filesw \immediate\closeout\@partaux \fi \else \deadcycles\z@ \@nameuse{cp@#1}% \fi \let\@auxout\@mainaux% } % \end{macrocode} % \end{macro} % \begin{macrocode} \end{warpHTML} % \end{macrocode} % \section{Copying a file} % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} % \begin{macro}{\LWR@copyfile} \marg{source filename} \marg{destination filename} % % Used to copy the \filenm{.toc} file to |.sidetoc| to re-print the \TOC\ in % the side\TOC\ navigation pane. % \begin{macrocode} \newwrite\LWR@copyoutfile % open the file to write to \newread\LWR@copyinfile % open the file to read from \newcommand*{\LWR@copyfile}[2]{% \LWR@traceinfo{LWR@copyfile: copying #1 to #2} \immediate\openout\LWR@copyoutfile=#2 \openin\LWR@copyinfile=#1 \begingroup\endlinechar=-1 \makeatletter \LWR@traceinfo{LWR@copyfile: about to loop} \loop\unless\ifeof\LWR@copyinfile \LWR@traceinfo{LWR@copyfile: one line} \read\LWR@copyinfile to\LWR@fileline % Read one line and store it into \LWR@fileline % \LWR@fileline\par % print the content into the pdf % print the content: \immediate\write\LWR@copyoutfile{\unexpanded\expandafter{\LWR@fileline}}% \repeat \immediate\closeout\LWR@copyoutfile \LWR@traceinfo{LWR@copyfile: done} \endgroup } % \end{macrocode} % \end{macro} % \begin{macrocode} \end{warpHTML} % \end{macrocode} % \section{Debugging messages} % \label{sec:debuggingmessages} % % \gindex{HTML>conversion settings>debug comments} % \gindex{tracing log} % \gindex{debugging>HTML debug comments} % \gindex{debugging>tracing log} % \gindex{troubleshooting>HTML debug comments} % \gindex{troubleshooting>tracing log} % % \changes{v0.61}{2018/09/25}{Docs: HTMLDebugComments} % % To have the \HTML\ output include additional \HTML\ comments, such as % \margintag{\HTML\ comments} % which \element{div} is closing, use % \begin{sourcedisplay} % \cs{booltrue\{HTMLDebugComments\}} % \end{sourcedisplay} % % \changes{v0.61}{2018/09/25}{Docs: \cs{tracinglwarp}} % % To have debug information written to the log, % \margintag{debugging information} % use % \begin{sourcedisplay} % \cs{tracinglwarp} % \end{sourcedisplay} % % \codeall % \begin{macrocode} \begin{warpall} % \end{macrocode} % \DescribeBoolean{LWR@tracinglwarp} True if tracing is turned on. % \begin{macrocode} \newbool{LWR@tracinglwarp} % \end{macrocode} % % \begin{macro}{\tracinglwarp} Turns on the debug tracing messages. % \changes{v0.20}{2017/02/07}{Added.} % \begin{macrocode} \newcommand{\tracinglwarp}{\booltrue{LWR@tracinglwarp}} % \end{macrocode} % \end{macro} % % \begin{macro}{\LWR@traceinfo} \marg{text} \quad If tracing is turned on, writes % the text to the |.log| file. % \begin{macrocode} \newcommand{\LWR@traceinfo}[1]{% \ifbool{LWR@tracinglwarp}% {% \typeout{*** lwarp: #1}% }% {}% } % \end{macrocode} % \end{macro} % \DescribeBoolean{HTMLDebugComments} \DescribeDefault{false} % Add comments in \HTML\ % about closing \element{div}s, sections, etc. % % \changes{v0.28}{2017/04/09}{Added boolean \progcode{HTMLDebugComments}.} % % \begin{macrocode} \newbool{HTMLDebugComments} \boolfalse{HTMLDebugComments} % \end{macrocode} % If \cs{tracinglwarp}, show where preamble hooks occur: % \begin{macrocode} \AfterEndPreamble{ \LWR@traceinfo{AfterEndPreamble} } \AtBeginDocument{ \LWR@traceinfo{AtBeginDocument} } % \end{macrocode} % \begin{macrocode} \end{warpall} % \end{macrocode} % \section{Defining print and \HTML\ versions of macros and environments} % \label{sec:definingprinthtml} % \gindex{print>defining print \Slash HTML macros \Slash envs} % \gindex{HTML>defining print \Slash HTML macros \Slash envs} % \gindex{LWR@formatted=\cs{LWR@formatted} print \Slash HTML} % \gindex{defining print \Slash HTML macros \Slash envs} % % \changes{v0.903}{2021/12/19}{Docs: Now using \cs{NewCommandCopy}, \pkg{xparse} OK.} % % The following refers to defining objects inside \pkg{lwarp}, % and may also be of some use for package authors to adapt their % packages for \pkg{lwarp}. % The following is not for the user's document. % % Many macros and environments must be provided as both print and \HTML\ versions. % % While generating the print version of a document, the original macros % as defined by \LaTeX\ and its packages are used as-is. % % While generating the \HTML\ version of a document, % the original macro or environment is redefined to call a new \HTML\ version % or a copy of the original print version. % The new \HTML\ versions of macros and environments are used most of the time. % Copies of the print versions are used inside a \env{lateximage} environment, % which draws and remembers an image of the printed output, and also several % other places. % % The general structure for providing print and \HTML\ versions of a macro or % environment is as follows: % % \begin{description} % % \item[For a preexisting macro:] An \HTML\ version % is provided with a special name, inside a \env{warpHTML} environment, % then \cs{LWR@formatted} is used to redefine and patch various macros: % \needspace{5\baselineskip} % \begin{sourceverb} % \begin{warpHTML} % \newcommand{\LWR@HTML@name}{...} % % \LWR@formatted{name} % \end{warpHTML} % \end{sourceverb} % |\LWR@formatted{name}| copies the original print version to a new % name \cs{LWR@print@}, % then redefines \cs{name} to use either the print or \HTML\ version depending % on which mode \pkg{lwarp} is using. % \item[For a preexisiting environment:] The process % is similar. Note the use of \cs{LWR@formattedenv} instead of \cs{LWR@formatted}. % \needspace{5\baselineskip} % \begin{sourceverb} % \begin{warpHTML} % \newenvironment{LWR@HTML@name}{...}{..} % % \LWR@formattedenv{name} % \end{warpHTML} % \end{sourceverb} % \item[For a new macro or environment:] The print version is defined inside % \env{warpall}, so that it can also be seen and modified by during \HTML\ outut. % \needspace{9\baselineskip} % \begin{sourceverb} % \begin{warpall} % \newcommand{\name}{...}% The print version. % \end{warpall} % % \begin{warpHTML} % \newcommand{\LWR@HTML@name}{...} % % \LWR@formatted{name} % \end{warpHTML} % \end{sourceverb} % Similar for an environment, using \cs{formattedenv}. % % \end{description} % In general, \cs{LWR@formatted} or \cs{LWR@formattedenv} are placed inside % a \env{warpHTML} environment, and while producing an \HTML\ document % they do the following: % \begin{itemize} % \item Macros are modified: % \begin{enumerate} % \item The pre-existing print version \cs{name} is saved as \cs{LWR@print@}, % unless \cs{LWR@print@} is already defined. % \item The original \cs{name} is redefined to call either the print or \HTML\ version % depending on which format is in use at the moment, as set by \cs{LWR@formatting}, % which is defined as either ``|print|'' or ``|HTML|''. % \end{enumerate} % \item When \pkg{lwarp} is producing a print document, the original definitions are % used, as well as any new definitions defined in \env{warpall} above. % \item When \pkg{lwarp} is generating \HTML\ output, \cs{LWR@formatting} is % set to ``|HTML|'', and \cs{name} is directed to \cs{LWR@HTML@}. % For an environment, \cs{endname} is directed to \cs{endLWR@HTML@}. % \item When \pkg{lwarp} is generating \HTML\ output % but enters a \env{lateximage} environment, % or for some other reason needs to draw images using the original print % defintions, \cs{LWR@formatting} is changed to ``|print|'' and \cs{name} is % then redirected to \cs{LWR@print@}, which was the original \cs{name}. % \item Since the new \cs{name} does not process any arguments, % they are processed by \cs{LWR@print@name} or \cs{LWR@HTML@name}. % \end{itemize} % % Expandable versions are also provided as well. % These usually are necessary for anything which could appear inside a \env{tabular}, % without which a ``|Misplaced \omit|'' error may occur. % \trouble[Misplaced \cs{omit} error]{Misplaced \cs{omit}>tabular} % \begin{sourcedisplay} % \cs{LWR@expandableformatted} \\ % \cs{LWR@expandableformattedenv} % \end{sourcedisplay} % % (Older versions of \pkg{lwarp} used \cs{LetLtxMacro} for everything, % but this could fail when using macros defined by \pkg{xparse}. % This older system is still in use for many definitions.) % ^^A *8* Modify the above when all old \lets are removed. % % \changes{v0.57}{2018/05/28}{New system for switching print and \HTML\ outputs.} % % Print or disabled versions: % % \codeall % \begin{macrocode} \begin{warpall} % \end{macrocode} % \changes{v0.901}{2021/08/20}{Added print versions of \cs{LWR@formatted}, etc.} % \changes{v0.909}{2022/11/21}{Added option \optn{warpdisable}.} % \begin{macrocode} \newcommand*{\LWR@formatted}[1]{} \newcommand*{\LWR@expandableformatted}[1]{} \newcommand*{\LWR@formattedenv}[1]{} \newcommand*{\LWR@expandableformattedenv}[1]{} % \end{macrocode} % \begin{macrocode} \end{warpall} % \end{macrocode} % \codehtml % HTML versions: % % \begin{macrocode} \begin{warpHTML} % \end{macrocode} % % % \begin{macro}{\LWR@formatting} Remembers if selected print/\HTML\ formatting. % % Used while \cs{LWR@restoreorigformatting}, such as in an \env{lateximage}. % May be set to either ``|print|'' or ``|HTML|''. % % \begin{macrocode} \newcommand*{\LWR@formatting}{HTML} % \end{macrocode} % \end{macro} % % % % \begin{macro}{\LWR@formatted@checkname} \marg{name} % % Verify that a print and \HTML\ version exist. % \changes{v0.893}{2020/11/15}{Added.} % \changes{v0.901}{2021/08/18}{Improved error handling.} % \begin{macrocode} \newcommand*{\LWR@formatted@checkname}[1]{% \ifcsundef{#1}{% \ifcsundef{LWR@print@#1}{% \PackageError{lwarp} {% \LWRbackslash#1 or \protect\LWR@print@#1\MessageBreak must be defined before using \protect\LWR@formatted, etc% } {Perhaps #1 is misspelled.} }{\relax}% }{\relax}% \ifcsundef{LWR@HTML@#1}{% \PackageError{lwarp} {% \protect\LWR@HTML@#1 must be defined before using \protect\LWR@formatted, etc% } {Perhaps #1 is misspelled.} }{\relax}% } % \end{macrocode} % \end{macro} % % \begin{macro}{\LWR@formatted@checkendname} \marg{name} % \changes{v0.893}{2020/11/15}{Added.} % \changes{v0.901}{2021/08/18}{Improved error handling.} % \begin{macrocode} \newcommand*{\LWR@formatted@checkendname}[1]{% \ifcsundef{end#1}{% \ifcsundef{endLWR@print@#1}{% \PackageError{lwarp} {% \protect\end#1 or \protect\endLWR@print@#1\MessageBreak must be defined before using \protect\LWR@formatted, etc% } {Perhaps #1 is misspelled.} }{\relax}% }{\relax}% \ifcsundef{endLWR@HTML@#1}{% \PackageError{lwarp} {% \protect\endLWR@HTML@#1 must be defined before using \protect\LWR@formatted, etc% } {Perhaps #1 is misspelled.} }{\relax}% } % \end{macrocode} % \end{macro} % % \begin{macro}{\LWR@formatted} \marg{macroname} \qquad No backslash in the macro name. % % If not yet defined, defines \cs{LWR@print@} as % the original print-mode \cs{}. % Also redefines \cs{} to use \cs{LWR@@}, % where is set by \cs{LWR@formatting}, and is |print| or |HTML|. % % \changes{v0.893}{2020/11/15}{Improved error handling.} % \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.} % \begin{macrocode} \renewcommand*{\LWR@formatted}[1]{% \LWR@formatted@checkname{#1}% \ifcsundef{LWR@print@#1}{% \csNewCommandCopycs{LWR@print@#1}{#1}% }{}% \ifcsundef{#1}{% \expandafter\newrobustcmd\csname #1\endcsname{% \@nameuse{LWR@\LWR@formatting @#1}% }% }{% \expandafter\renewrobustcmd\csname #1\endcsname{% \@nameuse{LWR@\LWR@formatting @#1}% }% }% } % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@expandableformatted} \marg{macroname} \qquad No backslash % in the macro name. % % An expandable version of \cs{LWR@formatted}. % % \changes{v0.893}{2020/11/15}{Improved error handling.} % \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.} % \begin{macrocode} \renewcommand*{\LWR@expandableformatted}[1]{% \LWR@formatted@checkname{#1}% \ifcsundef{LWR@print@#1}{% \csNewCommandCopycs{LWR@print@#1}{#1}% }{}% \ifcsundef{#1}{% \expandafter\newcommand\csname #1\endcsname{% \@nameuse{LWR@\LWR@formatting @#1}% }% }{% \expandafter\renewcommand\csname #1\endcsname{% \@nameuse{LWR@\LWR@formatting @#1}% }% }% } % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@formattedenv} \marg{environmentname} % % If not yet defined, defines the environment \env{LWR@print@} as % the original print-mode \env{}. % Also redefines the environment || to use environment |LWR@@|, % where is set by \cs{LWR@formatting}, and is |print| or |HTML|. % % \changes{v0.893}{2020/11/15}{Improved error handling.} % \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.} % \begin{macrocode} \renewcommand*{\LWR@formattedenv}[1]{% \LWR@formatted@checkname{#1}% \LWR@formatted@checkendname{#1}% \ifcsundef{LWR@print@#1}{% \NewEnvironmentCopy{LWR@print@#1}{#1}% }{}% \DeclareDocumentEnvironment{#1}{}% {% \@nameuse{LWR@\LWR@formatting @#1}% }% {% \@nameuse{endLWR@\LWR@formatting @#1}% }% } % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@expandableformattedenv} \marg{environmentname} % % An expandable version of \env{LWR@formattedenv}. % % \changes{v0.893}{2020/11/15}{Improved error handling.} % \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.} % \begin{macrocode} \renewcommand*{\LWR@expandableformattedenv}[1]{% \LWR@formatted@checkname{#1}% \LWR@formatted@checkendname{#1}% \ifcsundef{LWR@print@#1}{% \NewEnvironmentCopy{LWR@print@#1}{#1}% }{}% \DeclareExpandableDocumentEnvironment{#1}{}% {% \@nameuse{LWR@\LWR@formatting @#1}% }% {% \@nameuse{endLWR@\LWR@formatting @#1}% }% } % \end{macrocode} % \end{macro} % % \begin{macrocode} \end{warpHTML} % \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. % % \codeall % \begin{macrocode} \begin{warpall} % \end{macrocode} % % \subsection{User-level controls} % % \DescribeBoolean{FormatEPUB} \DescribeDefault{false} % Changes \HTML\ output for easy \EPUB\ conversion % via an external program. Removes per-file headers, footers, and nav. % Adds footnotes per chapter/section. % \gindex{EPUB>HTML conversion settings} % \gindex{HTML>conversion settings>EPUB} % % \changes{v0.28}{2017/04/09}{Added boolean \progcode{FormatEPUB}.} % % \begin{macrocode} \newbool{FormatEPUB} \boolfalse{FormatEPUB} % \end{macrocode} % % % \DescribeBoolean{FormatWP} \DescribeDefault{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. % \gindex{word processor>HTML conversion settings} % \gindex{HTML>conversion settings>word processor} % % \changes{v0.28}{2017/04/09}{Added boolean \progcode{FormatWP}.} % % \begin{macrocode} \newbool{FormatWP} \boolfalse{FormatWP} % \end{macrocode} % % % \DescribeBoolean{WPMarkFloats} \DescribeDefault{false} % \describeWPMarkFloats % \footnote{Perhaps some day word processors will have \HTML\ import options % for identifying \element{figure} and caption tags % for figures and tables.} % \gindex{word processor>HTML conversion settings} % \gindex{HTML>conversion settings>word processor} % % \changes{v0.28}{2017/04/09}{Added boolean \progcode{HTMLMarkFloats}, changed % to \progcode{WPMarkFloats} as of v0.42.} % % \begin{macrocode} \newbool{WPMarkFloats} \boolfalse{WPMarkFloats} % \end{macrocode} % \DescribeBoolean{WPMarkMinipages} \DescribeDefault{false} % \changes{v0.42}{2017/10/18}{Added boolean \progcode{WPMarkMinipages}.} % \describeWPMarkMinipages % \begin{macrocode} \newbool{WPMarkMinipages} \boolfalse{WPMarkMinipages} % \end{macrocode} % \DescribeBoolean{WPMarkTOC} \DescribeDefault{true} % \changes{v0.42}{2017/10/18}{Added boolean \progcode{WPMarkTOC}.} % \describeWPMarkTOC % \begin{macrocode} \newbool{WPMarkTOC} \booltrue{WPMarkTOC} % \end{macrocode} % \DescribeBoolean{WPMarkLOFT} \DescribeDefault{false} % \changes{v0.42}{2017/10/19}{Added boolean \progcode{WPMarkLOFT}.} % \describeWPMarkLOFT % \begin{macrocode} \newbool{WPMarkLOFT} \boolfalse{WPMarkLOFT} % \end{macrocode} % \DescribeBoolean{WPMarkMath} \DescribeDefault{false} % \changes{v0.42}{2017/10/19}{Added boolean \progcode{WPMarkMath}.} % \describeWPMarkMath % \begin{macrocode} \newbool{WPMarkMath} \boolfalse{WPMarkMath} % \end{macrocode} % \DescribeBoolean{WPTitleHeading} \DescribeDefault{false} % \changes{v0.42}{2017/10/19}{Added boolean \progcode{WPTitleHeading}.} % \describeWPTitleHeading % \begin{macrocode} \newbool{WPTitleHeading} \boolfalse{WPTitleHeading} % \end{macrocode} % \begin{macrocode} \end{warpall} % \end{macrocode} % % \subsection{Heading adjustments} % % \changes{v0.42}{2017/10/19}{If \progcode{FormatWP}, % shift section headings.} % If formatting the \HTML\ for a word processor, adjust heading levels. % % If |WPTitleHeading| is true, adjust so that |part| is \UI{Heading~1}. % % If |WPTitleHeading| is false, use \element{h1} for the title, % and set |part| to \UI{Heading~2}. % % % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} % % \changes{v0.895}{2021/01/14}{Improved \HTML\ quotes.} % \begin{macrocode} \AtBeginDocument{ \ifbool{FormatWP}{ \@ifundefined{chapter}{ \ifbool{WPTitleHeading}{% part and section starting at h2 \renewcommand*{\LWR@tagtitle}{h1} \renewcommand*{\LWR@tagtitleend}{/h1} \renewcommand*{\LWR@tagpart}{h2} \renewcommand*{\LWR@tagpartend}{/h2} \renewcommand*{\LWR@tagsection}{h3} \renewcommand*{\LWR@tagsectionend}{/h3} \renewcommand*{\LWR@tagsubsection}{h4} \renewcommand*{\LWR@tagsubsectionend}{/h4} \renewcommand*{\LWR@tagsubsubsection}{h5} \renewcommand*{\LWR@tagsubsubsectionend}{/h5} \renewcommand*{\LWR@tagparagraph}{h6} \renewcommand*{\LWR@tagparagraphend}{/h6} \renewcommand*{\LWR@tagsubparagraph}{span class=\textquotedbl{}subparagraph\textquotedbl} \renewcommand*{\LWR@tagsubparagraphend}{/span} }% WPTitleHeading {% not WPTitleHeading, part and section starting at h1 \renewcommand*{\LWR@tagtitle}{div class=\textquotedbl{}title\textquotedbl} \renewcommand*{\LWR@tagtitleend}{/div} \renewcommand*{\LWR@tagpart}{h1} \renewcommand*{\LWR@tagpartend}{/h1} \renewcommand*{\LWR@tagsection}{h2} \renewcommand*{\LWR@tagsectionend}{/h2} \renewcommand*{\LWR@tagsubsection}{h3} \renewcommand*{\LWR@tagsubsectionend}{/h3} \renewcommand*{\LWR@tagsubsubsection}{h4} \renewcommand*{\LWR@tagsubsubsectionend}{/h4} \renewcommand*{\LWR@tagparagraph}{h5} \renewcommand*{\LWR@tagparagraphend}{/h5} \renewcommand*{\LWR@tagsubparagraph}{h6} \renewcommand*{\LWR@tagsubparagraphend}{/h6} }% not WPTitleHeading }% chapter undefined {% chapter defined \ifbool{WPTitleHeading}{} {% not WPTitleHeading, part and chapter starting at h1 \renewcommand*{\LWR@tagtitle}{div class=\textquotedbl{}title\textquotedbl} \renewcommand*{\LWR@tagtitleend}{/div} \renewcommand*{\LWR@tagpart}{h1} \renewcommand*{\LWR@tagpartend}{/h1} \renewcommand*{\LWR@tagchapter}{h2} \renewcommand*{\LWR@tagchapterend}{/h2} \renewcommand*{\LWR@tagsection}{h3} \renewcommand*{\LWR@tagsectionend}{/h3} \renewcommand*{\LWR@tagsubsection}{h4} \renewcommand*{\LWR@tagsubsectionend}{/h4} \renewcommand*{\LWR@tagsubsubsection}{h5} \renewcommand*{\LWR@tagsubsubsectionend}{/h5} \renewcommand*{\LWR@tagparagraph}{h6} \renewcommand*{\LWR@tagparagraphend}{/h6} \renewcommand*{\LWR@tagsubparagraph}{span class=\textquotedbl{}subparagraph\textquotedbl} \renewcommand*{\LWR@tagsubparagraphend}{/span} }% not WPTitleHeading }% chapter defined }{}% FormatWP }% AtBeginDocument % \end{macrocode} % \begin{macrocode} \end{warpHTML} % \end{macrocode} % \section{Remembering original formatting macros} % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} % Remember original definitions of formatting commands. % Will be changed to \HTML\ commands for most uses. % Will be temporarily restored to original meaning inside any \env{lateximage} environment % and inside a \env{tabbing} environment. % Also nullify unused commands. % % Some packages redefine \cs{\#}, which is used to generate \HTML, so the original must % be remembered here. % \changes{v0.51}{2018/03/12}{Fix: Remember original \cs{\#} in case is redefined.} % \changes{v0.72}{2019/05/24}{Use \cs{LWR@formatted} for \cs{bfseries}, etc.} % \changes{v0.913}{2023/12/09}{Added \cs{nobreakspace}.} % \begin{macrocode} \chardef\LWR@origpound=`\# % \end{macrocode} % \begin{macrocode} \let\LWR@origcomma\, \LetLtxMacro\LWR@origtilde~ \LetLtxMacro\LWR@orignobreakspace\nobreakspace \let\LWR@orighfil\hfil \let\LWR@orighss\hss \let\LWR@origllap\llap \let\LWR@origrlap\rlap \let\LWR@orighfilneg\hfilneg \let\LWR@orighspace\hspace \let\LWR@origrule\rule \let\LWR@origmedskip\medskip \let\LWR@origbigskip\bigskip % \end{macrocode} % % \pkg{libertinus-otf} has too much kerning for \cs{textquotedbl}, % causing an extra space. % \changes{v0.895}{2021/01/14}{Fixed \pkg{libertinus-otf} \cs{textquotedbl} kern.} % \begin{macrocode} \LetLtxMacro\LWR@orig@@textquotedbl\textquotedbl \LetLtxMacro\LWR@orig@textquotedbl\LWR@orig@@textquotedbl \AtEndPreamble{ \IfPackageLoadedTF{libertinus-otf}{ \renewcommand{\LWR@orig@textquotedbl}{\LWR@orig@@textquotedbl\kern-.15em} \LetLtxMacro\textquotedbl\LWR@orig@textquotedbl }{} } % \end{macrocode} % \begin{macrocode} \LetLtxMacro\LWR@origttfamily\ttfamily \LetLtxMacro\LWR@origem\em \LetLtxMacro\LWR@orignormalfont\normalfont \let\LWR@origonecolumn\onecolumn \let\LWR@origsp\sp \let\LWR@origsb\sb \LetLtxMacro\LWR@origunderline\underline % \end{macrocode} % % \begin{macrocode} \let\LWR@orignewpage\newpage \let\LWR@origpagestyle\pagestyle \let\LWR@origthispagestyle\thispagestyle \LetLtxMacro\LWR@origpagenumbering\pagenumbering \let\LWR@orignewline\newline \AtBeginDocument{% in case packages change definition \let\LWR@orig@trivlist\@trivlist \let\LWR@origtrivlist\trivlist \let\LWR@origendtrivlist\endtrivlist \LetLtxMacro\LWR@origitem\item \LetLtxMacro\LWR@origitemize\itemize \LetLtxMacro\LWR@endorigitemize\enditemize \LetLtxMacro\LWR@origenumerate\enumerate \LetLtxMacro\LWR@endorigenumerate\endenumerate \LetLtxMacro\LWR@origdescription\description \LetLtxMacro\LWR@endorigdescription\enddescription \let\LWR@orig@mklab\@mklab \let\LWR@origmakelabel\makelabel \let\LWR@orig@donoparitem\@donoparitem \LetLtxMacro\LWR@orig@item\@item \let\LWR@orig@nbitem\@nbitem } \let\LWR@origpar\par \LetLtxMacro\LWR@origfootnote\footnote \let\LWR@orig@mpfootnotetext\@mpfootnotetext \AtBeginDocument{% in case packages change definition \LetLtxMacro\LWR@orighline\hline% \LetLtxMacro\LWR@origcline\cline% } % \end{macrocode} % \begin{macrocode} \end{warpHTML} % \end{macrocode} % \section{Accents} % % \limitsaccents % % \changes{v0.37}{2017/08/18}{\protect\LaTeX\ accents: Added.} % \changes{v0.84}{2020/04/12}{\protect\LaTeX\ accents: Add'l symbols.} % % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} % % % Without \cs{AtBeginDocument}, \cs{t} was being re-defined somewhere. % \begin{macrocode} \AtBeginDocument{ % \end{macrocode} % The following are restored for print when inside a \env{lateximage}. % % For Unicode engines, only \cs{t} needs to be redefined: % \begin{macrocode} \LetLtxMacro\LWR@origtie\t % \end{macrocode} % For \pdfLaTeX, additional work is required: % \begin{macrocode} \ifPDFTeX% pdflatex or dvi latex \LetLtxMacro\LWR@origgraveaccent\` \LetLtxMacro\LWR@origacuteaccent\' \LetLtxMacro\LWR@origcircumflexaccent\^ \LetLtxMacro\LWR@origtildeaccent\~ \LetLtxMacro\LWR@origmacronaccent\= \LetLtxMacro\LWR@origbreve\u \LetLtxMacro\LWR@origdotaccent\. \LetLtxMacro\LWR@origdiaeresisaccent\" \LetLtxMacro\LWR@origdoubleacuteaccent\H \LetLtxMacro\LWR@origcaronaccent\v \LetLtxMacro\LWR@origdotbelowaccent\d \LetLtxMacro\LWR@origcedillaaccent\c \LetLtxMacro\LWR@origmacronbelowaccent\b % \end{macrocode} % The \HTML\ redefinitions follow. % % For \pdfLaTeX, Unicode diacritical marks are used: % \begin{macrocode} \renewcommand*{\`}[1]{#1\HTMLunicode{0300}} \renewcommand*{\'}[1]{#1\HTMLunicode{0301}} \renewcommand*{\^}[1]{#1\HTMLunicode{0302}} \renewcommand*{\~}[1]{#1\HTMLunicode{0303}} \renewcommand*{\=}[1]{#1\HTMLunicode{0304}} \renewcommand*{\u}[1]{#1\HTMLunicode{0306}} \renewcommand*{\.}[1]{#1\HTMLunicode{0307}} \renewcommand*{\"}[1]{#1\HTMLunicode{0308}} \renewcommand*{\H}[1]{#1\HTMLunicode{030B}} \renewcommand*{\v}[1]{#1\HTMLunicode{030C}} \renewcommand*{\d}[1]{#1\HTMLunicode{0323}} \renewcommand*{\c}[1]{#1\HTMLunicode{0327}} \renewcommand*{\b}[1]{#1\HTMLunicode{0331}} \fi % \end{macrocode} % For all engines, a Unicode diacritical tie is used: % \begin{macrocode} \def\LWR@t#1#2{#1\HTMLunicode{0361}#2} \renewcommand*{\t}[1]{\LWR@t#1} % \end{macrocode} % % \begin{macro}{\LWR@restoreorigaccents} % Called from \cs{restoreoriginalformatting} when a \env{lateximage} is begun. % \begin{macrocode} \ifPDFTeX% pdflatex or dvi latex \newcommand*{\LWR@restoreorigaccents}{% \LetLtxMacro\`\LWR@origgraveaccent% \LetLtxMacro\'\LWR@origacuteaccent% \LetLtxMacro\^\LWR@origcircumflexaccent% \LetLtxMacro\~\LWR@origtildeaccent% \LetLtxMacro\=\LWR@origmacronaccent% \LetLtxMacro\u\LWR@origbreve% \LetLtxMacro\.\LWR@origdotaccent% \LetLtxMacro\"\LWR@origdiaeresisaccent% \LetLtxMacro\H\LWR@origdoubleacuteaccent% \LetLtxMacro\v\LWR@origcaronaccent% \LetLtxMacro\t\LWR@origtie% \LetLtxMacro\d\LWR@origdotbelowaccent% \LetLtxMacro\c\LWR@origcedillaaccent% \LetLtxMacro\b\LWR@origmacronbelowaccent% }% \else% XeLaTeX, LuaLaTeX: \newcommand*{\LWR@restoreorigaccents}{% \LetLtxMacro\t\LWR@origtie% }% \fi% }% AtBeginDocument % \end{macrocode} % \end{macro} % % % % \begin{macrocode} \end{warpHTML} % \end{macrocode} % \section{Configuration files} % \changes{v0.20}{2016/12/20}{\pkg{lwarp-newproject}: Added.} % \changes{v0.30}{2017/04/27}{\pkg{lwarp-newproject} removed, and combined with \pkg{lwarp}.} % \subsection{Decide whether to generate configuration files} % Configuration files are only written if processing the print version of the document, % and not processing a \pkg{pstool} image. % \pkg{pstool} uses an additional compile for each image using the original % document's preamble, which includes \pkg{lwarp}, so the \pkg{lwarp} % configuration files are turned off if \filenm{-pstool} is part of the \cs{jobname}. % % Default to no configuration files: % \changes{v0.61}{2018/10/02}{Don't write configuration files if processing \pkg{pstool} image.} % \begin{macrocode} \LWR@excludecomment{LWRwriteconf}{writeconf} % \end{macrocode} % % Generate configuration files if print mode and not \filenm{-pstool}: % % \codeprint % \begin{macrocode} \begin{warpprint} \fullexpandarg% \IfSubStr*{\jobname}{-pstool} { \PackageInfo{lwarp}{% Jobname with -pstool is found.\MessageBreak Not generating lwarp configuration files,% } } { \PackageInfo{lwarp}{Generating lwarp configuration files,}% \LWR@includecomment{LWRwriteconf}{writeconf} } \end{warpprint} % \end{macrocode} % \subsection{\filenm{_html.tex}} % % \DescribeFile{*_html.tex} Used to allow an \HTML\ version of the % document to exist alongside the print version. % % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} \immediate\openout\LWR@quickfile=\jobname_html.tex \immediate\write\LWR@quickfile{% \detokenize{\PassOptionsToPackage}% {warpHTML,BaseJobname=\jobname}{lwarp}% } \immediate\write\LWR@quickfile{% \detokenize{\input}\string{\jobname.tex\string }% } \immediate\closeout\LWR@quickfile \end{LWRwriteconf} % \end{macrocode} % \subsection{\prog{lwarpmk} configuration files} % ^^A *lwarpmk.conf % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} % \end{macrocode} % \begin{macro}{\LWR@lwarpconfversion} % The version number of the configuration file, allowing \prog{lwarpmk} to detect % an obsolete configuration file format. % Incremented by one each time the configuration file format changes. % (This is NOT the same as the \pkg{lwarp} version number.) % \begin{macrocode} \newcommand*{\LWR@lwarpconfversion}{2}% also in lwarpmk.lua % \end{macrocode} % \end{macro} % % % % \subsubsection{Helper macros} % % \begin{macro}{\LWR@shellescapecmd} % The LaTeX compile option for shell escape, if used. % \begin{macrocode} \ifshellescape \def\LWR@shellescapecmd{--shell-escape } \else \def\LWR@shellescapecmd{} \fi % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@compilecmd} \marg{engine} \marg{suffix} % % Used to form the basic compilation command for a document, adding % the optional shell escape. % % Engine is \prog{pdflatex}, etc. Suffix is empty or \filenm{_html} % \begin{macrocode} \newcommand*{\LWR@compilecmd}[2]{% #1 \LWR@shellescapecmd \jobname#2% } % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@addcompilecmd} \marg{cmd} \marg{suffix} % % Adds to the compilation command. % % Cmd is \prog{dvipdfmx}, etc. Suffix is empty or \filenm{_html} % \changes{v0.61}{2018/10/06}{Removed spaces.} % \begin{macrocode} \newcommand*{\LWR@addcompilecmd}[2]{% \LWRopseq #1 \jobname#2% } % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@unknownengine} % Error message if not sure which \LaTeX\ engine is being used. % \begin{macrocode} \newcommand*{\LWR@unknownengine}{% \PackageError{lwarp}% {Unknown LaTeX engine}% {% Lwarp only knows about pdflatex, DVI latex, xelatex, lualatex, and upLateX.% }% } % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@latexmkvar} \marg{varname} \marg{value} % % Adds a \prog{latexmk} variable assignment. % \begin{macrocode} \newcommand*{\LWR@latexmkvar}[2]{% -e \LWRopquote% \LWRdollar #1=q/#2/% \LWRopquote } % \end{macrocode} % \end{macro} % % \begin{macro}{\LWR@latexmkcmd} \marg{\prog{latexmk} options} % % Sets a call to \prog{latexmk} with the given options, possibly adding % \optn{-\/-shell-escape}, and also adding the indexing program. % \changes{v0.59}{2018/09/05}{Fix: \optn{-\/-shell-escape} with \prog{latexmk}.} % \begin{macrocode} \newcommand*{\LWR@latexmkcmd}[1]{% latexmk \space \LWR@shellescapecmd \space #1 \space -recorder \space \LWR@latexmkvar{makeindex}{\LWR@LatexmkIndexCmd}% } % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@latexmkdvipdfm} \marg{\prog{dvipdfm} or \prog{dvipdfmx}} % % Adds the options settings for \prog{dvipdfm} or \prog{dvipdfmx}. % \begin{macrocode} \newcommand*{\LWR@latexmkdvipdfm}[1]{% -pdfdvi \space \LWR@latexmkvar{dvipdf}{% #1 \@percentchar O -o \@percentchar D \@percentchar S% } } % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@compileuplatex} % Sets compile options for up\LaTeX\ with \pkg{ujarticle} or related classes. % \changes{v0.63}{2018/11/25}{Added.} % \begin{macrocode} \newcommand*{\LWR@compileuplatex}{ \def\LWR@tempprintlatexcmd{% \LWR@compilecmd{uplatex}{} \LWR@addcompilecmd{dvipdfmx}{} } \def\LWR@tempHTMLlatexcmd{% \LWR@compilecmd{uplatex}{_html} \LWR@addcompilecmd{dvipdfmx}{_html} } } % \end{macrocode} % \end{macro} % % % % \begin{macro}{\LWR@PrintLatexCmd} % \begin{macro}{\LWR@HTMLLatexCmd} % % If not set by the user, % the following sets the command to use to compile the source to \PDF\ form. % % If using \prog{latexmk}, a complicated string is created, % eventually resulting in something such as: % % For \prog{xelatex} with \optn{-\/-shell-escape}: % \begin{Verbatim}[tabsize=4,gobble=2,frame=lines] % [[latexmk -xelatex --shell-escape -recorder % -e '$makeindex = q/makeindex -s lwarp.ist/' _html]] % \end{Verbatim} % % For \prog{dvipdfmx}: % \begin{Verbatim}[tabsize=4,gobble=2,frame=lines] % [[latexmk -pdfdvi -e '$dvipdf=q/dvipdfmx %O -o %D %S/' % -recorder % -e '$makeindex=q/makeindex -s lwarp.ist/' _html]] % \end{Verbatim} % % For the following, temporary values are computed, but the permanent % values are only set if the originals were not assigned by the user. % \begin{macrocode} \ifbool{LWR@latexmk}{ % \end{macrocode} % For \prog{latexmk} with \prog{pdflatex} or \prog{lualatex}: % \begin{macrocode} \ifpdf % \end{macrocode} % For \prog{latexmk} with \prog{pdflatex}: % \begin{macrocode} \ifPDFTeX \def\LWR@latexcmd{\LWR@latexmkcmd{-pdf -dvi- -ps-}} \else % \end{macrocode} % For \prog{latexmk} with \prog{lualatex}: % \begin{macrocode} \ifLuaTeX \def\LWR@latexcmd{\LWR@latexmkcmd{-lualatex}} \else \LWR@unknownengine \fi \fi \else% \ifpdf % \end{macrocode} % For \prog{latexmk} with \prog{xelatex} or \DVI\ \prog{latex}: % \begin{macrocode} \ifXeTeX % \end{macrocode} % For \prog{latexmk} with \prog{xelatex}: % \begin{macrocode} \def\LWR@latexcmd{\LWR@latexmkcmd{-xelatex}} \else% \ifXeTeX % \end{macrocode} % For \prog{latexmk} with \DVI\ \prog{latex}: % \begin{macrocode} \ifbool{LWR@dvipdfm}{ \def\LWR@latexcmd{% \LWR@latexmkcmd{% \LWR@latexmkdvipdfm{dvipdfm}% } } }{ \ifbool{LWR@dvipdfmx}{ \def\LWR@latexcmd{% \LWR@latexmkcmd{% \LWR@latexmkdvipdfm{dvipdfmx}% } } }{ \def\LWR@latexcmd{\LWR@latexmkcmd{-pdfps}} } } \fi \fi% \ifpdf % \end{macrocode} % The final assignment if \prog{latexmk}: % \begin{macrocode} \def\LWR@tempprintlatexcmd{\LWR@latexcmd \space \jobname} \def\LWR@tempHTMLlatexcmd{\LWR@latexcmd \space \jobname_html} }% latexmk % \end{macrocode} % Without \prog{latexmk}, the compiling command is simply the compiler name % and the optional shell escape: % \begin{macrocode} {% not latexmk \ifpdf % \end{macrocode} % For \prog{pdflatex} or \prog{lualatex}: % \begin{macrocode} \ifPDFTeX % \end{macrocode} % For \prog{pdflatex}: % \begin{macrocode} \def\LWR@tempprintlatexcmd{\LWR@compilecmd{pdflatex}{}} \def\LWR@tempHTMLlatexcmd{\LWR@compilecmd{pdflatex}{_html}} \else \ifLuaTeX % \end{macrocode} % For \prog{lualatex}: % \begin{macrocode} \def\LWR@tempprintlatexcmd{\LWR@compilecmd{lualatex}{}} \def\LWR@tempHTMLlatexcmd{\LWR@compilecmd{lualatex}{_html}} \else \LWR@unknownengine \fi \fi \else% \ifpdf % \end{macrocode} % For \DVI\ \prog{latex} or \prog{xelatex}: % \begin{macrocode} \ifXeTeX % \end{macrocode} % For \prog{xelatex}: % \begin{macrocode} \def\LWR@tempprintlatexcmd{\LWR@compilecmd{xelatex}{}} \def\LWR@tempHTMLlatexcmd{\LWR@compilecmd{xelatex}{_html}} \else % \end{macrocode} % For \DVI\ \prog{latex}. Default to \prog{dvips}, unless % told to use \prog{dvipdfm} or \prog{dvipdfmx}: % \begin{macrocode} \ifbool{LWR@dvipdfm}{ % \end{macrocode} % For \DVI\ \prog{latex} with \prog{dvipdfm}: % \begin{macrocode} \def\LWR@tempprintlatexcmd{% \LWR@compilecmd{latex}{} \LWR@addcompilecmd{dvipdfm}{} } \def\LWR@tempHTMLlatexcmd{% \LWR@compilecmd{latex}{_html} \LWR@addcompilecmd{dvipdfm}{_html} } }{ \ifbool{LWR@dvipdfmx}{ % \end{macrocode} % For \DVI\ \prog{latex} with \prog{dvipdfmx}: % \begin{macrocode} \def\LWR@tempprintlatexcmd{% \LWR@compilecmd{latex}{} \LWR@addcompilecmd{dvipdfmx}{} } \def\LWR@tempHTMLlatexcmd{% \LWR@compilecmd{latex}{_html} \LWR@addcompilecmd{dvipdfmx}{_html} } }{% dvips % \end{macrocode} % For \DVI\ \prog{latex} with \prog{dvips} and \prog{ps2pdf}: % \changes{v0.903}{2021/10/04}{Allow transparency.} % \begin{macrocode} \def\LWR@tempprintlatexcmd{% \LWR@compilecmd{latex}{} \LWR@addcompilecmd{dvips}{} \LWR@addcompilecmd{ps2pdf -dALLOWPSTRANSPARENCY}{}.ps } \def\LWR@tempHTMLlatexcmd{% \LWR@compilecmd{latex}{_html} \LWR@addcompilecmd{dvips}{_html} \LWR@addcompilecmd{ps2pdf -dALLOWPSTRANSPARENCY}{_html}.ps } } } \fi% \ifXeTeX \fi% \ifpdf }% latexmk % \end{macrocode} % For \pkg{ujarticle}, \pkg{utarticle}, and related, using up\LaTeX\ and \prog{dvipdfmx}: % \changes{v0.63}{2018/11/25}{\pkg{ujarticle} and related: Compile options.} % \changes{v0.64}{2018/12/07}{\pkg{utarticle} and related: Added.} % \begin{macrocode} \IfClassLoadedTF{ujarticle}{\LWR@compileuplatex}{} \IfClassLoadedTF{ujbook}{\LWR@compileuplatex}{} \IfClassLoadedTF{ujreport}{\LWR@compileuplatex}{} \IfClassLoadedTF{utarticle}{\LWR@compileuplatex}{} \IfClassLoadedTF{utbook}{\LWR@compileuplatex}{} \IfClassLoadedTF{utreport}{\LWR@compileuplatex}{} % \end{macrocode} % Only make the setting permanent if the original was empty: % \changes{v0.61}{2018/09/20}{Added \optn{PrintLatexCmd} option.} % \changes{v0.61}{2018/09/20}{Added \optn{HTMLLatexCmd} option.} % \begin{macrocode} \ifdefempty{\LWR@PrintLatexCmd}{ \def\LWR@PrintLatexCmd{\LWR@tempprintlatexcmd} }{} \ifdefempty{\LWR@HTMLLatexCmd}{ \def\LWR@HTMLLatexCmd{\LWR@tempHTMLlatexcmd} }{} % \end{macrocode} % \end{macro} % \end{macro} % % % \begin{macro}{\LWR@writeconf} \marg{filename} % % Common code for each of \filenm{lwarpmk.conf} and \filenm{.lwarpmkconf}. % Each entry is a variable name, the equal sign, and a quoted string % inside |[[| and |]]|, which are \prog{lua}'s long quote characters, allowing the % use of single and double quotes inside. % % \changes{v0.59}{2018/08/21}{Compilation commands now preassigned by \pkg{lwarp} instead % of being computed by \prog{lwarpmk}.} % \changes{v0.66}{2019/01/27}{Added \optn{ImagesDirectory} and \optn{ImagesName}.} % \begin{macrocode} \newcommand{\LWR@writeconf}[1]{ \ifcsdef{LWR@quickfile}{}{\newwrite{\LWR@quickfile}} \immediate\openout\LWR@quickfile=#1 \immediate\write\LWR@quickfile{confversion = [[\LWR@lwarpconfversion]]} \ifbool{usingOSWindows}{ \immediate\write\LWR@quickfile{opsystem = [[Windows]]} }{ \immediate\write\LWR@quickfile{opsystem = [[Unix]]} } \immediate\write\LWR@quickfile{sourcename = [[\jobname]]} \immediate\write\LWR@quickfile{homehtmlfilename = [[\HomeHTMLFilename]]} \immediate\write\LWR@quickfile{htmlfilename = [[\HTMLFilename]]} \immediate\write\LWR@quickfile{imagesdirectory = [[\LWR@ImagesDirectory]]} \immediate\write\LWR@quickfile{imagesname = [[\LWR@ImagesName]]} \immediate\write\LWR@quickfile{latexmk = [[\ifbool{LWR@latexmk}{true}{false}]]} \immediate\write\LWR@quickfile{printlatexcmd = [[\LWR@PrintLatexCmd]]} \immediate\write\LWR@quickfile{HTMLlatexcmd = [[\LWR@HTMLLatexCmd]]} \immediate\write\LWR@quickfile{printindexcmd = [[\LWR@PrintIndexCmd]]} \immediate\write\LWR@quickfile{HTMLindexcmd = [[\LWR@HTMLIndexCmd]]} \immediate\write\LWR@quickfile{latexmkindexcmd = [[\LWR@LatexmkIndexCmd]]} \immediate\write\LWR@quickfile{glossarycmd = [[\LWR@GlossaryCmd]]} \immediate\write\LWR@quickfile{pdftotextenc = [[\LWR@pdftotextEnc]]} \immediate\closeout\LWR@quickfile } % \end{macrocode} % \end{macro} % \begin{macrocode} \end{LWRwriteconf} % \end{macrocode} % \subsubsection{\filenm{lwarpmk.conf}} % % \DescribeFile{lwarpmk.conf} % |lwarpmk.conf| is automatically (re-)created by the \pkg{lwarp} package when % executing\\ % \hspace*{2ex} |pdflatex |,\\ % or similar for \prog{xelatex} or \prog{lualatex}, in print-document generation mode, % which is the default unless the \optn{warpHTML} option is given. % |lwarpmk.conf| is then used by the utility \prog{lwarpmk}. % % \changes{v0.29}{2017/04/15}{\filenm{lwarpmk.conf}: Add: \optn{language} % option for config files.} % \changes{v0.54}{2018/04/06}{\filenm{lwarpmk.conf}: Option \optn{xdyFilename} changed to \optn{xindyStyle}.} % \changes{v0.54}{2018/04/06}{\filenm{lwarpmk.conf}: Option \optn{IndexLanguage} changed to \optn{xindyLanguage}.} % \changes{v0.54}{2018/04/06}{\filenm{lwarpmk.conf}: Option \optn{xindyCodepage} added.} % \changes{v0.54}{2018/04/06}{\filenm{lwarpmk.conf}: Option \optn{pdftotextEnc} added.} % \changes{v0.56}{2018/05/11}{\filenm{lwarpmk.conf}: Records \texttt{-\/-shell-escape}.} % \changes{v0.58}{2018/06/20}{\filenm{lwarpmk.conf}: Generated \cs{AtBeginDocument}.} % \changes{v0.58}{2018/06/20}{\filenm{lwarpmk.conf}: Added options \optn{makeindex} and \optn{xindy}.} % \changes{v0.58}{2018/06/21}{\filenm{lwarpmk.conf}: Added option \optn{makeindexstyle}.} % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} \AtBeginDocument{\LWR@writeconf{lwarpmk.conf}} \end{LWRwriteconf} % \end{macrocode} % \subsubsection{\filenm{.lwarpmkconf}} % % \DescribeFile{project.lwarpmkconf} A project-specific configuration file for \prog{lwarpmk}. % % \changes{v0.29}{2017/04/15}{\filenm{*.lwarpmkconf}: Add: \optn{language} % option for config files.} % \changes{v0.54}{2018/04/06}{\filenm{*.lwarpmkconf}: Option \optn{xdyFilename} changed to \optn{xindyStyle}.} % \changes{v0.54}{2018/04/06}{\filenm{*.lwarpmkconf}: Option \optn{IndexLanguage} changed to \optn{xindyLanguage}.} % \changes{v0.54}{2018/04/06}{\filenm{*.lwarpmkconf}: Option \optn{xindyCodepage} added.} % \changes{v0.54}{2018/04/06}{\filenm{*.lwarpmkconf}: Option \optn{pdftotextEnc} added.} % \changes{v0.56}{2018/05/11}{\filenm{*.lwarpmkconf}: Records \texttt{-\/-shell-escape}.} % \changes{v0.58}{2018/06/20}{\filenm{*.lwarpmkconf}: Generated \cs{AtBeginDocument}.} % \changes{v0.58}{2018/06/20}{\filenm{*.lwarpmkconf}: Added options \optn{makeindex} and \optn{xindy}.} % \changes{v0.58}{2018/06/21}{\filenm{*.lwarpmkconf}: Added option \optn{makeindexstyle}.} % The \optn{makeindex} and \optn{xindy} options have already been handled % for \filenm{lwarp.conf}. % % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} \AtBeginDocument{\LWR@writeconf{\jobname.lwarpmkconf}} \end{LWRwriteconf} % \end{macrocode} % \subsection{\filenm{lwarp.css}} % \DescribeFile{lwarp.css} % This is the base \CSS\ layer used by \pkg{lwarp}. % % This must be present both when compiling the project % and also when distributing the \HTML\ files. % % \changes{v0.26}{2017/03/30}{\filenm{lwarp.css}: Improved responsive % \attribute{marginpar} and \attribute{marginblock}.} % \changes{v0.30}{2017/04/26}{Fix: \filenm{*.css} files only written in print mode.} % \changes{v0.50}{2018/03/02}{\filenm{lwarp.css}: Improved \SVG\ display math centering.} % \changes{v0.54}{2018/04/24}{\filenm{lwarp.css}: Fix: Text-decoration-skip: auto.} % \changes{v0.56}{2018/04/27}{\filenm{lwarp.css}: Added \attribute{span.textbf}, etc.} % \changes{v0.56}{2018/05/09}{\filenm{lwarp.css}: Added \attribute{div.textbf}, etc.} % \changes{v0.57}{2018/05/21}{\filenm{lwarp.css}: Added ruled, boxed, boxruled floats.} % \changes{v0.57}{2018/05/21}{\filenm{lwarp.css}: Increased float vertical margins.} % \changes{v0.61}{2018/10/05}{\filenm{lwarp.css}: Footnotes text align left.} % \changes{v0.61}{2018/10/05}{\filenm{lwarp.css}: Minipage table and footnotes: tighter margin.} % \changes{v0.62}{2018/11/02}{\filenm{lwarp.css}: Reduced margins in titlepage.} % \changes{v0.62}{2018/11/02}{\filenm{lwarp.css}: Fixed \CSS\ for \cs{textup}.} % \changes{v0.62}{2018/11/02}{\filenm{lwarp.css}: Added \CSS\ for \pkg{xfrac}, \pkg{nicefrac}.} % \changes{v0.63}{2018/11/30}{\filenm{lwarp.css}: Added \CSS\ for vertical writing.} % \changes{v0.63}{2018/12/01}{\filenm{lwarp.css}: Improved \CSS\ for \pkg{mdframed}.} % \changes{v0.65}{2018/12/09}{\filenm{lwarp.css}: Improved \CSS\ for quotations.} % \changes{v0.65}{2018/12/09}{\filenm{lwarp.css}: Side\TOC to left for improved \cs{marginpar}s.} % \changes{v0.65}{2018/12/09}{\filenm{lwarp.css}: Added \cs{sishape}, \cs{textsi}.} % \changes{v0.65}{2018/12/18}{\filenm{lwarp.css}: Improved \CSS\ for page layout.} % \changes{v0.66}{2019/01/02}{\filenm{lwarp.css}: Improved \CSS\ for definition lists.} % \changes{v0.66}{2019/02/28}{\filenm{lwarp.css}: Added \pkg{niceframe}.} % \changes{v0.72}{2019/05/24}{\filenm{lwarp.css}: Added \pkg{backnaur}.} % \changes{v0.72}{2019/05/26}{\filenm{lwarp.css}: Removed unneeded support for \cs{sishape}, \cs{textsi}.} % \changes{v0.73}{2019/06/21}{\filenm{lwarp.css}: Added \cs{book} for \pkg{memoir}.} % \changes{v0.73}{2019/06/30}{\filenm{lwarp.css}: Improved pkg{tocdata} formatting.} % \changes{v0.74}{2019/08/04}{\filenm{lwarp.css}: Added \pkg{lyluatex}.} % \changes{v0.75}{2019/09/22}{\filenm{lwarp.css}: Improved marginblock.} % \changes{v0.76}{2019/10/02}{\filenm{lwarp.css}: Fix for small caps.} % \changes{v0.79}{2020/01/17}{\filenm{lwarp.css}: Fix: Nested \env{tabular}s.} % \changes{v0.81}{2020/02/22}{\filenm{lwarp.css}: Added \pkg{nolbreaks}.} % \changes{v0.84}{2020/03/28}{\filenm{lwarp.css}: Added \pkg{koma-*} subject.} % \changes{v0.84}{2020/04/10}{\filenm{lwarp.css}: Improved \pkg{realscripts}.} % \changes{v0.84}{2020/04/13}{\filenm{lwarp.css}: Improved \pkg{nfssext-cfr}.} % \changes{v0.84}{2020/04/18}{\filenm{lwarp.css}: Fix: Minipage tex align.} % \changes{v0.84}{2020/04/24}{\filenm{lwarp.css}: Fix: Top nav if narrow window.} % \changes{v0.88}{2020/07/04}{\filenm{lwarp.css}: Added \pkg{tcolorbox}, \pkg{thmbox}.} % \changes{v0.88}{2020/07/14}{\filenm{lwarp.css}: Added \optn{indexheading} for \pkg{gindex}.} % \changes{v0.893}{2020/10/18}{\filenm{lwarp.css}: Added \pkg{keystroke}.} % \changes{v0.894}{2020/12/15}{\filenm{lwarp.css}: \TeX\ logos no longer below baseline.} % \changes{v0.896}{2021/03/04}{\filenm{lwarp.css}: Added \element{main}, adjusted \element{sidetoccontainer} margin.} % \changes{v0.899}{2021/06/25}{\filenm{lwarp.css}: Improved \pkg{multicol}.} % \changes{v0.901}{2021/08/20}{\filenm{lwarp.css}: Tabular cell text alignment.} % \changes{v0.901}{2021/08/20}{\filenm{lwarp.css}: Improved captions.} % \changes{v0.902}{2021/09/15}{\filenm{lwarp.css}: Centered \element{div} \attribute{author}.} % \changes{v0.902}{2021/09/15}{\filenm{lwarp.css}: Added \pkg{beamerarticle}.} % \changes{v0.902}{2021/09/28}{\filenm{lwarp.css}: Added \attribute{textnormal}.} % \changes{v0.903}{2022/01/02}{\filenm{lwarp.css}: Improved pars in lists.} % \changes{v0.913}{2023/09/27}{\filenm{lwarp.css}: Improved \pkg{fancyvrb}.} % \changes{v0.913}{2023/09/27}{\filenm{lwarp.css}: Added complex number i,j format.} % % ^^A *lwarp.css % % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} \begin{filecontents*}[overwrite]{lwarp.css} /* CSS stylesheet for the LaTeX Lwarp package Copyright 2016-2022 Brian Dunn — BD Tech Concepts LLC */ /* a fix for older browsers: */ header, section, footer, aside, nav, main, article, figure { display: block; } A:link {color:#000080 ; text-decoration: none ; } A:visited {color:#800000 ; } A:hover {color:#000080 ; text-decoration: underline ;} A:active {color:#800000 ; } a.tocbook {display: inline-block ; margin-left: 0em ; font-weight: bold ; margin-top: 1ex ; margin-bottom: 1ex ; } a.tocpart {display: inline-block ; margin-left: 0em ; font-weight: bold ;} a.tocchapter {display: inline-block ; margin-left: 0em ; font-weight: bold ;} a.tocsection {display: inline-block ; margin-left: 1em ; text-indent: -.5em ; font-weight: bold ; } a.tocsubsection {display: inline-block ; margin-left: 2em ; text-indent: -.5em ; } a.tocsubsubsection {display: inline-block ; margin-left: 3em ; text-indent: -.5em ; } a.tocparagraph {display: inline-block ; margin-left: 4em ; text-indent: -.5em ; } a.tocsubparagraph {display: inline-block ; margin-left: 5em ; text-indent: -.5em ; } a.tocfigure {margin-left: 0em} a.tocsubfigure {margin-left: 2em} a.toctable {margin-left: 0em} a.tocsubtable {margin-left: 2em} a.toctheorem {margin-left: 0em} a.toclstlisting {margin-left: 0em} body { font-family: "DejaVu Serif", "Bitstream Vera Serif", "Lucida Bright", Georgia, serif; background: #FAF7F4 ; color: black ; margin:0em ; padding:0em ; font-size: 100% ; line-height: 1.2 ; } p {margin: 1.5ex 0em 1.5ex 0em ;} table p {margin: .5ex 0em .5ex 0em ;} /* Holds a section number */ span.sectionnumber { margin-right: 0em } /* Inserted in front of index lines */ span.indexitem {margin-left: 0em} span.indexsubitem {margin-left: 2em} span.indexsubsubitem {margin-left: 4em} div.indexheading {margin-top: 2ex ; font-weight: bold} div.hidden, span.hidden { display: none ; } kbd, span.texttt, p span.texttt { font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console", "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono", "Courier New", monospace; font-size: 100% ; } pre { padding: 3pt ; } span.strong, span.textbf, div.strong, div.textbf, table td.tdbfseries { font-weight: bold; } span.textit, div.textit, table td.tditshape { font-style: italic; } table td.tdbfit { font-weight: bold ; font-style:italic } span.textnormal, div.textnormal { font-weight: normal; font-style: normal; font-variant: normal; font-variant-numeric: normal ; font-family: "DejaVu Serif", "Bitstream Vera Serif", "Lucida Bright", Georgia, serif; } span.textmd, div.textmd { font-weight: normal; } span.textup, div.textup { font-style: normal; font-variant: normal; font-variant-numeric: normal ; } /* For complex number i,j symbols */ span.ijit {font-style: italic; font-variant: normal} span.ijup {font-style: normal; font-variant: normal} span.textsc, div.textsc { font-variant: small-caps; font-variant-numeric: oldstyle-nums ; } span.textulc, div.textulc { font-variant: normal ; font-variant-numeric: normal ; } span.textsl, div.textsl { font-style: oblique; } span.textrm, div.textrm { font-family: "DejaVu Serif", "Bitstream Vera Serif", "Lucida Bright", Georgia, serif; } span.textsf, div.textsf { font-family: "DejaVu Sans", "Bitstream Vera Sans", Geneva, Verdana, sans-serif ; } /* nfssext-cfr lining figures */ span.textln, div.textln { font-variant-numeric: lining-nums ; } /* nfssext-cfr proportional figures */ span.textp, div.textp { font-variant-numeric: proportional-nums ; } /* nfssext-cfr tabular figures */ span.textt, div.textt { font-variant-numeric: tabular-nums ; } /* nfssext-cfr font weights */ span.textdb, div.textdb { font-weight: 500 ; } span.textsb, div.textsb { font-weight: 600 ; } span.texteb, div.texteb { font-weight: 800 ; } span.textub, div.textub { font-weight: 900 ; } span.textlg, div.textlg { font-weight: 300 ; } span.textel, div.textel { font-weight: 200 ; } span.textul, div.textul { font-weight: 100 ; } span.textcircled { border: 1px solid black ; border-radius: 1ex ; } span.underline { text-decoration: underline ; text-decoration-skip: auto ; } span.overline { text-decoration: overline ; text-decoration-skip: auto ; } div.hrule { border-top: 1px solid silver } /* for vertical text: */ div.verticalrl { writing-mode: vertical-rl } div.horizontaltb { writing-mode: horizontal-tb } /* for diagbox */ div.diagboxtitleN { border-bottom: 1px solid gray } div.diagboxtitleS { border-top: 1px solid gray } div.diagboxE { padding-left: 2em ; text-align: right ; } div.diagboxW { padding-right: 2em ; text-align: left ; } /* For realscripts */ .supsubscript { display: inline-block; text-align:left ; } .supsubscript sup, .supsubscript sub { position: relative; display: block; font-size: .7em; line-height: 1; } .supsubscript sup { top: .3em; } .supsubscript sub { top: .3em; } div.attribution p { text-align: right ; font-size: 80% } span.poemtitle { font-size: 120% ; font-weight: bold; } pre.tabbing { font-family: "Linux Libertine Mono O", "Lucida Console", "Droid Sans Mono", "DejaVu Mono", "Bitstream Vera Mono", "Liberation Mono", "FreeMono", "Andale Mono", "Nimbus Mono L", "Courier New", monospace; } blockquote { display: block ; margin-left: 2em ; margin-right: 2em ; } /* quotchap is for the quotchap package */ div.quotchap { display: block ; font-style: oblique ; overflow-x: auto ; margin-left: 2em ; margin-right: 2em ; } blockquote p, div.quotchap p { line-height: 1.5; text-align: left ; font-size: .85em ; } /* qauthor is for the quotchap package */ div.qauthor { display: block ; text-align: right ; margin-left: auto ; margin-right: 2em ; font-size: 80% ; font-variant: small-caps; } div.qauthor p { text-align: right ; } div.epigraph, div.dictum { line-height: 1.2; text-align: left ; padding: 3ex 1em 0ex 1em ; /* margin: 3ex auto 3ex auto ; */ /* Epigraph centered */ margin: 3ex 1em 3ex auto ; /* Epigraph to the right */ /* margin: 3ex 1em 3ex 1em ; */ /* Epigraph to the left */ font-size: .85em ; max-width: 27em ; } div.epigraphsource, div.dictumauthor { text-align:right ; margin-left:auto ; /* max-width: 50% ; */ border-top: 1px solid #A0A0A0 ; padding-bottom: 3ex ; line-height: 1.2; } div.epigraph p, div.dictum p { padding: .5ex ; margin: 0ex ;} div.epigraphsource p, div.dictumauthor p { padding: .5ex 0ex 0ex 0ex ; margin: 0ex ;} div.dictumauthor { font-style:italic } /* copyrightbox package: */ div.copyrightbox { margin: .5ex .5em } div.copyrightbox p {margin: 0px .5em ; padding: 0px} div.copyrightboxnote {text-align: left ; font-size: 60%} /* lettrine package: */ span.lettrine { font-size: 4ex ; float: left ; } span.lettrinetext { font-variant: small-caps ; } /* ulem, soul, umoline packages: */ span.uline { text-decoration: underline ; text-decoration-skip: auto ; } span.uuline { text-decoration: underline ; text-decoration-skip: auto ; text-decoration-style: double ; } span.uwave { text-decoration: underline ; text-decoration-skip: auto ; text-decoration-style: wavy ; } span.sout { text-decoration: line-through ; } span.oline { text-decoration: overline ; text-decoration-skip: auto ; } span.xout { text-decoration: line-through ; } span.dashuline { text-decoration: underline ; text-decoration-skip: auto ; text-decoration-style: dashed ; } span.dotuline { text-decoration: underline ; text-decoration-skip: auto ; text-decoration-style: dotted ; } span.letterspacing { letter-spacing: .2ex ; } span.capsspacing { font-variant: small-caps ; letter-spacing: .1ex ; } span.highlight { background: #F8E800 ; } /* keystroke package: */ span.keystroke { border-style: outset ; padding: 0pt .5em 0pt .5em ; } html body { margin: 0 ; line-height: 1.2; } body div { margin: 0ex; } div.book, h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph { font-family: "Linux Libertine O", "Hoefler Text", "Garamond", "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, "Times New Roman", serif; font-style: normal ; font-weight: bold ; text-align: left ; } h1 { /* title of the entire website, used on each page */ text-align: center ; font-size: 2.5em ; padding: .4ex 0em 0ex 0em ; } div.book { text-align: center ; font-size: 2.325em ; padding: .4ex 0em 0ex 0em ; } h2 { font-size: 2.25em } h3 { font-size: 2em } h4 { font-size: 1.75em } h5 { font-size: 1.5em } h6 { font-size: 1.25em } span.paragraph {font-size: 1em ; font-variant: normal ; margin-right: 1em ; } span.subparagraph {font-size: 1em ; font-variant: normal ; margin-right: 1em ; } div.minisec { font-family: "DejaVu Sans", "Bitstream Vera Sans", Geneva, Verdana, sans-serif ; font-style: normal ; font-weight: bold ; text-align: left ; } h1 { margin: 0ex 0em 0ex 0em ; line-height: 1.3; text-align: center ; } h2 { margin: 1ex 0em 1ex 0em ; line-height: 1.3; text-align: center ; } h3 { margin: 3ex 0em 1ex 0em ; line-height: 1.3; } h4 { margin: 3ex 0em 1ex 0em ; line-height: 1.3; } h5 { margin: 3ex 0em 1ex 0em ; line-height: 1.3; } h6 { margin: 3ex 0em 1ex 0em ; line-height: 1.3; } div.titlepage { text-align: center ; } .footnotes { text-align: left ; font-size: .85em ; margin: 3ex 2em 0ex 2em ; border-top: 1px solid silver ; } .marginpar, .marginparblock { max-width: 50%; float: right ; clear: both ; text-align: left ; margin: 1ex 0.5em 1ex 1em ; padding: 1ex 0.5em 1ex 0.5em ; font-size: 85% ; border-top: 1px solid silver ; border-bottom: 1px solid silver ; overflow-x: auto ; } .marginpar br { margin-bottom: 2ex ; } div.marginblock, div.marginparblock { max-width:50%; min-width: 10em; /* room for caption */ float:right; text-align:left; margin: 1ex 0.5em 1ex 1em ; padding: 1ex 0.5em 1ex 0.5em ; overflow-x: auto; } div.marginblock div.minipage, div.marginparblock div.minipage { display: inline-block ; margin: 0pt auto 0pt auto ; } div.marginblock div.minipage p , div.marginparblock div.minipage p { font-size: 85%} div.marginblock br , div.marginparblock br { margin-bottom: 2ex ; } main.bodycontainer { float: left ; width: 80% ; } div.bodywithoutsidetoc main.bodycontainer { float: none ; width: 100% ; } section.textbody div.footnotes{ margin: 1ex 2em 2ex 2em ; border-bottom: 2px solid silver ; } .footnoteheader { border-top: 2px solid silver ; margin-top: 3ex ; padding-top: 1ex ; font-weight: bold ; } .mpfootnotes { text-align: left ; font-size: .85em ; margin-left: 1em ; border-top: 1px solid silver ; } /* Remove footnote top border in the title page. */ div.titlepage div.mpfootnotes { border-top: none ; } ul, ol { margin: 1ex 1em 1ex 0em; line-height: 1.2; } body dir, body menu { margin: 3ex 1em 3ex 0em; line-height: 1.2; } li { margin: 0ex 0em 1ex 0em; } li.p { display: inline ; } html { margin: 0; padding: 0; } .programlisting { font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console", "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono", "Courier New", monospace; margin: 1ex 0ex 1ex 0ex ; padding: .5ex 0pt .5ex 0pt ; overflow-x: auto; } section.textbody>pre.programlisting { border-top: 1px solid silver ; border-bottom: 1px solid silver ; } div.displaymath { text-align: center ; } div.displaymathnumbered { text-align: right ; margin-left: 5% ; margin-right: 5% ; min-width: 2.5in ; } @media all and (min-width: 400px) { div.displaymathnumbered { margin-left: 10% ; margin-right: 10% ; } } @media all and (min-width: 800px) { div.displaymathnumbered { margin-right: 20% ; } } @media all and (min-width: 1200px) { div.displaymathnumbered { margin-right: 30% ; } } .inlineprogramlisting { font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console", "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono", "Courier New", monospace; overflow-x: auto; } span.listinglabel { display: inline-block ; font-size: 70% ; width: 4em ; text-align: right ; margin-right: 2em ; } div.abstract { margin: 2em 5% 2em 5% ; padding: 1ex 1em 1ex 1em ; /* font-weight: bold ; */ font-size: 90% ; text-align: left ; } div.abstract dl {line-height:1.5;} div.abstract dt {color:#304070;} div.abstracttitle{ font-family: "URW Classico", Optima, "Linux Biolinum O", "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; font-weight:bold; font-size:1.25em; text-align: center ; } span.abstractrunintitle{ font-family: "URW Classico", Optima, "Linux Biolinum O", "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; font-weight:bold; } .verbatim { overflow-x: auto ; } .alltt { overflow-x: auto ; } .bverbatim { margin: 1ex 0pt 1ex 0pt ; padding: .5ex 0pt .5ex 0pt ; overflow-x: auto ; } .lverbatim { margin: 1ex 0pt 1ex 0pt ; padding: .5ex 0pt .5ex 0pt ; overflow-x: auto ; } .fancyvrb { margin: 3ex 0pt 3ex 0pt ; font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console", "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono", "Courier New", monospace; } .fancyvrblabel { font-size: .85em ; text-align: center ; font-weight: bold ; margin-top: 1ex ; margin-bottom: 1ex ; } .verse { font-family: "Linux Libertine Mono O", "Lucida Console", "Droid Sans Mono", "DejaVu Mono", "Bitstream Vera Mono", "Liberation Mono", "FreeMono", "Andale Mono", "Nimbus Mono L", "Courier New", monospace; margin-left: 1em ; } div.singlespace { line-height: 1.2 ; } div.onehalfspace { line-height: 1.5 ; } div.doublespace { line-height: 2 ; } /* Word processor format output: */ div.wpfigure { border: 1px solid red ; margin: .5ex ; padding: .5ex ; } div.wptable { border: 1px solid blue ; margin: .5ex ; padding: .5ex ; } div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;} /* Minipage environments, vertically aligned to top, center, bottom: */ .minipage, .fminipage, .fcolorminipage { /* display: inline-block ; */ /* Mini pages which follow each other will be tiled. */ text-align:left; margin: .25em .25em .25em .25em; padding: .25em .25em .25em .25em; display: inline-flex; flex-direction: column ; overflow: auto; } .inlineminipage { display: inline-block ; text-align: left } /* Paragraphs in the flexbox did not collapse their margins. */ /* Have not yet researched this. */ .minipage p {margin: .75ex 0em .75ex 0em ;} .fboxBlock .minipage, .colorbox .minipage, .colorboxBlock .minipage, .fcolorbox .minipage, .fcolorboxBlock .minipage {border: none ; background: none;} .fbox, .fboxBlock { border: 1px solid black ; padding: 4pt } .fbox, .fboxBlock, .fcolorbox, .fcolorboxBlock, .colorbox, .colorboxBlock, .fminipage, .fcolorminipage {display: inline-block} .shadowbox, .shabox { border: 1px solid black; box-shadow: 3px 3px 3px #808080 ; border-radius: 0px ; padding: .4ex .3em .4ex .3em ; margin: 0pt .3ex 0pt .3ex ; display: inline-block ; } .doublebox { border: 3px double black; border-radius: 0px ; padding: .4ex .3em .4ex .3em ; margin: 0pt .3ex 0pt .3ex ; display: inline-block ; } .ovalbox, .Ovalbox { border: 1px solid black; border-radius: 1ex ; padding: .4ex .3em .4ex .3em ; margin: 0pt .3ex 0pt .3ex ; display: inline-block ; } .Ovalbox { border-width: 2px ; } .framebox { border: 1px solid black; border-radius: 0px ; padding: .3ex .2em 0ex .2em ; margin: 0pt .1ex 0pt .1ex ; display: inline-block ; } /* mdframed, tcolorbox, shadebox packages */ .mdframed, .tcolorbox, .shadebox { padding: 0ex ; margin: 2ex 0em 2ex 0em ; border: 1px solid black ; } .tcolorbox { border-radius: 10pt ; margin: 2ex 1em 2ex 1em ; } .mdframed p, .tcolorbox p { padding: 0ex .5em 0ex .5em ; } .mdframed dl, .tcolorbox dl { padding: 1ex .5em 0ex .5em ; } .mdframedtitle, .tcolorboxtitle { padding: .5ex 0pt 0pt 0pt ; border-radius: 10pt 10pt 0pt 0pt ; display: block ; margin-bottom: 1ex ; border-bottom: 1px solid silver ; } .tcolorboxsubtitle .tcolorbox { margin: 2ex 0em 2ex 0em ; border-radius: 0pt ; } .mdframedsubtitle { display: block ; } .mdframedsubsubtitle { display: block ; } .mdtheorem { padding: 0ex .5em 0ex .5em ; margin: 3ex 5% 3ex 5% ; } /* framed package */ .framed, pre.boxedverbatim, fcolorbox { margin: 3ex 0em 3ex 0em ; border: 1px solid black; border-radius: 0px ; padding: .3ex 1em 0ex 1em ; display: block ; } .shaded { margin: 3ex 0em 3ex 0em ; padding: .3ex 1em .3ex 1em ; display: block ; } .snugframed { margin: 3ex 0em 3ex 0em ; border: 1px solid black; border-radius: 0px ; display: block ; } .framedleftbar { margin: 3ex 0em 3ex 0em ; border-left: 3pt solid black; border-radius: 0px ; padding: .3ex .2em .3ex 1em ; display: block ; } .framedtitle { margin: 0em ; padding: 0em ; font-size: 130% } .framedtitle p { padding: .3em } /* For the niceframe package: */ div.niceframe, div.curlyframe, div.artdecoframe, div.generalframe { padding: 1ex ; margin: 2ex auto ; border-radius: 2ex ; } div.niceframe { border: 6px groove black ; } div.curlyframe { border-left: 3px dotted black ; border-right: 3px dotted black ; border-radius: 6ex ; } div.artdecoframe { border-left: 10px double black ; border-right: 10px double black ; border-radius: 6ex ; } div.generalframe { border: 6px groove black ; } /* For beamerarticle: */ div.beamerframe { margin: 3ex 1em 3ex 1em ; border: 1px solid gray; border-radius: 0px ; padding: .3ex 1em 0ex 1em ; display: block ; } dl { margin: 1ex 2em 1ex 0em; line-height: 1.3; } dl dt { display: block ; float:left ; font-weight: bold; padding-right: 1em ; } dl dd { display: block ; } dl dd:after { content: "" ; display: block ; clear: both } dl dd p { margin-top: 0em; } dd ul, dd ol, dd dl { clear: both ; /* padding-top: 1ex ; */ } nav { font-family: "URW Classico", Optima, "Linux Biolinum O", "DejaVu Sans", "Bitstream Vera Sans", Geneva, Verdana, sans-serif ; margin-bottom: 4ex ; } nav p { line-height: 1.2 ; margin-top:.5ex ; margin-bottom:.5ex; font-size: .9em ; } img, img.hyperimage, img.borderimage { max-width: 600px; border: 1px solid silver; box-shadow: 3px 3px 3px #808080 ; padding: .5% ; margin: .5% ; background: none ; } img.inlineimage{ padding: 0px ; box-shadow: none ; border: none ; background: none ; margin: 0px ; display: inline-block ; border-radius: 0px ; } img.logoimage{ max-width: 300px ; box-shadow: 3px 3px 3px #808080 ; border: 1px solid black ; background:none ; padding:0 ; margin:.5ex ; border-radius: 10px ; } .section { /* To have each section float relative to each other: */ /* display: block ; float: left ; position: relative ; background: white ; border: 1px solid silver ; padding: .5em ; */ margin: 0ex .5em 0ex .5em ; padding: 0 ; } figure { margin: 5ex auto 5ex auto ; padding: 1ex 1em 1ex 1em ; overflow-x: auto ; } /* To automatically center images in figures: */ /* figure img.inlineimage { margin: 0ex auto 0ex auto ; display: block ; } */ /* To automatically center minipages in figures: */ /* figure div.minipage, figure div.minipage div.minipage { margin: 1ex auto 1ex auto ; display: block ; } */ figure figure { margin: 0pt } figure div.minipage p { font-size: 85% ; } figure.subfigure, figure.subtable { display: inline-block ; margin: 3ex 1em 3ex 1em ; } div.figurecaption .minipage { margin:0 ; padding: 0 } /* for subcaptions: */ figure div.minipage div.figurecaption { max-width: 100% ; /* fallback if min() does not work */ max-width: min(30em,100%) } div.minipage figure { border: none ; box-shadow: none ; } div.minipage figure.table { margin: 0ex } div.minipage div.footnotes { margin: 1ex 2em 0ex 2em } div.floatrow { text-align: center; } div.floatrow figure { display: inline-block ; margin: 1ex 2% ; } div.floatfoot { font-size: .85em ; border-top: 1px solid silver ; line-height: 1.2 ; } /* Center if only one line, "start" align if more than one line: */ div.figurecaption , .lstlistingtitle { font-size: .85em ; font-weight: bold ; text-align: start ; margin: 1ex auto; width: max-content; max-width: 100%; } /* A marginblock is small, so always center and don't mess with the width. */ div.marginblock div.figurecaption { width: 100% ; text-align: center ; } figure.subfigure div.figurecaption, figure.subtable div.figurecaption { border-bottom: none ; background: none ; } div.nonfloatcaption { margin: 1ex auto 1ex auto ; font-size: .85em ; text-align: center ; font-weight: bold ; } /* For a \RawCaption inside a minipage inside a figure's floatrow: */ figure div.floatrow div.minipage div.figurecaption { border: none ; background: none ; } /* For packages such as float, rotfloat, and algorithm2e: */ figure.boxed, figure.boxruled { border: 1px solid black ; } figure.ruled { border-top: 1px solid black ; border-bottom: 1px solid black ; border-left: 0px ; border-right: 0px ; border-radius: 0px ; background: none ; box-shadow: none ; } figure.ruled div.figurecaption, figure.boxruled div.figurecaption { border-top: 1px solid silver ; border-bottom: 1px solid silver ; } table { margin: 1ex auto 1ex auto ; border-collapse: separate ; border-spacing: 0px ; line-height: 1.3 ; } table > tbody > tr.hline > td {border-top: 1px solid #808080 ; margin-top: 0ex ; margin-bottom: 0ex ; } /* for \hline */ tr.tbrule td {border-top: 1px solid black ; margin-top: 0ex ; margin-bottom: 0ex ; } /* for \toprule, \bottomrule */ td {padding: .5ex .5em .5ex .5em ;} table td.tdl { text-align: left ; vertical-align: middle ; } table td.tdc { text-align: center ; vertical-align: middle ; } table td.tdat { text-align: center ; vertical-align: middle ; padding: 0px ; margin: 0px ; } table td.tdbang { text-align: center ; vertical-align: middle ; } table td.tdr { text-align: right ; vertical-align: middle ; } table td.tdp { text-align: left ; vertical-align: bottom ; } table td.tdm { text-align: left ; vertical-align: middle ; } table td.tdb { text-align: left ; vertical-align: top ; } table td.tvertbarl { border-left: 1px solid black } table td.tvertbarldouble { border-left: 4px double black } table td.tvertbarr { border-right: 1px solid black } table td.tvertbarrdouble { border-right: 4px double black } table td.tvertbarldash { border-left: 1px dashed black } table td.tvertbarldoubledash { border-left: 2px dashed black } table td.tvertbarrdash { border-right: 1px dashed black } table td.tvertbarrdoubledash { border-right: 2px dashed black } table td.tdcenter { text-align: center} table td.tdleft { text-align: left} table td.tdright { text-align: right} /* for cmidrules: */ table td.tdrule { border-top: 1px solid #A0A0A0 ; } table td.tdrulel { border-top-left-radius:.5em ; border-top: 1px solid #A0A0A0 ; } table td.tdruler { border-top-right-radius:.5em ; border-top: 1px solid #A0A0A0 ; } table td.tdrulelr { border-top-left-radius:.5em ; border-top-right-radius:.5em ; border-top: 1px solid #A0A0A0 ; } /* Margins of paragraphs inside table cells: */ td.tdp p , td.tdprule p , td.tdP p , td.tdPrule p { padding-top: 1ex ; padding-bottom: 1ex ; margin: 0ex ; } td.tdm p , td.tmbrule p , td.tdM p , td.tdMrule p { padding-top: 1ex ; padding-bottom: 1ex ; margin: 0ex ; } td.tdb p , td.tdbrule p , td.tdB p , td.tdBrule p { padding-top: 1ex ; padding-bottom: 1ex ; margin: 0ex ; } td.tdp , td.tdprule , td.tdP , td.tdPrule { padding: 0ex .5em 0ex .5em ; } td.tdm , td.tdmrule , td.tdM , td.tdMrule { padding: 0ex .5em 0ex .5em ; } td.tdb , td.tdbrule , td.tdB , td.tdBrule { padding: 0ex .5em 0ex .5em ; } /* table notes: */ .tnotes { margin: 0ex 5% 1ex 5% ; padding: 0.5ex 1em 0.5ex 1em; font-size:.80em; text-align: left ; } .minipage .tnotes { margin: 0pt ; padding: 0pt ; } .tnotes dl dt p {margin-bottom:0px;} .tnoteitemheader {margin-right: 1em;} /* for colortbl and cell color */ div.cellcolor { width: 100% ; padding: .5ex .5em .5ex .5em ; margin: -.5ex -.5em -.5ex -.5em ; } /* for lyluatex */ span.lyluatex { display: inline-block ; } div.lyluatex p span.lateximagesource img { display: block ; margin-top: 3ex ; margin-bottom: 3ex ; } /* for bigdelim */ .ldelim, .rdelim { font-size: 200% } /* center, flushleft, flushright environments */ div.center{text-align:center;} div.center table {margin-left:auto;margin-right:auto;} div.flushleft{text-align:left;} div.flushleft table {margin-left:0em ; margin-right:auto;} div.flushright{text-align:right;} div.flushright table {margin-left:auto ; margin-right: 0em ;} /* Fancybox */ div.Btrivlist table tr td { padding: .2ex 0em ; } /* program listing callouts: */ span.callout { font-family: "DejaVu Sans", "Bitstream Vera Sans", Geneva, Verdana, sans-serif ; border-radius: .5em; background-color:black; color:white; padding:0px .25em 0px .25em; margin: 0 ; font-weight: bold; font-size:.72em ; } div.programlisting pre.verbatim span.callout{ font-size: .85em ; } span.verbatim, span.verb { font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console", "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono", "Courier New", monospace; } div.titlehead { text-align: left ; font-style: normal ; font-weight: normal ; font-style: normal ; font-size: .8em ; margin: 1ex 0em 1ex 0em ; } div.subject { text-align: center ; font-style: normal ; font-weight: bold ; font-style: normal ; font-size: .8em ; margin: 1ex 0em 1ex 0em ; } div.published { text-align: center ; font-variant: normal ; font-style: italic ; font-size: 1em ; margin: 1ex 0em 1ex 0em ; } div.subtitle { text-align: center ; font-variant: normal ; font-style: italic ; font-size: 1.25em ; margin: 1ex 0em 1ex 0em ; } div.subtitle p { margin: 1ex ; } div.author { text-align: center ; font-variant: normal ; font-style: normal ; font-size: 1em ; margin: 1ex 0em 1ex 0em ; } div.oneauthor { display: inline-block ; margin: 0ex 1em 0ex 1em ; } /* div.author table { margin: 1ex auto 0ex auto ; background: none ; } div.author table tbody tr td { padding: .25ex ; } */ span.affiliation {font-size: .85em ; font-variant: small-caps; } div.titledate { text-align: center ; font-size: .85em ; font-style: italic; margin: 1ex 0em 1ex 0em ; } nav.topnavigation{ text-align: left ; padding: 0.5ex 1em 0.5ex 1em ; /* margin: 2ex 0em 3ex 0em ; */ margin: 0 ; border-bottom: 1px solid silver ; border-top: 1px solid silver ; clear:both ; } nav.botnavigation{ text-align: left ; padding: 0.5ex 1em 0.5ex 1em ; /* margin: 3ex 0em 2ex 0em ; */ margin: 0 ; border-top: 1px solid silver ; border-bottom: 1px solid silver ; clear:both ; } header { line-height: 1.2 ; font-size: 1em ; border-bottom: 1px solid silver ; margin: 0px ; padding: 2ex 1em 2ex 1em ; text-align:left ; } footer { font-size: .85em ; line-height: 1.2 ; margin-top: 1ex ; border-top: 1px solid silver ; padding: 2ex 1em 2ex 1em ; clear:both ; text-align:left ; } /* for \LinkHome, \LinkPrevious, and \LinkNext: */ a.linkhome { font-weight:bold ; font-size: 1em ;} div.lateximagesource { padding: 0px ; margin: 0px ; display: none; } img.lateximage{ padding: 0pt ; margin: 0pt ; box-shadow: none ; border: none ; background: none ; max-width: 100% ; border-radius: 0ex ; border: none ; } div.sidetoccontainer { font-family: "DejaVu Serif", "Bitstream Vera Serif", "Lucida Bright", Georgia, serif; float: left ; width: 19%; /* room for border-right next to 80% main */ margin: 0pt 0em 3ex 0pt ; border-right: 1px solid silver; border-bottom: 1px solid silver; background: #FAF7F4 ; font-size:.9em ; border-radius: 0px 0px 20px 0px ; } div.sidetoccontents { overflow-y: auto ; width: 100% ; text-align: left ; } nav.sidetoc p {line-height:1.2 ; margin: 1ex .5em 1ex .5em ; text-indent: 0 ; } nav.sidetoc p a {color:black ; font-size: .7em ;} div.sidetoctitle {font-size: 1.2em; font-weight:bold; text-align:center; border-bottom: 1px solid silver ; } nav.sidetoc a:hover {text-decoration: underline ; } section.textbody { margin: 0ex 1em 0ex 1em ;} div.multicolsheading { -webkit-column-span: all; -moz-column-span: all; column-span: all; } div.multicols { -webkit-columns: 3 auto ; -moz-columns: 3 auto ; columns: 3 auto ; } div.multicols p {margin-top: 0ex} /* Used for xfrac and nicefrac: */ span.numerator { font-size: 60% ; vertical-align: .4em ; } span.denominator { font-size: 60% } /* Used for algorithm2e: */ div.alg2evline{ margin-left: 1em ; padding-left: 1em ; border-left: 1px solid black ; border-radius: 0px 0px 0px 1ex ; } div.alg2evsline{ margin-left: 1em ; padding-left: 1em ; border-left: 1px solid black ; } div.alg2enoline{ margin-left: 1em ; padding-left: 1em ; } span.alg2elinenumber{ margin-right: .5em ; font-size: 60% ; color: red ; } /* Used for algorithmicx: */ span.floatright { float: right ; } /* keyfloat and tocdata: */ .floatnotes { margin: 0ex 5% 0ex 5% ; padding: 0ex 1em 0ex 1em ; font-size:.80em ; text-align: left ; } .authorartist{ display:block ; font-size:.70em ; font-style: italic; } nav .authorartist{ display:inline; } /* Native LaTeX theorems: */ .theoremcontents { font-style: italic; margin-top: 3ex ; margin-bottom: 3ex ; } .theoremlabel { font-style: normal; font-weight: bold ; margin-right: .5em ; } /* theorem, amsthm, and ntheorem packages */ span.theoremheader, span.theoremheaderplain, span.theoremheaderdefinition, span.theoremheaderbreak, span.theoremheadermarginbreak, span.theoremheaderchangebreak, span.theoremheaderchange, span.theoremheadermargin { font-style:normal ; font-weight: bold ; margin-right: 1em ; } span.amsthmnameplain, span.amsthmnamedefinition, span.amsthmnumberplain, span.amsthmnumberdefinition { font-style:normal ; font-weight: bold ; } span.amsthmnameremark, span.amsthmnumberremark {font-style:italic ; font-weight: normal ; } span.amsthmnoteplain, span.amsthmnotedefinition {font-style:normal ;} span.theoremheaderremark, span.theoremheaderproof, span.amsthmproofname {font-style:italic ; font-weight: normal ; margin-right: 1em ; } span.theoremheadersc { font-style:normal ; font-variant: small-caps ; font-weight: normal ; margin-right: 1em ; } .theoremendmark {float:right} div.amsthmbodyplain, div.theorembodyplain, div.theorembodynonumberplain, div.theorembodybreak, div.theorembodynonumberbreak, div.theorembodymarginbreak, div.theorembodychangebreak, div.theorembodychange, div.theorembodymargin { font-style:italic; margin-top: 3ex ; margin-bottom: 3ex ; } div.theorembodydefinition, div.theorembodyremark, div.theorembodyproof, div.theorembodyplainupright, nonumberplainuprightsc, div.amsthmbodydefinition, div.amsthmbodyremark, div.amsthmproof { font-style: normal ; margin-top: 3ex ; margin-bottom: 3ex ; } span.amsthmnoteremark {} /* thmbox */ .thmbox { font-style: italic; margin-top: 3ex ; margin-bottom: 3ex ; border: 1px solid gray ; padding: 1ex ; } .thmboxtitle { font-style: normal; font-weight: bold ; margin-right: .5em ; border-bottom: 1px solid gray ; } span.thmboxproofname, span.thmboxexamplename { font-weight: bold ; } div.thmboxproof, div.thmboxexample { font-size: 0.85em ; margin: 2ex ; } div.thmboxleftbar { border-left: 2px solid black ; padding-left: 1em ; } /* For the backnaur package: */ div.backnaur { display: block ; margin: 2ex 2em 2ex 2em ; } div.backnaur p { margin: .25ex 0ex .25ex 0ex ; } div.backnaurprod { display: inline-block ; min-width: 8em ; text-align:right ; } div.backnaurdesc { display: inline-block ; } /* For the notes package: */ div.notesimportantnote, div.noteswarningnote, div.notesinformationnote { clear: both ; margin: 2ex 2em 2ex 2em ; border: 1px solid silver ; } div.notesicon { float:left ; display: inline-block ; background: gold ; padding: 0ex 1em 0ex 1em ; margin-right: 1em ; font-weight: bold ; } div.notescontents { font-style: italic } /* nolbreaks package: */ span.nolbreaks { white-space: nowrap ; } /* For CSS LaTeX and related logos: Based on spacing demonstrated by the metafont package. The subscripts are shrunk instead of lowered below the baseline, to avoid browser rendering errors with the line height in lists, etc. */ .latexlogofont { font-family: "Linux Libertine O", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; font-variant: normal ; } .latexlogo { font-family: "Linux Libertine O", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; } .latexlogosup { text-transform: uppercase; letter-spacing: .03em ; font-size: 0.7em; vertical-align: 0.25em; margin-left: -0.4em; margin-right: -0.15em; } .latexlogosub { text-transform: uppercase; /* vertical-align: -0.27ex; */ margin-left: -0.08em; margin-right: -0.07em; /* font-size: 1em; */ font-size: .7em ; } .latexlogotwoe { text-transform: none ; font-variant-numeric: oldstyle-nums ; } .latexlogotwoesub { font-style:italic ; /* vertical-align: -0.27ex; */ margin-left: -0.11em; margin-right: -0.1em; /* font-size: 1em; */ font-size: .7em ; } .xelatexlogo { font-family: "Linux Libertine O", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; letter-spacing: .03em ; } .xelatexlogosub { /* vertical-align: -0.27ex; */ margin-left: -0.0667em; margin-right: -.05em; /* font-size: 1em; */ font-size: .7em ; letter-spacing: .03em ; } .amslogo { font-family: "TeXGyreChorus","URW Chancery L", "Apple Chancery","ITC Zapf Chancery","Monotype Corsiva", "Linux Libertine O", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif ; font-style: italic ; } .lyxlogo { font-family: "URW Classico", Optima, "Linux Biolinum O", "DejaVu Sans", "Bitstream Vera Sans", Geneva, Verdana, sans-serif ; } /* Only display top and bottom navigation if a small screen: */ /* Hide the sidetoc if a small screen: */ nav.topnavigation { display:none; } nav.botnavigation { display:none; } /* Only display the sidetoc's webpage title if a small screen */ span.sidetocthetitle { display: none } @media screen and (max-width: 100em) { div.multicols { -webkit-columns: 2 auto ; -moz-columns: 2 auto ; columns: 2 auto ; } } @media screen and (max-width: 50em) { div.sidetoccontainer { float: none ; width: 100% ; padding: 0 ; border-radius: 0 ; border-bottom: 1px solid black ; border-top: 1px solid black ; box-shadow: none ; } span.sidetocthetitle { display: inline } nav.topnavigation { display:block } nav.botnavigation { display:block } main.bodycontainer { width: 100% } .marginpar { max-width: 100%; float: none; display:block ; margin: 1ex 1em 1ex 1em ; } div.multicols { -webkit-columns: 1 auto ; -moz-columns: 1 auto ; columns: 1 auto ; } } @media print { body { font-family: "Linux Libertine O", "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; } div.sidetoccontainer { display:none; } nav.topnavigation { display: none; } nav.botnavigation { display: none; } main.bodycontainer { width: 100% } } @media handheld { div.sidetoccontainer { display:none; } nav.topnavigation { display:block } nav.botnavigation { display:block } main.bodycontainer { width: 100% } } @media projection { div.sidetoccontainer { display:none; } nav.topnavigation { display:block } nav.botnavigation { display:block } main.bodycontainer { width: 100% } } \end{filecontents*} % \end{Verbatim}% for syntax highlighting \end{LWRwriteconf} % \end{macrocode} % \subsection{\filenm{lwarp_sagebrush.css}} % \DescribeFile{lwarp_sagebrush.css} % 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 \HTML\ files. % % \changes{v0.65}{2018/12/09}{\filenm{lwarp_sagebrush.css}: Side\TOC to left for improved \cs{marginpar}s.} % \changes{v0.73}{2019/06/21}{\filenm{lwarp_formal.css}: Added \cs{book} for \pkg{memoir}.} % % ^^A *lwarp_sagebrush.css % % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} \begin{filecontents*}[overwrite]{lwarp_sagebrush.css} @import url("lwarp.css") ; A:link {color:#105030 ; text-decoration: none ; } A:visited {color:#705030 ; text-shadow:1px 1px 2px #a0a0a0;} A:hover {color:#006000 ; text-decoration: underline ; text-shadow:0px 0px 2px #a0a0a0;} A:active {color:#00C000 ; text-shadow:1px 1px 2px #a0a0a0;} div.book, h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph { font-family: "URW Classico", Optima, "Linux Biolinum O", "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; font-variant: small-caps ; font-weight: normal ; color: #304070 ; text-shadow: 2px 2px 3px #808080; } h1 { /* title of the entire website, used on each page */ font-variant: small-caps ; color: #304070 ; text-shadow: 2px 2px 3px #808080; background-color: #F7F7F0 ; background-image: linear-gradient(to bottom, #F7F7F0, #C0C0C4); } h1 { border-bottom: 1px solid #304070; /* border-top: 2px solid #304070; */ } h2 { border-bottom: 1px solid #304070; /* border-top: 2px solid #304070; */ background-color: #F7F7F0 ; background-image: linear-gradient(to bottom, #F7F7F0, #DAD0C0); } div.abstract { background: #f5f5eb ; background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8); border: 1px solid silver; border-radius: 1em ; } div.abstract dl {line-height:1.5;} div.abstract dt {color:#304070;} div.abstracttitle{ font-family: "URW Classico", Optima, "Linux Biolinum O", "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; font-weight:bold; font-variant: small-caps ; font-size:1.5em; border-bottom: 1px solid silver ; color: #304070 ; text-align: center ; text-shadow: 1px 1px 2px #808080; } span.abstractrunintitle{ font-family: "URW Classico", Optima, "Linux Biolinum O", "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; font-weight:bold; } div.epigraph, div.dictum { background: #f5f5eb ; background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8); border: 1px solid silver ; border-radius: 1ex ; box-shadow: 3px 3px 3px #808080 ; } .example { background-color: #f5f5eb ; background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8); } div.exampletitle{ font-family: "URW Classico", Optima, "Linux Biolinum O", "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; font-weight:bold; font-variant: small-caps ; border-bottom: 1px solid silver ; color: #304070 ; text-align: center ; text-shadow: 1px 1px 2px #808080; } .sidebar { background-color: #f5f5eb ; background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8); } div.sidebartitle{ font-family: "URW Classico", Optima, "Linux Biolinum O", "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; font-weight:bold; font-variant: small-caps ; border-bottom: 1px solid silver ; color: #304070 ; text-align: center ; text-shadow: 1px 1px 2px #808080; } .fancyvrblabel { font-family: "URW Classico", Optima, "Linux Biolinum O", "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; font-weight:bold; font-variant: small-caps ; font-size: 1.5em ; color: #304070 ; text-align: center ; text-shadow: 1px 1px 2px #808080; } div.minipage { background-color: #eeeee7 ; border: 1px solid silver ; border-radius: 1ex ; } table div.minipage { background: none ; border: none ; } div.framebox div.minipage {border:none ; background:none} section.textbody > div.minipage { box-shadow: 3px 3px 3px #808080 ; } div.fboxBlock div.minipage { box-shadow: none ; } .framed .minipage , .framedleftbar .minipage { border: none ; background: none ; padding: 0ex ; margin: 0ex ; } figure.figure .minipage, div.figurecaption .minipage { border: none; } div.marginblock div.minipage , div.marginparblock div.minipage { border: none; } figure , div.marginblock { background-color: #eeeee7 ; border: 1px solid silver ; border-radius: 1ex ; box-shadow: 3px 3px 3px #808080 ; } figure figure { border: 1px solid silver ; margin: 0em ; box-shadow: none ; } /* div.figurecaption { border-top: 1px solid silver ; border-bottom: 1px solid silver ; background-color: #e8e8e8 ; } */ div.table { box-shadow: 3px 3px 3px #808080 ; } /* .tnotes { background: #e8e8e8; border: 1px solid silver; } */ nav.topnavigation{ background-color: #b0b8b0 ; background-image: linear-gradient(to bottom,#e0e0e0,#b0b8b0) ; } nav.botnavigation{ background-color: #b0b8b0 ; background-image: linear-gradient(to top,#e0e0e0,#b0b8b0) ; } header{ background-color: #F7F7F0 ; background-image: linear-gradient(to top, #F7F7F0, #b0b8b0); } footer{ background-color: #F7F7F0 ; background-image: linear-gradient(to bottom, #F7F7F0, #b0b8b0); } div.sidetoccontainer { background-color: #F7F7F0 ; background-image: linear-gradient(to bottom, #F7F7F0, #C0C0C0); box-shadow: 3px 3px 3px #808080 ; } div.sidetoctitle {color: #304070 ; } nav.sidetoc a:hover { color:#006000 ; text-decoration: none ; text-shadow:0px 0px 2px #a0a0a0; } @media screen and (max-width: 45em) { div.sidetoccontainer { border-radius: 0 ; } } \end{filecontents*} % \end{Verbatim}% for syntax highlighting \end{LWRwriteconf} % \end{macrocode} % \subsection{\filenm{lwarp_formal.css}} % \DescribeFile{lwarp_formal.css} % 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 \HTML\ files. % % \changes{v0.62}{2018/11/10}{\filenm{lwarp_formal.css}: Fix: Font for verse.} % \changes{v0.65}{2018/12/09}{\filenm{lwarp_formal.css}: Side\TOC to left for improved \cs{marginpar}s.} % \changes{v0.66}{2019/01/02}{\filenm{lwarp_formal.css}: Improved \CSS\ for table notes.} % \changes{v0.73}{2019/06/21}{\filenm{lwarp_formal.css}: Added \cs{book} for \pkg{memoir}.} % % ^^A *lwarp_formal.css % % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} \begin{filecontents*}[overwrite]{lwarp_formal.css} @import url("lwarp.css") ; A:link {color:#802020 ; text-decoration:none; } A:visited {color:#802020 ; text-shadow:none ;} A:hover {color:#400000 ; text-shadow:none ;} A:active {color:#C00000 ; text-shadow:none ;} body { font-family: "Linux Libertine O", "Hoefler Text", "Garamond", "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, "Times New Roman", serif; background: #fffcf5; } span.textrm { font-family: "Linux Libertine O", "Hoefler Text", "Garamond", "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, "Times New Roman", serif; } span.textsf { font-family: "DejaVu Sans", "Bitstream Vera Sans", Geneva, Verdana, sans-serif ; } div.book, h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph { font-family: "Linux Libertine O", "Hoefler Text", "Garamond", "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, "Times New Roman", serif; color: #800000 ; text-shadow: none ; } h1, h2 { background-color: #fffcf5 ; background-image: none ; border-bottom: 1px solid #808080; /* border-top: 2px solid #808080; */ } div.abstracttitle { font-family: "Linux Libertine O", "Hoefler Text", "Garamond", "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, "Times New Roman", serif; color: black ; text-shadow: none ; } span.abstractrunintitle { font-family: "Linux Libertine O", "Hoefler Text", "Garamond", "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, "Times New Roman", serif; color: black ; text-shadow: none ; } div.abstract { font-size: 100% } .sidebar { background: #fffcf5; background-image: none ; margin: 2em 5% 2em 5%; padding: 0.5em 1em; border: none ; border-top : 1px solid silver; border-bottom : 1px solid silver; font-size: 90% ; } div.sidebartitle{ font-family: "Linux Libertine O", "Hoefler Text", "Garamond", "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, "Times New Roman", serif; color: #800000 ; text-shadow: none ; border: none ; } .example { background: #fffcf5; background-image: none ; margin: 2em 5% 2em 5%; padding: 0.5em 1em; border: none ; border-top : 1px solid silver; border-bottom : 1px solid silver; } div.exampletitle{ font-family: "Linux Libertine O", "Hoefler Text", "Garamond", "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, "Times New Roman", serif; color: #800000 ; text-shadow: none ; border: none ; } div.fancyvrblabel{ font-family: "Linux Libertine O", "Hoefler Text", "Garamond", "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, "Times New Roman", serif; color: #800000 ; text-shadow: none ; border: none ; } figure { margin: 5ex 5% 5ex 5% ; padding: 1ex 1em 1ex 1em ; background-color: #fffcf5 ; overflow-x: auto ; border: none ; /* border-top: 1px solid silver; */ /* border-bottom: 1px solid silver; */ } div.figurecaption , .lstlisting { border: none ; /* border-top: 1px solid silver ; */ /* border-bottom: 1px solid silver ; */ background-color: #fffcf5 ; } .tnotes { background: #fffcf5 ; border-top: 1px solid silver ; border-bottom: 1px solid silver ; } .theorem { background: none ; } .minipage { background-color: #fffcf5 ; border: none ; } div.floatrow figure { border: none ; } figure figure { border: none ; } nav.toc, nav.lof, nav.lot, nav.lol { font-family: "Linux Libertine O", "Hoefler Text", "Garamond", "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, "Times New Roman", serif; } div.sidetoccontainer { font-family: "Linux Libertine O", "Hoefler Text", "Garamond", "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, "Times New Roman", serif; background-image: linear-gradient(to bottom, #fffcf5, #C0C0C0); } div.sidetoctitle{ color: #800000 ; } header{ background-color: #e0e0e0 ; background-image: linear-gradient(to top, #fffcf5, #b0b0b0); text-align:center ; } footer{ background-color: #e0e0e0 ; background-image: linear-gradient(to bottom, #fffcf5, #b0b0b0); padding: 2ex 1em 2ex 1em ; text-align:left ; } nav.botnavigation { background: #dedcd5 ; border-top: 1px solid black ; } \end{filecontents*} % \end{Verbatim}% for syntax highlighting \end{LWRwriteconf} % \end{macrocode} % \subsection{\filenm{sample_project.css}} % \DescribeFile{sample_project.css} % The project-specific \CSS\ file. Use with \cs{CSSFilename}. % % If used, this must be present both when compiling the project % and also when distributing the \HTML\ files. % % ^^A *sample_project.css % % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} \begin{filecontents*}[overwrite]{sample_project.css} /* ( --- Start of project.css --- ) */ /* ( --- A sample project-specific CSS file for lwarp --- ) */ /* Uncomment one of the following: */ @import url("lwarp.css") ; /* @import url("lwarp_formal.css") ; */ /* @import url("lwarp_sagebrush.css") ; */ /* Project-specific CSS setting follow here. */ /* . . . */ /* ( --- End of project.css --- ) */ \end{filecontents*} % \end{Verbatim}% for syntax highlighting \end{LWRwriteconf} % \end{macrocode} % \subsection{\filenm{lwarp.ist}} % \DescribeFile{lwarp.ist} % Used to modify the index for \pkg{lwarp}. % % This must be present when compiling the project, % but does not need to be present when distributing % the resulting \HTML\ files. % % The page compositor line is for \pkg{memoir}'s \cs{specialindex}. % % \changes{v0.58}{2018/06/17}{\filenm{lwarp_html.ist}: Added.} % % ^^A *lwarp.ist % % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} \begin{filecontents*}[overwrite]{lwarp.ist} preamble "\\begin{theindex} \\providecommand*\\lettergroupDefault[1]{} \\providecommand*\\lettergroup[1]{% \\par\\textbf{#1}\\par \\nopagebreak } " headings_flag 1 heading_prefix " \\lettergroup{" heading_suffix "}" delim_0 ", \\hyperindexref{" delim_1 ", \\hyperindexref{" delim_2 ", \\hyperindexref{" delim_n "}, \\hyperindexref{" delim_r "} -- \\hyperindexref{" delim_t "}" page_compositor "." \end{filecontents*} % \end{Verbatim}% for syntax highlighting \end{LWRwriteconf} % \end{macrocode} % \subsection{\filenm{lwarp.xdy}} % \DescribeFile{lwarp.xdy} % Used to modify the index for \pkg{lwarp}. % % This must be present when compiling the project, % but does not need to be present when distributing % the resulting \HTML\ files. % % See: \\ % \href{https://tex.stackexchange.com/questions/80300/how-can-i-convince-hyperref-and-xindy-to-play-together-nicely} % {https://tex.stackexchange.com/questions/80300/ \\ \fqquad\ how-can-i-convince-hyperref-and-xindy-to-play-together-nicely} % % \changes{v0.30}{2017/04/28}{File: \filenm{lwarp_html.xdy} renamed to \filenm{lwarp.xdy}.} % \changes{v0.30}{2017/04/26}{Fix: \filenm{lwarp.xdy} only written in print mode.} % \changes{v0.58}{2018/06/19}{\filenm{lwarp.xdy}: Requires \filenm{makeindex.xdy}.} % \changes{v0.58}{2018/06/21}{\filenm{lwarp.xdy}: Supports bold, italic.} % % ^^A *lwarp.xdy % % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} \begin{filecontents*}[overwrite]{lwarp.xdy} (require "tex/inputenc/latin.xdy") (merge-rule "\\PS *" "Postscript") (require "texindy.xdy") (require "page-ranges.xdy") (require "book-order.xdy") (define-location-class "arabic-page-numbers" ("arabic-numbers") :min-range-length 1) (require "makeindex.xdy") (define-attributes (("hyperindexref"))) (markup-locref :open "\hyperindexref{" :close "}") (markup-locref :open "\hyperindexref{" :close "}" :attr "hyperpage") (markup-locref :open "\textbf{\hyperindexref{" :close "}}" :attr "textbf") (markup-locref :open "\textit{\hyperindexref{" :close "}}" :attr "textit") (define-location-class-order ("roman-page-numbers" "arabic-page-numbers" "alpha-page-numbers" "Roman-page-numbers" "Alpha-page-numbers" "see" "seealso")) \end{filecontents*} % \end{Verbatim}% for syntax highlighting \end{LWRwriteconf} % \end{macrocode} % \subsection{\filenm{lwarp_one_limage.cmd}} % % \DescribeFile{lwarp_one_limage.cmd} % Used by \pkg{lwarp} to help make \env{lateximage}s when using \brand{Windows}. % % This must be present when compiling the project, % but does not need to be present when distributing % the resulting \HTML\ files. % % The arguments are each of the three fields from \filenm{-images.txt}, % and also the base name of the source file. % % \prog{MiKTeX} does not allow file \filenm{lwarp_one_limage.cmd} to be % created directly by \prog{lwarpmk}, so \filenm{lwarp_one_limage.txt} is created instead, % then copied to \filenm{lwarp_one_limage.cmd} by \prog{lwarpmk}. % This occurs each time \prog{lwarpmk} used to create \env{lateximage}s. % % \changes{v0.50}{2018/02/27}{\filenm{lwarp_one_limage.txt}: Added.} % \changes{v0.51}{2018/03/16}{\filenm{lwarp_one_limage.txt}: \prog{pdftocairo} \optn{-noshrink} added.} % \changes{v0.66}{2019/01/30}{\filenm{lwarp_one_limage.txt}: Image directory and prefix.} % \changes{v0.906}{2022/05/02}{\filenm{lwarp_one_limage.txt}: Added \prog{pdfcrop} \optn{margin}.} % \changes{v0.907}{2022/07/11}{\filenm{lwarp_one_limage.txt}: Fixed \brand{Windows} images.} % % ^^A *lwarp_one_limage.txt % % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} \immediate\openout\LWR@quickfile=lwarp_one_limage.txt \immediate\write\LWR@quickfile{% pdfseparate -f \LWRpercent 1 -l \LWRpercent 1 \LWRpercent 4_html.pdf % \LWR@ImagesDirectory\OSPathSymbol lateximagetemp-\LWRpercent\LWRpercent d.pdf% } \immediate\write\LWR@quickfile{% pdfcrop --hires --margins \LWRopquote0 1 0 0\LWRopquote\space % \LWR@ImagesDirectory\OSPathSymbol lateximagetemp-\LWRpercent 1.pdf % \LWR@ImagesDirectory\OSPathSymbol\LWRpercent 3.pdf% } \immediate\write\LWR@quickfile{% pdftocairo -svg -noshrink \LWR@ImagesDirectory\OSPathSymbol\LWRpercent 3.pdf % \LWR@ImagesDirectory\OSPathSymbol\LWRpercent 3.svg% } \immediate\write\LWR@quickfile{% del \LWR@ImagesDirectory\OSPathSymbol\LWRpercent 3.pdf% } \immediate\write\LWR@quickfile{% del \LWR@ImagesDirectory\OSPathSymbol lateximagetemp-\LWRpercent 1.pdf% } \immediate\write\LWR@quickfile{exit} \immediate\closeout\LWR@quickfile \end{LWRwriteconf} % \end{macrocode} % \subsection{\filenm{lwarp_mathjax.txt}} % \credits{Davide P. Cervone} % \DescribeFile{lwarp_mathjax.txt} % The default \MathJax\ script used by \pkg{lwarp} when using \MathJax. % A recent version of \MathJax\ is used, as served by the recommended repository. % Adjustments are made to allow \LaTeX\ to control the equation tags % and provide for starred macros. % % \cs{MathJaxFilename} determines which script file is copied into the \HTML\ pages, % and defaults to \filenm{lwarp_mathjax.txt}. % The script files must be present when compiling the project, % but do not need to be present when distributing % the resulting \HTML\ files. % % \gindex{mathjax=\MathJax>custom script} % \trouble{mathjax=\MathJax>custom script} % To generate a custom script, such as to use a local repository, % \margintag{custom script} % copy \filenm{lwarp_mathjax.txt} to a new file, % make changes while keeping \pkg{lwarp}'s adjustments for equation numbering % and starred macros, and use \cs{MathJaxFilename} to select the new filename. % % \changes{v0.28}{2017/04/11}{File: \filenm{lwarp_mathjax.txt}: Updated \protect\acro{CDN} repository.} % \changes{v0.30}{2017/04/26}{Fix: \filenm{lwarp_mathjax.txt}: Only written in print mode.} % \changes{v0.34}{2017/07/27}{File: \filenm{lwarp_mathjax.txt}: Version change.} % \changes{v0.42}{2017/10/16}{File: \filenm{lwarp_mathjax.txt}: Updated \pkg{siunitx} script.} % \changes{v0.45}{2017/12/21}{File: \filenm{lwarp_mathjax.txt}: Allow \MathJax\ inside \env{tabbing}.} % \changes{v0.45}{2018/01/23}{File: \filenm{lwarp_mathjax.txt}: Allow \MathJax\ inside \env{verse}.} % \changes{v0.59}{2018/07/13}{File: \filenm{lwarp_mathjax.txt}: Updated to \MathJax\ v2.7.4.} % \changes{v0.59}{2018/07/16}{File: \filenm{lwarp_mathjax.txt}: Fix: Removed chapter number from tagged non-numeric \MathJax\ equations.} % \changes{v0.62}{2018/11/05}{File: \filenm{lwarp_mathjax.txt}: Removed inoperable \pkg{siunitx} extension.} % \changes{v0.70}{2019/03/24}{File: \filenm{lwarp_mathjax.txt}: Updated to \MathJax\ v2.7.5.} % \changes{v0.70}{2019/03/24}{File: \filenm{lwarp_mathjax.txt}: Loads \filenm{autoload-all.js} extension.} % \changes{v0.76}{2019/10/05}{File: \filenm{lwarp_mathjax.txt}: Updated to \MathJax\ v2.7.6.} % \changes{v0.86}{2020/05/03}{File: \filenm{lwarp_mathjax.txt}: Updated to \MathJax\ v3 current.} % \changes{v0.86}{2020/05/03}{File: \filenm{lwarp_mathjax.txt}: Improved equation numbering.} % \changes{v0.86}{2020/05/03}{File: \filenm{lwarp_mathjax.txt}: Added support for starred macros.} % \changes{v0.87}{2020/05/20}{File: \filenm{lwarp_mathjax.txt}: Now provides \cs{ifstar}, \cs{ifnextchar}.} % \changes{v0.891}{2020/09/07}{File: \filenm{lwarp_mathjax.txt}: Renamed \filenm{tagformat} extension.} % \changes{v0.892}{2020/09/26}{File: \filenm{lwarp_mathjax.txt}: Added \cs{left} \Slash \cs{right} delimiters.} % \changes{v0.895}{2021/01/13}{File: \filenm{lwarp_mathjax.txt}: Added \cs{ifblank}, \cs{ifstrequal} macros.} % \changes{v0.904}{2022/02/21}{File: \filenm{lwarp_mathjax.txt}: Added \cs{gsub} macro.} % \changes{v0.904}{2022/02/25}{File: \filenm{lwarp_mathjax.txt}: Defaults to \SVG\ instead of \acro{chtml}.} % ^^A *lwarp_mathjax.txt % % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} \begin{filecontents*}[overwrite]{lwarp_mathjax.txt} \end{filecontents*} % \end{Verbatim}% for syntax highlighting \end{LWRwriteconf} % \end{macrocode} % ^^A \subsection{\filenm{lwarp_KaTeX.txt}} % ^^A \DescribeFile{lwarp_KaTeX.txt} % ^^A Used by \pkg{lwarp} when using Ka\TeX. % % ^^A This must be present when compiling the project, % ^^A but does not need to be present when distributing % ^^A the resulting \HTML\ files. % % ^^A \changes{v0.59}{2018/11/03}{File: \filenm{lwarp_KaTeX.txt}: Added.} % % % ^^A ^^A *lwarp_KaTeX.txt % % ^^A \codeconfig % ^^A \begin{macrocode} % ^^A \begin{LWRwriteconf} % ^^A \begin{filecontents*}{lwarp_KaTeX.txt} % ^^A % ^^A % ^^A % ^^A \end{filecontents*} % ^^A % \end{Verbatim}% for syntax highlighting % ^^A \end{LWRwriteconf} % ^^A \end{macrocode} % \subsection{\filenm{lwarpmk.lua} — \optn{lwarpmk} option} % \DescribeOption{lwarpmk} Creates a local copy of \prog{lwarpmk}. % % \DescribeProgram{lwarpmk} Command-line utility to process \pkg{lwarp} files and images. % % \env{lateximage}s and \SVG\ math images are generated using % \margintag{parallel processing} % \gindex{image>processing} % \gindex{lateximage>processing} % \gindex{SVG>image processing} % multiple processes in parallel. % For \brand{Unix} and \brand{Linux}, every 32 images the |wait| command is % issued to wait for the previous batch of images to finish processing before % starting a new batch. % For \brand{Windows}, every 32 images one task is dispatched with % \begin{sourcedisplay} % START /B /WAIT /BELOWNORMAL % \end{sourcedisplay} % which causes the operating system to wait until this lesser-priority tasks finishes, % hopefully also waiting for the normal priority tasks which were already in % progress to also complete. Afterwards, the next batch of images is started. % % \changes{v0.21}{2017/02/11}{\prog{lwarpmk}: Fix: \cmds{lwarpmk again} for \brand{Windows}.} % \changes{v0.21}{2017/02/22}{\prog{lwarpmk}: Fix: \cmds{lwarpmk limages} for \brand{Windows}.} % \changes{v0.21}{2017/02/22}{\prog{lwarpmk}: Fix: \prog{lwarpmk} uses \filenm{lateximages} text file instead of shell script.} % \changes{v0.28}{2017/04/14}{\prog{lwarpmk}: Add: \cmds{printglossary} and \cmds{htmlglossary} commands.} % \changes{v0.29}{2017/04/15}{\prog{lwarpmk}: Add: \optn{language} option for config files.} % \changes{v0.30}{2017/04/22}{\prog{lwarpmk}: \optn{language} now used for both index and glossary generation.} % \changes{v0.30}{2017/04/22}{\prog{lwarpmk}: Fix: \prog{xindy} now used for print index generation with \prog{latexmk}.} % \changes{v0.30}{2017/04/28}{\prog{lwarpmk}: Fix: \prog{xindy} and \prog{texindy} % adjusted for \prog{pdflatex}, \prog{xelatex} and \prog{lualatex}.} % \changes{v0.30}{2017/04/28}{\prog{lwarpmk}: Add: \optn{xdyfile} configuration option.} % \changes{v0.32}{2017/06/08}{\prog{lwarpmk}: Fix: \cmds{io.lines()} changed to \cmds{file:lines()} % due to \prog{luatex} changes.} % \changes{v0.37}{2017/08/19}{\prog{lwarpmk}: Removes additional \HTML\ \filenm{aux} files.} % \changes{v0.38}{2017/08/24}{\prog{lwarpmk}: Added \cmds{print1} and \cmds{html1} actions.} % \changes{v0.47}{2018/01/24}{\prog{lwarpmk}: \prog{pdfcrop}: Removed \optn{hires} option for improved crop accuracy.} % \changes{v0.50}{2018/02/22}{\prog{lwarpmk}: MD5 hash avoids duplicate \SVG\ math.} % \changes{v0.50}{2018/02/27}{\prog{lwarpmk}: Multiprocess support making lateximages.} % \changes{v0.50}{2018/02/28}{\prog{lwarpmk}: Error if \filenm{lateximages.txt} does not exist.} % \changes{v0.50}{2018/02/28}{\prog{lwarpmk}: Error if \filenm{lwarpmk.conf} points to \pkg{lwarp}.} % \changes{v0.50}{2018/02/28}{\prog{lwarpmk}: Improved error messages.} % \changes{v0.51}{2018/03/14}{\prog{lwarpmk}: \prog{pdfcrop}: Restored \optn{hires} option.} % \changes{v0.51}{2018/03/16}{\prog{lwarpmk}: \prog{pdftocairo} \optn{-noshrink} added.} % \changes{v0.52}{2018/03/31}{\prog{lwarpmk}: Fix: Memory overflow when spawning tasks.} % \changes{v0.52}{2018/04/01}{\prog{lwarpmk}: Fix: Skip image generation if from page 0.} % \changes{v0.53}{2018/04/01}{\prog{lwarpmk}: Added warning for corrupted images.} % \changes{v0.53}{2018/04/01}{\prog{lwarpmk}: Added \cmds{lwarpmk cleanlimages}.} % \changes{v0.54}{2018/04/06}{\prog{lwarpmk}: Changed \optn{xdyfile} to \optn{xindystyle}.} % \changes{v0.54}{2018/04/06}{\prog{lwarpmk}: Changed \optn{language} to \optn{xindylanguage}.} % \changes{v0.54}{2018/04/06}{\prog{lwarpmk}: Added \optn{xindycodepage}.} % \changes{v0.54}{2018/04/06}{\prog{lwarpmk}: Added \optn{pdftotextenc}.} % \changes{v0.54}{2018/04/09}{\prog{lwarpmk}: Increased prominence for error for an unknown command.} % \changes{v0.54}{2018/04/11}{\prog{lwarpmk}: Verifies image references before \progcode{lwarpmk limages}.} % \changes{v0.54}{2018/04/11}{\prog{lwarpmk}: Verifies \HTML\ version exists before \progcode{lwarpmk limages}.} % \changes{v0.54}{2018/04/19}{\prog{lwarpmk}: Improved error if configuration file does not exist.} % \changes{v0.56}{2018/04/29}{\prog{lwarpmk}: Added \progcode{lwarpmk pdftosvg}.} % \changes{v0.56}{2018/05/11}{\prog{lwarpmk}: Supports \texttt{-\/-shell-escape}.} % \changes{v0.57}{2018/05/20}{\prog{lwarpmk}: Improved code factoring.} % \changes{v0.57}{2018/05/20}{\prog{lwarpmk}: Improved error handling.} % \changes{v0.58}{2018/06/14}{\prog{lwarpmk}: Added \texttt{-p} option for project name.} % \changes{v0.58}{2018/06/14}{\prog{lwarpmk}: Added optional list of names for \cmds{lwarpmk printindex} and /cmds{lwarpmk htmlindex}.} % \changes{v0.58}{2018/06/18}{\prog{lwarpmk}: Glossary generation now uses \prog{makeglossaries}.} % \changes{v0.58}{2018/06/20}{\prog{lwarpmk}: Added \optn{makeindex} and \optn{xindy} options.} % \changes{v0.58}{2018/06/20}{\prog{lwarpmk}: \cmds{lwarpmk clean} removes all \filenm{*.ind} and \filenm{*.idx} files.} % \changes{v0.59}{2018/07/29}{\prog{lwarpmk}: Warning if operating system changed.} % \changes{v0.59}{2018/07/29}{\prog{lwarpmk}: Error if \filenm{lwarpmk.conf} format changed.} % \changes{v0.59}{2018/08/05}{\prog{lwarpmk}: Double insead of single-dashed \optn{-\/-shell-escape} option.} % \changes{v0.59}{2018/08/21}{\prog{lwarpmk}: Consolidated compiling options into \optn{printlatexcmd} and \optn{HTMLlatexcmd}.} % \changes{v0.59}{2018/09/06}{\prog{lwarpmk}: Added \cmds{lwarpmk epstopdf}.} % \changes{v0.66}{2019/01/27}{\prog{lwarpmk}: Added \optn{ImagesDirectory} and \optn{ImagesName}.} % \changes{v0.66}{2019/01/30}{\prog{lwarpmk}: Fix for \cmds{cleanlimages}.} % \changes{v0.68}{2019/03/02}{\prog{lwarpmk}: Improved error handling if incomplete compile.} % \changes{v0.71}{2019/04/11}{\prog{lwarpmk}: If wrong \filenm{lwarpmk.conf} version, % or wrong OS, % displays the print command to recompile.} % \changes{v0.74}{2019/08/05}{\prog{lwarpmk}: \cmds{lwarpmk clean} removes add'l files.} % \changes{v0.74}{2019/08/14}{\prog{lwarpmk}: \cmds{lwarpmk epstopdf} and \cmds{pdftosvg} honor directories.} % \changes{v0.81}{2020/03/04}{\prog{lwarpmk}: Improved error if in \pkg{lwarp} source directory.} % \changes{v0.84}{2020/03/30}{\prog{lwarpmk}: \optn{clean} also removes \filenm{comment_*.cut}} % \changes{v0.89}{2020/08/29}{\prog{lwarpmk}: \optn{clean} also removes \filenm{*.bbl}} % \changes{v0.899}{2021/05/30}{\prog{lwarpmk}: Warn if \pkg{lwarp} package not detected.} % \changes{v0.903}{2021/11/30}{\prog{lwarpmk}: Error if \prog{pdftotext} not available.} % \changes{v0.906}{2022/05/02}{\prog{lwarpmk}: Added \prog{pdfcrop} \optn{margin}.} % % The following is only generated if the \optn{lwarpmk} option % was given to \pkg{lwarp}. % \begin{macrocode} \begin{LWRcreatelwarpmk} % \end{macrocode} % % ^^A *lwarpmk.lua % \begin{macrocode} \begin{filecontents*}[overwrite]{lwarpmk.lua} #!/usr/bin/env texlua -- Copyright 2016-2024 Brian Dunn printversion = "v0.916" requiredconfversion = "2" -- also at *lwarpmk.conf function printhelp () print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ; end function printusage () -- -- Print the usage of the lwarpmk command: -- print ( [[ lwarpmk print [-p project]: Compile the print version if necessary. lwarpmk print1 [-p project]: Forced single compile of the print version. lwarpmk printindex [-p project]: Process print indexes. lwarpmk printglossary [-p project]: Process the glossary for the print version. lwarpmk html [-p project]: Compile the HTML version if necessary. lwarpmk html1 [-p project]: Forced single compile of the HTML version. lwarpmk htmlindex [-p project]: Process HTML indexes. lwarpmk htmlglossary [-p project]: Process the glossary for the html version. lwarpmk again [-p project]: Touch the source code to trigger recompiles. lwarpmk limages [-p project]: Process the "lateximages" created by lwarp.sty. lwarpmk pdftohtml [-p project]: For use with latexmk or a Makefile: Converts project_html.pdf to project_html.html and individual HTML files. Finishes the HTML conversion even if there was a compile error. lwarpmk pdftosvg : Converts each PDF file to SVG. lwarpmk epstopdf : Converts each EPS file to PDF. lwarpmk clean [-p project]: Remove *.aux, *.toc, *.lof/t, *.idx, *.ind, *.bbl, *.log, *_html_inc.*, .gl*, *_html.pdf, *_html.html, *_html.sidetoc lwarpmk cleanall [-p project]: Remove auxiliary files, project.pdf, *.html lwarpmk cleanlimages: Removes all images from the "lateximages" directory. lwarpmk -v: Print the version number. lwarpmk -h: Print this help message. lwarpmk --help: Print this help message. ]] ) -- printconf () end function splitfilename ( pathandfilename ) -- -- Separates out the path and extension from a filename. -- Returns path, filename with extension, and extension. -- Ex: thispath, thisfilename, thisextension = splitfilename ("path/to/filename.ext") -- -- https://www.fhug.org.uk/wiki/wiki/doku.php?id=plugins:code_snippets: -- split_filename_in_to_path_filename_and_extension -- if lfs.attributes(pathandfilename,"mode") == "directory" then local strPath = pathandfilename:gsub("[\\/]$","") -- $ (syntax highlighting) return strPath.."\\","","" end pathandfilename = pathandfilename.."." return pathandfilename:match("^(.-)([^\\/]-)%.([^\\/%.]-)%.?$") end function splitfile (destfile,sourcefile) -- -- Split one large sourcefile into a number of files, -- starting with destfile. -- The file is split at each occurance of