From 1850a94e252ed29b333b59a110dbb5a537787d57 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 19 Nov 2018 21:54:31 +0000 Subject: lwarp (19nov18) git-svn-id: svn://tug.org/texlive/trunk@49196 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/lwarp/lwarp.dtx | 3676 +++++++++++++++++------- Master/texmf-dist/source/latex/lwarp/lwarp.ins | 20 +- 2 files changed, 2713 insertions(+), 983 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 22fae07ccc9..1ec9b71052e 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/10/13 v0.61 Allows LaTeX to directly produce HTML5 output.] +% [2018/11/19 v0.62 Allows LaTeX to directly produce HTML5 output.] % %<*driver> \documentclass{ltxdoc} @@ -99,7 +99,26 @@ \titlespacing*{\part}{0pt}{*5}{0ex} - +% redefine \part to modify \@currentlabelname: +\makeatletter +\LetLtxMacro\LWR@titlesec@part\part +\RenewDocumentCommand{\part}{s o m}{% +\def\@currentlabelname{#3}% +\IfBooleanTF{#1}{% star + \IfValueTF{#2}{% star opt + \LWR@titlesec@part*[#2]{#3}% + }{% star noopt + \LWR@titlesec@part*{#3}% + }% +}{% no star + \IfValueTF{#2}{% opt + \LWR@titlesec@part[#2]{#3}% + }{% noopt + \LWR@titlesec@part{#3}% + }% +}% +} +\makeatother \usepackage{needspace} @@ -115,6 +134,16 @@ \usepackage{graphicx} \graphicspath{{images/}} +\usepackage{metalogo} +% for erewhon: +\setlogokern{Te}{-.08em} +\setlogokern{eX}{-0.04em} +\setlogokern{La}{-.25em} +\setlogokern{aT}{-.10em} +\setlogokern{Xe}{-.04em} +\setlogokern{eL}{-.06em} +\setlogodrop{0.27ex} + \usepackage{enumitem} \usepackage{array} @@ -131,7 +160,6 @@ \usepackage{capt-of} \usepackage{comment} -\excludecomment{testing} \usepackage{tocloft} \renewcommand{\cftpartfont}{\Large\bfseries} @@ -283,8 +311,12 @@ Keywords={LaTeX, HTML, conversion}% \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*{\pkg}[1]{\mbox{\textbf{\textsf{#1}}}} +% \providerobustcmd*{\prog}[1]{\mbox{\textbf{\textsf{#1}}}} +\providerobustcmd*{\pkg}[1]{\mbox{\textsf{#1}}} +\providerobustcmd*{\prog}[1]{\mbox{\textsf{\textsl{#1}}}} + \providerobustcmd*{\progcode}[1]{\mbox{\texttt{#1}}} \providerobustcmd*{\optn}[1]{\mbox{\texttt{#1}}} \providerobustcmd*{\filenm}[1]{\mbox{\texttt{#1}}} @@ -293,7 +325,7 @@ Keywords={LaTeX, HTML, conversion}% \newrobustcmd{\acro}[1]{\textsc{\lowercase{#1}}} \newrobustcmd{\element}[1]{\texttt{<#1>}} -\newrobustcmd{\attribute}[1]{\texttt{#1}} +\newrobustcmd{\attribute}[1]{\mbox{\texttt{#1}}} \newrobustcmd{\UI}[1]{\textbf{\textsf{#1}}} \newrobustcmd{\supregistered}{\textsuperscript{\textregistered}} @@ -319,6 +351,7 @@ Keywords={LaTeX, HTML, conversion}% \newrobustcmd{\MathML}{Math\acro{ML}} \newrobustcmd{\CTAN}{\acro{CTAN}} \newrobustcmd{\TDS}{\acro{TDS}} +\newrobustcmd{\UTF}{\acro{UTF}} \newcommand{\spslash}{\unskip\kern.085em/\hspace{.085em}\penalty\exhyphenpenalty\hspace{0pt}} @@ -372,7 +405,7 @@ Keywords={LaTeX, HTML, conversion}% \leavevmode \par \fqquad\minipage{\linewidth-2em} -\sffamily +\sffamily\bfseries } { \endminipage @@ -428,9 +461,9 @@ Keywords={LaTeX, HTML, conversion}% \begin{minipage}{\linewidth} \hrule\smallskip \small -The index to this document contains several hundred -custom entries. -Also included are automated entries for each package, macro, environment, +See the \nameref{sec:indexgen} for ``how-to'', and +the \nameref{sec:indextrb} if something doesn't work. +The \nameref{sec:indexidx} contains automated entries for each package, macro, environment, counter, boolean, and other objects; individually and also sorted by category. A \nameref{sec:troubleshooting} section is also available. \hrule @@ -705,7 +738,7 @@ An index may be placed inline with other \HTML\ text, or on its own \HTML\ page: \begin{description} -\item [Inline, with a manual TOC entry:] \ +\item [Inline, with a manual \TOC\ entry:] \ \DescribePackage{makeidx} A commonly-used method to introduce an index in a \LaTeX\ document: @@ -717,7 +750,7 @@ An index may be placed inline with other \HTML\ text, or on its own \HTML\ page: \end{sourcedisplay} \needspace{3\baselineskip} -\item [On its own \HTML\ page, with a manual TOC entry:] \ +\item [On its own \HTML\ page, with a manual \TOC\ entry:] \ \DescribePackage{makeidx} \begin{sourcedisplay} \cs{begin}\{warpprint\} \\ @@ -730,7 +763,7 @@ An index may be placed inline with other \HTML\ text, or on its own \HTML\ page: \cs{printindex} \end{sourcedisplay} -\item [Inline, with an automatic TOC entry:] \ +\item [Inline, with an automatic \TOC\ entry:] \ \DescribePackage{tocbibind} The \pkg{tocbibind} @@ -743,7 +776,7 @@ An index may be placed inline with other \HTML\ text, or on its own \HTML\ page: \cs{printindex} \end{sourcedisplay} -\item [On its own \HTML\ page, with an automatic TOC entry:] \ +\item [On its own \HTML\ page, with an automatic \TOC\ entry:] \ \DescribePackage{tocbibind} \begin{sourcedisplay} \cs{usepackage}[nottoc]\{tocbibind\} \\ @@ -892,7 +925,7 @@ are not supported. Many \pkg{textcomp} symbols are not supported by many fonts. \trouble[missing symbols]{textcomp=\pkg{textcomp}>missing symbols} \trouble{font>missing symbols} -In the CSS try referencing fonts which are more complete, but expect to see gaps in coverage. +In the \CSS\ try referencing fonts which are more complete, but expect to see gaps in coverage. } \newcommand{\limitsaccents}{% @@ -1092,8 +1125,8 @@ For the \env{lateximage} environment, the size of the math and text used \margintag{SVG image font size} in the \SVG\ image may be adjusted -\gindex{font>size --- lateximage}% -\gindex{font>size --- math, SVG}% +\gindex{font>size>lateximage}% +\gindex{font>size>math, SVG}% \gindex{math>font size --- SVG}% \gindex{lateximage>font size}% by setting \cs{LateximageFontSizeName} to a font size name \Dash \emph{without the backslash}, @@ -1143,7 +1176,7 @@ Problems with \MathML\ include limited browser support and some issues with the fine control of the appearance of the result. Also see \cref{sec:epub} regarding \EPUB\ output with \brand{MathJax}. -\subsubsection{SVG option} +\subsubsection{\SVG\ option} For \SVG\ math, \margintag{SVG math option} @@ -1326,6 +1359,35 @@ Examples: \end{sourcedisplay} } +%\newcommand{\limitscustomizeKaTeX}{% +%Ka\TeX\ does not have preexisting support every possible math function. +%Additional Ka\TeX\ function definitions may be +%defined. These will be declared at the start of each \HTML\ page, +%and thus will have a global effect. + +%Examples: +%\begin{sourcedisplay} +%\cs{CustomizeKaTeX}\{ \\ + %\fqquad\cs{gdef}\cs{expval}\#1\{\cs{langle}\#1\cs{rangle}\} \\ + %\fqquad\cs{gdef}\cs{abs}\#1]\{\cs{lvert}\#1\cs{rvert}\} \\ +%\} \\ +%\cs{CustomizeKaTeX}\{\cs{gdef}\cs{arsinh}\{\cs{text}\{arsinh\}\}\} \\ +%\cs{CustomizeKaTeX}\{\cs{gdef}\cs{arcosh}\{\cs{text}\{arcosh\}\}\} +%\cs{CustomizeKaTeX}\{\cs{gdef}\cs{NN}\{\cs{mathbb}\{N\}\}\} +%\end{sourcedisplay} +%} + +\newcommand{\limitschemfig}{% +If using \cs{polymerdelim} to add delimiters to a \cs{chemfig}, +wrap both inside a single \env{lateximage}: +\begin{sourcedisplay} +\cs{begin}\{lateximage\}[(-chemfig-\textasciitilde\cs{packagediagramname})] \\ +\cs{chemfig}\{\dots\} \\ +\cs{polymerdelim}[\dots]\{\dots\} \\ +\cs{end}\{lateximage\} +\end{sourcedisplay} +} + \newcommand{\limitschemformula}{% \pkg{chemformula} works best without \brand{MathJax}. \trouble[\pkg{chemformula} with \brand{MathJax}]{MathJax=\brand{MathJax}>chemformula=\pkg{chemformula}} @@ -1628,6 +1690,24 @@ The filename must not have a file extension. Use \userentry{lwarpmk html} followed by \userentry{lwarpmk limages}. } +\newcommand{\limitsasymptote}{% +To compile: +\begin{sourcedisplay} +pdflatex project.tex \\ +asy project-*.asy \\ +pdflatex project.tex \\ [\baselineskip] +lwarpmk print \\ +asy project-*.asy \\ +lwarpmk print1 \\ +lwarpmk print1 \\[\baselineskip] +lwarpmk html \\ +asy project\textred{\_html}-*.asy \\ +lwarpmk html1 \\ +lwarpmk html1 \\ +\textred{lwarpmk limages} \\ +\end{sourcedisplay} +} + \newcommand{\limitsoverpic}{% The macros \cs{overpicfontsize} and \cs{overpicfontskip} are used during \trouble[scaling]{overpic=\pkg{overpic}} @@ -2005,7 +2085,7 @@ Side-by-side minipages may be separated by \cs{quad}, \cs{qquad}, \cs{enskip}, \margintag{side-by-side} \cs{hspace}, \cs{hfill}, or a \cs{rule}. When inside a \env{center} environment, the result is -similar in print and \HTML. Paragraph tags are surpressed between +similar in print and \HTML. Paragraph tags are suppressed between side-by-side minipages and these spacing commands, but not at the start or end of the paragraph. @@ -2472,7 +2552,7 @@ This boolean may be tested by the user for later use. %<*package> % \fi % -% \CheckSum{26157} +% \CheckSum{26573} % % \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 @@ -2516,7 +2596,7 @@ This boolean may be tested by the user for later use. % \changes{v0.17}{2016/04/14}{Test Suite: Fix: Print-version front-matter page numbers.} % \changes{v0.18}{2016/05/19}{\ 2016/05/19} % \changes{v0.18}{2016/04/23}{Files: lwarp.css and lwarp\_formal.css: Improved responsive design.} -% \changes{v0.18}{2016/04/23}{File: lwarp.css: Improved TOC outline display.} +% \changes{v0.18}{2016/04/23}{File: lwarp.css: Improved \TOC\ outline display.} % \changes{v0.18}{2016/05/13}{Test Suite: Verse package} % \changes{v0.19}{2016/06/08}{\ 2016/06/08} % \changes{v0.19}{2016/05/25}{File: \filenm{lwarp\_mathjax.txt} added.} @@ -2576,6 +2656,7 @@ This boolean may be tested by the user for later use. % \changes{v0.59}{2018/09/07}{\ 2018/09/07} % \changes{v0.60}{2018/09/19}{\ 2018/09/19} % \changes{v0.61}{2018/10/13}{\ 2018/10/13} +% \changes{v0.62}{2018/11/19}{\ 2018/11/19} @@ -2596,6 +2677,8 @@ This boolean may be tested by the user for later use. % % {\Huge The \textbf{lwarp} package} % +% \smallskip +% % {\Large \textup{\LaTeX{} to HTML}} % % \bigskip @@ -2641,7 +2724,6 @@ This boolean may be tested by the user for later use. % A tutorial is provided to quickly introduce the user to the major components % of the package. % -% % \bigskip % % \begin{center} @@ -2702,6 +2784,7 @@ This boolean may be tested by the user for later use. % \item benefit students, academics, scientists, engineers, and businesses; % \item help drive education, public and private research, and commercial activity; % \item are used in the fields of mathematics, science, engineering, and humanities; +% \item are international in reach; % \item span decades of development; % \item are enduring \Dash many older packages are still actively used and maintained; % \item are largely backwards compatible; @@ -2730,19 +2813,19 @@ This boolean may be tested by the user for later use. % \item[LuaTeX:] Combining the pdf\TeX\ engine and the Lua language. % \item[MetaPost:] Postscript graphics. % \item[MacTeX:] \TeX\ for Mac. -% \item[PDF Accessibility:] Modern PDF standards. +% \item[PDF Accessibility:] Modern \PDF\ standards. % \item[Other:] Additional projects may be specified. % \end{description} % % To make a contribution: \hfill % \href{https://www.tug.org/donate.html}{\texttt{https://www.tug.org/donate.html}} % -% For users of MiK\TeX: \hfill -% \href{https://miktex.org/donations.html}{\texttt{https://miktex.org/donations.html}} -% % For country-specific \TeX\ users groups: \hfill % \href{http://tug.org/usergroups.html}{\texttt{http://tug.org/usergroups.html}} % +% For users of MiK\TeX: \hfill +% \href{https://miktex.org/donations.html}{\texttt{https://miktex.org/donations.html}} +% % \endgroup % % \clearpage @@ -2773,6 +2856,48 @@ This boolean may be tested by the user for later use. % % \begin{description} % \needspace{2\baselineskip} +% \item[v0.62:] MiK\TeX\ docs, \HTML\ title, C\TeX\, \pkg{xeCJK}, \pkg{bitpattern}. +% \begin{itemize} +% \item Docs: Setting a \UTF-8 locale. See \cref{sec:utf8locale}. +% \margintag{docs} +% \item MiK\TeX: Docs for \prog{MiKTeX Console} and \pkg{miktex-poppler-bin}. +% \margintag{MiK\TeX} +% \item \HTML\ subpage titles: Added \cs{HTMLTitleBeforeSection} and +% \margintag{\HTML\ \element{title}} +% \cs{HTMLTitleAfterSection} to select whether +% the \HTML\ \element{title} displays the website name before or +% after the section name. +% See \cref{sec:htmlsettings}. +% \item Fix for package options handling. +% \margintag{fixes} +% \item Fixes for horizontal white space between \env{fminipage}, \env{fcolorminipage}, +% \env{colorboxBlock}, \env{fcolorboxBlock}. +% \item Logos: Fix for \XeTeX\ logo, improved \CSS, made robust, +% improved search-engine optimization. +% \item |\\[$1]|: Additional \HTML\ \element{br} if $\$1 > 0\,\textrm{pt}$. +% \item Fixes for \cs{includgraphics} filename, and with \bool{FormatWP}. +% \item Fix: \CSS\ for \cs{textup}. +% \item Fix: Added \cs{slshape}. +% \item \pkg{chemfig}: Docs for new macro \cs{polymerdelim}. +% \margintag{packages} +% \item \pkg{asymptote}: Docs for compilation. +% \item \pkg{chngpage}: Fix to load \pkg{lwarp-changepage}. +% \item \pkg{algorithm2e}: Fix with non-\pkg{book} classes. +% \item \pkg{register}: Updated to v1.8. +% \item \pkg{nicefrac}: Improved font control and \CSS, honors \optn{nice} and \optn{ugly}. +% \item \pkg{units}: Improved font control and \CSS, honors \optn{tight} and \optn{loose}. +% \item \pkg{xfrac}: Improved \CSS. +% \item \pkg{textcomp} and \pkg{xunicode}: Fix conflicts with \cs{textcircled}. +% \item \pkg{ulem}: Improved compatibility with \pkg{CJKulem}, \env{lateximage}. +% \item MathJax and \pkg{siunitx}: Removed inoperable extension. +% \item Added \pkg{ctex} package and related classes, \pkg{xeCJK}. +% \item Prevented \pkg{CJK}, \pkg{CJKutf8} unless \pkg{xeCJK}, \pkg{ctex} are used. +% \item Added \pkg{bitpattern}, \pkg{pdfcomment}, +% \pkg{pdfmarginpar}, \pkg{tram}, \pkg{unitsdef}, \pkg{xechangebar}. +% \item Added \pkg{musicography}, \pkg{octave}, \pkg{semantic-markup}. +% \item Added \pkg{2in1}, \pkg{flippdf}, \pkg{notespages}, \pkg{rviewport}, \pkg{twoup}. +% \end{itemize} +% \needspace{2\baselineskip} % \item[v0.61:] Custom compilation, \EPS-related packages, documentation, indexes. % \begin{itemize} % \item Split index into multiple indexes. See \cpageref{sec:indexmeta}. @@ -2803,9 +2928,9 @@ This boolean may be tested by the user for later use. % \item Fix: Paragraph tags in a \env{tabular}. % \margintag{fixes} % \item Fix: \pkg{supertabular} and \pkg{xtab} captions. -% \item Fix: DVI \LaTeX\ \cs{includegraphics} \EPS\ images. +% \item Fix: \DVI\ \LaTeX\ \cs{includegraphics} \EPS\ images. % \item Fix: \pkg{newfloat} lists. -% \item Fix: CSS footnotes text align, minipage tabular and footnote margins. +% \item Fix: \CSS\ footnotes text align, minipage tabular and footnote margins. % \item Added \pkg{epsfig}, \pkg{psfrag}, \pkg{psfragx}, \pkg{pstool}. % \margintag{packages} % \item Added \pkg{copyrightbox}, \pkg{pdfprivacy}, \pkg{thinsp}, @@ -3272,11 +3397,11 @@ This boolean may be tested by the user for later use. % \pkg{scrlayer}, \pkg{scrlayer-notecolumn}, \pkg{scrlayer-scrpage}, % \pkg{scrhack}, \pkg{tocstyle}, \pkg{tocbasic}. % \item Added \cs{HTMLTitle}. -% \margintag{HTML title and author} +% \margintag{\HTML\ title and author} % Fixed web page title if \cs{HTMLTitle} empty and no \cs{title} given and % not using \pkg{titling} package. % \item Fixed web page author if \cs{HTMLauthor} is empty and \cs{author} is not given. -% \item If using \prog{pdflatex}, automatically loads T1 and UTF8 encodings. +% \item If using \prog{pdflatex}, automatically loads T1 and \acro{UTF}-8 encodings. % \margintag{encodings} % (Additional \pkg{fontenc} encodings may be loaded after \pkg{lwarp}.) % \item Added \env{list} and \env{trivlist} environments, \pkg{hang}.\margintag{lists} @@ -3831,7 +3956,7 @@ This boolean may be tested by the user for later use. % ^^A \item \cs{minipagefullwidth} requests that the next minipage be % ^^A full-width in \HTML, but still the assigned width in print. % ^^A \item \env{minipage} improved side-by-side rendering. -% ^^A \item CSS class |tablenotes| is provided for table note items. +% ^^A \item \CSS\ class |tablenotes| is provided for table note items. % ^^A \item \cs{warpprintonly} replaces \cs{rowprintedonly}, % ^^A and \cs{warpHTMLonly} is added. These behave like the \env{warpprint} % ^^A \watchout @@ -3982,7 +4107,39 @@ This boolean may be tested by the user for later use. % code used to emulate or replace functions for \HTML\ output. % % +% \clearpage +% +% \subsection{Typesetting conventions} +% +% Font weight, family, and style are used to indicate various objects: % +% \begin{table}[hbp] +% \caption{Typesetting conventions} +% \centering +% \begin{tabular}{lp{3in}} +% \toprule +% \pkg{package} & \LaTeX\ package. \\ +% \prog{program} & Program's executable name. \\ +% \optn{option} & Program or package option. \\ +% \midrule +% \filenm{filename} & File name in the operating system. \\ +% \brand{Brand Name} & Proper name for a program, operating system, etc. \\ +% \midrule +% \cmds{commands} & Commands to be entered by the user. \\ +% \progcode{code} & Program code. \\ +% \cs{macroname} & \LaTeX\ macro. \\ +% \env{environment} & \LaTeX\ environment. \\ +% \ctr{counter} & \LaTeX\ counter. \\ +% \bool{boolean} & \LaTeX\ boolean. \\ +% \midrule +% \element{element} & \HTML\ element. \\ +% \attribute{attribute} & \HTML\ attribute. \\ +% \midrule +% \UI{User Interface} & A user-interface item. \\ +% \acro{ACRO} & Acronym. \\ +% \bottomrule +% \end{tabular} +% \end{table} % % \clearpage % @@ -4008,7 +4165,7 @@ This boolean may be tested by the user for later use. % ^^A *supported features % % \begin{longtable}{>{\raggedright}p{.3\linewidth}p{.6\linewidth}} -% \caption{\protect\LaTeX--HTML generation --- +% \caption{\protect\LaTeX--\acro{HTML} generation --- % \pkg{lwarp} package --- % Supported features\label{tab:supported}} \endfirsthead % \warpprintonly{\multicolumn{2}{c}{\pkg{lwarp} Supported Functions --- continued} \\ @@ -4022,34 +4179,37 @@ This boolean may be tested by the user for later use. % % Engines: & \DVI\ \LaTeX, pdf\LaTeX, \XeLaTeX, \LuaLaTeX \\ % -% Compiling: & % \pkg{latexmk}, \pkg{perltex}, \pkg{pythontex}, \prog{make}, etc. \\ +% Compiling: & \pkg{latexmk}, \pkg{perltex}, \pkg{pythontex}, \prog{make}, etc. \\ % % \midrule % % Classes: & \pkg{article}, \pkg{book}, \pkg{report}, -% \pkg{scrartcl}, \pkg{scrbook}, \pkg{scrreprt}, \pkg{memoir}. \\ +% \pkg{scrartcl}, \pkg{scrbook}, \pkg{scrreprt}, \pkg{memoir}, C\TeX-related. \\ % % Koma-script: & \pkg{scrextend}, \pkg{scrhack}, \pkg{scrlayer}. % Others as listed below. \\ % % Memoir: & \pkg{memhfixc} \\ % +% Languages: & \pkg{babel}, \pkg{ctex}, \pkg{polyglossia}, \pkg{xeCJK}. \\ +% % \midrule % -% Page layout: & \pkg{2up}, \pkg{a4}, \pkg{a4wide}, \pkg{a5comb}, +% Page layout: & \pkg{2in1}, \pkg{2up}, \pkg{a4}, \pkg{a4wide}, \pkg{a5comb}, % \pkg{addlines}, \pkg{anysize}, \pkg{atbegshi}, % \pkg{blowup}, \pkg{booklet}, \pkg{bophook}, \pkg{bxpapersize}, % \pkg{canoniclayout}, \pkg{clrdblpg}, % \pkg{continue}, \pkg{draftcopy}, \pkg{draftfigure}, \pkg{draftwatermark}, % \pkg{ebook}, \pkg{everyshi}, -% \pkg{fancyhdr}, \pkg{fancytabs}, \pkg{fullminipage}, \pkg{fullpage}, +% \pkg{fancyhdr}, \pkg{fancytabs}, \pkg{flippdf}, +% \pkg{fullminipage}, \pkg{fullpage}, % \pkg{fwlw}, \pkg{geometry}, \pkg{grid}, \pkg{grid-system}, \pkg{gridset}, % \pkg{layaureo}, \pkg{leading}, -% \pkg{ltxgrid}, \pkg{nccfancyhdr}, \pkg{pagegrid}, +% \pkg{ltxgrid}, \pkg{nccfancyhdr}, \pkg{notespages}, \pkg{pagegrid}, % \pkg{pdfprivacy}, \pkg{pagesel}, \pkg{preview}, % \pkg{scrlayer-scrpage}, \pkg{textarea}, \pkg{threadcol}, % \pkg{thumb}, \pkg{thumbs}, \pkg{titleps}, \pkg{tocenter}, -% \pkg{turnthepage}, \pkg{typearea}, \pkg{vmargin}, +% \pkg{turnthepage}, \pkg{twoup}, \pkg{typearea}, \pkg{vmargin}, % \pkg{watermark}, \pkg{zwpagelayout}. % % Tested to work as-is: \pkg{underlin}.\\ @@ -4090,8 +4250,6 @@ This boolean may be tested by the user for later use. % \pkg{hypdestopt}, \pkg{hyperref}, \pkg{prettyref}, % \pkg{titleref}, \pkg{url}, \pkg{varioref}, \pkg{xurl}. \\ % -% Languages: & \pkg{babel}, \pkg{polyglossia}. \\ -% % \midrule % % Margin notes: & \pkg{marginfit}, \pkg{marginfix}, \pkg{scrlayer-notecolumn}. \\ @@ -4126,7 +4284,9 @@ This boolean may be tested by the user for later use. % % \midrule % -% Units and fractions: & \pkg{nicefrac}, \pkg{SIunits}, \pkg{siunitx}, \pkg{units}, \pkg{xfrac}. +% Units and fractions: & +% \pkg{nicefrac}, \pkg{SIunits}, \pkg{siunitx}, +% \pkg{units}, \pkg{unitsdef}, \pkg{xfrac}. % % Tested to work as-is: \pkg{SIunits}. \\ % @@ -4162,7 +4322,8 @@ This boolean may be tested by the user for later use. % % \pkg{asymptote}, \pkg{epsfig}, \pkg{epstopdf}, \pkg{figsize}, % \pkg{grffile}, \pkg{overpic}, -% \pkg{psfrag}, \pkg{psfragx}, \pkg{pst-eps}, \pkg{pstool}, \pkg{pstricks}. +% \pkg{psfrag}, \pkg{psfragx}, \pkg{pst-eps}, \pkg{pstool}, \pkg{pstricks}, +% \pkg{rviewport}. % % Tested to work as-is: % \pkg{eepic}, \pkg{tikz-3dplot}. \\ @@ -4208,13 +4369,6 @@ This boolean may be tested by the user for later use. % % \midrule % -% Acronyms: & \pkg{acro}, \pkg{acronym}. \\ -% -% Editorial: & \pkg{changebar}, \pkg{easy-todo}, \pkg{errata}, \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 some cases. @@ -4222,9 +4376,12 @@ This boolean may be tested by the user for later use. % \pkg{lua-check-hyphen}, \pkg{luacolor}, % \pkg{magaz}, \pkg{nowidow}, \pkg{pdfrender}, \pkg{realscripts}, \pkg{relsize}, % \pkg{scalefnt}, \pkg{soul}, \pkg{soulpos}, \pkg{soulutf8}, -% \pkg{textfit}, \pkg{thinsp}, \pkg{trimclip}, \pkg{ulem}, \pkg{underscore}, \pkg{uspace}, +% \pkg{textfit}, \pkg{thinsp}, \pkg{trimclip}, +% \pkg{ulem}, \pkg{underscore}, \pkg{uspace}, % \pkg{widows-and-orphans}, \pkg{xellipsis}. \\ % +% Acronyms: & \pkg{acro}, \pkg{acronym}. \\ +% % Ordinals: & \pkg{engord}, \pkg{fmtcount}, \pkg{nth}. \\ % % Text ligatures: & Ligatures for symbols are supported. @@ -4238,7 +4395,7 @@ This boolean may be tested by the user for later use. % % Rules: & \cs{rule} with width, height, raise, text color. \\ % -% HTML reserved characters: & \cs{\&}, \cs{textless}, and +% \HTML\ reserved characters: & \cs{\&}, \cs{textless}, and % \cs{textgreater} are converted to \HTML\ entities. \\ % % \midrule @@ -4260,13 +4417,13 @@ This boolean may be tested by the user for later use. % \midrule % % Science and engineering: & -% \pkg{algorithm2e}, \pkg{algorithmicx}, \pkg{axodraw2}, \pkg{bytefield}, +% \pkg{algorithm2e}, \pkg{algorithmicx}, \pkg{axodraw2}, \pkg{bitpattern}, \pkg{bytefield}, % \pkg{chemfig}, \pkg{chemformula}, \pkg{chemgreek}, \pkg{chemmacros}, \pkg{chemnum}, % \pkg{listings}, \pkg{mhchem}, \pkg{phfqit}, \pkg{register}. % % Tested to work as-is: % \pkg{blochsphere}, \pkg{bodegraph}, \pkg{bohr}, \pkg{circuitikz}, -% \pkg{elements}, \pkg{fast-diagram}, +% \pkg{elements}, \pkg{engtlc}, \pkg{fast-diagram}, % \pkg{hepnicenames}, \pkg{heppennames}, % \pkg{linop}, \pkg{pgfgantt}, \pkg{physics}, \pkg{simpler-wick}, \pkg{slashed}, % \pkg{structmech}, \pkg{tikzcodeblocks}. @@ -4274,13 +4431,22 @@ This boolean may be tested by the user for later use. % % \midrule % -% Liberal arts and humanities: & \pkg{forest}, \pkg{schemata}, \pkg{vowel}, \pkg{xpiano}. +% Arts and humanities: & \pkg{forest}, \pkg{musicography}, \pkg{octave}, +% \pkg{schemata}, \pkg{semantic-markup}, \pkg{vowel}, \pkg{xpiano}. % % Tested to work as-is: % \pkg{phonrule}, \pkg{piano}, \pkg{tikz-dependency}. \\ % % \midrule % +% Editorial: & \pkg{changebar}, +% \pkg{easy-todo}, \pkg{errata}, \pkg{fixme}, +% \pkg{fixmetodonotes}, +% \pkg{pdfcomment}, \pkg{pdfmarginpar}, +% \pkg{todo}, \pkg{todonotes}, \pkg{tram}, \pkg{xechangebar}. \\ +% +% \midrule +% % Accessibility: & \pkg{accsupp}, \pkg{axessibility}. \\ % % \midrule @@ -4318,7 +4484,7 @@ This boolean may be tested by the user for later use. % a good choice. For new projects with a large number of documents, it may be worth % investigating the alternatives before decided which path to take. % -% \subsection{Internet class} +% \subsection{\pkg{internet} class} % % \changes{v0.21}{2017/02/15}{Docs: Added \pkg{internet} class.} % @@ -4331,12 +4497,12 @@ This boolean may be tested by the user for later use. % % % -% \subsection{TeX4ht} +% \subsection{\brand{TeX4ht}} % % \url{http://tug.org/tex4ht/}\DescribeProgram{TeX4ht}\DescribeProgram{htlatex} % % \bigskip\noindent -% This system uses native \LaTeX{} processing to produce a DVI file containing special commands, +% This system uses native \LaTeX{} processing to produce a \DVI\ file containing special commands, % and then uses additional post-processing for the \HTML\ conversion by way of numerous configuration % files. % In some cases \pkg{lwarp} provides a better \HTML\ conversion, and it supports @@ -4371,7 +4537,7 @@ This boolean may be tested by the user for later use. % \item [Glad\TeX:] \url{http://humenda.github.io/GladTeX/} \DescribeProgram{GladTeX} % \end{description} % -% \subsection{AsciiDoc and Asciidoctor} +% \subsection{\brand{AsciiDoc} and \brand{Asciidoctor}} % % AsciiDoc is one of the most capable markup languages, providing enough features to produce % the typical technical-writing document with cross-references, @@ -4381,7 +4547,7 @@ This boolean may be tested by the user for later use. % \item [AsciiDoc:] \url{http://asciidoc.org/} (The original project.)\DescribeProgram{AsciiDoctor} % \end{description} % -% \subsubsection{Asciidoctor-LaTeX} +% \subsubsection{\brand{Asciidoctor-\LaTeX}} % The Asciidoctor-LaTeX project is developing additional \LaTeX{}-related features. % \begin{description} % \item [Asciidoctor-LateX:] ~ \\ @@ -4390,7 +4556,7 @@ This boolean may be tested by the user for later use. % \DescribeProgram{Asciidoctor-LaTeX} % \end{description} % -% \subsection{Pandoc} +% \subsection{\brand{Pandoc}} % \DescribeProgram{Pandoc} % A markup system which also reads and writes \LaTeX{} and \HTML. % \begin{description} @@ -4449,7 +4615,7 @@ This boolean may be tested by the user for later use. % For print output, \LaTeX{} configuration % files are usually used. For \HTML\ output, a \CSS\ file will be available, but additional % configuration may require editing some form of control file with a different syntax, such as XML. -% In the case of \pkg{lwarp}, CSS is used, and much \HTML\ output is adjusted +% In the case of \pkg{lwarp}, \CSS\ is used, and much \HTML\ output is adjusted % through the usual \LaTeX\ optional macro parameters, % but further customization may require patching \LaTeX{} code. % @@ -4532,7 +4698,8 @@ This boolean may be tested by the user for later use. % % \end{description} % -% These might be provided by your operating-system package manager. +% These might be provided by your operating-system package manager, +% and MiK\TeX\ provides \pkg{miktex-poppler-bin-*} packages. % % From \brand{Poppler}: \url{poppler.freedesktop.org}. % @@ -4540,13 +4707,13 @@ This boolean may be tested by the user for later use. % \url{https://brew.sh/}, install \prog{Homebrew}, then % \userentry{brew install poppler} % -% For \brand{Windows}, see: \\ +% For \brand{Windows}, see Mik\TeX\ \pkg{miktex-poppler-bin-*}, or: \\ % \url{https://sourceforge.net/projects/poppler-win32/} \quad and: \\ % \url{http://blog.alivate.com.au/poppler-windows/} % % \item[\prog{Perl}:] \ % -% This may be provided by your operating-system package manager, and is +% This may be provided by your operating-system package manager, and may be % required for some of the \brand{Poppler} \PDF\ utilities. % % \url{strawberryperl.com} (recommended), \url{perl.org} @@ -4583,16 +4750,21 @@ This boolean may be tested by the user for later use. % try installing via \prog{tlmgr}: % \userentry{tlmgr install lwarp} % -% \item [MiK\TeX:] If using MiK\TeX: +% \item [MiK\TeX:] \ % \begin{enumerate} -% \item To install \pkg{lwarp} the first time, +% \item For newer versions of MiK\TeX, install or update \pkg{lwarp} +% using the \prog{MiKTeX Console} program. +% \changes{v0.62}{2018/11/03}{Docs: \prog{MiKTeX Console}} +% \item For older versions of MiK\TeX, +% to install \pkg{lwarp} the first time, % use the \prog{MikTeX Package Manager (Admin)}. -% \item To update \pkg{lwarp}, use \prog{MikTeX Update (Admin)}. +% To update \pkg{lwarp}, use \prog{MikTeX Update (Admin)}. % \item Either way, also update the package \pkg{miktex-misc}, which will install and % update the \prog{lwarpmk} executable. % \end{enumerate} % \changes{v0.26}{2017/03/23}{Docs: Improved MiK\TeX\ install instructions.} % \changes{v0.45}{2017/11/30}{Docs: Improved MiK\TeX\ install instructions.} +% \changes{v0.62}{2018/11/03}{Docs: Improved MiK\TeX\ install instructions.} % % \item [Operating-system package:] The operating-system package manager may % already have \pkg{lwarp}, perhaps as part of a set of \TeX-related packages. @@ -4608,7 +4780,7 @@ This boolean may be tested by the user for later use. % \userentry{kpsewhich -var-value TEXMFLOCAL} % \item[MiK\TeX:] \ % -% In the ``Settings'' window, ``Roots'' tab, look for a local \TDS\ root. +% In the \UI{Settings} window, \UI{Roots} tab, look for a local \TDS\ root. % \end{description} % This should be something like: % \begin{sourcedisplay} @@ -4620,7 +4792,7 @@ This boolean may be tested by the user for later use. % \userentry{texhash} % % Or, for \brand{Windows} MiK\TeX, start the program called \prog{MiKTeX Settings (Admin)} -% and click on the button called \textsf{Refresh FNDB}. +% and click on the button called \UI{Refresh FNDB}. % \end{enumerate} % % \item[CTAN \filenm{.dtx} and \filenm{.ins} files:] Another form of \TeX\ package @@ -4658,7 +4830,7 @@ This boolean may be tested by the user for later use. % \userentry{texhash} % % Or, for \brand{Windows} MiK\TeX, start the program called \prog{MiKTeX Settings (Admin)} -% and click on the button called \textsf{Refresh FNDB}. +% and click on the button called \UI{Refresh FNDB}. % % \item See \cref{sec:locallwarpmk} to generate your local copy of \prog{lwarpmk}. % \item Once the local version of \filenm{lwarpmk.lua} is installed, it may be made @@ -4692,8 +4864,8 @@ This boolean may be tested by the user for later use. % After the \pkg{lwarp} package is installed, % you may need to setup the \prog{lwarpmk} utility: % \begin{enumerate} -% \item At a command line, try executing \prog{lwarpmk}. If the \prog{lwarpmk} help message -% appears, then \prog{lwarpmk} is already set up. +% \item At a command line, try executing \cmds{lwarpmk}. +% If the \prog{lwarpmk} help message appears, then \prog{lwarpmk} is already set up. % If not, it is easiest to generate and use a local copy. % See \cref{sec:locallwarpmk}. % @@ -4735,7 +4907,7 @@ This boolean may be tested by the user for later use. % \end{enumerate} % \item [\brand{Windows} \TeX\ Live:] Create a new |lwarpmk.exe| file: % \begin{enumerate} -% \item Locate the \TeX\ Live binaries as shown above for Unix. +% \item Locate the \TeX\ Live binaries as shown above for \brand{Unix}. % \item In the binaries directory, make a \emph{copy} of |runscript.exe| % and call it |lwarpmk.exe| % This will call the copy of \filenm{lwarpmk.lua} @@ -4743,7 +4915,7 @@ This boolean may be tested by the user for later use. % \end{enumerate} % \item [\brand{Windows} MiK\TeX:] Create a new |lwarpmk.bat| file: % \begin{enumerate} -% \item Locate the binaries. These will be in a directory such as: +% \item Locate the MiK\TeX\ binaries. These will be in a directory such as: % \begin{sourcedisplay} % |C:\Program Files\MiKTeX 2.9\miktex\bin\x64| % \end{sourcedisplay} @@ -4830,7 +5002,7 @@ This boolean may be tested by the user for later use. % \end{sourcedisplay} % % -% \item [To install the \brand{Poppler} utilities to a Unix/Linux system:] \ +% \item [To install the \brand{Poppler} utilities to a \brand{Unix}/\brand{Linux} system:] \ % \DescribeProgram[requirement]{pdftotext}\gindex{Poppler=\brand{Poppler}} % \DescribeProgram[requirement]{pdfseparate} % \DescribeProgram[requirement]{pdftocairo} @@ -4850,39 +5022,42 @@ This boolean may be tested by the user for later use. % % \item [To install the \brand{Poppler} utilities to a \brand{Windows} machine:] \ % +% If using Mik\TeX, install a \pkg{miktex-poppler-bin-*} package. +% \changes{v0.62}{2018/11/03}{Docs: \pkg{miktex-poppler-bin-*}} +% Otherwise: % \begin{enumerate} % \item See \cref{tab:utility} on \cpageref{tab:utility}. % \item Download and extract the \brand{Poppler} utilities \prog{pdftotext}, \prog{pdfseparate}, % and \prog{pdfseparate} to a directory, such as |Poppler|. -% \item In the Start window, type "Path" to search for results +% \item In the \UI{Start} window, type "Path" to search for results % related to Path. Or, open the control panel and search for "Path". -% \item Choose "Edit the system environment variables" in the control panel. -% \item Choose the "Environment Variables" button. -% \item Choose the "Path" variable, then the "Edit" button. -% \item Choose the "New" button to make an additional entry. +% \item Choose \UI{Edit the system environment variables} in the control panel. +% \item Choose the \UI{Environment Variables} button. +% \item Choose the \UI{Path} variable, then the \UI{Edit} button. +% \item Choose the \UI{New} button to make an additional entry. % \item Enter the |bin| directory of the \brand{Poppler} utilities, such as: % \begin{sourcedisplay} % |C:\Users\\Desktop\Poppler\poppler-0.5_x86\poppler-0.5\bin| % \end{sourcedisplay} % % Be sure to include |\bin|. -% \item Click "Ok" when done. +% \item Click \UI{Ok} when done. % \end{enumerate} % % \needspace{2\baselineskip} -% \item [To install \prog{Perl} to a \brand{Windows} machine:] \ +% \item [To install \brand{Perl} to a \brand{Windows} machine:] \ % \DescribeProgram[requirement]{perl}\gindex{Perl=\brand{Perl}} % \begin{enumerate} -% \item Download and install a version of \prog{Perl}, such as \brand{Straweberry Perl}, +% \item Download and install a version of \brand{Perl}, such as \brand{Straweberry Perl}, % to a directory without a space in its name, such as |C:\Strawberry|. -% \item Edit the Path as seen above for the \brand{Poppler} utilities. -% \item Enter the |bin| directory of the \prog{Perl} utility, such as: +% \item Edit the \UI{Path} as seen above for the \brand{Poppler} utilities. +% \item Enter the |bin| directory of the \prog{perl} utility, such as: % \begin{sourcedisplay} % |C:\Strawberry\perl\bin| % \end{sourcedisplay} % % Be sure to include |\bin|. -% \item Click "Ok" when done. +% \item Click \UI{Ok} when done. % \end{enumerate} % % \end{description} @@ -4934,9 +5109,9 @@ This boolean may be tested by the user for later use. % renamed as |tutorial.tex|. % \end{description} % -% \emph{When using \brand{Windows}, use an editor other than Notepad, +% \emph{When using \brand{Windows}, use an editor other than \brand{Notepad}, % \watchout[Bad formatting!] -% since Notepad does not accept the end-of-line from a Unix text file.} +% since \brand{Notepad} does not accept the end-of-line from a \brand{Unix} text file.} % % \item Compile the project: \userentry{pdflatex tutorial.tex} % \quad (several times) @@ -5047,7 +5222,7 @@ This boolean may be tested by the user for later use. % \begin{description} % \item [\filenm{lwarpmk.lua}:] A local copy of the \prog{lwarpmk} utility. % -% On Unix-related operating systems this file must be made executable: +% On \brand{Unix}-related operating systems this file must be made executable: % \begin{sourcedisplay} % |chmod u+x lwarpmk.lua| % \end{sourcedisplay} @@ -5113,7 +5288,7 @@ This boolean may be tested by the user for later use. % % \clearpage % -% \subsection{Compiling the HTML version with \prog{lwarpmk}} +% \subsection{Compiling the \HTML\ version with \prog{lwarpmk}} % % |lwarpmk html| is used to recompile an \HTML\ version of the document. % @@ -5178,7 +5353,7 @@ This boolean may be tested by the user for later use. % % \clearpage % -% \subsection{Generating the SVG images} +% \subsection{Generating the \SVG\ images} % \label{sec:tutorialsvgmath} % % By default \pkg{lwarp} represents math as \SVG\ images with @@ -5236,7 +5411,7 @@ This boolean may be tested by the user for later use. % % % \clearpage -% \subsection{Changing the CSS style} +% \subsection{Changing the \CSS\ style} % % For a formal \CSS\ style, add to the preamble: % \begin{sourcedisplay} @@ -5252,12 +5427,12 @@ This boolean may be tested by the user for later use. % \cs{CSSFilename}\{lwarp\_sagebrush.css\} % \end{sourcedisplay} % -% See \cref{sec:csscustomization} for more information about modifying the CSS styling +% See \cref{sec:csscustomization} for more information about modifying the \CSS\ styling % of the document. % % % -% \subsection{Customizing the HTML output} +% \subsection{Customizing the \HTML\ output} % % A number of settings may be made to control the \HTML\ output, including % filename generation, automatic compilation, math output, document splitting, @@ -5308,7 +5483,7 @@ This boolean may be tested by the user for later use. % % \clearpage % -% \subsection{Using XeLaTeX or LuaLaTeX} +% \subsection{Using \XeLaTeX\ or \LuaLaTeX} % % \XeLaTeX\ or \LuaLaTeX\ may be used instead of \LaTeX. % @@ -5339,7 +5514,7 @@ This boolean may be tested by the user for later use. % \end{enumerate} % % -% \subsection{Using DVI LaTeX} +% \subsection{Using \DVI\ \LaTeX} % % \gindex{DVI \LaTeX} % @@ -5411,13 +5586,13 @@ This boolean may be tested by the user for later use. % \userentry{lwarpmk cleanlimages} % % -% \subsection{Converting PDF or EPS images to SVG} +% \subsection{Converting \PDF\ or \EPS\ images to \SVG} % \changes{v0.56}{2018/04/29}{Docs: \cmds{lwarpmk pdftosvg}.} % \changes{v0.59}{2018/09/05}{Docs: \cmds{lwarpmk epstopdf}.} % % \HTML\ cannot display \PDF\ or \EPS\ images, so any external \PDF\ graphics images must % be converted to \SVG\ format. -% \gindex{SVG>converting from PDF or EPS} +% \gindex{SVG>converting from \PDF\ or \EPS} % \gindex{PDF image>converting} % \gindex{EPS image>converting} % \gindex{image>PDF or EPS>converting} @@ -5428,7 +5603,7 @@ This boolean may be tested by the user for later use. % Be sure to always provide \SVG\ files for \HTML\ output. % % -% \subsection{Creating HTML from an incomplete compile} +% \subsection{Creating \HTML\ from an incomplete compile} % \changes{v0.53}{2018/04/01}{Docs: \cmds{lwarpmk pdftohtml}.} % % During testing it may be useful to finish the \HTML\ conversion even when @@ -5548,12 +5723,12 @@ This boolean may be tested by the user for later use. % the document is recompiled with \prog{lwarpmk}. % % -% \subsection{Font and UTF-8 support} +% \subsection{Font and \UTF-8 support} % \label{sec:fonts} % \trouble{font>UTF-8} % \trouble{text>corrupted} % \trouble{font>selection} -% \trouble{Unicode} +% \trouble{Unicode>fonts} % \gindex{font>selection} % \gindex{font>type 3 bitmapped} % \gindex{font>type 1 vector} @@ -5612,7 +5787,7 @@ This boolean may be tested by the user for later use. % % While using \DVI\ \prog{latex} or \PDF\ \prog{pdflatex}, % \margintag{\prog{latex}, \prog{pdflatex}, T1, UTF8} -% \pkg{fontenc} is automatically loaded with T1 encoding. +% \pkg{lwarp} automatically loads \pkg{fontenc} with T1 encoding. % \pkg{fontenc} may be loaded with an additional encoding after \pkg{lwarp}. % \pkg{inputenc} is automatically loaded with UTF8 encoding if if has not yet been loaded, % but may also be specified with another encoding such as |latin1|. @@ -5706,6 +5881,10 @@ This boolean may be tested by the user for later use. % \item \ldots{} the rest of the preamble and the main document. % \end{enumerate} % +% In some cases, an external program may require a \UTF-8 ``locale''. +% \watchout[UTF-8 locale] +% See \cref{sec:utf8locale}. +% % % \subsubsection{Indexes, glossaries, and encoding} % \gindex{UTF-8>index} @@ -5798,7 +5977,10 @@ This boolean may be tested by the user for later use. % \item[\optn{mathsvg}, \optn{mathjax}:] % \DescribeOption{mathsvg} % \DescribeOption{mathjax} -% For math display, select \optn{mathsvg} (default), or \optn{mathjax}. +% ^^A \DescribeOption{mathKaTeX} +% ^^A For math display, select \optn{mathsvg} (default), \optn{mathjax}, +% ^^A or \optn{mathKaTeX}. +% For math display, select \optn{mathsvg} (default) or \optn{mathjax}. % For more information about the math options, see \cref{sec:limitsmath}. % % @@ -6062,16 +6244,16 @@ This boolean may be tested by the user for later use. % % \clearpage % -% \subsection{Customizing the HTML output} +% \subsection{Customizing the \HTML\ output} % \label{sec:htmlsettings} % \gindex{settings>HTML conversion} % \gindex{HTML>conversion settings} % -% \changes{v0.43}{2017/11/04}{Docs: HTML settings table.} -% \changes{v0.43}{2017/11/06}{Docs: Reorganized HTML customization.} +% \changes{v0.43}{2017/11/04}{Docs: \HTML\ settings table.} +% \changes{v0.43}{2017/11/06}{Docs: Reorganized \HTML\ customization.} % \changes{v0.61}{2018/09/25}{Docs: HTMLDebugComments} % \begin{table}[p] -% \caption{HTML settings} +% \caption{\HTML\ settings} % \label{tab:htmlsettings} % \begin{tabular}{>{\ttfamily}lp{3in}} % \toprule @@ -6081,17 +6263,26 @@ This boolean may be tested by the user for later use. % CombineHigherDepths & Combine higher section levels. \\ % FileSectionNames & Use section names for file names, else use numbers. \\ % FootnoteDepth & Sectioning depth of footnotes. \\ +% \midrule % \cs{abstractname} & The name of the abstract. \\ % \cs{mathimagename} & The \SVG\ math image \env{lateximage} \attribute{alt} tag. \\ % \cs{packagediagramname} & The suffix for a package's \env{lateximage} \attribute{alt} tags. \\ +% \midrule % \cs{CSSFilename} & The \CSS\ for the following files. \\ -% \cs{HTMLLanguage} & The |html lang| tag. \\ -% \cs{HTMLTitle} & The \HTML\ |title| meta tag, overriding \cs{title}. \\ -% \cs{HTMLAuthor} & The \HTML\ |author| meta tag, overriding \cs{author}. \\ -% \cs{HTMLDescription} & The \HTML\ |description| meta tag. \\ +% \midrule +% \cs{HTMLLanguage} & The \HTML\ \attribute{lang} tag. \\ +% \cs{HTMLTitle} & The homepage's \element{title}, overriding \cs{title}. \\ +% \cs{HTMLTitleBeforeSection} & Set subpage \element{title}s to \newline +% \fqquad \attribute{\cs{HTMLTitle} - sectionname} \\ +% \cs{HTMLTitleAfterSection} & Set subpage \element{title}s to \newline +% \fqquad \attribute{sectioname - \cs{HTMLTitle}}\\ +% \cs{HTMLAuthor} & The \HTML\ \attribute{author} meta tag, overriding \cs{author}. \\ +% \cs{HTMLDescription} & The \HTML\ \attribute{description} meta tag. \\ +% \midrule % \cs{HTMLFirstPageTop} & Heading for the home page. \\ % \cs{HTMLPageTop} & Heading for the other pages. \\ % \cs{HTMLPageBottom} & Footing for all pages. \\ +% \midrule % HTMLDebugComments & Boolean to generate \HTML\ comments. \\ % \bottomrule % \end{tabular} @@ -6121,7 +6312,7 @@ This boolean may be tested by the user for later use. % % \ItemDescribeOption{HomeHTMLFilename} \DescribeDefault{\cs{BaseJobname}} % Filename of the homepage, without -% the ``|.html|'' suffix. +% the ``\filenm{.html}'' suffix. % Defaults to the \cs{BaseJobname}. A common setting is: % \begin{sourcedisplay} % |HomeHTMLFilename=index| @@ -6154,6 +6345,9 @@ This boolean may be tested by the user for later use. % \ItemDescribeOption{mathjax} \DescribeDefault{false} % Selects \brand{MathJax} for math output. % +% ^^A \ItemDescribeOption{mathKaTeX} \DescribeDefault{false} +% ^^A Selects Ka\TeX\ for math output. +% % \ItemDescribeOption{makeindex} \DescribeDefault{makeindex} % Selects \prog{makeindex} for index generation by \prog{lwarpmk}. % @@ -6179,7 +6373,7 @@ This boolean may be tested by the user for later use. % This side\TOC\ is only shown if the web page is wide enough. % When using a narrow web browser window, % ``responsive web design'' is used to show the side\TOC\ at the top of the -% page and a link back to ``Home'' at the bottom. +% page and a link back to \UI{Home} at the bottom. % % \label{sec:filedepth} % It is recommended to set: @@ -6265,6 +6459,12 @@ This boolean may be tested by the user for later use. % so the rest of the filename must be sufficiently unique to avoid name collisions. % \gindex{file>unique names} % +% If \pkg{ctex} or its related classes are used, +% \trouble[\pkg{ctex}]{ctex=\pkg{ctex}>FileSectionNames=\bool{FileSectionNames}} +% \trouble{HTML>FileSectionNames=\bool{FileSectionNames}} +% \trouble{filename>ctex=\pkg{ctex}} +% \bool{FileSectionNames} is forced |false| to avoid spaces in the section names. +% % \ItemDescribeCounter{FootnoteDepth} \DescribeDefault{3} % Determines where to place pending footnotes. % |3| places footnotes before each break down to the \cs{subsubsection} level. @@ -6302,14 +6502,34 @@ This boolean may be tested by the user for later use. % individual pagess of the website. % % \ItemDescribeMacro{\HTMLLanguage} \marg{langauge} \DescribeDefault{en-US} \quad -% The \HTML\ file's |html lang| meta tag. -% Defaults to |en-US|. +% The \HTML\ file's \HTML\ \attribute{lang} meta tag. +% Defaults to \attribute{en-US}. % % \ItemDescribeMacro{\HTMLTitle} \marg{title} \DescribeDefault{\cs{thetitle}} \quad +% \gindex{HTML>meta tag>title} % Overrides \cs{title} for the \HTML\ header's meta title. % Defaults to \cs{thetitle}, which is set by \cs{title}, or empty otherwise. % Unlike the author, \cs{thetitle} is set by \cs{title} even if not using the \pkg{titling} package. % +% \ItemDescribeMacro{\HTMLTitleBeforeSection} \DescribeDefault{\cs{HTMLTitleBeforeSection}} +% Sets subpage \element{title} tags to show the website title followed +% by the section name. +% +% \ItemDescribeMacro{\HTMLTitleAfterSection} +% Sets subpage \element{title} tags to show the section name +% followed by the website title. +% +% To customize subpage \element{title}s, redefine \cs{theHTMLTitleSection}, +% \margintag{custom \element{title}} +% which defaults to: +% \gindex{HTML>meta tag>title} +% \begin{sourcedisplay} +% \cs{def}\cs{theHTMLTitleSection}\{\% \\ +% \fquad\cs{theHTMLTitle}\cs{theHTMLTitleSeparator}\cs{theHTMLSection}\% \\ +% \} +% \end{sourcedisplay} +% +% % \ItemDescribeMacro{\HTMLAuthor} \marg{author} \DescribeDefault{\cs{theauthor}} \quad % The \HTML\ header's meta author. % Defaults to \cs{theauthor}, @@ -6405,7 +6625,7 @@ This boolean may be tested by the user for later use. % \end{description} % % -% \subsubsection{Example HTML file naming} +% \subsubsection{Example \HTML\ file naming} % \label{sec:filenameexamples} % \gindex{HTML>filename generation} % \changes{v0.20}{2016/09/11}{Docs: Examples for generating \HTML\ file names.} @@ -6450,7 +6670,7 @@ This boolean may be tested by the user for later use. % \end{description} % % -% \subsection{Customizing the CSS} +% \subsection{Customizing the \CSS} % \label{sec:csscustomization} % % \DescribeMacro{\CSSFilename} \DescribeDefault{lwarp.css} @@ -6468,7 +6688,7 @@ This boolean may be tested by the user for later use. % ... % \end{Verbatim} % \gindex{CSS>file selection} -% \gindex{CSS>per HTML page} +% \gindex{CSS>per \HTML\ page} % \gindex{settings>CSS selection} % % The styles provided by \pkg{lwarp} include: @@ -6523,13 +6743,13 @@ This boolean may be tested by the user for later use. % \osportabilityusage % % -% \subsection{Selecting actions for print or HTML output} +% \subsection{Selecting actions for print or \HTML\ output} % \label{sec:selectingoutput} % \gindex{settings>selecting output} % \changes{v0.15}{2016/04/05}{Docs: Clarify print/\HTML\ output.} % % The following environments and macros are used to select actions which only apply -% to either traditional \LaTeX{} print-formatted PDF generation, +% to either traditional \LaTeX{} print-formatted \PDF\ generation, % or to \HTML\ generation. % % For most of built-in \LaTeX\ and many additional packages @@ -6547,7 +6767,7 @@ This boolean may be tested by the user for later use. % is surrounded by a |warpHTML| environment: % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] % \begin{warpHTML} -% ... something to be done only during HTML generation +% ... 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}|. @@ -6559,7 +6779,7 @@ This boolean may be tested by the user for later use. % is surrounded by a |warpprint| environment: % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] % \begin{warpprint} -% ... something to be done only during traditional PDF generation +% ... 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}|. @@ -6570,7 +6790,7 @@ This boolean may be tested by the user for later use. % may be surrounded by a |warpall| environment. Doing so is optional. % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] % \begin{warpall} -% ... something to be done during print PDF or HTML output +% ... 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}|. @@ -6682,7 +6902,7 @@ This boolean may be tested by the user for later use. % as \HTML\ notes at the bottom of the title page. % % -% \subsection{HTML page meta descriptions} +% \subsection{\HTML\ page meta descriptions} % % \label{sec:htmldescription} % \gindex{HTML>meta tag>description} @@ -6715,7 +6935,7 @@ This boolean may be tested by the user for later use. % \end{sourcedisplay} % % -% \subsection{HTML page meta title} +% \subsection{\HTML\ homepage meta title} % % \gindex{HTML>meta tag>title} % \gindex{title>HTML meta tag} @@ -6725,8 +6945,11 @@ This boolean may be tested by the user for later use. % Defaults to |\HTMLtitle{\thetitle}|. % May be set empty to cancel the meta title tag. % +% See \cref{sec:htmlsettings} for \cs{HTMLTitleBeforeSection} and +% \cs{HTMLTitleAfterSection}, used to set the title for \HTML\ subpages. % -% \subsection{HTML page meta author} +% +% \subsection{\HTML\ page meta author} % % \gindex{HTML>meta tag>author} % \gindex{author>HTML meta tag} @@ -6798,7 +7021,7 @@ This boolean may be tested by the user for later use. % \gindex{HTML>verbatim, in} % \gindex{verbatim>code and \HTML\ tags} % -% \changes{v0.61}{2018/09/25}{Docs: HTML entities.} +% \changes{v0.61}{2018/09/25}{Docs: \HTML\ entities.} % % \limitstext % @@ -6836,7 +7059,7 @@ This boolean may be tested by the user for later use. % \trouble{list>empty item} % % -% \subsubsection{Filenames and URLs in lists or footnotes} +% \subsubsection{Filenames and \acro{URL}s in lists or footnotes} % % \gindex{underscore>filename}\gindex{file>underscore in name} % \gindex{list>filename} @@ -6897,7 +7120,7 @@ This boolean may be tested by the user for later use. % \gindex{framed objects} % \trouble{frames} % \begin{description}[style=unboxed] -% \item [To remove the frame in HTML output:] Place the \cs{fbox} command and +% \item [To remove the frame in \HTML\ output:] Place the \cs{fbox} command and % its closing brace inside \env{warpprint} environments. % This will nullify the frame for \HTML\ output. % \item [To frame the contents inline with some formatting losses in HTML:] @@ -6932,6 +7155,7 @@ This boolean may be tested by the user for later use. % it is also framed. % For \HTML\ output, this forms a \element{div} of class |framed|, the contents % preserve their \HTML\ formatting, and valid \HTML\ is created for a \env{tabular}. +% Also see \cref{sec:xcolorpatches} for a new environment \env{fcolorminipage}. % Also see below regarding the ``Misplaced alignment tab character \&.'' error. % \item [To create colored frames and boxes:] See \cref{sec:xcolor} for \pkg{xcolor}'s % \margintag{colored boxes and frames:} @@ -6955,7 +7179,7 @@ This boolean may be tested by the user for later use. % and |\warpprintonly{\hrule}| command: % \begin{Verbatim}[gobble=2,frame=lines] % \begin{BlockClass}{frameminipage}% ignored in print output -% % use CSS to format div class ``framedminipage'' +% % use \CSS\ to format div class ``framedminipage'' % \warpprintonly{\hrule} % only appears in print output % Contents % \warpprintonly{\hrule} % only appears in print output @@ -7049,7 +7273,7 @@ This boolean may be tested by the user for later use. % along with \pkg{authblk}: % \begin{sourcedisplay} % \%\cs{documentclass}\{customclass\}~\% for print document \\ -% \cs{documentclass}\{article\}~\% for HTML document \\ +% \cs{documentclass}\{article\}~\% for \HTML\ document \\ % \\ % \cs{usepackage}\{lwarp\} \\ % \cs{begin}\{warpHTML\} \\ @@ -7141,7 +7365,7 @@ This boolean may be tested by the user for later use. % \limitsendnotes % % -% \subsubsection{BibTeX} +% \subsubsection{\brand{BibTeX}} % \label{sec:limitsbibtex} % \DescribeMacro{\etalchar} Displays a superscript ``+'' to indicate ``and others''. % \changes{v0.54}{2018/03/09}{Docs: BibTeX.} @@ -7227,7 +7451,7 @@ This boolean may be tested by the user for later use. % \end{sourcedisplay} % The usual \filenm{.idx} and \filenm{.ind} files will be used, % along with the new \filenm{lwarp.ist} style file. -% When creating the \HTML\ index, ``\texttt{\_html}'' is automatically appended +% When creating the \HTML\ index, ``\filenm{\_html}'' is automatically appended % to each of the names. % % \prog{lwarpmk} will use \prog{latexmk} if specified, in which case @@ -7291,7 +7515,7 @@ This boolean may be tested by the user for later use. % \end{sourcedisplay} % \emph{For \brand{Windows}, replace the two ``;'' characters with ``\&''.}\watchout[\brand{Windows}] % -% When creating the \HTML\ index, ``\texttt{\_html}'' is automatically appended +% When creating the \HTML\ index, ``\filenm{\_html}'' is automatically appended % to the index filenames. % % Use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} @@ -7332,7 +7556,7 @@ This boolean may be tested by the user for later use. % \cs{makeindex} \\ % \cs{newindex}[Second Index]\{secondname\} \\ % \end{sourcedisplay} -% When creating the \HTML\ index, ``\texttt{\_html}'' is automatically appended +% When creating the \HTML\ index, ``\filenm{\_html}'' is automatically appended % to each of the names. % % Use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} @@ -7357,7 +7581,7 @@ This boolean may be tested by the user for later use. % \cs{makeindex} \\ % \cs{newindex}[Second Index]\{secondname\} \\ % \end{sourcedisplay} -% When creating the \HTML\ index, ``\texttt{\_html}'' is automatically appended +% When creating the \HTML\ index, ``\filenm{\_html}'' is automatically appended % to each of the names. % % Use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} @@ -7851,15 +8075,6 @@ This boolean may be tested by the user for later use. % % \limitsmathdisplay % -% \subsubsection{\pkg{chemformula} package} -% \limitschemformula -% \trouble{array>chemformula=\pkg{chemformula}} -% \trouble{math>chemformula=\pkg{chemformula}} -% -% \subsubsection{\pkg{mhchem} package} -% -% See \cref{sec:mhchem}. -% % \subsubsection{\pkg{ntheorem} package} % % \DescribePackage{ntheorem} @@ -7952,6 +8167,14 @@ This boolean may be tested by the user for later use. % \limitspstool % % +% \needspace{15\baselineskip} +% \subsubsection{\pkg{asymptote} package} +% \changes{v0.62}{2018/10/16}{Docs: \pkg{asymptote}.} +% +% \DescribePackage{asymptote} +% \limitsasymptote +% +% % \subsubsection{\pkg{overpic} package} % % \DescribePackage{overpic} @@ -8028,13 +8251,13 @@ This boolean may be tested by the user for later use. % \limitskeyfloat % % -% \subsection{Koma-Script} +% \subsection{\brand{Koma-Script} classes} % % \DescribeClass{komascript} % \limitskomascript % % -% \subsection{Memoir} +% \subsection{\brand{Memoir} class} % \label{sec:limitsmemoir} % % \DescribeClass{memoir} @@ -8087,6 +8310,23 @@ This boolean may be tested by the user for later use. % \limitsfixme % % +% \subsubsection{\pkg{chemfig} package} +% +% \limitschemfig +% \trouble{chemfig=\pkg{chemfig}} +% +% +% \subsubsection{\pkg{chemformula} package} +% \limitschemformula +% \trouble{array>chemformula=\pkg{chemformula}} +% \trouble{math>chemformula=\pkg{chemformula}} +% +% +% \subsubsection{\pkg{mhchem} package} +% +% See \cref{sec:mhchem}. +% +% % \subsubsection{xparse} % % \changes{v0.45}{2017/12/09}{Docs: \pkg{xparse} warnings.} @@ -8296,6 +8536,43 @@ This boolean may be tested by the user for later use. % and convert \SVG\ math with \cmds{lwarpmk limages}. % % +% \subsection{\acro{UTF}-8 locale} +% \label{sec:utf8locale} +% \gindex{locale} +% \gindex{UTF-8>locale} +% +% \changes{v0.62}{2018/10/20}{Docs: UTF-8 locale.} +% +% \prog{lwarpmk} uses the \prog{texlua} program, which sets the ``locale'' to ``|C|'', +% \trouble[UTF-8 locale]{UTF-8>locale} +% \trouble{Unicode>UTF-8 locale} +% \trouble{locale} +% including for external operating-system calls such as when executing \cmds{lwarpmk html}. +% In some cases, an external program called from the user's document +% may require the use of a \UTF-8 ``locale''. +% For \brand{Unix}-related operating systems, it may be required to use \pkg{lwarp}'s +% custom compilation options to add a locale change: +% \begin{sourcedisplay} +% \cs{usepackage}\{lwarp\}[\\ +% \fquad PrintLatexCmd=\{\\ +% \fqquad \textred{env LC\_CTYPE=en\_US.UTF-8} \\ +% \fqqquad xelatex --shell-escape project.tex \\ +% \fquad \} \\ +% \fquad HTMLLatexCmd=\{\\ +% \fqquad \textred{env LC\_CTYPE=en\_US.UTF-8} \\ +% \fqqquad xelatex --shell-escape project\textgreen{\_html}.tex \\ +% \fquad \} \\ +% ] \\ +% \end{sourcedisplay} +% +% \DescribePackage{ditaa} +% The only example seen so far where this is required is the \pkg{ditaa} package, +% \trouble{ditaa=\pkg{ditaa}} +% where the locale change allows the use of UTF-8 with Xe\LaTeX\ and \pkg{ditaa}. +% To use Lua\LaTeX\ instead, the locale change would have to be made inside the +% \pkg{ditaa} package where its calls the \prog{ditaa} program. +% +% % \clearpage % % \section{EPUB conversion} @@ -8357,7 +8634,7 @@ This boolean may be tested by the user for later use. % do a breadth-first search of the files. % For \prog{Calibre}, this option is found in % \begin{UIdisplay} -% \textsf{Preferences $\to$ Plugins $\to$ File type plugins $\to$ HTML to Zip} +% \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|\trouble[encoding]{EPUB>encoding}, @@ -8380,7 +8657,7 @@ This boolean may be tested by the user for later use. % Select the ``magic wand'' to the right of this entry box, and set % the first entry % \begin{UIdisplay} -% Match HTML tags with tag name: +% Match \HTML\ tags with tag name: % \end{UIdisplay} % to ``h4''. (Or ``h3'' for document classes with \cs{chapter}s.) % The \textsf{Detect chapters at} field should then show @@ -8507,7 +8784,7 @@ This boolean may be tested by the user for later use. % \item[\texttt{WPMarkMath}:] Prints \LaTeX\ math instead of using images. % \item[\texttt{WPTitleHeading}:] Adjusts title and section headings. % \end{description} -% Several of these may be used to add markers to the HTML text +% Several of these may be used to add markers to the \HTML\ text % which help determine where to adjust the word processor document after % import. @@ -8650,11 +8927,11 @@ This boolean may be tested by the user for later use. % \begin{table} % \centering % \begin{threeparttable} -% \caption{Section HTML headings for word-processor conversion} +% \caption{Section \HTML\ headings for word-processor conversion} % \label{tab:WPsectionheadings} % \begin{tabular}{lcccc} % \toprule -% ~ & \multicolumn{4}{c}{HTML headings\tnote{\textasteriskcentered}} \\ +% ~ & \multicolumn{4}{c}{\HTML\ headings\tnote{\textasteriskcentered}} \\ % \cmidrule{2-5} % ~ & \multicolumn{2}{c}{With \cs{chapter}} & \multicolumn{2}{c}{Without \cs{chapter}} \\ % \cmidrule(r){2-3} \cmidrule(l){4-5} @@ -8741,7 +9018,7 @@ This boolean may be tested by the user for later use. % \item Overline text decoration, used by \pkg{romanbar}. % \end{itemize} % -% Libreoffice also has limitations with frames and backgrounds: +% \brand{LibreOffice} also has limitations with frames and backgrounds: % \begin{itemize} % \item Multiple lines in an object are framed individually instead of as a whole. % \item Nested frames are not handled correctly. @@ -8778,7 +9055,7 @@ This boolean may be tested by the user for later use. % See \cref{sec:picture} for an example of the |picture| environment. % % To create a custom \HTML\ block or inline \CSS\ class, -% \margintag{CSS classes} +% \margintag{\CSS\ classes} % see \cref{sec:highlevelclasses}. % % To create print and \HTML\ versions of the same macro or environment, @@ -8801,7 +9078,7 @@ This boolean may be tested by the user for later use. % \subsection{Creating a development system} % % The following creates a local development system for \pkg{lwarp} on a TeXLive system -% in a Unix-like environment. +% in a \brand{Unix}-like environment. % Doing so allows anything requesting \pkg{lwarp} to use the development version % instead of whichever version is installed in TeXLive. % @@ -8910,14 +9187,11 @@ This boolean may be tested by the user for later use. % will not need to be emulated for \HTML\ output. Only the ``user-facing'' % macros need to be nullified or emulated. % -% \needspace{5\baselineskip} -% Each |lwarp-| package should first call either -% \begin{sourcedisplay} -% \cs{LWR@ProvidesPackageDrop} -% \end{sourcedisplay} -% or +% Each |lwarp-*| package should first call either of: % \begin{sourcedisplay} -% \cs{LWR@ProvidesPackagePass} +% \cs{LWR@ProvidesPackage\textblue{Drop}} \\ +% \fquad \textrm{-or-} \\ +% \cs{LWR@ProvidesPackage\textblue{Pass}} % \end{sourcedisplay} % If ``|Drop|''ped, the original print-version % package is ignored, and only the |lwarp-| version is used. @@ -9005,7 +9279,7 @@ This boolean may be tested by the user for later use. % \DescribeFile{lwarpmk.lua} % In most installations, \filenm{lwarpmk.lua} is an executable file located somewhere % \gindex{lwarpmk=\prog{lwarpmk}>customizing} -% the operating system knows about, and it is called by typing ``|lwarpmk|'' into +% the operating system knows about, and it is called by typing \cmds{lwarpmk} into % a terminal. % % A project-local copy of \filenm{lwarpmk.lua} may be generated, modified, and then used to @@ -9055,7 +9329,7 @@ This boolean may be tested by the user for later use. % the characters |&|, |<|, and |>|. % \end{itemize} % -% \item [Undefined HTML settings:] \ +% \item [Undefined \HTML\ settings:] \ % \trouble{HTML>settings>undefined} % \begin{itemize} % \item See the warning regarding the placement of the \HTML\ settings @@ -9189,7 +9463,7 @@ This boolean may be tested by the user for later use. % % \item [Misnumbered footnotes from section headings:] See \cref{sec:limitsfootnotes}. % -% \item [Missing HTML files:] \ +% \item [Missing \HTML\ files:] \ % \begin{itemize} % \item See the warning regarding changes to the \HTML\ settings % at \cref{sec:htmlsettings}. @@ -9321,6 +9595,29 @@ This boolean may be tested by the user for later use. % \end{itemize} % \end{description} % +% +% +% \clearpage +% \section{Trademarks} +% +% \changes{v0.14}{2016/03/29}{Docs: Trademarks section.} +% +% \begin{itemize} +% \item \TeX\ is a trademark of American Mathematical Society. +% \item \brand{Adobe}® and \brand{Adobe} \prog{Framemaker}® are either registered trademarks or +% trademarks of \brand{Adobe Systems Incorporated} in the United States and/or other countries. +% \item \brand{Linux}® is the registered trademark of Linus Torvalds in the U.S.\ and other countries. +% \item \brand{Mac\,OS}® is a trademark of \brand{Apple Inc.} +% \item \brand{MadCap Flare}™ is the property of \brand{MadCap Software, Inc.} +% \item \brand{MathJax} is copyright 2009 and later. +% The \brand{MathJax Consortium} is a joint venture of the \brand{American Mathematical Society} (AMS) +% and the \brand{Society for Industrial and Applied Mathematics} (SIAM) +% to advance mathematical and scientific content on the web. +% \item \brand{Microsoft}®, \brand{Encarta}, \brand{MSN}, and \brand{Windows}® are either registered trademarks or +% trademarks of \brand{Microsoft Corporation} in the United States and/or other countries. +% \item \brand{UNIX}® is a registered trademark of \brand{The Open Group}. +% \end{itemize} +% % % % \changes{v0.61}{2018/09/27}{Docs: Multiple indexes.} @@ -9338,6 +9635,7 @@ This boolean may be tested by the user for later use. % ^^A and meta index entry. % \GlossaryPrologue{ % \part{Change History} +% \section{Chg Hist} % \label{sec:changehistory} % \sindex[meta]{Change History} % \markboth{{Change History}}{{Change History}} @@ -9353,7 +9651,7 @@ This boolean may be tested by the user for later use. % ^^A The instructions for the Index of Objects: % \IndexPrologue{ % \clearpage -% \part{\indexname} +% \expandafter\part\expandafter{\indexname} % \label{sec:index\indexshortcut} % \sindex[meta]{\indexname} % \markboth{Index of Objects}{Index of Objects}% @@ -9385,15 +9683,13 @@ This boolean may be tested by the user for later use. % ^^A The instructions for the General Index: % \IndexPrologue{ % \clearpage -% \part{\indexname} +% \expandafter\part\expandafter{\indexname} % \label{sec:index\indexshortcut} % \sindex[meta]{\indexname} % % This is an index of instructions and concepts. % Look here when wondering how to do something, and % check the Troubleshooting Index when something goes wrong. -% -% Entries in \textbf{bold} are package, class, or program names. % } % % \printindex[gen][General Index] @@ -9402,7 +9698,7 @@ This boolean may be tested by the user for later use. % ^^A The instructions for the Troubleshooting Index: % \IndexPrologue{ % \clearpage -% \part{\indexname} +% \expandafter\part\expandafter{\indexname} % \label{sec:index\indexshortcut} % \sindex[meta]{\indexname} % @@ -9413,8 +9709,6 @@ This boolean may be tested by the user for later use. % Entries with higher page numbers are often duplicates of entries with % lower page numbers, as the same warning may occur within the user manual % and again within the source code for a given package. -% -% Entries in \textbf{bold} are package, class, or program names. % } % % \printindex[trb][Troubleshooting Index] @@ -9424,7 +9718,7 @@ This boolean may be tested by the user for later use. % \IndexPrologue{ % \clearpage -% \part{\indexname} +% \expandafter\part\expandafter{\indexname} % \label{sec:index\indexshortcut} % } % @@ -9474,7 +9768,7 @@ This boolean may be tested by the user for later use. % % \clearpage % -% \section{Section depths and HTML headings} +% \section{Section depths and \HTML\ headings} % \label{sec:stackdepths} % \gindex{HTML>headings} % \gindex{section>depths}\gindex{stack depths} @@ -9492,11 +9786,11 @@ This boolean may be tested by the user for later use. % \begin{table} % \centering % \begin{threeparttable} -% \caption{Section depths and HTML headings\label{tab:depthsheadings}} +% \caption{Section depths and \HTML\ headings\label{tab:depthsheadings}} % \begin{tabular}{lcl} % \toprule % Section & \parbox[b]{.35in}{\centering\LaTeX\ depth} & -% HTML headings \tnote{\textasteriskcentered} \\ +% \HTML\ headings \tnote{\textasteriskcentered} \\ % \midrule % title of the entire website & & \element{h1} \\ % none & -5 & new for this package \\ @@ -9536,7 +9830,7 @@ This boolean may be tested by the user for later use. % % % -% \section{Source Code} +% \section{Source code} % % ^^A *source % @@ -9561,7 +9855,7 @@ This boolean may be tested by the user for later use. % % \clearpage % -% \section{Detecting the \TeX\ Engine — pdflatex, lualatex, xelatex} +% \section{Detecting the \TeX\ Engine — \prog{pdflatex}, \prog{lualatex}, \prog{xelatex}} % % \changes{v0.16}{2016/04/07}{Added XeLaTeX, LuaLaTeX support.} % See: \url{http://tex.stackexchange.com/a/47579}. @@ -9618,16 +9912,16 @@ This boolean may be tested by the user for later use. % \end{macrocode} % % -% \section{pdfLaTeX T1 and UTF8 encoding} +% \section{pdf\LaTeX\ T1 and \acro{UTF}-8 encoding} % -% When using pdf\LaTeX, \pkg{lwarp} requires T1 encoding, and recommends UTF8 encoding. +% When using pdf\LaTeX, \pkg{lwarp} requires T1 encoding, and recommends \acro{UTF}-8 encoding. % % If some other input encoding is already defined, \pkg{lwarp} will % try to use it instead, and hope for the best. % -% \XeLaTeX\ and Lua\LaTeX\ are both UTF8 by nature. +% \XeLaTeX\ and Lua\LaTeX\ are both \acro{UTF}-8 by nature. % -% \changes{v0.44}{2017/11/16}{If pdfLaTeX, require T1 and UTF8 encoding.} +% \changes{v0.44}{2017/11/16}{If pdfLaTeX, require T1 and \acro{UTF}-8 encoding.} % \changes{v0.52}{2018/03/26}{If pdfLaTeX, allow other input encoding.} % % \begin{macrocode} @@ -9672,7 +9966,8 @@ This boolean may be tested by the user for later use. \newunicodechar{—}{---} \newunicodechar{–}{--} % \end{macrocode} -% In PDF\TeX, preserve upright quotes in verbatim text: +% In PDF\TeX, preserve upright quotes in verbatim text. +% \pkg{upquote} also loads \pkg{textcomp}. % \begin{macrocode} \RequirePackage{upquote} \else @@ -9718,7 +10013,25 @@ This boolean may be tested by the user for later use. } % \end{macrocode} % \end{macro} - +% +% +% +% \begin{macro}{\LWR@isolate} \marg{text} +% Isolates Chinese characters from the surrounding text. +% This is required to avoid extra spaces on either side of the Chinese +% characters, especially when written to a file. +% +% \changes{v0.62}{2018/11/17}{Added.} +% +% \begin{macrocode} +\@ifpackageloaded{ctexpatch}{ + \newcommand{\LWR@isolate}[1]{\null#1\null}% +}{ + \newcommand{\LWR@isolate}[1]{#1}% +} +% \end{macrocode} +% \end{macro} +% % % % \section{Early package requirements} @@ -9839,7 +10152,7 @@ This boolean may be tested by the user for later use. % \end{macrocode} -% \subsection{Unix, Linux, and Mac\,OS} +% \subsection{\brand{Unix}, \brand{Linux}, and \brand{Mac\,OS}} % \begin{macro}{\OSPathSymbol} % Symbol used to separate directories in a path. @@ -9912,6 +10225,7 @@ This boolean may be tested by the user for later use. % \DescribeBoolean{warpingHTML} % \DescribeBoolean{mathjax} % \DescribeBoolean{LWR@origmathjax} +% ^^A \DescribeBoolean{mathKaTeX} % % Set to true/false depending on the package option selections for % print/\HTML/\EPUB\ output and mathsvg/mathjax. @@ -9924,6 +10238,9 @@ This boolean may be tested by the user for later use. \newbool{mathjax} \newbool{LWR@origmathjax} % \end{macrocode} +% ^^A % \begin{macrocode} +% ^^A \newbool{mathKaTeX} +% ^^A % \end{macrocode} % % % The default is print output, @@ -9951,7 +10268,7 @@ This boolean may be tested by the user for later use. } % \end{macrocode} -% \begin{environment}{warpHTML} +% \DescribeOption{warpHTML} % Anything in the |warpHTML| environment will be generated for \HTML\ output only. % % \DescribeOption{warpHTML} @@ -9966,7 +10283,6 @@ This boolean may be tested by the user for later use. \boolfalse{warpingprint}% } % \end{macrocode} -% \end{environment} % % % @@ -9985,6 +10301,11 @@ This boolean may be tested by the user for later use. \PackageInfo{lwarp}{Using option 'mathsvg'} \boolfalse{mathjax}% \boolfalse{LWR@origmathjax}% +% \end{macrocode} +% ^^A % \begin{macrocode} +% ^^A \boolfalse{mathKaTeX}% +% ^^A % \end{macrocode} +% \begin{macrocode} } % \end{macrocode} % @@ -9998,9 +10319,31 @@ This boolean may be tested by the user for later use. \PackageInfo{lwarp}{Using option 'mathjax'} \booltrue{mathjax}% \booltrue{LWR@origmathjax}% +% \end{macrocode} +% ^^A % \begin{macrocode} +% ^^A \boolfalse{mathKaTeX}% +% ^^A % \end{macrocode} +% \begin{macrocode} } % \end{macrocode} +% ^^A \DescribeOption{mathKaTeX} +% ^^A Option \optn{mathKaTeX} selects Ka\TeX\ math display: +% ^^A \gindex{math>\optn{mathKaTeX} option} +% ^^A \gindex{KaTeX=Ka\TeX>mathKaTeX=\optn{mathKaTeX} option} +% ^^A If the \optn{mathKaTeX} option is given, boolean |mathKaTeX| is true, +% ^^A may be used for \cs{ifbool} tests. +% ^^A Boolean |mathjax| is also set true, as most code is shared with +% ^^A \brand{MathJax} functions. +% ^^A \begin{macrocode} +% ^^A \DeclareVoidOption{mathKaTeX}{% +% ^^A \PackageInfo{lwarp}{Using option 'mathKaTeX'} +% ^^A \booltrue{mathjax}% +% ^^A \booltrue{LWR@origmathjax}% +% ^^A \booltrue{mathKaTeX}% +% ^^A } +% ^^A \end{macrocode} + % \DescribeOption{BaseJobname} @@ -10371,7 +10714,7 @@ This boolean may be tested by the user for later use. % This helps \prog{latexmk} to more reliably know whether to recompile. % % \changes{v0.37}{2017/08/19}{\pkg{comment}: Maintains independent -% cutfiles for print, \protect\HTML.} +% cutfiles for print, \HTML.} % % \begin{macrocode} \ifbool{warpingHTML}{ @@ -10384,11 +10727,6 @@ This boolean may be tested by the user for later use. % \end{macrocode} -% \begin{macrocode} -\excludecomment{testing} -% \end{macrocode} - - % \begin{environment}{warpall} % Anything in the |warpall| environment will be generated for print or \HTML\ outputs. % \begin{macrocode} @@ -10397,17 +10735,14 @@ This boolean may be tested by the user for later use. % \end{environment} - - % \begin{environment}{warpprint} % \begin{environment}{warpHTML} % Anything in the |warpprint| environment will be generated for print output only. % % For \HTML\ output: % \begin{macrocode} -\ifbool{warpingHTML}{% -\includecomment{warpHTML} -} +\ifbool{warpingHTML} +{\includecomment{warpHTML}} {\excludecomment{warpHTML}}% % \end{macrocode} @@ -10496,7 +10831,7 @@ after lwarp.} % \begin{macro}{\LWR@loadbefore} \marg{packagename} \quad -% Error if this package is after \pkg{lwarp}. +% Error if this package is loaded after \pkg{lwarp}. % % \changes{v0.33}{2017/07/06}{Fix: No \cs{PackageError} if already loaded.} % @@ -10558,6 +10893,7 @@ For a possible alternative, see package(s) #2.} % \subsection{Error for disallowed packages loaded before lwarp} % \changes{v0.54}{2018/04/06}{Added early check for disallowed packages.} % \changes{v0.54}{2018/09/26}{Never load \pkg{aecompl}.} +% \changes{v0.62}{2018/11/18}{Added early checks for \pkg{CJK}, \pkg{CJKutf8}.} % % \begin{macrocode} \LWR@earlyloadnever{ae}{cm-super, lmodern} @@ -10566,6 +10902,10 @@ For a possible alternative, see package(s) #2.} \LWR@earlyloadnever{boxedminipage}{boxedminipage2e} \LWR@earlyloadnever{caption2}{caption} % \LWR@earlyloadnever{ccaption}{caption}% might be preloaded by memoir +\@ifpackageloaded{xeCJK}{}{ + \LWR@earlyloadnever{CJK}{ctex, xeCJK} + \LWR@earlyloadnever{CJKutf8}{ctex, xeCJK} +} \LWR@earlyloadnever{fancyheadings}{fancyhdr} \LWR@earlyloadnever{glossary}{glossaries} \LWR@earlyloadnever{t1enc}{fontenc, inputenc, inputenx} @@ -10586,6 +10926,7 @@ For a possible alternative, see package(s) #2.} % The following packages must be loaded after \pkg{lwarp}: % ^^A *loadafter % \begin{macrocode} +\LWR@loadafter{2in1} \LWR@loadafter{2up} \LWR@loadafter{a4} \LWR@loadafter{a4wide} @@ -10621,6 +10962,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{balance} \LWR@loadafter{bigdelim} \LWR@loadafter{bigstrut} +\LWR@loadafter{bitpattern} \LWR@loadafter{blowup} \LWR@loadafter{booklet} \LWR@loadafter{bookmark} @@ -10656,6 +10998,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{continue} \LWR@loadafter{copyrightbox} \LWR@notmemoirloadafter{crop} +% ctex must be loaded before lwarp \LWR@loadafter{cuted} \LWR@loadafter{cutwin} \LWR@loadafter{dblfloatfix} @@ -10696,6 +11039,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{fixme} \LWR@loadafter{fixmetodonotes} \LWR@loadafter{flafter} +\LWR@loadafter{flippdf} \LWR@loadafter{float} \LWR@loadafter{floatflt} \LWR@loadafter{floatpag} @@ -10783,6 +11127,7 @@ For a possible alternative, see package(s) #2.} %\LWR@loadafter{multicol}% loaded by ltxdoc \LWR@loadafter{multirow} \LWR@loadafter{multitoc} +\LWR@loadafter{musicography} \LWR@loadafter{nameref} \LWR@loadafter{natbib} \LWR@notmemoirloadafter{nccfancyhdr} @@ -10795,8 +11140,10 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{nonfloat} \LWR@loadafter{nonumonpart} \LWR@loadafter{nopageno} +\LWR@loadafter{notespages} \LWR@loadafter{nowidow} \LWR@loadafter{ntheorem} +\LWR@loadafter{octave} \LWR@loadafter{overpic} \LWR@loadafter{pagegrid} \LWR@notmemoirloadafter{pagenote} @@ -10805,10 +11152,12 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{parnotes} \LWR@notmemoirloadafter{parskip} \LWR@loadafter{pbox} -\LWR@loadafter{pdfrender} +\LWR@loadafter{pdfcomment} \LWR@loadafter{pdflscape} +\LWR@loadafter{pdfmarginpar} \LWR@loadafter{pdfpages} \LWR@loadafter{pdfprivacy} +\LWR@loadafter{pdfrender} \LWR@loadafter{pdfsync} \LWR@loadafter{pdftricks} \LWR@loadafter{pdfx} @@ -10836,6 +11185,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{romanbarpagenumber} \LWR@loadafter{rotating} \LWR@loadafter{rotfloat} +\LWR@loadafter{rviewport} \LWR@loadafter{savetrees} % \LWR@loadafter{scalefnt}% loaded by babel-french \LWR@loadafter{schemata} @@ -10847,6 +11197,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{section} \LWR@loadafter{sectionbreak} \LWR@loadafter{sectsty} +\LWR@loadafter{semantic-markup} \LWR@notmemoirloadafter{setspace} \LWR@loadafter{shadow} \LWR@notmemoirloadafter{showidx} @@ -10892,17 +11243,20 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{tocstyle} \LWR@loadafter{todo} \LWR@loadafter{todonotes} +\LWR@loadafter{tram} \LWR@loadafter{transparent} \LWR@loadafter{trimclip} \LWR@loadafter{trivfloat} \LWR@loadafter{turnthepage} +\LWR@loadafter{twoup} % \end{macrocode} % \changes{v0.44}{2017/11/19}{Adjustment for \pkg{koma-script}.} % \begin{macrocode} % \LWR@loadafter{typearea}% preloaded by koma-script classes -\LWR@loadafter{ulem} +% \LWR@loadafter{ulem}% preloaded by ctexart and related classes \LWR@loadafter{underscore} \LWR@loadafter{units} +\LWR@loadafter{unitsdef} \LWR@loadafter{upref} \LWR@loadafter{url} \LWR@loadafter{uspace} @@ -10920,6 +11274,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{wrapfig} \LWR@loadafter{xbmks} \LWR@loadafter{xcolor} +\LWR@loadafter{xechangebar} \LWR@loadafter{xellipsis} \LWR@loadafter{xfrac} \LWR@loadafter{xltabular} @@ -10972,7 +11327,7 @@ For a possible alternative, see package(s) #2.} % \begin{macrocode} \ifxetexorluatex \@ifpackageloaded{fontspec}{}{ -\usepackage[no-math]{fontspec} + \usepackage[no-math]{fontspec} } % \end{macrocode} % ^^A \defaultfontfeatures{Ligatures=Common} @@ -11118,7 +11473,7 @@ For a possible alternative, see package(s) #2.} % \item Uses a very long and wide page to minimize page breaks and margin overflow. % \item Uses a scriptsize font. % \item Uses extra space at the margin to avoid \HTML\ tag overflow off the page. -% \item Forces a new PDF page before some environments. +% \item Forces a new \PDF\ page before some environments. % \item Forces line break between major pieces of long tags. % \end{itemize} % @@ -11155,6 +11510,12 @@ top=1in,bottom=1in,% % \changes{v0.51}{2018/03/06}{\pkg{afterpackage}: No longer required.} +% \DescribePackage{calc} +% \changes{v0.62}{2018/11/10}{\pkg{calc}: Fix: Required for print version.} +% \begin{macrocode} +\RequirePackage{calc} +% \end{macrocode} + % \begin{macrocode} \end{warpall} % \end{macrocode} @@ -11276,12 +11637,6 @@ top=1in,bottom=1in,% % \end{macrocode} -% \DescribePackage{calc} -% \begin{macrocode} -\RequirePackage{calc} -% \end{macrocode} - - % \DescribePackage{refcount} % % Provides \cs{setcounterref}, \cs{setcounterpageref}, etc. @@ -11569,6 +11924,14 @@ top=1in,bottom=1in,% \IfValueTF{#2} {\LWR@origRequirePackage{#1}[#2]} {\LWR@origRequirePackage{#1}} +% \end{macrocode} +% In some cases, the following seems to be required +% to avoid an ``unknown option'' error, such +% as when loading \pkg{xcolor} with options. +% \changes{v0.62}{2018/11/11}{Fix: Unknown option error.} +% \begin{macrocode} +\DeclareOption*{}% +\ProcessOptions\relax } % \end{macrocode} % \end{macro} @@ -11792,7 +12155,7 @@ top=1in,bottom=1in,% % \changes{v0.61}{2018/09/25}{Docs: HTMLDebugComments} % % To have the \HTML\ output include additional \HTML\ comments, such as -% \margintag{HTML comments} +% \margintag{\HTML\ comments} % which \element{div} is closing, use % \begin{sourcedisplay} % \cs{booltrue\{HTMLDebugComments\}} @@ -11868,7 +12231,7 @@ top=1in,bottom=1in,% -% \section{Defining print and HTML versions of macros and environments} +% \section{Defining print and \HTML\ versions of macros and environments} % \label{sec:definingprinthtml} % \gindex{print>selecting print/HTML definitions} % \gindex{HTML>selecting print/HTML definitions} @@ -12020,7 +12383,7 @@ top=1in,bottom=1in,% % This older system is still in use for many definitions.) % ^^A *8* Modify the above when all old \lets are removed. % -% \changes{v0.57}{2018/05/28}{New system for switching print and HTML outputs.} +% \changes{v0.57}{2018/05/28}{New system for switching print and \HTML\ outputs.} % % \codehtml % \begin{macrocode} @@ -12131,7 +12494,9 @@ top=1in,bottom=1in,% % \end{macrocode} -% \section{HTML-conversion output modifications} + + +% \section{\HTML-conversion output modifications} % % These booleans modify the \HTML\ output in various ways % to improve conversion to \EPUB\ or word processor imports. @@ -12361,18 +12726,6 @@ top=1in,bottom=1in,% \let\LWR@origtextellipsis\textellipsis -\LetLtxMacro\LWR@origtextrm\textrm -\LetLtxMacro\LWR@origtextsf\textsf -\LetLtxMacro\LWR@origtexttt\texttt -\LetLtxMacro\LWR@origtextnormal\textnormal -\LetLtxMacro\LWR@origtextbf\textbf -\LetLtxMacro\LWR@origtextmd\textmd -\LetLtxMacro\LWR@origtextit\textit -\LetLtxMacro\LWR@origtextsl\textsl -\LetLtxMacro\LWR@origtextsc\textsc -\LetLtxMacro\LWR@origtextup\textup -\LetLtxMacro\LWR@origemph\emph - \LetLtxMacro\LWR@origrmfamily\rmfamily \LetLtxMacro\LWR@origsffamily\sffamily \LetLtxMacro\LWR@origttfamily\ttfamily @@ -12573,7 +12926,7 @@ top=1in,bottom=1in,% % \end{macrocode} -% \subsection{project\_html.tex} +% \subsection{\filenm{project\_html.tex}} % % \DescribeFile{project_html.tex} Used to allow an \HTML\ version of the % document to exist alongside the print version. @@ -12941,7 +13294,7 @@ top=1in,bottom=1in,% -% \subsubsection{lwarpmk.conf} +% \subsubsection{\filenm{lwarpmk.conf}} % % \DescribeFile{lwarpmk.conf} % |lwarpmk.conf| is automatically (re-)created by the \pkg{lwarp} package when @@ -12973,7 +13326,7 @@ top=1in,bottom=1in,% -% \subsubsection{.lwarpmkconf} +% \subsubsection{\filenm{.lwarpmkconf}} % % \DescribeFile{project.lwarpmkconf} A project-specific configuration file for \prog{lwarpmk}. % @@ -13005,7 +13358,7 @@ top=1in,bottom=1in,% -% \subsection{lwarp.css} +% \subsection{\filenm{lwarp.css}} % \DescribeFile{lwarp.css} % This is the base \CSS\ layer used by \pkg{lwarp}. @@ -13024,6 +13377,9 @@ top=1in,bottom=1in,% % \changes{v0.57}{2018/05/21}{\filenm{lwarp.css}: Increased float vertical margins.} % \changes{v0.61}{2018/10/05}{\filenm{lwarp.css}: Footnotes text align left.} % \changes{v0.61}{2018/10/05}{\filenm{lwarp.css}: Minipage table and footnotes: tighter margin.} +% \changes{v0.62}{2018/11/02}{\filenm{lwarp.css}: Reduced margins in titlepage.} +% \changes{v0.62}{2018/11/02}{\filenm{lwarp.css}: Fixed \CSS\ for \cs{textup}.} +% \changes{v0.62}{2018/11/02}{\filenm{lwarp.css}: Added \CSS\ for \pkg{xfrac}, \pkg{nicefrac}.} % % ^^A *lwarp.css % @@ -13107,11 +13463,18 @@ span.textit, div.textit { font-style: italic; } span.textmd, div.textmd { font-weight: normal; } -span.textsc, div.textsc { font-variant: small-caps; } +span.textsc, div.textsc { + font-variant: small-caps; + font-variant-numeric: oldstyle-nums ; +} span.textsl, div.textsl { font-style: oblique; } -span.textup, div.textup { font-variant: normal; } +span.textup, div.textup { + font-style: normal; + font-variant: normal; + font-variant-numeric: normal ; +} span.textrm, div.textrm { font-family: "DejaVu Serif", "Bitstream Vera Serif", @@ -13880,6 +14243,8 @@ figure div.minipage, figure div.minipage div.minipage { } */ +figure figure { margin: 0pt } + figure div.minipage p { font-size: 85% ; } figure.subfigure, figure.subtable { @@ -14094,7 +14459,7 @@ div.published font-variant: normal ; font-style: italic ; font-size: 1em ; - margin: 3ex 0em 3ex 0em ; + margin: 1ex 0em 1ex 0em ; } div.subtitle @@ -14103,7 +14468,7 @@ div.subtitle font-variant: normal ; font-style: italic ; font-size: 1.25em ; - margin: 3ex 0em 3ex 0em ; + margin: 1ex 0em 1ex 0em ; } div.subtitle p { margin: 1ex ; } @@ -14113,17 +14478,17 @@ div.author font-variant: normal ; font-style: normal ; font-size: 1em ; - margin: 3ex 0em 3ex 0em ; + margin: 1ex 0em 1ex 0em ; } div.oneauthor { display: inline-block ; - margin: 3ex 1em 0ex 1em ; + margin: 0ex 1em 0ex 1em ; } /* div.author table { - margin: 3ex auto 0ex auto ; + margin: 1ex auto 0ex auto ; background: none ; } @@ -14136,7 +14501,7 @@ div.titledate { text-align: center ; font-size: .85em ; font-style: italic; - margin: 6ex 0em 6ex 0em ; + margin: 1ex 0em 1ex 0em ; } @@ -14248,6 +14613,17 @@ div.multicols { -webkit-columns: 3 380px ; div.multicols p {margin-top: 0ex} +/* Used for xfrac and nicefrac: */ +span.numerator { + font-size: 60% ; + vertical-align: .4em ; +} + +span.denominator { + font-size: 60% +} + + /* Used for algorithm2e: */ div.alg2evline{ margin-left: 1em ; @@ -14357,12 +14733,9 @@ div.amsthmproof span.amsthmnoteremark {} - /* For CSS LaTeX and related logos: -Based on: -http://edward.oconnor.cx/2007/08/tex-poshlet -http://nitens.org/taraborelli/texlogo +Based on spacing demonstrated by the metafont package. */ .latexlogofont { @@ -14374,48 +14747,48 @@ http://nitens.org/taraborelli/texlogo .latexlogo { font-family: "Linux Libertine O", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; - letter-spacing: .03em ; font-size: 1.1em; } -.latexlogo sup { +.latexlogosup { text-transform: uppercase; letter-spacing: .03em ; - font-size: 0.85em; - vertical-align: 0.15em; - margin-left: -0.36em; + font-size: 0.7em; + vertical-align: 0.25em; + margin-left: -0.4em; margin-right: -0.15em; } -.latexlogo sub { +.latexlogosub { text-transform: uppercase; - vertical-align: -0.5ex; - margin-left: -0.1667em; - margin-right: -0.125em; + vertical-align: -0.27ex; + margin-left: -0.08em; + margin-right: -0.07em; + font-size: 1em; +} + +.latexlogotwoe { + text-transform: none ; + font-variant-numeric: oldstyle-nums ; +} + +.latexlogotwoesub { + font-style:italic ; + vertical-align: -0.27ex; + margin-left: -0.11em; + margin-right: -0.1em; font-size: 1em; } -.xetexlogo { +.xelatexlogo { font-family: "Linux Libertine O", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; letter-spacing: .03em ; font-size: 1.1em; } -/* A smaller gap between Xe and Tex v.s. LaTeX: */ -.xetexlogo sub { - text-transform: uppercase; - vertical-align: -0.5ex; - margin-left: -0.0667em; - margin-right: -0.2em; - font-size: 1em; - letter-spacing: .03em ; -} - -/* A large gap between Xe and LaTeX v.s. TeX: */ -.xelatexlogo sub { - text-transform: uppercase; - vertical-align: -0.5ex; +.xelatexlogosub { + vertical-align: -0.27ex; margin-left: -0.0667em; margin-right: -.05em; font-size: 1em; @@ -14426,8 +14799,8 @@ http://nitens.org/taraborelli/texlogo font-family: "TeXGyreChorus","URW Chancery L", "Apple Chancery","ITC Zapf Chancery","Monotype Corsiva", "Linux Libertine O", "Nimbus Roman No 9 L", "FreeSerif", - "Hoefler Text", Times, "Times New Roman", serif; - font-style: italic; + "Hoefler Text", Times, "Times New Roman", serif ; + font-style: italic ; } .lyxlogo { @@ -14495,7 +14868,7 @@ nav.botnavigation { display:none; } -% \subsection{lwarp\_sagebrush.css} +% \subsection{\filenm{lwarp\_sagebrush.css}} % \DescribeFile{lwarp_sagebrush.css} % An optional \CSS\ which may be used for @@ -14762,7 +15135,7 @@ nav.sidetoc a:hover { -% \subsection{lwarp\_formal.css} +% \subsection{\filenm{lwarp\_formal.css}} % \DescribeFile{lwarp_formal.css} % An optional \CSS\ which may be used for @@ -14771,6 +15144,8 @@ nav.sidetoc a:hover { % If used, this must be present both when compiling the project % and also when distributing the \HTML\ files. % +% \changes{v0.62}{2018/11/10}{\filenm{lwarp\_formal.css}: Fix: Font for verse.} +% % ^^A *lwarp_formal.css % % \codeconfig @@ -14899,14 +15274,6 @@ div.fancyvrblabel{ -.verse { - font-family: "Linux Libertine O", "Hoefler Text", "Garamond", - "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", - "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, - "Times New Roman", serif; -} - - figure { margin: 5ex 5% 5ex 5% ; padding: 1ex 1em 1ex 1em ; @@ -14988,7 +15355,7 @@ nav.botnavigation { -% \subsection{sample\_project.css} +% \subsection{\filenm{sample\_project.css}} % \DescribeFile{sample_project.css} % The project-specific \CSS\ file. Use with \cs{CSSFilename}. @@ -15020,7 +15387,7 @@ nav.botnavigation { % \end{macrocode} -% \subsection{lwarp.ist} +% \subsection{\filenm{lwarp.ist}} % \DescribeFile{lwarp.ist} % Used to modify the index for \pkg{lwarp}. @@ -15065,7 +15432,7 @@ page_compositor "." -% \subsection{lwarp.xdy} +% \subsection{\filenm{lwarp.xdy}} % \DescribeFile{lwarp.xdy} % Used to modify the index for \pkg{lwarp}. @@ -15115,7 +15482,7 @@ page_compositor "." % \end{macrocode} -% \subsection{lwarp\_one\_limage.cmd} +% \subsection{\filenm{lwarp\_one\_limage.cmd}} % % \DescribeFile{lwarp_one_limage.cmd} % Used by \pkg{lwarp} to help make \env{lateximage}s when using \brand{Windows}. @@ -15154,7 +15521,7 @@ exit -% \subsection{lwarp\_mathjax.txt} +% \subsection{\filenm{lwarp\_mathjax.txt}} % \DescribeFile{lwarp_mathjax.txt} % Used by \pkg{lwarp} when using \brand{MathJax}. @@ -15171,6 +15538,7 @@ exit % \changes{v0.45}{2018/01/23}{File: \filenm{lwarp\_mathjax.txt}: Allow \brand{MathJax} inside \env{verse}.} % \changes{v0.59}{2018/07/13}{File: \filenm{lwarp\_mathjax.txt}: Updated to MathJax v2.7.4.} % \changes{v0.59}{2018/07/16}{File: \filenm{lwarp\_mathjax.txt}: Fix: Removed chapter number from tagged non-numeric MathJax equations.} +% \changes{v0.62}{2018/11/05}{File: \filenm{lwarp\_mathjax.txt}: Removed inoperable \pkg{siunitx} extension.} % % % ^^A *lwarp_mathjax.txt @@ -15248,21 +15616,6 @@ MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function () { "https://cdn.mathjax.org/mathjax/contrib"; - - - - + + + +% ^^A \subsection{\filenm{lwarp\_KaTeX.txt}} + +% ^^A \DescribeFile{lwarp_KaTeX.txt} +% ^^A Used by \pkg{lwarp} when using Ka\TeX. +% +% ^^A This must be present when compiling the project, +% ^^A but does not need to be present when distributing +% ^^A the resulting \HTML\ files. +% +% ^^A \changes{v0.59}{2018/11/03}{File: \filenm{lwarp\_KaTeX.txt}: Added.} +% +% +% ^^A ^^A *lwarp_KaTeX.txt +% +% ^^A \codeconfig +% ^^A \begin{macrocode} +% ^^A \begin{LWRwriteconf} +% ^^A \begin{filecontents*}{lwarp_KaTeX.txt} +% ^^A +% ^^A +% ^^A +% ^^A \end{filecontents*} +% ^^A % \end{Verbatim}% for syntax highlighting +% ^^A \end{LWRwriteconf} +% ^^A \end{macrocode} + -% \subsection{lwarpmk.lua — lwarpmk option} +% \subsection{\filenm{lwarpmk.lua} — \optn{lwarpmk} option} % \DescribeOption{lwarpmk} Creates a local copy of \prog{lwarpmk}. % @@ -15378,7 +15776,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX- -- Copyright 2016-2018 Brian Dunn -printversion = "v0.61" +printversion = "v0.62" requiredconfversion = "1" -- also at *lwarpmk.conf function printhelp () @@ -15408,8 +15806,9 @@ lwarpmk pdftohtml [-p project]: Finishes the HTML conversion even if there was a compile error. lwarpmk pdftosvg : Converts each PDF file to SVG. lwarpmk epstopdf : Converts each EPS file to PDF. -lwarpmk clean [-p project]: Remove .aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl* -lwarpmk cleanall [-p project]: Remove auxiliary files and also project.pdf, *.html +lwarpmk clean [-p project]: Remove *.aux, *.toc, *.lof/t, + *.idx, *.ind, *.log, *_html_inc.*, .gl* +lwarpmk cleanall [-p project]: Remove auxiliary files, project.pdf, *.html lwarpmk cleanlimages: Removes all images from the "lateximages" directory. lwarpmk -h: Print this help message. lwarpmk --help: Print this help message. @@ -16684,14 +17083,14 @@ end -- not --version -% \section{HTML entities} +% \section{\HTML\ entities} % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} -% HTML entites and \HTML\ Unicode entities: +% \HTML\ Unicode entities: % \begin{macrocode} \let\LWR@origampersand\& % \end{macrocode} @@ -16702,7 +17101,7 @@ end -- not --version \begingroup% \LWR@FBcancel% \LWR@origampersand#1;% -\endgroup +\endgroup% % \LWR@traceinfo{HTMLentity done}% } % \end{macrocode} @@ -16736,7 +17135,7 @@ end -- not --version -% \section{HTML filename generation} +% \section{\HTML\ filename generation} % % The filename of the homepage is set to |\HomeHTMLFilename.html|. @@ -16879,7 +17278,7 @@ end -- not --version % \end{macrocode} % Otherwise, create a filename with the chosen prefix: % \begin{macrocode} - {\HTMLFilename#1.html}% + {\HTMLFilename\LWR@isolate{#1}.html}% }% \LWR@traceinfo{LWR@htmlsectionfilename Z}% } @@ -17062,7 +17461,7 @@ end -- not --version -% \section{PDF pages and styles} +% \section{\PDF\ pages and styles} % \changes{v0.38}{2017/08/21}{Added \cs{markboth}, \cs{sloppy}, etc.} @@ -17077,7 +17476,7 @@ end -- not --version % This is used just before major environments, such as \env{verse}. % Reduces the chance of an environment overflowing the \HTML\ \PDF\ output page. % -% \changes{v0.28}{2017/04/13}{Forces new PDF page before major environments.} +% \changes{v0.28}{2017/04/13}{Forces new \PDF\ page before major environments.} % \changes{v0.46}{2018/01/20}{Fix: Improper \cs{prevdepth}.} % \begin{macrocode} \newcommand{\LWR@forcenewpage}{% @@ -17163,7 +17562,7 @@ end -- not --version -% \section{HTML tags, spans, divs, elements} +% \section{\HTML\ tags, spans, divs, elements} % \codehtml % \begin{macrocode} @@ -17171,7 +17570,7 @@ end -- not --version % \end{macrocode} -% \subsection{Mapping \LaTeX{} Sections to HTML Sections} +% \subsection{Mapping \LaTeX\ sections to \HTML\ sections} % \begin{macrocode} \newcommand*{\LWR@tagtitle}{h1} @@ -17198,7 +17597,7 @@ end -- not --version % \subsection{Babel-French tag modifications} -% \changes{v0.34}{2017/08/03}{\pkg{babel-french}: Adds fixed-width HTML spaces to punctuation.} +% \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, % load order, footnotes, ellipses.} % \changes{v0.37}{2017/08/19}{\pkg{babel-french}: Adjustment for load order.} @@ -17263,12 +17662,12 @@ end -- not --version % \end{macrocode} -% \subsection{HTML tags} +% \subsection{\HTML\ tags} % \begin{macro}{\LWR@htmltagc} \marg{tag} % Break ligatures and use upright apostrophes in \HTML\ tags. % -% \cs{protect} is in case the tag appears in TOC, LOF, LOT. +% \cs{protect} is in case the tag appears in \TOC, \LOF, \LOT. % \begin{macrocode} \newcommand*{\LWR@htmltagc}[1]{% \LWR@traceinfo{LWR@htmltagc !\detokenize{#1}!}% @@ -17276,7 +17675,7 @@ end -- not --version \LWR@FBcancel% \ifmmode\else\protect\LWR@origttfamily\fi% \protect\LWR@origtextless% -#1% +\LWR@isolate{#1}% \protect\LWR@origtextgreater% \endgroup% % \LWR@traceinfo{LWR@htmltagc: done}% @@ -17555,7 +17954,7 @@ end -- not --version % -% \subsection{HTML5 semantic elements} +% \subsection{\HTML{}5 semantic elements} % \begin{macro}{\LWR@htmlelement} \marg{element} @@ -17657,17 +18056,23 @@ end -- not --version % \end{macro} -% \begin{macro}{\InlineClass} \oarg{style} \marg{class} \marg{text} \quad +% \begin{macro}{\InlineClass} \parg{WP style} \oarg{style} \marg{class} \marg{text} +% % High-level interface for inline span classes. % +% \parg{WP style} is \CSS\ styling to add when formatting for a word processor import. +% +% \oarg{style} is the \CSS\ styling to add when not formatting for a word processor. +% % \changes{v0.20}{2017/01/03}{Renamed from "inlineclass".} % \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.} % \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.} +% \changes{v0.62}{2018/10/24}{Added optional word-processing style. Replaces \cs{LWR@HTMLtextstyle}.} % % \codeprint % \begin{macrocode} \begin{warpprint} -\NewDocumentCommand{\InlineClass}{o m +m}{#3}% +\NewDocumentCommand{\InlineClass}{D{(}{)}{} o m +m}{#4}% \end{warpprint} % \end{macrocode} % \end{macro} @@ -17675,10 +18080,14 @@ end -- not --version % \codehtml % \begin{macrocode} \begin{warpHTML} -\NewDocumentCommand{\LWR@print@InlineClass}{o m +m}{#3}% +\NewDocumentCommand{\LWR@print@InlineClass}{D{(}{)}{} o m +m}{#4}% -\NewDocumentCommand{\LWR@HTML@InlineClass}{o m +m}{% - \LWR@htmlspanclass[#1]{#2}{#3}% +\NewDocumentCommand{\LWR@HTML@InlineClass}{D{(}{)}{} o m +m}{% +\ifbool{FormatWP}{% + \LWR@htmlspanclass[#1]{#3}{#4}% +}{% + \LWR@htmlspanclass[#2]{#3}{#4}% +}% } \LWR@formatted{InlineClass} @@ -17733,7 +18142,7 @@ end -- not --version % \end{macrocode} -% \subsection{Closing HTML tags} +% \subsection{Closing \HTML\ tags} % \codehtml % \begin{macrocode} @@ -18126,11 +18535,11 @@ end -- not --version % \end{macrocode} % If so: clear the |par| hook to no longer catch paragraphs: % \begin{macrocode} - {\ClearPreHook{par}}% + {\ClearPreHook{par}}% % \end{macrocode} % Else: Do nothing: % \begin{macrocode} - {}% + {}% % \end{macrocode} % No longer in paragraph mode: % \begin{macrocode} @@ -18210,7 +18619,7 @@ end -- not --version -% \section{CSS} +% \section{\CSS} % \codehtml % \begin{macrocode} @@ -18252,7 +18661,7 @@ end -- not --version -% \section{Title, HTML meta author, HTML meta description} +% \section{Title, \HTML\ meta author, \HTML\ meta description} % % % \codehtml @@ -18710,7 +19119,7 @@ end -- not --version % For use when the marginpar will be more than one paragraph, % and/or contains more than simple text. % -% HTML version. +% \HTML\ version. % % \changes{v0.21}{2017/02/11}{Fixed source listing.} % \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} emulate a wrapfig.} @@ -18778,7 +19187,7 @@ end -- not --version -% \section{Splitting HTML files} +% \section{Splitting \HTML\ files} % % \begin{itemize} % \item Files are split according to |FileDepth| and |CombineHigherDepths|. @@ -18843,10 +19252,10 @@ end -- not --version % % Be sure that this does not result in filename collisions! % \trouble[filename collision]{filename>collision} -% Use the optional TOC caption entry parameter for formatting. +% Use the optional \TOC\ caption entry parameter for formatting. % \trouble[section names]{sectioning>names} % Remember to \cs{protect} \LaTeX\ commands which appear in -% section names and TOC captions. +% section names and \TOC\ captions. % \begin{macrocode} \newcommand*{\LWR@filenamenoblanks}[1]{% \begingroup @@ -18865,8 +19274,12 @@ end -- not --version \LWR@traceinfo{LWR@filenamenoblanks edef: !\LWR@thisnewfilename!}% \fullexpandarg% % \end{macrocode} +% % Convert spaces into hyphens: +% +% \changes{v0.45}{2017/12/29}{Fix: Section names with \cs{\ }.} % \begin{macrocode} +\StrSubstitute{\LWR@thisnewfilename}{\ }{-}[\LWR@thisnewfilename] \StrSubstitute{\LWR@thisnewfilename}{ }{-}[\LWR@thisnewfilename] % \end{macrocode} % Convert punctutation into hyphens: @@ -18894,10 +19307,6 @@ end -- not --version % \changes{v0.45}{2017/12/29}{Fix: Section names with underscores.} % \begin{macrocode} \StrSubstitute{\LWR@thisnewfilename}{\_}{-}[\LWR@thisnewfilename] -% \end{macrocode} -% \changes{v0.45}{2017/12/29}{Fix: Section names with \cs{\ }.} -% \begin{macrocode} -\StrSubstitute{\LWR@thisnewfilename}{\ }{-}[\LWR@thisnewfilename] \StrSubstitute{\LWR@thisnewfilename}{\%}{-}[\LWR@thisnewfilename] \StrSubstitute{\LWR@thisnewfilename}{\{}{-}[\LWR@thisnewfilename] \StrSubstitute{\LWR@thisnewfilename}{\}}{-}[\LWR@thisnewfilename] @@ -18974,7 +19383,7 @@ end -- not --version % \begin{macro}{\LWR@newautopagelabel} \marg{pagenumber counter} -% \changes{v0.48}{2018/02/11}{Fix: TOC, LOF, LOT links.} +% \changes{v0.48}{2018/02/11}{Fix: \TOC, \LOF, \LOT\ links.} % \begin{macrocode} \newcommand*{\LWR@newautopagelabel}[1]{% \ifnumequal{\value{LWR@previousautopagelabel}}{\value{page}}% @@ -18988,6 +19397,8 @@ end -- not --version % \end{macro} +% \subsection{Customizing \brand{MathJax}} + % \begin{macro}{\LWR@customizedMathJax} % Additional \brand{MathJax} definitions to be added to the start of each \HTML\ page. % \changes{v0.52}{2018/03/31}{Added.} @@ -19010,12 +19421,16 @@ end -- not --version % \end{macrocode} % \end{macro} + % \begin{macro}{\LWR@customizeMathJax} % \changes{v0.51}{2018/03/18}{MathJax: Nullifies \cs{ensuremath}.} % \changes{v0.57}{2018/05/24}{MathJax: Supports \cs{footnote}, \cs{footnotemark}.} % \begin{macrocode} \newcommand{\LWR@customizeMathJax}{% \ifbool{mathjax}{ +% \end{macrocode} +% ^^A \ifboolexpr{bool{mathjax} and not bool{mathKaTeX}}{ +% \begin{macrocode} \LWR@stoppars \LWR@htmlcomment{Nullify \textbackslash{}ensuremath, footnotes for MathJax:} @@ -19035,6 +19450,58 @@ end -- not --version % \end{macrocode} % \end{macro} + +% ^^A % \subsection{Customizing Ka\TeX} + +% ^^A % \begin{macro}{\LWR@customizedKaTeX} +% ^^A % Additional Ka\TeX\ definitions to be added to the start of each \HTML\ page. +% ^^A % \changes{v0.62}{2018/11/03}{Added.} +% ^^A % \begin{macrocode} +% ^^A \newcommand*{\LWR@customizedKaTeX}{} +% ^^A % \end{macrocode} +% ^^A % \end{macro} + + +% ^^A % \begin{macro}{\CustomizeKaTeX} +% ^^A % +% ^^A % \limitscustomizeKaTeX +% ^^A % +% ^^A % \changes{v0.62}{2018/11/03}{Added.} +% ^^A % \begin{macrocode} +% ^^A \newcommand*{\CustomizeKaTeX}[1]{% +% ^^A \appto{\LWR@customizedKaTeX}{% +% ^^A \(#1\)\par +% ^^A }% +% ^^A } +% ^^A % \end{macrocode} +% ^^A % \end{macro} + + +% ^^A % \begin{macro}{\LWR@customizeKaTeX} +% ^^A % \changes{v0.62}{2018/11/03}{Added.} +% ^^A % \begin{macrocode} +% ^^A \newcommand{\LWR@customizeKaTeX}{% +% ^^A \ifboolexpr{bool{mathjax} and bool{mathKaTeX}}{ +% ^^A \LWR@stoppars +% ^^A \LWR@htmlcomment{Nullify \textbackslash{}ensuremath, footnotes for KaTeX:} +% ^^A +% ^^A \(\gdef\ensuremath##1{##1}\) +% ^^A +% ^^A \(\gdef\footnote[##1]##2{\text{( Footnote ##1 )}}\) +% ^^A +% ^^A \(\gdef\footnotemark[##1]{\text{( Footnote ##1 )}}\) +% ^^A +% ^^A \LWR@htmlcomment{Additional customizations for KaTeX:} +% ^^A +% ^^A \LWR@customizedKaTeX +% ^^A +% ^^A \LWR@startpars +% ^^A }{} +% ^^A } +% ^^A % \end{macrocode} +% ^^A % \end{macro} + + % \begin{macrocode} \end{warpHTML} % \end{macrocode} @@ -19052,6 +19519,14 @@ end -- not --version % \end{macrocode} % \end{macro} +% ^^A % \begin{macro}{\CustomizeKaTeX} +% ^^A % The print-mode version: +% ^^A % \begin{macrocode} +% ^^A \newcommand*{\CustomizeKaTeX}[1]{} +% ^^A % \end{macrocode} +% ^^A % \end{macro} + + % \begin{macrocode} \end{warpprint} % \end{macrocode} @@ -19071,7 +19546,7 @@ end -- not --version % Finishes the current \HTML\ page with footnotes, footer, navigation, % then starts a new \HTML\ page with an \HTML\ comment telling where to % split the page and what the new filename and \CSS\ are, then adds -% navigation, side TOC, header, and starts the text body. +% navigation, side \TOC, header, and starts the text body. % \begin{macrocode} \newcommand*{\LWR@newhtmlfile}[1]{ \LWR@traceinfo{LWR@newhtmlfile} @@ -19122,7 +19597,7 @@ end -- not --version % If using a filename, create a version without blanks. % The filename without blanks will be placed into \cs{LWR@thisfilename}. % If not using a filename, the file number will be used instead. -% \changes{v0.12}{2016/03/13}{Bugfix: TOC with numbered files.} +% \changes{v0.12}{2016/03/13}{Bugfix: \TOC\ with numbered files.} % \begin{macrocode} \ifbool{FileSectionNames}% {\LWR@filenamenoblanks{#1}} @@ -19155,23 +19630,14 @@ end -- not --version % \end{macrocode} % -% If pdf\LaTeX\ and not \optn{utf8} encoding, use a hyphen instead of an emdash: -% \changes{v0.52}{2018/04/01}{Fix: \cs{FileDepth} with non-utf8 encoding.} +% Start a new file with the given section name: % \begin{macrocode} -\ifPDFTeX% pdflatex or dvi latex -\ifdefstring{\inputencodingname}{utf8}{% -\LWR@filestart{ — #1}% there is an EMdash in front of the #1 -}{ -\LWR@filestart{ - #1}% hyphen -} -\else% -\LWR@filestart{ — #1}% there is an EMdash in front of the #1 -\fi% +\LWR@filestart[#1] % \end{macrocode} % % Track the page numbers: -% \changes{v0.48}{2018/02/11}{Fix: TOC, LOF, LOT links.} +% \changes{v0.48}{2018/02/11}{Fix: \TOC, \LOF, \LOT\ links.} % \begin{macrocode} \setcounter{LWR@latestautopage}{\value{page}}% \LWR@newautopagelabel{LWR@latestautopage}% @@ -19228,13 +19694,20 @@ end -- not --version % \end{macrocode} % -% If using MathJax, disable \cs{ensuremath} by printing a nullified +% If using \brand{MathJax}, +% disable \cs{ensuremath} by printing a nullified % definition at the start of each file, and add further customizations: % \changes{v0.51}{2018/03/18}{MathJax: Nullifies \cs{ensuremath}.} % \begin{macrocode} \LWR@customizeMathJax % \end{macrocode} % +% ^^A % Likewise for Ka\TeX: +% ^^A % \changes{v0.62}{2018/11/03}{KaTeX: Nullifies \cs{ensuremath}.} +% ^^A % \begin{macrocode} +% ^^A \LWR@customizeKaTeX +% ^^A % \end{macrocode} +% % \begin{macrocode} \LWR@traceinfo{LWR@newhtmlfile: done} } @@ -19308,7 +19781,7 @@ end -- not --version % % % \begin{macro}{\ForceHTMLTOC} -% For \HTML\ output, forces the next section to have a TOC entry, even if starred. +% For \HTML\ output, forces the next section to have a \TOC\ entry, even if starred. % For use with \cs{printindex} and others which generate a starred section % which should be in the \acro{TOC} so that it may be accessed via \HTML. % Not necessary if used with \pkg{tocbibind}. Also see \cs{ForceHTMLPage}. @@ -19393,7 +19866,7 @@ end -- not --version % % \begin{macro}{\LWR@sectionumber} \marg{section type} % -% Typeset a section number and its trailing space with CSS formatting: +% Typeset a section number and its trailing space with \CSS\ formatting: % \begin{macrocode} \newcommand*{\LWR@sectionnumber}[1]{% \InlineClass{sectionnumber}{#1}% @@ -19402,7 +19875,7 @@ end -- not --version % \end{macro} -% \DescribeObject{autosec} A tag used by the TOC and index. +% \DescribeObject{autosec} A tag used by the \TOC\ and index. % % \begin{macro}{\LWR@createautosec} \marg{section type} % @@ -19499,6 +19972,32 @@ end -- not --version % \end{macro} % % +% \begin{macro}{\@partcntformat} \marg{sectiontype} +% +% \cs{let} to \cs{@seccntformat} by default, but may be redefined +% by \pkg{ctex}. +% +% \changes{v0.62}{2018/11/17}{Added for \pkg{ctex}.} +% +% \begin{macrocode} +\let\@partcntformat\@seccntformat +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\@partnameformat} +% Prints ``Part'' for part sections. +% +% Nullified by \pkg{ctex}. +% +% \changes{v0.62}{2018/11/17}{Added for \pkg{ctex}.} +% \begin{macrocode} +\newcommand*{\@partnameformat}{\LWR@isolate{\partname}~}% +% \end{macrocode} +% \end{macro} +% +% +% % \DescribeCounter{LWR@currentautosec} Records the page number when the section % was created. If a math expression is included in the section name, % and SVG math is used, the corresponding \env{lateximage} will cause the @@ -19520,8 +20019,7 @@ end -- not --version % The common actions for the high-level sectioning commands. % \begin{macrocode} \DeclareDocumentCommand{\LWR@section}{m m m m}{% -\LWR@traceinfo{LWR@section |#2| |#3|}% -\LWR@traceinfo{LWR@section: not an empty section}% +\LWR@traceinfo{LWR@section: starting}% \LWR@stoppars% % \end{macrocode} % Cancel special \env{minipage} horizontal space interaction: @@ -19567,7 +20065,7 @@ end -- not --version {% new file \LWR@traceinfo{LWR@section: new HTML file}% % \end{macrocode} -% See if there was an optional TOC name entry: +% See if there was an optional \TOC\ name entry: % \begin{macrocode} \IfNoValueTF{#2}% % \end{macrocode} @@ -19603,9 +20101,9 @@ end -- not --version % Footnotes may be used in section names, which would also appear in the % \HTML\ section opening comments, so the short \TOC\ entry is used if possible, % and a limited opening comment is made if the sectional unit is starred. -% \changes{v0.43}{2017/10/31}{Fix: Nullify fonts inside HTML comment.} +% \changes{v0.43}{2017/10/31}{Fix: Nullify fonts inside \HTML\ comment.} % \changes{v0.52}{2018/03/28}{Fix: Footnote numbering: Limited \HTML\ comment if starred.} -% \changes{v0.52}{2018/03/28}{Fix: Footnote numbering: Use short TOC entry +% \changes{v0.52}{2018/03/28}{Fix: Footnote numbering: Use short \TOC\ entry % for HTMLDebug comments.} % \begin{macrocode} @@ -19638,34 +20136,38 @@ end -- not --version % \end{macrocode} % \changes{v0.43}{2017/11/01}{Fix: Math in section name.} % \begin{macrocode} -\setcounter{LWR@currentautosec}{\value{page}} +\setcounter{LWR@currentautosec}{\value{page}}% % \end{macrocode} % Check if starred: % \begin{macrocode} \IfBooleanTF{#1}% {% -\LWR@traceinfo{LWR@section: starred}% + \LWR@traceinfo{LWR@section: starred}% % \end{macrocode} -% Starred, but also forcing a TOC entry, so -% add unnumbered TOC name or regular name: +% Starred, but also forcing a \TOC\ entry, so +% add unnumbered \TOC\ name or regular name: % \begin{macrocode} -\ifbool{LWR@forcinghtmltoc}% -{\addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}}% -{}% + \ifbool{LWR@forcinghtmltoc}% + {% + \addcontentsline{toc}{#4}{% + \IfValueTF{#2}{\LWR@isolate{#2}}{\LWR@isolate{#3}}% + }% + }% + {}% }% starred % \end{macrocode} -% Not starred, so step counter and add to TOC: +% Not starred, so step counter and add to \TOC: % \begin{macrocode} {% not starred % \end{macrocode} -% Only add a numbered TOC entry if section number is not too deep: +% Only add a numbered \TOC\ entry if section number is not too deep: % \begin{macrocode} \ifthenelse{% \cnttest{\@nameuse{LWR@depth#4}}{<=}{\value{secnumdepth}}% }% {% if secnumdepth % \end{macrocode} -% If in the main matter, step the counter and add the TOC entry. +% If in the main matter, step the counter and add the \TOC\ entry. % For |article| class, \pkg{lwarp} assumes that all is mainmatter. % \begin{macrocode} \LWR@traceinfo{LWR@section: about to test main matter}% @@ -19674,32 +20176,39 @@ end -- not --version \LWR@traceinfo{LWR@section: yes mainmatter}% \refstepcounter{#4}% % \end{macrocode} -% Add main matter numbered TOC entry with the TOC name or the regular name: +% Add main matter numbered \TOC\ entry with the \TOC\ name or the regular name: % \begin{macrocode} \LWR@traceinfo{LWR@section: about to addcontentsline}% \addcontentsline{toc}{#4}% {% \protect\numberline{\@nameuse{the#4}}% - {\ignorespaces\IfValueTF{#2}{#2}{#3}\protect\relax}% + {% + \ignorespaces% + \IfValueTF{#2}{\LWR@isolate{#2}}{\LWR@isolate{#3}}\protect\relax% + }% }% \LWR@traceinfo{LWR@section: finished addcontentsline}% }% end of if main matter % \end{macrocode} -% If not main matter, add unnumbered TOC name or regular name: +% If not main matter, add unnumbered \TOC\ name or regular name: % \begin{macrocode} {% not main matter \LWR@traceinfo{LWR@section: no main matter}% - \addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}% + \addcontentsline{toc}{#4}{% + \IfValueTF{#2}{\LWR@isolate{#2}}{\LWR@isolate{#3}}% + }% }% end of not main matter }% end of secnumdepth % \end{macrocode} -% Deeper than secnumdepth, so add an unnumbered TOC entry: +% Deeper than secnumdepth, so add an unnumbered \TOC\ entry: % \begin{macrocode} {% - \addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}% + \addcontentsline{toc}{#4}{% + \IfValueTF{#2}{\LWR@isolate{#2}}{\LWR@isolate{#3}}% + }% }% % \end{macrocode} -% For part, print the section type: +% For part, print ``Part'': % \begin{macrocode} \ifbool{LWR@mainmatter}% {% @@ -19708,7 +20217,7 @@ end -- not --version {\value{secnumdepth}}\) \AND% \(\cnttest{\@nameuse{LWR@depth#4}}{<=}{\LWR@depthpart}\)% }% - {\@nameuse{#4name}~{}}% + {\@partnameformat}% {}% % \end{macrocode} % Print the section number: @@ -19718,9 +20227,14 @@ end -- not --version \cnttest{\@nameuse{LWR@depth#4}}{<=}{\value{secnumdepth}}% }% {% - \ifstrequal{#4}{chapter}% - {\protect\LWR@sectionnumber{\@chapcntformat{#4}}}% - {\protect\LWR@sectionnumber{\@seccntformat{#4}}}% + \ifstrequal{#4}{part}% + {% + \protect\LWR@sectionnumber{\@partcntformat{#4}}% + }{% + \ifstrequal{#4}{chapter}% + {\protect\LWR@sectionnumber{\@chapcntformat{#4}}}% + {\protect\LWR@sectionnumber{\@seccntformat{#4}}}% + }% }% {}% \LWR@traceinfo{LWR@section: finished print section number}% @@ -19730,7 +20244,7 @@ end -- not --version % Print the section name: % \begin{macrocode} \LWR@traceinfo{LWR@section: about to print the section name}% -#3% +\LWR@isolate{#3}% % \end{macrocode} % Close the heading tag, such as /H2: % \begin{macrocode} @@ -19739,7 +20253,7 @@ end -- not --version % \end{macrocode} % Generate a \LaTeX{} label: % \changes{v0.43}{2017/11/01}{Fix: Math in section name.} -% \changes{v0.48}{2018/02/11}{Fix: TOC, LOF, LOT links.} +% \changes{v0.48}{2018/02/11}{Fix: \TOC, \LOF, \LOT\ links.} % \begin{macrocode} \LWR@traceinfo{LWR@section: about to create the LaTeX label}% \LWR@newautopagelabel{LWR@currentautosec}% @@ -19856,11 +20370,7 @@ end -- not --version % \changes{v0.45}{2017/12/04}{Add optional heading title for \pkg{memoir}.} % \begin{macrocode} \DeclareDocumentCommand{\section}{s o o m}{% -\IfValueTF{#2}{ -\LWR@traceinfo{section #2}% -}{ -\LWR@traceinfo{section #4}% -} +\LWR@traceinfo{section: starting}% \LWR@maybeprintpendingfootnotes{\LWR@depthsection}% \LWR@stoppars% @@ -19964,18 +20474,87 @@ end -- not --version % \end{macrocode} % \end{macro} + +% \begin{macro}{\theHTMLTitleSeparator} +% May be used inside \cs{theHTMLTitleSection} to separate the +% website's overall \HTML\ title and the particular page's +% section name. +% \changes{v0.52}{2018/04/01}{Fix: \cs{FileDepth} with non-utf8 encoding.} +% \changes{v0.62}{2018/11/02}{Refactored.} +% \begin{macrocode} +\ifPDFTeX% pdflatex or dvi latex +\ifdefstring{\inputencodingname}{utf8}{% + \newcommand*{\theHTMLTitleSeparator}{ — }% EMdash +}{% + \newcommand*{\theHTMLTitleSeparator}{ - }% hyphen +}% +\else% + \newcommand*{\theHTMLTitleSeparator}{ — }% EMdash +\fi% +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\HTMLTitleBeforeSection} +% Sets the \HTML\ page's meta \attribute{title} tag to +% show the website title before the section name. +% \begin{macrocode} +\newcommand*{\HTMLTitleBeforeSection}{% + \def\theHTMLTitleSection{% + \theHTMLTitle\theHTMLTitleSeparator\theHTMLSection% + } +} +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\HTMLTitleAfterSection} +% Sets the \HTML\ page's meta \attribute{title} tag to +% show the section name before the website title. +% \begin{macrocode} +\newcommand*{\HTMLTitleAfterSection}{% + \def\theHTMLTitleSection{% + \theHTMLSection\theHTMLTitleSeparator\theHTMLTitle% + } +} +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\theHTMLTitleSection} +% Forms the \HTML\ page's meta \attribute{title} tag. +% The default is to show the website title before the section name. +% \changes{v0.62}{2018/11/02}{Added.} +% \begin{macrocode} +\HTMLTitleBeforeSection +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\theHTMLSection} +% The section name is passed to \cs{LWR@filestart}, +% which then sets \cs{theHTMLSection} for use +% inside \cs{theHTMLTitleSection} to create an +% \HTML\ meta \attribute{title} tag. +% \changes{v0.62}{2018/11/02}{Added.} +% \begin{macrocode} +\newcommand*{\theHTMLSection}{} +% \end{macrocode} +% \end{macro} + % \begin{macrocode} \end{warpall} % \end{macrocode} + % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} -% \begin{macro}{\LWR@filestart} \marg{title\_suffix} +% \begin{macro}{\LWR@filestart} \oarg{sectionname} \qquad % Creates the opening \HTML\ tags. % \changes{v0.19}{2016/05/25}{lwarp\_mathjax.txt loaded.} % \changes{v0.20}{2016/06/27}{Adds meta description.} @@ -19983,13 +20562,18 @@ end -- not --version % \changes{v0.28}{2017/04/06}{Adds \HTML\ meta author.} % % \begin{macrocode} -\newcommand*{\LWR@filestart}[1]{ -\LWR@traceinfo{LWR@filestart !#1!} +\newcommand*{\LWR@filestart}[1][]{% +\LWR@traceinfo{LWR@filestart !#1!}% % \end{macrocode} % Locally temporarily disable direct-formatting commands: % \begin{macrocode} -\begingroup -\LWR@nullfonts +\begingroup% +\LWR@nullfonts% +% \end{macrocode} +% Save the section name for use while creating the +% \HTML\ meta \attribute{title} tag: +% \begin{macrocode} +\edef\theHTMLSection{#1}% % \end{macrocode} % Create the page's \HTML\ header: % \begin{macrocode} @@ -20049,12 +20633,20 @@ script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"}% \LWR@htmltag{/script}\LWR@orignewline \LWR@htmltag{![endif]{-}{-}}\LWR@orignewline % \end{macrocode} -% The page's title: +% The page's title, if there is one. +% A section name is also added if given. % \changes{v0.44}{2017/11/18}{Add \cs{HTMLTitle}.} +% \changes{v0.62}{2018/11/02}{Refactored.} % \begin{macrocode} \ifthenelse{\equal{\theHTMLTitle}{}}% {}% -{\LWR@htmltag{title}\theHTMLTitle#1\LWR@htmltag{/title}\LWR@orignewline}% +{% + \LWR@htmltag{title}% + \ifdefempty{\theHTMLSection}% + {\theHTMLTitle}% + {\theHTMLTitleSection}% + \LWR@htmltag{/title}\LWR@orignewline% +}% % \end{macrocode} % The page's stylesheet: % \begin{macrocode} @@ -20071,11 +20663,19 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% {% \begingroup% \LWR@restoreoriglists% - \boolfalse{LWR@verbtags} - \verbatiminput{lwarp_mathjax.txt}% - \booltrue{LWR@verbtags} + \boolfalse{LWR@verbtags}% +% \end{macrocode} +% ^^A \ifbool{mathKaTeX}{% +% ^^A \verbatiminput{lwarp_KaTeX.txt}% +% ^^A }{% +% \begin{macrocode} + \verbatiminput{lwarp_mathjax.txt}% +% \end{macrocode} +% ^^A }% +% \begin{macrocode} + \booltrue{LWR@verbtags}% \endgroup% - \LWR@stoppars + \LWR@stoppars% }% end of mathjax {}% % \end{macrocode} @@ -20101,7 +20701,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% -% \section{Starting HTML output} +% \section{Starting \HTML\ output} % \codehtml % \begin{macrocode} @@ -20211,13 +20811,13 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{macrocode} % Logos: % \begin{macrocode} -\let\TeX\LWR@TeX -\let\LaTeX\LWR@LaTeX -\let\LuaTeX\LWR@LuaTeX -\let\LuaLaTeX\LWR@LuaLaTeX -\let\XeTeX\LWR@XeTeX -\let\XeLaTeX\LWR@XeLaTeX -\let\ConTeXt\LWR@ConTeXt +\LetLtxMacro\TeX\LWR@TeX +\LetLtxMacro\LaTeX\LWR@LaTeX +\LetLtxMacro\LuaTeX\LWR@LuaTeX +\LetLtxMacro\LuaLaTeX\LWR@LuaLaTeX +\LetLtxMacro\XeTeX\LWR@XeTeX +\LetLtxMacro\XeLaTeX\LWR@XeLaTeX +\LetLtxMacro\ConTeXt\LWR@ConTeXt % \end{macrocode} % Not yet started any paragraph handling: % \begin{macrocode} @@ -20233,7 +20833,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % Start a new \HTML\ file and a header: % \begin{macrocode} \LWR@traceinfo{LWR@lwarpStart: Starting new file.} -\LWR@filestart{} +\LWR@filestart \LWR@traceinfo{LWR@lwarpStart: Generating first header.} \LWR@htmltag{header}\LWR@orignewline \LWR@startpars @@ -20268,13 +20868,20 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@startpars % \end{macrocode} % -% If using MathJax, disable \cs{ensuremath} by printing a nullified +% If using \brand{MathJax}, +% disable \cs{ensuremath} by printing a nullified % definition at the start of each file, and add further customizations: % \changes{v0.51}{2018/03/18}{MathJax: Nullifies \cs{ensuremath}.} % \begin{macrocode} \LWR@customizeMathJax % \end{macrocode} % +% ^^A % Likewise for Ka\TeX: +% ^^A % \changes{v0.62}{2018/11/03}{KaTeX: Nullifies \cs{ensuremath}.} +% ^^A % \begin{macrocode} +% ^^A \LWR@customizeKaTeX +% ^^A % \end{macrocode} +% % \begin{macrocode} \LWR@traceinfo{LWR@lwarpStart: done} } @@ -20291,7 +20898,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% -% \section{Ending HTML output} +% \section{Ending \HTML\ output} % \codehtml % \begin{macrocode} @@ -20301,7 +20908,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macro}{\LWR@requesttoc} \marg{boolean} \marg{suffix} % \changes{v0.18}{2016/05/19}{Reorganize \cs{HomeHTMLFilename} logic.} -% Requests that a toc, lof, or lot be generated. +% Requests that a \TOC, \LOF, or \LOT be generated. % \begin{macrocode} \newcommand*{\LWR@requesttoc}[2]{% @@ -20630,7 +21237,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% -% \subsection{Printing the title, etc.\ in HTML} +% \subsection{Printing the title, etc.\ in \HTML} % % \changes{v0.20}{2017/01/21}{Enhanced \pkg{titling} support.} % @@ -20762,7 +21369,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % % % -% \subsection{\cs{maketitle} for HTML output} +% \subsection{\cs{maketitle} for \HTML\ output} % \label{sec:titlehtml} % % An \HTML\ \element{div} of class \attribute{titlepage} is used. @@ -21954,7 +22561,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \changes{v0.20}{2017/01/17}{Tabular: \cs{unskip} extra spaces.} % \changes{v0.33}{2017/06/20}{New handling of \progcode{\&} to localize catcode changes.} % \changes{v0.33}{2017/07/10}{Add: Tabular at and bang columns now have their -% own HTML columns.} +% own \HTML\ columns.} % % \codehtml % \begin{macrocode} @@ -22909,7 +23516,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \subsection{Parsing the column specifications} -% HTML \CSS\ cannot exactly match the \LaTeX{} concept of a baseline for +% \HTML\ \CSS\ cannot exactly match the \LaTeX{} concept of a baseline for % a table row. % \trouble[tabular baselines]{tabular>baselines} % \Cref{tab:baseline} shows the \LaTeX{} results for various @@ -22939,7 +23546,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % converted to \HTML. % % \begin{table} -% \caption{Tabular HTML column conversions\label{tab:columnconversions}} +% \caption{Tabular \HTML\ column conversions\label{tab:columnconversions}} % \gindex{tabular>HTML colummn conversion} % \gindex{HTML>tabular column conversion} % @@ -23183,7 +23790,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % If \pkg{colortbl} is loaded, these macros will be replaced with % functional versions. % -% For each of the HTML colors below, the text for the \HTML\ color is +% For each of the \HTML\ colors below, the text for the \HTML\ color is % set if requested, but the macro is empty if none has been set. % % \begin{macro}{\rownum} @@ -24118,7 +24725,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{macrocode} -% \begin{macro}{\LWR@subaddtabularcellcolor} \marg{HTML color} +% \begin{macro}{\LWR@subaddtabularcellcolor} \marg{\HTML\ color} % \begin{macrocode} \newcommand*{\LWR@subaddtabularcellcolor}[1]{% \LWR@htmltag{div class="cellcolor" style="% @@ -24664,7 +25271,7 @@ rowspan="#2" % % \begin{macrocode} {% yes star \LWR@figcaption% - #3% + \LWR@isolate{#3}% \endLWR@figcaption% }% {% No star: @@ -24688,14 +25295,16 @@ rowspan="#2" % % Create an \HTML\ caption. Afterwards, maybe make a LOT entry. % \begin{macrocode} \LWR@figcaption% - \@nameuse{fnum@\LTcaptype}\CaptionSeparator#3% + \LWR@isolate{\@nameuse{fnum@\LTcaptype}}% + \CaptionSeparator% + \LWR@isolate{#3}% \endLWR@figcaption% % \end{macrocode} % See if an optional caption was given: % \begin{macrocode} \ifblank{#2}% TOC entry empty % \end{macrocode} -% if the optional caption was given, but empty, do not form a TOC entry +% if the optional caption was given, but empty, do not form a \TOC\ entry % \begin{macrocode} {}% % \end{macrocode} @@ -24711,9 +25320,9 @@ rowspan="#2" % {\@nameuse{ext@\LTcaptype}}% {\LTcaptype}% {% - \protect\numberline% - {\@nameuse{p@\LTcaptype}\@nameuse{the\LTcaptype}}% - {\ignorespaces #3\protect\relax}% + \protect\numberline% + {\LWR@isolate{\@nameuse{p@\LTcaptype}}\@nameuse{the\LTcaptype}}% + {\ignorespaces \LWR@isolate{#3}\protect\relax}% }% }% end of No TOC entry % \end{macrocode} @@ -24724,9 +25333,9 @@ rowspan="#2" % {\@nameuse{ext@\LTcaptype}}% {\LTcaptype}% {% - \protect\numberline% - {\@nameuse{p@\LTcaptype}\@nameuse{the\LTcaptype}}% - {\ignorespaces #2\protect\relax}% + \protect\numberline% + {\LWR@isolate{\@nameuse{p@\LTcaptype}}\@nameuse{the\LTcaptype}}% + {\ignorespaces \LWR@isolate{#2}\protect\relax}% }% }% end of yes TOC entry }% end of TOC entry not empty @@ -24746,7 +25355,7 @@ rowspan="#2" % -% \subsubsection{Counting HTML tabular columns} +% \subsubsection{Counting \HTML\ tabular columns} % The \LaTeX\ specification for a table includes a number of columns separated % by the |&| character. These columns differ in content from line to line. @@ -25280,7 +25889,7 @@ rowspan="#2" % % \end{macro} -% \subsection{HTML \env{tabular} environment} +% \subsection{\HTML\ \env{tabular} environment} % \codehtml % \begin{macrocode} @@ -25757,15 +26366,15 @@ rowspan="#2" % \GetTitleStringExpand{#1}% \edef\@currentlabelname{\detokenize\expandafter{\GetTitleStringResult}}% \edef\@currentlabelname{% -\expandafter\LWR@stripperiod\@currentlabelname% -\ltx@empty.\ltx@empty\@nil% + \expandafter\LWR@stripperiod\@currentlabelname% + \ltx@empty.\ltx@empty\@nil% }% } % \end{macrocode} % \end{macro} -% \subsection{Zref setup} +% \subsection{\pkg{zref} setup} % \label{sec:zrefsetup} % See: \\ @@ -26318,7 +26927,7 @@ autopage-\theLWR@currentautosec% % \begin{macro}{\LWR@subinlineimage} \oarg{alttag} \marg{class} % \marg{filename} \marg{extension} \marg{style} % -% \changes{v0.18}{2016/05/18}{Surpress extra space.} +% \changes{v0.18}{2016/05/18}{Suppress extra space.} % \begin{macrocode} \newcommand*{\LWR@subinlineimage}[5][]{% \ifblank{#1}% @@ -26630,7 +27239,7 @@ autopage-\theLWR@currentautosec% % \begin{macrocode} \AtBeginDocument{\renewcommand{\@makecaption}[2]{% \LWR@traceinfo{@makecaption}% - #1\CaptionSeparator#2% + \LWR@isolate{#1}\CaptionSeparator\LWR@isolate{#2}% \LWR@traceinfo{@makecaption: done}% }% } @@ -26638,7 +27247,7 @@ autopage-\theLWR@currentautosec% % \end{macro} -% \subsection{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|, @@ -26692,19 +27301,19 @@ autopage-\theLWR@currentautosec% % \begin{macrocode} \newenvironment*{LWR@figcaption} {% -\LWR@traceinfo{LWR@figcaption env start}% -\LWR@htmlblocktag{figcaption}% -\ifbool{FormatWP}{% -\begin{BlockClass}[font-style:italic]{italic} -\LWR@print@vspace*{\baselineskip} -}{}% -\LWR@traceinfo{LWR@figcaption env start: done}% + \LWR@traceinfo{LWR@figcaption env start}% + \LWR@htmlblocktag{figcaption}% + \ifbool{FormatWP}{% + \begin{BlockClass}[font-style:italic]{italic} + \LWR@print@vspace*{\baselineskip} + }{}% + \LWR@traceinfo{LWR@figcaption env start: done}% } {% -\LWR@traceinfo{LWR@figcaption env end}% -\ifbool{FormatWP}{\end{BlockClass}}{}% -\LWR@htmlblocktag{/figcaption}% -\LWR@traceinfo{LWR@figcaption env end: done}% + \LWR@traceinfo{LWR@figcaption env end}% + \ifbool{FormatWP}{\end{BlockClass}}{}% + \LWR@htmlblocktag{/figcaption}% + \LWR@traceinfo{LWR@figcaption env end: done}% } % \end{macrocode} % \end{environment} @@ -26825,6 +27434,8 @@ autopage-\theLWR@currentautosec% % \changes{v0.51}{2018/03/11}{Add missing support for float mechanism if necessary.} % \begin{macrocode} \ifcsvoid{ext@#2}{\csdef{ext@#2}{#1}}{}% +% \end{macrocode} +% \begin{macrocode} \addtocontents{\@nameuse{ext@#2}}{% \protect\LWRsetnextfloat% {\arabic{LWR@latestautopage}}% @@ -26884,7 +27495,7 @@ autopage-\theLWR@currentautosec% % \end{macrocode} -% \subsection{Reading and printing the TOC} +% \subsection{Reading and printing the \TOC} % \begin{macro}{\LWR@myshorttoc} \marg{toc/lof/lot/sidetoc} % \changes{v0.18}{2016/05/19}{Reorganize \cs{HomeHTMLFilename} logic.} @@ -26927,7 +27538,7 @@ autopage-\theLWR@currentautosec% % \begin{macro}{\LWR@subtableofcontents} \marg{toc/lof/lot} \marg{sectionstarname} % -% Places a TOC/LOF/LOT at the current position. +% Places a \TOC/\LOF/\LOT\ at the current position. % \begin{macrocode} \NewDocumentCommand{\LWR@subtableofcontents}{m m}{% % \end{macrocode} @@ -26938,7 +27549,7 @@ autopage-\theLWR@currentautosec% {\LWR@closeprevious{\LWR@depthchapter}} % \end{macrocode} % Prints any pending footnotes so that they appear above the potentially -% large TOC: +% large \TOC: % \begin{macrocode} \LWR@printpendingfootnotes % \end{macrocode} @@ -26946,7 +27557,7 @@ autopage-\theLWR@currentautosec% % \begin{macrocode} \@ifundefined{chapter}{\section*{#2}}{\chapter*{#2}} % \end{macrocode} -% Create a new \HTML\ |nav| containing the TOC/LOF/LOT: +% Create a new \HTML\ |nav| containing the \TOC/\LOF/\LOT: % \begin{macrocode} \LWR@htmlelementclass{nav}{#1} % \end{macrocode} @@ -26977,7 +27588,7 @@ autopage-\theLWR@currentautosec% % % % \DescribeBoolean{LWR@copiedsidetoc} Used to only copy the -% toc file to the sidetoc a single time. +% \TOC\ file to the sidetoc a single time. % % (\pkg{listings} and perhaps other packages would re-use \cs{tableofcontents} % for their own purposes, causing the sidetoc to be copied more than once, and @@ -27066,7 +27677,7 @@ autopage-\theLWR@currentautosec% % \end{macro} -% \subsection{High-level TOC commands} +% \subsection{High-level \TOC\ commands} % \label{sec:listof} % \begin{macro}{\listof} \marg{type} \marg{title} @@ -27091,10 +27702,10 @@ autopage-\theLWR@currentautosec% % \end{macro} -% \subsection{Side TOC} +% \subsection{Side \TOC} % \label{sec:sidetoc} -% The ``side TOC'' is a table-of-contents positioned to the side. +% The ``side \TOC'' is a table-of-contents positioned to the side. % % It may be renamed by redefining \cs{sidetocname}, and may contain paragraphs. % @@ -27182,7 +27793,7 @@ autopage-\theLWR@currentautosec% -% \subsection{Low-level TOC line formatting} +% \subsection{Low-level \TOC\ line formatting} % \begin{macro}{\numberline} \marg{number} % @@ -27218,12 +27829,12 @@ autopage-\theLWR@currentautosec% \NewDocumentCommand{\hypertoc}{m m +m m}{% \LWR@traceinfo{hypertoc !#1!#2!#3!#4!}% % \end{macrocode} -% Respond to tocdepth: +% Respond to |tocdepth|: % \begin{macrocode} \ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}{% \LWR@startpars% % \end{macrocode} -% Create an \HTML\ link to filename\#autosec-(page), with text of the caption, +% Create an \HTML\ link to filename\#autosec-(page), with the name, % of the given \HTML\ class. % \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.} % \begin{macrocode} @@ -27314,9 +27925,15 @@ autopage-\theLWR@currentautosec% % \begin{macro}{\l@chapter} \marg{name} \marg{page} % % Uses \cs{DeclareDocumentCommand} in case the class does not happen to have a \cs{chapter}. +% \changes{v0.62}{2018/11/17}{Don't define if no \cs{chapter}. +% Fix for \pkg{algorithm2e}.} % \begin{macrocode} +\@ifundefined{chapter} +{} +{ \DeclareDocumentCommand{\l@chapter}{m m} {\hypertoc{0}{chapter}{#1}{#2}} +} % \end{macrocode} % \end{macro} @@ -27514,15 +28131,15 @@ autopage-\theLWR@currentautosec% % \changes{v0.61}{2018/09/27}{Made robust,} % \begin{macrocode} \newcommand{\LWR@hyperindexrefnullified}{% -\renewrobustcmd{\emph}[1]{\LWR@HTMLemph{\LWR@doindexentry{##1}}}% -\renewrobustcmd{\textbf}[1]{\LWR@HTMLtextbf{\LWR@doindexentry{##1}}}% -\renewrobustcmd{\textrm}[1]{\LWR@HTMLtextrm{\LWR@doindexentry{##1}}}% -\renewrobustcmd{\textsf}[1]{\LWR@HTMLtextsf{\LWR@doindexentry{##1}}}% -\renewrobustcmd{\texttt}[1]{\LWR@HTMLtexttt{\LWR@doindexentry{##1}}}% -\renewrobustcmd{\textup}[1]{\LWR@HTMLtextup{\LWR@doindexentry{##1}}}% -\renewrobustcmd{\textsc}[1]{\LWR@HTMLtextsc{\LWR@doindexentry{##1}}}% -\renewrobustcmd{\textit}[1]{\LWR@HTMLtextit{\LWR@doindexentry{##1}}}% -\renewrobustcmd{\textsl}[1]{\LWR@HTMLtextsl{\LWR@doindexentry{##1}}}% +\renewrobustcmd{\emph}[1]{\LWR@HTML@emph{\LWR@doindexentry{##1}}}% +\renewrobustcmd{\textbf}[1]{\LWR@HTML@textbf{\LWR@doindexentry{##1}}}% +\renewrobustcmd{\textrm}[1]{\LWR@HTML@textrm{\LWR@doindexentry{##1}}}% +\renewrobustcmd{\textsf}[1]{\LWR@HTML@textsf{\LWR@doindexentry{##1}}}% +\renewrobustcmd{\texttt}[1]{\LWR@HTML@texttt{\LWR@doindexentry{##1}}}% +\renewrobustcmd{\textup}[1]{\LWR@HTML@textup{\LWR@doindexentry{##1}}}% +\renewrobustcmd{\textsc}[1]{\LWR@HTML@textsc{\LWR@doindexentry{##1}}}% +\renewrobustcmd{\textit}[1]{\LWR@HTML@textit{\LWR@doindexentry{##1}}}% +\renewrobustcmd{\textsl}[1]{\LWR@HTML@textsl{\LWR@doindexentry{##1}}}% } % \end{macrocode} % \end{macro} @@ -27722,17 +28339,6 @@ autopage-\theLWR@currentautosec% \let\textellipsis\LWR@origtextellipsis% \let\textless\LWR@origtextless% \let\textgreater\LWR@origtextgreater% -\LetLtxMacro\textrm\LWR@origtextrm% -\LetLtxMacro\textsf\LWR@origtextsf% -\LetLtxMacro\texttt\LWR@origtexttt% -\LetLtxMacro\textbf\LWR@origtextbf% -\LetLtxMacro\textmd\LWR@origtextmd% -\LetLtxMacro\textit\LWR@origtextit% -\LetLtxMacro\textsl\LWR@origtextsl% -\LetLtxMacro\textsc\LWR@origtextsc% -\LetLtxMacro\textup\LWR@origtextup% -\LetLtxMacro\textnormal\LWR@origtextnormal% -\LetLtxMacro\emph\LWR@origemph% \LetLtxMacro\rmfamily\LWR@origrmfamily% \LetLtxMacro\sffamily\LWR@origsffamily% \LetLtxMacro\ttfamily\LWR@origttfamily% @@ -27804,7 +28410,7 @@ autopage-\theLWR@currentautosec% % \limitsmathdisplay -% \subsection{HTML \attribute{alt} tag names} +% \subsection{\HTML\ \attribute{alt} tag names} % % Redefinable names for the \HTML\ \attribute{alt} tags, % for translation according to the reader's native language. @@ -27869,7 +28475,7 @@ autopage-\theLWR@currentautosec% % in which case it will not be seen by \brand{MathJax}. % \changes{v0.19}{2016/06/08}{Avoids \brand{MathJax}.} % \changes{v0.26}{2017/03/30}{Dollar span avoided in a lateximage.} -% \changes{v0.51}{2018/03/23}{HTML entity used for text dollar.} +% \changes{v0.51}{2018/03/23}{\HTML\ entity used for text dollar.} % \begin{macrocode} \let\LWR@origtextdollar\$ @@ -28581,7 +29187,7 @@ autopage-\theLWR@currentautosec% \LWR@restoreorigformatting % \end{macrocode} % ^^A When a label is encountered, the \HTML\ comment is closed, -% ^^A the label is generated in an HTML-output context, +% ^^A the label is generated in an \HTML-output context, % ^^A then the \HTML\ comment is opened again. % See \cs{LWR@htmlmathlabel} in \cref{sec:amsmathsupport}. % @@ -28604,7 +29210,6 @@ autopage-\theLWR@currentautosec% % \end{macro} -% % \begin{macro}{\LWR@addmathjax} \marg{environment} \marg{contents} % % Given the name of a math environment and its contents, @@ -29251,7 +29856,7 @@ autopage-\theLWR@currentautosec% % \end{macrocode} -% \subsection{Sanitizing math expressions for HTML} +% \subsection{Sanitizing math expressions for \HTML} % \codehtml % \begin{macrocode} @@ -29444,7 +30049,7 @@ autopage-\theLWR@currentautosec% % \end{macrocode} -% \subsection{HTML \attribute{alt} tags} +% \subsection{\HTML\ \attribute{alt} tags} % \begin{macro}{\LWR@amsmathbody} \marg{envname} \qquad % For use inside the optional argument to a \env{lateximage} @@ -29484,7 +30089,7 @@ autopage-\theLWR@currentautosec% % \subsection{\env{lateximage} environment} % \begin{environment}{lateximage} * \oarg{2: \element{alt} tag} -% \oarg{3: add'l hashing} \oarg{4: CSS style} +% \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. @@ -29493,7 +30098,7 @@ autopage-\theLWR@currentautosec% % % \describehashing % -% \changes{v0.18}{2016/05/18}{Surpress extra space.} +% \changes{v0.18}{2016/05/18}{Suppress extra space.} % \changes{v0.18}{2016/05/18}{pdfcrop: -{}-hires added.} % \changes{v0.18}{2016/05/19}{Reorganize \cs{HomeHTMLFilename} logic.} % \changes{v0.26}{2017/03/22}{Print mode now uses a \env{minipage} of \cs{linewidth}.} @@ -29771,7 +30376,7 @@ autopage-\theLWR@currentautosec% \begin{warpprint} % \end{macrocode} -% \begin{environment}{lateximage} \oarg{\element{alt} tag} \oarg{CSS style} +% \begin{environment}{lateximage} \oarg{\element{alt} tag} \oarg{\CSS\ style} % % \env{varwidth} is used to create a box of the natural width of its contents. % @@ -29915,8 +30520,8 @@ autopage-\theLWR@currentautosec% - -% \section{Pre-loaded packages} +% ^^A *preloaded +% \section{Preloaded packages} % % \codehtml % \begin{macrocode} @@ -29924,25 +30529,40 @@ autopage-\theLWR@currentautosec% % \end{macrocode} % % +% If was loaded before \pkg{lwarp}, load the \pkg{lwarp} version as well. +% \begin{macro}{\LWR@PreloadedPackage} \marg{packagename} +% \changes{v0.62}{2018/11/17}{Added.} +% \begin{macrocode} +\newcommand*{\LWR@PreloadedPackage}[1]{% +\@ifpackageloaded{#1}{\LWR@origRequirePackage{lwarp-#1}}{} +} +% \end{macrocode} +% \end{macro} +% % If \pkg{textcomp} was loaded before \pkg{lwarp}, % perhaps as part of the font-related packages, % explicitly load the lwarp patches now: % \begin{macrocode} -\@ifpackageloaded{textcomp}{\LWR@origRequirePackage{lwarp-textcomp}}{} +\LWR@PreloadedPackage{textcomp} % \end{macrocode} % If \pkg{xunicode} was loaded before \pkg{lwarp}, % perhaps as part of the font-related packages, % explicitly load the lwarp patches now: % \begin{macrocode} -\@ifpackageloaded{xunicode}{\LWR@origRequirePackage{lwarp-xunicode}}{} +\LWR@PreloadedPackage{xunicode} % \end{macrocode} % If \pkg{graphics} or \pkg{graphicx} were loaded before \pkg{lwarp}, % perhaps by \pkg{xunicode}, explicitly load the lwarp patches now: % \begin{macrocode} -\@ifpackageloaded{graphics}{\LWR@origRequirePackage{lwarp-graphics}}{} -\@ifpackageloaded{graphicx}{\LWR@origRequirePackage{lwarp-graphicx}}{} +\LWR@PreloadedPackage{graphics} +\LWR@PreloadedPackage{graphicx} +% \end{macrocode} + +% \pkg{ulem} may be preloaded by \pkg{ctex}, \pkg{ctexart}, and related classes. +% \begin{macrocode} +\LWR@PreloadedPackage{ulem} % \end{macrocode} % \begin{macrocode} @@ -29954,7 +30574,7 @@ autopage-\theLWR@currentautosec% -% \section{Siunitx} +% \section{\pkg{siunitx}} % \label{sec:siunitx} % \DescribePackage{siunitx} @@ -30036,7 +30656,7 @@ autopage-\theLWR@currentautosec% % \end{macrocode} -% \section{Xcolor boxes} +% \section{\pkg{xcolor} boxes} % % \label{sec:xcolorpatches} % @@ -30112,8 +30732,9 @@ autopage-\theLWR@currentautosec% % % The current color is remembered, then set to the frame, then the current % color is used for the contents. +% \changes{v0.62}{2018/10/18}{Fix: No longer requires \pkg{xifthen}.} % \begin{macrocode} -\ifthenelse{\equal{#4}{none}}% +\ifstrequal{#4}{none}% {% #4 none \LWR@traceinfo{background is none}% {% scope the \colorlet @@ -30189,8 +30810,9 @@ autopage-\theLWR@currentautosec% % % The current color is remembered, then set to the frame, then the current % color is used for the contents. +% \changes{v0.62}{2018/10/18}{Fix: No longer requires \pkg{xifthen}.} % \begin{macrocode} -\ifthenelse{\equal{#4}{none}}% +\ifstrequal{#4}{none}% {% #4 none {% scope the \colorlet \colorlet{LWR@currentcolor}{.}% @@ -30235,7 +30857,7 @@ autopage-\theLWR@currentautosec% -% \section{Chemmacros environments} +% \section{\pkg{chemmacros} environments} % \label{sec:chemmacrosprintenvs} % % \cs{makepolymerdelims} and redox reactions must be enclosed in a \env{lateximage} @@ -30287,7 +30909,7 @@ autopage-\theLWR@currentautosec% -% \section{Cleveref} +% \section{\pkg{cleveref}} % \label{sec:cleveref} % \DescribePackage{cleveref} @@ -30499,7 +31121,7 @@ autopage-\theLWR@currentautosec% -% \section{Picture} +% \section{\env{picture} environment} % \label{sec:picture} % \DescribeEnv{picture} The \env{picture} environment is enclosed @@ -30804,7 +31426,7 @@ autopage-\theLWR@currentautosec% % \end{environment} % % -% \subsection{Parbox, mbox, makebox, framebox, fbox, raisebox} +% \subsection{\cs{parbox}, \cs{mbox}, \cs{makebox}, \cs{framebox}, \cs{fbox}, \cs{raisebox}} % % \codehtml % @@ -31073,7 +31695,9 @@ padding:\LWR@printlength{\fboxsep}% \endminipage% } -\newenvironment{fminipage}{\LWR@print@fminipage}{\endLWR@print@fminipage} +\LetLtxMacro\fminipage\LWR@print@fminipage +\LetLtxMacro\endfminipage\endLWR@print@fminipage +% \newenvironment{fminipage}{\LWR@print@fminipage}{\endLWR@print@fminipage} \end{warpall} % \end{macrocode} @@ -31089,6 +31713,12 @@ padding:\LWR@printlength{\fboxsep}% \LWR@forceminwidth{\fboxrule}% \setlength{\LWR@tempwidth}{#4}% \IfValueT{#2}{\setlength{\LWR@tempheight}{#2}}% +% \end{macrocode} +% \changes{v0.62}{2018/11/11}{Fix: Horiz white space.} +% \begin{macrocode} +\LWR@stoppars% +% \end{macrocode} +% \begin{macrocode} \begin{BlockClass}[% \LWR@blackborderpadding ; % \IfValueT{#2}{height:\LWR@printlength{\LWR@tempheight} ; }% @@ -31097,6 +31727,12 @@ width:\LWR@printlength{\LWR@tempwidth}% } {% \end{BlockClass}% +% \end{macrocode} +% Prevent paragraph tags around horizontal white space +% until the start of the next paragraph: +% \changes{v0.62}{2018/11/11}{Fix: Horiz white space.} +% \begin{macrocode} +\global\booltrue{LWR@minipagethispar}% \LWR@traceinfo{fminipage done}% } @@ -31135,7 +31771,7 @@ width:\LWR@printlength{\LWR@tempwidth}% % % \limitstext % -% For high-level block and inline custom CSS classes, +% For high-level block and inline custom \CSS\ classes, % see \cref{sec:highlevelclasses}. @@ -31144,132 +31780,159 @@ width:\LWR@printlength{\LWR@tempwidth}% \begin{warpHTML} % \end{macrocode} + % \changes{v0.34}{2017/08/05}{Improved font control.} % \changes{v0.35}{2017/08/08}{Fix: \cs{textbf} and related.} % \changes{v0.42}{2017/10/20}{\cs{textbf} and related: If \progcode{FormatWP}, use explicit styles for % \cs{textsc}, etc.} +% \changes{v0.62}{2018/11/11}{\cs{textbf} and related: Improved font detection.} - - -% \begin{macro}{\LWR@HTMLtextstyle} \marg{FormatWP style} \marg{class} \marg{text} -% -% If |FormatWP|, adds an explicit style to the text span class. -% This is used by \brand{LibreOffice} to mark its imported text using the given style. -% \changes{v0.42}{2017/10/20}{Added.} +% \begin{macro}{\emph} \marg{text} % \begin{macrocode} -\DeclareRobustCommand{\LWR@HTMLtextstyle}[3]{% -\ifbool{FormatWP}% -{\LWR@htmlspanclass[#1]{#2}{#3}}% -{\LWR@htmlspanclass{#2}{#3}}% +\DeclareRobustCommand{\LWR@HTML@emph}[1]{% + {% + \itshape% + \LWR@htmlspan{em}{#1}% + }% } -% \end{macrocode} -% \end{macro} - - +\LWR@formatted{emph} -% \begin{macro}{\emph} \marg{text} -% \begin{macrocode} -\DeclareRobustCommand{\LWR@HTMLemph}[1]{\LWR@htmlspan{em}{#1}} -\DeclareRobustCommand{\LWR@nullemph}[1]{#1} -\LetLtxMacro\emph\LWR@HTMLemph +\DeclareRobustCommand{\LWR@null@emph}[1]{#1} % \end{macrocode} % \end{macro} % \begin{macro}{\textmd} \marg{text} % \begin{macrocode} -\DeclareRobustCommand{\LWR@HTMLtextmd}[1]{% -\LWR@HTMLtextstyle{font-weight:normal}{textmd}{#1}% +\DeclareRobustCommand{\LWR@HTML@textmd}[1]{% + {% + \mdseries% + \InlineClass(font-weight:normal){textmd}{#1}% + }% } -\DeclareRobustCommand{\LWR@nulltextmd}[1]{#1} +\LWR@formatted{textmd} -\LetLtxMacro\textmd\LWR@HTMLtextmd +\DeclareRobustCommand{\LWR@null@textmd}[1]{#1} % \end{macrocode} % \end{macro} % \begin{macro}{\textbf} \marg{text} % \begin{macrocode} -\DeclareRobustCommand{\LWR@HTMLtextbf}[1]{\LWR@htmlspan{b}{#1}} -\DeclareRobustCommand{\LWR@nulltextbf}[1]{#1} -\LetLtxMacro\textbf\LWR@HTMLtextbf +\DeclareRobustCommand{\LWR@HTML@textbf}[1]{% + {% + \bfseries% + \LWR@htmlspan{b}{#1}% + }% +} +\LWR@formatted{textbf} + +\DeclareRobustCommand{\LWR@null@textbf}[1]{#1} % \end{macrocode} % \end{macro} % \begin{macro}{\textrm} \marg{text} % \begin{macrocode} -\DeclareRobustCommand{\LWR@HTMLtextrm}[1]{% -\LWR@HTMLtextstyle{font-family:serif}{textrm}{#1}% +\DeclareRobustCommand{\LWR@HTML@textrm}[1]{% + {% + \rmfamily% + \InlineClass(font-family:serif){textrm}{#1}% + }% } +\LWR@formatted{textrm} -\DeclareRobustCommand{\LWR@nulltextrm}[1]{#1} - -\LetLtxMacro\textrm\LWR@HTMLtextrm +\DeclareRobustCommand{\LWR@null@textrm}[1]{#1} % \end{macrocode} % \end{macro} % \begin{macro}{\textsf} \marg{text} % \begin{macrocode} -\DeclareRobustCommand{\LWR@HTMLtextsf}[1]{% -\LWR@HTMLtextstyle{font-family:sans}{textsf}{#1}% +\DeclareRobustCommand{\LWR@HTML@textsf}[1]{% + {% + \sffamily% + \InlineClass(font-family:sans){textsf}{#1}% + }% } -\DeclareRobustCommand{\LWR@nulltextsf}[1]{#1} -\LetLtxMacro\textsf\LWR@HTMLtextsf +\LWR@formatted{textsf} + +\DeclareRobustCommand{\LWR@null@textsf}[1]{#1} % \end{macrocode} % \end{macro} % \begin{macro}{\texttt} \marg{text} % \begin{macrocode} -\DeclareRobustCommand{\LWR@HTMLtexttt}[1]{\LWR@htmlspan{kbd}{#1}} -\DeclareRobustCommand{\LWR@nulltexttt}[1]{#1} -\LetLtxMacro\texttt\LWR@HTMLtexttt +\DeclareRobustCommand{\LWR@HTML@texttt}[1]{% + {% + \ttfamily% + \LWR@htmlspan{kbd}{#1}% + }% +} +\LWR@formatted{texttt} + +\DeclareRobustCommand{\LWR@null@texttt}[1]{#1} % \end{macrocode} % \end{macro} % \begin{macro}{\textup} \marg{text} % \changes{v0.28}{2017/04/13}{Fixed span class.} +% \changes{v0.62}{2018/11/11}{Fixed WP span class.} % \begin{macrocode} -\DeclareRobustCommand{\LWR@HTMLtextup}[1]{% -\LWR@HTMLtextstyle{font-variant:normal}{textup}{#1}% +\DeclareRobustCommand{\LWR@HTML@textup}[1]{% + {% + \upshape% + \InlineClass(font-style:normal){textup}{#1}% + }% } +\LWR@formatted{textup} -\DeclareRobustCommand{\LWR@nulltextup}[1]{#1} - -\LetLtxMacro\textup\LWR@HTMLtextup +\DeclareRobustCommand{\LWR@null@textup}[1]{#1} % \end{macrocode} % \end{macro} % \begin{macro}{\textit} \marg{text} % \begin{macrocode} -\DeclareRobustCommand{\LWR@HTMLtextit}[1]{\LWR@htmlspan{i}{#1}} -\DeclareRobustCommand{\LWR@nulltextit}[1]{#1} -\LetLtxMacro\textit\LWR@HTMLtextit +\DeclareRobustCommand{\LWR@HTML@textit}[1]{% + {% + \itshape% + \LWR@htmlspan{i}{#1}% + }% +} +\LWR@formatted{textit} + +\DeclareRobustCommand{\LWR@null@textit}[1]{#1} % \end{macrocode} % \end{macro} % \begin{macro}{\textsc} \marg{text} % \begin{macrocode} -\DeclareRobustCommand{\LWR@HTMLtextsc}[1]{% -\LWR@HTMLtextstyle{font-variant:small-caps}{textsc}{#1}% +\DeclareRobustCommand{\LWR@HTML@textsc}[1]{% + {% + \scshape% + \InlineClass( + font-variant: small-caps ; + font-variant-numeric: oldstyle-nums ; + ){textsc}{#1}% + }% } +\LWR@formatted{textsc} -\DeclareRobustCommand{\LWR@nulltextsc}[1]{#1} - -\LetLtxMacro\textsc\LWR@HTMLtextsc +\DeclareRobustCommand{\LWR@null@textsc}[1]{#1} % \end{macrocode} % \end{macro} % \begin{macro}{\textsl} \marg{text} % \begin{macrocode} -\DeclareRobustCommand{\LWR@HTMLtextsl}[1]{% -\LWR@HTMLtextstyle{font-style:oblique}{textsl}{#1}% +\DeclareRobustCommand{\LWR@HTML@textsl}[1]{% + {% + \slshape% + \InlineClass(font-style:oblique){textsl}{#1}% + }% } +\LWR@formatted{textsl} -\DeclareRobustCommand{\LWR@nulltextsl}[1]{#1} - -\LetLtxMacro\textsl\LWR@HTMLtextsl +\DeclareRobustCommand{\LWR@null@textsl}[1]{#1} % \end{macrocode} % \end{macro} @@ -31277,25 +31940,30 @@ width:\LWR@printlength{\LWR@tempwidth}% % \begin{macro}{\textnormal} \marg{text} % \begin{macrocode} -\DeclareRobustCommand{\LWR@HTMLtextnormal}[1]{\textmd{\textrm{\textup{#1}}}} -\DeclareRobustCommand{\LWR@nulltextnormal}[1]{#1} -\LetLtxMacro\textnormal\LWR@HTMLtextnormal +\DeclareRobustCommand{\LWR@HTML@textnormal}[1]{\textmd{\textrm{\textup{#1}}}} +\LWR@formatted{textnormal} + +\DeclareRobustCommand{\LWR@null@textnormal}[1]{#1} % \end{macrocode} % \end{macro} % \begin{macrocode} -\DeclareRobustCommand{\LWR@nullrmfamily}{} -\DeclareRobustCommand{\LWR@nullsffamily}{} -\DeclareRobustCommand{\LWR@nullttfamily}{} -\DeclareRobustCommand{\LWR@nullbfseries}{} -\DeclareRobustCommand{\LWR@nullmdseries}{} -\DeclareRobustCommand{\LWR@nullupshape}{} -\DeclareRobustCommand{\LWR@nullslshape}{} -\DeclareRobustCommand{\LWR@nullscshape}{} -\DeclareRobustCommand{\LWR@nullitshape}{} -\DeclareRobustCommand{\LWR@nullem}[1]{} -\DeclareRobustCommand{\LWR@nullnormalfont}{} +\DeclareRobustCommand{\LWR@null@rmfamily}{} +\DeclareRobustCommand{\LWR@null@sffamily}{} +\DeclareRobustCommand{\LWR@null@ttfamily}{} +\DeclareRobustCommand{\LWR@null@bfseries}{} +\DeclareRobustCommand{\LWR@null@mdseries}{} +\DeclareRobustCommand{\LWR@null@upshape}{} +\DeclareRobustCommand{\LWR@null@slshape}{} +\DeclareRobustCommand{\LWR@null@scshape}{} +\DeclareRobustCommand{\LWR@null@itshape}{} +\DeclareRobustCommand{\LWR@null@normalfont}{} +% \end{macrocode} +% +% \changes{v0.62}{2018/11/17}{Fix for \cs{em}.} +% \begin{macrocode} +\DeclareRobustCommand{\LWR@null@em}{} % \end{macrocode} @@ -31314,28 +31982,28 @@ width:\LWR@printlength{\LWR@tempwidth}% % \changes{v0.48}{2018/02/04}{Fix: \cs{newline} in title.} % \begin{macrocode} \newcommand*{\LWR@nullfonts}{% -\LetLtxMacro\emph\LWR@nullemph% -\LetLtxMacro\textmd\LWR@nulltextmd% -\LetLtxMacro\textbf\LWR@nulltextbf% -\LetLtxMacro\textrm\LWR@nulltextrm% -\LetLtxMacro\textsf\LWR@nulltextsf% -\LetLtxMacro\texttt\LWR@nulltexttt% -\LetLtxMacro\textup\LWR@nulltextup% -\LetLtxMacro\textit\LWR@nulltextit% -\LetLtxMacro\textsc\LWR@nulltextsc% -\LetLtxMacro\textsl\LWR@nulltextsl% -\LetLtxMacro\textnormal\LWR@nulltextnormal% -\LetLtxMacro\rmfamily\LWR@nullrmfamily% -\LetLtxMacro\sffamily\LWR@nullsffamily% -\LetLtxMacro\ttfamily\LWR@nullttfamily% -\LetLtxMacro\bfseries\LWR@nullbfseries% -\LetLtxMacro\mdseries\LWR@nullmdseries% -\LetLtxMacro\upshape\LWR@nullupshape% -\LetLtxMacro\slshape\LWR@nullslshape% -\LetLtxMacro\scshape\LWR@nullscshape% -\LetLtxMacro\itshape\LWR@nullitshape% -\LetLtxMacro\em\LWR@nullem% -\LetLtxMacro\normalfont\LWR@nullnormalfont% +\LetLtxMacro\emph\LWR@null@emph% +\LetLtxMacro\textmd\LWR@null@textmd% +\LetLtxMacro\textbf\LWR@null@textbf% +\LetLtxMacro\textrm\LWR@null@textrm% +\LetLtxMacro\textsf\LWR@null@textsf% +\LetLtxMacro\texttt\LWR@null@texttt% +\LetLtxMacro\textup\LWR@null@textup% +\LetLtxMacro\textit\LWR@null@textit% +\LetLtxMacro\textsc\LWR@null@textsc% +\LetLtxMacro\textsl\LWR@null@textsl% +\LetLtxMacro\textnormal\LWR@null@textnormal% +\LetLtxMacro\rmfamily\LWR@null@rmfamily% +\LetLtxMacro\sffamily\LWR@null@sffamily% +\LetLtxMacro\ttfamily\LWR@null@ttfamily% +\LetLtxMacro\bfseries\LWR@null@bfseries% +\LetLtxMacro\mdseries\LWR@null@mdseries% +\LetLtxMacro\upshape\LWR@null@upshape% +\LetLtxMacro\slshape\LWR@null@slshape% +\LetLtxMacro\scshape\LWR@null@scshape% +\LetLtxMacro\itshape\LWR@null@itshape% +\LetLtxMacro\normalfont\LWR@null@normalfont% +\LetLtxMacro\em\LWR@null@em% % \end{macrocode} % \changes{v0.50}{2018/02/20}{Robustify macros.} % \begin{macrocode} @@ -31345,8 +32013,8 @@ width:\LWR@printlength{\LWR@tempwidth}% \renewcommand*{\textellipsis}{-}% % \end{macrocode} % \begin{macrocode} -\renewcommand*{\HTMLunicode}[1]{-}% -\renewcommand*{\HTMLentity}[1]{-}% +\renewcommand*{\HTMLunicode}[1]{}% +\renewcommand*{\HTMLentity}[1]{}% % \end{macrocode} % Ampersand becomes ``and'', which is a short word and is then removed from the filename. % \begin{macrocode} @@ -31362,8 +32030,7 @@ width:\LWR@printlength{\LWR@tempwidth}% % \end{macrocode} % \begin{macrocode} \RenewDocumentCommand{\LWR@htmlspanclass}{o m +m}{##3}% -\DeclareExpandableDocumentCommand{\InlineClass}{+o +m +m}{##3}% -\DeclareRobustCommand{\LWR@HTMLtextstyle}[3]{##3}% +\DeclareExpandableDocumentCommand{\InlineClass}{D{(}{)}{} o m +m}{##4}% % \end{macrocode} % Nullify math macros. % \changes{v0.55}{2018/04/24}{Removed extraneous space which appeared in file links.} @@ -31392,20 +32059,36 @@ width:\LWR@printlength{\LWR@tempwidth}% \newcommand*{\LWR@f@shape}{up} % \end{macrocode} + % \begin{macro}{\LWR@textcurrentfont} \marg{text} % % Prints the text with the current font choices. +% Avoids nesting repeated font selections. % % \changes{v0.48}{2018/02/02}{Added. Improves font control.} % \changes{v0.56}{2018/04/27}{Added \attribute{span.textbf}, etc.} +% \changes{v0.62}{2018/11/15}{Tracks depth to avoid nesting repeated font changes.} % \begin{macrocode} +\newcounter{LWR@textcurrentfontdepth} +\setcounter{LWR@textcurrentfontdepth}{0} + \newcommand*{\LWR@textcurrentfont}[1]{% -\InlineClass{% - text\LWR@f@family\LWR@origtilde{}% - text\LWR@f@series\LWR@origtilde{}% - text\LWR@f@shape% - }% - {#1}% + \ifnumcomp{\value{LWR@textcurrentfontdepth}}{>}{0}% + {% + \addtocounter{LWR@textcurrentfontdepth}{1}% + #1% + \addtocounter{LWR@textcurrentfontdepth}{-1}% + }% + {% + \addtocounter{LWR@textcurrentfontdepth}{1}% + \InlineClass{% + text\LWR@f@family\LWR@origtilde{}% + text\LWR@f@series\LWR@origtilde{}% + text\LWR@f@shape% + }% + {#1}% + \addtocounter{LWR@textcurrentfontdepth}{-1}% + }% } % \end{macrocode} % \end{macro} @@ -31426,6 +32109,7 @@ width:\LWR@printlength{\LWR@tempwidth}% % \end{macrocode} % \end{environment} + % \changes{v0.48}{2018/02/02}{Improved font control.} % \changes{v0.50}{2018/02/20}{Robustify macros.} % @@ -31477,6 +32161,13 @@ width:\LWR@printlength{\LWR@tempwidth}% % \end{macrocode} % \end{macro} +% \begin{macro}{\slshape} +% \changes{v0.62}{2018/11/11}{Added.} +% \begin{macrocode} +\renewrobustcmd*{\slshape}{\renewcommand*{\LWR@f@shape}{sl}} +% \end{macrocode} +% \end{macro} + % \begin{macro}{\normalfont} % \begin{macrocode} \renewrobustcmd*{\normalfont}{\rmfamily\mdseries\upshape} @@ -31563,9 +32254,9 @@ width:\LWR@printlength{\LWR@tempwidth}% % \cs{underline}, etc.} % \begin{macrocode} \renewcommand{\underline}[1]{% -\LWR@HTMLtextstyle% - {text-decoration:underline; text-decoration-skip: auto}% - {underline}{#1}% + \InlineClass% + (text-decoration:underline; text-decoration-skip: auto)% + {underline}{#1}% } % \end{macrocode} % \end{macro} @@ -31575,9 +32266,9 @@ width:\LWR@printlength{\LWR@tempwidth}% % \changes{v0.50}{2018/02/21}{Added.} % \begin{macrocode} \newcommand{\LWR@overline}[1]{% -\LWR@HTMLtextstyle% - {text-decoration:overline; text-decoration-skip: auto}% - {overline}{#1}% + \InlineClass% + (text-decoration:overline; text-decoration-skip: auto)% + {overline}{#1}% } % \end{macrocode} % \end{macro} @@ -31633,6 +32324,35 @@ width:\LWR@printlength{\LWR@tempwidth}% +% \codeprint +% \begin{macrocode} +\begin{warpprint} +% \end{macrocode} + +% \begin{macro}{\LWR@textcurrentfont} \marg{text} +% +% Prints the text with the current font choices. +% +% \changes{v0.62}{2018/11/11}{Added print version.} +% \begin{macrocode} +\newcommand*{\LWR@textcurrentfont}[1]{#1} +% \end{macrocode} +% \end{macro} + +% \begin{environment}{LWR@blocktextcurrentfont} +% +% Prints the contents with the current font choices. +% +% \changes{v0.62}{2018/11/11}{Added print version.} +% \begin{macrocode} +\newenvironment*{LWR@blocktextcurrentfont}{}{} +% \end{macrocode} +% \end{environment} + +% \begin{macrocode} +\end{warpprint} +% \end{macrocode} + % \section{Skips, spaces, font sizes} @@ -31765,9 +32485,14 @@ width:\LWR@printlength{\LWR@tempwidth}% % Inside |tabular|, |\\| is temporarily changed to \cs{LWR@tabularendofline}. % \begin{macrocode} \LetLtxMacro\LWR@origendofline\\ -\NewDocumentCommand{\LWR@endofline}{s o} +\NewDocumentCommand{\LWR@endofline}{s O{0pt}} {% \newline% +% \end{macrocode} +% \changes{v0.62}{2018/10/14}{Extra space if optional arg.} +% \begin{macrocode} +\setlength{\LWR@templengthone}{#2}% +\ifdimgreater{\LWR@templengthone}{0pt}{\newline}{}% } % \end{macrocode} % \end{macro} @@ -31777,7 +32502,7 @@ width:\LWR@printlength{\LWR@tempwidth}% % \begin{macro}{\LWR@minipagestartpars} -% \changes{v0.19}{2016/05/31}{Surpresses paragraph tags between minipages.} +% \changes{v0.19}{2016/05/31}{Suppresses paragraph tags between minipages.} % \gindex{minipage>horizontal space between} % \gindex{space>horizontal>between minipages} % \gindex{horizontal space>between minipages} @@ -31787,7 +32512,7 @@ width:\LWR@printlength{\LWR@tempwidth}% % a \element{div} to be inside a |p|, paragraphs must be turned off during the % generation of the minipage, then turned on after the minipage is complete. % When this occurs between side-by-side minipages, |lwarp| correctly -% surpresses the paragraph tags between the minipages, unless some other +% suppresses the paragraph tags between the minipages, unless some other % text is between the minipages. Such text forms its own paragraph, resulting % in text after a minipage to be on its own line. Since people often place % \DescribeMacro{\hspace} @@ -31796,13 +32521,13 @@ width:\LWR@printlength{\LWR@tempwidth}% % \DescribeMacro{\qquad} % small horizontal space between minipages, it is desirable to maintain this % space if possible. |lwarp| tries to do this by remembering that a minipage -% has been seen, in which case paragraph tags are surpressed around +% has been seen, in which case paragraph tags are suppressed around % \cs{hspace}, \cs{enskip}, \cs{quad}, and \cs{qquad} until the end of the paragraph, when % the closing |p| tag is created. % % When a minipage is seen, the boolean % |LWR@minipagethispar| is set, telling the following horizontal -% whitespace commands to try to surpress their surrounding paragraph +% whitespace commands to try to suppress their surrounding paragraph % tags. |LWR@minipagethispar| is cleared at the next % end of paragraph, when the \HTML\ paragraph closing tag is % generated. @@ -32203,11 +32928,16 @@ width:\LWR@printlength{\LWR@tempwidth}% % % For \CSS\ conversions, see: \\ % \url{http://edward.oconnor.cx/2007/08/tex-poshlet} \\ -% \url{http://nitens.org/taraborelli/texlogo} +% \url{http://nitens.org/taraborelli/texlogo} \\ +% and the spacing described in the \pkg{metafont} package documentation. +% % % +% \subsection{\HTML\ logos} % -% \subsection{HTML logos} +% \changes{v0.62}{2018/10/23}{Logos: CSS instead of \element{sup}, \element{sub}.} +% \changes{v0.62}{2018/10/23}{Logos: Improved CSS.} +% \changes{v0.62}{2018/10/23}{Logos: Made robust.} % % \codehtml % \begin{macrocode} @@ -32224,16 +32954,18 @@ width:\LWR@printlength{\LWR@tempwidth}% % \LaTeX, \LuaTeX, \ConTeXt, etc. % \changes{v0.42}{2017/10/20}{If \progcode{FormatWP} use explicit style.} % \begin{macrocode} -\let\LWR@origTeX\TeX +\LetLtxMacro\LWR@origTeX\TeX -\newcommand*{\LWR@TeX} +\newrobustcmd*{\LWR@TeX} {% \InlineClass{latexlogofont}% {% - \LWR@HTMLtextstyle% - {text-transform:uppercase}% - {latexlogo}% - {T\textsubscript{e}X}% + \InlineClass{latexlogo}% + {% + T% + \InlineClass{latexlogosub}{e}% + X% + }% }% } % \end{macrocode} @@ -32243,24 +32975,35 @@ width:\LWR@printlength{\LWR@tempwidth}% % \changes{v0.42}{2017/10/20}{If \progcode{FormatWP} use explicit style.} % \begin{macro}{\LaTeXe} \LaTeX, \LaTeXe % \begin{macrocode} -\let\LWR@origLaTeX\LaTeX +\LetLtxMacro\LWR@origLaTeX\LaTeX -\newcommand*{\LWR@LaTeX} +\newrobustcmd*{\LWR@LaTeX} {% \InlineClass{latexlogofont}% {% - \LWR@HTMLtextstyle% - {text-transform:uppercase}% - {latexlogo}% - {L\textsuperscript{a}T\textsubscript{e}X}% + \InlineClass{latexlogo}% + {% + L% + \InlineClass{latexlogosup}{a}% + T% + \InlineClass{latexlogosub}{e}% + X% + }% }% } -\let\LWR@origLaTeXe\LaTeXe +\LetLtxMacro\LWR@origLaTeXe\LaTeXe -\renewcommand*{\LaTeXe} -{\LaTeX\InlineClass{latexlogofont}% -{\,2\textsubscript{\textit{\HTMLunicode{3B5}}}}} +\renewrobustcmd*{\LaTeXe} +{% + \LaTeX% + \InlineClass{latexlogofont}{% + \InlineClass{latexlogotwoe}{% + 2% + \InlineClass{latexlogotwoesub}{\HTMLunicode{03B5}}% + }% + }% +} % \end{macrocode} % \end{macro} % \end{macro} @@ -32269,8 +33012,8 @@ width:\LWR@printlength{\LWR@tempwidth}% % \begin{macro}{\LuaTeX} % \begin{macro}{\LuaLaTeX} \LuaTeX, \LuaLaTeX % \begin{macrocode} -\newcommand*{\LWR@LuaTeX}{\InlineClass{latexlogofont}{Lua}\TeX} -\newcommand*{\LWR@LuaLaTeX}{\InlineClass{latexlogofont}{Lua}\LaTeX} +\newrobustcmd*{\LWR@LuaTeX}{\InlineClass{latexlogofont}{Lua}\TeX} +\newrobustcmd*{\LWR@LuaLaTeX}{\InlineClass{latexlogofont}{Lua}\LaTeX} % \end{macrocode} % \end{macro} % \end{macro} @@ -32286,16 +33029,21 @@ width:\LWR@printlength{\LWR@tempwidth}% % |xelatexlogo| is a \CSS\ class which aligns the backwards E in \XeLaTeX{} and spaces % \LaTeX{} appropriately. % \begin{macrocode} -\newcommand*{\Xe} - {X\textsubscript{\HTMLunicode{18e}}} -\newcommand*{\LWR@XeTeX}{\InlineClass{xetexlogo}{\Xe}\TeX} -\newcommand*{\LWR@XeLaTeX}{\InlineClass{xelatexlogo}{\Xe}\LaTeX} +\newrobustcmd*{\Xe} + {% + X% + \InlineClass{xelatexlogosub}{\HTMLunicode{18e}}% + } + +\newrobustcmd*{\LWR@XeTeX}{\InlineClass{xelatexlogo}{\Xe}\TeX} + +\newrobustcmd*{\LWR@XeLaTeX}{\InlineClass{xelatexlogo}{\Xe}\LaTeX} % \end{macrocode} % \end{macro} % \end{macro} % \begin{macro}{\ConTeXt} \ConTeXt % \begin{macrocode} -\newcommand*{\LWR@ConTeXt} +\newrobustcmd*{\LWR@ConTeXt} {\InlineClass{latexlogofont}{Con}\TeX{}% \InlineClass{latexlogofont}{t}} % \end{macrocode} @@ -32305,10 +33053,10 @@ width:\LWR@printlength{\LWR@tempwidth}% % \begin{macro}{\BibTeX} % \begin{macro}{\MakeIndex} \BibTeX, \MakeIndex % \begin{macrocode} -\providecommand*{\BibTeX} +\providerobustcmd*{\BibTeX} {\InlineClass{latexlogofont}{B\textsc{ib}}\TeX} -\newcommand*{\MakeIndex} +\newrobustcmd*{\MakeIndex} {\InlineClass{latexlogofont}{\textit{MakeIndex}}} % \end{macrocode} % \end{macro} @@ -32318,17 +33066,27 @@ width:\LWR@printlength{\LWR@tempwidth}% % \begin{macro}{\AmS} \AmS % \nopagebreak % -% |amslogo| is a \CSS\ class used for the \AmS logo. +% |amslogo| is a \CSS\ class used for the \AmS\ logo. % \begin{macrocode} -\AtBeginDocument{\DeclareDocumentCommand{\AmS}{} -{\InlineClass{amslogo}{\textit{A\textsubscript{M}S}}}} +\AtBeginDocument{% +\DeclareDocumentCommand{\AmS}{} +{% + \InlineClass{amslogo}{% + \textit{% + A% + \InlineClass{latexlogosub}{M}% + S% + }% + }% +}% +} % \end{macrocode} % \end{macro} % % % \begin{macro}{\MiKTeX} \MiKTeX % \begin{macrocode} -\newcommand*{\MiKTeX}{\InlineClass{latexlogofont}{MiK}\TeX} +\newrobustcmd*{\MiKTeX}{\InlineClass{latexlogofont}{MiK}\TeX} % \end{macrocode} % \end{macro} % @@ -32336,9 +33094,9 @@ width:\LWR@printlength{\LWR@tempwidth}% % \begin{macro}{\LyX} \LyX % \nopagebreak % -% |lyxlogo| is a \CSS\ class used for the \LyX logo. +% |lyxlogo| is a \CSS\ class used for the \LyX\ logo. % \begin{macrocode} -\newcommand*{\LyX}{\InlineClass{lyxlogo}{LyX}} +\newrobustcmd*{\LyX}{\InlineClass{lyxlogo}{LyX}} % \end{macrocode} % \end{macro} % @@ -32351,23 +33109,38 @@ width:\LWR@printlength{\LWR@tempwidth}% % % \subsection{Print logos} % +% \changes{v0.62}{2018/10/23}{Logos: Fix for \XeTeX\ logo if \pkg{graphics} is not loaded.} +% % \codeprint % \begin{macrocode} \begin{warpprint} -\newcommand*{\XeTeXrevE} - {\hspace{-.1667em}\raisebox{-.5ex}{\reflectbox{E}}\hspace{-.125em}} -\providecommand*{\XeTeX}{\mbox{X\XeTeXrevE\TeX}} -\providecommand*{\XeLaTeX}{\mbox{X\XeTeXrevE\LaTeX}} -\providecommand*{\AmS}{% -\leavevmode\hbox{$\mathcal A\kern-.2em\lower.376ex% -\hbox{$\mathcal M$}\kern-.2em\mathcal S$}} -\newcommand*{\LyX}{\textsf{LyX}} -\providecommand*{\LuaTeX}{\mbox{Lua\TeX}} -\providecommand*{\LuaLaTeX}{\mbox{Lua\LaTeX}} -\providecommand*{\BibTeX}{\mbox{B\textsc{ib}\TeX}} -\providecommand*{\MakeIndex}{\mbox{\textit{MakeIndex}}} -\providecommand*{\ConTeXt}{\mbox{Con\TeX{}t}} -\providecommand*{\MiKTeX}{\mbox{MiK\TeX}} + +\newrobustcmd*{\XeTeXrevE} + {\hspace{-.1667em}\raisebox{-.5ex}{E}\hspace{-.125em}} + +\AtBeginDocument{ +\@ifpackageloaded{graphics}{ + \renewrobustcmd*{\XeTeXrevE} + {\hspace{-.1667em}\raisebox{-.5ex}{\reflectbox{E}}\hspace{-.125em}} +}{ + \PackageWarning{lwarp}{Load graphicx or graphics + for improved XeTeX logo} +} +} + +\providerobustcmd*{\XeTeX}{\mbox{X\XeTeXrevE\TeX}} +\providerobustcmd*{\XeLaTeX}{\mbox{X\XeTeXrevE\LaTeX}} +\providerobustcmd*{\AmS}{% + \leavevmode\hbox{$\mathcal A\kern-.2em\lower.376ex% + \hbox{$\mathcal M$}\kern-.2em\mathcal S$}% +} +\newrobustcmd*{\LyX}{\textsf{LyX}} +\providerobustcmd*{\LuaTeX}{\mbox{Lua\TeX}} +\providerobustcmd*{\LuaLaTeX}{\mbox{Lua\LaTeX}} +\providerobustcmd*{\BibTeX}{\mbox{B\textsc{ib}\TeX}} +\providerobustcmd*{\MakeIndex}{\mbox{\textit{MakeIndex}}} +\providerobustcmd*{\ConTeXt}{\mbox{Con\TeX{}t}} +\providerobustcmd*{\MiKTeX}{\mbox{MiK\TeX}} \end{warpprint} % \end{macrocode} @@ -32398,7 +33171,7 @@ width:\LWR@printlength{\LWR@tempwidth}% -% \section{Koma-script} +% \section{\brand{Koma-script} classes} % % Load patches to \pkg{koma-script}. % @@ -32418,7 +33191,7 @@ width:\LWR@printlength{\LWR@tempwidth}% % \end{macrocode} -% \section{Memoir} +% \section{\brand{Memoir} class} % % Load patches to \pkg{memoir}. % @@ -32438,29 +33211,48 @@ width:\LWR@printlength{\LWR@tempwidth}% % \end{macrocode} +% ^^A *ctex +% \section{C\TeX patch} +% +% Patches for \pkg{ctex} and related classes, +% which are loaded before \pkg{lwarp}. +% +% All C\TeX\ classes and the \pkg{ctex} package seem to +% load \pkg{ctexpatch}, so its presence is used to +% decide whether to have \pkg{lwarp} patch C\TeX. +% +% \changes{v0.62}{2018/11/17}{\pkg{ctexpatch}: Added patch.} +% +% \codehtml +% \begin{macrocode} +\begin{warpHTML} +% \end{macrocode} +% +% \cs{AtBeginDocument} in case the user set |FileSectionNames| in the preamble. +% +% \begin{macrocode} +\AtBeginDocument{ + \@ifpackageloaded{ctexpatch}{% + \def\@partcntformat#1{% + \LWR@isolate{\CTEX@partname}~% + \CTEX@part@aftername% + }% + \def\@partnameformat{} -% \clearpage -% \section{Trademarks} + \def\@chapcntformat#1{% + \LWR@isolate{\CTEX@chaptername}~% + \CTEX@chapter@aftername% + }% + }{} +} +% \end{macrocode} +% +% \begin{macrocode} +\end{warpHTML} +% \end{macrocode} % -% \changes{v0.14}{2016/03/29}{Docs: Trademarks section.} % -% \begin{itemize} -% \item \TeX\ is a trademark of American Mathematical Society. -% \item \brand{Adobe}® and \brand{Adobe} \prog{Framemaker}® are either registered trademarks or -% trademarks of \brand{Adobe Systems Incorporated} in the United States and/or other countries. -% \item \brand{Linux}® is the registered trademark of Linus Torvalds in the U.S.\ and other countries. -% \item \brand{Mac\,OS}® is a trademark of \brand{Apple Inc.} -% \item \brand{MadCap Flare}™ is the property of \brand{MadCap Software, Inc.} -% \item \brand{MathJax} is copyright 2009 and later. -% The \brand{MathJax Consortium} is a joint venture of the \brand{American Mathematical Society} (AMS) -% and the \brand{Society for Industrial and Applied Mathematics} (SIAM) -% to advance mathematical and scientific content on the web. -% \item \brand{Microsoft}®, \brand{Encarta}, \brand{MSN}, and \brand{Windows}® are either registered trademarks or -% trademarks of \brand{Microsoft Corporation} in the United States and/or other countries. -% \item \brand{UNIX}® is a registered trademark of \brand{The Open Group}. -% \end{itemize} - % \iffalse % % \fi @@ -32501,6 +33293,33 @@ width:\LWR@printlength{\LWR@tempwidth}% % % % +% +% \iffalse +%<*2in1> +% \fi +% +% \part{lwarp-2in1.sty} +% +% \section{2in1} +% +% \DescribePackage{2in1} +% \pkg{2in1} is ignored. +% +% \changes{v0.62}{2018/10/16}{\pkg{2in1}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackageDrop{2in1} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% % \iffalse %<*2up> % \fi @@ -32575,6 +33394,7 @@ width:\LWR@printlength{\LWR@tempwidth}% % % % +% % \iffalse %<*a4wide> % \fi @@ -33245,7 +34065,7 @@ width:\LWR@printlength{\LWR@tempwidth}% % \begin{macrocode} \renewcommand{\algocf@makecaption}[2]{% \LWR@HTML@caption@begin{algocf}% -\algocf@captiontext{#1}{#2}% +\LWR@isolate{\algocf@captiontext{#1}{#2}}% \LWR@HTML@caption@end% } % \end{macrocode} @@ -33255,19 +34075,19 @@ width:\LWR@printlength{\LWR@tempwidth}% % \begin{macrocode} \renewcommand{\algocf@makecaption@plain}[2]{% \LWR@HTML@caption@begin{algocf}% - \algocf@captiontext{#1}{#2}% + \LWR@isolate{\algocf@captiontext{#1}{#2}}% \LWR@HTML@caption@end% } \renewcommand{\algocf@makecaption@boxed}[2]{% \LWR@HTML@caption@begin{algocf}% - \algocf@captiontext{#1}{#2}% + \LWR@isolate{\algocf@captiontext{#1}{#2}}% \LWR@HTML@caption@end% } \renewcommand{\algocf@makecaption@ruled}[2]{% \LWR@HTML@caption@begin{algocf}% - \algocf@captiontext{#1}{#2}% + \LWR@isolate{\algocf@captiontext{#1}{#2}}% \LWR@HTML@caption@end% } % \end{macrocode} @@ -33279,7 +34099,7 @@ width:\LWR@printlength{\LWR@tempwidth}% \boolfalse{LWR@algocf@dopars}% lwarp \par% \addcontentsline{\csname ext@#1\endcsname}{#1}% - {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}% + {\protect\numberline{\csname the#1\endcsname}{\ignorespaces \LWR@isolate{#2}}}% \begingroup% \@parboxrestore% \if@minipage% @@ -33945,7 +34765,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% % % \begin{table}[ht] % \hrule\smallskip -% \caption{AMSthm package \Dash CSS styling of theorems and proofs} +% \caption{\pkg{amsthm} package \Dash \CSS\ styling of theorems and proofs} % \begin{description} % \item [Theorem:] \element{div} of class |amsthmbody| % \item [Theorem Name:] \element{span} of class |amsthmname| @@ -34362,7 +35182,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% % and reverts to solid rules for \SVG\ math \env{array} % and \env{tabular} in a \env{lateximage}. % -% CSS is not able to display a double-dashed border, so +% \CSS\ is not able to display a double-dashed border, so % a single-dashed rule is displayed as a single-dashed border, and % a double-dashed rule is displayed as a thicker single-dashed border. % @@ -34481,7 +35301,11 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% % \DescribePackage{asymptote} % \pkg{asymptote} is patched for use by \pkg{lwarp}. % +% \needspace{3\baselineskip} +% \limitsasymptote +% % \changes{v0.59}{2018/07/10}{\pkg{asymptote}: Added.} +% \changes{v0.62}{2018/10/16}{\pkg{asymptote}: Improved \attribute{alt} tags.} % % \codehtml % @@ -34490,12 +35314,12 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% % \end{macrocode} % % \begin{macrocode} -\BeforeBeginEnvironment{asy}{\begin{lateximage}} +\BeforeBeginEnvironment{asy}{\begin{lateximage}[(-asymptote-~\packagediagramname)]} \AfterEndEnvironment{asy}{\end{lateximage}} \xpatchcmd{\asyinclude} {\begingroup} - {\begin{lateximage}} + {\begin{lateximage}[(-asymptote-~\packagediagramname)]} {} {\LWR@patcherror{asymptote}{asyinclude-begingroup}} @@ -35113,6 +35937,48 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% % % % \iffalse +%<*bitpattern> +% \fi +% +% \part{lwarp-bitpattern.sty} +% +% \section{bitpattern} +% +% \credits{Jean-Marc Bourguet} +% +% \DescribePackage{bitpattern} +% \pkg{bitpattern} is patched for use by \pkg{lwarp}. +% +% \changes{v0.62}{2018/10/16}{\pkg{bitpattern}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{bitpattern} +% \end{macrocode} +% +% \begin{macrocode} +\xpatchcmd{\bitpattern} + {\begingroup} + {\begin{lateximage}[(-bitpattern-~\packagediagramname)]} + {} + {\LWR@patcherror{bitpattern}{bitpattern}} + +\xpatchcmd{\bp@Done} + {\endgroup} + {\end{lateximage}} + {} + {\LWR@patcherror{bitpattern}{bp@Done}} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% +% \iffalse %<*blowup> % \fi % @@ -35661,7 +36527,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% % \section{cancel} % % \DescribePackage{cancel} -% \pkg{cancel} is used as-is for SVG math, and emulated for HTML text output. +% \pkg{cancel} is used as-is for SVG math, and emulated for \HTML\ text output. % % \changes{v0.44}{2017/11/16}{\pkg{cancel}: Added.} % @@ -35695,7 +36561,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% % \begin{macrocode} \newcommand{\LWR@cancelcolor}[5]{% \ifcsempty{#2}% -{\LWR@HTMLtextstyle{#5}{#3}{#1}}% +{\InlineClass(#5){#3}{#1}}% {\LWR@htmlspanclass[#5;#4:\LWR@origpound\LWR@tempcolor]{#3}{#1}}% } % \end{macrocode} @@ -36072,7 +36938,7 @@ s% % \codehtml % % \begin{macrocode} -\LWR@ProvidesPackageDrop{changebar} +\LWR@ProvidesPackageDrop{changebar}[2018/03/09] % \end{macrocode} % % \begin{macrocode} @@ -36147,7 +37013,6 @@ s% % % % -% % \iffalse %<*chngpage> % \fi @@ -36162,13 +37027,14 @@ s% % \pkg{chngpage} is emulated. % % \changes{v0.54}{2018/04/19}{\pkg{chngpage}: Added.} +% \changes{v0.62}{2018/10/18}{\pkg{chngpage}: Fix: Loads \pkg{lwarp-chngpage}.} % % \codehtml % % Discard all options for \pkg{lwarp-chngpage}: % \begin{macrocode} \LWR@ProvidesPackageDrop{chngpage} -\LWR@origRequirePackage{changepage} +\LWR@origRequirePackage{lwarp-changepage} % \end{macrocode} % \iffalse @@ -36259,6 +37125,8 @@ s% % \DescribePackage{chemfig} % \pkg{chemfig} is patched for use by \pkg{lwarp}. % +% \limitschemfig +% % The images are not hashed because they depend on external settings which % may be changed at any time, and are unlikely to be reused inline anyhow. % @@ -37867,6 +38735,59 @@ name = \chemmacros_translate:n {scheme-name} % % % +% \iffalse +%<*CJK> +% \fi +% +% \part{lwarp-CJK.sty} +% +% \section{CJK} +% +% \DescribePackage{CJK} +% \pkg{CJK} does not work with \pkg{lwarp} unless called from \pkg{ctex}. +% +% \changes{v0.62}{2018/11/18}{\pkg{CJK}: Prevented unless \pkg{xeCJK}.} +% +% \codehtml +% \begin{macrocode} +\@ifpackageloaded{xeCJK}{}{ + \LWR@loadnever{CJK}{ctex} +} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% +% \iffalse +%<*CJKutf8> +% \fi +% +% \part{lwarp-CJKutf8.sty} +% +% \section{CJKutf8} +% +% \DescribePackage{CJKutf8} +% \pkg{CJKutf8} does not work with \pkg{lwarp} unless called from \pkg{ctex}. +% +% \changes{v0.62}{2018/11/18}{\pkg{CJK}: Prevented unless \pkg{xeCJK}.} +% +% \codehtml +% \begin{macrocode} +\@ifpackageloaded{xeCJK}{}{ + \LWR@loadnever{CJKutf8}{ctex} +} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% % % \iffalse %<*clrdblpg> @@ -37988,7 +38909,7 @@ name = \chemmacros_translate:n {scheme-name} % \cs{LWR@getmynexttoken} is not used here because \cs{columncolor} is not used % inside the data area of the tabular. % -% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and HTML outputs.} +% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and \HTML\ outputs.} % \begin{macrocode} \NewDocumentCommand{\LWR@HTML@columncolor}{O{named} m o o}{% \convertcolorspec{#1}{#2}{HTML}\LWR@columnHTMLcolor% @@ -38006,7 +38927,7 @@ name = \chemmacros_translate:n {scheme-name} % % \begin{noindmacro}{\rowcolor} \oarg{model} \marg{color} \oarg{left overhang} \oarg{right overhang} % -% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and HTML outputs.} +% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and \HTML\ outputs.} % \begin{macrocode} \NewDocumentCommand{\LWR@HTML@rowcolor}{O{named} m o o}{% \convertcolorspec{#1}{#2}{HTML}\LWR@rowHTMLcolor% @@ -38020,7 +38941,7 @@ name = \chemmacros_translate:n {scheme-name} % % \begin{noindmacro}{\cellcolor} \oarg{model} \marg{color} \oarg{left overhang} \oarg{right overhang} % -% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and HTML outputs.} +% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and \HTML\ outputs.} % \begin{macrocode} \NewDocumentCommand{\LWR@HTML@cellcolor}{O{named} m o o}{% \convertcolorspec{#1}{#2}{HTML}\LWR@cellHTMLcolor% @@ -38036,7 +38957,7 @@ name = \chemmacros_translate:n {scheme-name} % The \HTML\ version for use outside a \env{tabular}. % Inside a \env{tabular}, \cs{LWR@HTML@arrayrulecolornexttoken} is used instead. % -% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and HTML outputs.} +% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and \HTML\ outputs.} % \begin{macrocode} \newcommand{\LWR@HTML@arrayrulecolor}[2][named]{% \convertcolorspec{#1}{#2}{HTML}\LWR@ruleHTMLcolor% @@ -38050,7 +38971,7 @@ name = \chemmacros_translate:n {scheme-name} % % The \HTML\ version for use inside a \env{tabular}. % -% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and HTML outputs.} +% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and \HTML\ outputs.} % \begin{macrocode} \newcommand{\LWR@HTML@arrayrulecolornexttoken}[2][named]{% \convertcolorspec{#1}{#2}{HTML}\LWR@ruleHTMLcolor% @@ -38210,6 +39131,44 @@ name = \chemmacros_translate:n {scheme-name} % % % +% \iffalse +%<*ctex> +% \fi +% +% \part{lwarp-ctex.sty} +% +% \section{ctex} +% +% \DescribePackage{ctex} +% Error if \pkg{ctex} is loaded after \pkg{lwarp}. +% +% Load \pkg{ctex} before \pkg{lwarp} so that \pkg{lwarp} +% can take control of the sectioning commands. +% The \pkg{ctex} \optn{heading} option is then ignored. +% +% Ref: \url{http://bbs.ctex.org/forum.php?mod=viewthread&tid=155890} +% +% +% \changes{v0.62}{2018/11/17}{\pkg{ctex}: Added.} +% +% Discard all options for \pkg{lwarp-ctex}: +% +% \codehtml +% \begin{macrocode} +\LWR@ProvidesPackageDrop{ctex}[2018-05-02] +% \end{macrocode} + +% \begin{macrocode} +\LWR@loadbefore{ctex} +% \end{macrocode} + +% \iffalse +% +% \fi +% +% +% +% % % \iffalse %<*cuted> @@ -38709,7 +39668,7 @@ name = \chemmacros_translate:n {scheme-name} \normalfont\scriptsize{\bfseries{\thetodos.#1}}% }% }% -\addcontentsline{lod}{todos}{\protect{\thetodos. }#2}% +\addcontentsline{lod}{todos}{\protect{\thetodos. }\LWR@isolate{#2}}% }{}% } % \end{macrocode} @@ -39085,7 +40044,7 @@ name = \chemmacros_translate:n {scheme-name} % \DescribePackage{epigraph} % \pkg{epigraph} is emulated. % -% \changes{v0.42}{2017/10/27}{\pkg{epigraph}: If \progcode{FormatWP} add HTML styles.} +% \changes{v0.42}{2017/10/27}{\pkg{epigraph}: If \progcode{FormatWP} add \HTML\ styles.} % % \codehtml @@ -39595,7 +40554,7 @@ name = \chemmacros_translate:n {scheme-name} % \limitsverbatimfootnotes % % \changes{v0.34}{2017/07/27}{\pkg{fancybox}: Added.} -% \changes{v0.42}{2017/10/27}{\pkg{fancybox}: If \progcode{FormatWP} add HTML styles.} +% \changes{v0.42}{2017/10/27}{\pkg{fancybox}: If \progcode{FormatWP} add \HTML\ styles.} % \changes{v0.52}{2018/03/29}{\pkg{fancyvrb}: Initial support for \cs{VerbatimFootnotes}.} % % \begin{macrocode} @@ -39718,7 +40677,7 @@ name = \chemmacros_translate:n {scheme-name} % \begin{macrocode} \renewcommand{\GenericCaption}[1]{% \LWR@figcaption% -#1% +\LWR@isolate{#1}% \endLWR@figcaption% } % \end{macrocode} @@ -40318,7 +41277,7 @@ solid \LWR@origpound\LWR@tempcolor ; % div class="fancyvrblabel" % extra space style="color: \LWR@origpound\LWR@tempcolor"% } - \LWR@origtextrm{\FV@LabelBegin}% \textrm preserves emdash + \LWR@print@textrm{\FV@LabelBegin}% \textrm preserves emdash \LWR@htmltagc{/div} \fi \else @@ -40331,7 +41290,7 @@ solid \LWR@origpound\LWR@tempcolor ; % div class="fancyvrblabel" % extra space style="color: \LWR@origpound\LWR@tempcolor"% } - \LWR@origtextrm{\FV@LabelEnd} + \LWR@print@textrm{\FV@LabelEnd} \LWR@htmltagc{/div} \fi \fi @@ -40659,6 +41618,38 @@ solid \LWR@origpound\LWR@tempcolor ; % % % % \iffalse +%<*flippdf> +% \fi +% +% \part{lwarp-flippdf.sty} +% +% \section{flippdf} +% +% \DescribePackage{flippdf} +% \pkg{flippdf} is ignored. +% +% \changes{v0.62}{2018/10/18}{\pkg{flippdf}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackageDrop{flippdf}[2006/06/30] +% \end{macrocode} +% +% \begin{macrocode} +\newcommand\FlipPDF{} +\newcommand\UnFlipPDF{} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% +% +% \iffalse %<*float> % \fi @@ -42304,7 +43295,7 @@ solid \LWR@origpound\LWR@tempcolor ; % } % \end{macrocode} % Inside a \env{lateximage}, allow \PDF\ instead of \SVG: -% \changes{v0.61}{2018/10/06}{Fix: EPS for \DVI\ \LaTeX.} +% \changes{v0.61}{2018/10/06}{Fix: \EPS\ for \DVI\ \LaTeX.} % \begin{macrocode} \ifpdf \appto\LWR@restoreorigformatting{% @@ -42481,7 +43472,7 @@ solid \LWR@origpound\LWR@tempcolor ; % % \end{macrocode} -% \subsection{Printing HTML styles} +% \subsection{Printing \HTML\ styles} % \begin{macro}{\LWR@rotstyle} \marg{prefix} \marg{degrees} % @@ -42541,7 +43532,7 @@ solid \LWR@origpound\LWR@tempcolor ; % % \begin{macro}{\LWR@HTML@Gin@setfile} \marg{w} \marg{h} \marg{filename} -% Sets the parsed filename for \HTML output. +% Sets the parsed filename for \HTML\ output. % \begin{macrocode} \newcommand*{\LWR@HTML@Gin@setfile}[3]{% \xdef\LWR@parsedfilename{#3}% @@ -42681,25 +43672,27 @@ solid \LWR@origpound\LWR@tempcolor ; % % If formatting for a word processor, find and set the actual image size, % without rotation, using \PDF\ instead of \SVG\ to find the original bounding box: % \changes{v0.42}{2017/10/24}{If \progcode{FormatWP}, use explicit size.} -% \changes{v0.61}{2018/10/06}{Fix: EPS for \DVI\ \LaTeX.} +% \changes{v0.61}{2018/10/06}{Fix: \EPS\ for \DVI\ \LaTeX.} +% \changes{v0.62}{2018/10/27}{Fix: \bool{FormatWP}.} % \begin{macrocode} \ifbool{FormatWP}{% \begingroup% - \ifpdf + \LWR@restoreorigformatting% + \ifpdf% \appto\LWR@restoreorigformatting{% \DeclareGraphicsExtensions{.pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG}% - } + }% \else% \ifpdf - \ifXeTeX + \ifXeTeX% \appto\LWR@restoreorigformatting{% \DeclareGraphicsExtensions{.pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG}% - } - \else + }% + \else% \appto\LWR@restoreorigformatting{% \DeclareGraphicsExtensions{.eps,.EPS,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG}% - } - \fi - \fi + }% + \fi% + \fi% \ifpdf \define@key{Gin}{angle}{}% \IfBooleanTF{#1}% {% starred @@ -42735,7 +43728,7 @@ solid \LWR@origpound\LWR@tempcolor ; % \global\renewcommand*{\LWR@igwidthstyle}{width:\LWR@printlength{\LWR@igwidth}}% \settoheight{\LWR@igheight}{\usebox{\LWR@imagesizebox}}% \global\renewcommand*{\LWR@igheightstyle}{height:\LWR@printlength{\LWR@igheight}}% -}{}% +}{}% FormatWP % \end{macrocode} % % Create the \HTML\ reference with the graphicspath, filename, extension, @@ -42750,7 +43743,12 @@ solid \LWR@origpound\LWR@tempcolor ; % \LWR@traceinfo{LWR@includegraphicsb: about to LWR@htmltag}% \LWR@htmltag{% start of image tags img src="% -\begingroup\@sanitize\LWR@parsedfilename\endgroup% +% \end{macrocode} +% \changes{v0.62}{2018/10/27}{Fix: Filename expansion.} +% \begin{macrocode} +\detokenize\expandafter{\LWR@parsedfilename}% +% \end{macrocode} +% \begin{macrocode} " \LWR@orignewline% % \end{macrocode} % Only include a style tag if a width, height, angle, or scale was given: @@ -42763,30 +43761,38 @@ img src="% \NOT\equal{\LWR@igxscale}{1} \OR \NOT\equal{\LWR@igyscale}{1} }% -{\LWR@origtilde{} style="% -\ifthenelse{\NOT\equal{\LWR@igwidthstyle}{}}% -{\LWR@igwidthstyle;}{}% -\ifthenelse{\NOT\equal{\LWR@igheightstyle}{}}% -{\LWR@igheightstyle;}{}% -\ifthenelse{\NOT\equal{\LWR@igorigin}{}}% -{\LWR@origtilde{} transform-origin: \LWR@originnames{\LWR@igorigin}; \LWR@orignewline}{}% -\ifthenelse{\NOT\equal{\LWR@igangle}{}}% {% -\LWR@rotstyle{-ms-}{\LWR@igangle} % extra space -\LWR@rotstyle{-webkit-}{\LWR@igangle} % extra space -\LWR@rotstyle{}{\LWR@igangle % -}}{}% -\ifthenelse{\NOT\equal{\LWR@igxscale}{1}\OR% -\NOT\equal{\LWR@igyscale}{1}}% -{\LWR@scalestyle{-ms-}{\LWR@igxscale}{\LWR@igyscale} % extra space -\LWR@scalestyle{-webkit-}{\LWR@igxscale}{\LWR@igyscale} % extra space -\LWR@scalestyle{}{\LWR@igxscale}{\LWR@igyscale}}{} % extra space -% -\ifthenelse{\NOT\equal{\LWR@opacity}{1}}% -{opacity:\LWR@opacity; }% -{}% -% -" \LWR@orignewline}{}% + \LWR@origtilde{} style="% + \ifthenelse{\NOT\equal{\LWR@igwidthstyle}{}}% + {\LWR@igwidthstyle; }{}% + \ifthenelse{\NOT\equal{\LWR@igheightstyle}{}}% + {\LWR@igheightstyle; }{}% + \ifthenelse{\NOT\equal{\LWR@igorigin}{}}% + {% + \LWR@origtilde{} transform-origin: \LWR@originnames{\LWR@igorigin}; % + \LWR@orignewline% + }{}% + \ifthenelse{\NOT\equal{\LWR@igangle}{}}% + {% + \LWR@rotstyle{-ms-}{\LWR@igangle} % extra space + \LWR@rotstyle{-webkit-}{\LWR@igangle} % extra space + \LWR@rotstyle{}{\LWR@igangle }% + }{}% + \ifthenelse{% + \NOT\equal{\LWR@igxscale}{1}\OR% + \NOT\equal{\LWR@igyscale}{1}% + }% + {% + \LWR@scalestyle{-ms-}{\LWR@igxscale}{\LWR@igyscale} % extra space + \LWR@scalestyle{-webkit-}{\LWR@igxscale}{\LWR@igyscale} % extra space + \LWR@scalestyle{}{\LWR@igxscale}{\LWR@igyscale}% + }{} % extra space + % + \ifthenelse{\NOT\equal{\LWR@opacity}{1}}% + {opacity:\LWR@opacity; }{}% + % + " \LWR@orignewline% +}{}% % \end{macrocode} % Set the class: % \begin{macrocode} @@ -44701,7 +45707,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}% % \end{macrocode} -% \changes{v0.42}{2017/10/26}{\pkg{keyfloat}: If \progcode{FormatWP} add explicit HTML style.} +% \changes{v0.42}{2017/10/26}{\pkg{keyfloat}: If \progcode{FormatWP} add explicit \HTML\ style.} % \begin{macrocode} \DeclareDocumentEnvironment{KFLT@marginfloat}{O{-1.2ex} m} {% @@ -45370,7 +46376,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}% \LWR@traceinfo{addcontents lst@@caption: -\lst@@caption-}% \addcontentsline{lol}{lstlisting}% {\protect\numberline{\thelstlisting}% -{\protect\ignorespaces \lst@@caption \protect\relax}}% +{\protect\ignorespaces \LWR@isolate{\lst@@caption} \protect\relax}}% \fi \fi \fi @@ -46235,7 +47241,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}% % \limitsmdframed % % Environments created or encapsulated by \pkg{mdframed} are enclosed in a -% \margintag{CSS classes} +% \margintag{\CSS\ classes} % \element{div} of class |md|, or |mdframed| otherwise. % % Frame titles are placed into a \element{span} of class |mdframedtitle|. @@ -46303,7 +47309,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}% % \subsection{Initial setup} % % ^^A \DescribeMacro{\mdfsetup} -% To handle CSS and paragraphs, +% To handle \CSS\ and paragraphs, % patch code at start and end of environment and contents. % \cs{LWR@print@raggedright} helps avoid hyphenation. % @@ -46319,7 +47325,7 @@ endinnercode={\LWR@stoppars}, % \end{macrocode} % % -% \subsection{Color and length HTML conversion} +% \subsection{Color and length \HTML\ conversion} % % \begin{noindmacro}{\LWR@mdfprintcolor} \marg{mdfcolorkey} % @@ -47413,7 +48419,7 @@ background: % \begin{macrocode} \NewDocumentEnvironment{multicols}{s m o} % \end{macrocode} -% HTML \element{div} class to contain everything: +% \HTML\ \element{div} class to contain everything: % \begin{macrocode} { \LWR@forcenewpage @@ -47687,6 +48693,119 @@ class="td% % % % \iffalse +%<*musicography> +% \fi +% +% \part{lwarp-musicography.sty} +% +% \section{musicography} +% +% \credits{Andrew A. Cashner} +% +% \DescribePackage{musicography} +% \pkg{musicography} is patched for use by \pkg{lwarp}. +% +% Images are used for the meter symbols, since the +% \HTML\ fonts tend not to be the correct size. +% The \HTML\ \attribute{alt} tag copies |C| and |3/2|, etc. +% Hashes are used for the meter images, which are then reused +% as necessary. +% +% Note that browser support for musical symbols may be buggy. +% \watchout +% Copy/paste into a text editor works well. +% +% \changes{v0.62}{2017/11/12}{\pkg{musicography}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{musicography}[2018/05/21] +% \end{macrocode} +% +% \begin{macrocode} +\RenewDocumentCommand{\musSymbol}{ O{\musFont} m m m m }{% +\begin{lateximage}% +{#1\kern#2\raisebox{#3}{#5}\kern#4}% +\end{lateximage}% +} + +\RenewDocumentCommand{\musStemmedNote}{ m }{% +\begin{lateximage}% +\musSymbol{0.05em}{0.5ex}{0.2em}{#1\musStem}% +\end{lateximage}% +} + +\RenewDocumentCommand{\musFlaggedNote}{ m m }{% +\begin{lateximage}% +\musSymbol{0.05em}{0.5ex}{0pt}{#1\musStem}% +\musSymbol{0pt}{0pt}{0.9em}{#2}% +\end{lateximage}% +} + +\RenewDocumentCommand{\musDottedNote}{ m }{% +\begin{lateximage}% +#1\musDot% +\end{lateximage}% +} + +\RenewDocumentCommand{\musMeter}{ m m }{% +\begin{lateximage}*[#1/#2][#1#2]% +\musStack{#1}{#2}\kern0.05em% +\end{lateximage}% +} + +\RenewDocumentCommand{\meterCplus}{ m }{% +\begin{lateximage}*[C#1]% + \meterC{}\kern-0.7pt#1% +\end{lateximage}% +} + +\RenewDocumentCommand{\meterC}{}{% +\begin{lateximage}*[C]% +\musSymbolMeter{\symbol{83}}% +\end{lateximage}% +} + +\RenewDocumentCommand{\meterCutC}{}{% +\begin{lateximage}*[C|]% +\musSymbolMeter{\symbol{82}}% +\end{lateximage}% +} + +\RenewDocumentCommand{\meterCThreeTwo}{}{% +\begin{lateximage}*[C3/2]% +\meterCplus{\musStack{3}{2}}% +\end{lateximage}% +} + +\RenewDocumentCommand{\musFlat} {}{\HTMLunicode{266D}} +\RenewDocumentCommand{\musDoubleFlat} {}{\HTMLunicode{1D12B}} +\RenewDocumentCommand{\musSharp} {}{\HTMLunicode{266F}} +\RenewDocumentCommand{\musDoubleSharp}{}{\HTMLunicode{1D12A}} +\RenewDocumentCommand{\musNatural} {}{\HTMLunicode{266E}} + +\RenewDocumentCommand{\musWhole}{}{\HTMLunicode{1D15D}} +\RenewDocumentCommand{\musHalf}{}{\HTMLunicode{1D15E}} +\RenewDocumentCommand{\musQuarter}{}{\HTMLunicode{1D15F}} +\RenewDocumentCommand{\musEighth}{}{\HTMLunicode{1D160}} +\RenewDocumentCommand{\musSixteenth}{}{\HTMLunicode{1D161}} + +\RenewDocumentCommand{\musWholeDotted}{}{\HTMLunicode{1D15D}\HTMLunicode{1D16D}} +\RenewDocumentCommand{\musHalfDotted}{}{\HTMLunicode{1D15E}\HTMLunicode{1D16D}} +\RenewDocumentCommand{\musQuarterDotted}{}{\HTMLunicode{1D15F}\HTMLunicode{1D16D}} +\RenewDocumentCommand{\musEighthDotted}{}{\HTMLunicode{1D160}\HTMLunicode{1D16D}} +\RenewDocumentCommand{\musSixteenthDotted}{}{\HTMLunicode{1D161}\HTMLunicode{1D16D}} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% +% \iffalse %<*nameref> % \fi @@ -47986,6 +49105,8 @@ class="td% % \pkg{nicefrac} is patched for use by \pkg{lwarp}. % % \changes{v0.52}{2018/03/25}{\pkg{nicefrac}: Added.} +% \changes{v0.62}{2018/11/15}{\pkg{nicefrac}: Improved font control and \CSS, +% honors \optn{nice}, \optn{ugly}.} % % \codehtml % @@ -47993,23 +49114,40 @@ class="td% \LWR@ProvidesPackagePass{nicefrac}[1998/08/04] % \end{macrocode} % -% \pkg{nicefrac} uses \TeX\ boxes, so \cs{@ensuredmath} must be restored temporarily: % \begin{macrocode} -\LetLtxMacro\LWR@origUnitsNiceFrac\@UnitsNiceFrac +\DeclareRobustCommand*{\LWR@HTML@@UnitsNiceFrac}[3][]{% + {% localize font selection + #1{% + \LWR@textcurrentfont{% + \InlineClass{numerator}{#2}% + /% + \InlineClass{denominator}{#3}% + }% + }% + }% +} -\DeclareRobustCommand*{\@UnitsNiceFrac}[3][]{% -\begingroup% -\LetLtxMacro\@ensuredmath\LWR@origensuredmath% -\LWR@origUnitsNiceFrac[#1]{#2}{#3}% -\endgroup% +\LWR@formatted{@UnitsNiceFrac} + +\DeclareRobustCommand*{\LWR@HTML@@UnitsUglyFrac}[3][]{% + {% localize font selection + #1{\LWR@textcurrentfont{#2/#3}}% + }% } + +\LWR@formatted{@UnitsUglyFrac} % \end{macrocode} % % For Mathjax: % \begin{macrocode} \CustomizeMathJax{\newcommand{\nicefrac}[3][]{#2/#3}} % \end{macrocode} - +% +% ^^A For Ka\TeX: +% ^^A % \begin{macrocode} +% ^^A \CustomizeKaTeX{\gdef\nicefrac[#1]#2#3{#2/#3}} +% ^^A % \end{macrocode} +% % \iffalse % % \fi @@ -48106,6 +49244,52 @@ class="td% % % % +% \iffalse +%<*notespages> +% \fi +% +% \part{lwarp-notespages.sty} +% +% \section{notespages} +% +% \DescribePackage{notespages} +% \pkg{notespages} is ignored. +% +% \changes{v0.62}{2018/11/11}{\pkg{notespages}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackageDrop{notespages} +% \end{macrocode} +% +% \begin{macrocode} +\newcommand*{\npnotesname}{} +\newcommand*{\npnotestext}{} +\newcommand*{\remainingtextheight}{} +\newdimen\remainingtextheight +\newcommand*{\notestitletext}{} +\newcommand*{\notesareatext}{} +\newcommand*{\npnpinfo}[1]{} +\newcommand*{\tracingnpmarks}{} +\newcommand*{\notespage}[1][]{} +\newcommand*{\notespages}[1][]{} +\newcommand*{\notesfill}[1][]{} +\newcommand*{\setnotespages}[1]{} +\newcommand*{\definenotesoption}[2]{} +\newcommand{\definenotesstyle}[2]{} +\newcommand{\definetitlestyle}[2]{} +\newcommand{\nppatchchapter}[1]{} +\newcommand{\npunpatchchapter}{} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% % % % \iffalse @@ -48179,7 +49363,7 @@ class="td% % \begin{table}[ht] % \hrule % \smallskip -% \caption{Ntheorem package \Dash CSS styling of theorems and proofs}\unskip +% \caption{Ntheorem package \Dash \CSS\ styling of theorems and proofs}\unskip % \begin{description} % \item [Theorem:] \element{div} of class |theorembody| % \item [Theorem Header:] \element{span} of class |theoremheader