From 85935959636bed572e9a4916d5373565cbcdc79b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 29 Apr 2017 22:24:28 +0000 Subject: lwarp (29apr17) git-svn-id: svn://tug.org/texlive/trunk@44119 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/lwarp/lwarp.dtx | 21385 ++++++++++++----------- Master/texmf-dist/source/latex/lwarp/lwarp.ins | 1 - 2 files changed, 10794 insertions(+), 10592 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 73ca057c437..27c7a4d3f13 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} -% [2017/04/15 v0.29 Allows LaTeX to directly produce HTML5 output.] +% [2017/04/29 v0.30 Allows LaTeX to directly produce HTML5 output.] % %<*driver> \documentclass{ltxdoc} @@ -58,8 +58,7 @@ \usepackage[log-declarations=false]{xparse} -\usepackage[lwarpmk]{lwarp-newproject} -\usepackage{lwarp} +\usepackage[lwarpmk]{lwarp} \usepackage{needspace} @@ -91,7 +90,6 @@ \excludecomment{testing} - % \usepackage{morefloats} % \usepackage{marginfix} @@ -131,6 +129,12 @@ \DescribeEnv{#1}% } +\newcommand{\ItemDescribeOption}[1]{% +\item[\texttt{#1}:]% +\setlength{\parskip}{1.5ex}% +\DescribeOption{#1}% +} + \newcommand{\ItemDescribeCounter}[1]{% \item[\texttt{#1}:]% \setlength{\parskip}{1.5ex}% @@ -300,7 +304,8 @@ code apply to the generation of \HTML, print, or both forms of output. } \newcommand{\limitspageref}{\pkg{cleveref} and \pkg{varioref} are supported, -but printed page numbers do not map to \HTML. +but printed page numbers do not map to \HTML, so a section name or a text phrase +are used instead. See \cref{sec:successfulcommands} to redefine the message which is printed for page number references. } @@ -319,6 +324,13 @@ of the home page if it is after the abstract. \newcommand{\limitstext}{\cs{textbf}, etc.\ are supported, but \cs{bfseries}, etc.\ are not yet supported.} +\newcommand{\limitsreferences}{% +\cs{nameref} refers to the most recently-used section where the \cs{label} +was defined. If no section has been defined before the \cs{label}, +the link will be empty. +Index entries also use \cs{nameref} and have the same limitation. +} + \newcommand{\limitsfootnotes}{ \pkg{lwarp} uses native \LaTeX\ footnote code, although with its own \cs{box} to avoid the \LaTeX\ output routine. The usual functions work as-is. @@ -910,24 +922,29 @@ For now, the number list is simply turned off. \texttt{htmlglossary} to process the glossaries created by \pkg{glossaries} using \texttt{xindy}. -The packages \pkg{lwarp-newproject} and \pkg{lwarp} each take an option -\DescribeOption[lwarp-newproject]{lwarpmklang} -\DescribeOption[lwarp]{lwarpmklang} -\texttt{lwarpmklang=english} to set the language used by \texttt{xindy}. -Set the same option for both packages. -This is passed to \texttt{xindy} using its \texttt{-L} option. +The package \pkg{lwarp} takes an option +\DescribeOption{IndexLanguage} +\texttt{IndexLanguage=english} to set the language used by \texttt{xindy}. +This is passed to \texttt{xindy} using its \texttt{-L} option, and is +used for both index and glossary generation. } \newcommand{\osportabilityusage}{% \pkg{lwarp} tries to detect which operating system is being used. +\DescribeProgram{Unix}\DescribeProgram{Mac OS}\DescribeProgram{Linux} +\textsc{Unix}~/ \textsc{Mac~OS}~/ \textsc{Linux} is the default +(collectively referred to as ``\textsc{Unix}'' in the configuration files), +and \textsc{MS-Windows} is supported as well. -If \textsc{MS-Windows} is not correctly detected, +If \textsc{Windows} is not correctly detected, \DescribeProgram{MS-Windows} \DescribeProgram{Windows} -use the command \cs{warpOSwindows} in the document -\DescribeMacro{\warpOSwindows} -preamble after \pkg{lwarp} is loaded. This modifies the -operating-system path separator used by \pkg{lwarp}. +use the \pkg{lwarp} option \texttt{OSWindows}. +\DescribeOption{OSWindows} + +When detected or specified, the operating-system path separator used by \pkg{lwarp} +is modified, the boolean \texttt{usingOSWindows} is set true. +This boolean may be tested by the user for later use. } @@ -955,7 +972,7 @@ operating-system path separator used by \pkg{lwarp}. %<*package> % \fi % -% \CheckSum{10986} +% \CheckSum{10974} % % \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 @@ -1023,6 +1040,7 @@ operating-system path separator used by \pkg{lwarp}. % \changes{v0.27}{2017/04/04}{\ 2017/04/04} % \changes{v0.28}{2017/04/14}{\ 2017/04/14} % \changes{v0.29}{2017/04/15}{\ 2017/04/15} +% \changes{v0.30}{2017/04/29}{\ 2017/04/29} @@ -1156,15 +1174,97 @@ 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.30:] \ +% \begin{itemize} +% \item \pkg{lwarp-newproject} has been removed, and its functions +% \watchout[\pkg{lwarp-newproject}] +% have been combined with \pkg{lwarp}. +% +% To modify existing documents, remove from the document source: +% \begin{sourcedisplay} +% \cs{usepackage}\{lwarp-newproject\} +% \end{sourcedisplay} +% +% The \pkg{lwarp} package now produces the configuration files during +% print output, and also accepts the option |lwarpmk| if desired. +% +% \item A number of macros +% \watchout[HTML setup changes.] +% related to \HTML\ settings have been converted to options, and +% other macros and options have been renamed to create a consistent syntax: +% \begin{center} +% \begin{tabular}{ll} +% \toprule +% Old Macro & New Package Option \\ \midrule +% \cs{HomeHTMLFileName} & |HomeHTMLFilename| \\ +% \cs{HTMLFileName} & |HTMLFilename| \\ +% \cs{useLatexmk} & |latexmk| \\ +% \cs{warpOSwindows} & |OSWindows| \\[2.5ex] \toprule +% Old Package Option & New Package Option \\ \midrule +% |lwarpmklang| & |IndexLanguage| \\ +% (new) & |xdyFilename| \\[2.5ex] \toprule +% Old Macro & New Macro \\ \midrule +% \cs{MetaLanguage} & \cs{HTMLLanguage} \\ +% \cs{HTMLauthor} & \cs{HTMLAuthor} \\ +% \cs{NewHTMLdescription} & \cs{HTMLDescription} \\ +% \cs{SetFirstPageTop} & \cs{HTMLFirstPageTop} \\ +% \cs{SetPageTop} & \cs{HTMLPageTop} \\ +% \cs{SetPageBottom} & \cs{HTMLPageBottom} \\ +% \cs{NewCSS} & \cs{CSSFilename} \\ +% \bottomrule +% \end{tabular} +% \end{center} +% +% \needspace{2\baselineskip} +% \item Per the above changes, in existing documents, +% modify the package load of \pkg{lwarp}, such as: +% \begin{Verbatim}[tabsize=4,gobble=2] +% \usepackage[ +% HomeHTMLFilename=index, +% HTMLFilename={}, +% IndexLanguage=english +% ]{lwarp} +% \end{Verbatim} +% +% \item The file |lwarp_html.xdy| has been renamed |lwarp.xdy|. +% To update each document's project: +% \begin{enumerate} +% \item Make the changes shown above. +% \item Recompile the document in print mode. +% This updates the project's configuration files, and also generates the +% new file |lwarp.xdy|. +% \item The old file |lwarp_html.xdy| may be deleted. +% \end{enumerate} +% +% \item The new \pkg{lwarp} package option |xdyFilename| may be used to tell +% |lwarpmk| to use a custom |.xdy| file instead of |lwarp.xdy|. +% See \cref{sec:modifyxindy}. +% +% \item Improvements in index processing: +% \begin{itemize} +% \item |xindy|'s language is now used for index processing +% as well as glossary. +% \item Print mode without |latexmk| now uses |xindy| instead of |makeindex|. +% \item |texindy|/|xindy| usage depends on |pdflatex| vs |xelatex|, |lualatex|. +% \item For |pdflatex| and |texindy|, the |-C utf8| option is used. This is +% supported in modern distributions, but a customized |lwarpmk.lua| may +% need to be created for use with older distributions. +% \end{itemize} +% +% \end{itemize} +% +% \needspace{2\baselineskip} +% % \item[v0.29:] \ % \begin{itemize} % \item Add: |lwarpmklang| option for \pkg{lwarp-newproject} and \pkg{lwarp}. % Sets the language to use while processing the glossary. +% (As of v0.30, this has been changed to the |IndexLanguage| option.) % \item Fix: \cs{includegraphics} when no optional arguments. % \end{itemize} % \item[v0.28:] \ % \begin{itemize} -% \item \cs{HTMLauthor} \marg{name} assigns \HTML\ meta author if non-empty. +% \item \cs{HTMLAuthor} \marg{name} assigns \HTML\ meta author if non-empty. % Defaults to \cs{theauthor}. % \item Booean |HTMLDebugComments| controls whether \HTML\ comments are % added for closing \tag{div}s, opening and closing sections, etc. @@ -1261,17 +1361,20 @@ operating-system path separator used by \pkg{lwarp}. % \item A new tutorial is included in the documentation, and % many obsolete sections have been removed. % \item \cs{NewHTMLdescription} sets the \HTML\ meta description tag for each file. -% See \cref{sec:htmldescription}. -% \item \cs{HTMLFileName} may now be empty, allowing filenames without a prefix. +% See \cref{sec:htmldescription}. (v0.30 changes this to \cs{HTMLDescription}.) +% \item \cs{HTMLFilename} may now be empty, allowing filenames without a prefix. % Lwarp no longer automatically appends a |-| character. % \watchout -% For existing projects, add a |-| to the end of \cs{HTMLFileName}. -% \item \cs{HomeHTMLFileName} and \cs{HTMLFileName} no longer use +% For existing projects, add a |-| to the end of \cs{HTMLFilename}. +% \item \cs{HomeHTMLFilename} and \cs{HTMLFilename} no longer use % escaped underscore\watchout\ % characters. Underscores may be used in filenames as-is. +% (Version 0.30 changes these to package options |HomeHTMLFilename| and +% |HTMLFilename|.) % \item \pkg{lwarp} now tries to auto-detect the operating system, % and \cs{warpOSwindows} is only needed if the auto-detection -% fails to detect Windows. +% fails to detect Windows. (As of v0.30, \cs{warpOSwindows} has been converted to +% the |OSWindows| option.) % \item Tabular column types |@|, |>|, and |<| are now supported. % \item |BlockClass| and \cs{InlineClass} add an optional style. % \item The |sidebar| and |example| environments have been moved to the @@ -1378,8 +1481,10 @@ operating-system path separator used by \pkg{lwarp}. % the conversion from a \LaTeX{}-generated \PDF\ file which happens to have \HTMLfive\ tags, % to a number of \HTMLfive\ plain-text files and accompanying images. % -% A special |lwarp-newproject| package is used to set up the auxiliary files necessary for -% the \HTML\ conversion. Included is a parallel version of the user's source document, +% \pkg{lwarp} automatically generates the extra files necessary for +% the \HTML\ conversion, such as \CSS\ and |.xdy| files, and configuration files +% for the utility |lwarpmk|. +% Also included is a parallel version of the user's source document, % |-html.tex|, which selects \HTML\ output and then inputs the user's own source. % This process allows both the printed and \HTML\ versions to co-exist side-by-side, % each with their own auxiliary files. @@ -1660,7 +1765,7 @@ operating-system path separator used by \pkg{lwarp}. % % (Watch for improvements in cross-references to figures and tables.) % -% \subsection{Word Processors} +% \subsection{Word processors} % % It should be noted that the popular word processors % \DescribeProgram{Word}\DescribeProgram{LibreOffice}\DescribeProgram{OpenOffice} @@ -1670,7 +1775,7 @@ operating-system path separator used by \pkg{lwarp}. % See recent developments in Microsoft\,\textregistered{} Word\,\textregistered{} % and LibreOffice\,\texttrademark{} Writer. % -% \subsection{Commercial Systems} +% \subsection{Commercial systems} % % Likewise, several professional systems exist whose % \DescribeProgram{Adobe} \DescribeProgram{FrameMaker} @@ -1751,13 +1856,10 @@ operating-system path separator used by \pkg{lwarp}. % % \item[The \pkg{lwarp} package:] This package. % -% \item[The \pkg{lwarp-newproject} package:] Accompanies \pkg{lwarp}, and used -% to create configuration files. -% % \item[The |lwarpmk| utility:] Provided along with this package. This % should be an operating-system executable in the same way that % |pdflatex| or |latexmk| is. It is possible to have the -% \pkg{lwarp-newproject} package generate a local copy of |lwarpmk| +% \pkg{lwarp} package generate a local copy of |lwarpmk| % called |lwarpmk.lua|. % See \cref{sec:genlatexmk}. % @@ -2004,9 +2106,9 @@ operating-system path separator used by \pkg{lwarp}. % It is also possible to use a local version of |lwarpmk|: % \begin{enumerate} % \item When compiling the tutorial in \cref{sec:tutorial}, -% use the |lwarpmk| option for the \pkg{lwarp-newproject} package: +% use the |lwarpmk| option for the \pkg{lwarp} package: % \begin{sourcedisplay} -% |\usepackage[lwarpmk]{lwarp-newproject}| +% |\usepackage[lwarpmk]{lwarp}| % \end{sourcedisplay} % \item When the tutorial is compiled with |pdflatex|, the file |lwarpmk.lua| % will be generated along with the other configuration files. @@ -2160,8 +2262,8 @@ operating-system path separator used by \pkg{lwarp}. % % Another copy may be found by entering into a command line: % \DescribeFile{lwarp_tutorial.txt} -% \userentry{texdoc -l lwarp\_tutorial.txt} % \watchout[Note: |.txt| suffix!] +% \userentry{texdoc -l lwarp\_tutorial.txt} % % This should be in the |doc/latex/lwarp/| directory along % with this \PDF\ documentation. @@ -2170,7 +2272,7 @@ operating-system path separator used by \pkg{lwarp}. % \end{description} % % \emph{When using Windows, use an editor other than Notepad, -% \watchout[Bad Formatting!] +% \watchout[Bad formatting!] % since Notepad does not accept the end-of-line from a Unix text file.} % % \item Compile the project: \userentry{pdflatex tutorial.tex} @@ -2178,16 +2280,18 @@ operating-system path separator used by \pkg{lwarp}. % % (|xelatex| or |lualatex| may be used as well.) % +% \item View the resulting |tutorial.pdf| with a \PDF\ viewer. +% % \end{enumerate} % % % A number of new files are created when |tutorial.tex| is compiled, as % shown in \cref{fig:newprojectfiles}. These files are created by -% the |lwarp-newproject| package. +% the |lwarp| package. % % (Two of the new files are configuration files for the helper program |lwarpmk|. -% Whenever a print version of the document is created while the |lwarp-newproject| -% package is used, the configuration files for |lwarpmk| are updated to +% Whenever a print version of the document is created, +% the configuration files for |lwarpmk| are updated to % record the operating system, \LaTeX\ program (|pdflatex|, |xelatex|, or |lualatex|), % the filenames of the source code and \HTML\ output, and whether % the additional helper program |latexmk| will be used to compile the document.) @@ -2207,93 +2311,24 @@ operating-system path separator used by \pkg{lwarp}. % % \small % -% \begin{Verbatim}[gobble=2] -% -% % Save this as tutorial.tex for the lwarp package tutorial. -% -% \documentclass{book} -% -% \usepackage{iftex} -% -% % --- LOAD FONT SELECTION AND ENCODING BEFORE LOADING LWARP --- -% \ifPDFTeX -% \usepackage{lmodern} % pdflatex -% \usepackage[T1]{fontenc} -% \usepackage[utf8]{inputenc} -% \else -% \usepackage{fontspec} % XeLaTeX or LuaLaTeX -% \fi -% -% % --- HTML FILENAME AND LATEXMK SETTINGS --- -% % \newcommand{\HomeHTMLFilename}{index} % Filename of the homepage. -% % \newcommand{\HTMLfiveName}{node-} % Filename prefix of other pages. -% % \newcommand{\UseLatexmk}{true}% Uncomment to use latexmk -% -% % --- LWARP IS LOADED NEXT --- -% \usepackage{lwarp-newproject} % Possibly with the [lwarpmk] option. -% \usepackage{lwarp} -% % \boolfalse{FileSectionNames} % If false, numbers the files. -% -% % --- OTHER PACKAGES ARE LOADED AFTER LWARP --- -% \usepackage{makeidx} \makeindex -% \usepackage{xcolor} -% -% \usepackage{hyperref,cleveref} % LOAD THESE LAST! -% -% % --- LATEX AND HTML CUSTOMIZATION --- -% \title{The Lwarp Tutorial} -% \author{Some Author} -% \setcounter{tocdepth}{2} % Include subsections in the \TOC. -% \setcounter{secnumdepth}{2} % Number down to subsections. -% \setcounter{FileDepth}{1} % Split \HTML\ files at sections -% \booltrue{CombineHigherDepths} % Combine parts/chapters/sections -% \setcounter{SideTOCDepth}{1} % Include subsections in the side\TOC -% \SetFirstPageTop{Name and \fbox{HOMEPAGE LOGO}} -% \SetPageTop{\fbox{LOGO}} -% \SetPageBottom{Contact Information and Copyright} -% \NewCSS{lwarp_sagebrush.css} -% -% \begin{document} -% \maketitle % (or a titlepage environment) -% -% % --- An abstract may be placed here. --- -% -% \tableofcontents \listoffigures % --- MUST BE BEFORE THE FIRST SECTION. -% -% \chapter{First chapter} -% -% \section{A section} -% -% This is some text which is indexed.\index{Some text.} -% -% \subsection{A subsection} -% -% See \cref{fig:withtext}. -% -% \begin{figure}\begin{center} -% \fbox{\textcolor{blue!50!green}{Text in a figure.}} -% \caption{A figure with text\label{fig:withtext}} -% \end{center}\end{figure} -% -% \section{Some math} -% -% Inline math: $r = r_0 + vt - \frac{1}{2}at^2$ -% \begin{equation} -% a^2 + b^2 = c^2 -% \end{equation} -% -% \printindex -% -% \end{document} -% \end{Verbatim} +% \VerbatimInput{lwarp_tutorial.txt} +% +% ^^A ************************************************************************** +% ^^A NOTE: lwarp_tutorial.txt is located in the TDS doc directory! +% ^^A Copy it to the source directory if you wish to recompile lwarp.dtx! +% ^^A (It is stored in the doc directory so that texdoc can find it and +% ^^A the user can copy it.) +% ^^A ************************************************************************** +% % \endgroup % % % \begin{table} -% \caption{Files created in a new project\label{fig:newprojectfiles}} +% \caption{Files created along with the print version\label{fig:newprojectfiles}} % \begin{description} % % \item [|tutorial.pdf|:] The \PDF\ output from \LaTeX. +% The print version of the document. % % \item [|tutorial\_html.tex|:] A small |.tex| file used to create % a parallel \HTML\ version of the document, which co-exists with usual @@ -2301,7 +2336,7 @@ operating-system path separator used by \pkg{lwarp}. % own auxiliary files. In this way, both \PDF\ and \HTML\ % documents may co-exist side-by-side. % -% \item [Auxiliary files:] The usual \LaTeX\ files |tutorial.aux|, |tutorial.log|. +% \item [Auxiliary files:] The usual \LaTeX\ files |.aux|, |.log|, |.out|, |.toc|, |.lof|, |.idx|. % When an \HTML\ version of the document is created, |_html| versions % of the auxiliary files will also be generated. % @@ -2320,12 +2355,13 @@ operating-system path separator used by \pkg{lwarp}. % \item [|sample\_project.css|:] An example of a user-customized \CSS\ file, % which may be used for project-specific changes to the \pkg{lwarp} defaults. % -% \item [|lwarp\_html.xdy|:] Used by \pkg{lwarp} while creating an index. -% This file should not need to be modified by the user. +% \item [|lwarp.xdy|:] Used by \pkg{lwarp} while creating an index. +% This file should not be modified by the user. +% A custom file may be used instead, if necessary. % % \item [|lwarp\_mathjax.txt|:] Inserted into the \HTML\ files when % |MathJax| is used to display math. -% This file should not need to be modified by the user. +% This file should not be modified by the user. % % \item [|comment.cut|:] A temporary file used by \pkg{lwarp} to % conditionally process blocks of text. This file may be ignored. @@ -2333,7 +2369,7 @@ operating-system path separator used by \pkg{lwarp}. % % \hrule \medskip % \label{sec:genlatexmk} -% When the |lwarpmk| option is given to the \pkg{lwarp-newproject} package: +% When the |lwarpmk| option is given to the \pkg{lwarp} package: % \begin{description} % \item [|lwarpmk.lua|:] A local copy of the |lwarpmk| utility. % @@ -2383,10 +2419,9 @@ operating-system path separator used by \pkg{lwarp}. % Although, when using the utility |latexmk| (introduced later), the changed date is % ignored and an actual change in contents must occur to cause a recompile.} % -% \item Process the index.\footnote{A \texttt{lwarpmk printglossary} command is also +% \item Process the index.\index{index>processing}\footnote{A \texttt{lwarpmk printglossary} command is also % available to process a glossary produced with the \textsf{glossaries} package. -% Set its language using the \texttt{lwarpmklang} option for \pkg{lwarp-newproject} -% and \pkg{lwarp}.} +% See \cref{sec:glossaries}.} % \userentry{lwarpmk printindex} % % \item Recompile again to include the index. @@ -2412,7 +2447,7 @@ operating-system path separator used by \pkg{lwarp}. % \item |lwarpmk| uses \LaTeX\ to process |tutorial_html.tex| % to create \\ % |tutorial_html.pdf|. -% \item |pdftotext| is then used to convert into the file |tutorial_html.html|. +% \item |pdftotext| is then used to convert to the file |tutorial_html.html|. % This file is a plain-text file containing \HTML\ tags and % content for the entire document. % \item |lwarpmk| manually splits |tutorial_html.html| into @@ -2435,7 +2470,7 @@ operating-system path separator used by \pkg{lwarp}. % Note that math is still displayed as its plain-text \LaTeX\ source % \margintag{math} % until the -% images of the math expressions have not yet been generated. Math may be +% images of the math expressions have been generated. Math may be % displayed as \SVG\ images or by a MathJax script, as seen in % \cref{sec:tutorialsvgmath,sec:tutorialmathjax}. % @@ -2444,10 +2479,9 @@ operating-system path separator used by \pkg{lwarp}. % \userentry{lwarpmk html} % \userentry{lwarpmk print} % -% \item Process the \HTML\ index and recompile:\footnote{A \texttt{lwarpmk htmlglossary} command is also +% \item Process the \HTML\ index and recompile:\index{index>processing}\footnote{A \texttt{lwarpmk htmlglossary} command is also % available to process a glossary produced with the \textsf{glossaries} package. -% Set its language using the \texttt{lwarpmklang} option for \pkg{lwarp-newproject} -% and \pkg{lwarp}.} +% See \cref{sec:glossaries}.} % \userentry{lwarpmk htmlindex} % \userentry{lwarpmk html} % @@ -2509,13 +2543,9 @@ operating-system path separator used by \pkg{lwarp}. % \margintag{math with MathJax} % % \begin{enumerate} -% \item In the tutorial's source code, change +% \item In the tutorial's source code, uncomment the |mathjax| package option for \pkg{lwarp}: % \begin{sourcedisplay} -% |\usepackage{lwarp}| -% \end{sourcedisplay} -% to -% \begin{sourcedisplay} -% |\usepackage[mathjax]{lwarp}| +% mathjax, \% Use MathJax to display math. % \end{sourcedisplay} % % \item Recompile \userentry{lwarpmk html} @@ -2537,34 +2567,34 @@ operating-system path separator used by \pkg{lwarp}. % \clearpage % \subsection{Changing the CSS style} % -% \DescribeMacro{\NewCSS} -% \cs{NewCSS} may be used to choose which |.css| file is used to display -% each section of the web page. Use \cs{NewCSS} before |\begin{document}| +% \DescribeMacro{\CSSFilename} +% \cs{CSSFilename} may be used to choose which |.css| file is used to display +% each section of the web page. Use \cs{CSSFilename} before |\begin{document}| % to assign the style of the home page. % If different parts of the website should have different styles, -% call \cs{NewCSS} again before each section heading which creates a new file. +% call \cs{CSSFilename} again before each section heading which creates a new file. % % The styles provided by \pkg{lwarp} include: % \begin{description} -% \item[|lwarp.css|:] A default style if \cs{NewCSS} is not used. This +% \item[|lwarp.css|:] A default style if \cs{CSSFilename} is not used. This % style is comparable to a plain \LaTeX\ document. -% To set this style, you may use |\NewCSS{lwarp.css}|, or no \cs{NewCSS} call at all. +% To set this style, you may use |\CSSFilename{lwarp.css}|, or no \cs{CSSFilename} call at all. % \item[|lwarp\_formal.css|:] A formal style with a serif fonts and a traditional % look. % \item[|lwarp\_sagebrush.css|:] A style with muted colors, gradient backgrounds, % additional borders, and rounded corners. % \end{description} % -% To see each style in use, change the \cs{NewCSS} entry in the tutorial -% |lwarpmk html|, and then reload the webpage. +% To see each style in use, change the \cs{CSSFilename} entry in the tutorial, +% |lwarpmk html| again, and then reload the webpage. % % A customized style may also be created. % \margintag{Custom \CSS} % For each new project a file % called |sample_project.css| is generated. This may be renamed to -% |.css| then used by assigning |\NewCSS{.css|. +% |.css| then used by assigning |\CSSFilename{.css}|. % -% Note that |sample_project.css| is overwritten whenever \pkg{lwarp-newproject} +% Note that |sample_project.css| is overwritten whenever \pkg{lwarp} % is loaded in print mode. % It is therefore important to rename the file \watchout[Rename it!] % to something like |.css| before @@ -2575,6 +2605,8 @@ operating-system path separator used by \pkg{lwarp}. % desired. Additional changes to the \CSS\ may be made by making entries % later in the |.css| file. % +% +% % \clearpage % % \subsection{Customizing the HTML output} @@ -2587,43 +2619,49 @@ operating-system path separator used by \pkg{lwarp}. % % Note that if changes are made, % \watchout[Changes!] -% it is best to first use |lwarpmk clearall| to -% clear all the \HTML, \PDF, and auxiliary files. -% Also, if \cs{HomeHTMLFilename}, \cs{HTMLFileName}, or \cs{UseLatexmk} are -% changed, it is necessary to reenable the |lwarp-newproject| package and -% then recompile the print version in order to recreate the configuration -% files for |lwarpmk|. +% it is best to first: +% \begin{enumerate} +% \item Clear all the \HTML, \PDF, and auxiliary files: \userentry{lwarpmk clearall} +% \item Recompile the print version in order to recreate +% the configuration files for |lwarpmk|: \userentry{lwarpmk print} +% \item Finally, recompile the \HTML\ version with the new settings: \userentry{lwarpmk html} +% \end{enumerate} % -% \begin{description} +% \begin{description}[style=unboxed] % -% \item[Placed in the preamble just before \pkg{lwarp} is loaded:] \ +% \item[Options for the \pkg{lwarp} package:] \ \newline +% Use the following as options for |\usepackage[]{lwarp}|: % % \begin{description} % -% \ItemDescribeMacro{\HomeHTMLFilename} Filename of the homepage, without +% \ItemDescribeOption{HomeHTMLFilename} Filename of the homepage, without % the ``|.html|'' suffix. % Defaults to the \cs{BaseJobname}. A common setting is: % \begin{sourcedisplay} -% |\newcommand{HomeHTMLFilename}{index}| +% |HomeHTMLFilename=index| % \end{sourcedisplay} % causing the % 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}] \| +% \margintag{filename underscores} +% |HomeHTMLFilename| and |HTMLFilename| options, but may need to be escaped +% elsewhere, such as when appearing in a list: % \index{underscore>filename}\index{file>underscore} % \changes{v0.24}{2017/03/13}{Docs: Filename underscore.} +% \begin{sourcedisplay} +% \cs{item} [\cs{href}\{file\textcolor{red}{\textbackslash\_}name.pdf\}\{text\}] \textbackslash +% \end{sourcedisplay} % -% \ItemDescribeMacro{\HTMLfiveName} A filename prefix for the rest of the \HTML\ web pages. +% \ItemDescribeOption{HTMLFilename} A filename prefix for the rest of the \HTML\ web pages. % Useful for numbered web pages with a common prefix. May be empty. % -% \ItemDescribeMacro{\UseLatexmk} A macro which controls whether +% \ItemDescribeOption{latexmk} Controls whether % \pkg{lwarp} uses |latexmk| to % compile the document. This setting is written to |lwarpmk|'s configuration -% files. Defaults to false. Set to true with: -% \begin{sourcedisplay} -% |\newcommand*{\UseLatexmk}{true}| -% \end{sourcedisplay} +% files. Defaults to false. +% +% \ItemDescribeOption{mathsvg} Selects \SVG\ display for math output. (The default.) +% +% \ItemDescribeOption{mathjax} Selects MathJax for math output. % % \end{description} % @@ -2715,7 +2753,7 @@ operating-system path separator used by \pkg{lwarp}. % % \ItemDescribeBoolean{FileSectionNames} If true, web page filenames are % derived from a sanitized version of the section names. If false, web pages -% are numbered. Either way, the \cs{HTMLFileName} is prefixed. +% are numbered. Either way, the |HTMLFilename| option is used as a prefix. % % Example \HTML\ filenames: % \changes{v0.20}{2016/09/11}{Docs: Examples for generating \HTML\ file names.} @@ -2728,9 +2766,10 @@ operating-system path separator used by \pkg{lwarp}. % Example: Homepage |index.html|, and |node-1|, |node-2|. % (See \cs{SetHTMLFileNumber} to number grouped by chapter, for example.) % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] -% \newcommand{\HomeHTMLFileName}{index} -% \newcommand{\HTMLfiveName}{node-} -% \usepackage{lwarp} +% \usepackage[ +% HomeHTMLFilename=index, +% HTMLFilename={node-} +% ]{lwarp} % \boolfalse{FileSectionNames} % \end{Verbatim} % @@ -2738,9 +2777,10 @@ operating-system path separator used by \pkg{lwarp}. % % Example: |index.html|, and |About.html|, |Products.html| % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] -% \newcommand{\HomeHTMLFileName}{index} -% \newcommand{\HTMLfiveName}{} -% \usepackage{lwarp} +% \usepackage[ +% HomeHTMLFilename=index, +% HTMLFilename={} +% ]{lwarp} % \booltrue{FileSectionNames} % \end{Verbatim} % @@ -2749,9 +2789,10 @@ operating-system path separator used by \pkg{lwarp}. % Example: Homepage |mywebsite.html|, and additional pages such % as |mywebsite-About.html|, etc. % \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4] -% \newcommand{\HomeHTMLFileName}{mywebsite} -% \newcommand{\HTMLfiveName}{mywebsite-} -% \usepackage{lwarp} +% \usepackage[ +% HomeHTMLFilename=mywebsite, +% HTMLFilename={mywebsite-} +% ]{lwarp} % \booltrue{FileSectionNames} % \end{Verbatim} % \end{description} @@ -2760,23 +2801,51 @@ operating-system path separator used by \pkg{lwarp}. % This may also be over-written % by the \pkg{babel} package. Defaults to ``Abstract''. % -% \ItemDescribeMacro{\MetaLanguage} The \HTML\ language meta header. -% Defaults to {en-US}. +% \end{description} +% +% +% \item[Placed before \texttt{\cs{begin}\{document\}}, +% or before any sectioning command which causes a file break:] \ +% +% \begin{description} +% \ItemDescribeMacro{\CSSFilename} \marg{filename.css} \quad +% Sets the \CSS\ file to use for the following +% files. May be changed before each each sectioning command which would +% cause a file split. +% +% The \CSS\ styles of the web pages are set by the \cs{CSSFilename} command. +% If \cs{CSSFilename} is not used, a default plain style is used to mimic printed +% \LaTeX\ output. |lwarp_sagebrush.css| is a semi-fancy colored style as shown +% in this tutorial. Change it to |lwarp_formal.css| for a more formal look, +% or comment out the \cs{CSSFilename} command to see the default. +% \cs{CSSFilename} may be used before each file break to set the \CSS\ for +% individual pagess of the website. +% +% \ItemDescribeMacro{\HTMLLanguage} The \HTML\ file's |html lang| tag. +% Defaults to |en-US|. +% +% \ItemDescribeMacro{\HTMLAuthor} The \HTML\ header's meta author. +% Defaults to \cs{theauthor}. % -% \ItemDescribeMacro{\SetFirstPageTop} \marg{contents} \quad +% \ItemDescribeMacro{\HTMLDescription} \marg{description} \quad +% Sets the \HTML\ description tag for +% the following files. May be changed before each each sectioning command which would +% cause a file split. +% +% \ItemDescribeMacro{\HTMLFirstPageTop} \marg{contents} \quad % A user-definable custom action applied % to the top of the home page. Useful for logos, etc. % Defaults empty. % Ignored in print output. % -% \ItemDescribeMacro{\SetPageTop} \marg{contents} \quad +% \ItemDescribeMacro{\HTMLPageTop} \marg{contents} \quad % A user-definable custom action applied to % the top of pages other than the home page. Useful for logos, etc. % Defaults empty. % |\LinkHome| may be used to place a link back to the homepage. % Ignored in print output. % -% \ItemDescribeMacro{\SetPageBottom} \marg{contents} \quad +% \ItemDescribeMacro{\HTMLPageBottom} \marg{contents} \quad % A user-definable custom action applied to the % bottom of each web page. % Useful for authors, copyright notices, contact information, etc. @@ -2786,40 +2855,21 @@ operating-system path separator used by \pkg{lwarp}. % % \end{description} % -% \item[Placed in the home page before the first section break:] \ +% +% \needspace{2\baselineskip} +% \item[Placed in the home page before the first sectioning command which causes a file break:] \ % % \begin{description} % \ItemDescribeMacro{\tableofcontents} % Used to place a table of contents on the home page. -% This command must be used before the first file split, so that a way is -% available to navigate to other files from the homepage. +% This command must be used before the first file split, +% \watchout[TOC on the homepage!] +% so that a way is available to navigate to other files from the homepage. % % Links to each chapter/section are provided, as selected by |tocdepth|. % \end{description} % % -% \item[Placed before any sectioning command which causes a file break:] \ -% -% \begin{description} -% \ItemDescribeMacro{\NewCSS} \marg{filename.css} \quad -% Sets the \CSS\ file to use for the following -% files. May be changed before each each sectioning command which would -% cause a file split. -% -% The \CSS\ styles of the web pages are set by the \cs{NewCSS} command. -% If \cs{NewCSS} is not used, a default plain style is used to mimic printed -% \LaTeX\ output. |lwarp_sagebrush.css| is a semi-fancy colored style as shown -% in this tutorial. Change it to |lwarp_formal.css| for a more formal look, -% or comment out the \cs{NewCSS} command to see the default. -% \cs{NewCSS} may be used before each file break to set the \CSS\ for -% individual pagess of the website. -% -% \ItemDescribeMacro{\NewHTMLdescription} \marg{description} \quad -% Sets the \HTML\ description tag for -% the following files. May be changed before each each sectioning command which would -% cause a file split. -% \end{description} -% % \needspace{2\baselineskip} % \item[Placed in the document wherever necessary:] \ % @@ -2854,15 +2904,14 @@ operating-system path separator used by \pkg{lwarp}. % and recompile as needed. % % \begin{enumerate} -% \item In the tutorial's source code, at ``HTML FILENAME AND LATEXMK SETTINGS'', -% insert the line: +% \item In the tutorial's source code uncomment the |latexmk| option for the +% \pkg{lwarp} package: % \begin{sourcedisplay} -% |\newcommand{\UseLatexmk}{true}| +% latexmk, \% Use latexmk to compile. % \end{sourcedisplay} % -% \item Directly recompile the printed version of the document. -% \userentry{pdflatex tutorial.tex} \watchout[NOT \texttt{lwarpmk}!] -% (Or |xelatex| or |lualatex|) +% \item Recompile the printed version of the document. +% \userentry{lwarpmk print} % % \begin{sloppy} % \pkg{lwarp} updates its own configuration files (|lwarpmk.conf| and \newline @@ -2894,17 +2943,11 @@ operating-system path separator used by \pkg{lwarp}. % \item Remove the auxiliary files for the project: % \userentry{lwarpmk cleanall} % -% \item Be sure that -% \begin{sourcedisplay} -% |\usepackage{lwarp-newproject}| -% \end{sourcedisplay} -% is still enabled in |tutorial.tex|. -% % \item Use |xelatex| or |lualatex| to recompile the printed version. % \userentry{xelatex tutorial.tex} \quad -or- % \userentry{lualatex tutorial.tex} % -% When the recompile occurs and \pkg{lwarp-newproject} is loaded, +% When the recompile occurs, % the configuration files for |lwarpmk| are modified to remember % which \TeX\ engine was used. \XeLaTeX\ or \LuaLaTeX\ will be used for % future runs of |lwarpmk|. @@ -2924,22 +2967,24 @@ operating-system path separator used by \pkg{lwarp}. % % \changes{v0.29}{2017/04/15}{Docs: Using a glossary} % -% \pkg{lwarp} supports the \pkg{glossaries} package. +% \pkg{lwarp} supports the \pkg{glossaries} package, although this tutorial +% does not supply an example. % -% \DescribeOption[lwarp-newproject]{lwarpmklang} -% \DescribeOption[lwarp]{lwarpmklang} -% To assign a language to be used while processing the glossary, -% use the |lwarpmklang| option: +% \DescribeOption{IndexLanguage} +% To assign a language to be used while processing the index and glossary, +% use the |IndexLanguage| option: % \index{language>glossary} +% \index{language>index} % \index{glossary>language} +% \index{index>language} % % \begin{Verbatim}[gobble=2,frame=lines] -% \usepackage[lwarpmklang=english]{lwarp-newproject} -% \usepackage[lwarpmklang=english]{lwarp} +% \usepackage[IndexLanguage=english]{lwarp} % \end{Verbatim} % % \index{glossary>processing} % To process the glossary for the print version: +% \index{glossary>processing} % \userentry{lwarpmk printglossary} % % To process the glossary for the \HTML\ version: @@ -3102,6 +3147,28 @@ operating-system path separator used by \pkg{lwarp}. % \item \ldots{} the rest of the preamble and the main document. % \end{enumerate} % +% +% \subsubsection{Indexes and UTF-8} +% \index{UTF-8>index} +% \index{index>UTF-8} +% +% \pkg{lwarp} uses the |xindy| program to processes indexes. +% +% While using |xelatex| or |lualatex|, |xindy| is used for the index. +% Everything is handled in UTF-8 encoding, and should work as expected. +% +% While using |pdflatex|, the |texindy| program is used with the |-C utf8| option, +% which is newly supported in recent distributions of \LaTeX. This option correctly +% sorts index entries into headings while using Latin languages, but will not work +% well with others. \XeLaTeX\ or \LuaLaTeX\ are recommended for non-Latin languages. +% +% For an older distribution of \LaTeX, it may be necessary to generate a local version of +% |lwarpmk.lua| and modify it to remove the |-C utf8| option from the texindy call. +% See \cref{sec:modifylwarpmk}. +% +% +% +% % \subsection{\protect\pkg{lwarp} package loading and options} % \label{sec:loading} % \index{settings>lwarp package options} @@ -3114,23 +3181,49 @@ operating-system path separator used by \pkg{lwarp}. % \DescribePackage{lwarp} % \index{lwarp>loading}\index{lwarp>options} % -% \DescribeOption[lwarp]{warpprint} -% \DescribeOption[lwarp]{warpHTML} +% \DescribeOption{warpprint} +% \DescribeOption{warpHTML} % Select the |warpprint| option to generate print output (default), % or the |warpHTML| option to generate \HTMLfive{} output. % The default is print output, so the print version may be % compiled with the usual |pdflatex|, etc. -% When \pkg{lwarp-newproject} is loaded in print mode, it creates +% When \pkg{lwarp} is loaded in print mode, it creates % |_html.tex|, which sets the |warpHTML| option before calling % the user's source code |.tex|. In this way, |.tex| % can |\usepackage{lwarp}| without any options to create a printed version, % while |_html.tex| will create an \HTML\ version. % -% \DescribeOption[lwarp]{mathsvg} -% \DescribeOption[lwarp]{mathjax} +% \DescribeOption{mathsvg} +% \DescribeOption{mathjax} % For math display, select |mathsvg| (default), or |mathjax|. % For more information about the math options, see \cref{sec:limitsmath}. % +% See \cref{tab:options} for the full list of options. +% +% +% \begin{table} +% \caption{Package options\label{tab:options}} +% \centering +% \begin{tabular}{>{\ttfamily}lp{3.25in}} +% Option & Description \\ \hline +% warpprint & Generate print output, and also generate configuration files. \\ +% warpHTML & Generate \HTML\ output. \\ +% mathsvg & Show math using \SVG\ images. \\ +% mathjax & Show math using MathJax. \\ +% OSWindows & Force compatibility with MS-Windows. \\ +% BaseJobname & The \cs{jobname} to use. +% Set to the \cs{jobname} of the printed version even while generating \HTML. \\ +% HomeHTMLFilename & The filename of the home page. \\ +% HTMLFilename & A prefix for the filenames of the remaining web pages. \\ +% IndexLanguage & The |xindy| language option used for index and glossary generation. \\ +% latexmk & Boolean for |lwarpmk| to use |latexmk| for compiling documents. +% Otherwise, |lwarpmk| attempts to recompile several times by itself. \\ +% lwarpmk & Generate a local copy of |lwarpmk.lua|. \\ +% xdyFilename & Tells |lwarpmk| to use a custom filename for |xindy|, instead of |lwarp.xdy|. \\ +% \end{tabular} +% \end{table} +% +% % % \subsection{Selecting the operating system} % \label{sec:OSportabilityusage} @@ -3384,7 +3477,7 @@ operating-system path separator used by \pkg{lwarp}. % \index{HTML>meta tag>description} % \index{description>HTML meta tag} % \index{meta tag, HTML>description} -% \DescribeMacro{\NewHTMLdescription} \marg{A description of the web page.} +% \DescribeMacro{\HTMLDescription} \marg{A description of the web page.} % \quad The default is no description. % % Each page of \HTML\ output should have its own \HTML\ meta description, @@ -3393,20 +3486,20 @@ operating-system path separator used by \pkg{lwarp}. % is limited to around % 150 characters in length, and should not include the \acro{ASCII} double quote character ("). % -% Use \cs{NewHTMLdescription} +% Use \cs{HTMLDescription} % \margintag{placement} % just before |\begin{document}| to set the description of the home page, % and also just before each sectioning command such as \cs{chapter} or \cs{section} % where a new file will be generated, depending on |FileDepth|. For example, if |FileDepth| is 1, -% use \cs{NewHTMLdescription} just before each \cs{section} command, and that description will be +% use \cs{HTMLDescription} just before each \cs{section} command, and that description will be % placed inside the \HTML\ page for that \cs{section}. The same descrition will be used for -% all following \HTML\ files as well, until reset by a new \cs{NewHTMLdescription}. It is best +% all following \HTML\ files as well, until reset by a new \cs{HTMLDescription}. It is best % to use a unique description for each \HTML\ file. % % To disable the generation of \HTML\ description meta tags, % \margintag{disabling} % use:\\ -% \hspace*{1em} |\NewCSSdescription{}| +% \hspace*{1em} |\HTMLDescription{}| % % % \subsection{HTML page meta author} @@ -3414,9 +3507,9 @@ operating-system path separator used by \pkg{lwarp}. % \index{HTML>meta tag>author} % \index{author>HTML meta tag} % \index{meta tag, HTML>author} -% \DescribeMacro{\HTMLauthor} \marg{author} \quad Sets the contents +% \DescribeMacro{\HTMLAuthor} \marg{author} \quad Sets the contents % of the web page \tag{meta name="author"} tag. -% Defaults to |\HTMLauthor{\theauthor}|. +% Defaults to |\HTMLAuthor{\theauthor}|. % May be set empty to cancel the meta author tag. % % @@ -3436,16 +3529,58 @@ operating-system path separator used by \pkg{lwarp}. % % \label{sec:setcss} % -% \DescribeMacro{\NewCSS} +% \DescribeMacro{\CSSFilename} % For each section at which \HTML\ files are split, -% |\NewCSS| may be used before the sectioning command to select a \CSS\ file for that and all +% |\CSSFilename| may be used before the sectioning command to select a \CSS\ file for that and all % following sections. This may be changed numerous times throughout the file, resulting in -% different \HTML\ pages having different \CSS\ files assigned. +% different \HTML\ pages having different \CSS\ files assigned: +% \begin{Verbatim}[gobble=2,tabsize=4] +% ... +% \newCSS{myCSS.css} +% \chapter{Another Chapter} +% ... +% \end{Verbatim} % \index{CSS>file selection} % \index{CSS>per HTML page} % \index{settings>CSS selection} % % +% \subsection{Modifying \protect\texttt{xindy} index processing} +% \label{sec:modifyxindy} +% +% \DescribeProgram{xindy} +% \DescribeFile{lwarp.xdy} +% \pkg{lwarpmk} uses the file |lwarp.xdy| to process the index. +% \index{lwarp.xdy>customizing} +% \index{xindy>customizing} +% This file is over-written by \pkg{lwarp} whenever a print version of +% the document is processed. +% +% To customize index processing: +% \begin{enumerate} +% \item Copy |lwarp.xdy| to a new filename such as |projectname.xdy| +% \item Make changes to |projectname.xdy|. +% Keep the line which says +% \begin{Verbatim}[gobble=2,tabsize=4] +% (markup-locref :open "\hyperindexref{" :close "}") +% \end{Verbatim} +% This line creates the hyperlinks for the \HTML\ index. During print output +% \cs{hyperindexref} becomes a null function. +% \item In the document source use the |xdyFilename| option for \pkg{lwarp}: +% \DescribeOption{xdyFilename} +% \begin{Verbatim}[gobble=2,tabsize=4] +% \usepackage[ +% ... other options ... +% xdyFilename=projectname.xdy, +% ]{lwarp} +% \end{Verbatim} +% \item Recompile the print version, which causes +% \pkg{lwarp} to rewrite the |lwarpmk.conf| configuration file. +% This tells |lwarpmk| to use the custom |projectname.xdy| file instead of |lwarp.xdy|. +% \end{enumerate} +% +% +% % % \subsection{Special cases and limitations} % \label{sec:limitations} @@ -3454,6 +3589,17 @@ operating-system path separator used by \pkg{lwarp}. % % \limitstext % +% \subsubsection{Cross-references} +% +% \limitsreferences +% +% \subsubsection{\pkg{cleveref} and \pkg{varioref} packages} +% +% \changes{v0.22}{2017/03/01}{\pkg{varioref}: Supported.} +% +% \limitspageref +% +% % \subsubsection{Footnotes and page notes} % % \limitsfootnotes @@ -3468,7 +3614,7 @@ operating-system path separator used by \pkg{lwarp}. % \margintag{custom MathJax macros} % see page \pageref{ex:mathjaxmacros}. % -% \subsubsection{Ntheorem} +% \subsubsection{\pkg{ntheorem} package} % % \limitsntheorem % @@ -3478,7 +3624,7 @@ operating-system path separator used by \pkg{lwarp}. % \limitsgraphics % % -% \subsubsection{Xcolor} +% \subsubsection{\pkg{xcolor} package} % % \limitsxcolor % @@ -3488,7 +3634,7 @@ operating-system path separator used by \pkg{lwarp}. % \limitstabular % % -% \subsubsection{Longtable} +% \subsubsection{\pkg{longtable} package} % % \limitslongtable % @@ -3505,7 +3651,7 @@ operating-system path separator used by \pkg{lwarp}. % \limitsminipage % % -% \subsubsection{Mdframed} +% \subsubsection{\pkg{mdframed} package} % % \limitsmdframed % @@ -3535,13 +3681,6 @@ operating-system path separator used by \pkg{lwarp}. % \limitsabstract % % -% \subsubsection{\pkg{cleveref} and \pkg{varioref} packages} -% -% \changes{v0.22}{2017/03/01}{\pkg{varioref}: Supported.} -% -% \limitspageref -% -% % \subsubsection{\pkg{verse} and \pkg{memoir}} % % \limitsverse @@ -3576,6 +3715,7 @@ operating-system path separator used by \pkg{lwarp}. % % % \subsubsection{\pkg{glossaries} package} +% \label{sec:glossaries} % % \DescribePackage{glossaries} % \limitsglossaries @@ -3610,7 +3750,7 @@ operating-system path separator used by \pkg{lwarp}. % To assign the author's name for regular \pkg{lwarp} \HTML\ % \margintag{\tag{meta} author} % files, and also for the \EPUB, -% use \cs{HTMLauthor} \marg{name}. This assigns the name to the +% use \cs{HTMLAuthor} \marg{name}. This assigns the name to the % \tag{meta} author tag. It may be set empty, and it defaults to % \cs{theauthor}. % @@ -3848,12 +3988,8 @@ operating-system path separator used by \pkg{lwarp}. % \HTML. The print output compiles faster, and any errors in the printed % version will be easier to figure out than the \HTML\ version. % -% The package \pkg{lwarp-newproject} must be loaded to set up the configuration -% files, but may be commented out from then on unless the configuration changes. -% A small amount of time is taken each time \pkg{lwarp-newproject} is run. -% % Remember that the configuration files are only rewritten when compiling the -% printed version of the document, and when \pkg{lwarp-newproject} is enabled. +% printed version of the document. % % Sometimes it is worth checking the |_html.pdf| file, which is the % \PDF\ containing \HTML\ tags. Also, |_html.html| has @@ -3865,6 +4001,7 @@ operating-system path separator used by \pkg{lwarp}. % % % \subsection{Modifying \protect\texttt{lwarpmk}} +% \label{sec:modifylwarpmk} % % \changes{v0.28}{2017/04/14}{Docs: Modfying lwarpmk and index processing.} % @@ -3878,11 +4015,10 @@ operating-system path separator used by \pkg{lwarp}. % A project-local copy of |lwarpmk.lua| may be generated, modified, and then used to % compile documents: % \begin{enumerate} -% \item Add the |lwarpmk| option to the \pkg{lwarp-newproject} package. +% \item Add the |lwarpmk| option to the \pkg{lwarp} package. % \item Recompile the printed version of the document. -% The |lwarpmk| option causes \pkg{lwarp-newproject} to create a local -% copy of |lwarpmk.lua| -% \item The |lwarpmk| option may now be removed from the \pkg{lwarp-newproject} package. +% The |lwarpmk| option causes \pkg{lwarp} to create a local copy of |lwarpmk.lua| +% \item The |lwarpmk| option may now be removed from the \pkg{lwarp} package. % \item Copy and rename |lwarpmk.lua| to a new file such as |mymake.lua|. % \item Modify |mymake.lua| as desired. % \item If necessary, make |mymake.lua| executable. @@ -3896,24 +4032,6 @@ operating-system path separator used by \pkg{lwarp}. % look for ``|xindy|''. % % -% \subsection{Modifying \protect\texttt{xindy} index processing} -% -% \DescribeProgram{xindy} -% \DescribeFile{lwarp_html.xdy} -% \index{lwarp\_html.xdy>customizing} -% \index{xindy>customizing} -% \pkg{lwarpmk} uses the file |lwarp_html.xdy| to process the index. -% This file is over-written by \pkg{lwarp-newproject} whenever a print version of -% the document is processed. -% -% To customize index processing: -% \begin{enumerate} -% \item Copy |lwarp_html.xdy| to a new filename such as |projectname.xdy| -% \item Make changes to |projectname.xdy| -% \item Make a new version of |lwarpmk|, as previously described, -% which uses |xindy| with |projectname.xdy| instead of |lwarp_html.xdy|. -% \end{enumerate} -% % % % \clearpage @@ -3969,6 +4087,8 @@ operating-system path separator used by \pkg{lwarp}. % \begin{itemize} % \item Use |lwarpmk again| followed % by |lwarpmk html| or |lwarpmk print| to compile the document one more time. +% \item \limitsreferences +% \item \limitspageref % \end{itemize} % % \item [Em-dashes or En-dashes in listing captions and titles:] \ @@ -4009,7 +4129,7 @@ operating-system path separator used by \pkg{lwarp}. % \item [Plain-looking document:] ~ % \begin{itemize} % \item The document's \CSS\ stylesheet may not be available, or may be -% linked incorrectly. Verify any \cs{NewCSS} statements point to +% linked incorrectly. Verify any \cs{CSSFilename} statements point to % a valid \CSS\ file. % \end{itemize} % @@ -4057,6 +4177,11 @@ operating-system path separator used by \pkg{lwarp}. % \subsection{Compiling the \protect\texttt{lwarp.dtx} file} % % \begin{description} +% \item [\texttt{lwarp\_tutorial.tex}:] Copy or link |lwarp_tutorial.txt| +% from the \acro{TDS} |doc| directory to the |source| directory, +% or wherever you wish to compile the documentation. +% This file is included verbatim into the documentation, but is in the |doc| +% directory so that it may be found by |texdoc| and copied by the user. % \item [Illogical error messages caused by an out-of-sync |lwarp.sty| file:] ~ % \begin{enumerate} % \item Delete the |lwarp.sty| file. @@ -4192,8 +4317,6 @@ operating-system path separator used by \pkg{lwarp}. % % \clearpage % -% -% % \section{Detecting the \TeX\ Engine — pdflatex, lualatex, xelatex} % % \begin{macrocode} @@ -4242,11 +4365,11 @@ operating-system path separator used by \pkg{lwarp}. \fi % \end{macrocode} % + + +% \clearpage % -% -% \section{Handling package options} -% \label{sec:handlingpackageoptions} -% +% \section{Early package requirements} % % \DescribePackage{etoolbox} % Provides |\ifbool| and other functions. @@ -4276,6 +4399,76 @@ operating-system path separator used by \pkg{lwarp}. +% \clearpage +% +% +% \section{Operating-System portability} +% \label{sec:OSportability} +% \changes{v0.11}{2016/03/11}{Added section: Operating-System portability.} +% +% \osportabilityusage +% +% +% +% \subsection{Common portability code} +% +% \DescribeBoolean{usingOSWindows} Set if the |OSWindows| option is used. +% \begin{macrocode} +\newbool{usingOSWindows} +\boolfalse{usingOSWindows} +% \end{macrocode} + +% +% \subsection{Unix, Linux, and Mac\,OS} + +% \begin{macro}{\OSPathSymbol} +% Symbol used to separate directories in a path. +% \begin{macrocode} +\newcommand*{\OSPathSymbol}{/} +% \end{macrocode} +% \end{macro} + + +% \subsection{MS-Windows} + +% For MS-Windows: +% +% \begin{macro}{\LWR@setOSWindows} +% Set defaults for the MS-Windows operating system. +% \pkg{lwarp} attempts to auto-detect the operatings system, +% and the |OSWindows| option may also be used to force +% MS-Windows compatibility. +% +% \changes{v0.20}{2016/12/19}{Auto-detects operating system.} +% +% \begin{macrocode} +\newcommand*{\LWR@setOSWindows} +{ +\booltrue{usingOSWindows} +\renewcommand*{\OSPathSymbol}{\@backslashchar} +} +% \end{macrocode} +% \end{macro} +% +% Test for windows during compile. The user may also specify +% |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} @@ -4334,10 +4527,11 @@ operating-system path separator used by \pkg{lwarp}. % \begin{environment}{warpprint} % Anything in the |warpprint| environment will be generated for print output only. % -% \DescribeOption[lwarp]{warpprint} +% \DescribeOption{warpprint} % If the |warpprint| option is given, boolean |warpingprint| is true and boolean |warpingHTML| is false, % and may be used for |\ifbool| tests. % +% % \begin{macrocode} \DeclareVoidOption{warpprint}{% \PackageInfo{lwarp}{Using option 'warpprint'} @@ -4352,7 +4546,7 @@ operating-system path separator used by \pkg{lwarp}. % \begin{environment}{warpHTML} % Anything in the |warpHTML| environment will be generated for \HTML\ output only. % -% \DescribeOption[lwarp]{warpHTML} +% \DescribeOption{warpHTML} % If the |warpHTML| option is given, boolean |warpingHTML| is true and boolean |warpingprint| is false, % and may be used for |\ifbool| tests. % @@ -4373,7 +4567,7 @@ operating-system path separator used by \pkg{lwarp}. % % \changes{v0.19}{2016/05/25}{Options: mathsvg and mathjax} -% \DescribeOption[lwarp]{mathsvg} +% \DescribeOption{mathsvg} % Option |mathsvg| selects \SVG\ math display: % \index{math>mathsvg option} % \index{SVG>mathsvg option} @@ -4385,7 +4579,7 @@ operating-system path separator used by \pkg{lwarp}. } % \end{macrocode} % -% \DescribeOption[lwarp]{mathjax} +% \DescribeOption{mathjax} % Option |mathjax| selects MathJax math display: % \index{math>mathjax option} % \index{MathJax>mathjax option} @@ -4397,60 +4591,167 @@ operating-system path separator used by \pkg{lwarp}. } % \end{macrocode} -% \DescribeOption[lwarp]{BaseJobname} + + +% \DescribeOption{BaseJobname} % Option |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. +% This is used to set \cs{HomeHTMLFilename} if the user did not provide one. % \begin{macrocode} \DeclareStringOption[\jobname]{BaseJobname} % \end{macrocode} -% \DescribeOption[lwarp]{lwarpmklang} Sets the language to be assigned +% \DescribeOption{IndexLanguage} Sets the language to be assigned % in |lwarpmk|'s configuration files. This is then used by |lwarpmk| while -% processing the glossary. +% processing the index and glossary. % % \changes{v0.29}{2017/04/15}{Add: \protect\texttt{lwarpmklang} option for \pkg{lwarp}.} +% \changes{v0.30}{2017/04/28}{Option \protect\texttt{lwarpmklang} changed +% to \protect\texttt{IndexLanguage}.} % % \begin{macrocode} -\DeclareStringOption[english]{lwarpmklang} +\DeclareStringOption[english]{IndexLanguage} % \end{macrocode} -% The default is print output, -% and \SVG\ math if the user chose \HTML\ output. -% \begin{macrocode} -\includecomment{warpprint}% -\excludecomment{warpHTML}% -\booltrue{warpingprint}% -\boolfalse{warpingHTML}% -\boolfalse{mathjax}% +% \DescribeOption{xdyFilename} 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=4] +% (markup-locref :open "\hyperindexref{" :close "}") +% \end{Verbatim} +% +% \changes{v0.30}{2017/04/28}{Option \protect\texttt{xdyFilename} added.} +% +% \begin{macrocode} +\DeclareStringOption[lwarp.xdy]{xdyFilename} +% \end{macrocode} -% \ExecuteOptions{warpprint,mathsvg} -\ProcessKeyvalOptions*\relax +% \DescribeOption{lwarpmk} Tells \pkg{lwarp} to +% generate a local copy of |lwarpmk| called |lwarpmk.lua|. +% Useful for archiving for future use. +% This file may be made executable and acts just like |lwarpmk|. +% +% If |lwarpmk| option, creates a local copy of |lwarpmk.lua|: +% \begin{macrocode} +\DeclareVoidOption{lwarpmk}{ +\PackageInfo{lwarp}{Using option 'lwarpmk'} +\includecomment{LWR@createlwarpmk} +} % \end{macrocode} -% Assign the \cs{BaseJobname} if the user hasn't provided one: + +% \DescribeOption{OSWindows} Tells \pkg{lwarp} to use MS-Windows compatibility. +% Auto-detection of the operating system is attempted, and this option is only +% necessary if the auto-detection fails. +% See the automatically-generated |lwarpmk.conf| file to find out +% whether the operating system was detected correctly. +% +% \changes{v0.30}{2017/04/27}{Option \texttt{OSWindows} replaces macro \cs{warpOSwindows}.} +% % \begin{macrocode} -\providecommand*{\BaseJobname}{\LWR@BaseJobname} +\DeclareVoidOption{OSWindows}{ +\PackageInfo{lwarp}{Using option 'OSWindows'} +\LWR@setOSWindows +} % \end{macrocode} -% \begin{macro}{\@nameedef} \marg{name} \marg{defn} +% \DescribeOption{HomeHTMLFilename} +% The filename of the homepage. +% The default is the jobname. +% This option is stored into \cs{LWR@HomeHTMLFilename}, +% and later transferred into \cs{HomeHTMLFilename} for internal use. +% +% \changes{v0.30}{2017/04/27}{Options \texttt{HomeHTMLFilename} and \texttt{HTMLFilename} +% replace macros \cs{HomeHTMLFilename} and \cs{HTMLFilename}.} % -% Expands || before assigning to || % \begin{macrocode} -\def\@nameedef#1{\expandafter\edef\csname #1\endcsname} +\DeclareStringOption[]{HomeHTMLFilename} % \end{macrocode} -% \end{macro} + + +% \DescribeOption{HTMLFilename} +% The filename prefix of web pages after the homepage. +% The default is empty, no prefix. +% This option is stored into \cs{LWR@HTMLFilename}, +% and later transferred into \cs{HTMLFilename} for internal use. +% +% \begin{macrocode} +\DeclareStringOption[]{HTMLFilename} +% \end{macrocode} + + + +% \DescribeOption{latexmk} +% Option |latexmk| tells |lwarpmk| to use |latexmk| when compiling documents. +% +% \changes{v0.30}{2017/04/29}{Option \protect\texttt{latexmk} replaces macro \cs{UseLatexmk}.} +% +% \begin{macrocode} +\DeclareBoolOption[false]{latexmk} +% \end{macrocode} + + + +% The default is print output, +% \margintag{defaults} +% and \SVG\ math if the user chose \HTML\ output. +% \begin{macrocode} +\includecomment{warpprint}% +\excludecomment{warpHTML}% +\booltrue{warpingprint}% +\boolfalse{warpingHTML}% +\boolfalse{mathjax}% +% \end{macrocode} + + + +% Optionally generate a local copy of |lwarpmk|. Default to no: +% \begin{macrocode} +\excludecomment{LWR@createlwarpmk} +% \end{macrocode} + + +% Execute the package options, with the defaults which have been set just above: +% \margintag{Execute options} +% \begin{macrocode} +\ProcessKeyvalOptions*\relax +% \end{macrocode} + + + + +% Assign the \cs{BaseJobname} if the user hasn't provided one: +% \begin{macrocode} +\providecommand*{\BaseJobname}{\LWR@BaseJobname} +% \end{macrocode} + + +% Defaults unless already over-ridden by the user: +% \begin{macrocode} +\ifcsempty{LWR@HomeHTMLFilename}{ +\newcommand*{\HomeHTMLFilename}{\BaseJobname} +}{ +\csedef{HomeHTMLFilename}{\LWR@HomeHTMLFilename} +} + +\csedef{HTMLFilename}{\LWR@HTMLFilename} +% \end{macrocode} +% + + + @@ -5499,3754 +5800,2724 @@ top=1in,bottom=1in,% -% \section{Operating-System portability} -% \label{sec:OSportability} -% \changes{v0.11}{2016/03/11}{Added section: Operating-System portability.} -% -% \osportabilityusage -% -% \codeall + + + + + +% \section{Configuration Files} + + +% \changes{v0.20}{2016/12/20}{\pkg{lwarp-newproject}: Added.} +% \changes{v0.30}{2017/04/27}{\pkg{lwarp-newproject} removed, and combined with \pkg{lwarp}.} + + + + + % \begin{macrocode} -\begin{warpall} +\begin{warpprint} +\typeout{lwarp: generating configuration files} +\end{warpprint} % \end{macrocode} + + +% \subsection{project\_html.tex} % +% \DescribeFile{project_html.tex} Used to allow an \HTML\ version of the +% document to exist alongside the print version. % -% \subsection{Common portability code} -% -% \DescribeBoolean{usingOSwindows}Set if \cs{warpOSwindows}. +% Only write |\jobname_html.tex| if generating the print version. % \begin{macrocode} -\newbool{usingOSwindows} -\boolfalse{usingOSwindows} +\begin{warpprint} +\ifcsdef{LWR@file}{}{\newwrite{\LWR@file}} +\immediate\openout\LWR@file=\jobname_html.tex +\immediate\write\LWR@file{% +\detokenize{\PassOptionsToPackage}% +{warpHTML,BaseJobname=\jobname}{lwarp}% +} +\immediate\write\LWR@file{% +\detokenize{\input}\string{\jobname.tex\string }% +} +\immediate\closeout\LWR@file +\end{warpprint} % \end{macrocode} -% -% \subsection{Unix, Linux, and Mac\,OS} - -% \begin{macro}{\OSPathSymbol} -% Symbol used to separate directories in a path. -% \begin{macrocode} -\newcommand*{\OSPathSymbol}{/} -% \end{macrocode} -% \end{macro} +% \subsection{lwarpmk.conf} +% +% \DescribeFile{lwarpmk.conf} +% |lwarpmk.conf| is automatically (re-)created by the \pkg{lwarp} package when +% executing\\ +% \hspace*{2ex} |pdflatex |,\\ +% or similar for |xelatex| or |lualatex|, in print-document generation mode, +% which is the default unless the |warpHTML| option is given. +% |lwarpmk.conf| is then used by the utility |lwarpmk|. +% +% An example |lwarpmk.conf|: +% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4,formatcom={\unskip}] +% opsystem = "Unix" -- or "Windows" +% latexname = "pdflatex" -- or "lualatex" or "xelatex" +% sourcename = "projectname" -- your .tex source +% homehtmlfilename = "index" -- or "projectname" +% htmlfilename = "" -- or "projectname" if numbered HTML files +% \end{Verbatim} +% +% \changes{v0.29}{2017/04/15}{File \protect\texttt{lwarpmk.conf}: Add: \protect\texttt{language} option for config files.} +% +% \codeprint +% \begin{macrocode} +\begin{warpprint} +\ifcsdef{LWR@file}{}{\newwrite{\LWR@file}} +\immediate\openout\LWR@file=lwarpmk.conf +\ifbool{usingOSWindows}{ +\immediate\write\LWR@file{opsystem = "Windows"} +}{ +\immediate\write\LWR@file{opsystem = "Unix"} +} +\ifPDFTeX +\immediate\write\LWR@file{latexname = "pdflatex"} +\fi +\ifXeTeX +\immediate\write\LWR@file{latexname = "xelatex"} +\fi +\ifLuaTeX +\immediate\write\LWR@file{latexname = "lualatex"} +\fi +\immediate\write\LWR@file{sourcename = "\jobname"} +\immediate\write\LWR@file{% +homehtmlfilename = "\HomeHTMLFilename"% +} +\immediate\write\LWR@file{htmlfilename = "\HTMLFilename"} +\immediate\write\LWR@file{latexmk = "\ifbool{LWR@latexmk}{true}{false}"} +\immediate\write\LWR@file{language = "\LWR@IndexLanguage"} +\immediate\write\LWR@file{xdyfile = "\LWR@xdyFilename"} +\immediate\closeout\LWR@file +\end{warpprint} +% \end{macrocode} -% \subsection{MS-Windows} -% For MS-Windows: +% \subsection{project.lwarpmkconf} % -% \begin{macro}{\warpOSwindows} -% Set defaults for the MS-Windows operating system. -% \pkg{lwarp} attempts to auto-detect the operatings system, -% so \cs{warpOSwindows} may not be necessary. +% \DescribeFile{project.lwarpmkconf} A project-specific configuration file for |lwarpmk|. % -% \changes{v0.20}{2016/12/19}{Auto-detects operating system.} +% \changes{v0.29}{2017/04/15}{File \protect\texttt{*.lwarpmkconf}: Add: \protect\texttt{language} option for config files.} % % \begin{macrocode} -\newcommand*{\warpOSwindows} -{ -\booltrue{usingOSwindows} -\renewcommand*{\OSPathSymbol}{\@backslashchar} +\begin{warpprint} +\ifcsdef{LWR@file}{}{\newwrite{\LWR@file}} +\immediate\openout\LWR@file=\jobname.lwarpmkconf +\ifbool{usingOSWindows}{ +\immediate\write\LWR@file{opsystem = "Windows"} +}{ +\immediate\write\LWR@file{opsystem = "Unix"} } -% \end{macrocode} -% Test for windows during compile. The user may also specify -% \cs{warpOSwindows} later in case this test fails. -% \begin{macrocode} -\ifwindows -\warpOSwindows +\ifPDFTeX +\immediate\write\LWR@file{latexname = "pdflatex"} +\fi +\ifXeTeX +\immediate\write\LWR@file{latexname = "xelatex"} \fi +\ifLuaTeX +\immediate\write\LWR@file{latexname = "lualatex"} +\fi +\immediate\write\LWR@file{sourcename = "\jobname"} +\immediate\write\LWR@file{% +homehtmlfilename = "\HomeHTMLFilename"% +} +\immediate\write\LWR@file{htmlfilename = "\HTMLFilename"} +\immediate\write\LWR@file{latexmk = "\ifbool{LWR@latexmk}{true}{false}"} +\immediate\write\LWR@file{language = "\LWR@IndexLanguage"} +\immediate\write\LWR@file{xdyfile = "\LWR@xdyFilename"} +\immediate\closeout\LWR@file +\end{warpprint} % \end{macrocode} -% \end{macro} -% \begin{macrocode} -\end{warpall} -% \end{macrocode} -% \section{Stacks} +% \subsection{lwarp.css} -% \codehtml +% \DescribeFile{lwarp.css} +% This is the base \CSS\ layer used by \pkg{lwarp}. +% +% This must be present both when compiling the project +% and also when distributing the \HTML\ files. +% +% \changes{v0.26}{2017/03/30}{\texttt{lwarp.css}: Improved responsive +% \texttt{marginpar} and \texttt{marginblock}.} +% \changes{v0.30}{2017/04/26}{Fix: \protect\texttt{*.css} files only written in print mode.} +% % \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} +\begin{warpprint} +\begin{VerbatimOut}{lwarp.css} +/* + CSS stylesheet for the LaTeX lwarp package + Copyright 2016-2017 Brian Dunn — BD Tech Concepts LLC +*/ +/* a fix for older browsers: */ +header, section, footer, aside, nav, main, + article, figure { display: block; } -% Stacks are used to remember how to close sections and list items. -% Before a new section is started, previously nested sections and items must -% be closed out (un-nested) in proper order. -% Note that starting a new section may close several levels of previously -% \watchout -% nested items at the same time. -% For example, starting a new |\section| would close any currently open -% subsection, subsubsection, and paragraph. -% General environments are not nested on the stack since they have their own close -% mechanism. List environments are nested, and items inside those environments -% are nested one level deeper still. -% List environments may be nested inside other list environments, and list items -% are nested inside list environments as well. Thus, the stack may have items -% which are not necessarily in order, since a description may contain an enumerate, -% for example. -% Depths to be recorded in |\LWR@closedepthone|, etc. -% \subsection{Assigning depths} +A:link {color:#000080 ; text-decoration: none ; } +A:visited {color:#800000 ; } +A:hover {color:#000080 ; text-decoration: underline ;} +A:active {color:#800000 ; } -% initial depths for empty stack entries: -% \begin{macrocode} -\newcommand*{\LWR@depthnone}{-5} -% \end{macrocode} -% all sectioning depths are deeper than |LWR@depthfinished|: -% \begin{macrocode} -\newcommand*{\LWR@depthfinished}{-4} -\newcommand*{\LWR@depthpart}{-1} -\newcommand*{\LWR@depthchapter}{0} -\newcommand*{\LWR@depthsection}{1} -\newcommand*{\LWR@depthsubsection}{2} -\newcommand*{\LWR@depthsubsubsection}{3} -\newcommand*{\LWR@depthparagraph}{4} -\newcommand*{\LWR@depthsubparagraph}{5} -% \end{macrocode} -% used by |\itemize|, |\enumerate|, |\description|: -% \begin{macrocode} -\newcommand*{\LWR@depthlist}{6} -% \end{macrocode} -% used by |\item|: -% \begin{macrocode} -\newcommand*{\LWR@depthlistitem}{7} -% \end{macrocode} +a.tocpart {display: inline-block ; margin-left: 0em ; + font-weight: bold ;} +a.tocchapter {display: inline-block ; margin-left: 0em ; + font-weight: bold ;} +a.tocsection {display: inline-block ; margin-left: 1em ; + text-indent: -.5em ; font-weight: bold ; } +a.tocsubsection {display: inline-block ; margin-left: 2em ; + text-indent: -.5em ; } +a.tocsubsubsection {display: inline-block ; margin-left: 3em ; + text-indent: -.5em ; } +a.tocparagraph {display: inline-block ; margin-left: 4em ; + text-indent: -.5em ; } +a.tocsubparagraph {display: inline-block ; margin-left: 5em ; + text-indent: -.5em ; } +a.tocfigure {margin-left: 0em} +a.tocsubfigure {margin-left: 2em} +a.toctable {margin-left: 0em} +a.tocsubtable {margin-left: 2em} +a.toctheorem {margin-left: 0em} +a.toclstlisting {margin-left: 0em} -% \subsection{Closing actions} -% A stack to record the action to take to close each nesting level: -% Add more levels of stack if necessary for a very deeply nested document, -% adding to |\pushclose| and |\popclose| as well. -% \begin{macrocode} -\newcommand*{\LWR@closeone}{}% top of the stack -\newcommand*{\LWR@closetwo}{} -\newcommand*{\LWR@closethree}{} -\newcommand*{\LWR@closefour}{} -\newcommand*{\LWR@closefive}{} -\newcommand*{\LWR@closesix}{} -\newcommand*{\LWR@closeseven}{} -\newcommand*{\LWR@closeeight}{} -\newcommand*{\LWR@closenine}{} -\newcommand*{\LWR@closeten}{} -\newcommand*{\LWR@closeeleven}{} -\newcommand*{\LWR@closetwelve}{} -% \end{macrocode} +body { + font-family: "DejaVu Serif", "Bitstream Vera Serif", + "Lucida Bright", Georgia, serif; + background: #FAF7F4 ; + color: black ; + margin:0em ; + padding:0em ; + font-size: 100% ; + line-height: 1.2 ; +} -% \subsection{Closing depths} +p {margin: 1.5ex 0em 1.5ex 0em ;} -% A stack to record the depth of each level: -% -% Note that nested LaTeX structures may push depths which are non-sequential. -% \watchout +/* Holds a section number to add space between it and the name */ +span.sectionnumber { margin-right: .6em } -% \begin{docsidebar}[Ex:] -% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4] -% \begin{itemize} -% \item{A} -% \begin{description} -% \item{B} -% \end{description} -% \end{itemize} -% \end{Verbatim} -% \end{docsidebar} +/* Inserted in front of index lines */ +span.indexitem {margin-left: 0em} +span.indexsubitem {margin-left: 2em} +span.indexsubsubitem {margin-left: 4em} -% \begin{macrocode} -\newcommand*{\LWR@closedepthone}{\LWR@depthnone}% top of the stack -\newcommand*{\LWR@closedepthtwo}{\LWR@depthnone} -\newcommand*{\LWR@closedepththree}{\LWR@depthnone} -\newcommand*{\LWR@closedepthfour}{\LWR@depthnone} -\newcommand*{\LWR@closedepthfive}{\LWR@depthnone} -\newcommand*{\LWR@closedepthsix}{\LWR@depthnone} -\newcommand*{\LWR@closedepthseven}{\LWR@depthnone} -\newcommand*{\LWR@closedeptheight}{\LWR@depthnone} -\newcommand*{\LWR@closedepthnine}{\LWR@depthnone} -\newcommand*{\LWR@closedepthten}{\LWR@depthnone} -\newcommand*{\LWR@closedeptheleven}{\LWR@depthnone} -\newcommand*{\LWR@closedepthtwelve}{\LWR@depthnone} -% \end{macrocode} +div.hidden { display: none ; } -% \subsection{Pushing and popping the stack} +kbd { + font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console", + "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono", + "Courier New", monospace; + font-size: 100% ; +} -% \begin{macro}{\pushclose} \marg{action} \marg{depth} +span.strong { font-weight: bold; } -% Pushes one return action and its LaTeX depth onto the stacks. -% \begin{macrocode} -\NewDocumentCommand{\pushclose}{m m} -{ -\let\LWR@closetwelve\LWR@closeeleven -\let\LWR@closeeleven\LWR@closeten -\let\LWR@closeten\LWR@closenine -\let\LWR@closenine\LWR@closeeight -\let\LWR@closeeight\LWR@closeseven -\let\LWR@closeseven\LWR@closesix -\let\LWR@closesix\LWR@closefive -\let\LWR@closefive\LWR@closefour -\let\LWR@closefour\LWR@closethree -\let\LWR@closethree\LWR@closetwo -\let\LWR@closetwo\LWR@closeone -\let\LWR@closeone#1 -\let\LWR@closedepthtwelve\LWR@closedeptheleven -\let\LWR@closedepthelevel\LWR@closedepthten -\let\LWR@closedepthten\LWR@closedepthnine -\let\LWR@closedepthnine\LWR@closedeptheight -\let\LWR@closedeptheight\LWR@closedepthseven -\let\LWR@closedepthseven\LWR@closedepthsix -\let\LWR@closedepthsix\LWR@closedepthfive -\let\LWR@closedepthfive\LWR@closedepthfour -\let\LWR@closedepthfour\LWR@closedepththree -\let\LWR@closedepththree\LWR@closedepthtwo -\let\LWR@closedepthtwo\LWR@closedepthone -\let\LWR@closedepthone#2 +span.textmd { font-weight: normal; } + +span.textsc { font-variant: small-caps; } + +span.textup { font-variant: normal; } + +span.textrm { + font-family: "DejaVu Serif", "Bitstream Vera Serif", + "Lucida Bright", Georgia, serif; } -% \end{macrocode} -% \end{macro} -% \begin{macro}{\popclose} +span.textsf { + font-family: "DejaVu Sans", "Bitstream Vera Sans", + Geneva, Verdana, sans-serif ; +} -% Pops one action and its depth off the stacks. -% \begin{macrocode} -\newcommand*{\popclose} -{ -\let\LWR@closeone\LWR@closetwo -\let\LWR@closetwo\LWR@closethree -\let\LWR@closethree\LWR@closefour -\let\LWR@closefour\LWR@closefive -\let\LWR@closefive\LWR@closesix -\let\LWR@closesix\LWR@closeseven -\let\LWR@closeseven\LWR@closeeight -\let\LWR@closeeight\LWR@closenine -\let\LWR@closenine\LWR@closeten -\let\LWR@closeten\LWR@closeeleven -\let\LWR@closeeleven\LWR@closetwelve -\let\LWR@closedepthone\LWR@closedepthtwo -\let\LWR@closedepthtwo\LWR@closedepththree -\let\LWR@closedepththree\LWR@closedepthfour -\let\LWR@closedepthfour\LWR@closedepthfive -\let\LWR@closedepthfive\LWR@closedepthsix -\let\LWR@closedepthsix\LWR@closedepthseven -\let\LWR@closedepthseven\LWR@closedeptheight -\let\LWR@closedeptheight\LWR@closedepthnine -\let\LWR@closedepthnine\LWR@closedepthten -\let\LWR@closedepthten\LWR@closedeptheleven -\let\LWR@closedeptheleven\LWR@closedepthtwelve +span.attribution { + margin-left: 1em ; font-size: 80% ; font-variant: small-caps; } -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} +span.citetitle { + margin-left: 1em ; font-size: 80% ; font-style: oblique; +} +span.poemtitle { + font-size: 120% ; font-weight: bold; +} +blockquote { + margin-left: 0px ; + margin-right: 0px ; +} +blockquote p { + line-height: 1.5; + text-align: left ; + font-size: .85em ; + margin-left: 3em ; + margin-right: 3em ; +} -% \section{Data arrays} -% \label{sec:dataarray} -% -% These macros are similar to the \pkg{arrayjobx} package, except -% that \cs{LWR@setexparray}'s argument is expanded only once when assigned. -% -% |name| has no backslash, |index| can be a number or a text name, -% and an empty |value| must be |\relax| instead of empty. -% -% To assign an empty value: -% \begin{sourcedisplay} -% |\LWR@setexparray{name}{index}{\relax}| -% \end{sourcedisplay} -% -% \changes{v0.20}{2017/01/07}{Added single-expansion data arrays.} -% -% -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} -% -% \begin{macro}{\LWR@setexparray} \marg{name} \marg{index} \marg{contents} -% \begin{macrocode} -\NewDocumentCommand{\LWR@setexparray}{m m m}{% -\expandafter\edef\csname #1#2\endcsname{\expandonce#3}% +blockquotation { + margin-left: 0px ; + margin-right: 0px ; } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\LWR@getexparray} \marg{name} \marg{index} -% \begin{macrocode} -\newcommand*{\LWR@getexparray}[2]{\csuse{#1#2}} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} +blockquotation p { + line-height: 1.5; + text-align: left ; + font-size: .85em ; + margin-left: 3em ; + margin-right: 3em ; +} +div.epigraph { + line-height: 1.2; + text-align: left ; + padding: 3ex 1em 0ex 1em ; +/* margin: 3ex auto 3ex auto ; */ /* Epigraph centered */ + margin: 3ex 1em 3ex auto ; /* Epigraph to the right */ +/* margin: 3ex 1em 3ex 1em ; */ /* Epigraph to the left */ + font-size: .85em ; + max-width: 27em ; +} -% \section{HTML entities} -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} - -% \HTML\ entites and \HTML\ Unicode entities: -% \begin{macrocode} -\let\LWR@origampersand\& -% \end{macrocode} -% \begin{macro}{\HTMLentity} \marg{entitytag} -% \begin{macrocode} -\newcommand*{\HTMLentity}[1]{\LWR@origampersand#1;} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\HTMLunicode} \marg{hex\_unicode} -% \begin{macrocode} -\newcommand*{\HTMLunicode}[1]{\HTMLentity{\#x#1}} -% \end{macrocode} -% \end{macro} - -% \DescribeMacro{\&} -% \begin{macrocode} -\renewcommand*{\&}{\HTMLentity{amp}} -% \end{macrocode} +div.epigraphsource{ + text-align:right ; + margin-left:auto ; +/* max-width: 50% ; */ + border-top: 1px solid #A0A0A0 ; + padding-bottom: 3ex ; + line-height: 1.2; +} -% \begin{macro}{\textless} -% \begin{macro}{\textgreater} -% \begin{macrocode} -\let\LWR@origtextless\textless -\renewcommand*{\textless}{\HTMLentity{lt}} +div.epigraph p { padding: .5ex ; margin: 0ex ;} +div.epigraphsource p { padding: .5ex 0ex 0ex 0ex ; margin: 0ex ;} -\let\LWR@origtextgreater\textgreater -\renewcommand*{\textgreater}{\HTMLentity{gt}} -% \end{macrocode} -% \end{macro} -% \end{macro} -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} +/* lettrine package: */ +span.lettrine { font-size: 3ex ; float: left ; } +span.lettrinetext { font-variant: small-caps ; } +/* ulem and soul packages: */ +span.uline { + text-decoration: underline ; + text-decoration-skip ; +} +span.uuline { + text-decoration: underline ; + text-decoration-skip ; + text-decoration-style: double ; +} -% \section{HTML filename generation} -% +span.uwave { + text-decoration: underline ; + text-decoration-skip ; + text-decoration-style: wavy ; +} -% The filename of the homepage is set to |\HomeHTMLFileName.html|. -% The filenames of additional sections start with |\HTMLfiveName|, to which is -% appended a section number or a simplified section name, depending on |FileSectionNames|. -% +span.sout { + text-decoration: line-through ; +} -% \codeall -% \begin{macrocode} -\begin{warpall} -% \end{macrocode} +span.xout { + text-decoration: line-through ; +} +span.dashuline { + text-decoration: underline ; + text-decoration-skip ; + text-decoration-style: dashed ; +} -% \begin{macro}{\BaseJobname} -% 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} -\providecommand*{\BaseJobname}{\jobname} -% \end{macrocode} -% \end{macro} +span.dotuline { + text-decoration: underline ; + text-decoration-skip ; + text-decoration-style: dotted ; +} -% \begin{macro}{\HTMLfiveName} -% \changes{v0.19}{2016/05/28}{Docs: Escape filename underscores.} -% \changes{v0.20}{2016/12/18}{No longer escape underscores.} -% The prefix for all generated \HTML\ files other than the home page, -% defaulting to empty. See \cref{sec:filenameexamples}. -% -% \begin{macrocode} -\providecommand*{\HTMLfiveName}{} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\HomeHTMLFileName} -% \changes{v0.19}{2016/05/28}{Docs: Escape filename underscores.} -% \changes{v0.20}{2016/12/18}{No longer escape underscores.} -% The filename of the home page, defaulting to the \cs{BaseJobname}. -% See \cref{sec:filenameexamples}. -% -% \begin{macrocode} -\providecommand*{\HomeHTMLFileName}{\BaseJobname} -% \end{macrocode} -% \end{macro} -% +span.letterspacing { letter-spacing: .2ex ; } -% \begin{macro}{\SetHTMLFileNumber} \marg{number} -% -% \changes{v0.20}{2016/09/11}{Add: Control file numbers.} -% Sets the file number for the next -% file to be generated. 0 is the home page. -% Use just before the next sectioning command, and set it to one less than the -% desired number of the next section. -% May be used to generate numbered groups of nodes -% such as 100+ for one chapter, 200+ for another chapter, etc. -% \begin{macrocode} -\newcommand*{\SetHTMLFileNumber}[1]{% -\setcounter{LWR@htmlfilenumber}{#1}% +span.capsspacing { + font-variant: small-caps ; + letter-spacing: .1ex ; } -% \end{macrocode} -% \end{macro} -% \DescribeBoolean{FileSectionNames} -% Selects how to create \HTML\ file names. -% -% Defaults to use section names in the filenames. -% \begin{macrocode} -\newbool{FileSectionNames} -\booltrue{FileSectionNames} -% \end{macrocode} +span.highlight { background: #F8E800 ; } -% \begin{macrocode} -\end{warpall} -% \end{macrocode} -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} +html body { + margin: 0 ; + line-height: 1.2; +} -% \DescribeCounter{LWR@htmlfilenumber} -% Records the number of each \HTML\ file as it is being created. -% Number 0 is the home page. -% \begin{macrocode} -\newcounter{LWR@htmlfilenumber} -\setcounter{LWR@htmlfilenumber}{0} -% \end{macrocode} +body div { + margin: 0ex; +} -% \begin{macro}{\LWR@htmlsectionfilename} \marg{htmlfilenumber or name} -% -% \changes{v0.14}{2016/03/28}{Fix: Links to home page.} -% \changes{v0.17}{2016/04/11}{Fix: Links when entire doc is one \HTML\ page.} -% \changes{v0.20}{2016/09/11}{HTMLFileName: removed additional trailing '-', and may be empty.} -% \changes{v0.20}{2016/09/11}{Sections called ``Index'' or ``index'' have an underscore -% prepended to their filenames if no prefix.} -% -% Prints the filename for a given section: |\HTMLfiveName{}filenumber/name.html| -% \begin{macrocode} -\newcommand*{\LWR@htmlsectionfilename}[1]{% -\LWR@traceinfo{LWR@htmlsectionfilename A}% -% \end{macrocode} -% Section 0 or empty is given the home filename. -% The filename must be detokenized for underscores. -% \begin{macrocode} -\LWR@traceinfo{about to assign temp}% -\edef\LWR@tempone{#1}% -\LWR@traceinfo{about to compare with ??}% -\ifthenelse{\equal{\LWR@tempone}{??}}% -{% -\LWR@traceinfo{found ??}% -}{% -\LWR@traceinfo{not found ??}% -}% -\LWR@traceinfo{about to compare with zero or empty}% -\ifthenelse{% -\equal{\LWR@tempone}{0}% -\OR \equal{\LWR@tempone}{}% -\OR \equal{\LWR@tempone}{??}% -}% -{% -\LWR@traceinfo{LWR@htmlsectionfilename B \HomeHTMLFileName.html}% -\HomeHTMLFileName.html% -}% -% \end{macrocode} -% For a \LaTeX\ section named ``Index'' or ``index'' without a prefix, create a filename -% with a leading underscore to avoid colliding with the \HTML\ filename |index.html|: -% \begin{macrocode} -{% -\LWR@traceinfo{LWR@htmlsectionfilename C \LWR@tempone}% -\ifthenelse{% -\equal{\HTMLfiveName}{} \AND \equal{\LWR@tempone}{Index} \OR \equal{\LWR@tempone}{index}% -}% -{% -\LWR@traceinfo{prefixing the index name with an underscore.}% -\_#1.html}% -% \end{macrocode} -% Otherwise, create a filename with the chosen prefix: -% \begin{macrocode} -{\HTMLfiveName#1.html}% -}% -\LWR@traceinfo{LWR@htmlsectionfilename Z}% +h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph +{ + font-family: "Linux Libertine O", "Hoefler Text", "Garamond", + "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", + "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, + "Times New Roman", serif; + font-style: normal ; + font-weight: bold ; + text-align: left ; } -% \end{macrocode} -% \end{macro} -% \begin{macro}{\LWR@htmlrefsectionfilename} \marg{label} -% -% Prints the filename for the given label -% \begin{macrocode} -\newcommand*{\LWR@htmlrefsectionfilename}[1]{% -\LWR@traceinfo{LWR@htmlrefsectionfilename A: !#1!}% -\LWR@htmlsectionfilename{\LWR@htmlfileref{#1}}% -\LWR@traceinfo{LWR@htmlrefsectionfilename B}% +h1 { /* title of the entire website, used on each page */ + text-align: center ; + font-size: 2.5em ; + padding: .4ex 0em 0ex 0em ; } -% \end{macrocode} -% \end{macro} - -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} +h2 { font-size: 2.25em } +h3 { font-size: 2em } +h4 { font-size: 1.75em } +h5 { font-size: 1.5em } +h6 { font-size: 1.25em } +span.paragraph {font-size: 1em ; font-variant: normal ; + margin-right: 1em ; } +span.subparagraph {font-size: 1em ; font-variant: normal ; + margin-right: 1em ; } -% \section{Homepage link} - -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} +/* Title of the file */ +h1 { + margin: 0ex 0em 0ex 0em ; + line-height: 1.3; + text-align: center ; +} +/* Part */ +h2 { + margin: 1ex 0em 1ex 0em ; + line-height: 1.3; + text-align: center ; +} -% \begin{macro}{\LinkHome} -% |\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}% +/* Chapter */ +h3 { + margin: 3ex 0em 1ex 0em ; + line-height: 1.3; } -% \end{macrocode} -% \end{macro} -% \begin{macro}{\LWR@topnavigation} -% -% Creates a link to the homepage at the top of the page for use when the window is too -% narrow for the side\TOC. -% \begin{macrocode} -\newcommand*{\LWR@topnavigation}{ -\LWR@htmlelementclassline{nav}{topnavigation}{\LinkHome} +/* Section */ +h4 { + margin: 3ex 0em 1ex 0em ; + line-height: 1.3; } -% \end{macrocode} -% \end{macro} -% \begin{macro}{\LWR@botnavigation} -% -% Creates a link to the homepage at the bottom of the page for use when the window is too -% narrow for the side\TOC. -% \begin{macrocode} -\newcommand*{\LWR@botnavigation}{ -\LWR@htmlelementclassline{nav}{botnavigation}{\LinkHome} +/* Sub-Section */ +h5 { + margin: 3ex 0em 1ex 0em ; + line-height: 1.3; } -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} +/* Sub-Sub-Section */ +h6 { + margin: 3ex 0em 1ex 0em ; + line-height: 1.3; +} +div.titlepage { + text-align: center ; +} -% \section{\textbackslash{}PrintStack diagnostic tool} +.footnotes { + font-size: .85em ; + margin: 3ex 1em 0ex 1em ; + padding-bottom: 1ex ; + border-top: 1px solid silver ; +} -% Diagnostics tool: -% Prints the LaTeX nesting depth values for the stack levels. -% Must have |\LWR@startpars| active while printing the stack, so |\PrintStack| may -% \watchout -% be called from anywhere in the normal text flow. +.marginpar { + max-width:50%; + float:right; + text-align:left; + margin: 1ex 0.5em 1ex 1em ; + padding: 1ex 0.5em 1ex 0.5em ; + font-size: 85% ; + border-top: 1px solid silver ; + border-bottom: 1px solid silver ; + overflow-x: auto; +} -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} +.marginpar br { margin-bottom: 2ex ; } -% \begin{macro}{\PrintStack} Prints the closedepth stack. -% \begin{macrocode} -\newcommand*{\PrintStack}{ -\LWR@startpars -\LWR@closedepthone{} \LWR@closedepthtwo{} \LWR@closedepththree{} -\LWR@closedepthfour{} \LWR@closedepthfive{} \LWR@closedepthsix{} -\LWR@closedepthseven{} \LWR@closedeptheight{} \LWR@closedepthnine{} -\LWR@closedepthten{} \LWR@closedeptheleven{} \LWR@closedepthtwelve{} +div.marginblock { + max-width:50%; + float:right; + text-align:left; + margin: 1ex 0.5em 1ex 1em ; + padding: 1ex 0.5em 1ex 0.5em ; + overflow-x: auto; } -% \end{macrocode} -% \end{macro} - -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} +div.marginblock div.minipage { + display: block ; + margin: 0pt auto 0pt auto ; +} -% \section{Closing stack levels} +div.marginblock div.minipage p { font-size: 85%} -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} +div.marginblock br { margin-bottom: 2ex ; } -% Close one nested level: -% \begin{macrocode} -\newcommand*{\LWR@closeoneprevious}{% +section.textbody div.footnotes{ + margin: 3ex 0em 0ex 0em ; + border-bottom: 2px solid silver ; +} -\LWR@closeone{} +.footnoteheader { + border-top: 2px solid silver ; + margin-top: 3ex ; + padding-top: 1ex ; + font-weight: bold ; +} -\popclose{} +.mpfootnotes { + text-align: left ; + font-size: .85em ; + margin-left: 1em ; + border-top: 1px solid silver ; } -% \end{macrocode} -% \begin{macro}{\LWR@closeprevious} \marg{depth} -% Close everything up to the given depth: -% \begin{macrocode} -\newcommand*{\LWR@closeprevious}[1]{ -% \end{macrocode} -% Close any pending paragraph: -% \begin{macrocode} -\LWR@stoppars -% \end{macrocode} -% Close anything nested deeper than the desired depth: -% \begin{macrocode} -\whiledo{\not\(\LWR@closedepthone<#1\)}{\LWR@closeoneprevious} +/* Remove footnote top border in the title page. */ +div.titlepage div.mpfootnotes { + border-top: none ; } -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} +ol { + margin: 1ex 1em 1ex 0em; + line-height: 1.2; +} +ul, body dir, body menu { + margin: 1ex 1em 1ex 0em; + line-height: 1.2; +} -% \section{Forcing a new PDF page} +li { margin: 0ex 0em 1ex 0em; } -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} +html { + margin: 0; + padding: 0; +} +.programlisting { + font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console", + "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono", + "Courier New", monospace; + margin: 1ex 0ex 1ex 0ex ; + padding: .5ex 0pt .5ex 0pt ; + overflow-x: auto; +} -% \begin{macro}{\LWR@forcenewpage} New \PDF\ page a before major environment. -% -% This is used just before major environments, such as \env{verse}. -% Reduces the chance of an environment overflowing the \HTML\ \PDF\ output page. -% -% \changes{v0.28}{2017/04/13}{Forces new PDF page before major environments.} -% \begin{macrocode} -\newcommand{\LWR@forcenewpage}{% -\LWR@stoppars\LWR@orignewpage\LWR@startpars% +section.textbody>pre.programlisting { +border-top: 1px solid silver ; +border-bottom: 1px solid silver ; } -% \end{macrocode} -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} -% \end{macro} +.inlineprogramlisting { + font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console", + "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono", + "Courier New", monospace; + overflow-x: auto; +} -% \section{HTML tags, spans, divs, elements} -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} +div.abstract { + margin: 2em 5% 2em 5% ; + padding: 1ex 1em 1ex 1em ; +/* font-weight: bold ; */ + font-size: 90% ; +} +div.abstract dl {line-height:1.5;} +div.abstract dt {color:#304070;} -% \subsection{Mapping \LaTeX{} Sections to HTML Sections} +div.abstracttitle{ + font-family: "URW Classico", Optima, "Linux Biolinum O", + "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L", + "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; + font-weight:bold; + font-size:1.25em; + text-align: center ; +} -% \begin{macrocode} -\newcommand*{\LWR@tagpart}{h2} -\newcommand*{\LWR@tagpartend}{/h2} -\newcommand*{\LWR@tagchapter}{h3} -\newcommand*{\LWR@tagchapterend}{/h3} -\newcommand*{\LWR@tagsection}{h4} -\newcommand*{\LWR@tagsectionend}{/h4} -\newcommand*{\LWR@tagsubsection}{h5} -\newcommand*{\LWR@tagsubsectionend}{/h5} -\newcommand*{\LWR@tagsubsubsection}{h6} -\newcommand*{\LWR@tagsubsubsectionend}{/h6} -\newcommand*{\LWR@tagparagraph}{span class="paragraph"{}} -\newcommand*{\LWR@tagparagraphend}{/span} -\newcommand*{\LWR@tagsubparagraph}{span class="subparagraph"{}} -\newcommand*{\LWR@tagsubparagraphend}{/span} +span.abstractrunintitle{ + font-family: "URW Classico", Optima, "Linux Biolinum O", + "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L", + "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; + font-weight:bold; +} -\newcommand*{\LWR@tagregularparagraph}{p} -% \end{macrocode} +.verbatim { + overflow-x: auto ; +} -% \subsection{HTML tags} - -% \begin{macro}{\LWR@htmltagc} \marg{tag} -% Break ligatures and use upright apostrophes in \HTML\ tags. -% -%|\protect| is in case the tag appears in TOC, LOF, LOT. -% \begin{macrocode} - -\newcommand*{\LWR@htmltagc}[1]{% -{% -\protect\LWR@origttfamily% -\protect\LWR@origtextless#1\protect\LWR@origtextgreater% -}% +.alltt { + overflow-x: auto ; } -% \end{macrocode} -% \end{macro} -% - - -% \begin{environment}{LWR@nestspan} Disable \env{minipage}, \cs{parbox} inside a \tag{span}. -% -% |\begin{LWR@nestspan}| must follow the opening || tag to allow -% \watchout -% a paragraph to start if the span is at the beginning of a new paragraph. -% -% |\end{LWR@nestspan}| must follow the |/span| or an extra |

| may appear. -% \watchout -% -% \changes{v0.20}{2016/12/24}{Fix: Minipages inside a span.} -% -% \begin{macrocode} -\newenvironment*{LWR@nestspan} -{% -\addtocounter{LWR@spandepth}{1}% -\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}% -}% -{\addtocounter{LWR@spandepth}{-1}} -% \end{macrocode} -% \end{environment} -% \begin{macro}{\LWR@htmlspan} \marg{tag} \marg{text} -% -% \cs{LWR@spandepth} is used to ensure that paragraph tags are not -% generated inside a span. The exact sequence of when to add and subtract -% \watchout -% the counter is important to correctly handle the paragraph tags before -% and after the span. -% -% \begin{macrocode} -\NewDocumentCommand{\LWR@htmlspan}{m +m}{% -\LWR@ensuredoingapar% -\LWR@htmltagc{#1}% -\begin{LWR@nestspan}% -#2% -\LWR@htmltagc{/#1}% -\end{LWR@nestspan}% +.bverbatim { + margin: 1ex 0pt 1ex 0pt ; + padding: .5ex 0pt .5ex 0pt ; + overflow-x: auto ; } -% \end{macrocode} -% \end{macro} +.lverbatim { + margin: 1ex 0pt 1ex 0pt ; + padding: .5ex 0pt .5ex 0pt ; + overflow-x: auto ; +} -% \begin{macro}{\LWR@htmlspanclass} \marg{class} \oarg{style} \marg{text} -% \begin{macrocode} -\NewDocumentCommand{\LWR@htmlspanclass}{m o +m}{% -\LWR@ensuredoingapar% -\LWR@subhtmlelementclass{span}{#1}[#2]% -\begin{LWR@nestspan}% -#3% -\LWR@htmltagc{/span}% -\end{LWR@nestspan}% +.fancyvrb { + font-size:.85em ; + margin: 3ex 0pt 3ex 0pt } -% \end{macrocode} -% \end{macro} +.fancyvrblabel { + font-weight:bold; + text-align: center ; +} -% \begin{macro}{\LWR@htmltag} \marg{tag} -% Print an \HTML\ tag: \textless{}tag\textgreater{} -% \begin{macrocode} -\newcommand*{\LWR@htmltagb}[1]{% -\LWR@htmltagc{#1}% -\endgroup% +.verse { + font-family: "Linux Libertine Mono O", "Lucida Console", + "Droid Sans Mono", "DejaVu Mono", "Bitstream Vera Mono", + "Liberation Mono", "FreeMono", "Andale Mono", + "Nimbus Mono L", "Courier New", monospace; + margin-left: 1em ; } -\newcommand*{\LWR@htmltag}{% -\begingroup\catcode`\_=12 -\LWR@htmltagb% -} -% \end{macrocode} -% \end{macro} -% \subsection{Block tags and comments} +div.singlespace { line-height: 1.2 ; } +div.onehalfspace { line-height: 1.5 ; } +div.doublespace { line-height: 2 ; } -% In the following, |\origttfamily| breaks ligatures, which may not be used for \HTML\ codes: -% -% \begin{macro}{\LWR@htmlopencomment} -% \begin{macro}{\LWR@htmlclosecomment} -% \begin{macrocode} -\newcommand*{\LWR@htmlopencomment}{% -{\LWR@origttfamily\LWR@origtextless{}!{-}{-}}% -} -\newcommand*{\LWR@htmlclosecomment}{% -{\LWR@origttfamily{-}{-}\LWR@origtextgreater{}}% -} -% \end{macrocode} -% \end{macro} -% \end{macro} -% \begin{macro}{\LWR@htmlcomment} \marg{comment} -% -% \changes{v0.28}{2017/04/13}{Breaks ligatures in \HTML\ comments.} -% -% \begin{macrocode} -\newcommand{\LWR@htmlcomment}[1]{% -\LWR@htmlopencomment{}% -{% -\LWR@origttfamily% break ligatures -#1% -}% -\LWR@htmlclosecomment{}} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\LWR@htmlblockcomment} \marg{comment} -% \begin{macrocode} -\newcommand{\LWR@htmlblockcommentb}[1] -{\LWR@stoppars\LWR@htmlcomment{#1}\LWR@startpars\endgroup} -\newcommand{\LWR@htmlblockcomment} -{% -\begingroup\catcode`\_=12% -\LWR@htmlblockcommentb% -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\LWR@htmlblocktag} \marg{tag} print a stand-alone \HTML\ tag -% \begin{macrocode} -\newcommand*{\LWR@htmlblocktag}[1]{% -\LWR@stoppars% -\LWR@htmltag{#1}% -\LWR@startpars% +/* Minipage environments, vertically aligned to top, center, bottom: */ +.minipage { + /* display: inline-block ; */ + /* Mini pages which follow each other will be tiled. */ + margin: .25em .25em .25em .25em; + padding: .25em .25em .25em .25em; + display: inline-flex; + flex-direction: column ; + overflow: auto; } -% \end{macrocode} -% \end{macro} +/* Paragraphs in the flexbox did not collapse their margins. */ +/* Have not yet researched this. */ +.minipage p {margin: .75ex 0em .75ex 0em ;} -% \subsection{Div class and element class} -% \begin{macro}{\LWR@subhtmlelementclass} \marg{element} \marg{class} \oarg{style} -% -% Factored and reused in several places. -% -% \changes{v0.20}{2017/01/17}{Factored code.} -% -% \begin{macrocode} -\NewDocumentCommand{\LWR@subhtmlelementclass}{m m o}{% -\IfValueTF{#3}% -{% option -\ifthenelse{\equal{#3}{}}% -{\LWR@htmltag{#1 class="#2"}}% empty option -{\LWR@htmltag{#1 class="#2" style="#3"}}% non-empty option -}% option -{\LWR@htmltag{#1 class="#2"}}% no option +.framebox { + margin: 0ex ; + padding: 0ex ; + border: 1px solid black; + border-radius: 0px ; + padding: .3ex .2em 0ex .2em ; + margin: .1ex ; + display: inline-block ; } -% \end{macrocode} -% \end{macro} -% \begin{macro}{\LWR@htmlelementclass} \marg{element} \marg{class} \oarg{style} -% -% \changes{v0.20}{2017/01/17}{Added optional style.} -% -% \begin{macrocode} -\NewDocumentCommand{\LWR@htmlelementclass}{m m o}{% -\LWR@stoppars% -\LWR@subhtmlelementclass{#1}{#2}[#3]% -\LWR@startpars% +.mdframed { +/* padding: 0ex ; */ +/* border: 1px solid blafck; */ +/* border-radius: 0px ; */ + padding: 0ex ; + margin: 3ex 5% 3ex 5% ; +/* display: inline-block ; */ } -% \end{macrocode} -% \end{macro} +.mdframed p { padding: 0ex .5em 0ex .5em ; } -% \begin{macro}{\LWR@htmlelementclassend} \marg{element} \marg{class} -% \begin{macrocode} -\newcommand*{\LWR@htmlelementclassend}[2]{% -\LWR@stoppars% -\LWR@htmltag{/#1}% -\ifbool{HTMLDebugComments}{% -\LWR@htmlcomment{End of #1 ``#2''}% -}{}% -\LWR@startpars% +.mdframed dl { padding: 0ex .5em 0ex .5em ; } + +.mdframedtitle { + padding: .5em ; + display: block ; + font-size: 130% } -% \end{macrocode} -% \end{macro} -% \begin{macro}{\LWR@htmldivclass} \marg{class} \oarg{style} -% -% \changes{v0.20}{2017/01/17}{Added optional style.} -% -% \begin{macrocode} -\NewDocumentCommand{\LWR@htmldivclass}{m o}{% -\LWR@htmlelementclass{div}{#1}[#2]% +.mdframedsubtitle { + padding: 0ex .5em 0ex .5em ; + display: block ; + font-size: 115% ; } -% \end{macrocode} -% \end{macro} -% \begin{macro}{\LWR@htmldivclassend} \marg{class} -% \begin{macrocode} -\newcommand*{\LWR@htmldivclassend}[1]{% -\LWR@htmlelementclassend{div}{#1}% +.mdframedsubsubtitle { + padding: 0ex .5em 0ex .5em ; + display: block ; } -% \end{macrocode} -% \end{macro} -% \subsection{Single-line elements} +.mdtheorem { + padding: 0ex .5em 0ex .5em ; + margin: 3ex 5% 3ex 5% ; +/* display: inline-block ; */ +} -% A single-line element, without a paragraph tag for the line of text: -% \begin{macro}{\LWR@htmlelementclassline} -% \marg{element} \marg{class} \oarg{style} \marg{text} -% \begin{macrocode} -\NewDocumentCommand{\LWR@htmlelementclassline}{m m o +m}{% -\LWR@stoppars -\LWR@subhtmlelementclass{#1}{#2}[#3]% -#4% -\LWR@htmltag{/#1} -\LWR@startpars +/* framed package */ +.framed { + margin: 3ex 0em 3ex 0em ; + border: 1px solid black; + border-radius: 0px ; + padding: .3ex 1em 0ex 1em ; + display: block ; } -% \end{macrocode} -% \end{macro} -% -% +.snugframed { + margin: 3ex 0em 3ex 0em ; + border: 1px solid black; + border-radius: 0px ; + display: block ; +} -% \subsection{HTML5 semantic elements} - +.framedleftbar { + margin: 3ex 0em 3ex 0em ; + border-left: 3pt solid black; + border-radius: 0px ; + padding: .3ex .2em .3ex 1em ; + display: block ; +} -% \begin{macro}{\LWR@htmlelement} \marg{element} -% \begin{macrocode} -\newcommand*{\LWR@htmlelement}[1]{% -\LWR@htmlblocktag{#1} +.framedtitle { + margin: 0em ; + padding: 0em ; + font-size: 130% } -% \end{macrocode} -% \end{macro} -% \begin{macro}{\LWR@htmlelementend} \marg{element} -% \begin{macrocode} -\newcommand*{\LWR@htmlelementend}[1]{% -\LWR@stoppars -\LWR@htmltag{/#1} -\LWR@startpars +.framedtitle p { padding: .3em } + + + +dl { + margin: 1ex 2em 1ex 0em; + line-height: 1.3; } -\end{warpHTML} -% \end{macrocode} -% \end{macro} +dl dt { + margin-top: 1ex; + font-weight: bold; +} +dl dd p { margin-top: 0em; } -% \subsection{High-level block and inline classes} -% \label{sec:highlevelclasses} -% +nav.toc, nav.lof, nav.lot, nav.lol, nav.lothm { + font-family: "URW Classico", Optima, "Linux Biolinum O", + "DejaVu Sans", "Bitstream Vera Sans", + Geneva, Verdana, sans-serif ; + margin-bottom: 4ex ; +} -% These are high-level commands which allow the creation of -% arbitrary block or inline -% sections which may be formatted with \CSS. +nav.toc p, nav.lof p, nav.lot p, nav.lol p, nav.lothm p { + line-height: 1.2 ; + margin-top:.5ex ; + margin-bottom:.5ex; + font-size: .9em ; +} -% For other direct-formatting commands, see \cref{sec:directformatting}. -% \begin{environment}{BlockClass} \marg{class} \oarg{style} \quad -% High-level interface for div classes. -% -% \qquad Ex: |\begin{BlockClass}{class}| text |\end{BlockClass}| -% -% \changes{v0.20}{2017/01/03}{Renamed from "blockclass".} -% \changes{v0.20}{2017/01/17}{Added optional style.} -% -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -\NewDocumentEnvironment{BlockClass}{m o} -{ -\LWR@htmldivclass{#1}[#2] +img, img.hyperimage, img.borderimage { + max-width: 600px; + border: 1px solid silver; + box-shadow: 3px 3px 3px #808080 ; + padding: .5% ; + margin: .5% ; + background: none ; } -{ -\LWR@htmldivclassend{#1} + +img.inlineimage{ + padding: 0px ; + box-shadow: none ; + border: none ; + background: none ; + margin: 0px ; + display: inline-block ; + border-radius: 0px ; } -\end{warpHTML} -% \end{macrocode} -% -% \codeprint -% \begin{macrocode} -\begin{warpprint} -\NewDocumentEnvironment{BlockClass}{m o}{}{} -\end{warpprint} -% \end{macrocode} -% \end{environment} -% -% -% \begin{macro}{\BlockClassSingle} \marg{class} \marg{text} \quad -% A single-line \tag{div}, without a paragraph tag for the line of text. -% -% \changes{v0.20}{2017/01/03}{Renamed from "LWR@htmldivclassline".} -% -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -\newcommand{\BlockClassSingle}[2]{% -\LWR@htmlelementclassline{div}{#1}{#2}% + +img.logoimage{ + max-width: 300px ; + box-shadow: 3px 3px 3px #808080 ; + border: 1px solid black ; + background:none ; + padding:0 ; + margin:.5ex ; + border-radius: 10px ; } -\end{warpHTML} -% \end{macrocode} -% -% \codeprint -% \begin{macrocode} -\begin{warpprint} -\newcommand{\BlockClassSingle}[2]{#2} -\end{warpprint} -% \end{macrocode} -% -% \end{macro} -% \begin{macro}{\InlineClass} \marg{class} \oarg{style} \marg{text} \quad -% High-level interface for inline span classes. -% -% \changes{v0.20}{2017/01/03}{Renamed from "inlineclass".} -% -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -\NewDocumentCommand{\InlineClass}{m o +m}{% -\LWR@htmlspanclass{#1}[#2]{#3}% +.section { +/* + To have each section float relative to each other: +*/ +/* + display: block ; + float: left ; + position: relative ; + background: white ; + border: 1px solid silver ; + padding: .5em ; +*/ + margin: 0ex .5em 0ex .5em ; + padding: 0 ; } -\end{warpHTML} -% \end{macrocode} -% \codeprint -% \begin{macrocode} -\begin{warpprint} -\NewDocumentCommand{\InlineClass}{m o +m}{#3} -\end{warpprint} -% \end{macrocode} -% \end{macro} -% \subsection{Closing HTML tags} +figure { + margin: 3ex auto 3ex auto ; + padding: 1ex 1em 1ex 1em ; + overflow-x: auto ; +} -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} -% Sections H1, H2, etc.\ do not need a closing \HTML\ tag, but we add a comment for readability: -% \begin{macrocode} -\newcommand*{\LWR@printclosepart} - {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing part}}{}} -\newcommand*{\LWR@printclosechapter} - {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing chapter}}{}} -\newcommand*{\LWR@printclosesection} - {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing section}}{}} -\newcommand*{\LWR@printclosesubsection} - {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing subsection}}{}} -\newcommand*{\LWR@printclosesubsubsection} - {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing subsubsection}}{}} -\newcommand*{\LWR@printcloseparagraph} - {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing paragraph}}{}} -\newcommand*{\LWR@printclosesubparagraph} - {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing subparagraph}}{}} -% \end{macrocode} +/* To automatically center images in figures: */ +/* +figure img.inlineimage { + margin: 0ex auto 0ex auto ; + display: block ; +} +*/ -% Lists require closing \HTML\ tags: -% \begin{macrocode} -\newcommand*{\LWR@printcloselistitem} - {\LWR@htmltag{/li}} -\newcommand*{\LWR@printclosedescitem} - {\LWR@htmltag{/dd}} -\newcommand*{\LWR@printcloseitemize} - {\LWR@htmltag{/ul}} -\newcommand*{\LWR@printcloseenumerate} - {\LWR@htmltag{/ol}} -\newcommand*{\LWR@printclosedescription} - {\LWR@htmltag{/dl}} -% \end{macrocode} +/* To automatically center minipages in figures: */ +/* +figure div.minipage, figure div.minipage div.minipage { + margin: 1ex auto 1ex auto ; + display: block ; +} +*/ -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} +figure div.minipage p { font-size: 85% ; } +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% ; } -% \section{Paragraph handling} -% \label{sec:parhanding} -% -% These commands generate the \HTML\ paragraph tags when allowed and -% required. -% -% Paragraph tags are or are not allowed depending on many conditions. -% \Cref{sec:parstartstop} has high-level commands which allow -% paragraph-tag generation to start/stop. -% Even when allowed (\cs{LWR@doingstartpars}), -% tags are not generated until a \LaTeX{} paragraph -% is being used (\cs{LWR@doingapar}). -% |LWR@lateximagedepth| is used to prevent nesting tags inside -% a |lateximage|. -% |LWR@spandepth| is used to prevent nesting paragraph tags inside -% a paragraph, which became important inside \cs{fbox} commands and other spans. +div.floatfoot { font-size: .85em ; + border-top: 1px solid silver ; line-height: 1.2 ; } -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} +figcaption , .lstlistingtitle { + font-size: .85em ; + text-align: center ; + font-weight: bold ; + margin-top: 1ex ; + margin-bottom: 1ex ; +} +figure.subfigure figcaption, figure.subtable figcaption { + border-bottom: none ; background: none ; +} -% \DescribeCounter{LWR@spandepth} -% Do not create paragraph tags inside of an \HTML\ span. -% \begin{macrocode} -\newcounter{LWR@spandepth} -\setcounter{LWR@spandepth}{0} -% \end{macrocode} +div.nonfloatcaption { + margin: 1ex auto 1ex auto ; + font-size: .85em ; + text-align: center ; + font-weight: bold ; +} +/* For a \RawCaption inside a minipage inside a figure's floatrow: */ +figure div.floatrow div.minipage figcaption { + border: none ; + background: none ; +} -% \DescribeBoolean{LWR@doingstartpars} -% Tells whether paragraphs may be generated. -% \begin{macrocode} -\newbool{LWR@doingstartpars} -\boolfalse{LWR@doingstartpars} -% \end{macrocode} -% \DescribeBoolean{LWR@doingapar} -% Tells whether have actually generated and are currently processing paragraph text. -% \begin{macrocode} -\newbool{LWR@doingapar} -\global\boolfalse{LWR@doingapar} -% \end{macrocode} +table { + margin: 1ex auto 1ex auto ; + border-collapse: collapse ; + border-spacing: 0px ; + line-height: 1.3 ; + } +tr.hline {border-top: 1px solid silver ; margin-top: 0ex ; + margin-bottom: 0ex ; } /* for \hline */ -% \begin{macro}{\LWR@ensuredoingapar} -% If are about to print something visible, and -% if allowed to start a new paragraph, -% ensure that are |LWR@doingapar|, so that paragraph tags are placed: -% \begin{macrocode} -\newcommand*{\LWR@ensuredoingapar}{% -\ifbool{LWR@doingstartpars}% -{\global\booltrue{LWR@doingapar}}% -{}% +tr.tbrule {border-top: 1px solid black ; margin-top: 0ex ; + margin-bottom: 0ex ; } /* for \toprule, \bottomrule */ + +td {padding: 1ex .5em 1ex .5em ;} + +table td.tdl { text-align: left ; vertical-align: middle ; } +table td.tdc { text-align: center ; vertical-align: middle ; } +table td.tdr { text-align: right ; vertical-align: middle ; } +table td.tdp { text-align: left ; vertical-align: bottom ; } +table td.tdm { text-align: left ; vertical-align: middle ; } +table td.tdb { text-align: left ; vertical-align: top ; } +table td.tdP { text-align: center ; vertical-align: bottom ; } +table td.tdM { text-align: center ; vertical-align: middle ; } +table td.tdB { text-align: center ; vertical-align: top ; } +table td.tdlrule { text-align: left ; border-top: 1px solid silver ; + vertical-align: middle ; } /* for cmidrule */ +table td.tdcrule { text-align: center ; border-top: 1px solid silver ; + vertical-align: middle ; } +table td.tdrrule { text-align: right ; border-top: 1px solid silver ; + vertical-align: middle ; } +table td.tdprule { text-align: left ; border-top: 1px solid silver ; + vertical-align: bottom ; } +table td.tdmrule { text-align: left ; border-top: 1px solid silver ; + vertical-align: middle ; } +table td.tdbrule { text-align: left ; border-top: 1px solid silver ; + vertical-align: top ; } +table td.tdPrule { text-align: center ; border-top: 1px solid silver ; + vertical-align: bottom ; } +table td.tdMrule { text-align: center ; border-top: 1px solid silver ; + vertical-align: middle ; } +table td.tdBrule { text-align: center ; border-top: 1px solid silver ; + vertical-align: top ; } + +/* Margins of paragraphs inside table cells: */ +td.tdp p , td.tdprule p , td.tdP p , td.tdPrule p { padding-top: 1ex ; + padding-bottom: 1ex ; margin: 0ex ; } +td.tdm p , td.tmbrule p , td.tdM p , td.tdMrule p { padding-top: 1ex ; + padding-bottom: 1ex ; margin: 0ex ; } +td.tdb p , td.tdbrule p , td.tdB p , td.tdBrule p { padding-top: 1ex ; + padding-bottom: 1ex ; margin: 0ex ; } + +td.tdp , td.tdprule , td.tdP , td.tdPrule + { padding: 0ex .5em 0ex .5em ; } +td.tdm , td.tdmrule , td.tdM , td.tdMrule + { padding: 0ex .5em 0ex .5em ; } +td.tdb , td.tdbrule , td.tdB , td.tdBrule + { padding: 0ex .5em 0ex .5em ; } + + +/* table notes: */ +.tnotes { + margin: 0ex 5% 1ex 5% ; + padding: 0.5ex 1em 0.5ex 1em; + font-size:.85em; + text-align: left ; } -% \end{macrocode} -% \end{macro} +.tnotes dl dt p {margin-bottom:0px;} -% \begin{macro}{\LWR@openparagraph} -% \begin{macrocode} -\newcommand*{\LWR@openparagraph} -{% -% \end{macrocode} -% See if paragraph handling is enabled: -% \begin{macrocode} -\ifbool{LWR@doingstartpars}% -{% handling pars -% \end{macrocode} -% See if have already started a \env{lateximage} or a \tag{span}. -% If so, do not generate nested paragraph tags. -% \begin{macrocode} -\ifthenelse{% -\cnttest{\value{LWR@lateximagedepth}}{>}{0} \OR% -\cnttest{\value{LWR@spandepth}}{>}{0}% -}% nested par tags? -% \end{macrocode} -% If so: Do nothing if already started a \env{lateximage} page. Cannot nest a \env{lateximage}. -% Also do nothing if already inside a \tag{span}. Do not nest paragraph tags -% inside a \tag{span}. -% \begin{macrocode} -{}% no nested par tags -% \end{macrocode} -% Else: No \env{lateximage} or \tag{span} has been started yet, -% so it's OK to generate paragraph tags. -% \begin{macrocode} -{% yes nest par tags -\LWR@htmltagc{\LWR@tagregularparagraph}% -% \end{macrocode} -% Manually indent item list labels to avoid left margin intrustion: -% -% \LaTeX{} default list environments use |\@itemdepth| and |\@enumdepth|, but -% \pkg{lwarp} uses the \pkg{enumitem} package, which uses |\@listdepth|. -% -% See if are nested inside an item list: -% \begin{macrocode} -\ifnumcomp{\@listdepth}{>}{0}% -{% -% \end{macrocode} -% If so, leave some horizontal room in the \LaTeX{} \PDF\ output for list labels: -% \begin{macrocode} -\LWR@orighspace{1in}% -}{}% -% \end{macrocode} -% Now have started a paragraph. -% \begin{macrocode} -\global\booltrue{LWR@doingapar}% -% \end{macrocode} -% At the endof each paragraph, -% generate closing tag and do regular |/par| stuff. -% (Attempting to use the \pkg{everyhook} |cr| hook -% for \cs{LWR@closeparagraph} does not work well.) -% \begin{macrocode} -\let\par\LWR@closeparagraph% -}% end of yes nest par tags -}% end of handling pars -{}% not handling pars +.tnoteitemheader {margin-right: 1em;} + + + +/* center, flushleft, flushright environments */ +div.center{text-align:center;} +div.center table {margin-left:auto;margin-right:auto;} +div.flushleft{text-align:left;} +div.flushleft table {margin-left:0em ; margin-right:auto;} +div.flushright{text-align:right;} +div.flushright table {margin-left:auto ; margin-right: 0em ;} + + + + +/* program listing callouts: */ +span.callout { + font-family: "DejaVu Sans", "Bitstream Vera Sans", + Geneva, Verdana, sans-serif ; + border-radius: .5em; + background-color:black; + color:white; + padding:0px .25em 0px .25em; + margin: 0 ; + font-weight: bold; + font-size:.72em ; } -% \end{macrocode} -% \end{macro} +div.programlisting pre.verbatim span.callout{ + font-size: .85em ; +} -% \begin{macro}{\LWR@closeparagraph} -% \changes{v0.20}{2017/01/17}{No break tags in the start/end of a tabular.} -% \changes{v0.20}{2017/01/17}{\cs{unskip} extra spaces.} -% \begin{macrocode} -\newcommand*{\LWR@closeparagraph} -{% -% \end{macrocode} -% See if paragraph handling is enabled: -% \begin{macrocode} -\ifbool{LWR@doingapar}% -% \end{macrocode} -% If currently in paragraph mode: -% \begin{macrocode} -{% handling pars -% \end{macrocode} -% See if already started a \env{lateximage} or a \tag{span}: -% \begin{macrocode} -\ifthenelse{% -\cnttest{\value{LWR@lateximagedepth}}{>}{0} \OR% -\cnttest{\value{LWR@spandepth}}{>}{0}% -}% -% \end{macrocode} -% Do nothing if already started a \env{lateximage} or a \tag{span}, -% but add a parbreak if in a span but not a \env{lateximage}. -% \begin{macrocode} -{% no nested par tags -\ifthenelse{% -\cnttest{\value{LWR@spandepth}}{>}{0}% -\AND% -\cnttest{\value{LWR@lateximagedepth}}{=}{0}% -}% -{% -\ifbool{LWR@intabularmetadata}{}{\unskip\LWR@htmltagc{br /}}% -}% -{}% -}% no nested par tags -% \end{macrocode} -% If have not already started a \env{lateximage} or a \tag{span}: -% \begin{macrocode} -{% yes nest par tags -% \end{macrocode} -% Print a closing tag: -% \begin{macrocode} -\unskip% -\LWR@htmltagc{/\LWR@tagregularparagraph}% -% \end{macrocode} -% No longer doing a paragraph: -% \begin{macrocode} -\global\boolfalse{LWR@doingapar}% -% Disable the special \env{minipage} \& \cs{hspace} interaction -% until a new minipage is found: -% \begin{macrocode} -\global\boolfalse{LWR@minipagethispar}% -}% end of yes nest par tags -}% end of handling pars -% \end{macrocode} -% Add a parbreak if in a span, -% but not in a table outside a row: -% \begin{macrocode} -{% not handling pars -\ifthenelse{\cnttest{\value{LWR@spandepth}}{>}{0}}% -{\ifbool{LWR@intabularmetadata}{}{\unskip\LWR@htmltagc{br /}}}% -{}% -}% not handling pars -% \end{macrocode} -% Finish with regular paragraph processing -% \begin{macrocode} -\LWR@origpar% + + + +div.published +{ + text-align: center ; + font-variant: normal ; + font-style: italic ; + font-size: 1em ; + margin: 3ex 0em 3ex 0em ; } -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} +div.subtitle +{ + text-align: center ; + font-variant: normal ; + font-style: italic ; + font-size: 1.25em ; + margin: 3ex 0em 3ex 0em ; +} +div.subtitle p { margin: 1ex ; } -% \section{Paragraph start/stop handling} -% \label{sec:parstartstop} -% These commands allow/disallow the generation of \HTML\ -% paragraph tags. -% -% \Cref{sec:parhanding} has the commands which actually generate -% the tags. -% -% The |everyhook| package is used to generate the opening -% paragraph tags. The closing tags are generated by |\par|. +div.author +{ + font-variant: normal ; + font-style: normal ; + font-size: 1em ; + margin: 3ex 0em 3ex 0em ; +} -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} +div.author table { + margin: 3ex auto 0ex auto ; + background: none ; +} +div.author table tbody tr td { padding: .25ex ; } -% \begin{macro}{\LWR@startpars} -% Begin handling \HTML\ paragraphs. -% This allows an \HTML\ paragraph to start, but one has not yet begun. -% \begin{macrocode} -\newcommand*{\LWR@startpars}% -{% -% \end{macrocode} -% See if currently handling \HTML\ paragraphs: -% \begin{macrocode} -\ifbool{LWR@doingstartpars}% -% \end{macrocode} -% If already in paragraph mode, do nothing. -% \begin{macrocode} -{}% -% \end{macrocode} -% If not currently in paragraph mode: -% \begin{macrocode} -{% -% \end{macrocode} -% At the start of each paragraph, generate an opening tag: -% \begin{macrocode} -\PushPreHook{par}{\LWR@openparagraph}% -% \end{macrocode} -% At the end of each paragraph, generate closing tag and do regular |/par| actions: -% \begin{macrocode} -\let\par\LWR@closeparagraph +span.affiliation {font-size: .85em ; font-variant: small-caps; } -}% an intentionally blank line -% \end{macrocode} -% Are now handling paragraphs, but have not yet actually started one: -% \begin{macrocode} -\global\setbool{LWR@doingstartpars}{true}% -% \end{macrocode} -% No tag yet to undo: -% \begin{macrocode} -\global\boolfalse{LWR@doingapar}% +div.titledate { + text-align: center ; + font-size: .85em ; + font-style: italic; + margin: 6ex 0em 6ex 0em ; } -% \end{macrocode} -% \end{macro} -% \begin{macro}{\LWR@stoppars} -% Stop handling \HTML\ paragraphs. -% Any currently open \HTML\ paragraph is closed, and no more will be opened. -% \begin{macrocode} -\newcommand*{\LWR@stoppars}% -{% -% \end{macrocode} -% See if currently handling \HTML\ paragraphs: -% \begin{macrocode} -\ifbool{LWR@doingapar}% -% \end{macrocode} -% if currently in an \HTML\ paragraph: -% \begin{macrocode} -{% -% \end{macrocode} -% Print a closing tag: -% \begin{macrocode} -\unskip% -\LWR@htmltagc{/\LWR@tagregularparagraph}% -% \end{macrocode} -% No longer have an open \HTML\ paragraph: -% \begin{macrocode} -\global\boolfalse{LWR@doingapar}% -% \end{macrocode} -% Disable the special \env{minipage} \& \cs{hspace} interaction -% until a new minipage is found: -% \begin{macrocode} -\global\boolfalse{LWR@minipagethispar} +nav.topnavigation{ + text-align: left ; + padding: 0.5ex 1em 0.5ex 1em ; +/* margin: 2ex 0em 3ex 0em ; */ + margin: 0 ; + border-bottom: 1px solid silver ; + border-top: 1px solid silver ; + clear:right ; +} -}% an intentionally blank line -% \end{macrocode} -% If was not in an \HTML\ paragraph: -% \begin{macrocode} -{}% -% \end{macrocode} -% See if currently allowing \HTML\ paragraphs: -% \begin{macrocode} -\ifbool{LWR@doingstartpars}% -% \end{macrocode} -% If so: clear the |par| hook to no longer catch paragraphs: -% \begin{macrocode} -{% -\ClearPreHook{par}% -}% -% \end{macrocode} -% Else: do nothing -% \begin{macrocode} -{}% -% \end{macrocode} -% no longer in paragraph mode -% \begin{macrocode} -\global\setbool{LWR@doingstartpars}{false}% -% \end{macrocode} -% no |

| tag to undo: -% \begin{macrocode} -\global\boolfalse{LWR@doingapar}% +nav.botnavigation{ + text-align: left ; + padding: 0.5ex 1em 0.5ex 1em ; +/* margin: 3ex 0em 2ex 0em ; */ + margin: 0 ; + border-top: 1px solid silver ; + border-bottom: 1px solid silver ; + clear:right ; } -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} +header{ + line-height: 1.2 ; + font-size: 1em ; +/* border-bottom: 2px solid silver ; */ + margin: 0px ; + padding: 0ex 1em 0ex 1em ; + text-align:center ; +} +header p {margin:0ex;padding:4ex 0em 2ex 0em ;text-align:center;} -% \section{Page headers and footers} -% \codeall -% \begin{macrocode} -\begin{warpall} -% \end{macrocode} +footer{ + font-size: .85em ; + line-height: 1.2 ; + margin-top: 1ex ; + border-top: 2px solid silver ; + padding: 2ex 1em 2ex 1em ; + clear:right ; + text-align:left ; +} -% In the following, catcode is manually changes back and forth -% without groups, since new macros are being defined which must -% not be contained within the groups. -% \begin{macrocode} -\newcommand{\LWR@firstpagetop}{} % for the home page alone -\newcommand{\LWR@pagetop}{} % for all other pages -\newcommand{\LWR@pagebottom}{} -\newcommand{\LWR@setfirstpagetopb}[1]{% -\renewcommand{\LWR@firstpagetop}{#1} -\catcode`\_=8 +a.linkhome { font-weight:bold ; font-size: 1em ;} + + +div.lateximagesource { padding: 0px ; margin: 0px ; display: none; } + +img.lateximage{ + padding: 0px 0px 0px 0px ; + box-shadow: none ; + border: none ; + background: none ; + margin: 0px 0px -.15ex 0px ; + /* pdfcrop leaves a slight margin, adjust to baseline */ + max-width: 100% ; + border-radius: 0ex ; + border: none ; } -% \end{macrocode} -% \begin{macro}{\SetFirstPageTop} \marg{text and logos} -% \begin{macrocode} -\newcommand{\SetFirstPageTop}{% -\catcode`\_=12 -\LWR@setfirstpagetopb -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\newcommand{\LWR@setpagetopb}[1]{% -\renewcommand{\LWR@pagetop}{#1} -\catcode`\_=8 -} -% \end{macrocode} -% \begin{macro}{\SetPageTop} \marg{text and logos} -% \begin{macrocode} -\newcommand{\SetPageTop}{% -\catcode`\_=12 -\LWR@setpagetopb -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\newcommand{\LWR@setpagebottomb}[1]{% -\renewcommand{\LWR@pagebottom}{#1} -\catcode`\_=8 -} -% \end{macrocode} -% \begin{macro}{\SetPageBottom} \marg{text and logos} -% \begin{macrocode} -\newcommand{\SetPageBottom}{% -\catcode`\_=12 -\LWR@setpagebottomb -} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\end{warpall} -% \end{macrocode} +nav.sidetoc { + font-family: "DejaVu Serif", "Bitstream Vera Serif", + "Lucida Bright", Georgia, serif; + float:right ; + width: 20%; + border-left: 1px solid silver; + border-top: 1px solid silver; + border-bottom: 1px solid silver; +/* border-top: 2px solid #808080 ; */ + background: #FAF7F4 ; + padding: 2ex 0em 2ex 1em ; + margin: 0ex 0em 2ex 1em ; + font-size:.9em ; + border-radius: 20px 0px 0px 20px ; + } -% \section{CSS} +div.sidetoccontents { +/* border-top: 1px solid silver ; */ + overflow-y: auto ; + width: 100% ; + text-align: left ; +} -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} +nav.sidetoc p {line-height:1.2 ; margin: 1ex .5em 1ex .5em ; + text-indent: 0 ; } +nav.sidetoc p a {color:black ; font-size: .7em ;} +div.sidetoctitle {font-size: 1.2em; font-weight:bold; text-align:center; + border-bottom: 1px solid silver ; } +nav.sidetoc a:hover {text-decoration: underline ; } -% \begin{macro}{\LWR@currentcss} The \CSS\ filename to use. -% This may be changed mid-document using \cs{NewCSS}, -% allowing different \CSS\ files to be used -% for different sections of the document. -% \begin{macrocode} -\newcommand*{\LWR@currentcss}{lwarp.css} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\NewCSS} \marg{new-css-filename.css} -% -% Assigns the \CSS\ file to be used by the following \HTML\ pages. -% \begin{macrocode} -\newcommand*{\LWR@newcssb}[1]{% -\renewcommand*{\LWR@currentcss}{#1} -\catcode`\_=8 -} +section.textbody { margin: 0ex 1em 0ex 1em ;} -\newcommand*{\NewCSS}{ -\catcode`\_=12 -\LWR@newcssb -} -\end{warpHTML} -% \end{macrocode} -% -% \codeprint -% \begin{macrocode} -\begin{warpprint} -\newcommand*{\NewCSS}[1]{} -\end{warpprint} -% \end{macrocode} -% \end{macro} +div.multicolsheading { -webkit-column-span: all; + -moz-column-span: all; column-span: all; } +div.multicols { -webkit-columns: 3 380px ; + -moz-columns: 3 380px ; columns: 3 380px ; } +div.multicols p {margin-top: 0ex} -% \section{HTML meta description and author} -% -% \changes{v0.20}{2016/06/27}{Added \cs{NewHTMLdescription}.} -% \changes{v0.28}{2017/04/06}{Added \cs{HTMLauthor}.} +/* Used to support algorithmicx: */ +span.floatright { float: right ; } -% \codeall -% \begin{macrocode} -\begin{warpall} -% \end{macrocode} -% \begin{macro}{\HTMLauthor} \marg{authorname} \qquad The author to place into an \HTML\ meta tag. -% -% \index{HTML>meta tag>author} -% \index{author>HTML meta tag} -% \index{meta tag, HTML>author} -% -% \begin{macrocode} -\newcommand{\theHTMLauthor}{\theauthor} -\newcommand{\HTMLauthor}[1]{\renewcommand{\theHTMLauthor}{#1}} -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\end{warpall} -% \end{macrocode} +/* Native LaTeX theorems: */ +.theoremcontents { font-style: italic; margin-top: 3ex ; margin-bottom: 3ex ; } +.theoremlabel { font-style: normal; font-weight: bold ; margin-right: .5em ; } -% \codeall -% \begin{macrocode} -\begin{warpall} -% \end{macrocode} -% This is placed inside an \HTML\ meta tag at the start of each file. -% This may be changed mid-document using \cs{NewHTMLdescription}, -% allowing different \HTML\ descriptions to be used -% for different sections of the document. -% -% Do not use double quotes, and do not exceed 150 characters.\watchout +/* theorem, amsthm, and ntheorem packages */ -% \begin{macro}{\NewHTMLdescription} \marg{New \HTML\ meta description.} \qquad -% Assigns the \HTML\ file's description meta tag. -% -% \index{HTML>meta tag>description} -% \index{description>HTML meta tag} -% \index{meta tag, HTML>description} -% -% \begin{macrocode} -\newcommand{\LWR@currentHTMLdescription}{} +span.theoremheader, +span.theoremheaderplain, +span.theoremheaderdefinition, +span.theoremheaderbreak, +span.theoremheadermarginbreak, +span.theoremheaderchangebreak, +span.theoremheaderchange, +span.theoremheadermargin +{ + font-style:normal ; font-weight: bold ; margin-right: 1em ; +} -\newcommand{\NewHTMLdescription}[1]{% -\renewcommand{\LWR@currentHTMLdescription}{#1} +span.amsthmnameplain, +span.amsthmnamedefinition, +span.amsthmnumberplain, +span.amsthmnumberdefinition +{ + font-style:normal ; font-weight: bold ; } -\end{warpall} -% \end{macrocode} -% \end{macro} +span.amsthmnameremark, +span.amsthmnumberremark +{font-style:italic ; font-weight: normal ; } -% \section{Footnotes} -% \label{sec:footnotes} -% -% \index{footnotes} -% -% \limitsfootnotes -% -% \changes{v0.26}{2017/03/28}{Footnotes now are \LaTeX\ boxes instead of pagenotes.} -% -% Several kinds of footnotes are used: in a regular page, in a minipage, or -% as thanks in the titlepage. Each of these is handle differently. -% -% \subsection{Regular page footnotes} -% In \HTML\ documents, footnotes are placed at the -% bottom of the web page using the \LaTeX\ box \cs{LWR@footnotes}. -% Using this instead of the original \cs{footins} box -% avoids having footnotes be printed by the output routine, -% since footnotes should be printed per \HTML\ page -% instead of per \PDF\ page. -% -% See \cref{sec:footnotesregular} for the implementation. -% -% \subsection{Minipage footnotes} -% See \cref{sec:footnotesminipage} for minipage footnotes. -% -% \subsection{Titlepage thanks} -% See \cref{sec:titlehtml} for titlepage footnotes. -% -% \subsection{Regular page footnote implementation} -% \label{sec:footnotesregular} -% -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} +span.amsthmnoteplain, +span.amsthmnotedefinition +{font-style:normal ;} -% Patch \LaTeX\ footnotes to use a new \cs{box} for \pkg{lwarp} footnotes. -% \begin{macrocode} -\newbox\LWR@footnotes -% \end{macrocode} -% -% Much of the following has unneeded print-mode formatting removed. -% \begin{macrocode} -\long\def\@makefntext#1{\textsuperscript{\@thefnmark} #1} +span.theoremheaderremark, +span.theoremheaderproof, +span.amsthmproofname +{font-style:italic ; font-weight: normal ; margin-right: 1em ; } -\def\@makefnmark{\hbox{\textsuperscript{\@thefnmark}}} -% \end{macrocode} -% -% Footnotes may be in regular text, in which case paragraphs are tagged, -% or in a table data cell, in which case paragraph tags must be added manually. -% -% \changes{v0.27}{2017/04/04}{Fix for table footnote par tags.} -% -% \begin{macrocode} -\long\def\@footnotetext#1{% -\global\setbox\LWR@footnotes=\vbox{\unvbox\LWR@footnotes% -\protected@edef\@currentlabel{% -\csname p@footnote\endcsname\@thefnmark% -}% @currentlabel -\color@begingroup% -\ifbool{LWR@doingstartpars}{}{\LWR@htmltagc{\LWR@tagregularparagraph}}% -\@makefntext{#1}% -\ifbool{LWR@doingstartpars}{\par}{\LWR@htmltagc{/\LWR@tagregularparagraph}}% -\color@endgroup% -}% vbox -}% +span.theoremheadersc +{ + font-style:normal ; + font-variant: small-caps ; + font-weight: normal ; + margin-right: 1em ; +} -\long\def\@mpfootnotetext#1{% -\global\setbox\@mpfootins\vbox{% -\unvbox\@mpfootins -\reset@font\footnotesize -\hsize\columnwidth -\@parboxrestore -\protected@edef\@currentlabel -{\csname p@mpfootnote\endcsname\@thefnmark}% -\color@begingroup -\@makefntext{% -\ignorespaces#1% -}% -% \end{macrocode} -% -% Don't add the closing paragraph tag if are inside a \env{lateximage}: -% \begin{macrocode} -\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}% -{}% -{\LWR@htmltagc{/\LWR@tagregularparagraph}}% -% \end{macrocode} -% -% \begin{macrocode} -\color@endgroup}% -} -% \end{macrocode} -% -% Enclose the footnotes in a class, print, then clear: -% \begin{macrocode} -\newcommand*{\LWR@printpendingfootnotes}{% -\ifvoid\LWR@footnotes\else -\LWR@forcenewpage -\begin{BlockClass}{footnotes} -\LWR@origmedskip -\unvbox\LWR@footnotes -\setbox\LWR@footnotes=\vbox{} -\end{BlockClass} -\fi +.theoremendmark {float:right} + +div.amsthmbodyplain, div.theorembodyplain, div.theorembodynonumberplain, +div.theorembodybreak, div.theorembodynonumberbreak, +div.theorembodymarginbreak, +div.theorembodychangebreak, +div.theorembodychange, +div.theorembodymargin +{ + font-style:italic; + margin-top: 3ex ; margin-bottom: 3ex ; } -% \end{macrocode} -% -% Used to print footnotes before sections only if formatting for an \EPUB\ or word processor: -% \begin{macrocode} -\newcommand*{\LWR@epubprintpendingfootnotes}{% -\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}% -{\LWR@printpendingfootnotes}% -{}% + +div.theorembodydefinition, div.theorembodyremark, div.theorembodyproof, +div.theorembodyplainupright, nonumberplainuprightsc, +div.amsthmbodydefinition, div.amsthmbodyremark, +div.amsthmproof +{ + font-style: normal ; + margin-top: 3ex ; margin-bottom: 3ex ; } -% \end{macrocode} -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} +span.amsthmnoteremark {} +/* +For CSS LaTeX and related logos: +Based on: +http://edward.oconnor.cx/2007/08/tex-poshlet +http://nitens.org/taraborelli/texlogo +*/ -% \section{Marginpars} -% -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} +.latexlogofont { + font-family: "Linux Libertine O", "Nimbus Roman No 9 L", + "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; + font-variant: normal ; +} -% \begin{macro}{\marginpar} \oarg{left} \marg{right} -% -% \changes{v0.21}{2017/02/11}{Fixed source listing.} -% -% \begin{macrocode} -\renewcommand{\marginpar}[2][]{% -\LWR@htmlspanclass{marginpar}{#2}% +.latexlogo { + font-family: "Linux Libertine O", "Nimbus Roman No 9 L", + "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; + letter-spacing: .03em ; + font-size: 1.1em; } -% \end{macrocode} -% \end{macro} -% -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} +.latexlogo sup { + text-transform: uppercase; + letter-spacing: .03em ; + font-size: 0.85em; + vertical-align: 0.15em; + margin-left: -0.36em; + margin-right: -0.15em; +} +.latexlogo sub { + text-transform: uppercase; + vertical-align: -0.5ex; + margin-left: -0.1667em; + margin-right: -0.125em; + font-size: 1em; +} -% \section{Splitting HTML files} -% -% \begin{itemize} -% \item Files are split according to |FileDepth| and |CombineHigherDepths|. -% \item Filenames are sanitized by |\LWR@filenamenoblanks|. -% \item |\LWR@newhtmlfile| finishes an \HTML\ page, -% adds a comment to tell where and how to split the file, -% then starts a new \HTML\ page. -% \end{itemize} +.xetexlogo { + font-family: "Linux Libertine O", "Nimbus Roman No 9 L", + "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; + letter-spacing: .03em ; + font-size: 1.1em; +} +/* A smaller gap between Xe and Tex v.s. LaTeX: */ +.xetexlogo sub { + text-transform: uppercase; + vertical-align: -0.5ex; + margin-left: -0.0667em; + margin-right: -0.2em; + font-size: 1em; + letter-spacing: .03em ; +} -% \codeall -% \begin{macrocode} -\begin{warpall} -% \end{macrocode} +/* A large gap between Xe and LaTeX v.s. TeX: */ +.xelatexlogo sub { + text-transform: uppercase; + vertical-align: -0.5ex; + margin-left: -0.0667em; + margin-right: -.05em; + font-size: 1em; + letter-spacing: .03em ; +} -% \DescribeCounter{FileDepth} \marg{section depth} determines how deeply -% to break into new \HTML\ files, similar to |tocdepth|. -% The default of -5 produces one large \HTML\ file. -% \begin{macrocode} -\newcounter{FileDepth} -\setcounter{FileDepth}{-5} -% \end{macrocode} +.amslogo { + font-family: "TeXGyreChorus","URW Chancery L", + "Apple Chancery","ITC Zapf Chancery","Monotype Corsiva", + "Linux Libertine O", "Nimbus Roman No 9 L", "FreeSerif", + "Hoefler Text", Times, "Times New Roman", serif; + font-style: italic; +} +.lyxlogo { + font-family: "URW Classico", Optima, "Linux Biolinum O", + "DejaVu Sans", "Bitstream Vera Sans", Geneva, + Verdana, sans-serif ; +} -% \DescribeBoolean{CombineHigherDepths} Combile higher-level sections -% together into one file? -% \begin{macrocode} -\newbool{CombineHigherDepths} -\booltrue{CombineHigherDepths} -% \end{macrocode} -% \begin{macrocode} -\end{warpall} -% \end{macrocode} -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} +/* Only display top and bottom navigation if a small screen: */ +/* Hide the sidetoc if a small screen: */ +nav.topnavigation { display:none; } +nav.botnavigation { display:none; } -% \begin{macro}{\LWR@thisfilename} -% The currently-active filename or number. -% \begin{macrocode} -\newcommand*{\LWR@thisfilename}{} -% \end{macrocode} -% \end{macro} +@media screen and (max-width: 45em) { +/* nav.sidetoc {display:none;} */ + nav.sidetoc { + float: none ; + width: 100% ; + margin: 5ex 0px 5ex 0px ; + padding: 0 ; + border-radius: 0 ; + border-bottom: 1px solid black ; + border-top: 1px solid black ; + box-shadow: none ; + } +/* nav.topnavigation { display:block } */ + nav.botnavigation { display:block } + .marginpar { + max-width: 100%; + float: none; + display:block ; + margin: 1ex 1em 1ex 1em ; + } +} + +@media print { + body { + font-family: "Linux Libertine O", + "DejaVu Serif", "Bitstream Vera Serif", + "Liberation Serif", "Nimbus Roman No 9 L", + "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; + } + nav.sidetoc { display:none; } + nav.topnavigation { display: none; } + nav.botnavigation { display: none; } +} +@media handheld { + nav.sidetoc { display:none; } + nav.topnavigation { display:block } + nav.botnavigation { display:block } +} -% \begin{macro}{\LWR@thisnewfilename} -% The filename being sanitized. -% \begin{macrocode} -\newcommand*{\LWR@thisnewfilename}{} +@media projection { + nav.sidetoc { display:none; } + nav.topnavigation { display:block } + nav.botnavigation { display:block } +} +\end{VerbatimOut} +% \end{Verbatim}% for syntax highlighting +\end{warpprint} % \end{macrocode} -% \end{macro} -% \begin{macro}{\LWR@filenamenoblanks} \marg{filename} + + +% \subsection{lwarp\_sagebrush.css} + +% \DescribeFile{lwarp_sagebrush.css} +% An optional \CSS\ which may be used for +% a semi-modern appearance. % -% Convert blanks into dashes, removes short words, -% store result in \\ |\LWR@thisfilename|. +% If used, this must be present both when compiling the project +% and also when distributing the \HTML\ files. % -% Be sure that this does not result in filename collisions! -% \watchout -% Use the optional TOC caption entry parameter for formatting. -% Remember to |\protect| \LaTeX{} commands which appear in -% section names and TOC captions. % \begin{macrocode} -\newcommand*{\LWR@filenamenoblanks}[1]{% -\begingroup -% \end{macrocode} +\begin{warpprint} +\begin{VerbatimOut}{lwarp_sagebrush.css} +@import url("lwarp.css") ; -% Locally temporarily disable direct-formatting commands, -% not used in filenames: -% \begin{macrocode} -\renewcommand*{\HTMLunicode}[1]{} -\renewcommand*{\HTMLentity}[1]{##1} -\renewcommand*{\LWR@htmltagc}[1]{} -\DeclareExpandableDocumentCommand{\InlineClass}{m o m}{##3} -% \end{macrocode} -% Ampersand becomes ``and'', which is a short word and is then removed from the filename. -% \begin{macrocode} -\renewcommand*{\&}{and} -\renewcommand{\textit}[1]{##1} -\renewcommand{\textsc}[1]{##1} -\renewcommand{\textsl}[1]{##1} -\renewcommand{\textbf}[1]{##1} -\renewcommand{\texttt}[1]{##1} -\renewcommand{\textsf}[1]{##1} -\renewcommand{\textrm}[1]{##1} -\renewcommand{\textsuperscript}[1]{##1} -\renewcommand{\textsubscript}[1]{##1} -% \end{macrocode} -% Replaces common symbols and short words with hyphens: -% -% \begin{macrocode} -\edef\LWR@thisnewfilename{#1} -\fullexpandarg -% \end{macrocode} -% Convert spaces into hyphens: -% \begin{macrocode} -\StrSubstitute{\LWR@thisnewfilename}{ }{-}[\LWR@thisnewfilename] -% \end{macrocode} -% Convert punctutation into hyphens: -% ^^A \StrSubstitute{\LWR@thisnewfilename}{é}{e}[\LWR@thisnewfilename] -% \begin{macrocode} -\StrSubstitute{\LWR@thisnewfilename}{,}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{'}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}% -{\LWR@origampersand}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{+}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{,}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{/}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{:}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{;}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{=}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{?}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{@}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{"}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}% -{\textless}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}% -{\textgreater}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{\#}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{\%}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{\{}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{\}}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{|}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}% -{\textbackslash}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{^}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{~{}}{-}[\LWR@thisnewfilename] -% "~{}" for babel -\StrSubstitute{\LWR@thisnewfilename}{[}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{]}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{`}{-}[\LWR@thisnewfilename] -% \end{macrocode} -% Convert short words: -% \begin{macrocode} -\StrSubstitute{\LWR@thisnewfilename}{-s-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-S-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-a-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-A-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-an-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-AN-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-to-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-TO-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-by-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-BY-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-of-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-OF-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-and-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-AND-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-for-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-FOR-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-the-}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{-THE-}{-}[\LWR@thisnewfilename] -% \end{macrocode} -% Convert multiple hyphens: -% \begin{macrocode} -\StrSubstitute{\LWR@thisnewfilename}{-----}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{----}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{---}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{--}{-}[\LWR@thisnewfilename] -\StrSubstitute{\LWR@thisnewfilename}{—}{-}[\LWR@thisnewfilename] -% emdash -\StrSubstitute{\LWR@thisnewfilename}{–}{-}[\LWR@thisnewfilename] -% endash -\global\let\LWR@thisfilename\LWR@thisnewfilename% return a global result -\endgroup -} -% \end{macrocode} -% \end{macro} +A:link {color:#105030 ; text-decoration: none ; } +A:visited {color:#705030 ; text-shadow:1px 1px 2px #a0a0a0;} +A:hover {color:#006000 ; text-decoration: underline ; text-shadow:0px 0px 2px #a0a0a0;} +A:active {color:#00C000 ; text-shadow:1px 1px 2px #a0a0a0;} -% \begin{macro}{\LWR@newhtmlfile} \marg{section name} -% \changes{v0.18}{2016/04/23}{side\TOC\ after title, improving responsive design.} -% \changes{v0.21}{2017/02/22}{Skip title if not given.} -% \changes{v0.28}{2017/04/06}{If \texttt{FormatEPUB} or \texttt{FormatWordProcessor}: skips headers, footers, nav.} -% -% Finishes the current \HTML\ page with footnotes, footer, navigation, -% then starts a new \HTML\ page with an \HTML\ comment telling where to -% split the page and what the new filename and \CSS\ are, then adds -% navigation, side TOC, header, and starts the text body. -% \begin{macrocode} -\newcommand*{\LWR@newhtmlfile}[1]{ -% \end{macrocode} +h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph +{ + font-family: "URW Classico", Optima, "Linux Biolinum O", + "Linux Libertine O", "Liberation Serif", + "Nimbus Roman No 9 L", "FreeSerif", + "Hoefler Text", Times, "Times New Roman", serif; + font-variant: small-caps ; + font-weight: normal ; + color: #304070 ; + text-shadow: 2px 2px 3px #808080; +} -% At the bottom of the ending file: +h1 { /* title of the entire website, used on each page */ + font-variant: small-caps ; + color: #304070 ; + text-shadow: 2px 2px 3px #808080; + background-color: #F7F7F0 ; + background-image: linear-gradient(to bottom, #F7F7F0, #C0C0C4); +} -% \begin{macrocode} -\LWR@htmlelementclassend{section}{textbody} +h1 { + border-bottom: 1px solid #304070; + border-top: 2px solid #304070; +} -\LWR@printpendingfootnotes +h2 { + border-bottom: 1px solid #304070; + border-top: 2px solid #304070; + background-color: #F7F7F0 ; + background-image: linear-gradient(to bottom, #F7F7F0, #DAD0C0); +} -% \end{macrocode} -% -% No footer between files if \EPUB: -% -% \begin{macrocode} -\ifbool{FormatEPUB} -{} -{ -\LWR@htmlelement{footer} -\LWR@pagebottom -\LWR@htmlelementend{footer} -} -% \end{macrocode} -% -% No bottom navigation if are finishing the home page or -% formatting for \EPUB\ or a word-processor. -% \begin{macrocode} -\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} -{} -{\ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{}} -% \end{macrocode} +div.abstract { + background: #f5f5eb ; + background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8); -% End of this \HTML\ file: -% \begin{macrocode} -\LWR@stoppars -\LWR@htmltag{/body}\LWR@orignewline -\LWR@htmltag{/html}\LWR@orignewline -\LWR@orignewpage + border: 1px solid silver; + border-radius: 1em ; +} -\addtocounter{LWR@htmlfilenumber}{1}% -% \end{macrocode} +div.abstract dl {line-height:1.5;} +div.abstract dt {color:#304070;} -% If using a filename, create a version without blanks. -% The filename without blanks will be placed into \cs{LWR@thisfilename}. -% If not using a filename, the file number will be used instead. -% \changes{v0.12}{2016/03/13}{Bugfix: TOC with numbered files.} -% \begin{macrocode} -\ifbool{FileSectionNames}% -{\LWR@filenamenoblanks{#1}} -{\renewcommand*{\LWR@thisfilename}{\theLWR@htmlfilenumber}} -% \end{macrocode} +div.abstracttitle{ + font-family: "URW Classico", Optima, "Linux Biolinum O", + "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L", + "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; + font-weight:bold; + font-variant: small-caps ; + font-size:1.5em; + border-bottom: 1px solid silver ; + color: #304070 ; + text-align: center ; + text-shadow: 1px 1px 2px #808080; +} -% Include an \HTML\ comment to instruct lwarpmk -% where to split the files apart. -% Uses pipe-separated fields for |split_html.gawk|. -% Uses monospaced font with ligatures disabled for everything except the title. -% \begin{macrocode} -\LWR@htmlblockcomment{% -|Start file|% -\LWR@htmlsectionfilename{\LWR@thisfilename}|% +span.abstractrunintitle{ + font-family: "URW Classico", Optima, "Linux Biolinum O", + "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L", + "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; + font-weight:bold; } -% \end{macrocode} -% At the top of the starting file: -% \begin{macrocode} -\LWR@stoppars -% \end{macrocode} -% -% -% \begin{macrocode} -\LWR@filestart{ — #1}% there is an EMdash in front of the #1 +div.epigraph { + background: #f5f5eb ; + background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8); -% \end{macrocode} -% -% No navigation between files if formatting for an \EPUB\ or word processor: -% \begin{macrocode} -\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} -{} -{\LWR@topnavigation} + border: 1px solid silver ; + border-radius: 1ex ; + box-shadow: 3px 3px 3px #808080 ; +} -% \end{macrocode} -% -% No header if between files if formatting for an \EPUB\ or word processor: -% \begin{macrocode} -\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} -{} -{ -\LWR@htmlelement{header} -\LWR@pagetop +.example { + background-color: #f5f5eb ; + background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8); -\LWR@htmlelementend{header} } -% \end{macrocode} -% -% Print title only if there is one. -% Skip if formatting for an \EPUB\ or word processor: -% \begin{macrocode} -\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} -{} -{\ifcsvoid{thetitle}{}{\LWR@printthetitle}} +div.exampletitle{ + font-family: "URW Classico", Optima, "Linux Biolinum O", + "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L", + "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; + font-weight:bold; + font-variant: small-caps ; + border-bottom: 1px solid silver ; + color: #304070 ; + text-align: center ; + text-shadow: 1px 1px 2px #808080; +} -% \end{macrocode} -% -% No side\TOC\ if formatting for an \EPUB\ or word processor: -% \begin{macrocode} -\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} -{} -{\LWR@sidetoc} -% \end{macrocode} -% -% Start of the \tag{textbody}: -% \begin{macrocode} -\LWR@htmlelementclass{section}{textbody} +.sidebar { + background-color: #f5f5eb ; + background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8); -% \end{macrocode} -% -% Keep paragraph tags disabled for now: -% \begin{macrocode} -\LWR@stoppars +} -% \end{macrocode} -% -% Track the page numbers: -% \begin{macrocode} -\setcounter{LWR@latestautopage}{\value{page}} +div.sidebartitle{ + font-family: "URW Classico", Optima, "Linux Biolinum O", + "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L", + "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; + font-weight:bold; + font-variant: small-caps ; + border-bottom: 1px solid silver ; + color: #304070 ; + text-align: center ; + text-shadow: 1px 1px 2px #808080; } -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} +.fancyvrblabel { + font-family: "URW Classico", Optima, "Linux Biolinum O", + "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L", + "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; + font-weight:bold; + font-variant: small-caps ; + font-size: 1.5em ; + color: #304070 ; + text-align: center ; + text-shadow: 1px 1px 2px #808080; +} -% \section{Sectioning} +.minipage { + background-color: #eeeee7 ; + border: 1px solid silver ; + border-radius: 1ex ; +} -% -% Sectioning and cross-references have been emulated from scratch, rather -% than try to patch several layers of existing \LaTeX{} code and packages. -% Formatting is handled by \CSS, so the emulated code has much less -% work to do than the print versions. -% -% Section names and the resulting filenames with accented characters -% \margintag{Unicode} -% are partially supported, depending on the ability of -% |pdflatex| to generate characters and |pdftotext| to read them. -% If extra symbols appear in the text, -% \watchout -% it may be that |pdflatex| is actually producing a symbol over or under a -% character, resulting in |pdftotext| picking up the accent symbol separately. -% -% \XeLaTeX{} and \LuaLaTeX{} directly support accented section and file names. -% \index{accents}\index{Unicode>file \& section names}\index{UTF-8>file \& section names} -% \index{XeLaTeX>file \& section names} -% \index{LuaLaTeX>file \& section names} -% -% -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} -% -% -% \subsection{Book class commands} -% -% -% \begin{macro}{\mainmatter} -% -% Declare the main matter section of the document. Does not reset the page number, -% \watchout -% which must be consecutive arabic numbers for the \HTML\ conversion. -% \begin{macrocode} -\newbool{LWR@mainmatter} -\DeclareDocumentCommand{\mainmatter}{}{% -\booltrue{LWR@mainmatter}% +.framed .minipage , .framedleftbar .minipage { + border: none ; + background: none ; + padding: 0ex ; + margin: 0ex ; } -% \end{macrocode} -% \end{macro} -% \begin{macro}{\frontmatter} -% -% Declare the front matter section of the document, -% using arabic numbering for the internal numbering. Does not reset the page number. -% \begin{macrocode} -\DeclareDocumentCommand{\frontmatter}{}{% -\boolfalse{LWR@mainmatter}% +figure.figure .minipage, figcaption .minipage { border: none; } + +div.marginblock div.minipage { border: none; } + +figure , div.marginblock { + background-color: #eeeee7 ; + border: 1px solid silver ; + border-radius: 1ex ; + box-shadow: 3px 3px 3px #808080 ; } -% \end{macrocode} -% \end{macro} -% \begin{macro}{\backmatter} -% -% Declare the back matter section of the document. Does not reset the page number. -% \begin{macrocode} -\DeclareDocumentCommand{\backmatter}{}{% -\boolfalse{LWR@mainmatter} +figure figure { + border: 1px solid silver ; + margin: 0em ; + box-shadow: none ; } -% \end{macrocode} -% \end{macro} -% -% -% \subsection{Sectioning support macros} -% -% \begin{macro}{\LWR@sectionumber} \marg{section type} -% -% Typeset a section number and its trailing space with CSS formatting: -% \begin{macrocode} -\newcommand*{\LWR@sectionnumber}[1]{% -\InlineClass{sectionnumber}{#1} % + +/* +figcaption { + border-top: 1px solid silver ; + border-bottom: 1px solid silver ; + background-color: #e8e8e8 ; } -% \end{macrocode} -% \end{macro} +*/ -% \DescribeObject{autosec} A tag used by the TOC and index. -% -% \begin{macro}{\LWR@createautosec} \marg{section type} -% -% Create an autosection tag. -% \begin{macrocode} -\newcommand*{\LWR@createautosec}[1]{% -\LWR@htmltag{#1 id="autosec-\thepage"{}}% +div.table { + box-shadow: 3px 3px 3px #808080 ; } -% \end{macrocode} -% \end{macro} +/* +.tnotes { + background: #e8e8e8; + border: 1px solid silver; +} +*/ +nav.topnavigation{ + background-color: #b0b8b0 ; + background-image: linear-gradient(to bottom,#e0e0e0,#b0b8b0) ; +} -% \begin{macro}{\LWR@pushoneclose} \marg{depth} \marg{printclose} -% Stacks the new sectioning level's closing tag, -% to be used when this section is closed some time later. -% -% |\LWR@stoppars| must be executed first. -% \watchout -% \begin{macrocode} -\NewDocumentCommand{\LWR@pushoneclose}{m m}{\pushclose{#2}{#1}} +nav.botnavigation{ + background-color: #b0b8b0 ; + background-image: linear-gradient(to top,#e0e0e0,#b0b8b0) ; +} + + + +header{ + background-color: #F7F7F0 ; + background-image: linear-gradient(to top, #F7F7F0, #b0b8b0); +} + +footer{ + background-color: #F7F7F0 ; + background-image: linear-gradient(to bottom, #F7F7F0, #b0b8b0); +} + + + +nav.sidetoc { + background-color: #F7F7F0 ; + background-image: linear-gradient(to bottom, #F7F7F0, #C0C0C0); + box-shadow: 3px 3px 3px #808080 ; + border-radius: 0px 0px 0px 20px ; + } + +div.sidetoctitle {color: #304070 ; } + +nav.sidetoc a:hover { + color:#006000 ; + text-decoration: none ; + text-shadow:0px 0px 2px #a0a0a0; +} + + +@media screen and (max-width: 45em) { + nav.sidetoc { border-radius: 0 ; } +} + + +\end{VerbatimOut} +% \end{Verbatim}% for syntax highlighting +\end{warpprint} % \end{macrocode} -% \end{macro} -% \begin{macro}{\LWR@startnewdepth} \marg{depth} \marg{printclose} + + +% \subsection{lwarp\_formal.css} + +% \DescribeFile{lwarp_formal.css} +% An optional \CSS\ which may be used for +% a more formal appearance. % -% Closes currently stacked tags of a lesser level, -% then opens the new nesting level by saving this new sectioning -% level's closing tag for later use. +% If used, this must be present both when compiling the project +% and also when distributing the \HTML\ files. % -% |\LWR@stoppars| must be executed first. -% \watchout % \begin{macrocode} -\NewDocumentCommand{\LWR@startnewdepth}{m m}{% -% \end{macrocode} -% Close any stacked sections up to this new one. -% \begin{macrocode} -\LWR@closeprevious{#1}% -% \end{macrocode} -% Push a new section depth: -% \begin{macrocode} -\LWR@pushoneclose{#1}{#2}% -} -% \end{macrocode} -% \end{macro} -% -% -% -% \DescribeCounter{LWR@prevFileDepth} Remembers the previous |LWR@FileDepth|. -% -% Initialized to a deep level so that any section will trigger a new \HTML\ -% page after the home page. -% \begin{macrocode} -\newcounter{LWR@prevFileDepth} -\setcounter{LWR@prevFileDepth}{\LWR@depthsubparagraph} -% \end{macrocode} -% -% -% -% \begin{macro}{\LWR@section} * \oarg{TOC name} \marg{name} \marg{sectiontype} -% -% \changes{v0.20}{2017/01/09}{Combined higher-level sections together into files.} -% -% The common actions for the high-level sectioning commands. -% \begin{macrocode} -\DeclareDocumentCommand{\LWR@section}{m m m m}{% -\LWR@traceinfo{LWR@section}% -\LWR@stoppars% -% \end{macrocode} -% Cancel special \env{minipage} horizontal space interaction: -% \begin{macrocode} -\global\boolfalse{LWR@minipagethispar}% -% \end{macrocode} -% Start a new \HTML\ file if not starred, and is a shallow sectioning depth: -% \begin{macrocode} -\LWR@traceinfo{LWR@section: testing whether to start a new HTML file}% -\IfBooleanTF{#1}{% starred -% \end{macrocode} -% Generate a new LaTeX page so that \TOC\ and index page number points to the section: -% \begin{macrocode} -\LWR@orignewpage% +\begin{warpprint} +\begin{VerbatimOut}{lwarp_formal.css} +@import url("lwarp.css") ; -}{% not starred -\ifthenelse{% -\cnttest{\csuse{LWR@depth#4}}{<=}{\value{FileDepth}}% -\AND% -\(% -\NOT\boolean{CombineHigherDepths}\OR% -\cnttest{\csuse{LWR@depth#4}}{<=}{\value{LWR@prevFileDepth}}% -\)% -}% -% \end{macrocode} -% If so: start a new \HTML\ file: -% \begin{macrocode} -{% new file -\LWR@traceinfo{LWR@section: new HTML file}% -% \end{macrocode} -% See if there was an optional TOC name entry: -% \begin{macrocode} -\IfNoValueTF{#2}% -% \end{macrocode} -% If no optional entry -% \begin{macrocode} -{\LWR@newhtmlfile{#3}}% -% \end{macrocode} -% If yes an optional entry -% \begin{macrocode} -{\LWR@newhtmlfile{#2}}% -}% new file -% \end{macrocode} -% Else: No new \HTML\ file: -% \begin{macrocode} -{% not new file -% \end{macrocode} -% Generate a new LaTeX page so that \TOC\ and index page number points to the section: -% \begin{macrocode} -\LWR@orignewpage% -}% not new file -}% not starred -% \end{macrocode} -% Remember this section's name for \cs{nameref}: -% \begin{macrocode} -\LWR@traceinfo{LWR@section: about to LWR@setlatestname}% -\IfValueTF{#2}{\LWR@setlatestname{#2}}{\LWR@setlatestname{#3}}% -% \end{macrocode} -% Print an opening comment with the level and the name; -% ex: ``section'' ``Introduction'' -% \begin{macrocode} -\ifbool{HTMLDebugComments}{% -\LWR@htmlcomment{Opening #4 ``#3''{}} -}{} +A:link {color:#802020 ; text-decoration:none; } +A:visited {color:#802020 ; text-shadow:none ;} +A:hover {color:#400000 ; text-shadow:none ;} +A:active {color:#C00000 ; text-shadow:none ;} -% \end{macrocode} -% For inline sections paragraph and subparagraph, start a new paragraph now: -% \begin{macrocode} -\ifthenelse{% -\cnttest{\csuse{LWR@depth#4}}{>=}{\LWR@depthparagraph}% -}% -{\LWR@startpars} -{} -% \end{macrocode} -% Create the opening tag with an autosec: -% \begin{macrocode} -\LWR@createautosec{\csuse{LWR@tag#4}}% -% \end{macrocode} -% If not starred, step counter and add to TOC: -% \begin{macrocode} -\IfBooleanTF{#1}% -{}% starred -{% not starred -% \end{macrocode} -% Only add a numbered TOC entry if section number is not too deep: -% \begin{macrocode} -\ifthenelse{% -\cnttest{\csuse{LWR@depth#4}}{<=}{\value{secnumdepth}}% -}% -{% if secnumdepth -% \end{macrocode} -% If in the main matter, step the counter and add the TOC entry. -% For |article| class, \pkg{lwarp} assumes that all is mainmatter. -% \begin{macrocode} -\LWR@traceinfo{LWR@section: about to test main matter}% -\ifbool{LWR@mainmatter}% -{% -\LWR@traceinfo{LWR@section: yes mainmatter}% -\refstepcounter{#4}% -% \end{macrocode} -% Add main matter numbered TOC entry with the TOC name or the regular name: -% \begin{macrocode} -\LWR@traceinfo{LWR@section: about to addcontentsline}% -\addcontentsline{toc}{#4}% -{\protect\LWR@sectionnumber{\csuse{the#4}}% -\IfValueTF{#2}{#2}{#3}}% -\LWR@traceinfo{LWR@section: finished addcontentsline}% -}% end of if main matter -% \end{macrocode} -% If not main matter, add unnumbered TOC name or regular name: -% \begin{macrocode} -{% not main matter -\LWR@traceinfo{LWR@section: no main matter}% -\addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}% -}% end of not main matter -}% end of secnumdepth -% \end{macrocode} -% Deeper than secnumdepth, so add an unnumbered TOC entry: -% \begin{macrocode} -{% -\addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}% -}% -% \end{macrocode} -% For part, print the section type: -% \begin{macrocode} -\ifbool{LWR@mainmatter}% -{% -\ifthenelse{% -\(\cnttest{\csuse{LWR@depth#4}}{<=}% -{\value{secnumdepth}}\) \AND -\(\cnttest{\csuse{LWR@depth#4}}{<=}{\LWR@depthpart}\) -}% -{\csuse{#4name}~{}}% -{}% -% \end{macrocode} -% Print the section number: -% \begin{macrocode} -\LWR@traceinfo{LWR@section: about to print section number}% -\ifthenelse{% -\cnttest{\csuse{LWR@depth#4}}{<=}{\value{secnumdepth}}% -}% -{\protect\LWR@sectionnumber{\csuse{the#4}}}% -{}% -\LWR@traceinfo{LWR@section: finished print section number}% -}{}% -}% end of not starred -% \end{macrocode} -% Print the section name: -% \begin{macrocode} -#3 -% \end{macrocode} -% close the heading tag, such as /H2 -% \begin{macrocode} -\LWR@htmltag{\csuse{LWR@tag#4end}}% -% \end{macrocode} -% Generate a \LaTeX{} label: -% \begin{macrocode} -\label{autopage-\thepage}% -% \end{macrocode} -% Start paragraph handing unless is an inline paragraph or subparagraph: -% \begin{macrocode} -\ifthenelse{% -\cnttest{\csuse{LWR@depth#4}}{<}{\LWR@depthparagraph}}% -{\LWR@startpars}% -{}% -% \end{macrocode} -% If not starred, remember the previous depth to -% possibly trigger a new \HTML\ page. -% -% A starred section does not trigger a new \HTML\ page at the beginning -% of this macro, so it should not affect it here at the end either. -% This became an issue when a \cs{listoftables} was tested in the middle of -% the document. The \cs{chapter*} for the list was not allowing -% a new \HTML\ page for the section following it -% while |CombineHigherDepths| was true. -% \begin{macrocode} -\IfBooleanTF{#1}{}{% not starred -\setcounter{LWR@prevFileDepth}{\csuse{LWR@depth#4}}% -}% not starred -\LWR@traceinfo{LWR@section: done}% -} -% \end{macrocode} -% \end{macro} +body { + font-family: "Linux Libertine O", "Hoefler Text", "Garamond", + "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", + "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, + "Times New Roman", serif; + background: #fffcf5; +} +span.textrm { + font-family: "Linux Libertine O", "Hoefler Text", "Garamond", + "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", + "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, + "Times New Roman", serif; +} -% \subsection{\textbackslash{}section and friends} +span.textsf { + font-family: "DejaVu Sans", "Bitstream Vera Sans", + Geneva, Verdana, sans-serif ; +} -% \begin{macro}{\part} * \oarg{TOC name} \marg{name} -% \begin{macrocode} -\@ifundefined{chapter} -{} -{% -\DeclareDocumentCommand{\part}{s o m}{% -\LWR@epubprintpendingfootnotes% -\LWR@stoppars% -\LWR@startnewdepth{\LWR@depthpart}{\LWR@printclosepart}% -\LWR@section{#1}{#2}{#3}{part}% +h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph +{ + font-family: "Linux Libertine O", "Hoefler Text", "Garamond", + "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", + "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, + "Times New Roman", serif; + color: #800000 ; + text-shadow: none ; } -} -% \end{macrocode} -% \end{macro} - -% \begin{macro}{\chapter} * \oarg{TOC name} \marg{name} -% -% \changes{v0.28}{2017/04/06}{If \EPUB, prints footnotes before each section.} -% \begin{macrocode} -\@ifundefined{chapter} -{} -{% -\DeclareDocumentCommand{\chapter}{s o m}{% -\LWR@traceinfo{chapter #3}% -\LWR@epubprintpendingfootnotes% -\LWR@stoppars% -\LWR@startnewdepth{\LWR@depthchapter}{\LWR@printclosechapter}% +h1, h2 { + background-color: #fffcf5 ; + background-image: none ; + border-bottom: 1px solid #808080; + border-top: 2px solid #808080; +} -\LWR@traceinfo{chapter: about to LWR@section}% -\LWR@section{#1}{#2}{#3}{chapter}% -\LWR@traceinfo{chapter: done}% +div.abstracttitle { + font-family: "Linux Libertine O", "Hoefler Text", "Garamond", + "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", + "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, + "Times New Roman", serif; + color: black ; + text-shadow: none ; } + +span.abstractrunintitle { + font-family: "Linux Libertine O", "Hoefler Text", "Garamond", + "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", + "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, + "Times New Roman", serif; + color: black ; + text-shadow: none ; } -% \end{macrocode} -% \end{macro} +div.abstract { font-size: 100% } -% \begin{macro}{\section} * \oarg{TOC name} \marg{name} -% \begin{macrocode} -\DeclareDocumentCommand{\section}{s o m}{% -\LWR@epubprintpendingfootnotes% -\LWR@stoppars% +.sidebar { + background: #fffcf5; + background-image: none ; + margin: 2em 5% 2em 5%; + padding: 0.5em 1em; + border: none ; + border-top : 1px solid silver; + border-bottom : 1px solid silver; + font-size: 90% ; +} -\LWR@startnewdepth{\LWR@depthsection}{\LWR@printclosesection}% +div.sidebartitle{ + font-family: "Linux Libertine O", "Hoefler Text", "Garamond", + "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", + "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, + "Times New Roman", serif; + color: #800000 ; + text-shadow: none ; + border: none ; +} -\LWR@section{#1}{#2}{#3}{section}% +.example { + background: #fffcf5; + background-image: none ; + margin: 2em 5% 2em 5%; + padding: 0.5em 1em; + border: none ; + border-top : 1px solid silver; + border-bottom : 1px solid silver; } -% \end{macrocode} -% \end{macro} +div.exampletitle{ + font-family: "Linux Libertine O", "Hoefler Text", "Garamond", + "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", + "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, + "Times New Roman", serif; + color: #800000 ; + text-shadow: none ; + border: none ; +} +div.fancyvrblabel{ + font-family: "Linux Libertine O", "Hoefler Text", "Garamond", + "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", + "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, + "Times New Roman", serif; + color: #800000 ; + text-shadow: none ; + border: none ; +} -% \begin{macro}{\subsection} * \oarg{TOC name} \marg{name} -% \begin{macrocode} -\DeclareDocumentCommand{\subsection}{s o m}{% -\LWR@epubprintpendingfootnotes% -\LWR@stoppars% -\LWR@startnewdepth{\LWR@depthsubsection}{\LWR@printclosesubsection}% -\LWR@section{#1}{#2}{#3}{subsection}% +.verse { + font-family: "Linux Libertine O", "Hoefler Text", "Garamond", + "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", + "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, + "Times New Roman", serif; } -% \end{macrocode} -% \end{macro} +figure { + margin: 3ex 5% 3ex 5% ; + padding: 1ex 1em 1ex 1em ; + background-color: #fffcf5 ; + overflow-x: auto ; + border: none ; +/* border-top: 1px solid silver; */ +/* border-bottom: 1px solid silver; */ +} -% \begin{macro}{\subsubsection} * \oarg{TOC name} \marg{name} -% \begin{macrocode} -\DeclareDocumentCommand{\subsubsection}{s o m}{% -\LWR@epubprintpendingfootnotes% -\LWR@stoppars% -\LWR@startnewdepth{\LWR@depthsubsubsection}% -{\LWR@printclosesubsubsection}% +figcaption , .lstlisting { + border: none ; +/* border-top: 1px solid silver ; */ +/* border-bottom: 1px solid silver ; */ + background-color: #fffcf5 ; +} -\LWR@section{#1}{#2}{#3}{subsubsection}% +.tnotes { + background: #fffcf5 ; } -% \end{macrocode} -% \end{macro} +.theorem { + background: none ; +} +.minipage { + background-color: #fffcf5 ; + border: none ; +} +div.floatrow figure { border: none ; } -% \begin{macro}{\paragraph} * \oarg{TOC name} \marg{name} -% \begin{macrocode} -\DeclareDocumentCommand{\paragraph}{s o m}{% -\LWR@epubprintpendingfootnotes% -\LWR@stoppars% +figure figure { border: none ; } -\LWR@startnewdepth{\LWR@depthparagraph}{\LWR@printcloseparagraph}% -\LWR@section{#1}{#2}{#3}{paragraph}% +nav.toc, nav.lof, nav.lot, nav.lol { + font-family: "Linux Libertine O", "Hoefler Text", "Garamond", + "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", + "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, + "Times New Roman", serif; } -% \end{macrocode} -% \end{macro} +nav.sidetoc { + font-family: "Linux Libertine O", "Hoefler Text", "Garamond", + "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", + "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, + "Times New Roman", serif; + background-image: linear-gradient(to bottom, #fffcf5, #C0C0C0); + border-radius: 0px 0px 0px 20px ; +} +div.sidetoctitle{ + color: #800000 ; +} -% \begin{macro}{\subparagraph} * \oarg{TOC name} \marg{name} -% \begin{macrocode} -\DeclareDocumentCommand{\subparagraph}{s o m}{% -\LWR@epubprintpendingfootnotes% -\LWR@stoppars% +header{ + background-color: #e0e0e0 ; + background-image: linear-gradient(to top, #fffcf5, #b0b0b0); + text-align:center ; +} -\LWR@startnewdepth{\LWR@depthsubparagraph}{\LWR@printclosesubparagraph}% +footer{ + background-color: #e0e0e0 ; + background-image: linear-gradient(to bottom, #fffcf5, #b0b0b0); + padding: 2ex 1em 2ex 1em ; + clear:right ; + text-align:left ; +} -\LWR@section{#1}{#2}{#3}{subparagraph}% +nav.botnavigation { + background: #dedcd5 ; + border-top: 1px solid black ; } +\end{VerbatimOut} +% \end{Verbatim}% for syntax highlighting +\end{warpprint} % \end{macrocode} -% \end{macro} -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} - +% \subsection{sample\_project.css} +% \DescribeFile{sample_project.css} +% The project-specific \CSS\ file. Use with \cs{CSSFilename}. +% +% If used, this must be present both when compiling the project +% and also when distributing the \HTML\ files. +% +% \begin{macrocode} +\begin{warpprint} +\begin{VerbatimOut}{sample_project.css} +/* ( --- Start of project.css --- ) */ +/* A sample project-specific CSS file for lwarp --- ) */ +/* Load default lwarp settings: */ +@import url("lwarp.css") ; +/* or lwarp_formal.css, lwarp_sagebrush.css */ -% \section{Starting a new file} -% \label{sec:startingfile} +/* Project-specific CSS setting follow here. */ +/* . . . */ -% \codehtml -% \begin{macrocode} -\begin{warpHTML} +/* ( --- End of project.css --- ) */ +\end{VerbatimOut} +% \end{Verbatim}% for syntax highlighting +\end{warpprint} % \end{macrocode} -% \begin{macro}{\MetaLanguage} Default language for the \HTML\ |lang| tag. -% \index{language HTML metadata} -% \begin{macrocode} -\newcommand*{\MetaLanguage}{en-US} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\LWR@filestart} \marg{title\_suffix} +% \subsection{lwarp.xdy} -% Creates the opening \HTML\ tags. -% \changes{v0.19}{2016/05/25}{lwarp\_mathjax.txt loaded.} -% \changes{v0.20}{2016/06/27}{Adds meta description.} -% \changes{v0.21}{2017/02/22}{Skip title if not given.} -% \changes{v0.28}{2017/04/06}{Adds \HTML\ meta author.} +% \DescribeFile{lwarp.xdy} +% Used to modify the index for \pkg{lwarp}. +% +% This must be present when compiling the project, +% but does not need to be present when distributing +% the resulting \HTML\ files. +% +% \changes{v0.30}{2017/04/28}{File: \protect\texttt{lwarp\_html.xdy} renamed to \protect\texttt{lwarp.xdy}.} +% \changes{v0.30}{2017/04/26}{Fix: \protect\texttt{lwarp.xdy} only written in print mode.} % % \begin{macrocode} -\newcommand*{\LWR@filestart}[1]{ -% \end{macrocode} -% Locally temporarily disable direct-formatting commands: -% \begin{macrocode} -\begingroup -\renewcommand{\textit}[1]{##1}% not used in filenames -\renewcommand{\textsc}[1]{##1} -\renewcommand{\textsl}[1]{##1} -\renewcommand{\textbf}[1]{##1} -\renewcommand{\texttt}[1]{##1} -\renewcommand{\textsf}[1]{##1} -\renewcommand{\textrm}[1]{##1} -\renewcommand{\textsuperscript}[1]{##1} -\renewcommand{\textsubscript}[1]{##1} -\renewcommand*{\HTMLunicode}[1]{} -\renewcommand*{\HTMLentity}[1]{} -\RenewDocumentCommand{\LWR@htmlspanclass}{m o +m}{##3} -\DeclareExpandableDocumentCommand{\InlineClass}{m o m}{##3} -% \end{macrocode} -% Create the page's \HTML\ header: -% \begin{macrocode} -\LWR@htmltag{!DOCTYPE html}\LWR@orignewline -% \end{macrocode} -% The language is user-adjustable: -% \begin{macrocode} -\LWR@htmltag{html lang="\MetaLanguage"{}}\LWR@orignewline -% \end{macrocode} -% Start of the meta data: -% \begin{macrocode} -\LWR@htmltag{head}\LWR@orignewline -% \end{macrocode} -% Charset is fixed at UTF-8: -% \begin{macrocode} -\LWR@htmltag{meta charset="UTF-8" /}\LWR@orignewline +\begin{warpprint} +\begin{VerbatimOut}{lwarp.xdy} +(require "tex/inputenc/latin.xdy") +(merge-rule "\\PS *" "Postscript") +(require "texindy.xdy") +(require "page-ranges.xdy") +(require "book-order.xdy") +(markup-locref :open "\hyperindexref{" :close "}") +\end{VerbatimOut} +% \end{Verbatim}% for syntax highlighting +\end{warpprint} % \end{macrocode} + + + +% \subsection{lwarp\_mathjax.txt} + +% \DescribeFile{lwarp_mathjax.txt} +% Used by \pkg{lwarp} when using MathJax. +% +% This must be present when compiling the project, +% but does not need to be present when distributing +% the resulting \HTML\ files. +% +% \changes{v0.28}{2017/04/11}{File \protect\texttt{lwarp\_mathjax.txt}: Updated \protect\acro{CDN} repository.} +% \changes{v0.30}{2017/04/26}{Fix: \protect\texttt{lwarp\_mathjax.txt} only written in print mode.} % -% Author: -% \begin{macrocode} -\ifcsempty{theHTMLauthor}{}{ -\LWR@htmltag{meta name="author" content="\theHTMLauthor" /}\LWR@orignewline -} -% \end{macrocode} % -% \pkg{lwarp} is the generator: -% \index{HTML>meta tag>generator} -% \index{generator>HTML meta tag} -% \index{meta tag, HTML>generator} -% \begin{macrocode} -\LWR@htmltag{meta name="generator" content="LaTeX lwarp package" /}% - \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 -}% -% \end{macrocode} -% Mobile-friendly viewport: -% \index{HTML>meta tag>viewport} -% \index{viewport>HTML meta tag} -% \index{meta tag, HTML>viewport} -% \begin{macrocode} -\LWR@htmltag{meta name="viewport" % -content="width=device-width, initial-scale=1.0" /}% - \LWR@orignewline -% \end{macrocode} -% IE patch: -% \begin{macrocode} -\LWR@htmltag{!{-}{-}[if lt IE 9]}\LWR@orignewline -\LWR@htmltag{% -script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"{}}% -\LWR@htmltag{/script}\LWR@orignewline -\LWR@htmltag{![endif]{-}{-}}\LWR@orignewline -% \end{macrocode} -% The page's title: -% \begin{macrocode} -\ifcsvoid{thetitle}{}{% -\LWR@htmltag{title}\thetitle#1\LWR@htmltag{/title}\LWR@orignewline% -}% -% \end{macrocode} -% The page's stylesheet: -% \begin{macrocode} -\LWR@htmltag{% -link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% -\LWR@orignewline -% \end{macrocode} -% Optional MathJax support. The \HTML\ tags must be turned off -% during the verbatim input, and the paragraph handling which was -% turned on at the end of verbatim input must be immediately turned off -% again. -% \begin{macrocode} -\ifbool{mathjax}% -{% -\boolfalse{LWR@verbtags} -\VerbatimInput{lwarp_mathjax.txt}% -\booltrue{LWR@verbtags} -\LWR@stoppars -}% end of mathjax -{}% -% \end{macrocode} -% End of the header: -% \begin{macrocode} -\LWR@htmltag{/head}\LWR@orignewline -% \end{macrocode} -% Start of the body: -% \begin{macrocode} -\LWR@htmltag{body}\LWR@orignewline -\endgroup -} -% \end{macrocode} -% \end{macro} - % \begin{macrocode} -\end{warpHTML} -% \end{macrocode} +\begin{warpprint} +\begin{VerbatimOut}{lwarp_mathjax.txt} + + + + + + + + + -% \section{Starting HTML output} + + -% \codehtml -% \begin{macrocode} -\begin{warpHTML} +\end{VerbatimOut} +% \end{Verbatim}% for syntax highlighting +\end{warpprint} % \end{macrocode} -% \begin{macro}{\LWR@LwarpStart} -% \changes{v0.19}{2016/06/01}{Enabled \textbackslash\textbackslash{} equal to \cs{newline}.} -% \changes{v0.21}{2017/02/22}{Changed \texttt{lateximages} to a \texttt{.txt} file.} -% \changes{v0.28}{2017/04/09}{\texttt{FormatWordProcessor} forces single-file output.} -% Executed at the beginning of the entire document. + +% \subsection{lwarpmk option} + +% The following is only generated if the |lwarpmk| option +% was given to \pkg{lwarp}. % \begin{macrocode} -\newcommand*{\LWR@LwarpStart} -{% +\begin{LWR@createlwarpmk} % \end{macrocode} + +% \DescribeProgram{lwarpmk} Creates a local copy of |lwarpmk|: % -% If formatting for a word processor, -% force filedepth to single-file only, -% force \HTML\ debug comments off. -% \begin{macrocode} -\ifbool{FormatWordProcessor}{% -\setcounter{FileDepth}{-5}% -\boolfalse{HTMLDebugComments}% -}{} -% \end{macrocode} +% \changes{v0.21}{2017/02/11}{\protect\texttt{lwarpmk}: Fix: \protect\texttt{lwarpmk again} for Windows.} +% \changes{v0.21}{2017/02/22}{\protect\texttt{lwarpmk}: Fix: \protect\texttt{lwarpmk limages} for Windows.} +% \changes{v0.21}{2017/02/22}{\protect\texttt{lwarpmk}: Fix: \protect\texttt{lwarpmk} uses \texttt{lateximages} text file instead of shell script.} +% \changes{v0.28}{2017/04/14}{\protect\texttt{lwarpmk}: Add: \protect\texttt{printglossary} and \protect\texttt{htmlglossary} commands.} +% \changes{v0.29}{2017/04/15}{\protect\texttt{lwarpmk}: Add: \protect\texttt{language} option for config files.} +% \changes{v0.30}{2017/04/22}{\protect\texttt{lwarpmk}: \protect\texttt{language} now used for both index and glossary generation.} +% \changes{v0.30}{2017/04/22}{\protect\texttt{lwarpmk}: Fix: \protect\texttt{xindy} now used for print index generation with \protect\texttt{latexmk}.} +% \changes{v0.30}{2017/04/28}{\protect\texttt{lwarpmk}: Fix: \protect\texttt{xindy} and \protect\texttt{texindy} +% adjusted for \protect\texttt{pdflatex}, \protect\texttt{xelatex} and \protect\texttt{lualatex}.} +% \changes{v0.30}{2017/04/28}{\protect\texttt{lwarpmk}: Add: \protect\texttt{xdyfile} configuration option.} % -% Expand and detokenize \cs{HomeHTMLFileName} and \cs{HTMLFileName}: -% \begin{macrocode} -\edef\LWR@strresult{\HomeHTMLFileName} -\edef\HomeHTMLFileName{\detokenize\expandafter{\LWR@strresult}} -\edef\LWR@strresult{\HTMLfiveName} -\edef\HTMLfiveName{\detokenize\expandafter{\LWR@strresult}} -% \end{macrocode} -% Force onecolumn: -% \begin{macrocode} -\LWR@origonecolumn% -% \end{macrocode} -% Reduce chance of line overflow in verbatim environments: -% \begin{macrocode} -\LWR@origscriptsize% -% \end{macrocode} -% In \PDF\ output, don't allow line breaks to interfere with \HTML\ tags: -% \begin{macrocode} -\LWR@origraggedright% -\let\\\LWR@endofline% -% \end{macrocode} -% Spread the lines for |pdftotext| to read them well: -% \begin{macrocode} -\linespread{1.3}% -% \end{macrocode} -% For |pdftotext| to reliably identify paragraph splits: % \begin{macrocode} -\setlength{\parindent}{0pt} -\setlength{\parskip}{2ex} -% \end{macrocode} -% -% For the |lateximages| record file: -% \begin{macrocode} -\immediate\openout\LWR@file=lateximages.txt -% \end{macrocode} -% -% Removes space after the caption in the \HTML: -% \begin{macrocode} -\setlength{\belowcaptionskip}{-3ex} -% \end{macrocode} -% Redefine the plain page style to be empty when used by index pages: -% \begin{macrocode} -\renewcommand{\ps@plain}{} -% \end{macrocode} -% Not used in the \HTML\ environment: -% \DescribeMacro{\centering} -% \DescribeMacro{\raggedleft} -% \DescribeMacro{\raggedright} -% \begin{macrocode} -\renewcommand*{\centering}{} -\renewcommand*{\raggedleft}{} -\renewcommand*{\raggedright}{} -% \end{macrocode} -% Plug in some new actions. -% This is done just before the document start -% so that they won't be over-written by some other package. -% \changes{v0.13}{2016/03/23}{\cs{up} and \cs{fup}} -% -% Tabular: -% \begin{macrocode} -\let\LWR@origtabular\tabular -\let\LWR@origendtabular\endtabular -\let\tabular\LWR@tabular -\let\endtabular\endLWR@tabular -% \end{macrocode} -% Float captions: -% \begin{macrocode} -\let\LWR@origcaption\caption -% \end{macrocode} -% -% Labels: -% \cs{ltx@label} is used in \pkg{amsmath} environments and is also -% patched by \pkg{cleveref}. -% \index{label>in HTML} -% \margintag{Label in \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: -% \begin{macrocode} -\let\TeX\LWR@TeX -\let\LaTeX\LWR@LaTeX -\let\LuaTeX\LWR@LuaTeX -\let\LuaLaTeX\LWR@LuaLaTeX -\let\XeTeX\LWR@XeTeX -\let\XeLaTeX\LWR@XeLaTeX -\let\ConTeXt\LWR@ConTeXt -% \end{macrocode} -% Graphics: -% \begin{macrocode} -\let\rotatebox\LWR@rotatebox -\let\scalebox\LWR@scalebox -\let\reflectbox\LWR@reflectbox -% \end{macrocode} -% Not yet started any paragraph handling: -% \begin{macrocode} -\global\boolfalse{LWR@doingapar} -\global\boolfalse{LWR@doingstartpars} -% \end{macrocode} -% Start a new \HTML\ file and a header: -% \begin{macrocode} -\LWR@filestart{} -\LWR@htmltag{header}\LWR@orignewline -\LWR@startpars -\LWR@firstpagetop -\LWR@stoppars -\LWR@htmltag{/header}\LWR@orignewline -\LWR@htmltag{section class="textbody"{}} -\LWR@origpagestyle{empty} -% \end{macrocode} -% Document and page settings: -% \begin{macrocode} -\mainmatter -\LWR@origpagenumbering{arabic} -% \end{macrocode} -% Set default titlepage thanks footnote marks. See \cref{sec:titlehtml}. -% \begin{macrocode} -\if@titlepage - \thanksmarkseries{arabic} -\else - \thanksmarkseries{fnsymbol} -\fi -% \end{macrocode} -% -% Initial default patch for fancyvrb: -% \begin{macrocode} -\fvset{frame=none}% -% \end{macrocode} -% -% The ampersand is redefined active, and acts depending -% on whether it is inside a tabular. -% \begin{macrocode} -\catcode`\&=\active -% \end{macrocode} -% Allow \HTML\ paragraphs to begin: -% \begin{macrocode} -\LWR@startpars -} -% \end{macrocode} -% \end{macro} +\begin{VerbatimOut}{lwarpmk.lua} +#!/usr/bin/env texlua -% \begin{macrocode} -\end{warpHTML} -% \end{macrocode} +-- Copyright 2016-2017 Brian Dunn +-- Print the usage of the lwarpmk command: +printversion = "v0.30" +function printhelp () +print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ; +end +function printusage () +print ( [[ -% \section{Ending HTML output} +lwarpmk print [project]: Compile a print version. +lwarpmk printindex [project]: Process the index for the print version. +lwarpmk printglossary [project]: Process the glossary for the print version. +lwarpmk html [project]: Compile an HTML version. +lwarpmk htmlindex [project]: Process the index for the html version. +lwarpmk htmlglossary [project]: Process the glossary for the html version. +lwarpmk again [project]: Touch the source code to trigger recompiles. +lwarpmk limages [project]: Process the "lateximages" created by lwarp.sty. +lwarpmk pdftohtml [project]: + For use with latexmk or a Makefile: + Convert project_html.pdf to project_html.html and + individual HTML files. +lwarpmk clean [project]: Remove project.aux, .toc, .lof/t, .idx, .ind, .log, .gl* +lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html +lwarpmk -h: Print this help message. +lwarpmk --help: Print this help message. -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} +]] ) +printconf () +end +-- Print the format of the configuration file lwarpmk.conf: -% \begin{macro}{\LWR@requesttoc} \marg{boolean} \marg{suffix} -% \changes{v0.18}{2016/05/19}{Reorganize \cs{HomeHTMLFilename} logic.} -% Requests that a toc, lof, or lot be generated. +function printconf () +print ( [[ +An example lwarpmk.conf or .lwarpmkconf project file: +-- +opsystem = "Unix" (or "Windows") +latexname = "pdflatex" (or "lualatex", or "xelatex") +sourcename = "projectname" (the source-code filename w/o .tex) +homehtmlfilename = "index" (or perhaps the project name) +htmlfilename = "" (or "projectname" - filename prefix) +latexmk = "false" (or "true" to use latexmk to build PDFs) +languge = "english" (use a language supported by xindy) +xdyfile = "lwarp.xdy" (or a custom file based on lwarp.xdy) +-- +Filenames must contain only letters, numbers, underscore, or dash. +Values must be in "quotes". -% \begin{macrocode} -\newcommand*{\LWR@requesttoc}[2]{% -\ifbool{#1} -{ -\expandafter\newwrite\csuse{tf@#2} -\immediate\openout \csuse{tf@#2} \jobname.#2\relax -}{} -} -% \end{macrocode} -% \end{macro} +]] ) ; +end -% \begin{macro}{\LWR@LwarpEnd} -% Final stop of all \HTML\ output: -% -% \changes{v0.28}{2017/04/06}{If \texttt{FormatEPUB} or \texttt{FormatWordProcessor}, no bottom nav.} -% \begin{macrocode} -\newcommand*{\LWR@LwarpEnd} -{ -\LWR@stoppars -\LWR@closeprevious{\LWR@depthfinished} -% \end{macrocode} -% At the bottom of the ending file: +-- Split one large sourcefile into a number of files, +-- starting with destfile. +-- The file is split at each occurance of - +% \begin{macro}{\bfseries} +% \begin{macrocode} +\renewcommand*{\bfseries}{} +% \end{macrocode} +% \end{macro} - - +% \begin{macro}{\rmfamily} +% \begin{macrocode} +\renewcommand*{\rmfamily}{} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\sffamily} - - +% \begin{macrocode} +\renewcommand*{\sffamily}{} +% \end{macrocode} +% \end{macro} - +% \begin{macro}{\ttfamily} +% \begin{macrocode} +\renewcommand*{\ttfamily}{} +% \end{macrocode} +% \end{macro} - - +% \begin{macro}{\upshape} +% \begin{macrocode} +\renewcommand*{\upshape}{} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\itshape} +% \begin{macrocode} +\renewcommand*{\itshape}{} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\scshape} +% \begin{macrocode} +\renewcommand*{\scshape}{} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\scshape} +% \begin{macrocode} +\renewcommand*{\normalfont}{} +% \end{macrocode} +% \end{macro} - - -\end{VerbatimOut} -% \end{Verbatim}% for syntax highlighting + +% \begin{macro}{\sp} \marg{text} + +% For \pkg{siunitx}. Must work in math mode. +% \begin{macrocode} +\renewcommand{\sp}[1]{\text{#1}{}} % \end{macrocode} +% \end{macro} +% \begin{macro}{\sb} \marg{text} +% For \pkg{siunitx}. Must work in math mode. +% \begin{macrocode} +\renewcommand{\sb}[1]{\text{#1}{}} +% \end{macrocode} +% \end{macro} -% \subsection{Lwarpmk option} -% The following is only generated if the |lwarpmk| option -% was given to \pkg{lwarp-newproject}. +% \begin{macro}{\textsuperscript} \marg{text} % \begin{macrocode} -\begin{LWR@createlwarpmk} +\renewcommand{\textsuperscript}[1]{\LWR@htmlspan{sup}{#1}} % \end{macrocode} +% \end{macro} -% \DescribeProgram{lwarpmk} Creates a local copy of |lwarpmk|: -% -% \changes{v0.21}{2017/02/11}{lwarpmk: Fix: \protect\texttt{lwarpmk again} for Windows.} -% \changes{v0.21}{2017/02/22}{lwarpmk: Fix: \protect\texttt{lwarpmk limages} for Windows.} -% \changes{v0.21}{2017/02/22}{lwarpmk: Fix: \protect\texttt{lwarpmk} uses \texttt{lateximages} text file instead of shell script.} -% \changes{v0.28}{2017/04/14}{lwarpmk: Add: \protect\texttt{printglossary} and \protect\texttt{htmlglossary} commands.} -% \changes{v0.29}{2017/04/15}{lwarpmk: Add: \protect\texttt{language} option for config files.} -% +% \begin{macro}{\textsubscript} \marg{text} % \begin{macrocode} -\begin{VerbatimOut}{lwarpmk.lua} -#!/usr/bin/env texlua +\renewcommand{\textsubscript}[1]{\LWR@htmlspan{sub}{#1}} +% \end{macrocode} +% \end{macro} --- Copyright 2016-2017 Brian Dunn --- Print the usage of the lwarpmk command: +% \begin{macro}{\up} \marg{text} Prints superscript. +% +% This is \cs{let} at the beginning of the document in case some other package +% has changed the definition. +% \begin{macrocode} +\AtBeginDocument{\let\up\textsuperscript} +% \end{macrocode} +% \end{macro} -printversion = "v0.29" +% \begin{macro}{\fup} \marg{text} Prints superscript. +% +% Supports \pkg{fmtcount} package. +% +% This is \cs{let} at the beginning of the document in case some other package +% has changed the definition. +% \begin{macrocode} +\AtBeginDocument{\let\fup\textsuperscript} +% \end{macrocode} +% \end{macro} -function printhelp () -print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ; -end -function printusage () -print ( [[ +% \begin{macro}{\hfill} +% \changes{v0.20}{2016/12/12}{Inserts a \cs{qquad}.} +% \begin{macrocode} +\renewcommand*{\hfill}{\qquad} +% \end{macrocode} +% \end{macro} -lwarpmk print [project]: Compile a print version. -lwarpmk printindex [project]: Process the index for the print version. -lwarpmk printglossary [project]: Process the glossary for the print version. -lwarpmk html [project]: Compile an HTML version. -lwarpmk htmlindex [project]: Process the index for the html version. -lwarpmk htmlglossary [project]: Process the glossary for the html version. -lwarpmk again [project]: Touch the source code to trigger recompiles. -lwarpmk limages [project]: Process the "lateximages" created by lwarp.sty. -lwarpmk pdftohtml [project]: - For use with latexmk or a Makefile: - Convert project_html.pdf to project_html.html and - individual HTML files. -lwarpmk clean [project]: Remove project.aux, .toc, .lof/t, .idx, .ind, .log, .gl* -lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html -lwarpmk -h: Print this help message. -lwarpmk --help: Print this help message. +% \begin{macro}{\hrulefill} +% \changes{v0.20}{2017/01/19}{Inserts a short rule.} +% \begin{macrocode} +\renewcommand*{\hrulefill}{\rule{1in}{1pt}} +% \end{macrocode} +% \end{macro} -]] ) -printconf () -end +% \begin{macro}{\dotfill} +% \changes{v0.20}{2017/01/19}{Inserts an ellipsis.} +% \begin{macrocode} +\renewcommand*{\dotfill}{\dots} +% \end{macrocode} +% \end{macro} --- Print the format of the configuration file lwarpmk.conf: -function printconf () -print ( [[ -An example lwarpmk.conf or .lwarpmkconf project file: --- -opsystem = "Unix" (or "Windows") -latexname = "pdflatex" (or "lualatex", or "xelatex") -sourcename = "projectname" (the source-code filename w/o .tex) -homehtmlfilename = "index" (or perhaps the project name) -htmlfilename = "" (or "projectname" - filename prefix) -uselatexmk = "false" (or "true" to use latexmk to build PDFs) -languge = "english" (use a language supported by xindy) --- -Filenames must contain only letters, numbers, underscore, or dash. -Values must be in "quotes". -]] ) ; -end +% \begin{macrocode} +\end{warpHTML} +% \end{macrocode} --- Split one large sourcefile into a number of files, --- starting with destfile. --- The file is split at each occurance of