From 9fa6bc6b0478d325973d23f44e070f49c771ab0c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 4 Dec 2018 23:10:56 +0000 Subject: lwarp (4dec18) git-svn-id: svn://tug.org/texlive/trunk@49318 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/lwarp/lwarp.dtx | 3363 ++++++++++++------------ Master/texmf-dist/source/latex/lwarp/lwarp.ins | 20 +- 2 files changed, 1738 insertions(+), 1645 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 1ec9b71052e..5ee422e42a3 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/11/19 v0.62 Allows LaTeX to directly produce HTML5 output.] +% [2018/12/03 v0.63 Allows LaTeX to directly produce HTML5 output.] % %<*driver> \documentclass{ltxdoc} @@ -196,6 +196,7 @@ \newcommand{\thinbrspace}{\hspace{.16667em}\penalty\exhyphenpenalty\hspace{0pt}} \newrobustcmd{\Dash}{\unskip\thinspace\textemdash\thinbrspace} \newrobustcmd{\dash}{\unskip\thinspace\mbox{--}\thinbrspace} +\newrobustcmd{\Slash}{\unskip\thinspace/\thinbrspace} \newcommand{\ItemDescribeMacro}[1]{% @@ -356,7 +357,9 @@ Keywords={LaTeX, HTML, conversion}% \newcommand{\spslash}{\unskip\kern.085em/\hspace{.085em}\penalty\exhyphenpenalty\hspace{0pt}} \makeatletter -\newcommand*{\rulebreak}{\bigskip\hfill\rule[.7ex]{.3\linewidth}{.4pt}\hspace*{\fill}\bigskip\@afterheading} +\newcommand*{\rulebreak}{% + \bigskip\hfill\rule[.7ex]{.3\linewidth}{.4pt}\hspace*{\fill}\bigskip\@afterheading% +} \makeatother \newcommand{\DescribeDefault}[1]{\margintag{\footnotesize \textgreen{Default: \texttt{#1}}}} @@ -2218,11 +2221,17 @@ only one font selection may be made at a time. \margintag{theoremtitlefont} in braces in the \pkg{mdframed} source. -Footnotes are currently placed at the bottom of the \HTML\ page. -\margintag{footnotes} - \optn{userdefinedwidth} and \optn{align} are currently ignored. \margintag{ignored options} + +Environments created or encapsulated by \pkg{mdframed} are enclosed in a +\margintag{\CSS\ classes} +\element{div} of class \attribute{mdframed}, and also +class \attribute{md} for new environments. + +Frame titles are placed in a \element{div} of class |mdframedtitle|. +Subtitles are in a \element{div} of class |mdframedsubtitle|, +and likewise for subsubtitles. } \newcommand{\limitscaption}{% @@ -2552,7 +2561,7 @@ This boolean may be tested by the user for later use. %<*package> % \fi % -% \CheckSum{26573} +% \CheckSum{26829} % % \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 @@ -2657,6 +2666,7 @@ This boolean may be tested by the user for later use. % \changes{v0.60}{2018/09/19}{\ 2018/09/19} % \changes{v0.61}{2018/10/13}{\ 2018/10/13} % \changes{v0.62}{2018/11/19}{\ 2018/11/19} +% \changes{v0.63}{2018/12/03}{\ 2018/12/03} @@ -2856,7 +2866,36 @@ 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}. +% \item[v0.63:] \pkg{mdframed}, Chinese, Japanese, Korean +% \begin{itemize} +% \item Added \cs{linkhomename}: A user-definable name for the \UI{Home} link. +% \margintag{localization} +% \item Documented \cs{sidetocname}: A user-definable name for the side\TOC. +% \item Fix: \cs{LinkHome} for print output. +% \margintag{fixes} +% \item Moved package load checks to the \pkg{lwarp} core +% \margintag{optimizations} +% to reduce the number of \filenm{lwarp-*} files. +% \item \pkg{mdframed}: Fix with \pkg{amsthm}, improved titles and font control. +% \margintag{packages} +% Improved rule widths. +% \item Fixes for \pkg{xeCJK}. +% \margintag{Chinese} +% \item Added \pkg{xpinyin}, \pkg{zhlineskip}. +% \item Verified to work with \pkg{cjkpunct}, \pkg{upzhkinsoku}, \pkg{zhspacing}. +% \item Verified to work with \pkg{zxjatype}, \pkg{luatexja}, \pkg{luatexja-fontspec}. +% \margintag{Japanese} +% \item Added \pkg{bxjsarticle} and related classes. +% \item Added \pkg{ltjsarticle} and related classes. +% \item Added p\LaTeX, up\LaTeX, \pkg{ujarticle} and related classes. +% \item Prevented \pkg{utarticle} and related classes. +% \item Prevented \pkg{bxcjkatype}. +% \item Verified to work with \pkg{kotex}, \pkg{xetexko}, \pkg{luatexko}. +% \margintag{Korean} +% \end{itemize} +% +% \needspace{2\baselineskip} +% \item[v0.62:] MiK\TeX\ docs, \HTML\ title, C\TeX, \pkg{xeCJK}, \pkg{bitpattern}. % \begin{itemize} % \item Docs: Setting a \UTF-8 locale. See \cref{sec:utf8locale}. % \margintag{docs} @@ -2878,6 +2917,9 @@ This boolean may be tested by the user for later use. % \item Fixes for \cs{includgraphics} filename, and with \bool{FormatWP}. % \item Fix: \CSS\ for \cs{textup}. % \item Fix: Added \cs{slshape}. +% \item Added \pkg{ctex} package and related classes, \pkg{xeCJK}. +% \margintag{Chinese} +% \item Prevented \pkg{CJK}, \pkg{CJKutf8} unless \pkg{xeCJK}, \pkg{ctex} are used. % \item \pkg{chemfig}: Docs for new macro \cs{polymerdelim}. % \margintag{packages} % \item \pkg{asymptote}: Docs for compilation. @@ -2890,8 +2932,6 @@ This boolean may be tested by the user for later use. % \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}. @@ -4177,21 +4217,39 @@ This boolean may be tested by the user for later use. % % \midrule % -% Engines: & \DVI\ \LaTeX, pdf\LaTeX, \XeLaTeX, \LuaLaTeX \\ +% Engines: & \DVI\ \LaTeX, pdf\LaTeX, \XeLaTeX, \LuaLaTeX, p\LaTeX, up\LaTeX \\ % % 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}, C\TeX-related. \\ +% \pkg{scrartcl}, \pkg{scrbook}, \pkg{scrreprt}, \pkg{memoir}, C\TeX-related, +% \pkg{bxjsarticle} and related, \pkg{ltjsarticle} and relatex, +% \pkg{ujarticle} and 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 +% +% Languages: & \pkg{babel}, \pkg{polyglossia}. +% \pkg{cjkpunct}, \pkg{xeCJK}.\\ +% +% Chinese: & C\TeX, \pkg{ctex}, +% \pkg{upzhkinsoku}, +% \pkg{xpinyin}, \pkg{zhlineskip}, \pkg{zhspacing}. \\ +% +% Japanese: & p\LaTeX, up\LaTeX, +% \pkg{bxjsarticle} and related, +% \pkg{ltjsarticle} and related, +% \pkg{luatexja}, \pkg{luatexja-fontspec}, +% \pkg{ujarticle} and related, +% \pkg{zxjatype}. \\ +% +% Korean: & \pkg{kotex}, \pkg{luatexko}, \pkg{xetexko}. \\ % % \midrule % @@ -5912,6 +5970,7 @@ This boolean may be tested by the user for later use. % \begin{table} % \caption{\pkg{lwarp} package options\label{tab:options}} % \centering +% \renewcommand{\arraystretch}{1.2} % \begin{tabular}{>{\ttfamily}lp{3.25in}} % Option & Description \\ \midrule % mathsvg & Show math using \SVG\ images. \\ @@ -6257,11 +6316,16 @@ This boolean may be tested by the user for later use. % \label{tab:htmlsettings} % \begin{tabular}{>{\ttfamily}lp{3in}} % \toprule -% Option & Description \\ \midrule +% Macro \Slash Cntr \Slash Bool & Description \\ \midrule +% \cs{linkhomename} & Name of the link to the homepage. \\ +% \midrule % SideTOCDepth & Sectioning depth of the side\TOC. \\ +% \cs{sidetocname} & Name of the side\TOC. \\ +% \midrule % FileDepth & Sectioning depth of the file splits. \\ % CombineHigherDepths & Combine higher section levels. \\ % FileSectionNames & Use section names for file names, else use numbers. \\ +% \midrule % FootnoteDepth & Sectioning depth of footnotes. \\ % \midrule % \cs{abstractname} & The name of the abstract. \\ @@ -6360,6 +6424,10 @@ This boolean may be tested by the user for later use. % % \begin{description} % +% \ItemDescribeMacro{\linkhomename} \DescribeDefault{Home} +% Name of the link to the home page. Paragraphs are allowed. +% \changes{v0.63}{2018/11/29}{Docs: \cs{linkhomename}.} +% % \ItemDescribeCounter{tocdepth} Sectioning depth of the table of contents. % See \cref{sec:stackdepths} for a list of \LaTeX{} stack depths. % @@ -6394,6 +6462,10 @@ This boolean may be tested by the user for later use. % \trouble{HTML>inaccessible pages} % \trouble{sectioning>missing} % +% \ItemDescribeMacro{\sidetocname} \DescribeDefault{Contents} +% Name of the side\TOC. Paragraphs are allowed. +% \changes{v0.63}{2018/11/29}{Docs: \cs{sidetocname}.} +% % \ItemDescribeCounter{FileDepth} \DescribeDefault{-5} % Sectioning depth of file splits. % Defaults to -5, causing the entire \HTML\ website to be one single file. @@ -6459,12 +6531,6 @@ 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. @@ -9862,6 +9928,7 @@ This boolean may be tested by the user for later use. % % Detects \XeTeX{} and \LuaLaTeX: % \gindex{Xe\LaTeX>detection}\gindex{Lua\LaTeX>detection} +% % \begin{macrocode} \RequirePackage{iftex} \newif\ifxetexorluatex @@ -9882,155 +9949,11 @@ This boolean may be tested by the user for later use. \RequirePackage{ifpdf} % \end{macrocode} % -% -% \section{MD5 hashing} -% -% The MD5 hash is used for \env{lateximage} filenames for \SVG\ math. -% -% \begin{macrocode} -\newcommand{\LWR@mdfive}[1]{% -\PackageError{lwarp} -{No MD5 macro was found.} -{Lwarp must find the macros pdfmdfivesum or mdfivesum.} -} - -\ifPDFTeX% pdflatex or dvi latex -\let\LWR@mdfive\pdfmdfivesum -\fi - -\ifLuaTeX -\RequirePackage{pdftexcmds} -\let\LWR@mdfive\pdf@mdfivesum -\fi - -\ifXeTeX -\@ifundefined{pdffivesum}{} - {\let\LWR@mdfive\pdfmdfivesum} -\@ifundefined{mdfivesum}{} - {\let\LWR@mdfive\mdfivesum} -\fi -% \end{macrocode} -% -% -% \section{pdf\LaTeX\ T1 and \acro{UTF}-8 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 \acro{UTF}-8 by nature. -% -% \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} -\ifPDFTeX% pdflatex or dvi latex -\RequirePackage[T1]{fontenc} - -\@ifpackageloaded{inputenc}{}{ - \@ifpackageloaded{inputenx}{}{ - \RequirePackage[utf8]{inputenc} - } -} -\fi -% \end{macrocode} -% -% -% -% \section{Unicode input characters} -% \changes{v0.18}{2016/05/17}{PDF Unicode input characters.} -% \gindex{Unicode>input characters} -% -% \codeall -% -% If using \prog{pdflatex}, convert a minimal set of Unicode characters. -% Additional characters may be defined by the user, as needed. -% -% A commonly-used multiply symbol is declared to be \cs{texttimes}. -% -% The first arguments of \cs{newunicodechar} below are text ligatures in -% the source code, even though they are not printed in the following -% listing. -% \begin{macrocode} -\RequirePackage{newunicodechar} - -\newunicodechar{⨯}{\texttimes} - -\ifPDFTeX% pdflatex or dvi latex -\newunicodechar{ff}{ff}% the first arguments are ligatures -\newunicodechar{fi}{fi} -\newunicodechar{fl}{fl} -\newunicodechar{ffi}{ffi} -\newunicodechar{ffl}{ffl} -\newunicodechar{—}{---} -\newunicodechar{–}{--} -% \end{macrocode} -% In PDF\TeX, preserve upright quotes in verbatim text. -% \pkg{upquote} also loads \pkg{textcomp}. -% \begin{macrocode} -\RequirePackage{upquote} -\else -\fi -% \end{macrocode} -% -% -% -% \section{Miscellaneous tools} -% -% -% \begin{macro}{\LWR@providelength} \marg{\cs{lengthname}} -% Provides the length if it isn't defined yet. -% -% Used to provide source compatibility for lengths which will be ignored, -% but might or might not be already provided by other packages. -% -% \changes{v0.46}{2018/01/23}{Added.} -% \begin{macrocode} -\newcommand*\LWR@providelength[1]{% - \ifdeflength{#1}{}{\newlength{#1}}% -} -% \end{macrocode} -% \end{macro} -% -% -% Prints a length in the given units, without printing the unit itself. -% \begin{macro}{\LWR@convertto} \marg{dest unit} \marg{length} -% \begin{macrocode} -\newcommand*{\LWR@convertto}[2]{\strip@pt\dimexpr #2*65536/\number\dimexpr 1#1} -% \end{macrocode} -% \end{macro} - - -% \begin{macro}{\LWR@patcherror} \marg{packagename} \marg{macroname} -% -% Prints an error if could not patch a macro. -% \begin{macrocode} -\newcommand*{\LWR@patcherror}[2]{% -\PackageError{lwarp} -{Unable to patch package #1, macro #2} -{Please contact the author of the lwarp package.} -} -% \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.} +% \changes{v0.63}{2018/11/25}{Added p\TeX support.} % % \begin{macrocode} -\@ifpackageloaded{ctexpatch}{ - \newcommand{\LWR@isolate}[1]{\null#1\null}% -}{ - \newcommand{\LWR@isolate}[1]{#1}% -} +\RequirePackage{ifptex} % \end{macrocode} -% \end{macro} % % % @@ -10059,340 +9982,1170 @@ This boolean may be tested by the user for later use. % % % \DescribePackage{letltxmacro} -% Used to redefine \cs{textbf} and friends. % % \begin{macrocode} \RequirePackage{letltxmacro} % \end{macrocode} % - - - -% \section{Operating-System portability} -% \label{sec:OSportability} -% \changes{v0.11}{2016/03/11}{Added section: Operating-System portability.} -% -% \osportabilityusage -% -% % -% \subsection{Literal characters} -% -% Literal characters to be used in \optn{PrintLatexCmd} and \optn{HTMLLatexCmd}. -% These are defined without |@| to easily allow their inclusion in the user's document. % -% The literal |%| character: -% \begin{macrocode} -\let\LWRpercent\@percentchar -% \end{macrocode} +% \section{Package load order} % +% \changes{v0.21}{2017/02/22}{Add: Errors for misplaced packages.} % -% The literal |$| character: -% \begin{macrocode} -\catcode`\$=12 -\def\LWRdollar{$} -\catcode`\$=3 -% \end{macrocode} % +% Several packages must never be used with \pkg{lwarp}, +% others should only be loaded before \pkg{lwarp}, +% and others should only be loaded after. +% The \pkg{lwarp} core checks most of these cases. +% In some \filenm{lwarp-*} packages, \cs{LWR@loadbefore} is used to trigger an error +% if they are loaded after \pkg{lwarp}, while additional code provides necessary +% patches for when they are loaded before. % -% The literal |&| character: -% \begin{macrocode} -\catcode`\&=12 -\def\LWRamp{&} -\catcode`\&=4 -% \end{macrocode} +% Packages which must be loaded after \pkg{lwarp} are enfoced by +% a large number of \cs{LWR@loadafter} statements, below. +% Some packages are emulated by \pkg{memoir}, and so these are tested by +% \cs{LWR@notmemoirloadafter}, which does not cause an error if \pkg{memoir} is used. % +% \cs{LWR@checkloadfilename} is used to check each filename to see if +% it must never be loaded, or must always be loaded before \pkg{lwarp}. % -% The literal |\| character. -% The ampersand is temporarily set to the escape character during the -% definition of the backslash macro. -% \begin{macrocode} -\catcode`\&=0 -&catcode`&\=12 -&def&LWRbackslash{\} -&catcode`&\=0 -\catcode`\&=4 -% \end{macrocode} % +% \subsection{Tests of package load order} % -% The literal |#| character: -% \begin{macrocode} -\catcode`\#=12 -\def\LWRhash{#} -\catcode`\#=6 -% \end{macrocode} +% \begin{macro}{\LWR@loadafter} \marg{packagename} \quad +% Error if this package was loaded before \pkg{lwarp}. % +% \label{sec:loadafter} % -% \begin{macro}{\LWRopquote} -% The operating system's quote mark, \brand{Unix} default. -% For \brand{Windows}, see \cs{LWR@setOSWindows}, below. % \begin{macrocode} -\def\LWRopquote{'} +\newcommand*{\LWR@loadafter}[1]{% +\@ifpackageloaded{#1} +{ +\PackageError{lwarp} +{Package #1, or one which uses #1, must be loaded after lwarp} +{Move \detokenize{\usepackage}{#1} after \detokenize{\usepackage}{lwarp}. +Package #1 may also be loaded by something else, which must also be moved +after lwarp.} +} +{} +} % \end{macrocode} % \end{macro} + + +% \begin{macro}{\LWR@notmemoirloadafter} \marg{packagename} \quad +% Error if not \pkg{memoir} class and this package was loaded before \pkg{lwarp}. % +% \pkg{memoir} emulates many packages, and pretends that they have already been loaded. % -% \begin{macro}{\LWRopseq} -% The operating system's sequential execution command, \brand{Unix} default. -% For \brand{Windows}, see \cs{LWR@setOSWindows}, below. -% \changes{v0.61}{2018/10/06}{Added spaces.} +% \changes{v0.45}{2017/12/03}{Added.} % \begin{macrocode} -\def\LWRopseq{\space\LWRamp\LWRamp\space\space} +\@ifclassloaded{memoir} +{\newcommand*{\LWR@notmemoirloadafter}[1]{}} +{\LetLtxMacro\LWR@notmemoirloadafter\LWR@loadafter} % \end{macrocode} % \end{macro} + + +% \begin{macro}{\LWR@notbxjsloadafter} \marg{packagename} \quad +% Error if not a \pkg{bxjs*} class and this package was loaded before \pkg{lwarp}. % -% -% \subsection{Common portability code} -% -% \DescribeBoolean{usingOSWindows} Set if the \optn{OSWindows} option is used, -% or if \brand{Windows} is automatically detected. +% \changes{v0.63}{2018/11/24}{Added.} % \begin{macrocode} -\newbool{usingOSWindows} -\boolfalse{usingOSWindows} -% \end{macrocode} +\LetLtxMacro\LWR@notbxjsloadafter\LWR@loadafter +\@ifclassloaded{bxjsarticle}{\renewcommand*{\LWR@notbxjsloadafter}[1]{}}{} +\@ifclassloaded{bxjsbook}{\renewcommand*{\LWR@notbxjsloadafter}[1]{}}{} +\@ifclassloaded{bxjsreport}{\renewcommand*{\LWR@notbxjsloadafter}[1]{}}{} +\@ifclassloaded{bxjsslide}{\renewcommand*{\LWR@notbxjsloadafter}[1]{}}{} +% \end{macrocode} +% \end{macro} -% \subsection{\brand{Unix}, \brand{Linux}, and \brand{Mac\,OS}} -% \begin{macro}{\OSPathSymbol} -% Symbol used to separate directories in a path. +% \begin{macro}{\LWR@notltjsloadafter} \marg{packagename} \quad +% Error if not a \pkg{ltjs*} class and this package was loaded before \pkg{lwarp}. +% +% \changes{v0.63}{2018/11/24}{Added.} % \begin{macrocode} -\newcommand*{\OSPathSymbol}{/} +\LetLtxMacro\LWR@notltjsloadafter\LWR@loadafter + +\@ifclassloaded{ltjsarticle}{\renewcommand*{\LWR@notltjsloadafter}[1]{}}{} +\@ifclassloaded{ltjsbook}{\renewcommand*{\LWR@notltjsloadafter}[1]{}}{} +\@ifclassloaded{ltjsreport}{\renewcommand*{\LWR@notltjsloadafter}[1]{}}{} +\@ifclassloaded{ltjspf}{\renewcommand*{\LWR@notltjsloadafter}[1]{}}{} +\@ifclassloaded{ltjsiyou}{\renewcommand*{\LWR@notltjsloadafter}[1]{}}{} % \end{macrocode} % \end{macro} -% \subsection{\brand{MS-Windows}} - -% For \brand{MS-Windows}: -% -% \begin{macro}{\LWR@setOSWindows} -% Set defaults for the \brand{MS-Windows} operating system. -% \pkg{lwarp} attempts to auto-detect the operatings system, -% and the \optn{OSWindows} option may also be used to force -% \brand{MS-Windows} compatibility. +% \begin{macro}{\LWR@loadbefore} \marg{packagename} \quad +% Error if this package is loaded after \pkg{lwarp}. % -% \changes{v0.20}{2016/12/19}{Auto-detects operating system.} +% \changes{v0.33}{2017/07/06}{Fix: No \cs{PackageError} if already loaded.} % % \begin{macrocode} -\newcommand*{\LWR@setOSWindows} +\newcommand*{\LWR@loadbefore}[1]{% +\@ifpackageloaded{#1} +{} { -\booltrue{usingOSWindows} -\renewcommand*{\OSPathSymbol}{\@backslashchar} -\def\LWRopquote{"} -\def\LWRopseq{\space\LWRamp\space\space} +\PackageError{lwarp} +{Package #1 must be loaded before lwarp} +{Move \detokenize{\usepackage}{#1} before \detokenize{\usepackage}{lwarp}.} +} } % \end{macrocode} % \end{macro} -% -% Test for windows during compile. The user may also specify -% \optn{OSWindows} package option in case this test fails. -% \begin{macrocode} -\ifwindows -\LWR@setOSWindows -\fi -% \end{macrocode} - - - +% \begin{macro}{\LWR@checkloadbefore} +% \marg{thispackagename} \marg{packagename} % -% \section{Package options} -% \label{sec:handlingpackageoptions} +% If package names match, error if it is loaded after \pkg{lwarp}. % +% \changes{v0.63}{2018/12/02}{Added.} % - - -% \DescribePackage{kvoptions} -% Allows key/value package options. -% \begin{macrocode} -\RequirePackage{kvoptions} -\SetupKeyvalOptions{family=LWR,prefix=LWR@} -% \end{macrocode} - - -% \begin{macro}{\lwarpsetup} -% A user interface to set the keys: -% \changes{v0.61}{2018/09/21}{Added.} % \begin{macrocode} -\newcommand{\lwarpsetup}[1]{\setkeys{LWR}{#1}} +\newcommand*{\LWR@checkloadbefore}[2]{% + \edef\LWR@tempone{#1}% + \ifdefstring{\LWR@tempone}{#2}{% + \LWR@loadbefore{#1}% + }{}% +} % \end{macrocode} % \end{macro} -% \DescribeBoolean{warpingprint} -% \DescribeBoolean{warpingHTML} -% \DescribeBoolean{mathjax} -% \DescribeBoolean{LWR@origmathjax} -% ^^A \DescribeBoolean{mathKaTeX} +% \begin{macro}{\LWR@loadnever} \marg{badpackagename} \marg{replacementpkgnames} % -% Set to true/false depending on the package option selections for -% print/\HTML/\EPUB\ output and mathsvg/mathjax. +% The first packages is not supported, so tell the user to use the second instead. +% +% \changes{v0.25}{2017/03/16}{Added the ability to prevent conflicting packages.} % -% \optn{LWR@origmathjax} remembers the original setting to be restored -% by \cs{displaymathnormal}. % \begin{macrocode} -\newbool{warpingprint} -\newbool{warpingHTML} -\newbool{mathjax} -\newbool{LWR@origmathjax} +\newcommand*{\LWR@loadnever}[2]{% +\PackageError{lwarp} +{Package #1 is not supported by lwarp's HTML conversion. +Package(s) #2 may be useful instead} +{Package #1 might conflict with lwarp in some way, +or is superceded by another package. +For a possible alternative, see package(s) #2.} +} % \end{macrocode} -% ^^A % \begin{macrocode} -% ^^A \newbool{mathKaTeX} -% ^^A % \end{macrocode} +% \end{macro} % % -% The default is print output, -% \margintag{defaults} -% and \SVG\ math if the user chose \HTML\ output. +% \begin{macro}{\LWR@checkloadnever} +% \marg{thispackagename} \marg{badpackagename} \marg{replacementpkgnames} +% +% If this package name is the bad packagename, suggest the replacements instead. +% +% \changes{v0.63}{2018/12/01}{Added.} +% % \begin{macrocode} -\booltrue{warpingprint}% -\boolfalse{warpingHTML}% -\boolfalse{mathjax}% +\newcommand*{\LWR@checkloadnever}[3]{% + \edef\LWR@tempone{#1}% + \ifdefstring{\LWR@tempone}{#2}{% + \LWR@loadnever{#2}{#3}% + }{}% +} % \end{macrocode} +% \end{macro} % % +% \begin{macro}{\LWR@earlyloadnever} \marg{badpackagename} \marg{replacementpkgname} % -% \DescribeOption{warpprint} -% If the \optn{warpprint} option is given, -% boolean |warpingprint| is true and boolean |warpingHTML| is false, -% and may be used for \cs{ifbool} tests. +% The first package is not supported, so tell the user to use the second instead. +% This version checks immediately for packages which may have been loaded before \pkg{lwarp}. % +% \changes{v0.54}{2018/04/06}{Added.} % % \begin{macrocode} -\DeclareVoidOption{warpprint}{% -\PackageInfo{lwarp}{Using option 'warpprint'} -\booltrue{warpingprint}% -\boolfalse{warpingHTML}% +\newcommand*{\LWR@earlyloadnever}[2]{% +\@ifpackageloaded{#1}{% +\PackageError{lwarp} +{Package #1 is not supported by lwarp's HTML conversion. +Package(s) #2 may be useful instead} +{Package #1 might conflict with lwarp in some way, +or is superceded by another package. +For a possible alternative, see package(s) #2.} +}{}% } % \end{macrocode} - -% \DescribeOption{warpHTML} -% Anything in the |warpHTML| environment will be generated for \HTML\ output only. +% \end{macro} % -% \DescribeOption{warpHTML} -% If the \optn{warpHTML} option is given, -% boolean |warpingHTML| is true and boolean |warpingprint| is false, -% and may be used for \cs{ifbool} tests. +% +% \begin{macro}{\LWR@earlyclassloadnever} \marg{badclassname} \marg{replacementclassname} +% +% The first class is not supported, so tell the user to use the second instead. +% This version checks immediately for classes which may have been loaded before \pkg{lwarp}. +% +% \changes{v0.63}{2018/11/25}{Added.} % % \begin{macrocode} -\DeclareVoidOption{warpHTML}{% -\PackageInfo{lwarp}{Using option 'warpHTML'}% -\booltrue{warpingHTML}% -\boolfalse{warpingprint}% +\newcommand*{\LWR@earlyclassloadnever}[2]{% +\@ifclassloaded{#1}{% +\PackageError{lwarp} +{Class #1 is not supported by lwarp's HTML conversion. +Class(es) #2 may be useful instead} +{Class #1 might conflict with lwarp in some way, +or is superceded by another class. +For a possible alternative, see class(es) #2.} +}{}% } % \end{macrocode} +% \end{macro} % % +% \subsection{Error for disallowed packages and classes loaded before lwarp} +% \changes{v0.54}{2018/04/06}{Added early check for disallowed packages.} +% \changes{v0.54}{2018/09/26}{Never load \pkg{aecompl}.} +% \changes{v0.62}{2018/11/18}{Added early checks for \pkg{CJK}, \pkg{CJKutf8}.} +% \changes{v0.63}{2018/11/25}{\pkg{utarticle}, etc.: Not allowed.} % - - -% -% \changes{v0.19}{2016/05/25}{Options: mathsvg and mathjax} -% \DescribeOption{mathsvg} -% Option \optn{mathsvg} selects \SVG\ math display: -% \gindex{math>\optn{mathsvg} option} -% \gindex{SVG>\optn{mathsvg} option} -% If the \optn{mathsvg} option is given, boolean |mathjax| is false, -% and may be used for \cs{ifbool} tests. +% \pkg{ujarticle} and related are supported by \pkg{lwarp}, but +% \pkg{utarticle} and related use vertical Japanese text, which is not +% read correctly by \prog{pdftotext}. These may be supported in the future if +% a way is found to undo the changes used for vertical text. % \begin{macrocode} -\DeclareVoidOption{mathsvg}{% -\PackageInfo{lwarp}{Using option 'mathsvg'} -\boolfalse{mathjax}% -\boolfalse{LWR@origmathjax}% +\LWR@earlyclassloadnever{utarticle}{ujarticle} +\LWR@earlyclassloadnever{utbook}{ujbook} +\LWR@earlyclassloadnever{utreport}{ujreport} % \end{macrocode} -% ^^A % \begin{macrocode} -% ^^A \boolfalse{mathKaTeX}% -% ^^A % \end{macrocode} % \begin{macrocode} -} +\LWR@earlyloadnever{ae}{cm-super, lmodern} +\LWR@earlyloadnever{aecompl}{cm-super, lmodern} +\LWR@earlyloadnever{aecc}{cm-super, lmodern} +\LWR@earlyloadnever{boxedminipage}{boxedminipage2e} +\LWR@earlyloadnever{caption2}{caption} +% \LWR@earlyloadnever{ccaption}{caption}% might be preloaded by memoir % \end{macrocode} -% -% \DescribeOption{mathjax} -% Option \optn{mathjax} selects \brand{MathJax} math display: -% \gindex{math>\optn{mathjax} option} -% \gindex{MathJax=\brand{MathJax}>mathjax=\optn{mathjax} option} -% If the \optn{mathjax} option is given, boolean |mathjax| is true, may be used for \cs{ifbool} tests. +% The older \pkg{CJK} and \pkg{CJKutf8} only work with \pkg{xeCJK}: % \begin{macrocode} -\DeclareVoidOption{mathjax}{% -\PackageInfo{lwarp}{Using option 'mathjax'} -\booltrue{mathjax}% -\booltrue{LWR@origmathjax}% +\@ifpackageloaded{xeCJK}{}{ + \LWR@earlyloadnever{CJK}{ctex, xeCJK} + \LWR@earlyloadnever{CJKutf8}{ctex, xeCJK} +} % \end{macrocode} -% ^^A % \begin{macrocode} -% ^^A \boolfalse{mathKaTeX}% -% ^^A % \end{macrocode} +% \pkg{bxcjkatype} is based on \pkg{CJK}: % \begin{macrocode} -} +\LWR@earlyloadnever{bxcjkjatype}{pLaTeX, upLaTeX, bxjsarticle, ujarticle} % \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} -% Option \optn{BaseJobname} sets the \cs{BaseJobname} for this document. -% -% This is the \cs{jobname} of the printed version, even if currently -% compiling the \HTML\ version. -% I.e. this is the \cs{jobname} without |_html| appended. -% This is used to set \cs{HomeHTMLFilename} if the user did not provide one. +% \pkg{hangul} is not in TeXLive, and is not tested: % \begin{macrocode} -\DeclareStringOption[\jobname]{BaseJobname} +\LWR@earlyloadnever{hangul}{kotex, xetexko, luatexko} % \end{macrocode} - - -% \DescribeOption{makeindexStyle} Selects a custom |.ist| file. -% The default is |lwarp.ist|. -% A customized file should be based on |lwarp.ist|, and must retain -% the lines related to \cs{hyperindexref}. -% -% \changes{v0.58}{2018/06/21}{Added option \optn{makeindexStyle.}} -% +% Others: % \begin{macrocode} -\DeclareStringOption[lwarp.ist]{makeindexStyle} +\LWR@earlyloadnever{fancyheadings}{fancyhdr} +\LWR@earlyloadnever{glossary}{glossaries} +\LWR@earlyloadnever{t1enc}{fontenc, inputenc, inputenx} +\LWR@earlyloadnever{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol} % \end{macrocode} - - -% \DescribeOption{xindyStyle} Selects a custom |.xdy| file. -% The default is |lwarp.xdy|. -% A customized file should be based on |lwarp.xdy|, and must retain -% the line -% \begin{Verbatim}[gobble=2] -% (markup-locref :open "\hyperindexref{" :close "}") -% \end{Verbatim} % -% \changes{v0.30}{2017/04/28}{Option \optn{xdyFilename} added.} -% \changes{v0.54}{2018/04/06}{Option \optn{xdyFilename} changed to \optn{xindyStyle.}} % -% \begin{macrocode} -\DeclareStringOption[lwarp.xdy]{xindyStyle} -% \end{macrocode} - - -% \DescribeOption{xindyLanguage} Sets the \pkg{xindy} language to be assigned -% in \prog{lwarpmk}'s configuration files. This is then used by \prog{lwarpmk} while -% processing the index and glossary. +% \subsection{Enforcing package loading after \pkg{lwarp}} % -% \changes{v0.29}{2017/04/15}{Add: \optn{lwarpmklang} option for \pkg{lwarp}.} -% \changes{v0.30}{2017/04/28}{Option \optn{lwarpmklang} changed to \optn{IndexLanguage}.} -% \changes{v0.54}{2018/04/06}{Option \optn{IndexLanguage} changed to \optn{xindyLanguage}.} +% Packages which should only be loaded after \pkg{lwarp} are tested +% here to trip an error of they have already been loaded. +% +% \changes{v0.25}{2017/03/16}{Fix: Allows XE\LaTeX\ and +% \LuaLaTeX\ to preload graphics and graphicx.} +% \changes{v0.45}{2017/12/03}{Allows \pkg{memoir}'s preloaded packages.} +% \changes{v0.58}{2018/06/21}{Fix: \pkg{memoir} and \pkg{ccaption}.} +% +% The following packages must be loaded after \pkg{lwarp}: +% ^^A *loadafter +% \begin{macrocode} +\LWR@loadafter{2in1} +\LWR@loadafter{2up} +\LWR@loadafter{a4} +\LWR@loadafter{a4wide} +\LWR@loadafter{a5comb} +\LWR@notmemoirloadafter{abstract} +\LWR@loadafter{accsupp} +\LWR@loadafter{acro} +\LWR@loadafter{acronym} +\LWR@loadafter{adjmulticol} +\LWR@loadafter{addlines} +\LWR@loadafter{ae} +\LWR@loadafter{aecc} +\LWR@loadafter{afterpage} +\LWR@loadafter{algorithm2e} +\LWR@loadafter{algorithmicx} +\LWR@loadafter{alltt} +\LWR@loadafter{amsmath} +\LWR@loadafter{amsthm} +\LWR@loadafter{anonchap} +\LWR@loadafter{anysize} +\LWR@notmemoirloadafter{appendix} +\LWR@loadafter{arabicfront} +\LWR@notmemoirloadafter{array} +\LWR@loadafter{arydshln} +\LWR@loadafter{asymptote} +% \LWR@loadafter{atbegshi}% used by morewrites +\LWR@loadafter{attachfile} +\LWR@loadafter{attachfile2} +\LWR@loadafter{authblk} +\LWR@loadafter{axessibility} +\LWR@loadafter{axodraw2} +\LWR@loadafter{backref} +\LWR@loadafter{balance} +\LWR@loadafter{bigdelim} +\LWR@loadafter{bigstrut} +\LWR@loadafter{bitpattern} +\LWR@loadafter{blowup} +\LWR@loadafter{booklet} +\LWR@loadafter{bookmark} +\LWR@notmemoirloadafter{booktabs} +\LWR@loadafter{bophook} +\LWR@loadafter{boxedminipage} +\LWR@loadafter{boxedminipage2e} +\LWR@loadafter{breakurl} +\LWR@loadafter{breqn} +\LWR@loadafter{bxpapersize} +\LWR@loadafter{bytefield} +\LWR@loadafter{cancel} +\LWR@loadafter{canoniclayout} +\LWR@loadafter{caption} +\LWR@loadafter{caption2} +\LWR@loadafter{cases} +% \LWR@loadafter{ccaption}% may be preloaded by memoir +\LWR@loadafter{changebar} +\LWR@notmemoirloadafter{changepage} +\LWR@notmemoirloadafter{chngpage} +\LWR@loadafter{chappg} +\LWR@loadafter{chapterbib} +\LWR@loadafter{chemfig} +\LWR@loadafter{chemformula} +\LWR@loadafter{chemgreek} +\LWR@loadafter{chemmacros} +\LWR@loadafter{chemnum} +\LWR@loadafter{chkfloat} +\LWR@loadafter{cite} +\LWR@loadafter{cmdtrack} +\LWR@loadafter{color} +\LWR@loadafter{colortbl} +\LWR@loadafter{continue} +\LWR@loadafter{copyrightbox} +\LWR@notmemoirloadafter{crop} +% ctex must be loaded before lwarp +\LWR@loadafter{cuted} +\LWR@loadafter{cutwin} +\LWR@loadafter{dblfloatfix} +\LWR@loadafter{dblfnote} +\LWR@notmemoirloadafter{dcolumn} +\LWR@loadafter{diagbox} +\LWR@loadafter{dprogress} +\LWR@loadafter{draftcopy} +\LWR@loadafter{draftfigure} +\LWR@loadafter{draftwatermark} +\LWR@loadafter{easy-todo} +\LWR@loadafter{ebook} +\LWR@loadafter{ellipsis} +\LWR@loadafter{emptypage} +\LWR@loadafter{endfloat} +\LWR@loadafter{endheads} +\LWR@loadafter{endnotes} +\LWR@notmemoirloadafter{enumerate} +\LWR@loadafter{enumitem} +\LWR@notmemoirloadafter{epigraph} +\LWR@loadafter{epsfig} +\LWR@loadafter{epstopdf} +\LWR@loadafter{epstopdf-base} +\LWR@loadafter{errata} +\LWR@loadafter{eso-pic} +\LWR@loadafter{everypage} +\LWR@loadafter{everyshi} +\LWR@loadafter{extramarks} +\LWR@loadafter{fancybox} +\LWR@loadafter{fancyhdr} +\LWR@loadafter{fancyheadings} +\LWR@loadafter{fancyref} +\LWR@loadafter{fancytabs} +\LWR@loadafter{fancyvrb} +\LWR@loadafter{figcaps} +\LWR@loadafter{figsize} +\LWR@loadafter{fix2col} +\LWR@loadafter{fixme} +\LWR@loadafter{fixmetodonotes} +\LWR@loadafter{flafter} +\LWR@loadafter{flippdf} +\LWR@loadafter{float} +\LWR@loadafter{floatflt} +\LWR@loadafter{floatpag} +\LWR@loadafter{floatrow} +\LWR@loadafter{fltrace} +\LWR@loadafter{flushend} +\LWR@loadafter{fnbreak} +\LWR@loadafter{fncychap} +\LWR@loadafter{fnlineno} +\LWR@loadafter{fnpos} +% fontenc must be loaded before lwarp +% fontspec must be loaded before lwarp +\LWR@loadafter{footmisc} +\LWR@loadafter{footnote} +\LWR@loadafter{footnotehyper} +\LWR@loadafter{footnpag} +\LWR@loadafter{forest} +\LWR@loadafter{framed} +\LWR@loadafter{ftnright} +\LWR@loadafter{fullminipage} +\LWR@loadafter{fullpage} +\LWR@loadafter{fullwidth} +\LWR@loadafter{fwlw} +\LWR@notbxjsloadafter{geometry} +\LWR@loadafter{glossaries} +% \LWR@loadafter{graphics}% pre-loaded by xunicode +% \LWR@loadafter{graphicx}% pre-loaded by xunicode +\LWR@loadafter{glossary} +\LWR@loadafter{grffile} +\LWR@loadafter{grid} +\LWR@loadafter{grid-system} +\LWR@loadafter{gridset} +\LWR@loadafter{hang} +\LWR@loadafter{hanging} +\LWR@loadafter{hypcap} +\LWR@loadafter{hypdestopt} +\LWR@loadafter{hypernat} +\LWR@loadafter{hyperref} +\LWR@loadafter{hyperxmp} +\LWR@loadafter{hyphenat} +\LWR@loadafter{idxlayout} +\LWR@loadafter{ifoddpage} +\LWR@loadafter{imakeidx} +\LWR@loadafter{indentfirst} +\LWR@notmemoirloadafter{index} +% inputenc must be loaded before lwarp +% inputenx must be loaded before lwarp +\LWR@loadafter{intopdf} +\LWR@loadafter{keyfloat} +\LWR@loadafter{layaureo} +\LWR@loadafter{layout} +\LWR@loadafter{leading} +\LWR@loadafter{letterspace} +\LWR@loadafter{lettrine} +\LWR@loadafter{lineno} +\LWR@loadafter{lips} +\LWR@loadafter{listings} +\LWR@loadafter{longtable} +\LWR@loadafter{lscape} +\LWR@loadafter{ltablex} +\LWR@loadafter{ltcaption} +\LWR@loadafter{ltxgrid} +\LWR@loadafter{ltxtable} +\LWR@loadafter{lua-check-hyphen} +\LWR@loadafter{lua-visual-debug} +\LWR@loadafter{luacolor} +\LWR@loadafter{luatodonotes} +\LWR@loadafter{magaz} +\LWR@notmemoirloadafter{makeidx} +\LWR@loadafter{marginfit} +\LWR@loadafter{marginfix} +\LWR@loadafter{marginnote} +\LWR@loadafter{mcaption} +\LWR@loadafter{mdframed} +\LWR@loadafter{memhfixc} +\LWR@loadafter{metalogo} +\LWR@loadafter{mhchem} +\LWR@loadafter{microtype} +\LWR@loadafter{midfloat} +\LWR@loadafter{midpage} +\LWR@loadafter{morefloats} +\LWR@notmemoirloadafter{moreverb} +% morewrites must be loaded before lwarp +\LWR@notmemoirloadafter{mparhack} +%\LWR@loadafter{multicol}% loaded by ltxdoc +\LWR@loadafter{multirow} +\LWR@loadafter{multitoc} +\LWR@loadafter{musicography} +\LWR@loadafter{nameref} +\LWR@loadafter{natbib} +\LWR@notmemoirloadafter{nccfancyhdr} +\LWR@notmemoirloadafter{needspace} +% newclude must be loaded before lwarp +\LWR@loadafter{newtxmath} +% newunicodechar must be loaded before lwarp +\LWR@notmemoirloadafter{nextpage} +\LWR@loadafter{nicefrac} +\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} +\LWR@loadafter{pagesel} +\LWR@loadafter{paralist} +\LWR@loadafter{parnotes} +\LWR@notmemoirloadafter{parskip} +\LWR@loadafter{pbox} +\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} +\LWR@loadafter{pfnote} +\LWR@loadafter{phfqit} +\LWR@loadafter{placeins} +\LWR@loadafter{prelim2e} +\LWR@loadafter{prettyref} +\LWR@loadafter{preview} +\LWR@loadafter{psfrag} +\LWR@loadafter{psfragx} +\LWR@loadafter{pst-eps} +\LWR@loadafter{pstool} +\LWR@loadafter{pstricks} +\LWR@loadafter{quotchap} +\LWR@loadafter{quoting} +\LWR@loadafter{ragged2e} +\LWR@loadafter{realscripts} +\LWR@loadafter{refcheck} +\LWR@loadafter{register} +\LWR@loadafter{relsize} +\LWR@loadafter{repeatindex} +\LWR@loadafter{resizegather} +\LWR@loadafter{romanbar} +\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} +\LWR@loadafter{scrextend} +\LWR@loadafter{scrhack} +\LWR@loadafter{scrlayer} +\LWR@loadafter{scrlayer-notecolumn} +\LWR@loadafter{scrlayer-scrpage} +\LWR@loadafter{section} +\LWR@loadafter{sectionbreak} +\LWR@loadafter{sectsty} +\LWR@loadafter{semantic-markup} +\LWR@notmemoirloadafter{setspace} +\LWR@loadafter{shadow} +\LWR@notmemoirloadafter{showidx} +\LWR@loadafter{showkeys} +\LWR@loadafter{sidecap} +\LWR@loadafter{sidenotes} +\LWR@loadafter{SIunits} +\LWR@loadafter{siunitx} +\LWR@loadafter{soul} +\LWR@loadafter{soulpos} +\LWR@loadafter{soulutf8} +\LWR@loadafter{splitidx} +\LWR@loadafter{srcltx} +\LWR@loadafter{srctex} +\LWR@loadafter{stabular} +\LWR@notltjsloadafter{stfloats} +\LWR@loadafter{subfig} +\LWR@loadafter{subfigure} +\LWR@loadafter{supertabular} +\LWR@loadafter{t1inc} +\LWR@loadafter{tabls} +\LWR@notmemoirloadafter{tabularx} +\LWR@loadafter{tabulary} +\LWR@loadafter{textarea} +% \LWR@loadafter{textcomp}% maybe before lwarp with font packages +\LWR@loadafter{textfit} +\LWR@loadafter{textpos} +\LWR@loadafter{theorem} +\LWR@loadafter{thinsp} +\LWR@loadafter{threadcol} +\LWR@loadafter{threeparttable} +\LWR@loadafter{thumb} +\LWR@loadafter{thumbs} +\LWR@loadafter{tikz} +\LWR@loadafter{titleps} +\LWR@loadafter{titlesec} +\LWR@loadafter{titletoc} +\LWR@notmemoirloadafter{titling} +% \LWR@loadafter{tocbasic}% preloaded by koma-script classes +\LWR@notmemoirloadafter{tocbibind} +\LWR@loadafter{tocenter} +\LWR@notmemoirloadafter{tocloft} +\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}% preloaded by ctexart and related classes +\LWR@loadafter{underscore} +\LWR@loadafter{units} +\LWR@loadafter{unitsdef} +\LWR@loadafter{upref} +\LWR@loadafter{url} +\LWR@loadafter{uspace} +\LWR@loadafter{varioref}% no lwarp package provided +\LWR@notmemoirloadafter{verse} +\LWR@loadafter{vertbars} +\LWR@loadafter{vmargin} +\LWR@loadafter{vowel} +\LWR@loadafter{vpe} +\LWR@loadafter{vwcol} +\LWR@loadafter{wallpaper} +\LWR@loadafter{wasysym} +\LWR@loadafter{watermark} +\LWR@loadafter{widows-and-orphans} +\LWR@loadafter{wrapfig} +\LWR@loadafter{xbmks} +\LWR@loadafter{xcolor} +\LWR@loadafter{xechangebar} +\LWR@loadafter{xellipsis} +% xetexko-vertical must be loaded before lwarp +\LWR@loadafter{xfrac} +\LWR@loadafter{xltabular} +\LWR@loadafter{xltxtra} +\LWR@loadafter{xmpincl} +\LWR@loadafter{xpiano} +\LWR@loadafter{xpinyin} +\LWR@loadafter{xtab} +% xunicode must be loaded before lwarp +\LWR@loadafter{xurl} +\LWR@loadafter{xy} +\LWR@loadafter{zwpagelayout} +% \end{macrocode} +% +% +% +% +% +% \section{MD5 hashing} +% +% The MD5 hash is used for \env{lateximage} filenames for \SVG\ math. +% +% \begin{macrocode} +\newcommand{\LWR@mdfive}[1]{% +\PackageError{lwarp} +{No MD5 macro was found.} +{Lwarp must find the macros pdfmdfivesum or mdfivesum.} +} +% \end{macrocode} +% +% The default for pdf\LaTeX, \DVI\LaTeX, up\LaTeX, etc: +% \changes{v0.63}{2018/11/30}{Fix: Default \cs{LWR@mdfive}.} +% \begin{macrocode} +\let\LWR@mdfive\pdfmdfivesum +% \end{macrocode} +% +% For \LuaLaTeX: +% \begin{macrocode} +\ifLuaTeX +\RequirePackage{pdftexcmds} +\let\LWR@mdfive\pdf@mdfivesum +\fi +% \end{macrocode} +% +% For \XeLaTeX: +% \begin{macrocode} +\ifXeTeX +\@ifundefined{pdffivesum}{} + {\let\LWR@mdfive\pdfmdfivesum} +\@ifundefined{mdfivesum}{} + {\let\LWR@mdfive\mdfivesum} +\fi +% \end{macrocode} +% +% +% \section{pdf\LaTeX\ T1 and \acro{UTF}-8 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 \acro{UTF}-8 by nature. +% +% \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.} +% \changes{v0.63}{2018/11/25}{p\TeX: Encoding.} +% +% \begin{macro}{\LWR@pdfencoding} +% Sets \optn{T1}, and also \optn{utf8} if not already set. +% \begin{macrocode} +\newcommand*{\LWR@pdfencoding}{% + \RequirePackage[T1]{fontenc} + + \@ifpackageloaded{inputenc}{}{ + \@ifpackageloaded{inputenx}{}{ + \RequirePackage[utf8]{inputenc} + } + } +} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\ifPDFTeX% pdflatex or dvi latex + \LWR@pdfencoding +\fi + +\ifpTeX + \LWR@pdfencoding +\fi +% \end{macrocode} +% +% +% +% \section{Unicode input characters} +% \changes{v0.18}{2016/05/17}{PDF Unicode input characters.} +% \gindex{Unicode>input characters} +% +% \codeall +% +% If using \prog{pdflatex}, convert a minimal set of Unicode characters. +% Additional characters may be defined by the user, as needed. +% +% A commonly-used multiply symbol is declared to be \cs{texttimes}. +% +% The first arguments of \cs{newunicodechar} below are text ligatures in +% the source code, even though they are not printed in the following +% listing. +% +% \changes{v0.63}{2018/11/25}{p\TeX: No \pkg{newunicodechar}.} +% \begin{macrocode} +\ifpTeX +\else +\RequirePackage{newunicodechar} + +\newunicodechar{⨯}{\texttimes} + +\ifPDFTeX% pdflatex or dvi latex +\newunicodechar{ff}{ff}% the first arguments are ligatures +\newunicodechar{fi}{fi} +\newunicodechar{fl}{fl} +\newunicodechar{ffi}{ffi} +\newunicodechar{ffl}{ffl} +\newunicodechar{—}{---} +\newunicodechar{–}{--} +\fi + +\fi +% \end{macrocode} +% +% +% \section{Upright quotes} +% +% In PDF\TeX, preserve upright quotes in verbatim text. +% \pkg{upquote} also loads \pkg{textcomp}. +% +% \changes{v0.63}{2018/11/25}{p\TeX: Load \pkg{upquote}.} +% \begin{macrocode} +\ifPDFTeX +\RequirePackage{upquote} +\fi + +\ifpTeX + \RequirePackage{upquote} +\fi +% \end{macrocode} +% +% +% +% \section{Miscellaneous tools} +% +% +% \begin{macro}{\LWR@providelength} \marg{\cs{lengthname}} +% Provides the length if it isn't defined yet. +% +% Used to provide source compatibility for lengths which will be ignored, +% but might or might not be already provided by other packages. +% +% \changes{v0.46}{2018/01/23}{Added.} +% \begin{macrocode} +\newcommand*\LWR@providelength[1]{% + \ifdeflength{#1}{}{\newlength{#1}}% +} +% \end{macrocode} +% \end{macro} +% +% +% Prints a length in the given units, without printing the unit itself. +% \begin{macro}{\LWR@convertto} \marg{dest unit} \marg{length} +% \begin{macrocode} +\newcommand*{\LWR@convertto}[2]{\strip@pt\dimexpr #2*65536/\number\dimexpr 1#1} +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\LWR@patcherror} \marg{packagename} \marg{macroname} +% +% Prints an error if could not patch a macro. +% \begin{macrocode} +\newcommand*{\LWR@patcherror}[2]{% +\PackageError{lwarp} +{Unable to patch package #1, macro #2} +{Please contact the author of the lwarp package.} +} +% \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.} +% \changes{v0.63}{2018/11/24}{Fix for \pkg{xeCJK}.} +% +% \begin{macrocode} +\newcommand{\LWR@isolate}[1]{#1}% + +\@ifpackageloaded{ctexpatch}{ + \renewcommand{\LWR@isolate}[1]{\null#1\null}% +}{} + +\@ifpackageloaded{xeCJK}{ + \renewcommand{\LWR@isolate}[1]{\null#1\null}% +}{} +% \end{macrocode} +% \end{macro} +% +% +% +% +% \section{Operating-System portability} +% \label{sec:OSportability} +% \changes{v0.11}{2016/03/11}{Added section: Operating-System portability.} +% +% \osportabilityusage +% +% +% +% \subsection{Literal characters} +% +% Literal characters to be used in \optn{PrintLatexCmd} and \optn{HTMLLatexCmd}. +% These are defined without |@| to easily allow their inclusion in the user's document. +% +% The literal |%| character: +% \begin{macrocode} +\let\LWRpercent\@percentchar +% \end{macrocode} +% +% +% The literal |$| character: +% \begin{macrocode} +\catcode`\$=12 +\def\LWRdollar{$} +\catcode`\$=3 +% \end{macrocode} +% +% +% The literal |&| character: +% \begin{macrocode} +\catcode`\&=12 +\def\LWRamp{&} +\catcode`\&=4 +% \end{macrocode} +% +% +% The literal |\| character. +% The ampersand is temporarily set to the escape character during the +% definition of the backslash macro. +% \begin{macrocode} +\catcode`\&=0 +&catcode`&\=12 +&def&LWRbackslash{\} +&catcode`&\=0 +\catcode`\&=4 +% \end{macrocode} +% +% +% The literal |#| character: +% \begin{macrocode} +\catcode`\#=12 +\def\LWRhash{#} +\catcode`\#=6 +% \end{macrocode} +% +% +% \begin{macro}{\LWRopquote} +% The operating system's quote mark, \brand{Unix} default. +% For \brand{Windows}, see \cs{LWR@setOSWindows}, below. +% \begin{macrocode} +\def\LWRopquote{'} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\LWRopseq} +% The operating system's sequential execution command, \brand{Unix} default. +% For \brand{Windows}, see \cs{LWR@setOSWindows}, below. +% \changes{v0.61}{2018/10/06}{Added spaces.} +% \begin{macrocode} +\def\LWRopseq{\space\LWRamp\LWRamp\space\space} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{Common portability code} +% +% \DescribeBoolean{usingOSWindows} Set if the \optn{OSWindows} option is used, +% or if \brand{Windows} is automatically detected. +% \begin{macrocode} +\newbool{usingOSWindows} +\boolfalse{usingOSWindows} +% \end{macrocode} + + +% \subsection{\brand{Unix}, \brand{Linux}, and \brand{Mac\,OS}} + +% \begin{macro}{\OSPathSymbol} +% Symbol used to separate directories in a path. +% \begin{macrocode} +\newcommand*{\OSPathSymbol}{/} +% \end{macrocode} +% \end{macro} + + +% \subsection{\brand{MS-Windows}} + +% For \brand{MS-Windows}: +% +% \begin{macro}{\LWR@setOSWindows} +% Set defaults for the \brand{MS-Windows} operating system. +% \pkg{lwarp} attempts to auto-detect the operatings system, +% and the \optn{OSWindows} option may also be used to force +% \brand{MS-Windows} compatibility. +% +% \changes{v0.20}{2016/12/19}{Auto-detects operating system.} +% +% \begin{macrocode} +\newcommand*{\LWR@setOSWindows} +{ +\booltrue{usingOSWindows} +\renewcommand*{\OSPathSymbol}{\@backslashchar} +\def\LWRopquote{"} +\def\LWRopseq{\space\LWRamp\space\space} +} +% \end{macrocode} +% \end{macro} +% +% Test for windows during compile. The user may also specify +% \optn{OSWindows} package option in case this test fails. +% \begin{macrocode} +\ifwindows +\LWR@setOSWindows +\fi +% \end{macrocode} + + + + + +% +% \section{Package options} +% \label{sec:handlingpackageoptions} +% +% + + +% \DescribePackage{kvoptions} +% Allows key/value package options. +% \begin{macrocode} +\RequirePackage{kvoptions} +\SetupKeyvalOptions{family=LWR,prefix=LWR@} +% \end{macrocode} + + +% \begin{macro}{\lwarpsetup} +% A user interface to set the keys: +% \changes{v0.61}{2018/09/21}{Added.} +% \begin{macrocode} +\newcommand{\lwarpsetup}[1]{\setkeys{LWR}{#1}} +% \end{macrocode} +% \end{macro} + + +% \DescribeBoolean{warpingprint} +% \DescribeBoolean{warpingHTML} +% \DescribeBoolean{mathjax} +% \DescribeBoolean{LWR@origmathjax} +% ^^A \DescribeBoolean{mathKaTeX} +% +% Set to true/false depending on the package option selections for +% print/\HTML/\EPUB\ output and mathsvg/mathjax. +% +% \optn{LWR@origmathjax} remembers the original setting to be restored +% by \cs{displaymathnormal}. +% \begin{macrocode} +\newbool{warpingprint} +\newbool{warpingHTML} +\newbool{mathjax} +\newbool{LWR@origmathjax} +% \end{macrocode} +% ^^A % \begin{macrocode} +% ^^A \newbool{mathKaTeX} +% ^^A % \end{macrocode} +% +% +% The default is print output, +% \margintag{defaults} +% and \SVG\ math if the user chose \HTML\ output. +% \begin{macrocode} +\booltrue{warpingprint}% +\boolfalse{warpingHTML}% +\boolfalse{mathjax}% +% \end{macrocode} +% +% +% +% \DescribeOption{warpprint} +% If the \optn{warpprint} option is given, +% boolean |warpingprint| is true and boolean |warpingHTML| is false, +% and may be used for \cs{ifbool} tests. +% +% +% \begin{macrocode} +\DeclareVoidOption{warpprint}{% +\PackageInfo{lwarp}{Using option 'warpprint'} +\booltrue{warpingprint}% +\boolfalse{warpingHTML}% +} +% \end{macrocode} + +% \DescribeOption{warpHTML} +% Anything in the |warpHTML| environment will be generated for \HTML\ output only. +% +% \DescribeOption{warpHTML} +% If the \optn{warpHTML} option is given, +% boolean |warpingHTML| is true and boolean |warpingprint| is false, +% and may be used for \cs{ifbool} tests. +% +% \begin{macrocode} +\DeclareVoidOption{warpHTML}{% +\PackageInfo{lwarp}{Using option 'warpHTML'}% +\booltrue{warpingHTML}% +\boolfalse{warpingprint}% +} +% \end{macrocode} +% +% +% + + +% +% \changes{v0.19}{2016/05/25}{Options: mathsvg and mathjax} +% \DescribeOption{mathsvg} +% Option \optn{mathsvg} selects \SVG\ math display: +% \gindex{math>\optn{mathsvg} option} +% \gindex{SVG>\optn{mathsvg} option} +% If the \optn{mathsvg} option is given, boolean |mathjax| is false, +% and may be used for \cs{ifbool} tests. +% \begin{macrocode} +\DeclareVoidOption{mathsvg}{% +\PackageInfo{lwarp}{Using option 'mathsvg'} +\boolfalse{mathjax}% +\boolfalse{LWR@origmathjax}% +% \end{macrocode} +% ^^A % \begin{macrocode} +% ^^A \boolfalse{mathKaTeX}% +% ^^A % \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} +% +% \DescribeOption{mathjax} +% Option \optn{mathjax} selects \brand{MathJax} math display: +% \gindex{math>\optn{mathjax} option} +% \gindex{MathJax=\brand{MathJax}>mathjax=\optn{mathjax} option} +% If the \optn{mathjax} option is given, boolean |mathjax| is true, may be used for \cs{ifbool} tests. +% \begin{macrocode} +\DeclareVoidOption{mathjax}{% +\PackageInfo{lwarp}{Using option 'mathjax'} +\booltrue{mathjax}% +\booltrue{LWR@origmathjax}% +% \end{macrocode} +% ^^A % \begin{macrocode} +% ^^A \boolfalse{mathKaTeX}% +% ^^A % \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} + +% ^^A \DescribeOption{mathKaTeX} +% ^^A Option \optn{mathKaTeX} selects Ka\TeX\ math display: +% ^^A \gindex{math>\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} +% Option \optn{BaseJobname} sets the \cs{BaseJobname} for this document. +% +% This is the \cs{jobname} of the printed version, even if currently +% compiling the \HTML\ version. +% I.e. this is the \cs{jobname} without |_html| appended. +% This is used to set \cs{HomeHTMLFilename} if the user did not provide one. +% \begin{macrocode} +\DeclareStringOption[\jobname]{BaseJobname} +% \end{macrocode} + + +% \DescribeOption{makeindexStyle} Selects a custom |.ist| file. +% The default is |lwarp.ist|. +% A customized file should be based on |lwarp.ist|, and must retain +% the lines related to \cs{hyperindexref}. +% +% \changes{v0.58}{2018/06/21}{Added option \optn{makeindexStyle.}} +% +% \begin{macrocode} +\DeclareStringOption[lwarp.ist]{makeindexStyle} +% \end{macrocode} + + +% \DescribeOption{xindyStyle} Selects a custom |.xdy| file. +% The default is |lwarp.xdy|. +% A customized file should be based on |lwarp.xdy|, and must retain +% the line +% \begin{Verbatim}[gobble=2] +% (markup-locref :open "\hyperindexref{" :close "}") +% \end{Verbatim} +% +% \changes{v0.30}{2017/04/28}{Option \optn{xdyFilename} added.} +% \changes{v0.54}{2018/04/06}{Option \optn{xdyFilename} changed to \optn{xindyStyle.}} +% +% \begin{macrocode} +\DeclareStringOption[lwarp.xdy]{xindyStyle} +% \end{macrocode} + + +% \DescribeOption{xindyLanguage} Sets the \pkg{xindy} language to be assigned +% in \prog{lwarpmk}'s configuration files. This is then used by \prog{lwarpmk} while +% processing the index and glossary. +% +% \changes{v0.29}{2017/04/15}{Add: \optn{lwarpmklang} option for \pkg{lwarp}.} +% \changes{v0.30}{2017/04/28}{Option \optn{lwarpmklang} changed to \optn{IndexLanguage}.} +% \changes{v0.54}{2018/04/06}{Option \optn{IndexLanguage} changed to \optn{xindyLanguage}.} % % \begin{macrocode} \DeclareStringOption[english]{xindyLanguage} @@ -10666,628 +11419,108 @@ This boolean may be tested by the user for later use. } \ifbool{LWR@xindy}{ \renewcommand{\LWR@LatexmkIndexCmd}{% - xindy - -M \LWR@xindyStyle \space - -L \LWR@xindyLanguage \space - -C \LWR@xindyCodepage% - } - }{} -}{} -% \end{macrocode} -% -% -% -% \subsection{Conditional compilation} -% -% \begin{macro}{\warpprintonly} \marg{contents} -% -% Only process the contents if producing printed output. -% \changes{v0.19}{2016/06/06}{Replaces \cs{rowprintedonly}.} -% \begin{macrocode} -\newcommand{\warpprintonly}[1]{\ifbool{warpingprint}{#1}{}} -% \end{macrocode} -% \end{macro} -% -% -% \begin{macro}{\warpHTMLonly} \marg{contents} -% -% Only process the contents if producing \HTML\ output. -% \changes{v0.19}{2016/06/06}{Added.} -% \begin{macrocode} -\newcommand{\warpHTMLonly}[1]{\ifbool{warpingHTML}{#1}{}} -% \end{macrocode} -% \end{macro} -% -% -% \DescribePackage{comment} Provides conditional code blocks. -% -% Attempts to use \pkg{versions} or \pkg{verbatim} fail in some cases, and do not -% provide much of a speed benefit even when they do work. -% -% \begin{macrocode} -\RequirePackage{comment} -% \end{macrocode} - - -% Use |comment_print.cut| for print mode, and -% |comment_html.cut| for \HTML\ mode. -% This helps \prog{latexmk} to more reliably know whether to recompile. -% -% \changes{v0.37}{2017/08/19}{\pkg{comment}: Maintains independent -% cutfiles for print, \HTML.} -% -% \begin{macrocode} -\ifbool{warpingHTML}{ -\def\DefaultCutFileName{\def\CommentCutFile{comment_html.cut}} -}{} - -\ifbool{warpingprint}{ -\def\DefaultCutFileName{\def\CommentCutFile{comment_print.cut}} -}{} -% \end{macrocode} - - -% \begin{environment}{warpall} -% Anything in the |warpall| environment will be generated for print or \HTML\ outputs. -% \begin{macrocode} -\includecomment{warpall} -% \end{macrocode} -% \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}} -{\excludecomment{warpHTML}}% -% \end{macrocode} - -% \begin{macrocode} -\ifbool{warpingprint} -{\includecomment{warpprint}} -{\excludecomment{warpprint}} -% \end{macrocode} - -% \end{environment} -% \end{environment} - - -% Optionally generate a local copy of \prog{lwarpmk}. -% Default to no. -% \begin{macrocode} -\ifbool{LWR@creatinglwarpmk} -{\includecomment{LWR@createlwarpmk}} -{\excludecomment{LWR@createlwarpmk}} -% \end{macrocode} -% -% -% -% -% -% -% -% \section{Package load order} -% -% \changes{v0.21}{2017/02/22}{Add: Errors for misplaced packages.} - - -% Several packages should only be loaded before \pkg{lwarp}, and -% most others should only be loaded after. -% -% Packages which should only be loaded before \pkg{lwarp} have their own -% \begin{sourcedisplay} -% |lwarp-.sty| -% \end{sourcedisplay} -% which use \cs{LWR@loadbefore} to trigger an error if they are loaded after -% \pkg{lwarp}. -% Examples include \pkg{fontspec}, \pkg{inputenc}, \pkg{inputenx}, \pkg{fontenc}, -% and \pkg{newunicodechar}. -% -% Most packages should be loaded after \pkg{lwarp}. This is enfoced by -% a large number of \cs{LWR@loadafter} statements, below. -% -% Some packages are emulated by \pkg{memoir}, and so these are tested by -% \cs{LWR@notmemoirloadafter}, which does not cause an error if \pkg{memoir} is used. -% -% -% \subsection{Tests of package load order} -% -% \begin{macro}{\LWR@loadafter} \marg{packagename} \quad -% Error if this package was loaded before \pkg{lwarp}. -% -% \label{sec:loadafter} -% -% \begin{macrocode} -\newcommand*{\LWR@loadafter}[1]{% -\@ifpackageloaded{#1} -{ -\PackageError{lwarp} -{Package #1, or one which uses #1, must be loaded after lwarp} -{Move \detokenize{\usepackage}{#1} after \detokenize{\usepackage}{lwarp}. -Package #1 may also be loaded by something else, which must also be moved -after lwarp.} -} -{} -} -% \end{macrocode} -% \end{macro} - -% \begin{macro}{\LWR@notmemoirloadafter} \marg{packagename} \quad -% Error if not \pkg{memoir} class and this package was loaded before \pkg{lwarp}. -% -% \pkg{memoir} emulates many packages, and pretends that they have already been loaded. -% -% \changes{v0.45}{2017/12/03}{Added.} -% \begin{macrocode} -\@ifclassloaded{memoir} -{\newcommand*{\LWR@notmemoirloadafter}[1]{}} -{\LetLtxMacro\LWR@notmemoirloadafter\LWR@loadafter} -% \end{macrocode} -% \end{macro} - - -% \begin{macro}{\LWR@loadbefore} \marg{packagename} \quad -% Error if this package is loaded after \pkg{lwarp}. -% -% \changes{v0.33}{2017/07/06}{Fix: No \cs{PackageError} if already loaded.} -% -% \begin{macrocode} -\newcommand*{\LWR@loadbefore}[1]{% -\@ifpackageloaded{#1} -{} -{ -\PackageError{lwarp} -{Package #1 must be loaded before lwarp} -{Move \detokenize{\usepackage}{#1} before \detokenize{\usepackage}{lwarp}.} -} -} -% \end{macrocode} -% \end{macro} - - -% \begin{macro}{\LWR@loadnever} \marg{badpackagename} \marg{replacementpkgname} -% -% The first packages is not supported, so tell the user to use the second instead. -% -% \changes{v0.25}{2017/03/16}{Added the ability to prevent conflicting packages.} -% -% \begin{macrocode} -\newcommand*{\LWR@loadnever}[2]{% -\PackageError{lwarp} -{Package #1 is not supported by lwarp's HTML conversion. -Package(s) #2 may be useful instead} -{Package #1 might conflict with lwarp in some way, -or is superceded by another package. -For a possible alternative, see package(s) #2.} -} + xindy + -M \LWR@xindyStyle \space + -L \LWR@xindyLanguage \space + -C \LWR@xindyCodepage% + } + }{} +}{} % \end{macrocode} -% \end{macro} % % -% \begin{macro}{\LWR@earlyloadnever} \marg{badpackagename} \marg{replacementpkgname} % -% The first packages is not supported, so tell the user to use the second instead. -% This version checks immediately for packages which may have been loaded before \pkg{lwarp}. +% \subsection{Conditional compilation} % -% \changes{v0.54}{2018/04/06}{Added.} +% \begin{macro}{\warpprintonly} \marg{contents} % +% Only process the contents if producing printed output. +% \changes{v0.19}{2016/06/06}{Replaces \cs{rowprintedonly}.} % \begin{macrocode} -\newcommand*{\LWR@earlyloadnever}[2]{% -\@ifpackageloaded{#1}{% -\PackageError{lwarp} -{Package #1 is not supported by lwarp's HTML conversion. -Package(s) #2 may be useful instead} -{Package #1 might conflict with lwarp in some way, -or is superceded by another package. -For a possible alternative, see package(s) #2.} -}{}% -} +\newcommand{\warpprintonly}[1]{\ifbool{warpingprint}{#1}{}} % \end{macrocode} % \end{macro} % % -% \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{macro}{\warpHTMLonly} \marg{contents} % +% Only process the contents if producing \HTML\ output. +% \changes{v0.19}{2016/06/06}{Added.} % \begin{macrocode} -\LWR@earlyloadnever{ae}{cm-super, lmodern} -\LWR@earlyloadnever{aecompl}{cm-super, lmodern} -\LWR@earlyloadnever{aecc}{cm-super, lmodern} -\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} -\LWR@earlyloadnever{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol} +\newcommand{\warpHTMLonly}[1]{\ifbool{warpingHTML}{#1}{}} % \end{macrocode} +% \end{macro} % % -% \subsection{Enforcing package loading after \pkg{lwarp}} +% \DescribePackage{comment} Provides conditional code blocks. % -% Packages which should only be loaded after \pkg{lwarp} are tested -% here to trip an error of they have already been loaded. +% Attempts to use \pkg{versions} or \pkg{verbatim} fail in some cases, and do not +% provide much of a speed benefit even when they do work. % -% \changes{v0.25}{2017/03/16}{Fix: Allows XE\LaTeX\ and -% \LuaLaTeX\ to preload graphics and graphicx.} -% \changes{v0.45}{2017/12/03}{Allows \pkg{memoir}'s preloaded packages.} -% \changes{v0.58}{2018/06/21}{Fix: \pkg{memoir} and \pkg{ccaption}.} +% \begin{macrocode} +\RequirePackage{comment} +% \end{macrocode} + + +% Use |comment_print.cut| for print mode, and +% |comment_html.cut| for \HTML\ mode. +% This helps \prog{latexmk} to more reliably know whether to recompile. +% +% \changes{v0.37}{2017/08/19}{\pkg{comment}: Maintains independent +% cutfiles for print, \HTML.} % -% The following packages must be loaded after \pkg{lwarp}: -% ^^A *loadafter % \begin{macrocode} -\LWR@loadafter{2in1} -\LWR@loadafter{2up} -\LWR@loadafter{a4} -\LWR@loadafter{a4wide} -\LWR@loadafter{a5comb} -\LWR@notmemoirloadafter{abstract} -\LWR@loadafter{accsupp} -\LWR@loadafter{acro} -\LWR@loadafter{acronym} -\LWR@loadafter{adjmulticol} -\LWR@loadafter{addlines} -\LWR@loadafter{ae} -\LWR@loadafter{aecc} -\LWR@loadafter{afterpage} -\LWR@loadafter{algorithm2e} -\LWR@loadafter{algorithmicx} -\LWR@loadafter{alltt} -\LWR@loadafter{amsmath} -\LWR@loadafter{amsthm} -\LWR@loadafter{anonchap} -\LWR@loadafter{anysize} -\LWR@notmemoirloadafter{appendix} -\LWR@loadafter{arabicfront} -\LWR@notmemoirloadafter{array} -\LWR@loadafter{arydshln} -\LWR@loadafter{asymptote} -% \LWR@loadafter{atbegshi}% used by morewrites -\LWR@loadafter{attachfile} -\LWR@loadafter{attachfile2} -\LWR@loadafter{authblk} -\LWR@loadafter{axessibility} -\LWR@loadafter{axodraw2} -\LWR@loadafter{backref} -\LWR@loadafter{balance} -\LWR@loadafter{bigdelim} -\LWR@loadafter{bigstrut} -\LWR@loadafter{bitpattern} -\LWR@loadafter{blowup} -\LWR@loadafter{booklet} -\LWR@loadafter{bookmark} -\LWR@notmemoirloadafter{booktabs} -\LWR@loadafter{bophook} -\LWR@loadafter{boxedminipage} -\LWR@loadafter{boxedminipage2e} -\LWR@loadafter{breakurl} -\LWR@loadafter{breqn} -\LWR@loadafter{bxpapersize} -\LWR@loadafter{bytefield} -\LWR@loadafter{cancel} -\LWR@loadafter{canoniclayout} -\LWR@loadafter{caption} -\LWR@loadafter{caption2} -\LWR@loadafter{cases} -% \LWR@loadafter{ccaption}% may be preloaded by memoir -\LWR@loadafter{changebar} -\LWR@notmemoirloadafter{changepage} -\LWR@notmemoirloadafter{chngpage} -\LWR@loadafter{chappg} -\LWR@loadafter{chapterbib} -\LWR@loadafter{chemfig} -\LWR@loadafter{chemformula} -\LWR@loadafter{chemgreek} -\LWR@loadafter{chemmacros} -\LWR@loadafter{chemnum} -\LWR@loadafter{chkfloat} -\LWR@loadafter{cite} -\LWR@loadafter{cmdtrack} -\LWR@loadafter{color} -\LWR@loadafter{colortbl} -\LWR@loadafter{continue} -\LWR@loadafter{copyrightbox} -\LWR@notmemoirloadafter{crop} -% ctex must be loaded before lwarp -\LWR@loadafter{cuted} -\LWR@loadafter{cutwin} -\LWR@loadafter{dblfloatfix} -\LWR@loadafter{dblfnote} -\LWR@notmemoirloadafter{dcolumn} -\LWR@loadafter{diagbox} -\LWR@loadafter{dprogress} -\LWR@loadafter{draftcopy} -\LWR@loadafter{draftfigure} -\LWR@loadafter{draftwatermark} -\LWR@loadafter{easy-todo} -\LWR@loadafter{ebook} -\LWR@loadafter{ellipsis} -\LWR@loadafter{emptypage} -\LWR@loadafter{endfloat} -\LWR@loadafter{endheads} -\LWR@loadafter{endnotes} -\LWR@notmemoirloadafter{enumerate} -\LWR@loadafter{enumitem} -\LWR@notmemoirloadafter{epigraph} -\LWR@loadafter{epsfig} -\LWR@loadafter{epstopdf} -\LWR@loadafter{epstopdf-base} -\LWR@loadafter{errata} -\LWR@loadafter{eso-pic} -\LWR@loadafter{everypage} -\LWR@loadafter{everyshi} -\LWR@loadafter{extramarks} -\LWR@loadafter{fancybox} -\LWR@loadafter{fancyhdr} -\LWR@loadafter{fancyheadings} -\LWR@loadafter{fancyref} -\LWR@loadafter{fancytabs} -\LWR@loadafter{fancyvrb} -\LWR@loadafter{figcaps} -\LWR@loadafter{figsize} -\LWR@loadafter{fix2col} -\LWR@loadafter{fixme} -\LWR@loadafter{fixmetodonotes} -\LWR@loadafter{flafter} -\LWR@loadafter{flippdf} -\LWR@loadafter{float} -\LWR@loadafter{floatflt} -\LWR@loadafter{floatpag} -\LWR@loadafter{floatrow} -\LWR@loadafter{fltrace} -\LWR@loadafter{flushend} -\LWR@loadafter{fnbreak} -\LWR@loadafter{fncychap} -\LWR@loadafter{fnlineno} -\LWR@loadafter{fnpos} -% fontenc must be loaded before lwarp -% fontspec must be loaded before lwarp -\LWR@loadafter{footmisc} -\LWR@loadafter{footnote} -\LWR@loadafter{footnotehyper} -\LWR@loadafter{footnpag} -\LWR@loadafter{forest} -\LWR@loadafter{framed} -\LWR@loadafter{ftnright} -\LWR@loadafter{fullminipage} -\LWR@loadafter{fullpage} -\LWR@loadafter{fullwidth} -\LWR@loadafter{fwlw} -\LWR@loadafter{geometry} -\LWR@loadafter{glossaries} -% \LWR@loadafter{graphics}% pre-loaded by xunicode -% \LWR@loadafter{graphicx}% pre-loaded by xunicode -\LWR@loadafter{glossary} -\LWR@loadafter{grffile} -\LWR@loadafter{grid} -\LWR@loadafter{grid-system} -\LWR@loadafter{gridset} -\LWR@loadafter{hang} -\LWR@loadafter{hanging} -\LWR@loadafter{hypcap} -\LWR@loadafter{hypdestopt} -\LWR@loadafter{hypernat} -\LWR@loadafter{hyperref} -\LWR@loadafter{hyperxmp} -\LWR@loadafter{hyphenat} -\LWR@loadafter{idxlayout} -\LWR@loadafter{ifoddpage} -\LWR@loadafter{imakeidx} -\LWR@loadafter{indentfirst} -\LWR@notmemoirloadafter{index} -% inputenc must be loaded before lwarp -% inputenx must be loaded before lwarp -\LWR@loadafter{intopdf} -\LWR@loadafter{keyfloat} -\LWR@loadafter{layaureo} -\LWR@loadafter{layout} -\LWR@loadafter{leading} -\LWR@loadafter{letterspace} -\LWR@loadafter{lettrine} -\LWR@loadafter{lineno} -\LWR@loadafter{lips} -\LWR@loadafter{listings} -\LWR@loadafter{longtable} -\LWR@loadafter{lscape} -\LWR@loadafter{ltablex} -\LWR@loadafter{ltcaption} -\LWR@loadafter{ltxgrid} -\LWR@loadafter{ltxtable} -\LWR@loadafter{lua-check-hyphen} -\LWR@loadafter{lua-visual-debug} -\LWR@loadafter{luacolor} -\LWR@loadafter{luatodonotes} -\LWR@loadafter{magaz} -\LWR@notmemoirloadafter{makeidx} -\LWR@loadafter{marginfit} -\LWR@loadafter{marginfix} -\LWR@loadafter{marginnote} -\LWR@loadafter{mcaption} -\LWR@loadafter{mdframed} -\LWR@loadafter{memhfixc} -\LWR@loadafter{metalogo} -\LWR@loadafter{mhchem} -\LWR@loadafter{microtype} -\LWR@loadafter{midfloat} -\LWR@loadafter{midpage} -\LWR@loadafter{morefloats} -\LWR@notmemoirloadafter{moreverb} -% morewrites must be loaded before lwarp -\LWR@notmemoirloadafter{mparhack} -%\LWR@loadafter{multicol}% loaded by ltxdoc -\LWR@loadafter{multirow} -\LWR@loadafter{multitoc} -\LWR@loadafter{musicography} -\LWR@loadafter{nameref} -\LWR@loadafter{natbib} -\LWR@notmemoirloadafter{nccfancyhdr} -\LWR@notmemoirloadafter{needspace} -% newclude must be loaded before lwarp -\LWR@loadafter{newtxmath} -% newunicodechar must be loaded before lwarp -\LWR@notmemoirloadafter{nextpage} -\LWR@loadafter{nicefrac} -\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} -\LWR@loadafter{pagesel} -\LWR@loadafter{paralist} -\LWR@loadafter{parnotes} -\LWR@notmemoirloadafter{parskip} -\LWR@loadafter{pbox} -\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} -\LWR@loadafter{pfnote} -\LWR@loadafter{phfqit} -\LWR@loadafter{placeins} -\LWR@loadafter{prelim2e} -\LWR@loadafter{prettyref} -\LWR@loadafter{preview} -\LWR@loadafter{psfrag} -\LWR@loadafter{psfragx} -\LWR@loadafter{pst-eps} -\LWR@loadafter{pstool} -\LWR@loadafter{pstricks} -\LWR@loadafter{quotchap} -\LWR@loadafter{quoting} -\LWR@loadafter{ragged2e} -\LWR@loadafter{realscripts} -\LWR@loadafter{refcheck} -\LWR@loadafter{register} -\LWR@loadafter{relsize} -\LWR@loadafter{repeatindex} -\LWR@loadafter{resizegather} -\LWR@loadafter{romanbar} -\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} -\LWR@loadafter{scrextend} -\LWR@loadafter{scrhack} -\LWR@loadafter{scrlayer} -\LWR@loadafter{scrlayer-notecolumn} -\LWR@loadafter{scrlayer-scrpage} -\LWR@loadafter{section} -\LWR@loadafter{sectionbreak} -\LWR@loadafter{sectsty} -\LWR@loadafter{semantic-markup} -\LWR@notmemoirloadafter{setspace} -\LWR@loadafter{shadow} -\LWR@notmemoirloadafter{showidx} -\LWR@loadafter{showkeys} -\LWR@loadafter{sidecap} -\LWR@loadafter{sidenotes} -\LWR@loadafter{SIunits} -\LWR@loadafter{siunitx} -\LWR@loadafter{soul} -\LWR@loadafter{soulpos} -\LWR@loadafter{soulutf8} -\LWR@loadafter{splitidx} -\LWR@loadafter{srcltx} -\LWR@loadafter{srctex} -\LWR@loadafter{stabular} -\LWR@loadafter{stfloats} -\LWR@loadafter{subfig} -\LWR@loadafter{subfigure} -\LWR@loadafter{supertabular} -\LWR@loadafter{t1inc} -\LWR@loadafter{tabls} -\LWR@notmemoirloadafter{tabularx} -\LWR@loadafter{tabulary} -\LWR@loadafter{textarea} -% \LWR@loadafter{textcomp}% maybe before lwarp with font packages -\LWR@loadafter{textfit} -\LWR@loadafter{textpos} -\LWR@loadafter{theorem} -\LWR@loadafter{thinsp} -\LWR@loadafter{threadcol} -\LWR@loadafter{threeparttable} -\LWR@loadafter{thumb} -\LWR@loadafter{thumbs} -\LWR@loadafter{tikz} -\LWR@loadafter{titleps} -\LWR@loadafter{titlesec} -\LWR@loadafter{titletoc} -\LWR@notmemoirloadafter{titling} -% \LWR@loadafter{tocbasic}% preloaded by koma-script classes -\LWR@notmemoirloadafter{tocbibind} -\LWR@loadafter{tocenter} -\LWR@notmemoirloadafter{tocloft} -\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} +\ifbool{warpingHTML}{ +\def\DefaultCutFileName{\def\CommentCutFile{comment_html.cut}} +}{} + +\ifbool{warpingprint}{ +\def\DefaultCutFileName{\def\CommentCutFile{comment_print.cut}} +}{} % \end{macrocode} -% \changes{v0.44}{2017/11/19}{Adjustment for \pkg{koma-script}.} + + +% \begin{environment}{warpall} +% Anything in the |warpall| environment will be generated for print or \HTML\ outputs. % \begin{macrocode} -% \LWR@loadafter{typearea}% preloaded by koma-script classes -% \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} -\LWR@loadafter{varioref}% no lwarp package provided -\LWR@notmemoirloadafter{verse} -\LWR@loadafter{vertbars} -\LWR@loadafter{vmargin} -\LWR@loadafter{vowel} -\LWR@loadafter{vpe} -\LWR@loadafter{vwcol} -\LWR@loadafter{wallpaper} -\LWR@loadafter{wasysym} -\LWR@loadafter{watermark} -\LWR@loadafter{widows-and-orphans} -\LWR@loadafter{wrapfig} -\LWR@loadafter{xbmks} -\LWR@loadafter{xcolor} -\LWR@loadafter{xechangebar} -\LWR@loadafter{xellipsis} -\LWR@loadafter{xfrac} -\LWR@loadafter{xltabular} -\LWR@loadafter{xltxtra} -\LWR@loadafter{xmpincl} -\LWR@loadafter{xpiano} -\LWR@loadafter{xtab} -% xunicode must be loaded before lwarp -\LWR@loadafter{xurl} -\LWR@loadafter{xy} -\LWR@loadafter{zwpagelayout} +\includecomment{warpall} +% \end{macrocode} +% \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}} +{\excludecomment{warpHTML}}% +% \end{macrocode} + +% \begin{macrocode} +\ifbool{warpingprint} +{\includecomment{warpprint}} +{\excludecomment{warpprint}} % \end{macrocode} +% \end{environment} +% \end{environment} + + +% Optionally generate a local copy of \prog{lwarpmk}. +% Default to no. +% \begin{macrocode} +\ifbool{LWR@creatinglwarpmk} +{\includecomment{LWR@createlwarpmk}} +{\excludecomment{LWR@createlwarpmk}} +% \end{macrocode} +% +% +% +% +% @@ -11485,10 +11718,19 @@ For a possible alternative, see package(s) #2.} % \codehtml % \begin{macrocode} \begin{warpHTML} -\RequirePackage[paperheight=190in,paperwidth=20in,% -left=2in,right=6in,% -top=1in,bottom=1in,% -]{geometry} +\RequirePackage{geometry} +% \end{macrocode} +% +% Avoid option conflict by changing settings after package load: +% \changes{v0.63}{2018/11/24}{\pkg{geometry}: Fix for \pkg{bxjs*} classes.} +% \begin{macrocode} +\geometry{ + paperheight=190in,% + paperwidth=20in,% + left=2in,right=6in,% + top=1in,bottom=1in,% +} + \@twosidefalse \@mparswitchfalse \end{warpHTML} @@ -11578,7 +11820,11 @@ top=1in,bottom=1in,% % \DescribePackage{everyhook} % % \pkg{everyhook} is used to patch paragraph handling. +% +% \changes{v0.63}{2018/11/29}{\pkg{everyhook}: Fix for \pkg{bxjs*} classes.} % \begin{macrocode} +\@ifundefined{bxjs@everypar}{}{\let\everypar\bxjs@everypar} + \RequirePackage{everyhook} \end{warpHTML} % \end{macrocode} @@ -11780,6 +12026,41 @@ top=1in,bottom=1in,% % \end{macro} +% ^^A *checkload +% \begin{macro}{\LWR@checkloadfilename} \marg{filename} +% Checks if this filename should be loaded after \pkg{lwarp}, +% or never at all. +% +% \changes{v0.63}{2018/12/02}{Added to reduce number of \filenm{lwarp-*} files.} +% \begin{macrocode} +\newcommand*{\LWR@checkloadfilename}[1]{% +\LWR@checkloadnever{#1}{ae}{latinmodern} +\LWR@checkloadnever{#1}{aecc}{latinmodern} +\LWR@checkloadnever{#1}{boxedminipage}{boxedminipage2e} +\LWR@checkloadnever{#1}{caption2}{caption} +\LWR@checkloadnever{#1}{ccaption}{caption} +\LWR@checkloadnever{#1}{fancyheadings}{fancyhdr} +\LWR@checkloadnever{#1}{glossary}{glossaries} +\LWR@checkloadnever{#1}{t1enc}{fontenc, inputenc, inputenx} +\LWR@checkloadnever{#1}{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol} +% +\LWR@checkloadbefore{#1}{ctex} +\LWR@checkloadbefore{#1}{fontspec} +\LWR@checkloadbefore{#1}{inputenc} +\LWR@checkloadbefore{#1}{inputenx} +\LWR@checkloadbefore{#1}{kotex} +\LWR@checkloadbefore{#1}{luatexja} +\LWR@checkloadbefore{#1}{luatexja-fontspec} +\LWR@checkloadbefore{#1}{luatexko} +\LWR@checkloadbefore{#1}{morewrites} +\LWR@checkloadbefore{#1}{newclude} +\LWR@checkloadbefore{#1}{newunicodechar} +\LWR@checkloadbefore{#1}{xeCJK} +\LWR@checkloadbefore{#1}{xetexko} +\LWR@checkloadbefore{#1}{zxjatype} +} +% \end{macrocode} +% \end{macro} % \begin{macro}{\LWR@findword} \oarg{1: separator} \marg{2: list} % \marg{3: index} \oarg{4: destination} @@ -11817,9 +12098,13 @@ top=1in,bottom=1in,% % See if the package name was found: % \begin{macrocode} \IfStrEq{\LWR@strresulttwo}{}% -{% -}% no filename -{% yes filename +{}% no filename +{% yes filename was found +% \end{macrocode} +% Check if the package should be loaded before \pkg{lwarp}, +% or never at all: +% \begin{macrocode} +\LWR@checkloadfilename{\LWR@strresulttwo}% % \end{macrocode} % If found, and if an \pkg{lwarp}-equivalent name exists, use |lwarp-|* instead. % \begin{macrocode} @@ -13068,6 +13353,25 @@ top=1in,bottom=1in,% % \end{macro} % % +% \begin{macro}{\LWR@compileuplatex} +% Sets compile options for up\LaTeX\ with \pkg{ujarticle} or related classes. +% \changes{v0.63}{2018/11/25}{Added.} +% \begin{macrocode} +\newcommand*{\LWR@compileuplatex}{ + \def\LWR@tempprintlatexcmd{% + \LWR@compilecmd{uplatex}{} + \LWR@addcompilecmd{dvipdfmx}{} + } + \def\LWR@tempHTMLlatexcmd{% + \LWR@compilecmd{uplatex}{_html} + \LWR@addcompilecmd{dvipdfmx}{_html} + } +} +% \end{macrocode} +% \end{macro} +% +% +% % \begin{macro}{\LWR@PrintLatexCmd} % \begin{macro}{\LWR@HTMLLatexCmd} % @@ -13237,16 +13541,23 @@ top=1in,bottom=1in,% \fi% \ifpdf }% latexmk % \end{macrocode} +% For \pkg{ujarticle} and related, using up\LaTeX\ and \prog{dvipdfmx}: +% \changes{v0.63}{2018/11/25}{\pkg{ujarticle} and related: Compile options.} +% \begin{macrocode} +\@ifclassloaded{ujarticle}{\LWR@compileuplatex}{} +\@ifclassloaded{ujbook}{\LWR@compileuplatex}{} +\@ifclassloaded{ujreport}{\LWR@compileuplatex}{} +% \end{macrocode} % Only make the setting permanent if the original was empty: % \changes{v0.61}{2018/09/20}{Added \optn{PrintLatexCmd} option.} % \changes{v0.61}{2018/09/20}{Added \optn{HTMLLatexCmd} option.} % \begin{macrocode} - \ifdefempty{\LWR@PrintLatexCmd}{ - \def\LWR@PrintLatexCmd{\LWR@tempprintlatexcmd} - }{} - \ifdefempty{\LWR@HTMLLatexCmd}{ - \def\LWR@HTMLLatexCmd{\LWR@tempHTMLlatexcmd} - }{} +\ifdefempty{\LWR@PrintLatexCmd}{ + \def\LWR@PrintLatexCmd{\LWR@tempprintlatexcmd} +}{} +\ifdefempty{\LWR@HTMLLatexCmd}{ + \def\LWR@HTMLLatexCmd{\LWR@tempHTMLlatexcmd} +}{} % \end{macrocode} % \end{macro} % \end{macro} @@ -13380,6 +13691,8 @@ top=1in,bottom=1in,% % \changes{v0.62}{2018/11/02}{\filenm{lwarp.css}: Reduced margins in titlepage.} % \changes{v0.62}{2018/11/02}{\filenm{lwarp.css}: Fixed \CSS\ for \cs{textup}.} % \changes{v0.62}{2018/11/02}{\filenm{lwarp.css}: Added \CSS\ for \pkg{xfrac}, \pkg{nicefrac}.} +% \changes{v0.63}{2018/11/30}{\filenm{lwarp.css}: Added \CSS\ for vertical writing.} +% \changes{v0.63}{2018/12/01}{\filenm{lwarp.css}: Improved \CSS\ for \pkg{mdframed}.} % % ^^A *lwarp.css % @@ -13498,6 +13811,12 @@ span.overline { text-decoration-skip: auto ; } + +/* for vertical text: */ +div.verticalrl { writing-mode: vertical-rl } +div.horizontaltb { writing-mode: horizontal-tb } + + /* for diagbox */ div.diagboxtitleN { border-bottom: 1px solid gray } div.diagboxtitleS { border-top: 1px solid gray } @@ -14066,12 +14385,8 @@ div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;} .mdframed { -/* padding: 0ex ; */ -/* border: 1px solid blafck; */ -/* border-radius: 0px ; */ padding: 0ex ; - margin: 3ex 5% 3ex 5% ; -/* display: inline-block ; */ + margin: 2ex 0em 2ex 0em ; } .mdframed p { padding: 0ex .5em 0ex .5em ; } @@ -14079,27 +14394,23 @@ div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;} .mdframed dl { padding: 0ex .5em 0ex .5em ; } .mdframedtitle { - padding: .5em ; + padding: .5ex 0pt 0pt 0pt ; + border-radius: 10pt 10pt 0pt 0pt ; display: block ; - font-size: 130% ; margin-bottom: 1ex ; } .mdframedsubtitle { - padding: 0ex .5em 0ex .5em ; display: block ; - font-size: 115% ; } .mdframedsubsubtitle { - padding: 0ex .5em 0ex .5em ; display: block ; } .mdtheorem { padding: 0ex .5em 0ex .5em ; margin: 3ex 5% 3ex 5% ; -/* display: inline-block ; */ } @@ -15776,7 +16087,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX- -- Copyright 2016-2018 Brian Dunn -printversion = "v0.62" +printversion = "v0.63" requiredconfversion = "1" -- also at *lwarpmk.conf function printhelp () @@ -17313,22 +17624,81 @@ end -- not --version % \section{Homepage link} +% \codeall +% \begin{macrocode} +\begin{warpall} +% \end{macrocode} + + +% \begin{macro}{\linkhomename} +% Holds the default name for the home link. +% +% \changes{v0.63}{2018/11/29}{Added.} +% \begin{macrocode} +\newcommand{\linkhomename}{Home} +% \end{macrocode} +% \end{macro} + +% \begin{macrocode} +\end{warpall} +% \end{macrocode} + + % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} - % \begin{macro}{\LinkHome} % May be used wherever you wish to place a link back to the homepage. % The filename must be detokenized for underscores. % \begin{macrocode} \newcommand*{\LinkHome}{% -\LWR@subhyperrefclass{\HomeHTMLFilename.html}{Home}{linkhome}% +\LWR@subhyperrefclass{\HomeHTMLFilename.html}{\linkhomename}{linkhome}% } % \end{macrocode} % \end{macro} +% \begin{macrocode} +\end{warpHTML} +% \end{macrocode} + + +% \codeprint +% \begin{macrocode} +\begin{warpprint} +% \end{macrocode} + +% \begin{macro}{\LinkHome} +% May be used wherever you wish to place a link back to the homepage. +% For print output, if \pkg{hyperref} is available a hyperlink to the first page +% is used, named by \cs{linkhomename}. +% If \pkg{hyperref} is not available, a pageref is used instead. +% \changes{v0.63}{2018/11/29}{Fix: Print version.} +% \begin{macrocode} +\AtBeginDocument{ +\@ifundefined{hyperref}{ + \newcommand*{\LinkHome}{\linkhomename\ --- page \pageref{page-LWRfirstpage}} +}{ + \newcommand*{\LinkHome}{\hyperref[page-LWRfirstpage]{\linkhomename}} +} +} + +\AfterEndPreamble{\label{page-LWRfirstpage}} +% \end{macrocode} +% \end{macro} + +% \begin{macrocode} +\end{warpprint} +% \end{macrocode} + + + +% \codehtml +% \begin{macrocode} +\begin{warpHTML} +% \end{macrocode} + % \begin{macro}{\LWR@topnavigation} % % Creates a link to the homepage at the top of the page for use when the window is too @@ -17799,6 +18169,7 @@ end -- not --version % \begin{macro}{\LWR@htmlopencomment} % \begin{macro}{\LWR@htmlclosecomment} % \changes{v0.47}{2018/01/25}{Add \cs{mbox} to prevent line breaks.} +% \changes{v0.63}{2018/11/30}{Fix: Break ligature for \pkg{luatexko}.} % \begin{macrocode} \newcommand*{\LWR@htmlopencomment}{% {% @@ -17806,7 +18177,7 @@ end -- not --version \begingroup% \LWR@FBcancel% \ifmmode\else\protect\LWR@origttfamily\fi% -\LWR@print@mbox{\LWR@origtextless{}!{-}{-}}% +\LWR@print@mbox{\LWR@origtextless{}!-\/-}% \endgroup% }% } @@ -17817,7 +18188,7 @@ end -- not --version \begingroup% \LWR@FBcancel% \ifmmode\else\protect\LWR@origttfamily\fi% -\LWR@print@mbox{{-}{-}\LWR@origtextgreater}% +\LWR@print@mbox{-\/-\LWR@origtextgreater}% \endgroup% }% } @@ -17868,15 +18239,27 @@ end -- not --version % % The trailing spaces allow more places for a line break. % +% The use of \cs{textquotedbl} instead of |"| provides improved +% compatibility with \pkg{xeCJK}. +% % \changes{v0.20}{2017/01/17}{Factored code.} % \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.} +% \changes{v0.63}{2018/11/24}{Fix for \pkg{xeCJK}.} % % \begin{macrocode} \NewDocumentCommand{\LWR@subhtmlelementclass}{m O{} m}{% \LWR@traceinfo{LWR@subhtmlelementclass !#1!#2!#3!}% \ifblank{#2}% -{\LWR@htmltag{#1 class="#3"}}% empty option -{\LWR@htmltag{#1 class="#3" style="#2"}}% non-empty option +{% empty option + \LWR@htmltag{#1 class=\textquotedbl#3\textquotedbl}% +}% +{% non-empty option + \LWR@htmltag{% + #1 % space + class=\textquotedbl#3\textquotedbl\ % space + style=\textquotedbl#2\textquotedbl% + }% +}% \LWR@traceinfo{LWR@subhtmlelementclass done}% } % \end{macrocode} @@ -18099,9 +18482,13 @@ end -- not --version % Low-level interface for \element{div} classes with an automatic float ID. % These are often used when |\ifbool{FormatWP}|. % +% The use of \cs{textquotedbl} instead of |"| provides improved +% compatibility with \pkg{xeCJK}. +% % \changes{v0.42}{2017/10/26}{Added to factor code.} % \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.} % \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.} +% \changes{v0.63}{2018/11/24}{Fix for \pkg{xeCJK}.} % % \codeprint % \begin{macrocode} @@ -18122,15 +18509,17 @@ end -- not --version {% \addtocounter{LWR@thisautoidWP}{1}% \LWR@htmltag{% - div class="#3" % - id="\LWR@print@mbox{autoidWP-\arabic{LWR@thisautoidWP}}"% - \ifblank{#1}{}{ style="#1"}% + div class=\textquotedbl#3\textquotedbl % space + id=\textquotedbl% + \LWR@print@mbox{autoidWP-\arabic{LWR@thisautoidWP}}% + \textquotedbl% + \ifblank{#1}{}{ style=\textquotedbl#1\textquotedbl}% }% }% FormatWP {% not FormatWP \LWR@htmltag{% - div class="#3"% - \ifblank{#2}{}{ style="#2"}% + div class=\textquotedbl#3\textquotedbl% + \ifblank{#2}{}{ style=\textquotedbl#2\textquotedbl}% }% }% not FormatWP \LWR@startpars% @@ -18465,7 +18854,7 @@ end -- not --version % \begin{macrocode} \PushPreHook{par}{\LWR@openparagraph}% % \end{macrocode} -% At the end of each paragraph, generate closing tag and do regular |/par| actions: +% At the end of each paragraph, generate closing tag then do regular |/par| actions: % \begin{macrocode} \let\par\LWR@closeparagraph @@ -19881,9 +20270,13 @@ end -- not --version % % Create an autosection tag. % \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.} +% \changes{v0.63}{2018/11/24}{Fix for \pkg{xeCJK}.} % \begin{macrocode} \newcommand*{\LWR@createautosec}[1]{% -\LWR@htmltag{#1 id="\LWR@print@mbox{autosec-\arabic{page}}"}% +\LWR@htmltag{% + #1 % space + id=\textquotedbl\LWR@print@mbox{autosec-\arabic{page}}\textquotedbl% +}% } % \end{macrocode} % \end{macro} @@ -20581,7 +20974,9 @@ end -- not --version % \end{macrocode} % The language is user-adjustable: % \begin{macrocode} -\LWR@htmltag{html lang="\LWR@currentHTMLLanguage"}\LWR@orignewline +\LWR@htmltag{% + html lang=\textquotedbl\LWR@currentHTMLLanguage\textquotedbl% +}\LWR@orignewline % \end{macrocode} % Start of the meta data: % \begin{macrocode} @@ -20589,7 +20984,9 @@ end -- not --version % \end{macrocode} % Charset is fixed at UTF-8: % \begin{macrocode} -\LWR@htmltag{meta charset="UTF-8" /}\LWR@orignewline +\LWR@htmltag{% + meta charset=\textquotedbl{}UTF-8\textquotedbl\ /% +}\LWR@orignewline % \end{macrocode} % % Author: @@ -20597,7 +20994,12 @@ end -- not --version % \begin{macrocode} \ifthenelse{\equal{\theHTMLAuthor}{}}% {}% -{\LWR@htmltag{meta name="author" content="\theHTMLAuthor" /}\LWR@orignewline}% +{% + \LWR@htmltag{% + meta name=\textquotedbl{}author\textquotedbl\ % space + content=\textquotedbl\theHTMLAuthor\textquotedbl\ /% + }\LWR@orignewline% +}% % \end{macrocode} % % \pkg{lwarp} is the generator: @@ -20605,15 +21007,19 @@ end -- not --version % \gindex{generator>HTML meta tag} % \gindex{meta tag, HTML>generator} % \begin{macrocode} -\LWR@htmltag{meta name="generator" content="LaTeX lwarp package" /}% - \LWR@orignewline +\LWR@htmltag{% + meta % space + name=\textquotedbl{}generator\textquotedbl\ % space + content=\textquotedbl{}LaTeX lwarp package\textquotedbl\ /% +}\LWR@orignewline% % \end{macrocode} % If there is a description, add it now: % \begin{macrocode} \ifdefempty{\LWR@currentHTMLDescription}{}{% -\LWR@htmltag{% -meta name="description" content="\LWR@currentHTMLDescription" /}% - \LWR@orignewline + \LWR@htmltag{% + meta name=\textquotedbl{}description\textquotedbl\ % space + content=\textquotedbl\LWR@currentHTMLDescription\textquotedbl\ /% + }\LWR@orignewline }% % \end{macrocode} % Mobile-friendly viewport: @@ -20621,17 +21027,24 @@ meta name="description" content="\LWR@currentHTMLDescription" /}% % \gindex{viewport>HTML meta tag} % \gindex{meta tag, HTML>viewport} % \begin{macrocode} -\LWR@htmltag{meta name="viewport" % -content="width=device-width, initial-scale=1.0" /}% - \LWR@orignewline +\LWR@htmltag{% + meta % space + name=\textquotedbl{}viewport\textquotedbl\ % space + content=\textquotedbl{}width=device-width, initial-scale=1.0\textquotedbl\ /% +}\LWR@orignewline % \end{macrocode} % IE patch: +% \changes{v0.63}{2018/11/30}{Fix: Break ligature for \pkg{luatexko}.} % \begin{macrocode} -\LWR@htmltag{!{-}{-}[if lt IE 9]}\LWR@orignewline +\LWR@htmltag{!-\/-[if lt IE 9]}\LWR@orignewline \LWR@htmltag{% -script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"}% + script % space + src=\textquotedbl{}% + http://html5shiv.googlecode.com/svn/trunk/html5.js% + \textquotedbl% +}% \LWR@htmltag{/script}\LWR@orignewline -\LWR@htmltag{![endif]{-}{-}}\LWR@orignewline +\LWR@htmltag{![endif]-\/-}\LWR@orignewline % \end{macrocode} % The page's title, if there is one. % A section name is also added if given. @@ -20651,7 +21064,11 @@ script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"}% % The page's stylesheet: % \begin{macrocode} \LWR@htmltag{% -link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% + link % space + rel=\textquotedbl{}stylesheet\textquotedbl\ % space + type=\textquotedbl{}text/css\textquotedbl\ % space + href=\textquotedbl\LWR@currentcss\textquotedbl\ /% +}% \LWR@orignewline % \end{macrocode} % Optional \brand{MathJax} support. The \HTML\ tags must be turned off @@ -20710,10 +21127,14 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macro}{\LWR@LwarpStart} +% Executed at the beginning of the entire document. +% +% The use of \cs{textquotedbl} instead of |"| improves compatibility with \pkg{xeCJK}. +% % \changes{v0.19}{2016/06/01}{Enabled \textbackslash\textbackslash{} equal to \cs{newline}.} % \changes{v0.21}{2017/02/22}{Changed \filenm{lateximages} to a \filenm{.txt} file.} % \changes{v0.28}{2017/04/09}{\progcode{FormatWordProcessor} forces single-file output.} -% Executed at the beginning of the entire document. +% \changes{v0.63}{2018/11/24}{Fixes for \pkg{xeCJK}.} % \begin{macrocode} \catcode`\$=\active \newcommand*{\LWR@LwarpStart} @@ -20841,7 +21262,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@stoppars \LWR@htmltag{/header}\LWR@orignewline \LWR@traceinfo{LWR@lwarpStart: Generating textbody.} -\LWR@htmltag{section class="textbody"} +\LWR@htmltag{section class=\textquotedbl{}textbody\textquotedbl} % \end{macrocode} % % Patch the |itemize|, |enumerate|, and |description| environments and \cs{item}. @@ -21889,7 +22310,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % % Encloses a verbatim environment with the given \CSS\ class. % +% The use of \cs{textquotedbl} instead of |"| improves compatibility with \pkg{xeCJK}. +% % \changes{v0.51}{2018/03/17}{Adds vertical offset.} +% \changes{v0.63}{2018/11/24}{Fix for \pkg{xeCJK}.} % \begin{macrocode} \newcommand*{\LWR@atbeginverbatim}[3][] {% @@ -21907,8 +22331,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % as loading the \brand{MathJax} script. % \begin{macrocode} \ifbool{LWR@verbtags}{% - \LWR@htmltag{pre class="#3" - \ifthenelse{\equal{#1}{}}{}{style="#1"}% + \LWR@htmltag{pre class=\textquotedbl#3\textquotedbl% + \ifthenelse{\equal{#1}{}}{}{ style=\textquotedbl#1\textquotedbl}% }% \LWR@orignewline% pre \leavevmode\unskip\LWR@print@vspace*{-#2\baselineskip}% @@ -30565,6 +30989,11 @@ autopage-\theLWR@currentautosec% \LWR@PreloadedPackage{ulem} % \end{macrocode} +% \pkg{xetexko-vertical} may be preloaded by \pkg{xetexko}. +% \begin{macrocode} +\LWR@PreloadedPackage{xetexko-vertical} +% \end{macrocode} + % \begin{macrocode} \end{warpHTML} % \end{macrocode} @@ -33211,6 +33640,53 @@ width:\LWR@printlength{\LWR@tempwidth}% % \end{macrocode} +% \section{\pkg{bxjs*} classes} +% +% Load patches to \pkg{bxjs*} classes. +% +% \changes{v0.63}{2018/11/24}{\pkg{bxjs*}: Added.} +% +% \codehtml +% \begin{macrocode} +\begin{warpHTML} +% \end{macrocode} +% +% \begin{macrocode} +\@ifclassloaded{bxjsarticle}{\RequirePackage{lwarp-geometry}}{} +\@ifclassloaded{bxjsbook}{\RequirePackage{lwarp-geometry}}{} +\@ifclassloaded{bxjsreport}{\RequirePackage{lwarp-geometry}}{} +\@ifclassloaded{bxjsslide}{\RequirePackage{lwarp-geometry}}{} +% \end{macrocode} +% +% \begin{macrocode} +\end{warpHTML} +% \end{macrocode} + + +% \section{\pkg{ltjs*} classes} +% +% Load patches to \pkg{ltjs*} classes. +% +% \changes{v0.63}{2018/11/24}{\pkg{ltjs*}: Added.} +% +% \codehtml +% \begin{macrocode} +\begin{warpHTML} +% \end{macrocode} +% +% \begin{macrocode} +\@ifclassloaded{ltjsarticle}{\RequirePackage{lwarp-stfloats}}{} +\@ifclassloaded{ltjsbook}{\RequirePackage{lwarp-stfloats}}{} +\@ifclassloaded{ltjsreport}{\RequirePackage{lwarp-stfloats}}{} +\@ifclassloaded{ltjspf}{\RequirePackage{lwarp-stfloats}}{} +\@ifclassloaded{ltjsiyou}{\RequirePackage{lwarp-stfloats}}{} +% \end{macrocode} +% +% \begin{macrocode} +\end{warpHTML} +% \end{macrocode} + + % ^^A *ctex % \section{C\TeX patch} % @@ -33911,54 +34387,6 @@ width:\LWR@printlength{\LWR@tempwidth}% % % % -% \iffalse -%<*ae> -% \fi -% -% \part{lwarp-ae.sty} -% -% \section{ae} -% -% \DescribePackage{ae} -% \pkg{ae} does not work with \prog{pdftotext}, and is superceded by \pkg{latinmodern}. -% -% \changes{v0.54}{2018/04/06}{\pkg{ae}: Prevented.} -% -% \codehtml -% \begin{macrocode} -\LWR@loadnever{ae}{latinmodern} -% \end{macrocode} -% -% \iffalse -% -% \fi -% -% -% -% -% \iffalse -%<*aecc> -% \fi -% -% \part{lwarp-aecc.sty} -% -% \section{aecc} -% -% \DescribePackage{aecc} -% \pkg{aecc} does not work with \prog{pdftotext}, and is superceded by \pkg{latinmodern}. -% -% \changes{v0.54}{2018/04/06}{\pkg{aecc}: Prevented.} -% -% \codehtml -% \begin{macrocode} -\LWR@loadnever{aecc}{latinmodern} -% \end{macrocode} -% -% \iffalse -% -% \fi -% -% % % % \iffalse @@ -34782,6 +35210,21 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% % % \codehtml % +% \pkg{amsthm} must be loaded before \pkg{mdframed}: +% \changes{v0.63}{2018/12/01}{\pkg{amsthm}, \pkg{mdframed}: Fix for enforced load order.} +% \begin{macrocode} +\@ifpackageloaded{mdframed}{ + \PackageError{lwarp} + {Package mdframed must be loaded after package amsthm.} + {% + Move \detokenize{\usepackage}{amsthm} before \detokenize{\usepackage}{mdframed}. + Package amsthm may be loaded by something else, which must also be moved + before mdframed.% + } +} +{} +% \end{macrocode} +% % \begin{macrocode} \LWR@ProvidesPackagePass{amsthm} % \end{macrocode} @@ -36227,32 +36670,6 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% % % % -% -% \iffalse -%<*boxedminipage> -% \fi -% -% \part{lwarp-boxedminipage.sty} -% -% \section{boxedminipage} -% -% \DescribePackage{boxedminipage} -% \pkg{boxedminipage} is superceded by \pkg{boxedminipage2e}. -% -% \changes{v0.34}{2017/07/26}{\pkg{boxedminipage}: Prevented.} -% -% \codehtml -% \begin{macrocode} -\LWR@loadnever{boxedminipage}{boxedminipage2e} -% \end{macrocode} -% -% \iffalse -% -% \fi -% -% -% -% % \iffalse %<*boxedminipage2e> % \fi @@ -36810,29 +37227,6 @@ s% % % % -% \iffalse -%<*caption2> -% \fi -% -% \part{lwarp-caption2.sty} -% -% \section{caption2} -% -% \DescribePackage{caption2} -% \pkg{caption2} is not used. -% The user is recommended to use \pkg{caption} instead. -% -% \changes{v0.38}{2017/08/22}{\pkg{caption2}: Prevented.} -% -% \codehtml -% \begin{macrocode} -\LWR@loadnever{caption2}{caption} -% \end{macrocode} -% -% \iffalse -% -% \fi -% % % % @@ -36893,35 +37287,6 @@ s% % % % -% -% -% \iffalse -%<*ccaption> -% \fi - -% \part{lwarp-ccaption.sty} - -% \section{ccaption} -% -% \DescribePackage{ccaption} -% \pkg{ccaption} is not used. -% The user is recommended to use \pkg{caption} instead. - -% \changes{v0.25}{2017/03/16}{\pkg{ccaption}: Prevented.} - -% \codehtml -% \begin{macrocode} -\LWR@loadnever{ccaption}{caption} -% \end{macrocode} - - -% \iffalse -% -% \fi -% -% -% -% % \iffalse %<*changebar> % \fi @@ -38751,8 +39116,10 @@ name = \chemmacros_translate:n {scheme-name} % \codehtml % \begin{macrocode} \@ifpackageloaded{xeCJK}{}{ - \LWR@loadnever{CJK}{ctex} + \LWR@loadnever{CJK}{ctex, xeCJK} } + +\LWR@ProvidesPackagePass{CJK} % \end{macrocode} % % \iffalse @@ -38773,13 +39140,15 @@ name = \chemmacros_translate:n {scheme-name} % \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}.} +% \changes{v0.62}{2018/11/18}{\pkg{CJKutf8}: Prevented unless \pkg{xeCJK}.} % % \codehtml % \begin{macrocode} \@ifpackageloaded{xeCJK}{}{ - \LWR@loadnever{CJKutf8}{ctex} + \LWR@loadnever{CJKutf8}{ctex, xeCJK} } + +\LWR@ProvidesPackagePass{CJKutf8} % \end{macrocode} % % \iffalse @@ -39131,44 +39500,6 @@ 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> @@ -39984,6 +40315,7 @@ name = \chemmacros_translate:n {scheme-name} % \pkg{enumitem} is supported with minor adjustments. % % \changes{v0.34}{2017/07/27}{\pkg{enumitem}: Added, no longer required.} +% \changes{v0.63}{2018/12/02}{\pkg{emumitem}: Nullifiy \cs{DrawEnumitemLabel}.} % % \codehtml % \begin{macrocode} @@ -40005,13 +40337,15 @@ name = \chemmacros_translate:n {scheme-name} % the new environment. Renewed lists already have their actions assigned, and % thus need no changes. % \begin{macrocode} -\let\LWR@orignewlist\newlist +\let\LWR@enumitem@orignewlist\newlist \renewcommand*{\newlist}[3]{% -\LWR@orignewlist{#1}{#2}{#3}% +\LWR@enumitem@orignewlist{#1}{#2}{#3}% \AtBeginEnvironment{#1}{\@nameuse{LWR@#2start}}% \AtEndEnvironment{#1}{\@nameuse{LWR@#2end}}% } + +\def\DrawEnumitemLabel{} % \end{macrocode} @@ -40803,27 +41137,6 @@ name = \chemmacros_translate:n {scheme-name} % % % -% \iffalse -%<*fancyheadings> -% \fi -% -% \part{lwarp-fancyheadings.sty} -% -% \section{fancyheadings} -% -% \DescribePackage{fancyheadings} -% \pkg{fancyheadings} is superceded by \pkg{fancyhdr}. -% -% \changes{v0.48}{2018/02/07}{\pkg{fancyheadings}: Prevented.} -% -% \codehtml -% \begin{macrocode} -\LWR@loadnever{fancyheadings}{fancyhdr} -% \end{macrocode} -% -% \iffalse -% -% \fi % % % @@ -42476,40 +42789,6 @@ solid \LWR@origpound\LWR@tempcolor ; % % % % \iffalse -%<*fontspec> -% \fi -% -% \part{lwarp-fontspec.sty} -% -% \section{fontspec} -% -% \DescribePackage{fontspec} -% Error if \pkg{fontspec} is loaded after \pkg{lwarp}. -% -% \changes{v0.21}{2017/02/22}{\pkg{fontspec}: Added.} -% - -% Discard all options for \pkg{lwarp-fontspec}: -% -% \codehtml -% \begin{macrocode} -\LWR@ProvidesPackageDrop{fontspec}[2017/11/09] -% \end{macrocode} - -% \begin{macrocode} -\LWR@loadbefore{fontspec} -% \end{macrocode} - -% \iffalse -% -% \fi -% -% -% -% -% -% -% \iffalse %<*footmisc> % \fi % @@ -43233,30 +43512,6 @@ solid \LWR@origpound\LWR@tempcolor ; % % % % -% \iffalse -%<*glossary> -% \fi -% -% \part{lwarp-glossary.sty} -% -% \section{glossary} -% -% \DescribePackage{glossary} -% \pkg{glossary} is superceded by \pkg{glossaries}. -% -% \changes{v0.57}{2018/05/16}{\pkg{glossary}: Prevented.} -% -% \codehtml -% \begin{macrocode} -\LWR@loadnever{glossary}{glossaries} -% \end{macrocode} -% -% \iffalse -% -% \fi -% -% -% % % \iffalse %<*graphics> @@ -45490,69 +45745,6 @@ img src="% % % % -% -% \iffalse -%<*inputenc> -% \fi -% -% \part{lwarp-inputenc.sty} -% -% \section{inputenc} -% -% \DescribePackage{inputenc} -% Error if \pkg{inputenc} is loaded after \pkg{lwarp}. -% -% \changes{v0.21}{2017/02/22}{\pkg{inputenc}: Added.} -% - -% \codehtml -% -% \begin{macrocode} -\LWR@ProvidesPackageDrop{inputenc} -% \end{macrocode} - -% \begin{macrocode} -\LWR@loadbefore{inputenc} -% \end{macrocode} - -% \iffalse -% -% \fi -% -% -% -% -% \iffalse -%<*inputenx> -% \fi -% -% \part{lwarp-inputenx.sty} -% -% \section{inputenx} -% -% \DescribePackage{inputenx} -% Error if \pkg{inputenx} is loaded after \pkg{lwarp}. -% -% \changes{v0.54}{2018/04/10}{\pkg{inputenx}: Added.} -% - -% \codehtml -% -% \begin{macrocode} -\LWR@ProvidesPackageDrop{inputenx} -% \end{macrocode} - -% \begin{macrocode} -\LWR@loadbefore{inputenx} -% \end{macrocode} - -% \iffalse -% -% \fi -% -% -% -% % \iffalse %<*intopdf> % \fi @@ -47240,14 +47432,6 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}% % % \limitsmdframed % -% Environments created or encapsulated by \pkg{mdframed} are enclosed in a -% \margintag{\CSS\ classes} -% \element{div} of class |md|, or |mdframed| otherwise. -% -% Frame titles are placed into a \element{span} of class |mdframedtitle|. -% Subtitles are in a \element{span} of class |mdframedsubtitle|, -% and likewise for subsubtitles. -% % Pre-existing hooks are used to patch extra functions before and after the frames. % % @@ -47261,11 +47445,6 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}% % \end{macrocode} % % -% \pkg{amsthm} must be loaded before \pkg{mdframed} -% \begin{macrocode} -\LWR@origRequirePackage{amsthm} -% \end{macrocode} -% % Do not require \tikz{} or pstricks: % \begin{macrocode} \LWR@origRequirePackage[framemethod=none]{mdframed} @@ -47341,9 +47520,12 @@ endinnercode={\LWR@stoppars}, % \begin{noindmacro}{\LWR@mdfprintlength} \marg{mdflengthkey} % % Given the \pkg{mdframed} key, print the length. +% +% \changes{v0.63}{2018/12/02}{\pkg{mdframed}: Avoid thin rules.} % \begin{macrocode} \newcommand*{\LWR@mdfprintlength}[1]{% -\LWR@printlength{\@nameuse{mdf@#1@length}} +\LWR@forceminwidth{\@nameuse{mdf@#1@length}}% +\LWR@printlength{\LWR@atleastonept}% } % \end{macrocode} % \end{noindmacro} @@ -47364,9 +47546,15 @@ endinnercode={\LWR@stoppars}, % \begin{macrocode} \LWR@stoppars% % \end{macrocode} -% Open a \element{div} and with custom |class| and custom |style|: +% Open a \element{div} and with custom \attribute{class} and custom \attribute{style}. +% A \env{BlockClass} environment is not used because this \element{div} is +% created by the \pkg{mdframed} \optn{startcode} and \optn{endcode} settings, +% which do not properly nest the \element{div} inside the \env{mdframed} environment. % \begin{macrocode} -\LWR@htmltagc{div class="\LWR@mdthisenv" \LWR@orignewline +\LWR@htmltagc{div class="% +mdframed% +\ifdefstring{\LWR@mdthisenv}{mdframed}{}{ \LWR@mdthisenv}% +" \LWR@orignewline style=" \LWR@orignewline % \end{macrocode} % Convert and print the background color: @@ -47412,6 +47600,7 @@ border-radius: \LWR@mdfprintlength{roundcorner} ; \LWR@orignewline % \end{macrocode} % \end{noindmacro} % +% % \begin{noindmacro}{\LWR@mdframedend} % Actions after an mdframe ends. % @@ -47504,21 +47693,17 @@ border-radius: \LWR@mdfprintlength{roundcorner} ; \LWR@orignewline % % \begin{noindmacro}{\mdfframedtitleenv} \marg{title} % -% Encapsulation of the original which places the title -% inside a \element{span} of class |mdframedtitle|: +% Place the title inside a \element{div} of class \attribute{mdframedtitle}: % \begin{macrocode} -\LetLtxMacro\LWR@origmdfframedtitleenv\mdfframedtitleenv - \newlength{\LWR@titleroundcorner} \renewrobustcmd\mdfframedtitleenv[1]{% \LWR@traceinfo{LWR@mdframedtitleenv start}% -% \LWR@origmdfframedtitleenv{% % \end{macrocode} -% Open a \element{span} with a custom |class| and custom |style|: +% Open a \element{div} with a custom |class| and custom |style|: +% \changes{v0.63}{2018/12/01}{Improved titles.} % \begin{macrocode} -\LWR@htmltagc{span class="mdframedtitle" \LWR@orignewline -style=" \LWR@orignewline +\begin{BlockClass}[% % \end{macrocode} % Convert and print the title background color: % \begin{macrocode} @@ -47546,24 +47731,18 @@ background: % ^^A 0pt 0pt % ^^A \LWR@orignewline % ^^A \end{macrocode} -% Finish the custom style and the opening span tag: +% Finish the custom style and the opening \element{div} tag: % \begin{macrocode} -" \LWR@orignewline -}% span +]{mdframedtitle}% % \end{macrocode} -% Restrict paragraph tags inside a span: +% Print the title inside the \element{div}: +% \changes{v0.63}{2018/12/02}{\pkg{mdframed}: Improved font control.} % \begin{macrocode} -\begin{LWR@nestspan}% -% \end{macrocode} -% Print the title inside the span: -% \begin{macrocode} -#1% +\mdf@frametitlefont{\LWR@textcurrentfont{#1}}% % \end{macrocode} -% Closee the span and unnest the paragraph tag restriction: +% Close the \element{div}: % \begin{macrocode} -\LWR@htmltagc{/span}% -\end{LWR@nestspan}% -% } +\end{BlockClass}% \LWR@traceinfo{LWR@mdframedtitleenv end}% } % \end{macrocode} @@ -47575,23 +47754,17 @@ background: % % Common code for \cs{LWR@mdfsubtitle} and \cs{LWR@mdfsubsubtitle}. % -% Encapsulate the subtitle inside a \element{span} of class |mdframedsubtitle|: +% Encapsulate the subtitle inside a \element{div} of class |mdframedsubtitle|: % \begin{macrocode} \NewDocumentCommand{\LWR@mdfsubtitlecommon}{m o m} {% the following empty line is required \LWR@traceinfo{LWR@mdframedsubtitlecommon start}% % \end{macrocode} -% Special handling for mdframed: -% Subtitles have \cs{par}s around them, -% so temporarily disable them here. +% Open a \element{div} with a custom \attribute{class} and custom \attribute{style}: +% \changes{v0.63}{2018/12/01}{Improved titles.} % \begin{macrocode} -\let\par\LWR@origpar% -% \end{macrocode} -% Open a \element{span} with a custom |class| and custom |style|: -% \begin{macrocode} -\LWR@htmltagc{span class="mdframed#1title" -style=" \LWR@orignewline +\begin{BlockClass}[% % \end{macrocode} % Convert and print the background color: % \begin{macrocode} @@ -47619,25 +47792,20 @@ background: ; \LWR@orignewline }{}% % \end{macrocode} -% Finish the custom style and the opening span tag: +% Finish the custom style and the opening \element{div} tag: % \begin{macrocode} -"}% span -% \end{macrocode} -% Restrict paragraph tags inside a span: -% \begin{macrocode} -\begin{LWR@nestspan}% +]{mdframed#1title}% % \end{macrocode} % Perform the original subtitle action: +% \changes{v0.63}{2018/12/02}{\pkg{mdframed}: Improved font control.} % \begin{macrocode} \IfNoValueTF{#2} -{\@nameuse{LWR@origmdf#1title}{#3}}% -{\@nameuse{LWR@origmdf#1title}[#2]{#3}}% +{\@nameuse{LWR@origmdf#1title}{\csuse{mdf@#1titlefont}{\LWR@textcurrentfont{#3}}}}% +{\@nameuse{LWR@origmdf#1title}[#2]{\csuse{mdf@#1titlefont}{\LWR@textcurrentfont{#3}}}}% % \end{macrocode} -% Close the span and unnest the paragraph tag restriction: +% Close the \element{div}: % \begin{macrocode} -\LWR@htmltagc{/span}% the following empty line is required -\end{LWR@nestspan}% must follow the /span or an extra

appears - +\end{BlockClass}% \LWR@traceinfo{LWR@mdframedsubtitlecommon end}% } % \end{macrocode} @@ -47709,6 +47877,7 @@ background: % Modified from the original to remember the environment. % % \changes{v0.34}{2017/08/05}{\pkg{mdframed}: Improved \env{mdtheorem} patch.} +% \changes{v0.63}{2018/12/02}{\pkg{mdframed}: Improved font control.} % % \begin{macrocode} \DeclareDocumentCommand{\mdtheorem}{ O{} m o m o }% @@ -47729,7 +47898,7 @@ background: \def\@temptitle{\mdf@theoremseparator% \mdf@theoremspace% \mdf@theoremtitlefont% - ##1}% + \LWR@textcurrentfont{##1}}% lwarp \mdf@thm@caption{#2}{{#4}{\csname the#2\endcsname}{##1}}% }% \begin{mdframed}[#1,frametitle={\strut#4\ \csname the#2\endcsname% @@ -47754,7 +47923,7 @@ background: \def\@temptitle{\mdf@theoremseparator% \mdf@theoremspace% \mdf@theoremtitlefont% - ##1}% + \LWR@textcurrentfont{##1}}% lwarp \mdf@thm@caption{#2}{{#4}{\csname the#2\endcsname}{##1}}% } \begin{mdframed}[#1,frametitle={\strut#4\ \csname the#2\endcsname% @@ -47767,7 +47936,7 @@ background: \def\@temptitle{\mdf@theoremseparator% \mdf@theoremspace% \mdf@theoremtitlefont% - ##1}% + \LWR@textcurrentfont{##1}}% lwarp \mdf@thm@caption{#2}{{#4}{\csname the#2\endcsname}{##1}}% }% \begin{mdframed}[#1,frametitle={\strut#4\@temptitle}]}% @@ -47784,7 +47953,7 @@ background: \def\@temptitle{\mdf@theoremseparator% \mdf@theoremspace% \mdf@theoremtitlefont% - ##1}% + \LWR@textcurrentfont{##1}}% lwarp \mdf@thm@caption{#2}{{#4}{\csname the#2\endcsname}{##1}}% } \begin{mdframed}[#1,frametitle={\strut#4\ \csname the#2\endcsname% @@ -47803,8 +47972,8 @@ background: % \end{noindmacro} % % -% \begin{noindmacro}{\newmdtheoremenv} \oarg{mdframed-options} \marg{envname} -% \oarg{numberedlike} \marg{caption} \oarg{within} +% \begin{noindmacro}{\newmdtheoremenv} \oarg{1: mdframed-options} \marg{2: envname} +% \oarg{3: numberedlike} \marg{4: caption} \oarg{5: within} % % Modified from the original to remember the environment. % \begin{macrocode} @@ -48167,7 +48336,9 @@ background: % \changes{v0.47}{2018/01/26}{\pkg{midpage}: Fix: Line wrap at \HTML\ hyphen.} % \begin{macrocode} \newenvironment{midpage} -{\begin{BlockClass}[\LWR@print@mbox{margin-top:6ex} ; \LWR@print@mbox{margin-bottom:6ex}]{midpage}} +{\begin{BlockClass}[% + \LWR@print@mbox{margin-top:6ex} ; \LWR@print@mbox{margin-bottom:6ex}% +]{midpage}} {\end{BlockClass}} % \end{macrocode} % @@ -48322,42 +48493,6 @@ background: % % % -% -% \iffalse -%<*morewrites> -% \fi -% -% \part{lwarp-morewrites.sty} -% -% \section{morewrites} -% -% \DescribePackage{morewrites} -% Error if \pkg{morewrites} is loaded after \pkg{lwarp}. -% -% \changes{v0.42}{2017/10/19}{\pkg{morewrites}: Added.} -% - -% Discard all options for \pkg{lwarp-morewrites}: - -% \codehtml -% -% \begin{macrocode} -\LWR@ProvidesPackageDrop{morewrites} -% \end{macrocode} - -% \begin{macrocode} -\LWR@loadbefore{morewrites} -% \end{macrocode} - -% \iffalse -% -% \fi -% -% -% -% -% -% % \iffalse %<*mparhack> % \fi @@ -48385,7 +48520,6 @@ background: % % % -% % \iffalse %<*multicol> % \fi @@ -48989,73 +49123,6 @@ class="td% % % % \iffalse -%<*newclude> -% \fi -% -% \part{lwarp-newclude.sty} -% -% \section{newclude} -% -% \DescribePackage{newclude} -% Error if \pkg{newclude} is loaded after \pkg{lwarp}. -% -% \changes{v0.21}{2017/02/22}{\pkg{newclude}: Added.} -% - -% Discard all options for \pkg{lwarp-newclude}: - -% \codehtml -% \begin{macrocode} -\LWR@ProvidesPackageDrop{newclude} -% \end{macrocode} - -% \begin{macrocode} -\LWR@loadbefore{newclude} -% \end{macrocode} - -% \iffalse -% -% \fi -% -% -% -% -% -% -% -% \iffalse -%<*newunicodechar> -% \fi -% -% \part{lwarp-newunicodechar.sty} -% -% \section{newunicodechar} -% -% \DescribePackage{newunicodechar} -% Error if \pkg{newunicodechar} is loaded after \pkg{lwarp}. -% -% \changes{v0.21}{2017/02/22}{\pkg{newunicodechar}: Added.} -% - -% Discard all options for \pkg{lwarp-newunicodechar}: - -% \codehtml -% \begin{macrocode} -\LWR@ProvidesPackageDrop{newunicodechar} -% \end{macrocode} - -% \begin{macrocode} -\LWR@loadbefore{newunicodechar} -% \end{macrocode} - -% \iffalse -% -% \fi -% -% -% -% -% \iffalse %<*nextpage> % \fi @@ -53890,6 +53957,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % \pkg{stfloats} is ignored. % % \changes{v0.48}{2018/02/07}{\pkg{stfloats}: Added.} +% \changes{v0.63}{2018/11/24}{\pkg{stfloats}: Adapted to \pkg{ltjs*} classes.} % % \codehtml % @@ -53897,11 +53965,22 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', \LWR@ProvidesPackageDrop{stfloats} % \end{macrocode} % +% \pkg{stfloats} may have been preloaded by a \pkg{ltjs*} class. +% +% The following are provided in case they have not yet been defined: +% \begin{macrocode} +\providecommand*{\fnbelowfloat}{} +\providecommand*{\fnunderfloat}{} +\providecommand*{\setbaselinefloat}{} +\providecommand*{\setbaselinefixed}{} +% \end{macrocode} +% +% Nullified for \HTML: % \begin{macrocode} -\newcommand*{\fnbelowfloat}{} -\newcommand*{\fnunderfloat}{} -\newcommand*{\setbaselinefloat}{} -\newcommand*{\setbaselinefixed}{} +\renewcommand*{\fnbelowfloat}{} +\renewcommand*{\fnunderfloat}{} +\renewcommand*{\setbaselinefloat}{} +\renewcommand*{\setbaselinefixed}{} % \end{macrocode} % % \iffalse @@ -54397,29 +54476,6 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % % -% \iffalse -%<*t1enc> -% \fi -% -% \part{lwarp-t1enc.sty} -% -% \section{t1enc} -% -% \DescribePackage{t1enc} -% \pkg{t1enc} does not work with \pkg{lwarp}. -% -% \changes{v0.54}{2018/04/10}{\pkg{t1enc}: Prevented.} -% -% \codehtml -% \begin{macrocode} -\LWR@loadnever{t1enc}{fontenc, inputenc, inputenx} -% \end{macrocode} -% -% \iffalse -% -% \fi -% -% % % \iffalse %<*tabls> @@ -58261,29 +58317,6 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % % -% \iffalse -%<*wasysym> -% \fi -% -% \part{lwarp-wasysym.sty} -% -% \section{wasysym} -% -% \DescribePackage{wasysym} -% \pkg{wasysym} does not work with \prog{pdftotext}. -% -% \changes{v0.54}{2018/04/09}{\pkg{wasysym}: Prevented.} -% -% \codehtml -% \begin{macrocode} -\LWR@loadnever{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol} -% \end{macrocode} -% -% \iffalse -% -% \fi -% -% % % \iffalse %<*watermark> @@ -59182,40 +59215,6 @@ height:\LWR@printlength{\LWR@tempheight}% % % % \iffalse -%<*xeCJK> -% \fi -% -% \part{lwarp-xeCJK.sty} -% -% \section{xeCJK} -% -% \DescribePackage{xeCJK} -% Error if \pkg{xeCJK} is loaded after \pkg{lwarp}. -% -% Load \pkg{xeCJK} before \pkg{lwarp} so that \pkg{lwarp} -% can take control of the sectioning commands. -% -% \changes{v0.62}{2018/11/18}{\pkg{xeCJK}: Added.} -% -% Discard all options for \pkg{lwarp-xeCJK}: -% -% \codehtml -% \begin{macrocode} -\LWR@ProvidesPackageDrop{xeCJK} -% \end{macrocode} - -% \begin{macrocode} -\LWR@loadbefore{xeCJK} -% \end{macrocode} - -% \iffalse -% -% \fi -% -% -% -% -% \iffalse %<*xellipsis> % \fi % @@ -59278,6 +59277,43 @@ height:\LWR@printlength{\LWR@tempheight}% % % % \iffalse +%<*xetexko-vertical> +% \fi +% +% \part{lwarp-xetexko-vertical.sty} +% +% \section{xetexko-vertical} +% +% \credits{Dohyun Kim} +% +% \DescribePackage{xetexko-vertical} +% \pkg{xetexko-vertical} is patched for use by \pkg{lwarp}. +% +% \changes{v0.20}{2017/01/11}{\pkg{xetexko-vertical}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@loadbefore{xetexko-vertical} + +\LWR@ProvidesPackagePass{xetexko-vertical}[2018/04/06] +% \end{macrocode} +% +% \begin{macrocode} +\renewcommand{\verticaltypesetting}{} +\renewenvironment{vertical}[1]{\BlockClass{verticalrl}}{\endBlockClass} +\renewenvironment{horizontal}[1]{\BlockClass{horizontaltb}}{\endBlockClass} +\renewcommand{\vertlatin}[1]{#1} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% +% \iffalse %<*xfrac> % \fi @@ -59637,6 +59673,45 @@ height:\LWR@printlength{\LWR@tempheight}% % % % +% \iffalse +%<*xpinyin> +% \fi +% +% \part{lwarp-xpinyin.sty} +% +% \section{xpinyin} +% +% \credits{Soben Lee} +% +% \DescribePackage{xpinyin} +% \pkg{xpinyin} is partly supported. +% \cs{xpinyin} and \env{pinyinscope} are nullified, but \cs{pinyin} works. +% +% \changes{v0.63}{2018/12/03}{\pkg{xpinyin}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{xpinyin}[2018/01/28] +% \end{macrocode} +% +% \begin{macrocode} +\RenewDocumentEnvironment{pinyinscope}{O{}}{}{} + +\RenewDocumentCommand{\xpinyin}{s O{} m}{% + \IfBooleanTF{#1}{#3}{\@firstoftwo#3}% +} + +\RenewDocumentCommand{\enablepinyin}{}{} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% % % \iffalse %<*xtab> @@ -59870,6 +59945,38 @@ height:\LWR@printlength{\LWR@tempheight}% % % % \iffalse +%<*zhlineskip> +% \fi +% +% \part{lwarp-zhlineskip.sty} +% +% \section{zhlineskip} +% +% \DescribePackage{zhlineskip} +% \pkg{zhlineskip} is ignored. +% +% \changes{v0.63}{2018/12/02}{\pkg{zhlineskip}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackageDrop{zhlineskip}[2018/11/30] +% \end{macrocode} +% +% \begin{macrocode} +\newcommand*\SetTextEnvironmentSinglespace[1]{} +\newcommand*\RestoreTextEnvironmentLeading{} +\newcommand*\SetMathEnvironmentSinglespace[1]{} +\newcommand*\RestoreMathEnvironmentLeading{} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% \iffalse %<*zwpagelayout> % \fi % diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.ins b/Master/texmf-dist/source/latex/lwarp/lwarp.ins index d12e89cf905..6b3ded54a78 100644 --- a/Master/texmf-dist/source/latex/lwarp/lwarp.ins +++ b/Master/texmf-dist/source/latex/lwarp/lwarp.ins @@ -44,8 +44,6 @@ version 2005/12/01 or later. \file{lwarp-acronym.sty}{\from{lwarp.dtx}{acronym}} \file{lwarp-adjmulticol.sty}{\from{lwarp.dtx}{adjmulticol}} \file{lwarp-addlines.sty}{\from{lwarp.dtx}{addlines}} -\file{lwarp-ae.sty}{\from{lwarp.dtx}{ae}} -\file{lwarp-aecc.sty}{\from{lwarp.dtx}{aecc}} \file{lwarp-afterpage.sty}{\from{lwarp.dtx}{afterpage}} \file{lwarp-algorithm2e.sty}{\from{lwarp.dtx}{algorithm2e}} \file{lwarp-algorithmicx.sty}{\from{lwarp.dtx}{algorithmicx}} @@ -76,7 +74,6 @@ version 2005/12/01 or later. \file{lwarp-bookmark.sty}{\from{lwarp.dtx}{bookmark}} \file{lwarp-booktabs.sty}{\from{lwarp.dtx}{booktabs}} \file{lwarp-bophook.sty}{\from{lwarp.dtx}{bophook}} -\file{lwarp-boxedminipage.sty}{\from{lwarp.dtx}{boxedminipage}} \file{lwarp-boxedminipage2e.sty}{\from{lwarp.dtx}{boxedminipage2e}} \file{lwarp-breakurl.sty}{\from{lwarp.dtx}{breakurl}} \file{lwarp-breqn.sty}{\from{lwarp.dtx}{breqn}} @@ -85,9 +82,7 @@ version 2005/12/01 or later. \file{lwarp-cancel.sty}{\from{lwarp.dtx}{cancel}} \file{lwarp-canoniclayout.sty}{\from{lwarp.dtx}{canoniclayout}} \file{lwarp-caption.sty}{\from{lwarp.dtx}{caption}} -\file{lwarp-caption2.sty}{\from{lwarp.dtx}{caption2}} \file{lwarp-cases.sty}{\from{lwarp.dtx}{cases}} -\file{lwarp-ccaption.sty}{\from{lwarp.dtx}{ccaption}} \file{lwarp-changebar.sty}{\from{lwarp.dtx}{changebar}} \file{lwarp-changepage.sty}{\from{lwarp.dtx}{changepage}} \file{lwarp-chngpage.sty}{\from{lwarp.dtx}{chngpage}} @@ -109,7 +104,6 @@ version 2005/12/01 or later. \file{lwarp-continue.sty}{\from{lwarp.dtx}{continue}} \file{lwarp-copyrightbox.sty}{\from{lwarp.dtx}{copyrightbox}} \file{lwarp-crop.sty}{\from{lwarp.dtx}{crop}} -\file{lwarp-ctex.sty}{\from{lwarp.dtx}{ctex}} \file{lwarp-cuted.sty}{\from{lwarp.dtx}{cuted}} \file{lwarp-cutwin.sty}{\from{lwarp.dtx}{cutwin}} \file{lwarp-dblfloatfix.sty}{\from{lwarp.dtx}{dblfloatfix}} @@ -139,7 +133,6 @@ version 2005/12/01 or later. \file{lwarp-everyshi.sty}{\from{lwarp.dtx}{everyshi}} \file{lwarp-extramarks.sty}{\from{lwarp.dtx}{extramarks}} \file{lwarp-fancybox.sty}{\from{lwarp.dtx}{fancybox}} -\file{lwarp-fancyheadings.sty}{\from{lwarp.dtx}{fancyheadings}} \file{lwarp-fancyhdr.sty}{\from{lwarp.dtx}{fancyhdr}} \file{lwarp-fancyref.sty}{\from{lwarp.dtx}{fancyref}} \file{lwarp-fancytabs.sty}{\from{lwarp.dtx}{fancytabs}} @@ -166,7 +159,6 @@ version 2005/12/01 or later. \file{lwarp-footnote.sty}{\from{lwarp.dtx}{footnote}} \file{lwarp-footnotehyper.sty}{\from{lwarp.dtx}{footnotehyper}} \file{lwarp-fontenc.sty}{\from{lwarp.dtx}{fontenc}} -\file{lwarp-fontspec.sty}{\from{lwarp.dtx}{fontspec}} \file{lwarp-footnpag.sty}{\from{lwarp.dtx}{footnpag}} \file{lwarp-framed.sty}{\from{lwarp.dtx}{framed}} \file{lwarp-ftnright.sty}{\from{lwarp.dtx}{ftnright}} @@ -176,7 +168,6 @@ version 2005/12/01 or later. \file{lwarp-fwlw.sty}{\from{lwarp.dtx}{fwlw}} \file{lwarp-geometry.sty}{\from{lwarp.dtx}{geometry}} \file{lwarp-glossaries.sty}{\from{lwarp.dtx}{glossaries}} -\file{lwarp-glossary.sty}{\from{lwarp.dtx}{glossary}} \file{lwarp-graphicx.sty}{\from{lwarp.dtx}{graphicx}} \file{lwarp-graphics.sty}{\from{lwarp.dtx}{graphics}} \file{lwarp-grffile.sty}{\from{lwarp.dtx}{grffile}} @@ -196,8 +187,6 @@ version 2005/12/01 or later. \file{lwarp-imakeidx.sty}{\from{lwarp.dtx}{imakeidx}} \file{lwarp-indentfirst.sty}{\from{lwarp.dtx}{indentfirst}} \file{lwarp-index.sty}{\from{lwarp.dtx}{index}} -\file{lwarp-inputenc.sty}{\from{lwarp.dtx}{inputenc}} -\file{lwarp-inputenx.sty}{\from{lwarp.dtx}{inputenx}} \file{lwarp-intopdf.sty}{\from{lwarp.dtx}{intopdf}} \file{lwarp-keyfloat.sty}{\from{lwarp.dtx}{keyfloat}} \file{lwarp-layaureo.sty}{\from{lwarp.dtx}{layaureo}} @@ -233,7 +222,6 @@ version 2005/12/01 or later. \file{lwarp-midpage.sty}{\from{lwarp.dtx}{midpage}} \file{lwarp-morefloats.sty}{\from{lwarp.dtx}{morefloats}} \file{lwarp-moreverb.sty}{\from{lwarp.dtx}{moreverb}} -\file{lwarp-morewrites.sty}{\from{lwarp.dtx}{morewrites}} \file{lwarp-mparhack.sty}{\from{lwarp.dtx}{mparhack}} \file{lwarp-multicol.sty}{\from{lwarp.dtx}{multicol}} \file{lwarp-multirow.sty}{\from{lwarp.dtx}{multirow}} @@ -243,8 +231,6 @@ version 2005/12/01 or later. \file{lwarp-natbib.sty}{\from{lwarp.dtx}{natbib}} \file{lwarp-nccfancyhdr.sty}{\from{lwarp.dtx}{nccfancyhdr}} \file{lwarp-needspace.sty}{\from{lwarp.dtx}{needspace}} -\file{lwarp-newclude.sty}{\from{lwarp.dtx}{newclude}} -\file{lwarp-newunicodechar.sty}{\from{lwarp.dtx}{newunicodechar}} \file{lwarp-nextpage.sty}{\from{lwarp.dtx}{nextpage}} \file{lwarp-nicefrac.sty}{\from{lwarp.dtx}{nicefrac}} \file{lwarp-nonfloat.sty}{\from{lwarp.dtx}{nonfloat}} @@ -328,7 +314,6 @@ version 2005/12/01 or later. \file{lwarp-subfigure.sty}{\from{lwarp.dtx}{subfigure}} \file{lwarp-supertabular.sty}{\from{lwarp.dtx}{supertabular}} \file{lwarp-syntonly.sty}{\from{lwarp.dtx}{syntonly}} -\file{lwarp-t1enc.sty}{\from{lwarp.dtx}{t1enc}} \file{lwarp-tabls.sty}{\from{lwarp.dtx}{tabls}} \file{lwarp-tabularx.sty}{\from{lwarp.dtx}{tabularx}} \file{lwarp-tabulary.sty}{\from{lwarp.dtx}{tabulary}} @@ -376,24 +361,25 @@ version 2005/12/01 or later. \file{lwarp-vpe.sty}{\from{lwarp.dtx}{vpe}} \file{lwarp-vwcol.sty}{\from{lwarp.dtx}{vwcol}} \file{lwarp-wallpaper.sty}{\from{lwarp.dtx}{wallpaper}} -\file{lwarp-wasysym.sty}{\from{lwarp.dtx}{wasysym}} \file{lwarp-watermark.sty}{\from{lwarp.dtx}{watermark}} \file{lwarp-widows-and-orphans.sty}{\from{lwarp.dtx}{widows-and-orphans}} \file{lwarp-wrapfig.sty}{\from{lwarp.dtx}{wrapfig}} \file{lwarp-xbmks.sty}{\from{lwarp.dtx}{xbmks}} \file{lwarp-xcolor.sty}{\from{lwarp.dtx}{xcolor}} \file{lwarp-xechangebar.sty}{\from{lwarp.dtx}{xechangebar}} -\file{lwarp-xeCJK.sty}{\from{lwarp.dtx}{xeCJK}} \file{lwarp-xellipsis.sty}{\from{lwarp.dtx}{xellipsis}} +\file{lwarp-xetexko-vertical.sty}{\from{lwarp.dtx}{xetexko-vertical}} \file{lwarp-xfrac.sty}{\from{lwarp.dtx}{xfrac}} \file{lwarp-xltabular.sty}{\from{lwarp.dtx}{xltabular}} \file{lwarp-xltxtra.sty}{\from{lwarp.dtx}{xltxtra}} \file{lwarp-xmpincl.sty}{\from{lwarp.dtx}{xmpincl}} \file{lwarp-xpiano.sty}{\from{lwarp.dtx}{xpiano}} +\file{lwarp-xpinyin.sty}{\from{lwarp.dtx}{xpinyin}} \file{lwarp-xtab.sty}{\from{lwarp.dtx}{xtab}} \file{lwarp-xunicode.sty}{\from{lwarp.dtx}{xunicode}} \file{lwarp-xurl.sty}{\from{lwarp.dtx}{xurl}} \file{lwarp-xy.sty}{\from{lwarp.dtx}{xy}} +\file{lwarp-zhlineskip.sty}{\from{lwarp.dtx}{zhlineskip}} \file{lwarp-zwpagelayout.sty}{\from{lwarp.dtx}{zwpagelayout}} \file{lwarp-patch-komascript.sty}{\from{lwarp.dtx}{patch-komascript}} \file{lwarp-patch-memoir.sty}{\from{lwarp.dtx}{patch-memoir}} -- cgit v1.2.3