diff options
author | Karl Berry <karl@freefriends.org> | 2017-03-15 21:18:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-03-15 21:18:37 +0000 |
commit | 0fa206ea66a7e504a71b460222d74c41253eaa3c (patch) | |
tree | e6a1bc1e5d94c6fad303013bee3edb3ef33dd76c /Master/texmf-dist/source/latex/lwarp | |
parent | e713cc2bf72641ba4b55583d6a4eebb89f464937 (diff) |
lwarp (15mar17)
git-svn-id: svn://tug.org/texlive/trunk@43511 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/lwarp')
-rw-r--r-- | Master/texmf-dist/source/latex/lwarp/lwarp.dtx | 972 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/lwarp/lwarp.ins | 140 |
2 files changed, 784 insertions, 328 deletions
diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx index d3ff89f4f86..7d75f17ad54 100644 --- a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx +++ b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx @@ -16,7 +16,7 @@ % \iffalse %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{lwarp} -%<package> [2017/03/02 v0.23 Allows LaTeX to directly produce HTML5 output.] +%<package> [2017/03/15 v0.24 Allows LaTeX to directly produce HTML5 output.] % %<*driver> \documentclass{ltxdoc} @@ -568,6 +568,14 @@ A line of text with an inline minipage or parbox will have the minipage or parbox placed onto its own line, because a paragraph is a block element and cannot be made \texttt{inline-block}. +Side-by-side minipages may be separated by \cs{quad}, \cs{qquad}, \cs{enskip}, +\margintag{side-by-side} +\cs{hspace}, \cs{hfill}, or a \cs{rule}. +When inside a \texttt{center} environment, the result is +similar in print and \acro{HTML}. Paragraph tags are surpressed between +side-by-side minipages and these spacing commands, but not at the start or end +of the paragraph. + There is limited support for minipages inside an \acro{HTML} \tag{span}. \margintag{in a span} An \acro{HTML} \tag{div} cannot appear inside a \tag{span}. @@ -578,6 +586,10 @@ When using \cs{linewidth}, \cs{textwidth}, and \cs{textheight}, \margintag{size} widths and heights are scaled proportionally to a 6\texttimes{}9 inch text area. +A minipage of width exactly \cs{linewidth} is automatically +given no \acro{HTML} width. +\margintag{no-width minipages} + A new macro \cs{minipagefullwidth} requests \margintag{full-width minipages} that the next minipage be generated @@ -642,10 +654,15 @@ If using \cs{newfloat}, \pkg{trivfloat}, and/or } \newcommand{\limitssubfig}{% -At present, subfigures before the enclosing figure/table's \cs{caption} -\margintag{LOF/LOT} -would appear in the List of Figures/Tables before the enclosing figure/table, -therefore \pkg{lwarp} does not place subfigures in the LOF/LOT. +% At present, subfigures before the enclosing figure/table's \cs{caption} +% \margintag{LOF/LOT} +% would appear in the List of Figures/Tables before the enclosing figure/table, +% therefore \pkg{lwarp} does not place subfigures in the LOF/LOT. + +At present, the package options for \texttt{lofdepth} and \texttt{lotdepth} +\watchout[\texttt{lof/lotdepth}] +are not working. These counters must be set separately after the +package has been loaded. In the document source, use \cs{hfill} and \cs{hspace*} \margintag{horizontal spacing} @@ -656,6 +673,11 @@ appearing on the following lines instead of all on a single line. } \newcommand{\limitsfloatrow}{% +When combined with the \pkg{subfig} package, +\watchout[\pkg{subfig} package] +while inside a \env{subfloatrow} \cs{ffigbox} and \cs{ttabbox} +must have the caption in the first of the two of the mandatory arguments. + The emulation of \pkg{floatrow} does not support \cs{FBwidth} or \cs{FBheight}. These values are pre-set to \texttt{.3\cs{linewidth}} and \texttt{2in}. \watchout[\cs{FBwidth}, \cs{FBheight}] @@ -678,16 +700,6 @@ Do not use \cmds{per-mode=fraction}, which cannot be seen by the final \cmds{pdf \watchout[per-mode] } -\newcommand{\limitstikz}{% -For recent versions of \tikz{} (v3.0.0 --- 2013/12/20 and later), include in the document -\watchout[preamble] -preamble: \\ -\hspace*{.25in} \texttt{\cs{usetikzlibrary\{babel\}} \% v3.0.0 and up} - -For older versions of \tikz{} without the \tikz{} \texttt{babel} library, -\pkg{lwarp} automatically handles the catcode change for the \$ math shift. -} - \newcommand{\limitsbabelone}{% If using \pkg{babel} with French, use \\ @@ -787,7 +799,7 @@ operating-system path separator used by \pkg{lwarp}. %<*package> % \fi % -% \CheckSum{8584} +% \CheckSum{9001} % % \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 @@ -848,6 +860,7 @@ operating-system path separator used by \pkg{lwarp}. % \changes{v0.21}{2017/02/23}{\ 2017/02/23} % \changes{v0.22}{2017/03/02}{\ 2017/03/02} % \changes{v0.23}{2017/03/02}{\ 2017/03/02} +% \changes{v0.24}{2017/03/15}{\ 2017/03/15} @@ -977,6 +990,12 @@ operating-system path separator used by \pkg{lwarp}. % For a detailed list of changes, see the Change History on page \pageref{sec:changehistory}. % % \begin{description} +% \item[v0.24:] \ +% \begin{itemize} +% \item \pkg{tikz}'s |babel| library is load automatically as needed. +% \item \pkg{subfig} has been added, along with |lofdepth| and |lotdepth|. +% \item \env{picture} and \env{tikzpicture} now may be inline. +% \end{itemize} % \item[v0.22:] \ % \begin{itemize} % \item Support has been added for tabular column types |D|, |!|, and |X|. @@ -1213,6 +1232,7 @@ operating-system path separator used by \pkg{lwarp}. % Floats: & Supported, appear where declared. % \pkg{float} is emulated, \pkg{newfloat} is supported, % \pkg{caption} and \pkg{subcaption} are supported, +% \pkg{subfig} is supported, % \pkg{capt-of} is supported, % \pkg{placeins} is ignored, % \pkg{trivfloat} is supported, \pkg{floatrow} is emulated, @@ -2291,7 +2311,12 @@ operating-system path separator used by \pkg{lwarp}. % Defaults to the \cs{BaseJobname}. A common setting is: \\ % \hspace*{2em}|\newcommand{HomeHTMLFilename}{index}| \\ % causing the -% homepage to be the file |index.html|. Underscores are allowed in filenames. +% homepage to be the file |index.html|. Underscores are allowed in +% \margintag{filename underscore} +% \cs{HomeHTMLFilename} and \cs{HTMLFilename}, but usually must be escaped +% elsewhere, such as |\item [\href{file\_name.pdf}{text}] \| +% \index{underscore>filename}\index{file>underscore} +% \changes{v0.24}{2017/03/13}{Docs: Filename underscore.} % % \ItemDescribeMacro{\HTMLFileName} A filename prefix for the rest of the \acro{HTML} web pages. % Useful for numbered web pages with a common prefix. May be empty. @@ -2329,8 +2354,8 @@ operating-system path separator used by \pkg{lwarp}. % % If |SideTOCDepth|\,<\,|FileDepth|, web pages will be inaccessible via the % side\acro{TOC}. \watchout -% \index{files>inaccessible} -% \index{pages>inacessible} +% \index{file>inaccessible} +% \index{page>inacessible} % \index{missing sections} % \index{section>missing} % @@ -2345,8 +2370,8 @@ operating-system path separator used by \pkg{lwarp}. % \watchout\\ % Place a \cs{tableofcontents} somewhere before the first section % break (therefore in the ``home page''), and set |tocdepth|\,>=\,|FileDepth|. -% \index{files>inaccessible} -% \index{pages>inacessible} +% \index{file>inaccessible} +% \index{page>inacessible} % \index{missing sections} % \index{section>missing} % \end{itemize} @@ -2875,6 +2900,22 @@ operating-system path separator used by \pkg{lwarp}. % Use a trailing backslash: |\item[label] \| % \index{item, list, empty}\index{list item, empty} % +% \item [Filenames in lists:] \ +% +% Escape underscores in +% \margintag{filename underscore} +% the filenames: \\ +% \hspace*{2em}|\item[\href{file\_name.pdf}{text}]| +% \index{underscore>filename}\index{file>underscore} +% \changes{v0.24}{2017/03/13}{Docs: Filename underscore.} +% +% \item [Side-by-side minipages:] \ +% +% Place side-by-side minipages inside a |center| environment, +% with horizontal space between them, such as \cs{quad}, \cs{qquad}, +% \cs{hspace}, or \cs{hfill}. The result is similar in print and +% \acro{HTML}. Do not use space commands at the start or end of the line. +% % \item [\cs{fbox} around a minipage:] ~ % % \cs{fbox} can only be used around inline items during @@ -2933,7 +2974,7 @@ operating-system path separator used by \pkg{lwarp}. % % \DescribeEnv{titlepage} % The \env{titlepage} environment may be used to hold a custom title page. -% The titlepage will be set in a div class |titlepage|, and \cs{printtitle}, etc.\ may be used +% The titlepage will be set in a |div| class |titlepage|, and \cs{printtitle}, etc.\ may be used % inside this environment. % % \DescribeEnv{titlingpage} @@ -2946,31 +2987,31 @@ operating-system path separator used by \pkg{lwarp}. % file break and \acro{CSS} detection. % \watchout % Use the |\subtitle| command instead. -% In \acro{HTML}, the title will appear in a heading ``h1''. +% In \acro{HTML}, the title will appear in a heading |h1|. % % \DescribeMacro{\author} \marg{author} % % In |\author|, use |\protect| before formatting commands such as |\textsc|. % \watchout -% In \acro{HTML}, the author will appear in a div class |author|. +% In \acro{HTML}, the author will appear in a |div| class |author|. % \cs{affiliation} is a new addition to \pkg{lwarp}. % % \DescribeMacro{\date} \marg{date} % % |\date| works as expected. -% In \acro{HTML}, this will appear in a div class ``titledate''. +% In \acro{HTML}, this will appear in a |div| class |titledate|. % % \DescribeMacro{\subtitle} \marg{subtitle} % % A new command which sets a subtitle. Newlines are allowed. % The default is empty. -% In \acro{HTML}, this will appear in a div class ``subtitle''. +% In \acro{HTML}, this will appear in a |div| class |subtitle|. % % \DescribeMacro{\published} \marg{published} % % A new command which sets a publisher. % The default is empty. -% In \acro{HTML}, this will appear in a div class ``published''. +% In \acro{HTML}, this will appear in a |div| class |published|. % % % \DescribeMacro{\thanks} \marg{text} @@ -3064,13 +3105,6 @@ operating-system path separator used by \pkg{lwarp}. % \limitsxcolor % % -% \subsubsection{\tikz} -% -% \limitstikz -% -% See \cref{sec:tikz}. -% -% % \subsubsection{Tabular} % % \limitstabular @@ -3094,9 +3128,9 @@ operating-system path separator used by \pkg{lwarp}. % \limitscaption % % -% ^^A \subsubsection{\pkg{subfig} package} +% \subsubsection{\pkg{subfig} package} % -% ^^A \limitssubfig +% \limitssubfig % % % \subsubsection{\pkg{floatrow} package} @@ -3844,9 +3878,11 @@ after lwarp.} \LWR@loadafter{setspace} \LWR@loadafter{showkeys} \LWR@loadafter{sidecap} +\LWR@loadafter{subfig} \LWR@loadafter{tabularx} \LWR@loadafter{textpos} \LWR@loadafter{threeparttable} +\LWR@loadafter{tikz} \LWR@loadafter{titleps} \LWR@loadafter{titlesec} \LWR@loadafter{titletoc} @@ -4232,10 +4268,8 @@ top=1in,bottom=1in,% \RequirePackage{caption} % \end{macrocode} -% \DescribePackage{subcaption} -% \begin{macrocode} -\RequirePackage{subcaption} -% \end{macrocode} +% \changes{v0.24}{2017/03/06}{No longer preloads \pkg{subcaption}; +% conflicted with \pkg{subfig}.} % \DescribePackage{enumitem} @@ -5126,11 +5160,13 @@ top=1in,bottom=1in,% % with a leading underscore to avoid colliding with the HTML filename |index.html|: % \begin{macrocode} {% -\LWR@traceinfo{LWR@htmlsectionfilename C}% +\LWR@traceinfo{LWR@htmlsectionfilename C \LWR@tempone}% \ifthenelse{% \equal{\HTMLFileName}{} \AND \equal{\LWR@tempone}{Index} \OR \equal{\LWR@tempone}{index}% }% -{\_#1.html}% +{% +\LWR@traceinfo{prefixing the index name with an underscore.}% +\_#1.html}% % \end{macrocode} % Otherwise, create a filename with the chosen prefix: % \begin{macrocode} @@ -7308,6 +7344,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \margintag{Label in \acro{HTML}} % \changes{v0.20}{2017/01/30}{Fix: math cross references.} % \begin{macrocode} +\let\LWR@origltx@label\ltx@label \let\ltx@label\LWR@htmlmathlabel % \end{macrocode} % Logos: @@ -9413,10 +9450,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% {% not at the left edge: \LWR@traceinfo{not at the left edge}% \LWR@setexparray{LWR@colatspec}{\theLWR@tabletotalcols}{\LWR@strresult}% -\LWR@traceinfo{at \theLWR@tabletotalcols: \LWR@colatspec(\theLWR@tabletotalcols)!}% -}% +\LWR@traceinfo{at \theLWR@tabletotalcols: % + \LWR@getexparray{LWR@colatspec}{\theLWR@tabletotalcols})!}% \let\LWR@strresult\relax% \booltrue{LWR@validtablecol}% +}% } % \end{macrocode} % \end{macro} @@ -10591,6 +10629,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \changes{v0.14}{2016/03/29}{Docs: Table: Cross-referencing data structures.} % \changes{v0.19}{2016/05/25}{Docs: Table: Cross-referencing data structures, updated.} % \begin{table} +% \small % \caption{Cross-referencing data structures\label{tab:crossrefdata}} % \medskip % \hrule @@ -10608,17 +10647,27 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \item [\cs{ref}:] Returns the first part of \cs{r@<label>}. % \item [\cs{pageref}:] Returns the second part of \cs{r@<label>}. % \end{description} -% \item [Added by \pkg{amsmath}:] \hfill (print and \acro{HTML}) -% \begin{description} -% \item [\cs{label}:] Delayed until math is completed. -% \end{description} % \item [Added by \pkg{lwarp}:] \hfill (\acro{HTML} only) % \begin{description} +% \item [\cs{label}:] Adds \acro{HTML} tags (\cref{sec:labels}), +% plus \cs{splabel} data (\cref{sec:zrefsetup}): +% \begin{description} +% \item [zLWR@name:] The section name for this label. +% \item [zLWR@htmlfilenumer:] The filenumber or name for this label. +% \item [zLWR@lateximagedepth:] The |lateximagedepth| for this label. +% \item [zLWR@lateximagenumber:] The |lateximagenumber| for this label. +% \end{description} % \item [\cs{nameref}:] Emualted from \pkg{hyperref} for \pkg{lwarp}. % See \cref{sec:references}. % \item [\cs{ref} and \cs{nameref}:] Adds \acro{HTML} tags. % See \cref{sec:references}. % \end{description} +% \item [Added by \pkg{amsmath}:] \hfill (print and \acro{HTML}) +% \begin{description} +% \item [\cs{label}:] Execution is delayed until the math environment is completed. +% \item [\cs{ltx@label}:] \LaTeX\ \cs{label}, +% (\acro{HTML:}patched by \pkg{lwarp},) later patched by \pkg{cleveref}. +% \end{description} % \item [Added by \pkg{cleverref}:] \hfill (print and \acro{HTML}) % \begin{description} % \item [\cs{refstepcounter:}] Added: sets \cs{cref@currentlabel}. @@ -10638,14 +10687,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{description} % \item [\cs{cref}, etc.:] Modified for \pkg{lwarp}. % See \cref{sec:cleveref}. -% \item [\cs{label}:] Adds \acro{HTML} tags (\cref{sec:labels}), -% plus \cs{splabel} data (\cref{sec:zrefsetup}): -% \begin{description} -% \item [zLWR@name:] The section name for this label. -% \item [zLWR@htmlfilenumer:] The filenumber or name for this label. -% \item [zLWR@lateximagedepth:] The |lateximagedepth| for this label. -% \item [zLWR@lateximagenumber:] The |lateximagenumber| for this label. -% \end{description} % \item [\cs{label} inside math:] See \cref{sec:amsmathsupport}. % \end{description} % \item [Footnotes:] See \cs{noteentry} in \cref{sec:footnotesregular}. @@ -10758,12 +10799,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{macrocode} % \end{macro} % \begin{macro}{\LWR@htmlfileref} \marg{label} +% \changes{v0.24}{2017/03/13}{Fix: Index links while \cs{tracinglwarp}.} % Returns the file number for this label: % \begin{macrocode} \newcommand*{\LWR@htmlfileref}[1]{% -\LWR@traceinfo{LWR@htmlfileref A: !#1!}% +% DO NOT USE \LWR@traceinfo HERE! Will be expanded. \LWR@spref{#1}{zLWR@htmlfilenumber}% -\LWR@traceinfo{LWR@htmlfileref B}% } % \end{macrocode} % \end{macro} @@ -10833,53 +10874,33 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% } % \end{macrocode} % \end{macro} - - - -% \begin{macro}{\LWR@sublabel} \marg{label} % -% \cs{label} during \acro{HTML} output. -% Creates a traditional \LaTeX\ label, -% adds a special label with additional information, -% and creates an \acro{HTML} id tag. % -% Used by \cs{LWR@htmllabel} and \cs{LWR@htmlmathlabel}. +% \begin{macro}{\LWR@newlabel} \marg{label} +% +% \cs{label} during \acro{HTML} output when not in math mode, +% removing extra spaces around the label, as done by regular \LaTeX\ \cs{label}. +% +% \pkg{clevereref} later encases this to add its own cross-referencing. % \begin{macrocode} -\newcommand*{\LWR@sublabel}[1]{% +\newcommand*{\LWR@newlabel}[1]{% +\LWR@traceinfo{LWR@newlabel: !#1!}% +% \@bsphack% % \end{macrocode} % Create a traditional LaTeX label, as modified by \pkg{cleveref}: % \begin{macrocode} -\LWR@traceinfo{LWR@sublabel: !#1!}% \LWR@origlabel{#1}% % \end{macrocode} % Create a special label which holds the section number, % |LWR@htmlfilenumber|, |LWR@lateximagedepth|, and |LWR@lateximagenumber|: % \begin{macrocode} -\LWR@traceinfo{about to splabel}% -\LWR@traceinfo{filesectionnames is \ifbool{FileSectionNames}{true}{false}}% -\LWR@traceinfo{LWR@thisfilename is !\LWR@thisfilename!}% -\LWR@traceinfo{LWR@htmlfilenumber is \theLWR@htmlfilenumber}% +\LWR@traceinfo{LWR@newlabel: filesectionnames is \ifbool{FileSectionNames}{true}{false}}% +\LWR@traceinfo{LWR@newlabel: LWR@thisfilename is !\LWR@thisfilename!}% +\LWR@traceinfo{LWR@newlabel: LWR@htmlfilenumber is \theLWR@htmlfilenumber}% \LWR@splabel{#1}% \LWR@subsublabel{#1}% -\LWR@traceinfo{finished with LWR@sublabel}% -} -% \end{macrocode} -% \end{macro} -% -% -% -% -% \begin{macro}{\LWR@newlabel} \marg{label} -% -% \cs{label} during \acro{HTML} output when not in math mode, -% removing extra spaces around the label, as done by regular \LaTeX\ \cs{label}. -% \begin{macrocode} -\newcommand*{\LWR@newlabel}[1]{% -\LWR@traceinfo{lwr@newlabel: !#1!}% -% \@bsphack% -\LWR@sublabel{#1}% % \@esphack% -\LWR@traceinfo{lwr@newlabel: done}% +\LWR@traceinfo{LWR@newlabel: done}% } % \end{macrocode} % \end{macro} @@ -10900,53 +10921,74 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \newcommand*{\LWR@startref}[1] {% \edef\LWR@lidref{\LWR@lateximagedepthref{#1}} -\LWR@traceinfo{***LWR@startref A: !#1!}% +\LWR@traceinfo{LWR@startref A: !#1!}% % \end{macrocode} -% Create the tag: +% Create the filename part of the link: % \begin{macrocode} \LWR@htmltag{a href="% -\LWR@traceinfo{***LWR@startref B}% +\LWR@traceinfo{LWR@startref B}% \LWR@htmlrefsectionfilename{#1}% -\LWR@traceinfo{***LWR@startref C}% +\LWR@traceinfo{LWR@startref C}% \#% % \end{macrocode} +% Create the destination id: +% % See if |LWR@lateximagedepth| is unknown: % \begin{macrocode} -\LWR@traceinfo{***LWR@startref D: !#1!}% +\LWR@traceinfo{LWR@startref D: !#1!}% \ifthenelse{\equal{\LWR@lidref}{??}}% % \end{macrocode} -% ``|??|'' if |LWR@lateximagedepth| is unknown: +% ``|??|'' if |LWR@lateximagedepth| is unknown, +% so create a link with an unknown destination: % \begin{macrocode} -{??}% +{% +\LWR@traceinfo{LWR@startref D0: ??} +??}% % \end{macrocode} -% If |LWR@lateximagedepth| is known: +% If |LWR@lateximagedepth| is known. +% Use a lateximage if the depth is greater than zero, +% or a regular link otherwise: % \begin{macrocode} {% -\LWR@traceinfo{***LWR@startref D1}% -\LWR@traceinfo{***depthref is \LWR@lidref}% +\LWR@traceinfo{LWR@startref D1: \LWR@lidref}% \ifthenelse{\cnttest{\LWR@lidref}{>}{0}}% {% -\LWR@traceinfo{***LWR@startref D2}% +\LWR@traceinfo{LWR@startref D2: \LWR@lidref}% lateximage\LWR@lateximagenumberref{#1}% }% {% -\LWR@traceinfo{***LWR@startref D3}% +\LWR@traceinfo{LWR@startref D3}% #1% }% }% -\LWR@traceinfo{***LWR@startref E}% +\LWR@traceinfo{LWR@startref E}% % \end{macrocode} -% closing quote: +% Closing quote: % \begin{macrocode} "{}}% -\LWR@traceinfo{***LWR@startref F}% +\LWR@traceinfo{LWR@startref F}% } % \end{macrocode} % \end{macro} +% \begin{macro}{\LWR@subnewref} \marg{label} \marg{label or sub@label} +% +% Factored for the \pkg{subfig} package. +% Uses the original label for the hyper-reference, +% but prints its own text, such as ``|1(b)|''. +% \begin{macrocode} +\NewDocumentCommand{\LWR@subnewref}{m m}{% +\LWR@traceinfo{LWR@subnewref #1 #2}% +\LWR@startref{#1}% +\LWR@origref{#2}% +\LWR@htmltag{/a}% +} +% \end{macrocode} +% \end{macro} -% \begin{macro}{\ref} * \marg{label} \quad +% \begin{macro}{\ref} * \marg{label} \quad \cs{ref} is \cs{let} to \cs{LWR@newref} +% \begin{macro}{\LWR@newref} * \marg{label} \quad % Create an internal document reference link, % or without a link if starred per \pkg{hyperref}. % \begin{macrocode} @@ -10954,15 +10996,11 @@ lateximage\LWR@lateximagenumberref{#1}% \LWR@traceinfo{LWR@newref #2}% \IfBooleanTF{#1}% {\LWR@origref{#2}}% -{% -\LWR@startref{#2}% -\LWR@origref{#2}% -\LWR@htmltag{/a}% -}% +{\LWR@subnewref{#2}{#2}}% } - % \end{macrocode} % \end{macro} +% \end{macro} % \begin{macro}{\pagerefPageFor} Text for starred page references. @@ -11374,9 +11412,10 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macrocode} \renewcommand{\@@par}{\LWR@closeparagraph\LWR@orig@@par}% % \end{macrocode} -% No need for a minipage inside the caption: +% No need for a |minipage| or \cs{parbox} inside the caption: % \begin{macrocode} \RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}% +\RenewDocumentCommand{\parbox}{O{t} o O{t} m +m}{##5}% % \end{macrocode} % Enclose the original caption code inside an \acro{HTML} tag: % \begin{macrocode} @@ -11411,8 +11450,10 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macro}{\caption@end} % Low-level patches to create \acro{HTML} tags for captions. % \begin{macrocode} +\AtBeginDocument{ \let\caption@begin\LWR@caption@begin \let\caption@end\LWR@caption@end +} % \end{macrocode} % \end{macro} % \end{macro} @@ -11746,7 +11787,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \end{macro} -% \begin{macro}{\hypertoc} \marg{1: depth} \marg{2: class} \marg{3: name} \marg{4: page} +% \begin{macro}{\hypertoc} \marg{1: depth} \marg{2: type} \marg{3: name} \marg{4: page} % % Called by \cs{l@section}, etc. to create a hyperlink to a section. % @@ -11754,7 +11795,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % % \begin{description} % \item[\#1] is depth -% \item[\#2] \acro{HTML} \acro{CSS} class is tocsection, tocsubsection, etc. +% \item[\#2] is |section|, |subsection|, etc. % \item[\#3] the text of the caption % \item[\#4] page number % \end{description} @@ -11770,7 +11811,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % of the given \acro{HTML} class. % \begin{macrocode} \LWR@subhyperrefclass{% -\LWR@htmlrefsectionfilename{autopage-#4}\#autosec-#4}{#3}{#2}% +\LWR@htmlrefsectionfilename{autopage-#4}\#autosec-#4}{#3}{toc#2}% \LWR@stoppars% } {} @@ -11778,20 +11819,50 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \end{macrocode} % \end{macro} -% \begin{macro}{\hypertocfloat} \marg{1: depth} \marg{2: class} +% \DescribeCounter{lofdepth} \acro{TOC} depth for figures. +% \begin{macrocode} +\newcounter{lofdepth} +\setcounter{lofdepth}{1} +% \end{macrocode} + +% \DescribeCounter{lotdepth} \acro{TOC} depth for tables. +% \begin{macrocode} +\newcounter{lotdepth} +\setcounter{lotdepth}{1} +% \end{macrocode} + + +% \begin{macro}{\hypertocfloat} \marg{1: depth} \marg{2: type} % \marg{3: caption} \marg{4: page} % % \begin{description} % \item[\#1] is depth -% \item[\#2] \acro{HTML} \acro{CSS} class is tocfigure, toctable -% \item[\#3] the text of the caption -% \item[\#4] page number +% \item[\#2] is |figure|, |table|, etc. +% \item[\#3] is |lof|, |lot|, of the parent. +% \item[\#4] the text of the caption +% \item[\#5] page number % \end{description} - +% +% \changes{v0.24}{2017/03/06}{List of floats responds to \texttt{lofdepth}, \texttt{lotdepth}.} +% % \begin{macrocode} -\newcommand{\hypertocfloat}[4]{% +\newcommand{\hypertocfloat}[5]{% \LWR@startpars % \end{macrocode} +% If some float-creation package has not yet defined +% the float type's |lofdepth| counter, etc, define it here: +% \begin{macrocode} +\@ifundefined{c@#3depth}{% +\newcounter{#3depth}% +\setcounter{#3depth}{1}% +}{}% +% \end{macrocode} +% Respond to |lofdepth|, etc.: +% \begin{macrocode} +\LWR@traceinfo{hypertocfloat depth is #1 #3depth is \arabic{#3depth}}% +\ifthenelse{\cnttest{#1}{<=}{\arabic{#3depth}}}{% +\LWR@startpars% +% \end{macrocode} % Create an \acro{HTML} link to % filename\#autofloat-(float number), with text of the caption, % of the given \acro{HTML} class. @@ -11799,25 +11870,26 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \LWR@subhyperrefclass{% \LWR@htmlrefsectionfilename{autopage-\arabic{LWR@nextautopage}}% \#autofloat-\arabic{LWR@nextautofloat}}% -{#3}{#2}% +{#4}{toc#2}% \LWR@stoppars% +}{}% } % \end{macrocode} % \end{macro} % Automatically called by |\contentsline|: % \begin{macrocode} -\renewcommand{\l@part}[2]{\hypertoc{-1}{tocpart}{#1}{#2}} +\renewcommand{\l@part}[2]{\hypertoc{-1}{part}{#1}{#2}} \DeclareDocumentCommand{\l@chapter}{m m} - {\hypertoc{0}{tocchapter}{#1}{#2}} -\renewcommand{\l@section}[2]{\hypertoc{1}{tocsection}{#1}{#2}} -\renewcommand{\l@subsection}[2]{\hypertoc{2}{tocsubsection}{#1}{#2}} + {\hypertoc{0}{chapter}{#1}{#2}} +\renewcommand{\l@section}[2]{\hypertoc{1}{section}{#1}{#2}} +\renewcommand{\l@subsection}[2]{\hypertoc{2}{subsection}{#1}{#2}} \renewcommand{\l@subsubsection}[2] - {\hypertoc{3}{tocsubsubsection}{#1}{#2}} -\renewcommand{\l@paragraph}[2]{\hypertoc{4}{tocparagraph}{#1}{#2}} -\renewcommand{\l@subparagraph}[2]{\hypertoc{5}{tocsubparagraph}{#1}{#2}} -\renewcommand{\l@figure}[2]{\hypertocfloat{1}{tocfigure}{#1}{#2}} -\renewcommand{\l@table}[2]{\hypertocfloat{1}{toctable}{#1}{#2}} + {\hypertoc{3}{subsubsection}{#1}{#2}} +\renewcommand{\l@paragraph}[2]{\hypertoc{4}{paragraph}{#1}{#2}} +\renewcommand{\l@subparagraph}[2]{\hypertoc{5}{subparagraph}{#1}{#2}} +\renewcommand{\l@figure}[2]{\hypertocfloat{1}{figure}{lof}{#1}{#2}} +\renewcommand{\l@table}[2]{\hypertocfloat{1}{table}{lot}{#1}{#2}} % \end{macrocode} % \begin{macrocode} @@ -12221,9 +12293,9 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macrocode} \LWR@restoremathlatexformatting % \end{macrocode} -% When a label is encountered, the HTML comment is closed, -% the label is generated in an HTML-output context, -% then the HTML comment is opened again. +% ^^A When a label is encountered, the HTML comment is closed, +% ^^A the label is generated in an HTML-output context, +% ^^A then the HTML comment is opened again. % See \cs{LWR@htmlmathlabel} in \cref{sec:amsmathsupport}. % % Print the contents of the equation: @@ -12377,11 +12449,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{macro}{\LWR@htmlmathlabel} \marg{label} % \index{label>math environment} % -% \cs{label} when called inside a \LaTeX{} AMS math environment's math mode -% which is encased inside an \acro{HTML} comment -% while creating a \acro{HTML} document. +% \pkg{lwarp} points \cs{ltx@label} here. +% This is used by \cs{label} when inside a +% \LaTeX{} AMS math environment's math display environment. +% +% \cs{LWR@origltx@label} points to the \LaTeX\ original, +% modified by \pkg{lwarp}, then by \pkg{amsmath}, +% then by \pkg{cleveref}. % \begin{macrocode} - \newcommand*{\LWR@htmlmathlabel}[1]{% \LWR@traceinfo{LWR@htmlmathlabel #1}% \ifbool{mathjax}{% @@ -12401,9 +12476,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \cs{@firstofone} is required to remove extra braces % introduced by the \pkg{amsmath} package.) % \begin{macrocode} -\LWR@htmlclosecomment\LWR@sublabel{\@firstofone#1}\LWR@htmlopencomment}% +\LWR@htmlclosecomment% +\LWR@origltx@label{#1}% +\LWR@htmlopencomment% +}% text +}% mathjax +{% +\LWR@origltx@label{#1}% }% -{\LWR@sublabel{\@firstofone#1}}% } % \end{macrocode} % \end{macro} @@ -13808,9 +13888,13 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \begin{macrocode} \renewcommand{\@@setcpagerefrange}[3]{% #1{\cpagerefFor\ \cref{#2}}{\cref{#3}}{}{}{}{}} +}% AfterEndPreamble % \end{macrocode} + +% % Remember and patch some label-related defintions. +% These will be further encased and patched by other packages later. % % \begin{macrocode} \let\LWR@origlabel\label @@ -13821,7 +13905,6 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \let\pageref\LWR@newpageref -}% AfterEndPreamble \end{warpHTML} % \end{macrocode} @@ -13835,97 +13918,19 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \DescribeEnv{picture} The \env{picture} environment is enclosed % inside a \cs{lateximage}. - -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} - -% \begin{environment}{picture} -% \begin{macrocode} -\BeforeBeginEnvironment{picture}{ - -\lateximage} - -\AfterEndEnvironment{picture}{\endlateximage - -} -% \end{macrocode} -% \end{environment} - -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} - - - - - -% \section{Tikzpicture} -% \label{sec:tikz} - -% \DescribePackage{tikz} % -% \DescribeEnv{tikzpicture} May be used as-is, and its contents will be -% converted to an image. -% -% \limitstikz -% -% (\pkg{lwarp} changes the catcode of |$| for its own use. -% \margintag{catcodes} -% The \tikz{} |babel| library temporarily changes catcodes -% back to normal for \tikz's use, restoring them to their -% \pkg{lwarp} purpose while inside each \tikz{} node.) -% \index{tikz>dollar redefined} -% \index{tikz>catcodes} % - % \codehtml % \begin{macrocode} \begin{warpHTML} % \end{macrocode} - -% \DescribeBoolean{LWR@tikzbabel} -% \pkg{tikz} v3.0.0 introduced the |babel| library which handles catcode changes. -% For older versions, \pkg{lwarp} must change |$|'s catcode itself. -% \begin{macrocode} -\newbool{LWR@tikzbabel} -\boolfalse{LWR@tikzbabel} - -\AtBeginDocument{ -\@ifpackageloaded{tikz}{ -\@ifpackagelater{tikz}{2013/12/20}% Test for Tikz version v3.0.0 -{\booltrue{LWR@tikzbabel}} -{\boolfalse{LWR@tikzbabel}} -}{} -} -% \end{macrocode} - - - -% \begin{environment}{tikzpicture} -% |tikzpicture| environment is enclosed inside a |\lateximage|. -% -% \changes{v0.13}{2016/03/23}{Fix dollar-redefined bug for newer package.} -% \changes{v0.19}{2016/05/29}{Adapts to tikz version.} -% +% \begin{environment}{picture} +% \changes{v0.24}{2017/03/13}{Fix for inline images.} % \begin{macrocode} -\BeforeBeginEnvironment{tikzpicture}{% - -\lateximage -\ifbool{LWR@tikzbabel} -{} -{\catcode`\$=3} % dollar sign is math shift -} - -\AfterEndEnvironment{tikzpicture}{% -\endlateximage +\BeforeBeginEnvironment{picture}{\lateximage} -\ifbool{LWR@tikzbabel} -{} -{\catcode`\$=\active} -} +\AfterEndEnvironment{picture}{\endlateximage} % \end{macrocode} % \end{environment} @@ -13936,6 +13941,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline + % \section{Boxes and Minipages} % % A \acro{CSS} flexbox is used for minipages and parboxes, @@ -14146,7 +14152,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \end{macrocode} % Reset the text area if are starting the outer-most minipage: % \begin{macrocode} -\LWR@traceinfo{starting minipage}% +\LWR@traceinfo{starting minipage of width #4}% \uselengthunit{in}% \setlength{\LWR@minipagewidth}{#4}% \ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}{% @@ -14155,6 +14161,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \setlength{\textwidth}{6in}% \setlength{\textheight}{9in}% }{}% +\LWR@traceinfo{computed width is \rndprintlength{\LWR@minipagewidth}} \addtocounter{LWR@minipagedepth}{1}% \setlength{\LWR@minipageheight}{\textheight}% default unless specified \IfValueTF{#2}{\setlength{\LWR@minipageheight}{#2}}{}% @@ -14179,7 +14186,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \end{macrocode} % Print the width and optional height styles: % \begin{macrocode} -\LWR@traceinfo{minipage: about to print the width}% +\LWR@traceinfo{minipage: about to print the width of \rndprintlength{\LWR@minipagewidth}}% \uselengthunit{PT}% \ifbool{LWR@minipagefullwidth}% {\boolfalse{LWR@minipagefullwidth}}% @@ -14247,8 +14254,9 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % % A parbox uses the minipage code: % \begin{macrocode} -\RenewDocumentCommand{\parbox}{O{t} o O{t} m m} +\RenewDocumentCommand{\parbox}{O{t} o O{t} m +m} { +\LWR@traceinfo{parbox of width #4}% \begin{minipage}[#1][#2][#3]{#4} #5 \end{minipage} @@ -14713,18 +14721,24 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \begin{macro}{\LWR@hspace} * \marg{length} % % Handles special minipage \& horizontal space interactions. -% \changes{v0.18}{2016/05/13}{\cs{hspace} supported} -% \changes{v0.19}{2016/05/29}{Fix: \cs{hspace} length computations} -% \changes{v0.20}{2016/08/22}{Add: Supports HTML thin breakable space} +% \changes{v0.18}{2016/05/13}{\cs{hspace} supported.} +% \changes{v0.19}{2016/05/29}{Fix: \cs{hspace} length computations.} +% \changes{v0.20}{2016/08/22}{Add: Supports HTML thin breakable space.} +% \changes{v0.24}{2017/03/14}{Add: \cs{hspace} \cs{fill} converts to 2em} % % Prints a span of a given width. Ignores the optional star. % -% \cs{fill} is zero-width, so |\hspace{\fill}| is ignored. +% |\hspace{\fill}| is converted to |\hspace{2em}|, equal to \cs{qquad}. % \begin{macrocode} - \NewDocumentCommand{\LWR@hspace}{s m}{% \setlength{\LWR@tempwidth}{#2}% % \end{macrocode} +% If \cs{fill}, change to \cs{qquad}: +% \begin{macrocode} +\ifnum\gluestretchorder\LWR@tempwidth>0% +\setlength{\LWR@tempwidth}{2em}% +\fi% +% \end{macrocode} % Only if the width is not zero: % \begin{macrocode} \ifthenelse{\dimtest{\LWR@tempwidth}{=}{0pt}}{}{% @@ -15182,6 +15196,7 @@ homehtmlfilename = "\HomeHTMLFileName"% % \changes{v0.14}{2016/03/29}{Docs: Trademarks section.} % % \begin{itemize} +% \item \TeX\ is a trademark of American Mathematical Society. % \item Adobe® and Adobe Framemaker® are either registered trademarks or % trademarks of Adobe Systems Incorporated in the United States and/or other countries. % \item Linux® is the registered trademark of Linus Torvalds in the U.S.\ and other countries. @@ -16007,6 +16022,8 @@ figure.subfigure, figure.subtable { display: inline-block ; margin: 3ex 1em 3ex 1em ; } +figcaption .minipage { margin:0 ; padding: 0 } + div.floatrow { text-align: center; } div.floatrow figure { display: inline-block ; margin: 1ex 2% ; } @@ -16586,7 +16603,7 @@ div.sidebartitle{ border-radius: 1ex ; } -figure.figure .minipage { border: none; } +figure.figure .minipage, figcaption .minipage { border: none; } div.marginblock div.minipage { border: none; } @@ -16841,7 +16858,6 @@ figcaption , .lstlisting { .minipage { background-color: #fffcf5 ; border: none ; - margin: 1em ; } div.floatrow figure { border: none ; } @@ -17068,7 +17084,7 @@ MathJax.Hub.Config({ -- Print the usage of the lwarpmk command: -printversion = "v0.23" +printversion = "v0.24" function printhelp () print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ; @@ -18324,44 +18340,95 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% \LWR@ProvidesPackageDrop{floatrow} % \end{macrocode} -% \changes{v0.14}{2016/03/31}{floatrow: Added package} +% \changes{v0.14}{2016/03/31}{\pkg{floatrow}: Added.} +% \changes{v0.24}{2017/03/15}{\pkg{floatrow}: Support for \pkg{subfig}.} % \limitsfloatrow +% After everything has loaded, remember whether \pkg{subcaption} was loaded. +% If not, it is assumed that \pkg{subfig} is used instead: +% \begin{macrocode} +\newbool{LWR@subcaptionloaded} + +\AtBeginDocument{ +\@ifpackageloaded{subcaption} +{\booltrue{LWR@subcaptionloaded}} +{\boolfalse{LWR@subcaptionloaded}} +} +% \end{macrocode} -% ^^A \begin{macro}{\floatbox} \oarg{1 preamble} \marg{2 captype} -% ^^A \oarg{3 width} \oarg{4 height} \oarg{5 vert pos} -% ^^A \marg{6 caption} \marg{7 object} +% ^^A \begin{macro}{\floatbox} +% \cs{floatbox} \oarg{1 preamble} \marg{2 captype} +% \oarg{3 width} \oarg{4 height} \oarg{5 vert pos} +% \marg{6 caption} \marg{7 object} % -% Only parameters for caption and object are used. +% Only parameters for captype, width, caption, and object are used. % % |LWR@insubfloatrow| is true if inside a \env{subfloatrow} environment. +% +% There are two actions, depending on the use of \pkg{subcaption} or \pkg{subfig}. % \begin{macrocode} \NewDocumentCommand{\floatbox}{o m o o o +m +m}{% -\ifbool{LWR@insubfloatrow} -{ +\ifbool{LWR@subcaptionloaded}% +{% subcaption % \end{macrocode} -% Inside a \env{subfloatrow}. -% \env{subfigure} and \env{subtable} take a width argument. -% Defaults to \cs{linewidth} if none is given. +% For \pkg{subcaption}: % \begin{macrocode} -\IfValueTF{#3} -{\@nameuse{sub#2}{#3}} -{\@nameuse{sub#2}{\linewidth}} -} -{ +\ifbool{LWR@insubfloatrow}% +{% subcaption in a subfloatrow +% \end{macrocode} +% \env{subfigure} and \env{subtable} environments take width as an argument. +% \begin{macrocode} +\IfValueTF{#3}% +{\@nameuse{sub#2}{#3}}% +{\@nameuse{sub#2}{\linewidth}}% +}% subcaption in a subfloatrow +{% subcaption not in subfloatrow +% \end{macrocode} +% \env{figure} and \env{table} environments do not take a width argument. +% \begin{macrocode} +\@nameuse{#2}% +}% subcaption not in subfloatrow +#6 + +#7 +% \end{macrocode} +% End the environments: +% \begin{macrocode} +\ifbool{LWR@insubfloatrow}% +{\@nameuse{endsub#2}}% +{\@nameuse{end#2}}% +}% subcaption +{% assume subfig +% \end{macrocode} +% For \pkg{subfig}: +% \begin{macrocode} +\ifbool{LWR@insubfloatrow}% +{% subfig in a subfloatrow +% \end{macrocode} +% \cs{subfloat} is a macro, not an environment. +% +% Package \pkg{subfig}'s \cs{subfloat} command takes an optional argument which is the +% caption, but \cs{floatbox} argument \#6 contains commands to create +% the caption and label, not the caption itself. Thus, \cs{caption} +% is temporarily disabled to return its own argument without braces. +% \begin{macrocode} +\begingroup +\let\caption\@firstofone +\subfloat[#6]{#7} +\endgroup +}% subfig in a subfloatrow +{% subfig package, but not a subfig % \end{macrocode} -% Not inside a \env{subfloatrow}. -% \env{figure} and \env{table} do not take a width argument. +% \env{figure} and \env{table} are environments: % \begin{macrocode} \@nameuse{#2} -} #6 #7 -\ifbool{LWR@insubfloatrow} -{\@nameuse{endsub#2}} -{\@nameuse{end#2}} +\@nameuse{end#2} +}% subfig package, but not a subfig +}% assume subfig } % \end{macrocode} % ^^A \end{macro} @@ -18502,7 +18569,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% \LWR@frowkeyfileext\ \LWR@frowkeywithin}% \newfloat{#1}{\LWR@frowkeyplacement}% {\LWR@frowkeyfileext}[\LWR@frowkeywithin]% -\LWR@traceinfo{*** finished newfloat #1} +\LWR@traceinfo{finished newfloat #1} }% % \end{macrocode} % Rename the float if a name was given: @@ -19358,7 +19425,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% \let\LWR@origlsthkEveryPar\lsthk@EveryPar -\renewcommand{\l@lstlisting}[2]{\hypertocfloat{1}{toclstlisting}{#1}{#2}} +\renewcommand{\l@lstlisting}[2]{\hypertocfloat{1}{lstlisting}{lol}{#1}{#2}} % \end{macrocode} % % @@ -19544,7 +19611,9 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% \kern\VerbatimHTMLWidth \kern\lst@numbersep \lst@numberstyle{\thelstnumber}}}% }{\PackageError{Listings}{Numbers #1 unknown}\@ehc}} - +% \end{macrocode} +% +% \begin{macrocode} \end{warpHTML} % \end{macrocode} @@ -20907,6 +20976,302 @@ solid % \clearpage % \iffalse +%<*subfig> +% \fi + +% \part{lwarp-subfig.sty} +% +% \section{Subfig} +% +% \DescribePackage{subfig} +% \pkg{subfig} is supported and patched by \pkg{lwarp}. +% +% \changes{v0.24}{2017/03/06}{\pkg{subfig}: Added.} +% +% \limitssubfig +% +% \codehtml +% +% Accept all options for \pkg{lwarp-subfig}: +% \begin{macrocode} +\LWR@ProvidesPackagePass{subfig} +% \end{macrocode} + +% \cs{sf@@@subfloat} \marg{1 type} \oarg{2 lof entry} \oarg{3 caption} \marg{4 contents} +% +% The outer minipage allows side-by-side subfloats with \cs{hfill} between. +% \begin{macrocode} +\long\def\sf@@@subfloat#1[#2][#3]#4{% +\begin{minipage}{\linewidth}% new +\LWR@stoppars% new + \@ifundefined{FBsc@max}{}% + {\FB@readaux{\let\FBsuboheight\relax}}% + \@tempcnta=\@ne + \if@minipage + \@tempcnta=\z@ + \else\ifdim \lastskip=\z@ \else + \@tempcnta=\tw@ + \fi\fi + \ifmaincaptiontop + \sf@top=\sf@nearskip + \sf@bottom=\sf@farskip + \else + \sf@top=\sf@farskip + \sf@bottom=\sf@nearskip + \fi + \leavevmode + \setbox\@tempboxa \hbox{#4}% + \@tempdima=\wd\@tempboxa + \@ifundefined{FBsc@max}{}% + {\global\advance\Xhsize-\wd\@tempboxa + \dimen@=\ht\@tempboxa + \advance\dimen@\dp\@tempboxa + \ifdim\dimen@>\FBso@max + \global\FBso@max\dimen@ + \fi}% + \vtop\bgroup + \vbox\bgroup + \ifcase\@tempcnta + \@minipagefalse + \or + \vskip\sf@top + \or + \ifdim \lastskip=\z@ \else + \@tempskipb\sf@top\relax\@xaddvskip + \fi + \fi + \sf@ifpositiontop{% + \ifx \@empty#3\relax \else + \sf@subcaption{#1}{#2}{#3}% + \vskip\sf@capskip + \vskip\sf@captopadj + \fi\egroup + \hrule width0pt height0pt depth0pt + \LWR@startpars% new +% \box\@tempboxa + #4 + \LWR@stoppars% new + }{% + \LWR@startpars% new + \@ifundefined{FBsc@max}% + { +% \box\@tempboxa + #4 + }% + {\ifx\FBsuboheight\relax +% \box\@tempboxa + #4 + \else +% \vbox to \FBsuboheight{\FBafil\box\@tempboxa\FBbfil}% + #4 + \fi}% + \LWR@stoppars% new + \egroup + \ifx \@empty#3\relax \else + \vskip\sf@capskip + \hrule width0pt height0pt depth0pt + \sf@subcaption{#1}{#2}{#3}% + \fi + }% + \vskip\sf@bottom + \egroup + \@ifundefined{FBsc@max}{}% + {\addtocounter{FRobj}{-1}% + \ifnum\c@FRobj=0\else + \subfloatrowsep + \fi}% + \ifmaincaptiontop\else + \global\advance\@nameuse{c@\@captype}\m@ne + \fi +\end{minipage}% new +\LWR@startpars% new + \endgroup\ignorespaces% +}% +% \end{macrocode} + +% \cs{sf@subcaption} \marg{1 type} \marg{2 lof entry} \marg{3 caption} +% \begin{macrocode} +\long\def\sf@subcaption#1#2#3{% +\LWR@stoppars% new + \ifx \relax#2\relax \else + \bgroup + \let\label=\@gobble + \let\protect=\string + \def\@subcaplabel{% + \caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}}% + \sf@updatecaptionlist{#1}{#2}{\the\value{\@captype}}{\the\value{#1}}% + \egroup + \fi + \bgroup + \ifx \relax#3\relax + \let\captionlabelsep=\relax + \fi +% \setbox0\vbox{% +% \hb@xt@\the\@tempdima{% +% +% % \hss +% % \parbox[t]{\the\@tempdima}{% +% \caption@make +% {\@nameuse{sub\@captype name}}% +% {\@nameuse{thesub\@captype}}% +% {#3} +% % }% +% % \hss +% } +% }% + \@ifundefined{FBsc@max}% +% {\box0}% + { +% \parbox[t]{\the\@tempdima}{% +\LWR@traceinfo{sfsubcap B1}% new + \LWR@htmlblocktag{figcaption}% new + \caption@make + {\@nameuse{sub\@captype name}}% + {\@nameuse{thesub\@captype}}% + {#3} + \LWR@htmlblocktag{/figcaption}% new +\LWR@traceinfo{sfsubcap B2}% new +% }% + }% + {\dimen@\ht0% + \advance\dimen@\dp0% + \ifdim\dimen@>\FBsc@max + \global\FBsc@max\dimen@ + \fi + \FB@readaux{\let\FBsubcheight\relax}% + \ifx\FBsubcheight\relax + \def\next{ +% \parbox[t]{\the\@tempdima} + }% + \else + \def\next{ +% \parbox[t][\FBsubcheight][t]{\the\@tempdima} + }% + \fi + \vbox{% +% \hb@xt@\the\@tempdima{% + +% \hss +% \next{% +\LWR@traceinfo{sfsubcap C1}% new + \caption@make + {\@nameuse{sub\@captype name}}% + {\@nameuse{thesub\@captype}}% + {#3} +\LWR@traceinfo{sfsubcap C1}% new +% }% +% \hss + +% } + } + }% + \egroup +\LWR@startpars% new +} +% \end{macrocode} + +% \cs{caption@@@make} \marg{caption label} \marg{caption text} +% \begin{macrocode} +\renewcommand\caption@@@make[2]{% +\LWR@startpars% new + \sbox\@tempboxa{#1}% + \ifdim\wd\@tempboxa=\z@ + \let\caption@lsep\relax + \fi + \caption@ifempty{#2}{% + \let\caption@lsep\@empty + \let\caption@tfmt\@firstofone + }% +% \@setpar{\@@par\caption@@par}\caption@@par +\renewcommand{\@@par}{\LWR@closeparagraph\LWR@orig@@par}% new + \caption@applyfont + \caption@fmt + {\ifcaption@star\else + \begingroup + \captionlabelfont + #1% + \endgroup + \fi}% + {\ifcaption@star\else + \begingroup + \caption@iflf\captionlabelfont + \relax\caption@lsep + \endgroup + \fi}% + {{\captiontextfont + \caption@ifstrut + {\vrule\@height\ht\strutbox\@width\z@}% + {}% + \nobreak\hskip\z@skip % enable hyphenation + \caption@tfmt{#2} + \LWR@ensuredoingapar% new + \caption@ifstrut + {\ifhmode\@finalstrut\strutbox\fi}% + {}% + \par}} +\LWR@stoppars% new +} +% \end{macrocode} + + +% Patches for \cs{sf@sub@label}: +% \begin{macrocode} +\def\subfloat@label{% +\LWR@ensuredoingapar% new + \@ifnextchar(% %) match left parenthesis + {\sf@sub@label} + {\sf@sub@label(Sub\@captype\space + \@ifundefined{thechapter}{}{\@nameuse{thechapter}\space}% + \@nameuse{p@sub\@captype}% + \@nameuse{thesub\@captype}.)}} +% \end{macrocode} + + + +% Patches for \cs{subref}. +% +% The unstarred version uses a \cs{ref} link whose printed text +% comes from the |sub@<label>|: +% \begin{macrocode} +\renewcommand{\sf@subref}[1]{% +\LWR@subnewref{#1}{sub@#1}% +} +% \end{macrocode} +% The starred version uses the printed |sub@<label>| which is stored as +% if it were a page number: +% \begin{macrocode} +\renewcommand{\sf@@subref}[1]{\LWR@origpageref{sub@#1}} +% \end{macrocode} +% +% Defining new subfloats. The |l@sub<type>| for each is redefined. +% \begin{macrocode} +\let\LWR@orig@newsubfloat\@newsubfloat + +\def\@newsubfloat[#1]#2{% +\LWR@orig@newsubfloat[#1]{#2}% +\renewcommand{\l@sub#2}[2]{\hypertocfloat{2}{sub#2}{\ext@sub#2}{##1}{##2}} +} +% \end{macrocode} +% +% Pre-defined for figures and tables: +% \begin{macrocode} +\renewcommand{\l@subfigure}[2]{\hypertocfloat{2}{subfigure}{lof}{#1}{#2}} +\renewcommand{\l@subtable}[2]{\hypertocfloat{2}{subtable}{lot}{#1}{#2}} +% \def\subfigure{\subfloat} +% \def\subtable{\subfloat} +% \end{macrocode} + + +% \iffalse +%</subfig> +% \fi + + + + +% \clearpage + +% \iffalse %<*tabularx> % \fi @@ -21057,6 +21422,93 @@ solid + +% \clearpage + +% \iffalse +%<*tikz> +% \fi + +% \part{lwarp-tikz.sty} +% +% \section{Tikz} +% +% \DescribePackage{tikz} +% \pkg{tikz} is supported. +% +% \changes{v0.24}{2017/03/11}{\pkg{tikz}: For tikz v3.0.0 or later, +% auto-loads tikz babel library if necessary.} +% +% Accept all options for \pkg{lwarp-tikz}: +% \begin{macrocode} +\LWR@ProvidesPackagePass{tikz} +% \end{macrocode} + + +% \pkg{lwarp} changes the catcode of |$| for its own use. +% \margintag{catcodes} +% The \tikz{} |babel| library temporarily changes catcodes +% back to normal for \tikz's use. +% \index{tikz>dollar redefined} +% \index{tikz>catcodes} +% \pkg{tikz} v3.0.0 introduced the |babel| library which handles catcode changes. +% For older versions, \pkg{lwarp} must change |$|'s catcode itself. +% + +% \codehtml +% \begin{macrocode} +\begin{warpHTML} +% \end{macrocode} + + + +% \begin{macrocode} +\newboolean{LWR@tikzbabel} + +\@ifpackagelater{tikz}{2013/12/20}% Test for Tikz version v3.0.0 +{ +\usetikzlibrary{babel} +\booltrue{LWR@tikzbabel} +} +{\boolfalse{LWR@tikzbabel}} +% \end{macrocode} + + +% \begin{environment}{tikzpicture} +% |tikzpicture| environment is enclosed inside a |\lateximage|. +% May be used as-is, and its contents will be converted to an image. +% +% \changes{v0.13}{2016/03/23}{Fix dollar-redefined bug for newer package.} +% \changes{v0.19}{2016/05/29}{Adapts to tikz version.} +% \changes{v0.24}{2017/03/13}{Fix for inline images.} +% +% \begin{macrocode} +\BeforeBeginEnvironment{tikzpicture}{% +\lateximage% +\ifbool{LWR@tikzbabel}% Test for Tikz version v3.0.0 +{}% +{\catcode`\$=3} % dollar sign is math shift +} + +\AfterEndEnvironment{tikzpicture}{% +\endlateximage% +\ifbool{LWR@tikzbabel}% Test for Tikz version v3.0.0 +{}% +{\catcode`\$=\active}% +} +% \end{macrocode} +% \end{environment} + +% \begin{macrocode} +\end{warpHTML} +% \end{macrocode} + +% \iffalse +%</tikz> +% \fi + + + % \clearpage % \iffalse diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.ins b/Master/texmf-dist/source/latex/lwarp/lwarp.ins index 7905619f738..2ec40e32f01 100644 --- a/Master/texmf-dist/source/latex/lwarp/lwarp.ins +++ b/Master/texmf-dist/source/latex/lwarp/lwarp.ins @@ -31,74 +31,78 @@ and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later. \endpreamble \askforoverwritefalse -\generate{\file{lwarp.sty}{\from{lwarp.dtx}{package}}} -\generate{\file{lwarp-newproject.sty}{\from{lwarp.dtx}{lwarp-newproject}}} -\generate{\file{lwarp-abstract.sty}{\from{lwarp.dtx}{abstract}}} -\generate{\file{lwarp-afterpage.sty}{\from{lwarp.dtx}{afterpage}}} -\generate{\file{lwarp-algorithmicx.sty}{\from{lwarp.dtx}{algorithmicx}}} -\generate{\file{lwarp-alltt.sty}{\from{lwarp.dtx}{alltt}}} -\generate{\file{lwarp-bookmark.sty}{\from{lwarp.dtx}{bookmark}}} -\generate{\file{lwarp-booktabs.sty}{\from{lwarp.dtx}{booktabs}}} -\generate{\file{lwarp-changepage.sty}{\from{lwarp.dtx}{changepage}}} -\generate{\file{lwarp-dcolumn.sty}{\from{lwarp.dtx}{dcolumn}}} -\generate{\file{lwarp-draftwatermark.sty}{\from{lwarp.dtx}{draftwatermark}}} -\generate{\file{lwarp-enumerate.sty}{\from{lwarp.dtx}{enumerate}}} -\generate{\file{lwarp-epigraph.sty}{\from{lwarp.dtx}{epigraph}}} -\generate{\file{lwarp-eso-pic.sty}{\from{lwarp.dtx}{eso-pic}}} -\generate{\file{lwarp-everypage.sty}{\from{lwarp.dtx}{everypage}}} -\generate{\file{lwarp-extramarks.sty}{\from{lwarp.dtx}{extramarks}}} -\generate{\file{lwarp-fancyhdr.sty}{\from{lwarp.dtx}{fancyhdr}}} -\generate{\file{lwarp-float.sty}{\from{lwarp.dtx}{float}}} -\generate{\file{lwarp-floatrow.sty}{\from{lwarp.dtx}{floatrow}}} -\generate{\file{lwarp-fontenc.sty}{\from{lwarp.dtx}{fontenc}}} -\generate{\file{lwarp-fontspec.sty}{\from{lwarp.dtx}{fontspec}}} -\generate{\file{lwarp-ftnright.sty}{\from{lwarp.dtx}{ftnright}}} -\generate{\file{lwarp-geometry.sty}{\from{lwarp.dtx}{geometry}}} -\generate{\file{lwarp-graphicx.sty}{\from{lwarp.dtx}{graphicx}}} -\generate{\file{lwarp-graphics.sty}{\from{lwarp.dtx}{graphics}}} -\generate{\file{lwarp-hyperref.sty}{\from{lwarp.dtx}{hyperref}}} -\generate{\file{lwarp-indentfirst.sty}{\from{lwarp.dtx}{indentfirst}}} -\generate{\file{lwarp-inputenc.sty}{\from{lwarp.dtx}{inputenc}}} -\generate{\file{lwarp-keyfloat.sty}{\from{lwarp.dtx}{keyfloat}}} -\generate{\file{lwarp-layout.sty}{\from{lwarp.dtx}{layout}}} -\generate{\file{lwarp-letterspace.sty}{\from{lwarp.dtx}{letterspace}}} -\generate{\file{lwarp-listings.sty}{\from{lwarp.dtx}{listings}}} -\generate{\file{lwarp-longtable.sty}{\from{lwarp.dtx}{longtable}}} -\generate{\file{lwarp-lscape.sty}{\from{lwarp.dtx}{lscape}}} -\generate{\file{lwarp-ltcaption.sty}{\from{lwarp.dtx}{ltcaption}}} -\generate{\file{lwarp-mcaption.sty}{\from{lwarp.dtx}{mcaption}}} -\generate{\file{lwarp-mdframed.sty}{\from{lwarp.dtx}{mdframed}}} -\generate{\file{lwarp-microtype.sty}{\from{lwarp.dtx}{microtype}}} -\generate{\file{lwarp-multicol.sty}{\from{lwarp.dtx}{multicol}}} -\generate{\file{lwarp-multirow.sty}{\from{lwarp.dtx}{multirow}}} -\generate{\file{lwarp-nameref.sty}{\from{lwarp.dtx}{nameref}}} -\generate{\file{lwarp-needspace.sty}{\from{lwarp.dtx}{needspace}}} -\generate{\file{lwarp-newclude.sty}{\from{lwarp.dtx}{newclude}}} -\generate{\file{lwarp-newunicodechar.sty}{\from{lwarp.dtx}{newunicodechar}}} -\generate{\file{lwarp-nextpage.sty}{\from{lwarp.dtx}{nextpage}}} -\generate{\file{lwarp-nowidow.sty}{\from{lwarp.dtx}{nowidow}}} -\generate{\file{lwarp-pagenote.sty}{\from{lwarp.dtx}{pagenote}}} -\generate{\file{lwarp-parskip.sty}{\from{lwarp.dtx}{parskip}}} -\generate{\file{lwarp-placeins.sty}{\from{lwarp.dtx}{placeins}}} -\generate{\file{lwarp-ragged2e.sty}{\from{lwarp.dtx}{ragged2e}}} -\generate{\file{lwarp-rotating.sty}{\from{lwarp.dtx}{rotating}}} -\generate{\file{lwarp-setspace.sty}{\from{lwarp.dtx}{setspace}}} -\generate{\file{lwarp-sidecap.sty}{\from{lwarp.dtx}{sidecap}}} -\generate{\file{lwarp-showkeys.sty}{\from{lwarp.dtx}{showkeys}}} -\generate{\file{lwarp-tabularx.sty}{\from{lwarp.dtx}{tabularx}}} -\generate{\file{lwarp-textpos.sty}{\from{lwarp.dtx}{textpos}}} -\generate{\file{lwarp-threeparttable.sty}{\from{lwarp.dtx}{threeparttable}}} -\generate{\file{lwarp-titleps.sty}{\from{lwarp.dtx}{titleps}}} -\generate{\file{lwarp-titlesec.sty}{\from{lwarp.dtx}{titlesec}}} -\generate{\file{lwarp-titletoc.sty}{\from{lwarp.dtx}{titletoc}}} -\generate{\file{lwarp-titling.sty}{\from{lwarp.dtx}{titling}}} -\generate{\file{lwarp-tocloft.sty}{\from{lwarp.dtx}{tocloft}}} -\generate{\file{lwarp-trivfloat.sty}{\from{lwarp.dtx}{trivfloat}}} -\generate{\file{lwarp-verse.sty}{\from{lwarp.dtx}{verse}}} -\generate{\file{lwarp-wallpaper.sty}{\from{lwarp.dtx}{wallpaper}}} -\generate{\file{lwarp-wrapfig.sty}{\from{lwarp.dtx}{wrapfig}}} -\generate{\file{lwarp-xcolor.sty}{\from{lwarp.dtx}{xcolor}}} -\generate{\file{lwarp-xfrac.sty}{\from{lwarp.dtx}{xfrac}}} +\generate{ +\file{lwarp.sty}{\from{lwarp.dtx}{package}} +\file{lwarp-newproject.sty}{\from{lwarp.dtx}{lwarp-newproject}} +\file{lwarp-abstract.sty}{\from{lwarp.dtx}{abstract}} +\file{lwarp-afterpage.sty}{\from{lwarp.dtx}{afterpage}} +\file{lwarp-algorithmicx.sty}{\from{lwarp.dtx}{algorithmicx}} +\file{lwarp-alltt.sty}{\from{lwarp.dtx}{alltt}} +\file{lwarp-bookmark.sty}{\from{lwarp.dtx}{bookmark}} +\file{lwarp-booktabs.sty}{\from{lwarp.dtx}{booktabs}} +\file{lwarp-changepage.sty}{\from{lwarp.dtx}{changepage}} +\file{lwarp-dcolumn.sty}{\from{lwarp.dtx}{dcolumn}} +\file{lwarp-draftwatermark.sty}{\from{lwarp.dtx}{draftwatermark}} +\file{lwarp-enumerate.sty}{\from{lwarp.dtx}{enumerate}} +\file{lwarp-epigraph.sty}{\from{lwarp.dtx}{epigraph}} +\file{lwarp-eso-pic.sty}{\from{lwarp.dtx}{eso-pic}} +\file{lwarp-everypage.sty}{\from{lwarp.dtx}{everypage}} +\file{lwarp-extramarks.sty}{\from{lwarp.dtx}{extramarks}} +\file{lwarp-fancyhdr.sty}{\from{lwarp.dtx}{fancyhdr}} +\file{lwarp-float.sty}{\from{lwarp.dtx}{float}} +\file{lwarp-floatrow.sty}{\from{lwarp.dtx}{floatrow}} +\file{lwarp-fontenc.sty}{\from{lwarp.dtx}{fontenc}} +\file{lwarp-fontspec.sty}{\from{lwarp.dtx}{fontspec}} +\file{lwarp-ftnright.sty}{\from{lwarp.dtx}{ftnright}} +\file{lwarp-geometry.sty}{\from{lwarp.dtx}{geometry}} +\file{lwarp-graphicx.sty}{\from{lwarp.dtx}{graphicx}} +\file{lwarp-graphics.sty}{\from{lwarp.dtx}{graphics}} +\file{lwarp-hyperref.sty}{\from{lwarp.dtx}{hyperref}} +\file{lwarp-indentfirst.sty}{\from{lwarp.dtx}{indentfirst}} +\file{lwarp-inputenc.sty}{\from{lwarp.dtx}{inputenc}} +\file{lwarp-keyfloat.sty}{\from{lwarp.dtx}{keyfloat}} +\file{lwarp-layout.sty}{\from{lwarp.dtx}{layout}} +\file{lwarp-letterspace.sty}{\from{lwarp.dtx}{letterspace}} +\file{lwarp-listings.sty}{\from{lwarp.dtx}{listings}} +\file{lwarp-longtable.sty}{\from{lwarp.dtx}{longtable}} +\file{lwarp-lscape.sty}{\from{lwarp.dtx}{lscape}} +\file{lwarp-ltcaption.sty}{\from{lwarp.dtx}{ltcaption}} +\file{lwarp-mcaption.sty}{\from{lwarp.dtx}{mcaption}} +\file{lwarp-mdframed.sty}{\from{lwarp.dtx}{mdframed}} +\file{lwarp-microtype.sty}{\from{lwarp.dtx}{microtype}} +\file{lwarp-multicol.sty}{\from{lwarp.dtx}{multicol}} +\file{lwarp-multirow.sty}{\from{lwarp.dtx}{multirow}} +\file{lwarp-nameref.sty}{\from{lwarp.dtx}{nameref}} +\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-nowidow.sty}{\from{lwarp.dtx}{nowidow}} +\file{lwarp-pagenote.sty}{\from{lwarp.dtx}{pagenote}} +\file{lwarp-parskip.sty}{\from{lwarp.dtx}{parskip}} +\file{lwarp-placeins.sty}{\from{lwarp.dtx}{placeins}} +\file{lwarp-ragged2e.sty}{\from{lwarp.dtx}{ragged2e}} +\file{lwarp-rotating.sty}{\from{lwarp.dtx}{rotating}} +\file{lwarp-setspace.sty}{\from{lwarp.dtx}{setspace}} +\file{lwarp-sidecap.sty}{\from{lwarp.dtx}{sidecap}} +\file{lwarp-showkeys.sty}{\from{lwarp.dtx}{showkeys}} +\file{lwarp-subfig.sty}{\from{lwarp.dtx}{subfig}} +\file{lwarp-tabularx.sty}{\from{lwarp.dtx}{tabularx}} +\file{lwarp-textpos.sty}{\from{lwarp.dtx}{textpos}} +\file{lwarp-threeparttable.sty}{\from{lwarp.dtx}{threeparttable}} +\file{lwarp-tikz.sty}{\from{lwarp.dtx}{tikz}} +\file{lwarp-titleps.sty}{\from{lwarp.dtx}{titleps}} +\file{lwarp-titlesec.sty}{\from{lwarp.dtx}{titlesec}} +\file{lwarp-titletoc.sty}{\from{lwarp.dtx}{titletoc}} +\file{lwarp-titling.sty}{\from{lwarp.dtx}{titling}} +\file{lwarp-tocloft.sty}{\from{lwarp.dtx}{tocloft}} +\file{lwarp-trivfloat.sty}{\from{lwarp.dtx}{trivfloat}} +\file{lwarp-verse.sty}{\from{lwarp.dtx}{verse}} +\file{lwarp-wallpaper.sty}{\from{lwarp.dtx}{wallpaper}} +\file{lwarp-wrapfig.sty}{\from{lwarp.dtx}{wrapfig}} +\file{lwarp-xcolor.sty}{\from{lwarp.dtx}{xcolor}} +\file{lwarp-xfrac.sty}{\from{lwarp.dtx}{xfrac}} +} \Msg{*********************************************************} \Msg{*} \Msg{* To finish the installation you have to move the} |