From 962840188681e1d6f4aec0ebf07e05a70609325d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 29 Apr 2018 23:01:08 +0000 Subject: lwarp (26apr18) git-svn-id: svn://tug.org/texlive/trunk@47491 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/lwarp/lwarp.dtx | 2292 +++++++++++++++++------- Master/texmf-dist/source/latex/lwarp/lwarp.ins | 12 +- 2 files changed, 1680 insertions(+), 624 deletions(-) (limited to 'Master/texmf-dist/source/latex/lwarp') diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx index 1e3513dbea3..8ddf02cd890 100644 --- a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx +++ b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx @@ -16,7 +16,7 @@ % \iffalse %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{lwarp} -% [2018/04/01 v0.53 Allows LaTeX to directly produce HTML5 output.] +% [2018/04/26 v0.55 Allows LaTeX to directly produce HTML5 output.] % %<*driver> \documentclass{ltxdoc} @@ -75,6 +75,7 @@ \newunicodechar{₱}{\textpeso} \newunicodechar{℞}{\textrecipe} \newunicodechar{⸘}{\textinterrobangdown} +\newunicodechar{‰}{\textperthousand} \newunicodechar{‱}{\textpertenthousand} \newunicodechar{฿}{\textbaht} \newunicodechar{℠}{\textservicemark} @@ -268,6 +269,7 @@ Keywords={LaTeX, HTML, conversion}% \providerobustcmd*{\cmds}[1]{\mbox{\texttt{\textbf{\textsl{#1}}}}} \providerobustcmd*{\env}[1]{\mbox{\texttt{#1}}} \providerobustcmd*{\ctr}[1]{\mbox{\texttt{#1}}} +\providerobustcmd*{\bool}[1]{\mbox{\texttt{#1}}} \providerobustcmd*{\pkg}[1]{\mbox{\textbf{\textsf{#1}}}} \providerobustcmd*{\prog}[1]{\mbox{\textbf{\textsf{#1}}}} \providerobustcmd*{\progcode}[1]{\mbox{\texttt{#1}}} @@ -292,6 +294,7 @@ Keywords={LaTeX, HTML, conversion}% \newrobustcmd{\CSS}{\acro{CSS}} \newrobustcmd{\CSSthree}{\CSS\textsc{3}} \newrobustcmd{\EPUB}{\acro{EPUB}} +\newrobustcmd{\ODT}{\acro{ODT}} \newrobustcmd{\SVG}{\acro{SVG}} \newrobustcmd{\PNG}{\acro{PNG}} \newrobustcmd{\JPG}{\acro{JPG}} @@ -461,9 +464,9 @@ to redefine the message which is printed for page number references. \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 \texttt{\%} character between arguments for \cs{hyperref}, etc., -\watchout[comment character \%] -as this is one of the characters which is neutralized for inclusion in \HTML\ \acro{URL}s. +Do not place a comment with a \texttt{\%} character between arguments +\watchout[\texttt{\%}] +for \cs{hyperref}, etc., as it is neutralized for inclusion in \HTML\ \acro{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. @@ -506,12 +509,44 @@ 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{\limitsindexlanguage}{% -The \pkg{lwarp} package takes an option -\DescribeOption{IndexLanguage} -\texttt{IndexLanguage=english} to set the language used by \prog{xindy}. +\newcommand{\limitsxindylanguage}{% +The \pkg{lwarp} package option +\DescribeOption{xindyLanguage} +\DescribeDefault{english} +\optn{xindyLanguage} sets the language used by \prog{xindy}. This is passed to \prog{xindy} using its \optn{-L} option, and is used for both index and glossary generation. + +The option +\DescribeOption{xindyCodepage} +\DescribeDefault{utf8} +\optn{xindycodepage} sets the codepage used by \prog{xindy}. +This is passed to \prog{xindy} using its \optn{-C} option, and is +used for both index and glossary generation. +} + +\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{\limitsbibtex}{% +When enough authors are cited for a source, +\watchout[Modify *.bib] +\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} } \newcommand{\limitsglossaries}{% @@ -552,7 +587,7 @@ a \acro{TOC} entry, and placed inline or on their own \HTML\ page: \end{sourcedisplay} \end{description} -\limitsindexlanguage +\limitsxindylanguage \DescribeOption[lwarpmk]{printglossary} \DescribeOption[lwarpmk]{htmlglossary} @@ -564,11 +599,12 @@ a \acro{TOC} entry, and placed inline or on their own \HTML\ page: \newcommand*{\limitsindex}{% -\limitsindexlanguage +\limitsxindylanguage \limitstocloft An index may be placed inline with other \HTML\ text, or on its own \HTML\ page: +\DescribePackage{makeidx} \margintag{placement and \acro{TOC} options} \begin{description} @@ -628,6 +664,7 @@ Without this option, the index heading has no number. \newcommand{\limitstocloft}{% If using \pkg{tocloft} with \pkg{tocbibind}, \pkg{anonchap}, +\DescribePackage{tocloft} \watchout[\pkg{tocloft} \& other packages] \pkg{fncychap}, or other packages which change chapter title formatting, load \pkg{tocloft} with its \optn{titles} option, which @@ -661,7 +698,7 @@ if \texttt{FileDepth} allows: \newcommand{\limitstext}{% \cs{textbf}, etc.\ are supported, \watchout[\cs{bfseries}, etc.] -but \cs{bfseries}, etc.\ are not yet supported. +but \cs{bfseries}, etc.\ work only in some situations. \texttt{\&}, \texttt{\textless}, and \texttt{\textgreater} \watchout[HTML special chars] @@ -759,6 +796,13 @@ provide a short \TOC\ entry, and \cs{protect} the \cs{footnote}: \cs{subsection}\textcolor{red}{[Subsection Name]}\\ \hspace*{2em}\{Subsection Name\textcolor{red}{\cs{protect}}\cs{footnote}\{A footnote.\}\} \end{sourcedisplay} +If using \pkg{memoir} class, with which \pkg{lwarp} preloads \pkg{footmisc}, the +\optn{stable} option must be declared before \pkg{lwarp} is loaded: +\begin{sourcedisplay} +\cs{PassOptionsToPackage}\{\textcolor{red}{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. @@ -832,6 +876,9 @@ 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, @@ -850,11 +897,11 @@ works for both print and \HTML\ output. To combine the two so that \cs{end}\{warpHTML\} \end{docsidebar} -\DescribeLength{vleftskip} -\DescribeLength{vleftmargini} +\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} + \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. @@ -884,7 +931,7 @@ in the \SVG\ image may be adjusted by setting \cs{LateximageFontSizeName} to a font size name --- \emph{without the backslash}, which defaults to: \begin{sourcedisplay} -\cs{renewcommand}\{\cs{LateximageFontSizeName}\}\{\textcolor{red}{large}\} +\cs{renewcommand}\{\cs{LateximageFontSizeName}\}\{\textcolor{red}{normalsize}\} \end{sourcedisplay} For inline \SVG\ math, font size is instead controlled by \cs{LateximageFontScale}, @@ -1203,7 +1250,15 @@ ugly results for scaling and rotating. When a math expression, \env{picture}, or \tikz\ environment is added or \watchout[adding/removing] removed, the \SVG\ images must be re-created by entering \cmds{lwarpmk limages} -to maintain the proper image file sequence numbers. +to maintain the proper image-file associations. + +Before attempting to create the \SVG\ image files, +\prog{lwarpmk} verifies that the \HTML\ version of the document exists and +has correct internal image references. +If it is necessary to recompile the document's \HTML\ version, \prog{lwarpmk} +will inform so with an error message.% +\footnote{This becomes important when dealing with a document containing +thousands of images.} If \HTML\ appears where an \SVG\ image should be,\watchout[\HTML\ instead of images]% \index{math>appearing as \HTML}% @@ -1213,11 +1268,12 @@ If \HTML\ appears where an \SVG\ image should be,\watchout[\HTML\ instead of ima 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 has\watchout[page counter] +Incorrect \SVG\ images will also occur if the document +changes the \progcode{page} counter:\watchout[page counter] \begin{sourcedisplay} \cs{setcounter}\{page\}\{\} \end{sourcedisplay} -The \texttt{page} counter must not be adjusted by the user. +The \texttt{page} counter must \emph{not} be adjusted by the user. \index{page>counter} Expressing math as \SVG\ images has the advantage of representing @@ -1601,10 +1657,10 @@ are above or below the delimiter: \cs{end}\{tabular\} \smallskip\hrule \begin{tabular}{lll} - & a & b \\ +\textcolor{green!50!black}{<>} & a & b \\ \ldelim{\{}{2}{.25in}[left ] & c & d \\ \mrowcell & e & f \\ - & g & h \\ +\textcolor{green!50!black}{<>} & g & h \\ \end{tabular} \hrule \end{sourcedisplay} @@ -1854,6 +1910,18 @@ 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 +\margintag{\env{figure} \& \env{table} 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{EndDefiningTabulars} before and after \watchout[misplaced alignment alignment tab character \&] @@ -1942,6 +2010,30 @@ should be placed inside a \env{warpprint} environment so that the user's changes do not affect the \HTML\ output. } +\newcommand{\limitspolyglossia}{% +\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{@begindocumenthook} +\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: @@ -2062,7 +2154,7 @@ This boolean may be tested by the user for later use. %<*package> % \fi % -% \CheckSum{23337} +% \CheckSum{23632} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -2157,6 +2249,8 @@ This boolean may be tested by the user for later use. % \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} @@ -2226,8 +2320,12 @@ This boolean may be tested by the user for later use. % \bigskip % % \begin{center} -% \textcolor{blue}{To update existing projects, see \cref{sec:updates}, -% \nameref{sec:updates}.} +% \color{blue} +% To update existing projects, see \cref{sec:updates}: \nameref{sec:updates}. +% +% \bigskip +% +% For a list of supported features, see \cref{tab:supported}: \nameref{tab:supported}. % \end{center} % % \bigskip @@ -2350,6 +2448,87 @@ This boolean may be tested by the user for later use. % % \begin{description} % \needspace{2\baselineskip} +% \item[v0.55:] \ +% \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:] \ +% \begin{itemize} +% \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}. +% +% \textcolor{red}{For an existing document, \watchout[Reset the configuration] +% recompile the print version with \prog{pdflatex}, \prog{xelatex}, or +% \prog{lualatex} a single time, +% to readjust the \filenm{lwarpmk.conf} configuration file, +% before recompiling the \HTML\ version.} +% \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{sourcedisplay} +% \cs{begin}\{floattype\} \\ +% \cs{centering} +% \end{sourcedisplay} +% \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:] \ % \begin{itemize} % \item \prog{lwarpmk}: Added a warning about corrupted images due to the @@ -2359,6 +2538,7 @@ This boolean may be tested by the user for later use. % \item Added documentation for \cmds{lwarpmk cleanlimages} and % \cmds{lwarpmk pdftohtml}. % \end{itemize} +% \needspace{2\baselineskip} % \item[v0.52:] \ % \begin{itemize} % \item Improved install instructions regarding \filenm{lwarp\_baseline\_marker.png}. @@ -2910,7 +3090,7 @@ This boolean may be tested by the user for later use. % related to \HTML\ settings have been converted to options, and % other macros and options have been renamed to create a consistent syntax: % \begin{center} -% \begin{tabular}{ll} +% \begin{tabular}{cc} % \toprule % Old Macro & New Package Option \\ \midrule % \cs{HomeHTMLFileName} & |HomeHTMLFilename| \\ @@ -2918,8 +3098,8 @@ This boolean may be tested by the user for later use. % \cs{useLatexmk} & |latexmk| \\ % \cs{warpOSwindows} & |OSWindows| \\[2.5ex] \toprule % Old Package Option & New Package Option \\ \midrule -% \optn{lwarpmklang} & \optn{IndexLanguage} \\ -% (new) & \optn{xdyFilename} \\[2.5ex] \toprule +% \optn{lwarpmklang} & \optn{xindyLanguage} \\ +% (new) & \optn{xindyStyle} \\[2.5ex] \toprule % Old Macro & New Macro \\ \midrule % \cs{MetaLanguage} & \cs{HTMLLanguage} \\ % \cs{HTMLauthor} & \cs{HTMLAuthor} \\ @@ -2939,7 +3119,7 @@ This boolean may be tested by the user for later use. % \usepackage[ % HomeHTMLFilename=index, % HTMLFilename={}, -% IndexLanguage=english +% xindyLanguage=english % ]{lwarp} % \end{Verbatim} % @@ -2953,7 +3133,7 @@ This boolean may be tested by the user for later use. % \item The old file |lwarp_html.xdy| may be deleted. % \end{enumerate} % -% \item The new \pkg{lwarp} package option optn{xdyFilename} may be used to tell +% \item The new \pkg{lwarp} package option optn{xindyStyle} may be used to tell % \prog{lwarpmk} to use a custom |.xdy| file instead of |lwarp.xdy|. % See \cref{sec:modifyxindy}. % @@ -2977,6 +3157,7 @@ This boolean may be tested by the user for later use. % \item Add: \optn{lwarpmklang} option for \pkg{lwarp-newproject} and \pkg{lwarp}. % Sets the language to use while processing the glossary. % (As of v0.30, this has been changed to the \optn{IndexLanguage} option.) +% (As of v0.54, this has been changed to the \optn{xindyLanguage} option.) % \item Fix: \cs{includegraphics} when no optional arguments. % \end{itemize} % \item[v0.28:] \ @@ -2992,8 +3173,9 @@ This boolean may be tested by the user for later use. % by a word processor. Removes headers and nav, prints footnotes per section, % and also forces single-file output and turns off \HTML\ debug comments. % Name changed to |FormatWP| as of v0.42. -% \item Boolean |HTMLMarkFloats| adds text marks around floats only if -% |FormatWordProcessor|. These make it easier to identify float boundaries, +% \item Boolean |HTMLMarkFloats| adds text marks around floats only if the boolean +% |FormatWordProcessor| is |true|. +% These make it easier to identify float boundaries, % which are to be manually converted to word-processor frames. % Name changed to |WPMarkFloats| as of v0.42. % \item Updated for the new \brand{MathJax} \acro{CDN} repository. @@ -3274,9 +3456,13 @@ This boolean may be tested by the user for later use. % \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 which may be used. +% \Cref{tab:supported} lists some of the various \LaTeX{} features and packages +% which may be used. +% Many are tested to work as-is, +% some are patches for the original packages, and some are emulations written +% for source-level compatibility. +% Many are nullified as being irrelevent to \HTML\ output. % -% \vspace{0.5in} % % \renewcommand{\arraystretch}{1.5} % @@ -3303,36 +3489,37 @@ This boolean may be tested by the user for later use. % % \midrule % -% Classes: & \pkg{book}, \pkg{report}, \pkg{article}, -% \pkg{scrbook}, \pkg{scrreprt}, \pkg{scrartcl}, \pkg{memoir}. \\ +% Classes: & \pkg{article}, \pkg{book}, \pkg{report}, +% \pkg{scrartcl}, \pkg{scrbook}, \pkg{scrreprt}, \pkg{memoir}. \\ % -% Koma-script: & \pkg{scrextend}, \pkg{scrlayer}, \pkg{scrhack}. +% Koma-script: & \pkg{scrextend}, \pkg{scrhack}, \pkg{scrlayer}. % Others as listed below. \\ % % Memoir: & \pkg{memhfixc} \\ % % \midrule % -% Page layout: & \pkg{geometry}, \pkg{fancyhdr}, \pkg{titleps}, -% \pkg{scrlayer-scrpage}, \pkg{typearea}, \pkg{vmargin}, -% \pkg{addlines}, \pkg{anysize}, \pkg{a4}, \pkg{a4wide}, \pkg{a5comb}, -% \pkg{textarea}, \pkg{zwpagelayout}, \pkg{ebook}, -% \pkg{preview}, -% \pkg{draftwatermark}, \pkg{watermark}, -% \pkg{everyshi}, \pkg{atbegshi}, \pkg{continue}, \pkg{fwlw}, \pkg{turnthepage}, -% \pkg{pagesel}, \pkg{blowup}, \pkg{pagegrid}, \pkg{grid}, \pkg{ltxgrid}. \\ +% Page layout: & \pkg{a4}, \pkg{a4wide}, \pkg{a5comb}, +% \pkg{addlines}, \pkg{anysize}, \pkg{atbegshi}, +% \pkg{blowup}, \pkg{clrdblpg}, \pkg{continue}, \pkg{draftwatermark}, +% \pkg{ebook}, \pkg{everyshi}, +% \pkg{fancyhdr}, \pkg{fwlw}, \pkg{geometry}, \pkg{grid}, \pkg{gridset}, +% \pkg{ltxgrid}, \pkg{pagegrid}, \pkg{pagesel}, \pkg{preview}, +% \pkg{scrlayer-scrpage}, \pkg{textarea}, \pkg{titleps}, +% \pkg{turnthepage}, \pkg{typearea}, \pkg{vmargin}, +% \pkg{watermark}, \pkg{zwpagelayout}. \\ % % 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. -% \pkg{titlesec}, \pkg{fncychap}, \pkg{sectsty}, \pkg{section}, -% \pkg{anonchap}, \pkg{quotchap}, \pkg{sectionbreak}. \\ +% \pkg{anonchap}, \pkg{fncychap}, \pkg{quotchap}, +% \pkg{section}, \pkg{sectionbreak}, \pkg{sectsty}, \pkg{titlesec}. \\ % % Table of contents, figures, tables: & Supported, with hyperlinks. -% \pkg{tocbibind}, \pkg{titletoc}, \pkg{tocloft}, -% \pkg{tocbasic}, and \pkg{tocstyle}, \pkg{multitoc}. \\ +% \pkg{multitoc}, \pkg{shorttoc}, \pkg{titletoc}, +% \pkg{tocbasic}, \pkg{tocbibind}, \pkg{tocloft}, \pkg{tocstyle}. \\ % -% Title page: & \cs{maketitle}, \env{titlepage}, \pkg{titling}, \pkg{authblk}. \\ +% Title page: & \cs{maketitle}, \env{titlepage}, \pkg{authblk}, \pkg{titling}. \\ % % Front \&\ back matter: & \pkg{abstract}, \pkg{appendix}. \\ % @@ -3340,25 +3527,26 @@ This boolean may be tested by the user for later use. % % Glossary: & \pkg{glossaries} and \prog{xindy} are used. \\ % -% Bibliography: & \pkg{cite}, \pkg{natbib}, \pkg{biblatex}, -% \pkg{chapterbib}, \pkg{backref}, \pkg{hypernat}. \\ +% Bibliography: & \pkg{backref}, \pkg{biblatex}, \pkg{bibunits}, +% \pkg{chapterbib}, \pkg{cite}, \pkg{hypernat}, \pkg{natbib}. \\ % % \midrule % % Cross-references: & -% \pkg{hyperref}, \pkg{cleveref}, \pkg{varioref}, \pkg{fancyref}, \pkg{prettyref}, -% \pkg{titleref}, \pkg{url}, \pkg{breakurl}, \pkg{xurl}, \pkg{bookmark}, \pkg{hypdestopt}. \\ +% \pkg{bookmark}, \pkg{breakurl}, \pkg{cleveref}, \pkg{fancyref}, +% \pkg{hypdestopt}, \pkg{hyperref}, \pkg{prettyref}, +% \pkg{titleref}, \pkg{url}, \pkg{varioref}, \pkg{xurl}. \\ % -% Languages: & \pkg{babel}. (\pkg{polyglossia} is untested.) \\ +% Languages: & \pkg{babel}, \pkg{polyglossia}. \\ % % \midrule % % Margin notes: & \pkg{marginfit}, \pkg{marginfix}, \pkg{scrlayer-notecolumn}. \\ % % Footnotes: & Adds \progcode{FootnoteDepth} to print footnotes at section breaks. -% \pkg{footnote}, \pkg{footmisc}, -% \pkg{marginnote}, \pkg{sidenote}, \pkg{pagenote}, -% \pkg{endnotes}, \pkg{endheads}, \pkg{footnpag}, \pkg{nccfoots}. \\ +% \pkg{endheads}, \pkg{endnotes}, +% \pkg{footmisc}, \pkg{footnote}, \pkg{footnpag}, +% \pkg{marginnote}, \pkg{nccfoots}, \pkg{pagenote}, \pkg{sidenote}. \\ % % \midrule % @@ -3370,48 +3558,39 @@ This boolean may be tested by the user for later use. % due to native \LaTeX\ processing.\\ % % Theorems: & Native \LaTeX\ theorems, -% \pkg{theorem}, \pkg{amsthm}, \pkg{ntheorem}. \\ +% \pkg{amsthm}, \pkg{ntheorem}, \pkg{theorem}. \\ % % Additional math: & Math fonts via \SVG\ images, \pkg{resizegather}, \pkg{xy}. -% As-is: \pkg{delarray}, \pkg{bm}, \pkg{braket}, -% \pkg{amscd}, \pkg{pb-diagram}, \pkg{tikz-cd}, etc. \\ +% +% Tested to work as-is: +% \pkg{amscd}, \pkg{bm}, \pkg{braket}, \pkg{delarray}, +% \pkg{pb-diagram}, \pkg{tikz-cd}, etc. \\ % % Display math with \cs{displaymathother}: & % % Complicated math objects in display math, such as \pkg{tikz-cd}, etc. \\ % % \midrule % -% Units and fractions: & \pkg{siunitx}, \pkg{xfrac}, \pkg{nicefrac}, \pkg{units} \\ -% -% Science and engineering: & -% \pkg{listings}, \pkg{algorithmicx}, \pkg{bytefield}, \pkg{axodraw2}, -% \pkg{phfqit}, \pkg{mhchem}, -% \pkg{chemfig}, \pkg{chemformula}, \pkg{chemmacros}, \pkg{chemnum}. \pkg{chemgreek}. -% Tested to work with \SVG\ math: \pkg{physics}, \pkg{slashed}, -% \pkg{heppennames}, \pkg{hepnicenames}, -% \pkg{simpler-wick}, \pkg{linop}, \pkg{blochsphere}, \pkg{bohr}, \pkg{elements}, etc. -% \emph{(Math-mode packages generally work as-is with \SVG\ math.)} \\ -% -% \midrule -% -% Liberal arts: & \pkg{schemata} \\ +% Units and fractions: & \pkg{nicefrac}, \pkg{siunitx}, \pkg{units}, \pkg{xfrac}. \\ % % \midrule % % Floats: & Appear where declared. -% \pkg{float}, \pkg{rotfloat}, \pkg{newfloat}, \pkg{caption} and \pkg{subcaption}, -% \pkg{subfig}, \pkg{subfigure}, \pkg{capt-of}, \pkg{placeins}, \pkg{trivfloat}, \pkg{floatrow}, -% \pkg{subfloat}, \pkg{keyfloat}, \pkg{wrapfig}, \pkg{cutwin}, \pkg{floatflt}, -% \pkg{flafter}, \pkg{fltrace}, \pkg{endfloat}, \pkg{hypcap}, \pkg{stfloats}, -% \pkg{fix2col}, \pkg{dblfloatfix}, \pkg{nonfloat}, \pkg{morefloats}. \\ +% \pkg{capt-of}, \pkg{caption}, \pkg{cutwin}, +% \pkg{dblfloatfix}, \pkg{endfloat}, \pkg{fix2col}, \pkg{flafter}, +% \pkg{float}, \pkg{floatflt}, \pkg{floatrow}, \pkg{fltrace}, +% \pkg{hypcap}, \pkg{keyfloat}, \pkg{morefloats}, \pkg{newfloat}, +% \pkg{nonfloat}, \pkg{placeins}, \pkg{rotfloat}, \pkg{stfloats}, +% \pkg{subcaption}, \pkg{subfig}, \pkg{subfigure}, \pkg{subfloat}, +% \pkg{trivfloat}, \pkg{wrapfig}. \\ % % \midrule % % Tabular: & -% \env{tabular} environment, \pkg{array}, \pkg{tabularx}, \pkg{tabulary}, -% \pkg{threeparttable}, \pkg{multirow}, -% \pkg{longtable}, \pkg{supertabular}, \pkg{xtab}, \pkg{ltxtable}, -% \pkg{booktabs}, \pkg{colortbl}, \pkg{bigdelim}, \pkg{diagbox}.\\ +% \env{tabular} environment, \pkg{array}, \pkg{bigdelim}, \pkg{booktabs}, +% \pkg{colortbl}, \pkg{diagbox}, \pkg{longtable}, \pkg{ltxtable}, +% \pkg{multirow}, \pkg{supertabular}, \pkg{tabularx}, \pkg{tabulary}, +% \pkg{threeparttable}, \pkg{xtab}. \\ % % \midrule % @@ -3423,7 +3602,13 @@ This boolean may be tested by the user for later use. % \cs{rotatebox} and \cs{scalebox} are supported as well as \HTML\ can handle. % \pkg{rotating} is emulated but all objects are unrotated. % \pkg{picture}, \pkg{tikz}, and \pkg{xy} are converted to an \SVG\ image. -% \pkg{grffile}, \pkg{epstopdf}, \pkg{overpic}, \pkg{figsize}. \\ +% +% \pkg{epstopdf}, \pkg{figsize}, \pkg{grffile}, \pkg{overpic}. +% +% Tested to work as-is: +% \pkg{tikz-3dplot}. \\ +% +% % % % \midrule @@ -3438,7 +3623,7 @@ This boolean may be tested by the user for later use. % \midrule % % Lists: & Standard \LaTeX\ environments, -% \pkg{enumitem}, \pkg{enumerate}, \pkg{paralist}, \pkg{hang}.\\ +% \pkg{enumerate}, \pkg{enumitem}, \pkg{hang}, \pkg{paralist}.\\ % % \midrule % @@ -3447,37 +3632,38 @@ This boolean may be tested by the user for later use. % \env{minipage}, \cs{parbox}: & Some \HTMLfive-imposed limitations. % Nested minipages are supported. \pkg{pbox}.\\ % -% Quotations: & \pkg{verse}, \pkg{csquotes}, \pkg{epigraph} \\ +% Quotations: & \pkg{csquotes}, \pkg{epigraph}, \pkg{verse}. \\ % -% Verbatim: & \pkg{verbatim}, \pkg{moreverb}, \pkg{fancyvrb} (except for verbatim footnotes), -% \pkg{shortvrb}. \\ +% Verbatim: & +% \pkg{fancyvrb}, \pkg{moreverb}, \pkg{shortvrb}, \pkg{verbatim}. \\ % -% Frames: & \pkg{framed}, \pkg{fancybox}, \pkg{mdframed}, \pkg{boxedminipage2e}, +% Frames: & \pkg{boxedminipage2e}, \pkg{fancybox}, \pkg{framed}, \pkg{mdframed}, % \pkg{shadow}, \pkg{vertbars}. \\ % -% Multi-columns: & \pkg{multicol}, \pkg{adjmulticol}, \pkg{vwcol}. \\ +% Multi-columns: & \pkg{adjmulticol}, \pkg{multicol}, \pkg{vwcol}. \\ % -% Margins: & \pkg{midpage}, \pkg{hanging}, \pkg{fullwidth}. \\ +% Margins: & \pkg{fullwidth}, \pkg{hanging}, \pkg{midpage}. \\ % -% Line numbering: & \pkg{lineno}, \pkg{fnlineno}. \\ +% Line numbering: & \pkg{fnlineno}, \pkg{lineno}. \\ % % \midrule % % Acronyms: & \pkg{acro}, \pkg{acronym}. \\ % -% Todo notes: & \pkg{todo}, \pkg{todonotes}, \pkg{easy-todo}, -% \pkg{fixmetodonotes}, \pkg{fixme}, \pkg{changebar}. \\ +% Todo notes: & \pkg{changebar}, \pkg{easy-todo}, \pkg{fixme}, +% \pkg{fixmetodonotes}, \pkg{todo}, \pkg{todonotes}. \\ % % \midrule % % Direct formatting: & \cs{emph}, \cs{textsuperscript}, % \cs{textbf}, etc are supported. -% \cs{bfseries}, etc.\ are only supported in a few cases. -% \pkg{lettrine}, \pkg{ulem}, \pkg{soul}, \pkg{soulutf8}, \pkg{soulpos}, \pkg{cancel}, -% \pkg{relsize}, \pkg{scalefnt}, \pkg{textfit}, \pkg{realscripts}, \pkg{hyphenat}, -% \pkg{pdfrender}, \pkg{luacolor}. \\ +% \cs{bfseries}, etc.\ are only supported in some cases. +% \pkg{cancel}, \pkg{hyphenat}, \pkg{lettrine}, \pkg{luacolor}, +% \pkg{magaz}, \pkg{pdfrender}, \pkg{realscripts}, \pkg{relsize}, +% \pkg{scalefnt}, \pkg{soul}, \pkg{soulpos}, \pkg{soulutf8}, +% \pkg{textfit}, \pkg{ulem}. \\ % -% Ordinals: & \pkg{nth}, \pkg{fmtcount}, \pkg{engord}. \\ +% Ordinals: & \pkg{engord}, \pkg{fmtcount}, \pkg{nth}. \\ % % Text ligatures: & Ligatures for symbols are supported. % Ligatures for f, q, t are intentionally turned off @@ -3497,7 +3683,28 @@ This boolean may be tested by the user for later use. % % Fonts: & Used as-is. Appear in \SVG\ math expressions or embedded image environments. \\ % -% Symbols: & Native \LaTeX\ diacriticals, \pkg{textcomp}, \pkg{textgreek}, \pkg{textalpha}. \\ +% Symbols: & Native \LaTeX\ diacriticals, +% \pkg{chemgreek}, \pkg{textalpha}, \pkg{textcomp}, \pkg{textgreek}. \\ +% +% \midrule +% +% Science and engineering: & +% \pkg{algorithmicx}, \pkg{axodraw2}, \pkg{bytefield}, +% \pkg{chemfig}, \pkg{chemformula}, \pkg{chemgreek}, \pkg{chemmacros}, \pkg{chemnum}, +% \pkg{listings}, \pkg{mhchem}, \pkg{phfqit}. +% +% Tested to work as-is: +% \pkg{blochsphere}, \pkg{bohr}, \pkg{circuitikz}, \pkg{elements}, +% \pkg{hepnicenames}, \pkg{heppennames}, +% \pkg{linop}, \pkg{pgfgantt}, \pkg{physics}, \pkg{simpler-wick}, \pkg{slashed}. +% \\ +% +% \midrule +% +% Liberal arts and humanities: & \pkg{forest}, \pkg{schemata}. +% +% Tested to work as-is: +% \pkg{tikz-dependency}. \\ % % \midrule % @@ -3534,10 +3741,10 @@ This boolean may be tested by the user for later use. % % The closest to \pkg{lwarp} in design principle is the % \DescribeClass{internet} -% \verb+internet+ class by Andrew Stacey -% (\url{https://github.com/loopspace/latex-to-internet}), +% \verb+internet+ class by Andrew Stacey --- % an interesting project which directly produces several versions % of markdown, and also \HTML\ and \EPUB. +% \url{https://github.com/loopspace/latex-to-internet} % % % @@ -3549,9 +3756,10 @@ This boolean may be tested by the user for later use. % 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 most cases, \pkg{lwarp} provides a better \HTML\ conversion, -% while supporting more packages. -% TeX4ht produces several other forms of output beyond \HTML. +% 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. % % \subsection{Translators} % @@ -4388,7 +4596,7 @@ This boolean may be tested by the user for later use. % \userentry{lwarpmk limages} % \userentry{lwarpmk html} % -% \item Move to the tutorial's math page and reload. +% \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. @@ -4539,16 +4747,17 @@ This boolean may be tested by the user for later use. % \pkg{lwarp} supports the \pkg{glossaries} package, although this tutorial % does not supply an example. % -% \DescribeOption{IndexLanguage} -% To assign a language to be used while processing the index and glossary, -% use the \optn{IndexLanguage} option: +% \DescribeOption{xindyLanguage} +% To assign the \prog{xindy} language and codepage to be used +% while processing the index and glossary, +% use the \optn{xindyLanguage} and \optn{xindyCodepage} options: % \index{language>glossary} % \index{language>index} % \index{glossary>language} % \index{index>language} % % \begin{Verbatim}[gobble=2,frame=lines] -% \usepackage[IndexLanguage=english]{lwarp} +% \usepackage[xindyLanguage=english, xindyCodepage=utf8]{lwarp} % \end{Verbatim} % % \index{glossary>processing} @@ -4559,7 +4768,9 @@ This boolean may be tested by the user for later use. % To process the glossary for the \HTML\ version: % \userentry{lwarpmk htmlglossary} % -% In each case, the document will have to be recompiled afterwards. +% In each case, the document will have to be recompiled afterwards: +% \userentry{lwarpmk html1} +% \userentry{lwarpmk html} % % % @@ -4645,7 +4856,7 @@ This boolean may be tested by the user for later use. % \begin{enumerate} % \item Declare the \cs{documentclass}. % \item Load text fonts. -% \item Load \pkg{inputenc}, \pkg{fontenc}, and/or \pkg{fontspec}. +% \item Load \pkg{inputenc} or \pkg{inputenx}, \pkg{fontenc}, and/or \pkg{fontspec}. % \item Load \pkg{lwarp}. % \item Load remaining packages. % \end{enumerate} @@ -4700,21 +4911,26 @@ This boolean may be tested by the user for later use. % % \pkg{lwarp} uses \prog{pdftotext} to convert \PDF\ output into UTF-8-encoded % text. This process requires that UTF-8 information be embedded in the \PDF\ -% file, which usually prevents the use of older bit-mapped fonts. +% file, which usually prevents the use of older bit-mapped fonts, +% and of older packages such as \pkg{ae}. % \index{font>bitmapped} +% The \pkg{lwarp} option \optn{pdftotextEnc} may also be useful in some situations. +% See \cref{sec:loading}. % % While using \prog{pdflatex}, % \margintag{pdflatex, T1, UTF8} % \pkg{fontenc} is automatically loaded with T1 encoding. % \pkg{fontenc} may be loaded with an additional encoding after \pkg{lwarp}. -% \pkg{inputenc} is automatically loaded with UTF8 encoding if if has not yet been loaded. +% \pkg{inputenc} is automatically loaded with UTF8 encoding if if has not yet been loaded, +% but may also be specified with another encoding such as |latin1|. +% See the next section regarding index encoding. % % While using \prog{pdflatex}, if no font-related package is specified, the default % \margintag{vector fonts} % bit-mapped Computer Modern font is used, % \margintag{Computer Modern}% % \index{font>Computer Modern}\index{Computer Modern}% -% \watchout% +% \watchout[\prog{pdflatex}]% % so simply add % \begin{sourcedisplay} % |usepackage{lmodern}| @@ -4732,16 +4948,17 @@ This boolean may be tested by the user for later use. % Avoid bit-mapped fonts. % % \XeLaTeX{} and \LuaLaTeX{} users must use the \pkg{fontspec} package. -% \watchout +% \watchout[\prog{xelatex} and \prog{lualatex}] % Do NOT use \pkg{fontenc}! % % Place \pkg{fontspec} or \pkg{fontenc} and other font and UTF-8 related commands % after the \cs{documentclass} command and before |\usepackage{lwarp}|. -% In some cases, a package conflict may require that a font package be loaded -% after \pkg{lwarp}, which should work as well. % +% In some cases, \watchout[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}| goes here, followed by any of: +% \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: @@ -4764,32 +4981,38 @@ This boolean may be tested by the user for later use. % \end{Verbatim} % \end{itemize} % \item For \prog{pdflatex}: -% \begin{itemize} -% \item \pkg{lmodern} or other font-related packages +% \begin{enumerate} +% \item |\usepackage{lmodern}|, or other font-related packages % \DescribePackage{lmodern} % \index{font>packages} -% \item \pkg{fontenc} +% \item |\usepackage[T1]{fontenc}| % \DescribePackage{fontenc} -% \item \pkg{inputenc} -% \DescribePackage{inputenc} -% \item \pkg{newunicodechar} +% \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 |\input glyphtounicode.tex| -% \DescribeFile{glyphtounicode} -% \item |\input glyphtounicode-cmr.tex% from the pdfx package| -% \item |\pdfgentounicode=1| -% \item \pkg{cmap} -% \DescribePackage{cmap} -% \item \pkg{textcomp} +% \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: +% \begin{itemize} +% \item |\usepackage{cmap}| +% \DescribePackage{cmap} +% \end{itemize} +% \item |\usepackage{textcomp}| % \DescribePackage{textcomp} -% \item \pkg{microtype} is automatically used by \pkg{lwarp} -% \DescribePackage{microtype} -% to turn off f,q,t,T,Q ligatures for the same -% \margintag{ligatures} -% browser-related reasons shown above. Also, the monospaced font is used -% during \HTML\ tag generation to turn off \TeX{} ligatures. -% \index{ligatures}\index{font>ligatures} -% \end{itemize} +% ^^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 \index{ligatures}\index{font>ligatures} +% \end{enumerate} % \end{itemize} % \item |\usepackage{lwarp}| (\cref{sec:loading}) goes after any of the above, followed by: % \item |\usepackage{newtxmath}| or other math-related font packages. @@ -4807,23 +5030,17 @@ This boolean may be tested by the user for later use. % \end{enumerate} % % -% \subsubsection{Indexes and UTF-8} +% \subsubsection{Indexes, glossaries, and encoding} % \index{UTF-8>index} % \index{index>UTF-8} % % \pkg{lwarp} uses the \prog{xindy} program to processes indexes. +% \prog{xelatex} and \prog{lualatex} use \prog{xindy} and +% \prog{pdflatex} uses \prog{texindy}. % -% While using \prog{xelatex} or \prog{lualatex}, \prog{xindy} is used for the index. -% Everything is handled in UTF-8 encoding, and should work as expected. -% -% While using \prog{pdflatex}, the \prog{texindy} program is used with the \optn{-C utf8} option, -% which is newly supported in recent distributions of \LaTeX. This option correctly -% sorts index entries into headings while using Latin languages, but will not work -% well with others. \XeLaTeX\ or \LuaLaTeX\ are recommended for non-Latin languages. -% -% For an older distribution of \LaTeX, it may be necessary to generate a local version of -% \filenm{lwarpmk.lua} and modify it to remove the \optn{-C utf8} option from the \prog{texindy} call. -% See \cref{sec:modifylwarpmk}. +% The \pkg{lwarp} option \optn{xindyLanguage} may be used to set the language option +% for \pkg{xindy}, and the \optn{xindyCodepage} option may be used to set the codepage +% option for \pkg{xindy}. These are used for both index and glossary generation. % % % \clearpage @@ -4846,10 +5063,12 @@ This boolean may be tested by the user for later use. % Set to the \cs{jobname} of the printed version even while generating \HTML. \\ % HomeHTMLFilename & The filename of the home page. \\ % HTMLFilename & A prefix for the filenames of the remaining web pages. \\ -% IndexLanguage & The \prog{xindy} language option used for index and glossary generation. \\ % latexmk & Boolean for \prog{lwarpmk} to use \prog{latexmk} for compiling documents. \\ % lwarpmk & Generate a local copy of \filenm{lwarpmk.lua}. \\ -% xdyFilename & Set a custom filename for \prog{xindy}. \\ +% xindyLanguage & The \prog{xindy} language option used for index and glossary generation. \\ +% xindyCodepage & The \prog{xindy} codepage option used for index and glossary generation. \\ +% xindyStyle & Set a custom filename for \prog{xindy}. \\ +% pdftotextEnc & Set the encoding for \prog{pdftotext}. \\ % \bottomrule % \end{tabular} % \end{table} @@ -4884,19 +5103,28 @@ This boolean may be tested by the user for later use. % % \DescribeOption{OSWindows} See \cref{sec:OSportabilityusage} if using \brand{Windows}. % -% \DescribeOption{BaseJobname} Not intended for the user. +% \DescribeOption{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:handlingpackageoptions}. % -% \DescribeOption{HomeHTMLFilename} See \cref{sec:htmlsettings}. +% \DescribeOption{HomeHTMLFilename} +% \DescribeDefault{\{\}} See \cref{sec:htmlsettings}. \\ +% +% \DescribeOption{HTMLFilename} +% \DescribeDefault{\{\}} See \cref{sec:htmlsettings}. \\ % -% \DescribeOption{HTMLFilename} See \cref{sec:htmlsettings}. +% \DescribeOption{xindyLanguage} +% \DescribeDefault{english} If using an index or glossary, +% see \cref{sec:handlingpackageoptions}. \\ % -% \DescribeOption{IndexLanguage} If using an index or glossary, -% see \cref{sec:handlingpackageoptions}. +% \DescribeOption{xindyCodepage} +% \DescribeDefault{utf8} If using an index or glossary, +% see \cref{sec:handlingpackageoptions}. \\ % -% \DescribeOption{latexmk} Has \prog{lwarpmk} use \prog{latexmk} to recompile the +% \DescribeOption{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}. @@ -4906,10 +5134,15 @@ This boolean may be tested by the user for later use. % compile the print version with the \optn{lwarpmk} option set. % See \cref{sec:handlingpackageoptions}. % -% \DescribeOption{xdyFilename} The default \prog{xindy} filename is |lwarp.xdy|. +% \DescribeOption{xindyStyle} +% \DescribeDefault{lwarp.xdy} % If you wish to use a custom |.xdy| file for -% index generation, see \cref{sec:handlingpackageoptions}. +% index generation, see \cref{sec:handlingpackageoptions}. \\ % +% \DescribeOption{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. % % % \clearpage @@ -4976,7 +5209,7 @@ This boolean may be tested by the user for later use. % \margintag{filename underscores} % \optn{HomeHTMLFilename} and \optn{HTMLFilename} options, but may need to be escaped % elsewhere, such as when appearing in a list: -% \index{underscore>filename}\index{file>underscore} +% \index{underscore>filename}\index{file>underscore in name} % \changes{v0.24}{2017/03/13}{Docs: Filename underscore.} % \begin{sourcedisplay} % \cs{item} [\cs{href}\{file\textcolor{red}{\textbackslash\_}name.pdf\}\{text\}] \textbackslash @@ -5200,17 +5433,23 @@ This boolean may be tested by the user for later use. % % \begin{description} % \ItemDescribeEnv{warpprint} An environment which is only used -% while generating print output. Place here anything which does not +% 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 +% % \ItemDescribeEnv{warpHTML} An environment which is only used % 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 +% % \ItemDescribeMacro{\warpprintonly} \marg{contents} \quad % A macro version of the \env{warpprint} environment. % @@ -5279,7 +5518,7 @@ This boolean may be tested by the user for later use. % different \HTML\ pages having different \CSS\ files assigned: % \begin{Verbatim}[gobble=2,tabsize=4] % ... -% \newCSS{myCSS.css} +% \CSSFilename{myCSS.css} % \chapter{Another Chapter} % ... % \end{Verbatim} @@ -5365,6 +5604,9 @@ This boolean may be tested by the user for later use. % ... 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}|. +% \watchout[\texttt{\cs{end}\{warpHTML\}}] +% The exact phrase is used to mark the end of the environment. % % \DescribeEnv{warpprint} % Anything which is to be done only for print output @@ -5374,6 +5616,7 @@ This boolean may be tested by the user for later use. % ... 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}|. % % \DescribeEnv{warpall} % Anything which is to be done for any output @@ -5383,6 +5626,7 @@ This boolean may be tested by the user for later use. % ... 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}|. % % % Macros are also provided for print-only or \HTML-only code: @@ -5567,12 +5811,12 @@ This boolean may be tested by the user for later use. % \end{Verbatim} % This line creates the hyperlinks for the \HTML\ index. During print output % \cs{hyperindexref} becomes a null function. -% \item In the document source use the \optn{xdyFilename} option for \pkg{lwarp}: -% \DescribeOption{xdyFilename} +% \item In the document source use the \optn{xindyStyle} option for \pkg{lwarp}: +% \DescribeOption{xindyStyle} % \begin{Verbatim}[gobble=2,tabsize=4] % \usepackage[ % ... other options ... -% xdyFilename=projectname.xdy, +% xindyStyle=projectname.xdy, % ]{lwarp} % \end{Verbatim} % \item Recompile the print version, which causes @@ -5609,9 +5853,22 @@ This boolean may be tested by the user for later use. % 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 the -% \filenm{.toc}, \filenm{.lof}, and \filenm{.lot} files should be made robust, +% \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} % % \subsection{Formatting} @@ -5630,17 +5887,20 @@ This boolean may be tested by the user for later use. % Use the environments \env{center}, \env{flushright}, \env{flushleft} instead % of the macros \cs{centering}, \cs{raggedright}, \cs{raggedleft}. % +% \limitsfloatalignment +% % % \subsubsection{Accents} % % \limitsaccents % % -% \subsubsection{Textcomp} +% \subsubsection{\pkg{textcomp} package} % % \DescribePackage{textcomp} % \limitstextcomp -% +% \index{font>missing symbols} +% \index{textcomp>missing symbols} % % \subsubsection{Superscripts and other non-math uses of math mode} % @@ -5649,12 +5909,14 @@ This boolean may be tested by the user for later use. % \subsubsection{Empty \cs{item} followed by a new line of text or a nested list:} % % Use a trailing backslash: |\item[label] \| -% \index{item>empty}\index{list item, empty} +% \margintag{lists} +% \index{item>empty}\index{list>empty item} % % % \subsubsection{Filenames and URLs in lists or footnotes} % -% \index{underscore>filename}\index{file>underscore} +% \index{underscore>filename}\index{file>underscore in name} +% \index{list>filename} % \changes{v0.24}{2017/03/13}{Docs: Filename underscore.} % Escape underscores in % \margintag{filename underscore} @@ -5956,6 +6218,17 @@ This boolean may be tested by the user for later use. % \limitsendnotes % % +% \subsubsection{BibTeX} +% \label{sec:limitsbibtex} +% \index{BibTeX>\cs{etalchar} error} +% \index{warning>Improper \cs{prevdepth}.} +% \index{Improper \cs{prevdepth}.} +% \DescribeMacro{\etalchar} Displays a superscript ``+'' to indicate ``and others''. +% \changes{v0.54}{2018/03/09}{Docs: BibTeX.} +% +% \limitsbibtex +% +% % \subsubsection{\pkg{glossaries} package} % \label{sec:glossaries} % @@ -5969,8 +6242,6 @@ This boolean may be tested by the user for later use. % % \changes{v0.38}{2017/08/24}{Docs: Index, \pkg{tocbibind}.} % -% \DescribePackage{makeidx} -% \DescribePackage{tocbibind} % \limitsindex % % See \cref{sec:index} for \pkg{lwarp}'s core index and glossary code, @@ -6110,6 +6381,15 @@ This boolean may be tested by the user for later use. % % \subsection{Floats} % +% \subsubsection{Float contents alignment} +% +% \index{float>text alignment} +% \index{figure>text alignment} +% \index{table>text alignment} +% \index{alignment>figure or table} +% \limitsfloatalignment +% +% % \subsubsection{\pkg{float}, \pkg{trivfloat}, and/or \pkg{algorithmicx} together} % % \DescribePackage{float} @@ -6188,6 +6468,13 @@ This boolean may be tested by the user for later use. % \limitsbabeltwo % % +% \subsubsection{\pkg{polyglossia} package} +% \label{sec:limitspolyglossia} +% +% \DescribePackage{polyglossia} +% \limitspolyglossia +% +% % \subsubsection{\pkg{todonotes} and \pkg{luatodonotes} packages} % % \DescribePackage{todonotes} @@ -6258,18 +6545,21 @@ This boolean may be tested by the user for later use. % \end{itemize} % % The resulting files will be ready to be loaded into an \EPUB\ conversion -% program, such as the open-source program Calibre (\url{https://calibre-ebook.com/}). -% \index{Calibre}\index{EPUB>conversion software}\margintag{Calibre} +% program, such as the open-source program \prog{Calibre} (\url{https://calibre-ebook.com/}). +% \index{Calibre}\index{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 % \watchout[search order] % do a breadth-first search of the files. -% For Calibre, this option is found in +% For \prog{Calibre}, this option is found in % \begin{UIdisplay} % \textsf{Preferences $\to$ Plugins $\to$ File type plugins $\to$ HTML to Zip} % \end{UIdisplay} % Check the box \textsf{Add linked files in breadth first order.} +% Set the document encoding as |utf-8|\watchout[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. % \watchout[section breaks] @@ -6279,7 +6569,7 @@ This boolean may be tested by the user for later use. % 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 Calibre, this option is found in +% For \prog{Calibre}, this option is found in % \begin{UIdisplay} % \textsf{Preferences $\to$ Conversion (Common Options) $\to$ % Structure Detection $\to$ Detect chapters at (XPath expression)} @@ -6299,7 +6589,7 @@ This boolean may be tested by the user for later use. % button. % % Once these settings have been made, the \pkg{lwarp}-generated \HTML\ files -% may be loaded by Calibre, and then converted to an \EPUB. +% may be loaded by \prog{Calibre}, and then converted to an \EPUB. % % \begin{docsidebar}[\brand{MathJax} support] % \brand{MathJax} may be used in \EPUB\ documents. @@ -6832,6 +7122,7 @@ This boolean may be tested by the user for later use. % % \clearpage % +% ^^A *troubleshooting % \section{Troubleshooting} % \label{sec:troubleshooting} % \index{FAQ}\index{Frequently Asked Questions}\index{bugs} @@ -6872,6 +7163,9 @@ This boolean may be tested by the user for later use. % 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\}}:] +% Each of these must be without any other characters on the same line. +% % \item [Options clash:] If using \pkg{memoir}, see \cref{sec:limitsmemoir}. % % \item [``Missing \$ inserted.'':] If using a filename or URL in a @@ -6896,6 +7190,8 @@ This boolean may be tested by the user for later use. % \index{Leaders not followed by proper glue.} % % \item [``Improper \cs{prevdepth}'':] +% \index{warning>Improper \cs{prevdepth}.} +% \index{Improper \cs{prevdepth}.} % \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}, @@ -6913,8 +7209,14 @@ This boolean may be tested by the user for later use. % 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. -% \index{warning>Improper \cs{prevdepth}.} -% \index{Improper \cs{prevdepth}.} +% +% If using BibTeX, see \cref{sec:limitsbibtex}.\watchout[BibTeX] +% +% \item[``\texttt{!~Undefined control sequence. \dots\ \cs{@begindocumenthook}''}:] ~ +% \watchout[\pkg{polyglossia}] +% See \cref{sec:limitspolyglossia} +% if using \pkg{polyglossia}. +% % \item[``\texttt{\cs{begin}\{equation\} ended by \cs{end}\{document\}}'':] Do not % \watchout[custom macros for environments] % use custom macros such as \cs{beq} and \cs{eeq} to replace @@ -6926,8 +7228,15 @@ This boolean may be tested by the user for later use. % \item[Complicated objects inside display math:] Some objects, such as \tikz, % \watchout[display math] % may not compile in \pkg{lwarp}'s normal display math emulation. -% Insert \cs{displaymathother} before the display math environment, -% and then \cs{displaymathnormal} when displaying ``normal'' math. +% Insert +% \begin{sourcedisplay} +% \cs{displaymathother} +% \end{sourcedisplay} +% before the display math environment, and then +% \begin{sourcedisplay} +% \cs{displaymathnormal} +% \end{sourcedisplay} +% when displaying ``normal'' math. % See \cref{sec:displaymathother}. % \end{description} % @@ -6962,6 +7271,8 @@ This boolean may be tested by the user for later use. % \item \limitscpageref % \end{itemize} % +% \item [BibTeX errors with \cs{etalchar}:] See \cref{sec:limitsbibtex}. +% % \item [Malformed URLs:] Do not use the \texttt{\%} character between % \index{hyperref>incorrect links} % arguments of \cs{hyperref}, etc., as this character is among those which @@ -7081,9 +7392,10 @@ This boolean may be tested by the user for later use. % For the most recent changes and the start of the Index, % see page \pageref{sec:changesend}. % } -% % % +% \clearpage +% % \part{lwarp.sty} % % @@ -7120,6 +7432,8 @@ This boolean may be tested by the user for later use. % Testing has primarily been done with the Iceweasel/Firefox browser. % % +% \clearpage +% % \section{Section depths and HTML headings} % \label{sec:stackdepths} % \index{HTML>headings} @@ -7265,10 +7579,10 @@ This boolean may be tested by the user for later use. % % \section{pdfLaTeX T1 and UTF8 encoding} % -% When using pdf\LaTeX, \pkg{lwarp} required T1 and UTF8 encoding. +% When using pdf\LaTeX, \pkg{lwarp} requires T1 encoding, and recommends UTF8 encoding. % -% If some other input encoding is already defined, try to use it instead, and -% hope for the best. +% 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 UTF8 by nature. % @@ -7278,8 +7592,11 @@ This boolean may be tested by the user for later use. % \begin{macrocode} \ifPDFTeX \RequirePackage[T1]{fontenc} + \@ifpackageloaded{inputenc}{}{ -\RequirePackage[utf8]{inputenc} + \@ifpackageloaded{inputenx}{}{ + \RequirePackage[utf8]{inputenc} + } } \fi % \end{macrocode} @@ -7570,20 +7887,32 @@ This boolean may be tested by the user for later use. -% \DescribeOption{IndexLanguage} Sets the language to be assigned +% \DescribeOption{xindyLanguage} Sets the \pkg{xindy} language to be assigned % 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 \pkg{xindy} codepage to be assigned +% in \prog{lwarpmk}'s configuration files. This is then used by \prog{lwarpmk} while +% processing the index and glossary. +% +% \changes{v0.54}{2018/04/06}{Add: \optn{xindyCodepage}.} % % \begin{macrocode} -\DeclareStringOption[english]{IndexLanguage} +\DeclareStringOption[utf8]{xindyCodepage} % \end{macrocode} -% \DescribeOption{xdyFilename} Selects a custom |.xdy| file. +% \DescribeOption{xindyStyle} Selects a custom |.xdy| file. % The default is |lwarp.xdy|. % A customized file should be based on |lwarp.xdy|, and must retain % the line @@ -7592,12 +7921,23 @@ This boolean may be tested by the user for later use. % \end{Verbatim} % % \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} + + +% \limitspdftotextenc +% +% \changes{v0.54}{2018/04/06}{Add: \optn{pdftotextEnc}.} % % \begin{macrocode} -\DeclareStringOption[lwarp.xdy]{xdyFilename} +\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. @@ -7809,7 +8149,7 @@ This boolean may be tested by the user for later use. % \end{sourcedisplay} % which use \cs{LWR@loadbefore} to trigger an error if they are loaded after % \pkg{lwarp}. -% Examples include \pkg{fontspec}, \pkg{inputenc}, \pkg{fontenc}, +% Examples include \pkg{fontspec}, \pkg{inputenc}, \pkg{inputenx}, \pkg{fontenc}, % and \pkg{newunicodechar}. % % Most packages should be loaded after \pkg{lwarp}. This is enfoced by @@ -7893,6 +8233,43 @@ For a possible alternative, see package(s) #2.} % \end{macro} % % +% \begin{macro}{\LWR@earlyloadnever} \marg{badpackagename} \marg{replacementpkgname} +% +% The first packages 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.54}{2018/04/06}{Added.} +% +% \begin{macrocode} +\newcommand*{\LWR@earlyloadnever}[2]{% +\@ifpackageloaded{#1}{% +\PackageError{lwarp} +{Package #1 is not supported by lwarp's HTML conversion. +Package(s) #2 may be useful instead} +{Package #1 might conflict with lwarp in some way, +or is superceded by another package. +For a possible alternative, see package(s) #2.} +}{}% +} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{Error for disallowed packages loaded before lwarp} +% \changes{v0.54}{2018/04/06}{Added early check for disallowed packages.} +% +% \begin{macrocode} +\LWR@earlyloadnever{ae}{lmodern} +\LWR@earlyloadnever{aecc}{lmodern} +\LWR@earlyloadnever{boxedminipage}{boxedminipage2e} +\LWR@earlyloadnever{caption2}{caption} +% \LWR@earlyloadnever{ccaption}{caption}% might be preloaded by memoir +\LWR@earlyloadnever{fancyheadings}{fancyhdr} +\LWR@earlyloadnever{t1enc}{fontenc, inputenc, inputenx} +\LWR@earlyloadnever{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol} +% \end{macrocode} +% +% % \subsection{Enforcing package loading after \pkg{lwarp}} % % Packages which should only be loaded after \pkg{lwarp} are tested @@ -7939,7 +8316,6 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{bytefield} \LWR@loadafter{cancel} \LWR@loadafter{caption} -\LWR@notmemoirloadafter{ccaption} \LWR@loadafter{changebar} \LWR@notmemoirloadafter{changepage} \LWR@notmemoirloadafter{chngpage} @@ -8003,6 +8379,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{footnote} \LWR@loadafter{footnotehyper} \LWR@loadafter{footnpag} +\LWR@loadafter{forest} \LWR@loadafter{framed} \LWR@loadafter{ftnright} \LWR@loadafter{fullpage} @@ -8014,6 +8391,7 @@ For a possible alternative, see package(s) #2.} % \LWR@loadafter{graphicx}% pre-loaded by xunicode \LWR@loadafter{grffile} \LWR@loadafter{grid} +\LWR@loadafter{gridset} \LWR@loadafter{hang} \LWR@loadafter{hanging} \LWR@loadafter{hypcap} @@ -8026,6 +8404,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{ifoddpage} \LWR@loadafter{indentfirst} % inputenc must be loaded before lwarp +% inputenx must be loaded before lwarp \LWR@loadafter{keyfloat} \LWR@loadafter{layout} \LWR@loadafter{letterspace} @@ -8040,6 +8419,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{ltxtable} \LWR@loadafter{luacolor} \LWR@loadafter{luatodonotes} +\LWR@loadafter{magaz} \LWR@loadafter{marginfit} \LWR@loadafter{marginfix} \LWR@loadafter{marginnote} @@ -9409,7 +9789,7 @@ top=1in,bottom=1in,% \let\LWR@origthispagestyle\thispagestyle \LetLtxMacro\LWR@origpagenumbering\pagenumbering -\LetLtxMacro{\LWR@origminipage}{\minipage} +\LetLtxMacro\LWR@origminipage\minipage \let\LWR@origendminipage\endminipage \LetLtxMacro{\LWR@origparbox}{\parbox} @@ -9577,8 +9957,7 @@ top=1in,bottom=1in,% % \end{macrocode} - - +% ^^A *lwarpmk.conf % \subsection{lwarpmk.conf} % % \DescribeFile{lwarpmk.conf} @@ -9598,8 +9977,12 @@ top=1in,bottom=1in,% % htmlfilename = "" -- or "projectname" if numbered HTML files % \end{Verbatim} % -% \changes{v0.29}{2017/04/15}{File: \filenm{lwarpmk.conf}: Add: \optn{language} +% \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.} % % \codeprint % \begin{macrocode} @@ -9626,8 +10009,10 @@ homehtmlfilename = "\HomeHTMLFilename"% } \immediate\write\LWR@quickfile{htmlfilename = "\HTMLFilename"} \immediate\write\LWR@quickfile{latexmk = "\ifbool{LWR@latexmk}{true}{false}"} -\immediate\write\LWR@quickfile{language = "\LWR@IndexLanguage"} -\immediate\write\LWR@quickfile{xdyfile = "\LWR@xdyFilename"} +\immediate\write\LWR@quickfile{xindylanguage = "\LWR@xindyLanguage"} +\immediate\write\LWR@quickfile{xindycodepage = "\LWR@xindyCodepage"} +\immediate\write\LWR@quickfile{xindystyle = "\LWR@xindyStyle"} +\immediate\write\LWR@quickfile{pdftotextenc = "\LWR@pdftotextEnc"} \immediate\closeout\LWR@quickfile \end{warpprint} % \end{macrocode} @@ -9638,8 +10023,12 @@ homehtmlfilename = "\HomeHTMLFilename"% % % \DescribeFile{project.lwarpmkconf} A project-specific configuration file for \prog{lwarpmk}. % -% \changes{v0.29}{2017/04/15}{File: \filenm{*.lwarpmkconf}: Add: \optn{language} +% \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.} % % \begin{macrocode} \begin{warpprint} @@ -9665,8 +10054,10 @@ homehtmlfilename = "\HomeHTMLFilename"% } \immediate\write\LWR@quickfile{htmlfilename = "\HTMLFilename"} \immediate\write\LWR@quickfile{latexmk = "\ifbool{LWR@latexmk}{true}{false}"} -\immediate\write\LWR@quickfile{language = "\LWR@IndexLanguage"} -\immediate\write\LWR@quickfile{xdyfile = "\LWR@xdyFilename"} +\immediate\write\LWR@quickfile{xindylanguage = "\LWR@xindyLanguage"} +\immediate\write\LWR@quickfile{xindycodepage = "\LWR@xindyCodepage"} +\immediate\write\LWR@quickfile{xindystyle = "\LWR@xindyStyle"} +\immediate\write\LWR@quickfile{pdftotextenc = "\LWR@pdftotextEnc"} \immediate\closeout\LWR@quickfile \end{warpprint} % \end{macrocode} @@ -9688,6 +10079,7 @@ homehtmlfilename = "\HomeHTMLFilename"% % \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.} % % ^^A *lwarp.css % \begin{macrocode} @@ -9787,12 +10179,12 @@ span.textcircled { border: 1px solid black ; border-radius: 1ex ; } span.underline { text-decoration: underline ; - text-decoration-skip ; + text-decoration-skip: auto ; } span.overline { text-decoration: overline ; - text-decoration-skip ; + text-decoration-skip: auto ; } /* for diagbox */ @@ -9833,12 +10225,9 @@ div.diagboxW { top: .5em; } -span.attribution { - margin-left: 1em ; font-size: 80% ; font-variant: small-caps; -} - -span.citetitle { - margin-left: 1em ; font-size: 80% ; font-style: oblique; +div.attribution p { + text-align: right ; + font-size: 80% } span.poemtitle { @@ -9928,24 +10317,24 @@ div.dictumauthor { font-style:italic } /* lettrine package: */ -span.lettrine { font-size: 3ex ; float: left ; } +span.lettrine { font-size: 4ex ; float: left ; } span.lettrinetext { font-variant: small-caps ; } /* ulem and soul packages: */ span.uline { text-decoration: underline ; - text-decoration-skip ; + text-decoration-skip: auto ; } span.uuline { text-decoration: underline ; - text-decoration-skip ; + text-decoration-skip: auto ; text-decoration-style: double ; } span.uwave { text-decoration: underline ; - text-decoration-skip ; + text-decoration-skip: auto ; text-decoration-style: wavy ; } @@ -9959,13 +10348,13 @@ span.xout { span.dashuline { text-decoration: underline ; - text-decoration-skip ; + text-decoration-skip: auto ; text-decoration-style: dashed ; } span.dotuline { text-decoration: underline ; - text-decoration-skip ; + text-decoration-skip: auto ; text-decoration-style: dotted ; } @@ -11602,9 +11991,10 @@ nav.botnavigation { /* ( --- Start of project.css --- ) */ /* ( --- A sample project-specific CSS file for lwarp --- ) */ -/* Load default lwarp settings: */ +/* Uncomment one of the following: */ @import url("lwarp.css") ; -/* or lwarp_formal.css, lwarp_sagebrush.css */ +/* @import url("lwarp_formal.css") ; */ +/* @import url("lwarp_sagebrush.css") ; */ /* Project-specific CSS setting follow here. */ /* . . . */ @@ -11865,8 +12255,16 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX- % \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}: Adds warning for corrupted images.} -% \changes{v0.53}{2018/04/01}{\prog{lwarpmk}: Adds \cmds{lwarpmk cleanlimages}.} +% \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.} % % The following is only generated if the \optn{lwarpmk} option % was given to \pkg{lwarp}. @@ -11883,7 +12281,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX- -- Print the usage of the lwarpmk command: -printversion = "v0.53" +printversion = "v0.55" function printhelp () print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ; @@ -11928,8 +12326,10 @@ sourcename = "projectname" (the source-code filename w/o .tex) homehtmlfilename = "index" (or perhaps the project name) htmlfilename = "" (or "projectname" - filename prefix) latexmk = "false" (or "true" to use latexmk to build PDFs) -languge = "english" (use a language supported by xindy) -xdyfile = "lwarp.xdy" (or a custom file based on lwarp.xdy) +xindylanguge = "english" (use a language supported by xindy) +xindycodepage = "utf8" (use a codepage supported by xindy) +xindystyle = "lwarp.xdy" (or a custom file based on lwarp.xdy) +pdftotextenc = "UTF-8" (use an encoding supported by pdftotext) -- Filenames must contain only letters, numbers, underscore, or dash. Values must be in "quotes". @@ -11977,17 +12377,24 @@ function loadconf () local conffile = "lwarpmk.conf" -- Optional configuration filename: if ( arg[2] ~= nil ) then conffile = arg[2]..".lwarpmkconf" end --- Default language: -language = "english" --- Default xdyfile: -xdyfile = "lwarp.xdy" +-- Default xindy language: +xindylanguage = "english" +-- Default xindy codepage: +xindycodepage = "utf8" +-- Default xindystyle: +xindystyle = "lwarp.xdy" +-- Default pdftotext encoding: +pdftotextenc = "UTF-8" -- Verify the file exists: if (lfs.attributes(conffile,"mode")==nil) then -- file not exists print ("lwarpmk: ===") - print ("lwarpmk: " .. conffile .." does not exist.") + print ("lwarpmk: File \"" .. conffile .."\" does not exist.") + print ("lwarpmk: Move to the project's source directory,") + print ("lwarpmk: recompile using pdflatex, xelatex, or lualatex,") + print ("lwarpmk: then try using lwarpmk again.") if ( arg[2] ~= nil ) then - print ("lwarpmk: " .. arg[2] .. " does not appear to be a project name.\n") + print ("lwarpmk: (\"" .. arg[2] .. "\" does not appear to be a project name.)") end print ("lwarpmk: ===") printhelp () ; @@ -12032,8 +12439,10 @@ elseif ( cvarname == "sourcename" ) then sourcename = cvalue elseif ( cvarname == "homehtmlfilename" ) then homehtmlfilename = cvalue elseif ( cvarname == "htmlfilename" ) then htmlfilename = cvalue elseif ( cvarname == "latexmk" ) then latexmk = cvalue -elseif ( cvarname == "language" ) then language = cvalue -elseif ( cvarname == "xdyfile" ) then xdyfile = cvalue +elseif ( cvarname == "xindylanguage" ) then xindylanguage = cvalue +elseif ( cvarname == "xindycodepage" ) then xindycodepage = cvalue +elseif ( cvarname == "xindystyle" ) then xindystyle = cvalue +elseif ( cvarname == "pdftotextenc" ) then pdftotextenc = cvalue else print ("lwarpmk: ===") print ("lwarpmk: " .. linenum .. " : " .. line ) ; @@ -12087,13 +12496,13 @@ elseif opsystem=="Windows" then -- For Windows else print ( "lwarpmk: Select Unix or Windows for opsystem" ) end --- for Windows --- set xindycmd according to pdflatex vs xelatex/lualatex: +-- set xindycmd, glossarycmd according to pdflatex vs xelatex/lualatex: if ( latexname == "pdflatex" ) then - xindycmd = "texindy -C utf8" - glossarycmd = "xindy -C utf8" + xindycmd = "texindy " + glossarycmd = "xindy " else - xindycmd = "xindy -M texindy -C utf8" - glossarycmd = "xindy -C utf8" + xindycmd = "xindy -M texindy " + glossarycmd = "xindy " end end -- loadconf @@ -12167,7 +12576,7 @@ function pdftohtml () -- Convert to text: print ("lwarpmk: Converting " .. sourcename .."_html.pdf to " .. sourcename .. "_html.html") -os.execute("pdftotext -enc UTF-8 -nopgbrk -layout " +os.execute("pdftotext -enc " .. pdftotextenc .. " -nopgbrk -layout " .. sourcename .. "_html.pdf " .. sourcename .. "_html.html") -- Split the result into individual HTML files: splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html") @@ -12189,33 +12598,98 @@ os.execute ( rmname .. " *.aux " .. ) end --- Create lateximages based on lateximages.txt: -function createlateximages () -print ("lwarpmk: Creating lateximages.") -local limagesfile = io.open("lateximages.txt", "r") -if ( limagesfile == nil ) then +-- Error if the HTML document does not exist. +-- The lateximages are drawn from the HTML PDF verison of the document, +-- so "lwarpmk html" must be done before "lwarpmk limages". +function checkhtmlpdfexists () +local htmlpdffile = io.open(sourcename .. "_html.pdf", "r") +if ( htmlpdffile == nil ) then + print ("") + print ("lwarpmk: ===") + print ("lwarpmk: The HTML version of the document does not exist.") + print ("lwarpmk: Enter \"lwarpmk html\" to compile the HTML version.") + print ("lwarpmk: ===") + os.exit(1) +end +io.close (htmlpdffile) +end -- checkhtmlpdfexists + +-- Warning of a missing lateximages.txt file: +function warnlimages () print ("lwarpmk: ===") print ("lwarpmk: \"lateximages.txt\" does not exist.") print ("lwarpmk: Your project does not use SVG math or other lateximages,") print ("lwarpmk: or the file has been deleted somehow.") - print ("lwarpmk: Use \"lwarpmk html\" to recompile your project,") + print ("lwarpmk: Use \"lwarpmk html\" to recompile your project") print ("lwarpmk: and recreate \"lateximages.txt\".") print ("lwarpmk: If your project does not use SVG math or other lateximages,") print ("lwarpmk: then \"lateximages.txt\" will never exist, and") print ("lwarpmk: \"lwarpmk limages\" will not be necessary.") print ("lwarpmk: ===") +end -- warnlimages + + +-- Check lateximages.txt to see if need to recompile first. +-- If any entry has a page number of zero, then there were incorrect images. +function checklimages () +print ("lwarpmk: Checking for a valid lateximages.txt file.") +local limagesfile = io.open("lateximages.txt", "r") +if ( limagesfile == nil ) then + warnlimages () + os.exit(1) +end +-- Track warning to recompile if find a page 0 +local pagezerowarning = false +-- Scan lateximages.txt +for line in limagesfile:lines() do + -- lwimgpage is the page number in the PDF which has the image + -- lwimghash is true if this filename is a hash + -- lwimgname is the lateximage filename root to assign for the image + i,j,lwimgpage,lwimghash,lwimgname = string.find (line,"|(.*)|(.*)|(.*)|") + -- For each entry: + if ( (i~=nil) ) then + -- If the page number is 0, image references are incorrect + -- and must recompile the soure document: + if ( lwimgpage == "0" ) then + pagezerowarning = true + end + end -- if i~=nil +end -- do +if ( pagezerowarning ) then + print ("") + print ("lwarpmk: ===") + print ("lwarpmk: The document must be recompiled before creating the lateximages.") + print ("lwarpmk: Enter \"lwarpmk html\" again, then try \"lwarpmk limages\" again.") + print ("lwarpmk: ===") + os.exit(1) ; +end -- pagezerowarning +end -- checklateximages + + +-- Create lateximages based on lateximages.txt: +function createlateximages () +-- See if the document must be recompiled first: +checklimages () +-- See if the print version exists: +checkhtmlpdfexists () +-- Attempt to create the lateximages: +print ("lwarpmk: Creating lateximages.") +local limagesfile = io.open("lateximages.txt", "r") +if ( limagesfile == nil ) then + warnlateximages () os.exit(1) end -- Create the lateximages directory, ignore error if already exists err = os.execute("mkdir lateximages") --- For Windows, create lwarp_one_limage.cmd: +-- For Windows, create lwarp_one_limage.cmd from lwarp_one_limage.txt: if opsystem=="Windows" then err = os.execute ( cpname .. " lwarp_one_limage.txt lwarp_one_limage.cmd" ) if ( err ~= 0 ) then print ("lwarpmk: ===") - print ("lwarpmk: File error trying to copy to lwarp_one_limage.cmd") + print ("lwarpmk: File error trying to copy") + print (" lwarp_one_limage.txt to lwarp_one_limage.cmd") print ("lwarpmk: ===") os.exit(1) ; end @@ -12315,6 +12789,10 @@ end -- not page 0 end -- not nil end -- do io.close(limagesfile) +print ( "lwarpmk limages: ===") +print ( "lwarpmk limages: Wait a moment for the images to complete" ) +print ( "lwarpmk limages: before reloading the page." ) +print ( "lwarpmk limages: ===") print ( "lwarpmk limages: done" ) if ( pagezerowarning == true ) then print ( "lwarpmk limages: WARNING: Images will be incorrect." ) @@ -12335,8 +12813,9 @@ err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder " .. opquote .. "$makeindex = q/" -- $ .. xindycmd - .. " -M " .. xdyfile - .. " -L " .. language .. " /" + .. " -M " .. xindystyle + .. " -C " .. xindycodepage + .. " -L " .. xindylanguage .. " /" .. opquote .. " -pdflatex=\"" .. latexname .." %O %S\" " .. sourcename..fsuffix ..".tex" ) ; @@ -12401,8 +12880,9 @@ loadconf () print ("lwarpmk: Processing the index.") os.execute( xindycmd - .. " -M " .. xdyfile - .. " -L " .. language + .. " -M " .. xindystyle + .. " -C " .. xindycodepage + .. " -L " .. xindylanguage .. " " .. sourcename .. ".idx") print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.") refreshdate () @@ -12417,7 +12897,10 @@ elseif arg[1] == "printglossary" then loadconf () print ("lwarpmk: Processing the glossary.") -os.execute(glossarycmd .. " -L " .. language .. " -I xindy -M " .. sourcename .. +os.execute(glossarycmd .. + " -L " .. xindylanguage .. + " -C " .. xindycodepage .. + " -I xindy -M " .. sourcename .. " -t " .. sourcename .. ".glg -o " .. sourcename .. ".gls " .. sourcename .. ".glo") print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.") @@ -12472,8 +12955,9 @@ loadconf () print ("lwarpmk: Processing the index.") os.execute( xindycmd - .. " -M " .. xdyfile - .. " -L " .. language + .. " -M " .. xindystyle + .. " -L " .. xindylanguage + .. " -C " .. xindycodepage .. " " .. sourcename .. "_html.idx" ) print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.") @@ -12489,7 +12973,10 @@ elseif arg[1] == "htmlglossary" then loadconf () print ("lwarpmk: Processing the glossary.") -os.execute(glossarycmd .. " -L " .. language .. " -I xindy -M " ..sourcename .. +os.execute(glossarycmd .. + " -L " .. xindylanguage .. + " -C " .. xindycodepage .. + " -I xindy -M " ..sourcename .. "_html -t " .. sourcename .. "_html.glg -o " ..sourcename .. "_html.gls " ..sourcename .. "_html.glo") @@ -12557,8 +13044,8 @@ elseif (arg[1] == "-h" ) or (arg[1] == "--help") then printusage () else -print ("lwarpmk: Unknown command \""..arg[1].."\".\n") printhelp () +print ("\nlwarpmk: ****** Unknown command \""..arg[1].."\". ******\n") end end -- not --version @@ -13238,6 +13725,7 @@ end -- not --version % \changes{v0.46}{2018/01/20}{Fix: Improper \cs{prevdepth}.} % \begin{macrocode} \newcommand{\LWR@forcenewpage}{% +\LWR@traceinfo{LWR@forcenewpage}% \ifinner\else% \LWR@stoppars\LWR@orignewpage\LWR@startpars% \fi% @@ -13352,8 +13840,7 @@ end -- not --version -% \subsection{Babel-French} - +% \subsection{Babel-French tag modifications} % \changes{v0.34}{2017/08/03}{\pkg{babel-french}: Adds fixed-width HTML spaces to punctuation.} % \changes{v0.36}{2017/08/15}{\pkg{babel-french}: Adjustements for French variants, @@ -15221,6 +15708,7 @@ end -- not --version \LWR@stoppars \LWR@htmltag{/body}\LWR@orignewline \LWR@htmltag{/html}\LWR@orignewline +\LWR@traceinfo{LWR@newhtmlfile: about to LWR@orignewpage} \LWR@orignewpage \addtocounter{LWR@htmlfilenumber}{1}% @@ -16245,6 +16733,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@origonecolumn% \LWR@origpagestyle{empty}% % \end{macrocode} +% No black box for overfull lines: +% \changes{v0.55}{2018/04/24}{Fix: Overfull boxes in \env{lateximage}s.} +% \begin{macrocode} +\overfullrule=0pt +% \end{macrocode} % Reduce chance of line overflow in verbatim environments: % \begin{macrocode} \LWR@origscriptsize% @@ -16279,15 +16772,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \renewcommand{\ps@plain}{} % \end{macrocode} -% Not used in the \HTML\ environment: -% \DescribeMacro{\centering} -% \DescribeMacro{\raggedleft} -% \DescribeMacro{\raggedright} -% \begin{macrocode} -\renewcommand*{\centering}{} -\renewcommand*{\raggedleft}{} -\renewcommand*{\raggedright}{} -% \end{macrocode} % Plug in some new actions. % This is done just before the document start % so that they won't be over-written by some other package. @@ -17207,77 +17691,37 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \section{Quote and verse} -% \subsection{Citations and attributions} +% \subsection{Attributions} % \begin{macro}{\attribution} -% For use inside quote, quotation, verse: +% For use with quote, quotation, verse: % -% Fx: |\attribution{author name} --- \citetitle{book name}| +% Ex: |"A quotation." \attribution{\textsc{Author Name}\\\textsl{Book Title}}| % -% \changes{v0.52}{2018/04/01}{Fix: Non-utf8 encoding.} % \codehtml % \begin{macrocode} \begin{warpHTML} -\ifPDFTeX% -\ifdefstring{\inputencodingname}{utf8}{% -\newcommand{\attribution}[1]{% - \InlineClass{attribution}{—\,#1}% emdash -} -}{ \newcommand{\attribution}[1]{% - \InlineClass{attribution}{---\,#1}% -} -} -\else% -\newcommand{\attribution}[1]{% - \InlineClass{attribution}{—\,#1}% emdash + \begin{BlockClass}{attribution} + #1 + \end{BlockClass} } -\fi% \end{warpHTML} % \end{macrocode} % \codeprint % \begin{macrocode} \begin{warpprint} -\newcommand{\attribution}[1]{\textsc{---\,#1}} -\end{warpprint} -% \end{macrocode} -% \end{macro} - -% \begin{macro}{\citetitle} -% for use inside quote, quotation, verse: -% -% \changes{v0.52}{2018/04/01}{Fix: Non-utf8 encoding.} -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -\ifPDFTeX% -\ifdefstring{\inputencodingname}{utf8}{% -\newcommand{\citetitle}[1]{% - \InlineClass{citetitle}{—\,#1}% -}% -}{ -\newcommand{\citetitle}[1]{% - \InlineClass{citetitle}{---\,#1}% -}% +\newcommand{\attribution}[1]{ + \begin{flushright} + \unskip + #1 + \end{flushright}% } -\else% -\newcommand{\citetitle}[1]{% - \InlineClass{citetitle}{—\,#1}% -}% -\fi% -\end{warpHTML} -% \end{macrocode} -% -% \codeprint -% \begin{macrocode} -\begin{warpprint} -\newcommand{\citetitle}[1]{\textsl{---\,#1}} \end{warpprint} % \end{macrocode} % \end{macro} - % \subsection{Quotes, quotations} % \codehtml @@ -17313,25 +17757,55 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % % \limitsverse % +% \subsubsection{\LaTeX\ core \env{verse} environment} +% +% \codehtml +% \begin{macrocode} +\begin{warpHTML} +% \end{macrocode} +% +% \begin{environment}{verse} +% \changes{v0.54}{2018/04/08}{Fix: Line spacing.} +% \begin{macrocode} +\renewenvironment{verse} + {\let\\\newline% lwarp + \list{}{\itemsep \z@ + \itemindent -1.5em% + \listparindent\itemindent + \rightmargin \leftmargin + \advance\leftmargin 1.5em}% + \item\relax} + {\endlist} +% \end{macrocode} +% \end{environment} +% +% \begin{macrocode} +\end{warpHTML} +% \end{macrocode} +% +% % \codeall % \begin{macrocode} \begin{warpall} % \end{macrocode} % -% The following lengths may be set in either print or \HTML\ output, +% \subsubsection{\pkg{verse} and \pkg{memoir}} +% +% The following lengths are used by \pkg{verse} and \pkg{memoir}. +% They may be set in either print or \HTML\ output, % but are only used in \HTML. % This allows the user to set \cs{vleftskip} and \cs{leftmargini} for % print output, and optionally select different values for \HTML. % -% \DescribeLength{HTMLvleftskip} +% \DescribeLength{\HTMLvleftskip} % Sets \cs{vleftskip} inside a \env{verse} environment in \HTML. % \begin{macrocode} \newlength{\HTMLvleftskip} \setlength{\HTMLvleftskip}{1em} % \end{macrocode} -% \DescribeLength{HTMLleftmargini} +% \DescribeLength{\HTMLleftmargini} % Sets \cs{leftmargini} inside a \env{verse} environment in \HTML. % \begin{macrocode} \newlength{\HTMLleftmargini} @@ -17411,8 +17885,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@htmltag{pre class="#3" \ifthenelse{\equal{#1}{}}{}{style="#1"}% }% - \unskip\LWR@origvspace*{-#2\baselineskip}% \LWR@orignewline% pre + \leavevmode\unskip\LWR@origvspace*{-#2\baselineskip}% }{}% % \end{macrocode} % Use a mono-spaced font to preserve horizontal positioning. @@ -17423,9 +17897,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \begingroup% % \end{macrocode} % \changes{v0.50}{2018/03/02}{Improved column alignment.} +% \changes{v0.54}{2018/04/06}{Improved column alignment.} % \begin{macrocode} -\LWR@orignormalsize% +% \LWR@orignormalsize% \LWR@origttfamily% +\LWR@origsmall% % \end{macrocode} % Since inside a \element{pre}, restore the original list processing: % \begin{macrocode} @@ -17444,16 +17920,21 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{macro} -% \begin{macro}{\LWR@afterendverbatim} Finishes enclosing a verbatim environment. +% \begin{macro}{\LWR@afterendverbatim} +% \marg{negative \cs{baselineskip} \cs{vspace}} +% +% Finishes enclosing a verbatim environment. +% \changes{v0.54}{2018/04/07}{Added vspace argument.} % \begin{macrocode} -\newcommand*{\LWR@afterendverbatim}{% - +\newcommand*{\LWR@afterendverbatim}[1]{% \endgroup% +\par% % \end{macrocode} % At the end of the environment, close the |pre|: % \begin{macrocode} -\ifbool{LWR@verbtags}{\noindent\LWR@htmltag{/pre} - +\ifbool{LWR@verbtags}{% + \LWR@origvspace*{-#1\baselineskip}% + \noindent\LWR@htmltag{/pre}\LWR@orignewline% pre }{}% % \end{macrocode} % Resume regular paragraph handling: @@ -17474,9 +17955,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \renewcommand{\verbatim@input}[2]{% \ifbool{LWR@verbtags}{\LWR@forcenewpage}{}% -\LWR@atbeginverbatim{3.5}{Verbatim}% +\LWR@atbeginverbatim{2.5}{Verbatim}% \LWRV@origverbatim@input{#1}{#2}% -\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim% +\LWR@afterendverbatim{1.5}% } % \end{macrocode} % \end{macro} @@ -17492,11 +17973,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@traceinfo{Patching verbatim.} \AtBeginEnvironment{verbatim}{% \LWR@forcenewpage% -\LWR@atbeginverbatim{.5}{verbatim}% -\unskip\LWR@origvspace*{-1.5\baselineskip}% +\LWR@atbeginverbatim{2.5}{verbatim}% } \AfterEndEnvironment{verbatim}{% - \unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim% + \LWR@afterendverbatim{1}% } } % \end{macrocode} @@ -17516,13 +17996,13 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \renewcommand*{\tabbing}{% \LWR@forcenewpage% -\LWR@atbeginverbatim{3.5}{tabbing}% +\LWR@atbeginverbatim{3}{tabbing}% \LWR@origtabbing% } \renewcommand*{\endtabbing}{% \LWR@origendtabbing% - \unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim% + \LWR@afterendverbatim{1}% } % \end{macrocode} % @@ -17617,7 +18097,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % the source for |description| is found in |article.cls|, etc. % % To have an empty -% item,\margintag{empty item}\index{item>empty}\index{list item, empty} use +% item,\margintag{empty item}\index{item>empty}\index{list>empty item} use % |\mbox{}| or a trailing backslash. % This forces a new line in print output, matching the new line which % will appear in \HTML\ output. @@ -17829,6 +18309,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macro}{\LWR@nulllistfills} Nullifies various \TeX\ fill commands, % in case they are used inside \cs{makelabel}. +% Problems are caused when these are nullified all the time. % \begin{macrocode} \newcommand*{\LWR@nulllistfills}{% \renewcommand*{\hss}{}% @@ -21119,6 +21600,7 @@ rowspan="#2" % % Create the |table| tag: % \begin{macrocode} \global\booltrue{LWR@intabularmetadata}% +\LWR@traceinfo{LWR@tabular: About to LWR@forecenewpage.}% \LWR@forcenewpage \LWR@htmlblocktag{table}% % \end{macrocode} @@ -21903,11 +22385,11 @@ autopage-\theLWR@currentautosec% \newrobustcmd*{\href}{% \begingroup% -\catcode`\#=12 -\catcode`\%=12 -\catcode`\&=12 -\catcode`\~=12 -\catcode`\_=12 +\catcode`\#=12% +\catcode`\%=12% +\catcode`\&=12% +\catcode`\~=12% +\catcode`\_=12% \LWR@hrefb% } % \end{macrocode} @@ -21930,11 +22412,11 @@ autopage-\theLWR@currentautosec% \newrobustcmd*{\nolinkurl}{% \begingroup% -\catcode`\#=12 -\catcode`\%=12 -\catcode`\&=12 -\catcode`\~=12 -\catcode`\_=12 +\catcode`\#=12% +\catcode`\%=12% +\catcode`\&=12% +\catcode`\~=12% +\catcode`\_=12% \LWR@nolinkurlb% } % \end{macrocode} @@ -21963,11 +22445,11 @@ autopage-\theLWR@currentautosec% \newrobustcmd*{\url}{% \begingroup% -\catcode`\#=12 -\catcode`\%=12 -\catcode`\&=12 -\catcode`\~=12 -\catcode`\_=12 +\catcode`\#=12% +\catcode`\%=12% +\catcode`\&=12% +\catcode`\~=12% +\catcode`\_=12% \LWR@urlb% } % \end{macrocode} @@ -22040,8 +22522,7 @@ autopage-\theLWR@currentautosec% % uses an en-dash instead of a colon: ``Figure 123 -- Caption text''. -% \subsection{Float captions} -% \label{sec:floatcaptions} +% \subsection{Float environment} % \codehtml % \begin{macrocode} @@ -22049,8 +22530,7 @@ autopage-\theLWR@currentautosec% % \end{macrocode} -% \begin{macro}{\LWR@floatbegin} \marg{type} \oarg{placement} -% +% \begin{macro}{\LWR@floatbegin} \marg{type} \oarg{placement} \qquad % Begins a \cs{newfloat} environment. % % \begin{macrocode} @@ -22081,19 +22561,42 @@ autopage-\theLWR@currentautosec% \LWR@BlockClassWP{}{}{wp#1}% }{}% % \end{macrocode} +% Update the caption type: % \begin{macrocode} \renewcommand*{\@captype}{#1}% \caption@settype{#1}% +% \end{macrocode} +% Mark the float for a word processor conversion: +% \begin{macrocode} \LWR@startpars% \ifboolexpr{bool{FormatWP} and bool{WPMarkFloats}}{% === begin #1 === }{}% +% \end{macrocode} +% Look for \cs{centering}, etc: +% \changes{v0.54}{2018/04/19}{Honor \cs{centering}, etc. in floats.} +% \changes{v0.55}{2018/04/24}{Fix: Float optional args.} +% \begin{macrocode} +\LWR@futurenonspacelet\LWR@mynexttoken\LWR@floatalignment% } % \end{macrocode} % \end{macro} % +% For \pkg{koma-script}. The following does not work for tables. +% \changes{v0.55}{2018/04/25}{Fix: \cs{centering}, etc. for \pkg{koma-script}.} +% \begin{macrocode} +\AtBeginDocument{ +\@ifpackageloaded{tocbasic}{ +\appto\figure@atbegin{% +\LWR@futurenonspacelet\LWR@mynexttoken\LWR@floatalignment% +} +}{} +} +% \end{macrocode} +% +% % % \begin{macro}{\@float} % \begin{macro}{\@dlbfloat} Support packages which create floats directly. @@ -22110,6 +22613,14 @@ autopage-\theLWR@currentautosec% % Ends a \cs{newfloat} environment. % \begin{macrocode} \newcommand*{\LWR@floatend}{% +% \end{macrocode} +% If saw a \cs{centering}, finish the \env{center} environment: +% \changes{v0.54}{2018/04/19}{Honor \cs{centering}, etc. in floats.} +% \begin{macrocode} +\LWR@endfloatalignment% +% \end{macrocode} +% Mark the float end for a word processor conversion: +% \begin{macrocode} \ifboolexpr{bool{FormatWP} and bool{WPMarkFloats}}{% === end === @@ -22141,7 +22652,8 @@ autopage-\theLWR@currentautosec% % \end{macro} - +% \subsection{Float tracking} +% % \DescribeCounter{LWR@thisautoid} % A sequential counter for all floats and theorems. % This is used to identify the float or theorem @@ -22194,8 +22706,49 @@ autopage-\theLWR@currentautosec% % \end{macrocode} % \end{macro} +% \begin{macro}{\LWR@floatalignmentname} +% Set to |center|, |flushleft|, or |flushright| if saw +% \cs{centering}, \cs{raggedright}, or \cs{raggedleft}. +% \begin{macrocode} +\newcommand*{\LWR@floatalignmentname}{} +% \end{macrocode} +% \end{macro} -% \subsubsection{Caption inside a float environment} +% \begin{macro}{\LWR@floatalignment} +% If sees a \cs{centering}, \cs{raggedleft}, or \cs{raggedright}, +% creates a \env{center}, \env{flushright}, or \env{flushleft} environment. +% \changes{v0.54}{2018/04/19}{Honor \cs{centering}, etc. in floats.} +% \begin{macrocode} +\newcommand*{\LWR@floatalignment}{% +\ifdefstrequal{\LWR@mynexttoken}{\centering}{% + \center% + \renewcommand*{\LWR@floatalignmentname}{center}% +}{}% +\ifdefstrequal{\LWR@mynexttoken}{\raggedright}{% + \flushleft% + \renewcommand*{\LWR@floatalignmentname}{flushleft}% +}{}% +\ifdefstrequal{\LWR@mynexttoken}{\raggedleft}{% + \flushright% + \renewcommand*{\LWR@floatalignmentname}{flushright}% +}{}% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\LWR@endfloatalignment} +% Closes an environment from \cs{LWR@floatalignment}. +% \changes{v0.54}{2018/04/19}{Honor \cs{centering}, etc. in floats.} +% \begin{macrocode} +\newcommand*{\LWR@endfloatalignment}{% +\ifdefvoid{\LWR@floatalignmentname}{}{\csuse{end\LWR@floatalignmentname}}% +\renewcommand*{\LWR@floatalignmentname}{}% +} +% \end{macrocode} +% \end{macro} + + +% \subsection{Caption inside a float environment} % \begin{macro}{\CaptionSeparator} How to separate the float number and the caption text. % \changes{v0.13}{2016/03/23}{Fix for newer babel package.} @@ -22218,7 +22771,7 @@ autopage-\theLWR@currentautosec% % \end{macro} -% \subsubsection{Caption and LOF linking and tracking} +% \subsection{Caption and LOF linking and tracking} % When a new \HTML\ file is marked in the \LaTeX\ \PDF\ file, % the \LaTeX\ page number at that point is stored in |LWR@latestautopage|, @@ -22401,7 +22954,7 @@ autopage-\theLWR@currentautosec% % \changes{v0.51}{2018/03/11}{No anchor ID if inside \SVG\ image.} % \begin{macrocode} \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% - {} + {}% {\LWR@newautoidanchor}% % \end{macrocode} % \changes{v0.51}{2018/03/11}{Add missing support for float mechanism if necessary.} @@ -22492,16 +23045,19 @@ autopage-\theLWR@currentautosec% % \watchout % must be made a regular letter. % -% For \prog{pdflatex}, also change to |latin1| encoding. -% When reading back a file with accented characters, -% \watchout[disabled] -% the encoding change seems to be required, rather than leaving it |utf8|. +% ^^A *88* +% ^^A For \prog{pdflatex}, also change to |latin1| encoding. +% ^^A When reading back a file with accented characters, +% ^^A \watchout[disabled] +% ^^A the encoding change seems to be required, rather than leaving it |utf8|. % \begin{macrocode} \begingroup% -% \ifxetexorluatex% -% \else -% \inputencoding{latin1}% currently disabled -% \fi +% \end{macrocode} +% ^^A \ifxetexorluatex% +% ^^A \else +% ^^A \inputencoding{latin1}% currently disabled +% ^^A \fi +% \begin{macrocode} \makeatletter% % \end{macrocode} % Read in the \TOC\ file: @@ -22817,8 +23373,8 @@ autopage-\theLWR@currentautosec% \LWR@htmlrefsectionfilename{autopage-#4}\LWR@origpound\LWR@origmbox{autosec-#4}% }{#3}{toc#2}% \LWR@stoppars% -} -{} +}% +{}% \LWR@traceinfo{hypertoc done}% } % \end{macrocode} @@ -23076,7 +23632,7 @@ autopage-\theLWR@currentautosec% % |\hyperindexref{web address}| is inserted into |*.ind| by % the xindy style file |lwarp.xdy| % -% \changes{v0.20}{2016/12/19}{Print mode provided in case hyperref not used.} +% \changes{v0.20}{2016/12/19}{Print mode provided in case \pkg{hyperref} not used.} % \changes{v0.28}{2017/04/13}{Improved indexing.} % \begin{macrocode} \newcommand*{\hyperindexref}[1]{\nameref{LWRindex-#1}} @@ -23132,8 +23688,9 @@ autopage-\theLWR@currentautosec% \immediate\write\@auxout{\string\bibdata{#1}}% \fi % \@input@{\jobname.bbl}% original + \begingroup% \@input@{\BaseJobname.bbl}% lwarp - \DeclareDocumentCommand{\etalchar}{m}{\textsuperscript{#1}}% lwarp + \endgroup% } % \end{macrocode} % \end{macro} @@ -23141,7 +23698,6 @@ autopage-\theLWR@currentautosec% % % \begin{macro}{\@biblabel} \marg{text-refnumber} % -% Modified to use the base jobname instead of the |_html| jobname. % \changes{v0.48}{2018/02/04}{Improved bibliography label.} % \begin{macrocode} \renewcommand{\@biblabel}[1]{[#1]\quad} @@ -23163,7 +23719,6 @@ autopage-\theLWR@currentautosec% % } % % \changes{v0.45}{2018/01/13}{Patched to emphasize titles.} -% % \begin{macrocode} \AtBeginDocument{ \AtBeginEnvironment{thebibliography}{ @@ -23181,15 +23736,7 @@ autopage-\theLWR@currentautosec% \endgroup \LWR@em@after\egroup } -\DeclareDocumentCommand{\etalchar}{m}{\textsuperscript{#1}} }% \AtBeginEnvironment{thebibliography} -% \end{macrocode} -% Patch for \pkg{babelbib}: -% \changes{v0.52}{2018/03/30}{Fix for \pkg{babelbib} \cs{etalchar}.} -% \begin{macrocode} -\BeforeBeginEnvironment{thebibliography}{% -\DeclareDocumentCommand{\etalchar}{m}{\textsuperscript{#1}} -}% \BeforeBeginEnvironment }% \AtBeginDocument % \end{macrocode} % \end{environment} @@ -23349,11 +23896,11 @@ autopage-\theLWR@currentautosec% \let\makebox\LWR@origmakebox% \let\fbox\LWRprint@fbox% \let\fboxBlock\LWRprint@fbox% -\LetLtxMacro{\fminipage}{\LWRprint@fminipage}% -\LetLtxMacro{\endfminipage}{\endLWRprint@fminipage}% -\LetLtxMacro{\minipage}{\LWR@origminipage}% +\LetLtxMacro\fminipage\LWRprint@fminipage% +\LetLtxMacro\endfminipage\endLWRprint@fminipage% +\LetLtxMacro\minipage\LWR@origminipage% \let\endminipage\LWR@origendminipage% -\LetLtxMacro{\parbox}{\LWR@origparbox}% +\LetLtxMacro\parbox\LWR@origparbox% \let\TeX\LWR@origTeX% \let\LaTeX\LWR@origLaTeX% \let\LaTeXe\LWR@origLaTeXe% @@ -25040,15 +25587,16 @@ autopage-\theLWR@currentautosec% % \end{macrocode} % \begin{macro}{\LateximageFontSizeName} -% \changes{v0.19}{2016/05/29}{Add: User-adjustable math/lateximage font size.} % Declares how large to write text in \cs{lateximage}s. The |.svg| file text size % should blend well with the surrounding \HTML\ text size. % % \emph{Do not include the leading backslash in the name.} % \watchout[no backslash] % +% \changes{v0.19}{2016/05/29}{Add: User-adjustable math/lateximage font size.} +% \changes{v0.54}{2018/04/16}{Defaults to \progcode{normalsize}.} % \begin{macrocode} -\newcommand*{\LateximageFontSizeName}{large} +\newcommand*{\LateximageFontSizeName}{normalsize} % \end{macrocode} % \end{macro} @@ -25319,6 +25867,7 @@ autopage-\theLWR@currentautosec% % \oarg{3: add'l hashing} \oarg{4: CSS style} % % Typesets the contents and then renders the result as an \SVG\ file. +% Star causes the image to be hashed for reuse. % % The optional \element{alt} tag is included in the \HTML\ code for use with copy/paste. % @@ -25674,6 +26223,44 @@ autopage-\theLWR@currentautosec% % \end{environment} +% \cs{centering}, \cs{raggedleft}, and \cs{raggedright} usually have no effect +% on the \HTML\ output, but they may be used to compare with the next token +% to identify their use at the start of a float. See \cs{LWR@floatalignment}. + +% \begin{macro}{\centering} +% \changes{v0.54}{2018/04/19}{Added debug comment.} +% \begin{macrocode} +\renewcommand*{\centering}{% +\ifbool{HTMLDebugComments}{% + \LWR@htmlcomment{centering}% +}{}% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\raggedleft} +% \changes{v0.54}{2018/04/19}{Added debug comment.} +% \begin{macrocode} +\renewcommand*{\raggedleft}{% +\ifbool{HTMLDebugComments}{% + \LWR@htmlcomment{raggedleft}% +}{}% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\raggedright} +% \changes{v0.54}{2018/04/19}{Added debug comment.} +% \begin{macrocode} +\renewcommand*{\raggedright}{% +\ifbool{HTMLDebugComments}{% + \LWR@htmlcomment{raggedright}% +}{}% +} +% \end{macrocode} +% \end{macro} + + % \begin{macro}{\leftline} \marg{text} % \changes{v0.48}{2018/02/03}{Added.} % \begin{macrocode} @@ -26366,12 +26953,12 @@ autopage-\theLWR@currentautosec% % -% \DescribeLength{LWR@minipagewidth} +% \DescribeLength{\LWR@minipagewidth} % Used to convert the width into printable units. % \begin{macrocode} \newlength{\LWR@minipagewidth} % \end{macrocode} -% \DescribeLength{LWR@minipageheight} +% \DescribeLength{\LWR@minipageheight} % Used to convert the height into printable units. % \begin{macrocode} \newlength{\LWR@minipageheight} @@ -26446,6 +27033,7 @@ autopage-\theLWR@currentautosec% % \begin{macrocode} \RenewDocumentEnvironment{minipage}{O{t} o O{t} m} {% +\LWR@traceinfo{minipage}% % \end{macrocode} % % Temporarily open a group, in which width and height is @@ -26602,6 +27190,7 @@ autopage-\theLWR@currentautosec% % until the start of the next paragraph: % \begin{macrocode} \global\booltrue{LWR@minipagethispar}% +\LWR@traceinfo{LWR@minipage: done}% } % \end{macrocode} % \end{environment} @@ -27182,10 +27771,11 @@ width:\LWR@printlength{\LWR@tempwidth}% \DeclareRobustCommand{\LWR@HTMLtextstyle}[3]{##3}% % \end{macrocode} % Nullify math macros. +% \changes{v0.55}{2018/04/24}{Removed extraneous space which appeared in file links.} % \begin{macrocode} \def\(##1\){}% \def\[##1\]{}% -\RenewDocumentCommand{\LWR@subsingledollar}{s m m m}{} +\RenewDocumentCommand{\LWR@subsingledollar}{s m m m}{}% % \end{macrocode} % Use the simpler form with \cs{texorpdfstring}: % \changes{v0.52}{2018/03/31}{Fix: \cs{texorpdfstring} in section names.} @@ -27363,7 +27953,7 @@ width:\LWR@printlength{\LWR@tempwidth}% % \begin{macrocode} \renewcommand{\underline}[1]{% \LWR@HTMLtextstyle% - {text-decoration:underline;text-decoration-skip}% + {text-decoration:underline; text-decoration-skip: auto}% {underline}{#1}% } % \end{macrocode} @@ -27375,7 +27965,7 @@ width:\LWR@printlength{\LWR@tempwidth}% % \begin{macrocode} \newcommand{\LWR@overline}[1]{% \LWR@HTMLtextstyle% - {text-decoration:overline;text-decoration-skip}% + {text-decoration:overline; text-decoration-skip: auto}% {overline}{#1}% } % \end{macrocode} @@ -27623,9 +28213,9 @@ width:\LWR@printlength{\LWR@tempwidth}% % \end{macro} -% \DescribeLength{LWR@tempwidth} -% \DescribeLength{LWR@tempheight} -% \DescribeLength{LWR@tempraise} +% \DescribeLength{\LWR@tempwidth} +% \DescribeLength{\LWR@tempheight} +% \DescribeLength{\LWR@tempraise} % Used to compute span width, height, raise for \cs{hspace} and \cs{rule}: % \begin{macrocode} \newlength{\LWR@tempwidth} @@ -27928,11 +28518,16 @@ width:\LWR@printlength{\LWR@tempwidth}% % \end{macrocode} % \begin{macro}{\phantomsection} -% Emulate the hyperref \cs{phantomsection} command, -% often used to insert the bibliography into table of contents: +% Emulate the \pkg{hyperref} \cs{phantomsection} command, +% often used to insert the bibliography into the table of contents. +% Ignores \cs{ForceHTMLTOC}. +% \changes{v0.55}{2018/04/26}{Fix: \cs{ForceHTMLTOC} with \cs{phantomsection}.} % \begin{macrocode} \DeclareDocumentCommand{\phantomsection}{}{% +\begingroup% +\boolfalse{LWR@forcinghtmltoc}% \section*{}% +\endgroup% } % \end{macrocode} % \end{macro} @@ -28769,6 +29364,54 @@ width:\LWR@printlength{\LWR@tempwidth}% % % % +% \iffalse +%<*ae> +% \fi +% +% \part{lwarp-ae.sty} +% +% \section{ae} +% +% \DescribePackage{ae} +% \pkg{ae} does not work with \prog{pdftotext}, and is superceded by \pkg{latinmodern}. +% +% \changes{v0.54}{2018/04/06}{\pkg{ae}: Prevented.} +% +% \codehtml +% \begin{macrocode} +\LWR@loadnever{ae}{latinmodern} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% +% \iffalse +%<*aecc> +% \fi +% +% \part{lwarp-aecc.sty} +% +% \section{aecc} +% +% \DescribePackage{aecc} +% \pkg{aecc} does not work with \prog{pdftotext}, and is superceded by \pkg{latinmodern}. +% +% \changes{v0.54}{2018/04/06}{\pkg{aecc}: Prevented.} +% +% \codehtml +% \begin{macrocode} +\LWR@loadnever{aecc}{latinmodern} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% % % % \iffalse @@ -28905,9 +29548,11 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% \LWR@traceinfo{Patching alltt.} \AtBeginEnvironment{alltt}{% \LWR@forcenewpage -\LWR@atbeginverbatim{3.5}{alltt}% +\LWR@atbeginverbatim{3}{alltt}% +} +\AfterEndEnvironment{alltt}{% + \LWR@afterendverbatim{2}% } -\AfterEndEnvironment{alltt}{\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim} } % \end{macrocode} @@ -29100,12 +29745,25 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% % % % Proof QED symbol: +% \changes{v0.55}{2018/04/24}{Fix: QED symbols in \env{lateximage}.} % \begin{macrocode} \AtBeginDocument{ +\@ifundefined{LWR@orig@openbox}{ +\LetLtxMacro\LWR@orig@openbox\openbox +\LetLtxMacro\LWR@orig@blacksquare\blacksquare +\LetLtxMacro\LWR@orig@Box\Box + \def\openbox{\text{\HTMLunicode{25A1}}}% UTF-8 white box \def\blacksquare{\text{\HTMLunicode{220E}}}% UTF-8 end-of-proof \def\Box{\text{\HTMLunicode{25A1}}}% UTF-8 white box -} + +\appto\LWR@restoreorigformatting{% +\LetLtxMacro\openbox\LWR@orig@openbox% +\LetLtxMacro\blacksquare\LWR@orig@blacksquare% +\LetLtxMacro\Box\LWR@orig@Box% +}% appto +}{}% @ifundefined +}% AtBeginDocument % \end{macrocode} % % Patched for \CSS: @@ -29539,6 +30197,38 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% % % % +% +% \iffalse +%<*bibunits> +% \fi +% +% \part{lwarp-bibunits.sty} + +% \section{bibunits} +% +% \credits{Thorsten Hansen} +% +% \DescribePackage{bibunits} +% \pkg{bibunits} is patched for use by \pkg{lwarp}. +% +% \changes{v0.54}{2018/03/09}{\pkg{bibunits}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{bibunits} +% \end{macrocode} + +% \begin{macrocode} +\def\bu@bibdata{\BaseJobname} +% \end{macrocode} + +% \iffalse +% +% \fi +% +% +% % \iffalse %<*bigdelim> % \fi @@ -29874,11 +30564,11 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% \newrobustcmd*{\burlalt}{% \begingroup% -\catcode`\#=12 -\catcode`\%=12 -\catcode`\&=12 -\catcode`\~=12 -\catcode`\_=12 +\catcode`\#=12% +\catcode`\%=12% +\catcode`\&=12% +\catcode`\~=12% +\catcode`\_=12% \LWR@burlaltb% } @@ -30235,7 +30925,6 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% % % % -% % \iffalse %<*changebar> % \fi @@ -30331,21 +31020,26 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% % \iffalse %<*chngpage> % \fi -% + % \part{lwarp-chngpage.sty} -% + % \section{chngpage} % +% \credits{Peter Wilson} +% % \DescribePackage{chngpage} -% \pkg{chngpage} is superceded by \pkg{changepage}. +% \pkg{chngpage} is emulated. % -% \changes{v0.39}{2017/08/27}{\pkg{chngpage}: Prevented.} +% \changes{v0.54}{2018/04/19}{\pkg{chngpage}: Added.} % % \codehtml +% +% Discard all options for \pkg{lwarp-chngpage}: % \begin{macrocode} -\LWR@loadnever{chngpage}{changepage} +\LWR@ProvidesPackageDrop{chngpage} +\LWR@origRequirePackage{changepage} % \end{macrocode} -% + % \iffalse % % \fi @@ -30355,7 +31049,6 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% % % % -% % \iffalse %<*chappg> % \fi @@ -31541,7 +32234,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% % % \subsection{Scheme} % -% Bug fix for \pkg{chemmacros} when using \pkg{newfloat}: +% Fix for \pkg{chemmacros} as of v5.8b, when using \pkg{newfloat} and \pkg{babel}: % \begin{macrocode} \AtBeginDocument{ \@ifchemmacrosmoduleloaded{scheme}{ @@ -32008,6 +32701,31 @@ name = \chemmacros_translate:n {scheme-name} % % % +% \iffalse +%<*clrdblpg> +% \fi +% +% \part{lwarp-clrdblpg.sty} +% +% \section{clrdblpg} +% +% \DescribePackage{clrdblpg} +% \pkg{clrdblpg} is ignored. +% +% \changes{v0.55}{2018/04/24}{\pkg{clrdblpg}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackageDrop{clrdblpg} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% % % \iffalse %<*color> @@ -33547,24 +34265,24 @@ name = \chemmacros_translate:n {scheme-name} % \begin{macrocode} \let\LWRFB@UseVerbatim\UseVerbatim \renewcommand*{\UseVerbatim}[1]{% -\LWR@atbeginverbatim{3.5}{Verbatim}% +\LWR@atbeginverbatim{3}{Verbatim}% \LWRFB@UseVerbatim{#1}% -\LWR@afterendverbatim% +\LWR@afterendverbatim{.5}% } \let\LWRFB@LUseVerbatim\LUseVerbatim \renewcommand*{\LUseVerbatim}[1]{% -\LWR@atbeginverbatim{3.5}{LVerbatim}% +\LWR@atbeginverbatim{3}{LVerbatim}% \noindent% \LWRFB@LUseVerbatim{#1}% -\LWR@afterendverbatim% +\LWR@afterendverbatim{.5}% } \def\@BUseVerbatim[#1]#2{% -\LWR@atbeginverbatim{3.5}{BVerbatim}% +\LWR@atbeginverbatim{3}{BVerbatim}% \LWRFB@UseVerbatim{#2}% -\LWR@afterendverbatim% +\LWR@afterendverbatim{.5}% } % \end{macrocode} % @@ -33849,9 +34567,9 @@ name = \chemmacros_translate:n {scheme-name} % Adds \HTML\ formatting: % \begin{macrocode} \def\FV@BUseVerbatim#1{% - \LWR@atbeginverbatim[\LWR@FVstyle]{.5}{verbatim}% + \LWR@atbeginverbatim[\LWR@FVstyle]{0}{verbatim}% \FV@BVerbatimBegin#1\FV@BVerbatimEnd% - \LWR@afterendverbatim% + \LWR@afterendverbatim{0}% } % \end{macrocode} @@ -33869,14 +34587,14 @@ name = \chemmacros_translate:n {scheme-name} \newcommand*{\LWR@fvstartnone}{% \LWR@traceinfo{fvstartnone}% % \hbox to\z@{ -\LWR@atbeginverbatim[\LWR@FVstyle]{.5}{verbatim}% +\LWR@atbeginverbatim[\LWR@FVstyle]{0}{verbatim}% % }% } \newcommand*{\LWR@fvendnone}{% \LWR@traceinfo{fvendnone}% % \hbox to\z@{ -\LWR@afterendverbatim% +\LWR@afterendverbatim{0}% % }% } @@ -34059,8 +34777,7 @@ solid \LWR@origpound\LWR@tempcolor ; % \AfterEndEnvironment{BVerbatim} {% -\leavevmode\par\LWR@origvspace{-\baselineskip}% -\LWR@afterendverbatim% +\LWR@afterendverbatim{0}% } % \end{macrocode} % \end{environment} @@ -35092,10 +35809,10 @@ solid \LWR@origpound\LWR@tempcolor ; % % \section{fontenc} % % \DescribePackage{fontenc} -% If using pdf\LaTeX, \pkg{lwarp} used to require \pkg{fontspec} be loaded +% If using pdf\LaTeX, \pkg{lwarp} used to require \pkg{fontenc} be loaded % before \pkg{lwarp}, -% but now \pkg{lwarp} itself loads \cs{fontspec} with T1 encoding, which -% \pkg{lwarp} requires. \pkg{fontspec} is now allowed to be loaded with another +% but now \pkg{lwarp} itself loads \cs{fontenc} with T1 encoding, which +% \pkg{lwarp} requires. \pkg{fontenc} is now allowed to be loaded with another % encoding after \pkg{lwarp}. % % \pkg{lwarp-fontenc} is no longer necessary, but is still provided to overwrite @@ -35134,7 +35851,7 @@ solid \LWR@origpound\LWR@tempcolor ; % % % \codehtml % \begin{macrocode} -\LWR@ProvidesPackageDrop{fontspec} +\LWR@ProvidesPackageDrop{fontspec}[2017/11/09] % \end{macrocode} % \begin{macrocode} @@ -35362,6 +36079,58 @@ solid \LWR@origpound\LWR@tempcolor ; % % % % +% \iffalse +%<*forest> +% \fi +% +% \part{lwarp-forest.sty} + +% \section{forest} +% +% \credits{Sa\v{s}o \v{Z}ivanovi\'{c}} +% +% \DescribePackage{forest} +% \pkg{forest} is patched for use by \pkg{lwarp}. +% +% The starred version of the macro \cs{Forest*} is not supported. +% \watchout[\cs{Forest*}] +% \pkg{lwarp} encases each \env{lateximage} in an environment, so the +% global results of the starred \cs{Forest*} are lost. +% +% \changes{v0.54}{2018/04/14}{\pkg{forest}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{forest} +% \end{macrocode} + +% \begin{macrocode} +\BeforeBeginEnvironment{forest}{\begin{lateximage}[forest]} + +\AfterEndEnvironment{forest}{\end{lateximage}} + +\RenewDocumentCommand{\Forest}{s D(){} m}{% + \forest@config{#2}% + \IfBooleanTF{#1}{% + \PackageError{lwarp-forest}% + {Starred \Forest is not supported}% + {Lwarp uses an environment for images, but \Forest* cannot work in an environment.}% + \let\forest@next\forest@env% + }{\let\forest@next\forest@group@env}% + \begin{lateximage}[forest]% lwarp + \forest@next{#3}% + \end{lateximage}% lwarp +} +% \end{macrocode} + +% \iffalse +% +% \fi +% +% +% +% % % % \iffalse @@ -35733,7 +36502,8 @@ solid \LWR@origpound\LWR@tempcolor ; % % \end{macrocode} % In the original, the \acro{TOC} entry was made before the section, % thus linking to the phantomsection in the printed version, but for -% \HTML\, this caused the link to point to the page before the glossaries. +% \HTML\, this caused the link to point to the page before the glossaries, +% which could be a different \HTML\ file. % Here, the \acro{TOC} entry is made after the section is created: % \begin{macrocode} \csname\@@glossarysec\endcsname*{#2}% @@ -35743,6 +36513,46 @@ solid \LWR@origpound\LWR@tempcolor ; % } % \end{macrocode} % +% \pkg{lwarp}'s sectioning commands cannot handle robust macros when +% splitting \HTML\ into named filenames. +% \pkg{glossaries} uses \cs{translate} in sectioning names, and \cs{translate} +% is robust and cannot be expanded. +% The following pre-expands the translations at this moment, making use +% of \cs{translatelet}. +% +% \changes{v0.54}{2018/04/21}{\pkg{glossaries}: Fix when +% not using \pkg{babel} or \pkg{polyglossia}.} +% +% \begin{macrocode} +\newcommand*{\LWR@comp@glossaryname}{\translate{Glossary}} + +\ifdefstrequal{\glossaryname}{\LWR@comp@glossaryname}{ + \translatelet\LWR@translatetemp{Glossary} + \edef\glossaryname{\LWR@translatetemp} +}{} + +\newcommand*{\LWR@comp@acronymname}{\translate{Acronym}} + +\ifdefstrequal{\acronymname}{\LWR@comp@acronymname}{ + \translatelet\LWR@translatetemp{Acronym} + \edef\acronymname{\LWR@translatetemp} +}{} + +\newcommand*{\LWR@comp@glssymbolsgroupname}{\translate{Symbols (glossaries)}} + +\ifdefstrequal{\glssymbolsgroupname}{\LWR@comp@glssymbolsgroupname}{ + \translatelet\LWR@translatetemp{Symbols (glossaries)} + \edef\glssymbolsgroupname{\LWR@translatetemp} +}{} + +\newcommand*{\LWR@comp@glsnumbersgroupname}{\translate{Numbers (glossaries)}} + +\ifdefstrequal{\glsnumbersgroupname}{\LWR@comp@glsnumbersgroupname}{ + \translatelet\LWR@translatetemp{Numbers (glossaries)} + \edef\glsnumbersgroupname{\LWR@translatetemp} +}{} +% \end{macrocode} +% % \iffalse % % \fi @@ -36511,6 +37321,42 @@ img src="% % % % \iffalse +%<*gridset> +% \fi +% +% \part{lwarp-gridset.sty} +% +% \section{gridset} +% +% \DescribePackage{gridset} +% \pkg{gridset} is ignored. +% +% \changes{v0.54}{2018/04/11}{\pkg{gridset}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackageDrop{gridset} +% \end{macrocode} +% +% \begin{macrocode} +\newcommand*{\gridbase}{} +\newcommand*{\gridinterval}{} +\newcommand*{\savepos}[1]{} +\newcounter{gridcnt} +\newcommand*{\vskipnextgrid}{} +\newcommand*{\thegridinfo}[1]{} +\newcommand*{\theposinfo}[1]{} +\newcommand*{\theypos}[1]{} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% \iffalse %<*hang> % \fi % @@ -36819,11 +37665,11 @@ img src="% \newrobustcmd*{\hyperimage}{% \begingroup% -\catcode`\#=12 -\catcode`\%=12 -\catcode`\&=12 -\catcode`\~=12 -\catcode`\_=12 +\catcode`\#=12% +\catcode`\%=12% +\catcode`\&=12% +\catcode`\~=12% +\catcode`\_=12% \LWR@hyperimageb% } @@ -36847,11 +37693,11 @@ img src="% \newcommand*{\hyperdef}{% \begingroup% -\catcode`\#=12 -\catcode`\%=12 -\catcode`\&=12 -\catcode`\~=12 -\catcode`\_=12 +\catcode`\#=12% +\catcode`\%=12% +\catcode`\&=12% +\catcode`\~=12% +\catcode`\_=12% \LWR@hyperdefb% } @@ -36866,29 +37712,32 @@ img src="% % % Creates an \HTML\ link to |URL#category.name| with the given text. % \begin{macrocode} -% \NewDocumentCommand{\LWR@hyperrefb}{m m m +m}{% -\NewDocumentCommand{\LWR@hyperrefbb}{m m m +m}{% -\def\LWR@templink{#1}% -\@onelevel@sanitize\LWR@templink% -\def\LWR@templinktwo{#2}% -\@onelevel@sanitize\LWR@templinktwo% -\def\LWR@templinkthree{#3}% -\@onelevel@sanitize\LWR@templinkthree% -\LWR@htmltag{a href="\LWR@templink\LWR@hashmark% - \LWR@templinktwo.\LWR@templinkthree"% -}% -#4% +\newcommand{\LWR@hyperreffinish}[1]{% +\begingroup% +\LetLtxMacro\ref\LWR@origref%{} syntax highlighting +#1% +\endgroup% \LWR@htmltag{/a}% +} + +\newcommand*{\LWR@hyperrefbb}[3]{% +\LWR@htmltag{% + a href="% + \detokenize\expandafter{#1}\LWR@hashmark% + \detokenize\expandafter{#2}.\detokenize\expandafter{#3}% + "% +}% \endgroup% +\LWR@hyperreffinish% } \newrobustcmd*{\LWR@hyperrefb}{% \begingroup% -\catcode`\#=12 -\catcode`\%=12 -\catcode`\&=12 -\catcode`\~=12 -\catcode`\_=12 +\catcode`\#=12% +\catcode`\%=12% +\catcode`\&=12% +\catcode`\~=12% +\catcode`\_=12% \LWR@hyperrefbb% } % \end{macrocode} @@ -36898,20 +37747,20 @@ img src="% % % Creates text as an \HTML\ link to the \LaTeX\ label. % \begin{macrocode} -\NewDocumentCommand{\LWR@hyperrefcb}{O{label} +m}{ + +\NewDocumentCommand{\LWR@hyperrefcb}{O{label}}{% \LWR@startref{#1}% -#2% -\LWR@htmltag{/a}% \endgroup% +\LWR@hyperreffinish% } \newcommand*{\LWR@hyperrefc}{% \begingroup% -\catcode`\#=12 -\catcode`\%=12 -\catcode`\&=12 -\catcode`\~=12 -\catcode`\_=12 +\catcode`\#=12% +\catcode`\%=12% +\catcode`\&=12% +\catcode`\~=12% +\catcode`\_=12% \LWR@hyperrefcb% } % \end{macrocode} @@ -36922,6 +37771,8 @@ img src="% % \oarg{1: label} \marg{2: text} % % \changes{v0.43}{2017/10/31}{\pkg{hyperref}: Made robust.} +% \changes{v0.54}{2018/04/19}{\pkg{hyperref}: Fix: \cs{ref} in \cs{hyperref} and \cs{hyperlink} caused nested link.} +% \changes{v0.54}{2018/04/19}{\pkg{hyperref}: Fix: \cs{hyperref} and \cs{hyperlink} with special chars in text.} % \begin{macrocode} \DeclareRobustCommand*{\hyperref}{% \LWR@ensuredoingapar% @@ -36939,18 +37790,18 @@ img src="% % \changes{v0.52}{2018/03/26}{\pkg{hyperref}: Fix: \progcode{\#}, \progcode{\%}, \progcode{\&}, \progcode{\~}, \progcode{\_} in \acro{URL}.} % \begin{macrocode} \NewDocumentCommand{\LWR@hypertargetb}{m +m}{% -\label{#1}% +\label{LWR-ht-#1}% #2% \endgroup% } \newcommand*{\hypertarget}{% \begingroup% -\catcode`\#=12 -\catcode`\%=12 -\catcode`\&=12 -\catcode`\~=12 -\catcode`\_=12 +\catcode`\#=12% +\catcode`\%=12% +\catcode`\&=12% +\catcode`\~=12% +\catcode`\_=12% \LWR@hypertargetb% } % \end{macrocode} @@ -36965,19 +37816,21 @@ img src="% % Declared because also defined by \pkg{memoir}. % % \changes{v0.52}{2018/03/26}{\pkg{hyperref}: Fix: \progcode{\#}, \progcode{\%}, \progcode{\&}, \progcode{\~}, \progcode{\_} in \acro{URL}.} +% \changes{v0.54}{2018/04/19}{\pkg{hyperref}: Fix: \cs{ref} in \cs{hyperref} and \cs{hyperlink} caused nested link.} +% \changes{v0.54}{2018/04/19}{\pkg{hyperref}: Fix: \cs{hyperref} and \cs{hyperlink} with special chars in text.} % \begin{macrocode} -\DeclareDocumentCommand{\LWR@hyperlinkb}{m +m}{% -\hyperref[#1]{#2}% -\endgroup% +\DeclareDocumentCommand{\LWR@hyperlinkb}{m}{% +\LWR@hyperrefcb[LWR-ht-#1]% } -\newcommand*{\hyperlink}{% +\DeclareDocumentCommand{\hyperlink}{}{% +\LWR@ensuredoingapar% \begingroup% -\catcode`\#=12 -\catcode`\%=12 -\catcode`\&=12 -\catcode`\~=12 -\catcode`\_=12 +\catcode`\#=12% +\catcode`\%=12% +\catcode`\&=12% +\catcode`\~=12% +\catcode`\_=12% \LWR@hyperlinkb% } % \end{macrocode} @@ -37434,8 +38287,6 @@ img src="% % \changes{v0.21}{2017/02/22}{\pkg{inputenc}: Added.} % -% Discard all options for \pkg{lwarp-inputenc}: - % \codehtml % % \begin{macrocode} @@ -37453,6 +38304,36 @@ img src="% % % % +% \iffalse +%<*inputenx> +% \fi +% +% \part{lwarp-inputenx.sty} +% +% \section{inputenx} +% +% \DescribePackage{inputenx} +% Error if \pkg{inputenx} is loaded after \pkg{lwarp}. +% +% \changes{v0.54}{2018/04/10}{\pkg{inputenx}: Added.} +% + +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackageDrop{inputenx} +% \end{macrocode} + +% \begin{macrocode} +\LWR@loadbefore{inputenx} +% \end{macrocode} + +% \iffalse +% +% \fi +% +% +% % % \iffalse %<*keyfloat> @@ -38076,7 +38957,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}% \LWR@traceinfo{About to create verbatim.}% \let\lsthk@EveryPar\relax% \LWR@forcenewpage -\LWR@atbeginverbatim{2.5}{programlisting}% +\LWR@atbeginverbatim{2}{programlisting}% \let\lsthk@EveryPar\LWR@origlsthkEveryPar% \else% @@ -38102,8 +38983,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}% % reenable line numbers: % \begin{macrocode} \let\lsthk@EveryPar\relax% - -\LWR@afterendverbatim% +\LWR@afterendverbatim{0}% \let\lsthk@EveryPar\LWR@origlsthkEveryPar% \else% % \end{macrocode} @@ -38652,6 +39532,47 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}% % % % +% \iffalse +%<*magaz> +% \fi +% +% \part{lwarp-magaz.sty} +% +% \section{magaz} +% +% \DescribePackage{magaz} +% \pkg{magaz} is emulated. +% +% \changes{v0.54}{2018/04/1}{\pkg{magaz}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackageDrop{magaz} +% \end{macrocode} +% +% \begin{macrocode} +\newcommand\FirstLine[1]{% + \begingroup% + \FirstLineFont{% + \LWR@textcurrentcolor{% + \LWR@textcurrentfont{% + #1% + }% + }% + }% + \endgroup% +} + +\providecommand\FirstLineFont{\scshape} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% % % \iffalse %<*marginfit> @@ -39813,10 +40734,10 @@ background: % \begin{macrocode} \BeforeBeginEnvironment{verbatimtab}{% \LWR@forcenewpage -\LWR@atbeginverbatim{3.5}{Verbatim}% +\LWR@atbeginverbatim{3}{Verbatim}% } \AfterEndEnvironment{verbatimtab}{% -\LWR@afterendverbatim% +\LWR@afterendverbatim{1}% } @@ -39824,29 +40745,27 @@ background: \renewcommand{\@verbatimtabinput}[2][]{% \LWR@forcenewpage -\LWR@atbeginverbatim{3.5}{Verbatim}% +\LWR@atbeginverbatim{3}{Verbatim}% \LWRMV@orig@verbatimtabinput[#1]{#2}% -\LWR@afterendverbatim% +\LWR@afterendverbatim{1}% } \BeforeBeginEnvironment{listing}{% \LWR@forcenewpage -\LWR@atbeginverbatim{3.5}{programlisting}% +\LWR@atbeginverbatim{3}{programlisting}% } \AfterEndEnvironment{listing}{% -% \unskip\LWR@origvspace*{-\baselineskip}% -\LWR@afterendverbatim% +\LWR@afterendverbatim{1}% } \BeforeBeginEnvironment{listingcont}{% \LWR@forcenewpage -\LWR@atbeginverbatim{3.5}{programlisting}% +\LWR@atbeginverbatim{3}{programlisting}% } \AfterEndEnvironment{listingcont}{% -% \unskip\LWR@origvspace*{-\baselineskip}% -\LWR@afterendverbatim% +\LWR@afterendverbatim{1}% } % \end{macrocode} @@ -39875,25 +40794,22 @@ background: \renewcommand{\@listinginput}[3][]{ \LWR@forcenewpage -\LWR@atbeginverbatim{3.5}{programlisting}% -\LWRMV@@listinginput[#1]{#2}{#3} -\LWR@afterendverbatim% +\LWR@atbeginverbatim{3}{programlisting}% +\LWRMV@@listinginput[#1]{#2}{#3}% +\LWR@afterendverbatim{1}% } \renewenvironment*{boxedverbatim} { \LWR@forcenewpage -\LWR@atbeginverbatim{3.5}{boxedverbatim}% +\LWR@atbeginverbatim{3}{boxedverbatim}% \verbatim% } { \endverbatim% -\unskip% -\LWR@afterendverbatim% +\LWR@afterendverbatim{1}% } - - % \end{macrocode} % % \begin{macrocode} @@ -40505,7 +41421,7 @@ class="td% % \codehtml % % \begin{macrocode} -\LWR@ProvidesPackagePass{nicefrac} +\LWR@ProvidesPackagePass{nicefrac}[1998/08/04] % \end{macrocode} % % \pkg{nicefrac} uses \TeX\ boxes, so \cs{@ensuredmath} must be restored temporarily: @@ -41306,14 +42222,27 @@ class="td% % \subsection{Symbols} % % Proof QED symbol: +% \changes{v0.55}{2018/04/24}{Fix: QED symbols in \env{lateximage}.} % \begin{macrocode} \newcommand{\qed}{\qquad\the\qedsymbol} \AtBeginDocument{ +\@ifundefined{LWR@orig@openbox}{ +\LetLtxMacro\LWR@orig@openbox\openbox +\LetLtxMacro\LWR@orig@blacksquare\blacksquare +\LetLtxMacro\LWR@orig@Box\Box + \def\openbox{\text{\HTMLunicode{25A1}}}% UTF-8 white box \def\blacksquare{\text{\HTMLunicode{220E}}}% UTF-8 end-of-proof \def\Box{\text{\HTMLunicode{25A1}}}% UTF-8 white box -} + +\appto\LWR@restoreorigformatting{% +\LetLtxMacro\openbox\LWR@orig@openbox% +\LetLtxMacro\blacksquare\LWR@orig@blacksquare% +\LetLtxMacro\Box\LWR@orig@Box% +}% appto +}{}% @ifundefined +}% AtBeginDocument % \end{macrocode} % % \subsection{Cross-referencing} @@ -41996,6 +42925,7 @@ class="td% % \pkg{ragged2e} is not used during \HTML\ conversion. % % \changes{v0.20}{2017/01/19}{\pkg{ragged2e}: Added.} +% \changes{v0.54}{2018/04/19}{\pkg{ragged2e}: Fix: \cs{centering}, etc.} % % Discard all options for \pkg{lwarp-ragged2e}: @@ -42006,9 +42936,9 @@ class="td% % \end{macrocode} % \begin{macrocode} -\newcommand*{\Centering}{\centering} -\newcommand*{\RaggedLeft}{\raggedleft} -\newcommand*{\RaggedRight}{\raggedright} +\LetLtxMacro\Centering\centering +\LetLtxMacro\RaggedLeft\raggedleft +\LetLtxMacro\RaggedRight\raggedright \newcommand*{\justifying}{} \newlength{\CenteringLeftskip} \newlength{\RaggedLeftLeftskip} @@ -43760,7 +44690,7 @@ class="td% % \begin{macrocode} \newcommand{\ul}[1]{% \LWR@soulcolor{#1}{LWR@soululcolor}{uline}{text-decoration-color}% - {text-decoration:underline;text-decoration-skip;}% + {text-decoration:underline; text-decoration-skip: auto;}% } \newcommand{\st}[1]{ @@ -44459,6 +45389,28 @@ class="td% % % % +% \iffalse +%<*t1enc> +% \fi +% +% \part{lwarp-t1enc.sty} +% +% \section{t1enc} +% +% \DescribePackage{t1enc} +% \pkg{t1enc} does not work with \pkg{lwarp}. +% +% \changes{v0.54}{2018/04/10}{\pkg{t1enc}: Prevented.} +% +% \codehtml +% \begin{macrocode} +\LWR@loadnever{t1enc}{fontenc, inputenc, inputenx} +% \end{macrocode} +% +% \iffalse +% +% \fi +% % % % \iffalse @@ -44649,6 +45601,7 @@ class="td% % \changes{v0.40}{2017/09/07}{\pkg{textcomp}: Additional symbols, % improved XeLaTeX and LuaLaTeX support.} % \changes{v0.42}{2017/10/13}{\pkg{textcomp}: Improved \cs{interrobangdown}.} +% \changes{v0.54}{2018/04/08}{\pkg{textcomp}: Fix for \cs{textperthousand}.} % % \codehtml % @@ -44675,6 +45628,7 @@ class="td% \let\LWR@origtextpeso\textpeso \let\LWR@origtextrecipe\textrecipe \let\LWR@origtextinterrobangdown\textinterrobangdown +\let\LWR@origtextperthousand\textperthousand \let\LWR@origtextpertenthousand\textpertenthousand \let\LWR@origtextbaht\textbaht \let\LWR@origtextdiscount\textdiscount @@ -44721,6 +45675,7 @@ class="td% \renewcommand*{\textpeso}{\HTMLunicode{20B1}} \renewcommand*{\textrecipe}{\HTMLunicode{211E}} \renewcommand*{\textinterrobangdown}{\HTMLunicode{2E18}} +\renewcommand*{\textperthousand}{\HTMLunicode{2030}} \renewcommand*{\textpertenthousand}{\HTMLunicode{2031}} \renewcommand*{\textbaht}{\HTMLunicode{0E3F}} \renewcommand*{\textdiscount}{\%} @@ -44747,6 +45702,7 @@ class="td% \renewcommand*{\textpeso}{₱} \renewcommand*{\textrecipe}{℞} \renewcommand*{\textinterrobangdown}{⸘} +\renewcommand*{\textperthousand}{‰} \renewcommand*{\textpertenthousand}{‱} \renewcommand*{\textbaht}{฿} \renewcommand*{\textdiscount}{\%} @@ -44801,6 +45757,7 @@ class="td% \let\textpeso\LWR@origtextpeso% \let\textrecipe\LWR@origtextrecipe% \let\textinterrobangdown\LWR@origtextinterrobangdown% +\let\textperthousand\LWR@origtextperthousand% \let\textpertenthousand\LWR@origtextpertenthousand% \let\textbaht\LWR@origtextbaht% \let\textdiscount\LWR@origtextdiscount% @@ -45269,7 +46226,7 @@ class="td% % % Accept all options for \pkg{lwarp-tikz}: % \begin{macrocode} -\LWR@ProvidesPackagePass{tikz} +\LWR@ProvidesPackagePass{tikz}[2015/08/07] % \end{macrocode} @@ -45297,37 +46254,56 @@ class="td% % \end{macrocode} -% \begin{noindenvironment}{tikzpicture} -% |tikzpicture| environment is enclosed inside a \cs{lateximage}. -% May be used as-is, and its contents will be converted to an image. -% % \changes{v0.13}{2016/03/23}{Fix dollar-redefined bug for newer package.} % \changes{v0.19}{2016/05/29}{Adapts to tikz version.} % \changes{v0.24}{2017/03/13}{Fix for inline images.} % \changes{v0.44}{2017/11/16}{\pkg{tikz}: Fix: Groups for lateximages.} % \changes{v0.51}{2018/03/06}{\pkg{tikz}: Fix for \cs{tikz} macro.} % \changes{v0.51}{2018/03/20}{\pkg{tikz}: Fix for \env{tikz} with optional argument.} +% \changes{v0.54}{2018/04/16}{\pkg{tikz}: Fixes for \cs{pgfpicture}, minipages, fit, align, font.} +% +% \begin{noindenvironment}{pgfpicture} +% The \cs{pgfpicture} environment is enclosed inside a \cs{lateximage}. +% Enclose the low-level \cs{pgfpicture} in a \env{lateximage}. +% This is also used by the higher-level \cs{tikz} and \env{tikzpicture}. % % \begin{macrocode} -\LetLtxMacro\LWR@origtikzpicture\tikzpicture - -\renewcommand*{\tikzpicture}[1][]{% +\preto\pgfpicture{% \begin{lateximage}% \ifbool{LWR@tikzbabel}% Test for Tikz version v3.0.0 {}% {\catcode`\$=3}% dollar sign is math shift - \LWR@origtikzpicture[#1]% } -\LetLtxMacro\LWR@origendtikzpicture\endtikzpicture - -\renewcommand*{\endtikzpicture}{% - \LWR@origendtikzpicture% - \end{lateximage}% -} +\appto\endpgfpicture{\end{lateximage}} % \end{macrocode} % \end{noindenvironment} +% \tikz\ is placed inside an \SVG\ image, so use the original +% meanings of the following: +% \begin{macrocode} +\LetLtxMacro\pgfutil@minipage\LWR@origminipage +\let\pgfutil@endminipage\LWR@origendminipage + +\let\pgfutil@raggedleft\LWR@origraggedleft +\let\pgfutil@raggedright\LWR@origraggedright + +\def\pgfutil@font@tiny{\LWR@origtiny} +\def\pgfutil@font@scriptsize{\LWR@origscriptsize} +\def\pgfutil@font@footnotesize{\LWR@origfootnotesize} +\def\pgfutil@font@small{\LWR@origsmall} +\def\pgfutil@font@normalsize{\LWR@orignormalsize} +\def\pgfutil@font@large{\LWR@origlarge} +\def\pgfutil@font@Large{\LWR@origLarge} +\def\pgfutil@font@huge{\LWR@orighuge} +\def\pgfutil@font@Huge{\LWR@origHuge} + +\def\pgfutil@font@itshape{\LWR@origitshape} +\def\pgfutil@font@bfseries{\LWR@origbfseries} + +\def\pgfutil@font@normalfont{\LWR@orignormalfont} +% \end{macrocode} + % \iffalse % % \fi @@ -47253,14 +48229,14 @@ class="td% % \begin{macrocode} \NewDocumentCommand{\uline}{+m}{% \LWR@HTMLtextstyle% - {text-decoration:underline;text-decoration-skip}% + {text-decoration:underline; text-decoration-skip: auto}% {uline}{#1}% } \NewDocumentCommand{\uuline}{+m}{% \LWR@HTMLtextstyle% {% - text-decoration:underline;text-decoration-skip;% + text-decoration:underline; text-decoration-skip: auto;% text-decoration-style:double% }% {uuline}{#1}% @@ -47269,7 +48245,7 @@ class="td% \NewDocumentCommand{\uwave}{+m}{% \LWR@HTMLtextstyle% {% - text-decoration:underline;text-decoration-skip;% + text-decoration:underline; text-decoration-skip: auto;% text-decoration-style:wavy% }% {uwave}{#1}% @@ -47291,7 +48267,7 @@ class="td% \LWR@HTMLtextstyle% {% text-decoration:underline;% - text-decoration-skip;% + text-decoration-skip: auto;% text-decoration-style:dashed% }% {dashuline}{#1}% @@ -47301,7 +48277,7 @@ class="td% \LWR@HTMLtextstyle% {% text-decoration:underline;% - text-decoration-skip;% + text-decoration-skip: auto;% text-decoration-style:dotted% }% {dotuline}{#1}% @@ -47477,21 +48453,22 @@ class="td% % with their \cs{flagverse} command. \DescribeMacro{\flagverse} % Do not allow them to go into the left margin, which would cause \prog{pdfcrop} % to crop the entire page further to the left: -% \DescribeLength{vleftskip} +% \DescribeLength{\vleftskip} % \begin{macrocode} \ifdef{\vleftskip}{% \setlength{\vleftskip}{\HTMLvleftskip} \setlength{\leftmargini}{\HTMLleftmargini} }{} \LWR@forcenewpage -\LWR@atbeginverbatim{3.5}{verse}% +\LWR@atbeginverbatim{3}{verse}% } % \end{macrocode} % After the end of the \env{verse} environment, which places the \element{pre} tag at the % regular left margin: % \begin{macrocode} -\AtEndEnvironment{verse}{ -\LWR@afterendverbatim +\AtEndEnvironment{verse}{% +\leavevmode% +\LWR@afterendverbatim{1}% } % \end{macrocode} % Patch to place poemtitle inside an \HTML\ \element{span} of class |poemtitle|: @@ -47807,6 +48784,30 @@ class="td% % % % \iffalse +%<*wasysym> +% \fi +% +% \part{lwarp-wasysym.sty} +% +% \section{wasysym} +% +% \DescribePackage{wasysym} +% \pkg{wasysym} does not work with \prog{pdftotext}. +% +% \changes{v0.54}{2018/04/09}{\pkg{wasysym}: Prevented.} +% +% \codehtml +% \begin{macrocode} +\LWR@loadnever{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% \iffalse %<*watermark> % \fi % @@ -49119,6 +50120,7 @@ scaling = false % % % +% ^^A *komascript % % \iffalse %<*patch-komascript> @@ -49222,6 +50224,7 @@ scaling = false % % % +% ^^A *memoir % % \iffalse %<*patch-memoir> @@ -49262,7 +50265,7 @@ scaling = false \RequirePackage{lwarp-abstract}% req'd \RequirePackage{lwarp-array}% req'd \RequirePackage{lwarp-booktabs}% req'd -% \RequirePackage{lwarp-ccaption}% to do +% \RequirePackage{lwarp-ccaption}% emualated below \RequirePackage{lwarp-changepage}% req'd \RequirePackage{lwarp-crop} \RequirePackage{lwarp-dcolumn}% req'd @@ -49513,9 +50516,13 @@ scaling = false % \end{macrocode} % % \subsection{Titles} +% +% \changes{v0.54}{2018/04/06}{\pkg{memoir}: Update for v3.7g.} % \begin{macrocode} \csletcs{titlingpage*}{titlingpage} \csletcs{endtitlingpage*}{endtitlingpage} +\let\titlingpageend\relax +\newcommand{\titlingpageend}[2]{} \let\andnext\and \renewcommand*{\thanksmarkstyle}[1]{} \renewcommand{\thanksfootmark}{% @@ -49756,7 +50763,7 @@ scaling = false \let\memorigdbs\LWR@endofline \let\memorigpar\par \let\atcentercr\LWR@endofline -\renewcommand*{\flushleftright}{} + \renewcommand*{\linenottooshort}[1][]{} \renewcommand*{\russianpar}{} \renewcommand*{\lastlinerulefill}{} @@ -50122,107 +51129,21 @@ scaling = false \renewcommand*{\FloatBlockAllowAbove}{} \renewcommand*{\FloatBlockAllowBelow}{} \renewcommand*{\setFloatBlockFor}{} -\renewcommand*{\captiondelim}[1]{\renewcommand*{\CaptionSeparator}{#1}} -\renewcommand*{\captionnamefont}[1]{} -\renewcommand*{\captiontitlefont}[1]{} -\renewcommand*{\captionstyle}[2][]{} -\renewcommand*{\centerlastline}{} -\renewcommand*{\hangcaption}{} -\renewcommand*{\indentcaption}[1]{} -\renewcommand*{\normalcaption}{} -\renewcommand*{\changecaptionwidth}{} -\DeclareDocumentCommand{\captionwidth}{m}{} -\renewcommand*{\normalcaptionwidth}{} -\renewcommand{\precaption}[1]{} -\renewcommand{\captiontitlefinal}[1]{} -\renewcommand{\postcaption}[1]{} - -\renewcommand{\contcaption}[1]{% -% \ContinuedFloat% -% \caption{#1}% -\begin{LWR@figcaption}% later becomes \caption* -\csuse{\@captype name} \thechapter.\the\value{\@captype}\CaptionSeparator #1 -\end{LWR@figcaption} -} -% \end{macrocode} -% The extra |\\| here forces a \element{br} in HTML when \cs{legend} is -% used in a \cs{marginpar}. -% \begin{macrocode} -\renewcommand{\legend}[1]{\begin{center}#1\\\end{center}} -\renewcommand{\namedlegend}[2][]{ -\begin{center} -\csuse{fleg\@captype}\CaptionSeparator#2\\ -\end{center} -\csuse{flegtoc\@captype}{#1} -} +\renewcommand{\captiontitlefinal}[1]{} \renewcommand{\flegtable}{\tablename} \renewcommand{\flegfigure}{\figurename} \renewcommand{\flegtoctable}{} \renewcommand{\flegtocfigure}{} -\renewcommand{\newfixedcaption}[3][\caption]{% - \renewcommand{#2}{\def\@captype{#3}#1}} -\renewcommand{\renewfixedcaption}[3][\caption]{% - \renewcommand{#2}{\def\@captype{#3}#1}} -\renewcommand{\providefixedcaption}[3][\caption]{% - \providecommand{#2}{\def\@captype{#3}#1}} - -\renewcommand{\bitwonumcaption}[6][]{% -\ifblank{#2}{\caption{#3}}{\caption[#2]{#3}}% -\addtocounter{\@captype}{-1}% -\begingroup% -\csdef{\@captype name}{#4}% -\ifblank{#5}{\caption{#6}}{\caption[#5]{#6}}% -\endgroup% -\ifblank{#1}{}{\label{#1}}% -} - -\LetLtxMacro\bionenumcaption\bitwonumcaption% todo - -\renewcommand{\bicaption}[5][]{% -\ifblank{#2}{\caption{#3}}{\caption[#2]{#3}}% -\begin{LWR@figcaption}% later becomes \caption* -#4 \thechapter.\the\value{\@captype}\CaptionSeparator #5 -\end{LWR@figcaption} -\ifblank{#1}{}{\label{#1}}% -} - -\renewcommand{\bicontcaption}[3]{% -\contcaption{#1}% -\begingroup% -\csdef{\@captype name}{#2}% -\contcaption{#3}% -\endgroup% -} - -\renewcommand{\midbicaption}[1]{} \renewcommand{\subcaption}[2][]{% \ifblank{#1}{\subfloat[#2]{}}{\subfloat[#1][#2]{}}% } -\RenewDocumentCommand{\subtop}{O{} O{} m}{% -\subfloat[#1][#2]{#3}% -} - -\RenewDocumentCommand{\subbottom}{O{} O{} m}{% -\subfloat[#1][#2]{#3}% -} - \renewcommand{\contsubcaption}{\ContinuedFloat\subcaption} -\renewcommand{\contsubtop}{% -\ContinuedFloat\addtocounter{\@captype}{1}% -\subtop} - -\renewcommand{\contsubbottom}{% -\ContinuedFloat\addtocounter{\@captype}{1}% -\subbottom} - -\renewcommand{\subconcluded}{} - \LetLtxMacro\subcaptionref\subref \renewcommand*{\tightsubcaptions}{} @@ -50565,6 +51486,131 @@ scaling = false \renewenvironment{vplace}[1][]{}{} % \end{macrocode} % +% +% \subsection{Ccaption emulation} +% +% \begin{macrocode} +\renewcommand*{\captiondelim}[1]{\renewcommand*{\CaptionSeparator}{#1}} +\renewcommand*{\captionnamefont}[1]{} +\renewcommand*{\captiontitlefont}[1]{} +\renewcommand*{\flushleftright}{} +\renewcommand*{\centerlastline}{} +\renewcommand*{\captionstyle}[2][]{} +\DeclareDocumentCommand{\captionwidth}{m}{} +\renewcommand*{\changecaptionwidth}{} +\renewcommand*{\normalcaptionwidth}{} +\renewcommand*{\hangcaption}{} +\renewcommand*{\indentcaption}[1]{} +\renewcommand*{\normalcaption}{} +\renewcommand{\precaption}[1]{} +\renewcommand{\postcaption}[1]{} +\renewcommand{\midbicaption}[1]{} +\renewcommand{\contcaption}[1]{% +% \ContinuedFloat% +% \caption{#1}% +\begin{LWR@figcaption}% later becomes \caption* +\csuse{\@captype name} \thechapter.\the\value{\@captype}\CaptionSeparator #1 +\end{LWR@figcaption} +} +% \end{macrocode} + +% \begin{macrocode} +\newlength{\abovelegendskip} +\setlength{\abovelegendskip}{0.5\baselineskip} +\newlength{\belowlegendskip} +\setlength{\belowlegendskip}{\abovelegendskip} +% \end{macrocode} + +% The extra |\\| here forces a \element{br} in HTML when \cs{legend} is +% used in a \cs{marginpar}. +% \begin{macrocode} +\renewcommand{\legend}[1]{\begin{center}#1\\\end{center}} + +\renewcommand{\namedlegend}[2][]{ +\begin{center} +\csuse{fleg\@captype}\CaptionSeparator#2\\ +\end{center} +\csuse{flegtoc\@captype}{#1} +} + +\renewcommand{\newfixedcaption}[3][\caption]{% + \renewcommand{#2}{\def\@captype{#3}#1}} +\renewcommand{\renewfixedcaption}[3][\caption]{% + \renewcommand{#2}{\def\@captype{#3}#1}} +\renewcommand{\providefixedcaption}[3][\caption]{% + \providecommand{#2}{\def\@captype{#3}#1}} + +\renewcommand{\bitwonumcaption}[6][]{% +\ifblank{#2}{\caption{#3}}{\caption[#2]{#3}}% +\addtocounter{\@captype}{-1}% +\begingroup% +\csdef{\@captype name}{#4}% +\ifblank{#5}{\caption{#6}}{\caption[#5]{#6}}% +\endgroup% +\ifblank{#1}{}{\label{#1}}% +} + +\LetLtxMacro\bionenumcaption\bitwonumcaption% todo + +\renewcommand{\bicaption}[5][]{% +\ifblank{#2}{\caption{#3}}{\caption[#2]{#3}}% +\begin{LWR@figcaption}% later becomes \caption* +#4 \thechapter.\the\value{\@captype}\CaptionSeparator #5 +\end{LWR@figcaption} +\ifblank{#1}{}{\label{#1}}% +} + +\renewcommand{\bicontcaption}[3]{% +\contcaption{#1}% +\begingroup% +\csdef{\@captype name}{#2}% +\contcaption{#3}% +\endgroup% +} +% \end{macrocode} +% ^^A *8* todo: +% \begin{macrocode} +% only in ccaption, not in memoir: +% \LetLtxMacro\longbitwonumcaption\bitwonumcaption% +% \LetLtxMacro\longbionenumcaption\bitwonumcaption% +% \LetLtxMacro\longbicaption\bicaption% + +\RenewDocumentCommand{\subtop}{O{} O{} m}{% +\subfloat[#1][#2]{#3}% +} + +\RenewDocumentCommand{\subbottom}{O{} O{} m}{% +\subfloat[#1][#2]{#3}% +} + +\renewcommand{\contsubtop}{% +\ContinuedFloat\addtocounter{\@captype}{1}% +\subtop} + +\renewcommand{\contsubbottom}{% +\ContinuedFloat\addtocounter{\@captype}{1}% +\subbottom} + +\renewcommand{\subconcluded}{} + +\let\subfigure\subbottom +\let\subtable\subtop + +\let\contsubtable\contsubtop +\let\contsubfigure\contsubbottom +% \end{macrocode} +% ^^A *8* todo: +% ^^A tocloft stuff +% \begin{macrocode} +\newcommand{\newfloatentry}[4][\@empty]{TODO: newfloatentry} +\newcommand{\newfloatlist}[5][\@empty]{TODO: newfloatlist} +\newcommand{\newfloatenv}[4][\@empty]{TODO: newfloatenv} +\DeclareRobustCommand{\newfloatpagesoff}[1]{} +\DeclareRobustCommand{\newfloatpageson}[1]{} +\newcommand{\setnewfloatindents}[3]{} +% \end{macrocode} +% +% % \subsection{Final patchwork} % % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.ins b/Master/texmf-dist/source/latex/lwarp/lwarp.ins index cf57ecd3dc1..74063ee0c25 100644 --- a/Master/texmf-dist/source/latex/lwarp/lwarp.ins +++ b/Master/texmf-dist/source/latex/lwarp/lwarp.ins @@ -41,6 +41,8 @@ version 2005/12/01 or later. \file{lwarp-acronym.sty}{\from{lwarp.dtx}{acronym}} \file{lwarp-adjmulticol.sty}{\from{lwarp.dtx}{adjmulticol}} \file{lwarp-addlines.sty}{\from{lwarp.dtx}{addlines}} +\file{lwarp-ae.sty}{\from{lwarp.dtx}{ae}} +\file{lwarp-aecc.sty}{\from{lwarp.dtx}{aecc}} \file{lwarp-afterpage.sty}{\from{lwarp.dtx}{afterpage}} \file{lwarp-algorithmicx.sty}{\from{lwarp.dtx}{algorithmicx}} \file{lwarp-alltt.sty}{\from{lwarp.dtx}{alltt}} @@ -55,6 +57,7 @@ version 2005/12/01 or later. \file{lwarp-axodraw2.sty}{\from{lwarp.dtx}{axodraw2}} \file{lwarp-backref.sty}{\from{lwarp.dtx}{backref}} \file{lwarp-balance.sty}{\from{lwarp.dtx}{balance}} +\file{lwarp-bibunits.sty}{\from{lwarp.dtx}{bibunits}} \file{lwarp-bigdelim.sty}{\from{lwarp.dtx}{bigdelim}} \file{lwarp-bigstrut.sty}{\from{lwarp.dtx}{bigstrut}} \file{lwarp-blowup.sty}{\from{lwarp.dtx}{blowup}} @@ -79,6 +82,7 @@ version 2005/12/01 or later. \file{lwarp-chemmacros.sty}{\from{lwarp.dtx}{chemmacros}} \file{lwarp-chemnum.sty}{\from{lwarp.dtx}{chemnum}} \file{lwarp-cite.sty}{\from{lwarp.dtx}{cite}} +\file{lwarp-clrdblpg.sty}{\from{lwarp.dtx}{clrdblpg}} \file{lwarp-color.sty}{\from{lwarp.dtx}{color}} \file{lwarp-colortbl.sty}{\from{lwarp.dtx}{colortbl}} \file{lwarp-continue.sty}{\from{lwarp.dtx}{continue}} @@ -126,6 +130,7 @@ version 2005/12/01 or later. \file{lwarp-fncychap.sty}{\from{lwarp.dtx}{fncychap}} \file{lwarp-fnlineno.sty}{\from{lwarp.dtx}{fnlineno}} \file{lwarp-fnpos.sty}{\from{lwarp.dtx}{fnpos}} +\file{lwarp-forest.sty}{\from{lwarp.dtx}{forest}} \file{lwarp-footmisc.sty}{\from{lwarp.dtx}{footmisc}} \file{lwarp-footnote.sty}{\from{lwarp.dtx}{footnote}} \file{lwarp-footnotehyper.sty}{\from{lwarp.dtx}{footnotehyper}} @@ -143,6 +148,7 @@ version 2005/12/01 or later. \file{lwarp-graphics.sty}{\from{lwarp.dtx}{graphics}} \file{lwarp-grffile.sty}{\from{lwarp.dtx}{grffile}} \file{lwarp-grid.sty}{\from{lwarp.dtx}{grid}} +\file{lwarp-gridset.sty}{\from{lwarp.dtx}{gridset}} \file{lwarp-hang.sty}{\from{lwarp.dtx}{hang}} \file{lwarp-hanging.sty}{\from{lwarp.dtx}{hanging}} \file{lwarp-hypcap.sty}{\from{lwarp.dtx}{hypcap}} @@ -155,6 +161,7 @@ version 2005/12/01 or later. \file{lwarp-ifoddpage.sty}{\from{lwarp.dtx}{ifoddpage}} \file{lwarp-indentfirst.sty}{\from{lwarp.dtx}{indentfirst}} \file{lwarp-inputenc.sty}{\from{lwarp.dtx}{inputenc}} +\file{lwarp-inputenx.sty}{\from{lwarp.dtx}{inputenx}} \file{lwarp-keyfloat.sty}{\from{lwarp.dtx}{keyfloat}} \file{lwarp-layout.sty}{\from{lwarp.dtx}{layout}} \file{lwarp-letterspace.sty}{\from{lwarp.dtx}{letterspace}} @@ -169,6 +176,7 @@ version 2005/12/01 or later. \file{lwarp-ltxtable.sty}{\from{lwarp.dtx}{ltxtable}} \file{lwarp-luacolor.sty}{\from{lwarp.dtx}{luacolor}} \file{lwarp-luatodonotes.sty}{\from{lwarp.dtx}{luatodonotes}} +\file{lwarp-magaz.sty}{\from{lwarp.dtx}{magaz}} \file{lwarp-marginfit.sty}{\from{lwarp.dtx}{marginfit}} \file{lwarp-marginfix.sty}{\from{lwarp.dtx}{marginfix}} \file{lwarp-marginnote.sty}{\from{lwarp.dtx}{marginnote}} @@ -251,9 +259,10 @@ version 2005/12/01 or later. \file{lwarp-subfigure.sty}{\from{lwarp.dtx}{subfigure}} \file{lwarp-supertabular.sty}{\from{lwarp.dtx}{supertabular}} \file{lwarp-syntonly.sty}{\from{lwarp.dtx}{syntonly}} +\file{lwarp-t1enc.sty}{\from{lwarp.dtx}{t1enc}} +\file{lwarp-tabls.sty}{\from{lwarp.dtx}{tabls}} \file{lwarp-tabularx.sty}{\from{lwarp.dtx}{tabularx}} \file{lwarp-tabulary.sty}{\from{lwarp.dtx}{tabulary}} -\file{lwarp-tabls.sty}{\from{lwarp.dtx}{tabls}} \file{lwarp-textarea.sty}{\from{lwarp.dtx}{textarea}} \file{lwarp-textcomp.sty}{\from{lwarp.dtx}{textcomp}} \file{lwarp-textfit.sty}{\from{lwarp.dtx}{textfit}} @@ -284,6 +293,7 @@ version 2005/12/01 or later. \file{lwarp-vmargin.sty}{\from{lwarp.dtx}{vmargin}} \file{lwarp-vwcol.sty}{\from{lwarp.dtx}{vwcol}} \file{lwarp-wallpaper.sty}{\from{lwarp.dtx}{wallpaper}} +\file{lwarp-wasysym.sty}{\from{lwarp.dtx}{wasysym}} \file{lwarp-watermark.sty}{\from{lwarp.dtx}{watermark}} \file{lwarp-wrapfig.sty}{\from{lwarp.dtx}{wrapfig}} \file{lwarp-xcolor.sty}{\from{lwarp.dtx}{xcolor}} -- cgit v1.2.3