summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/lwarp
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-02-23 22:00:27 +0000
committerKarl Berry <karl@freefriends.org>2017-02-23 22:00:27 +0000
commita312d5264ce16bf7014edb5c0da256772ef5e33b (patch)
tree55f6e08732b73b9983daa001990416e9c88173cb /Master/texmf-dist/source/latex/lwarp
parent69138b92d7784154c2db4471d176e3027815336a (diff)
lwarp (22feb17)
git-svn-id: svn://tug.org/texlive/trunk@43317 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/lwarp')
-rw-r--r--Master/texmf-dist/source/latex/lwarp/lwarp.dtx845
-rw-r--r--Master/texmf-dist/source/latex/lwarp/lwarp.ins5
2 files changed, 636 insertions, 214 deletions
diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
index dce07329532..e2656f8a077 100644
--- a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
+++ b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
@@ -16,7 +16,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{lwarp}
-%<package> [2017/02/09 v0.20 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2017/02/23 v0.21 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -56,13 +56,15 @@
\newunicodechar{Ô}{\^{O}}
\newunicodechar{ê}{\^{e}}
-\usepackage{microtype}
-\usepackage[all,defaultlines=2]{nowidow}
-\usepackage{needspace}
+\usepackage[log-declarations=false]{xparse}
+\usepackage[lwarpmk]{lwarp-newproject}
+\usepackage{lwarp}
+
+
+\usepackage{needspace}
-\usepackage[log-declarations=false]{xparse}
\usepackage[svgnames]{xcolor}
\definecolor{myurlcolor}{rgb}{0,0,.7}
@@ -124,8 +126,11 @@
\newcommand{\ItemDescribeBoolean}[1]{\item[\texttt{#1}:]\DescribeBoolean{#1}}
-\usepackage[lwarpmk]{lwarp-newproject}
-\usepackage{lwarp}
+
+
+\usepackage{microtype}
+
+\usepackage[all,defaultlines=2]{nowidow}
@@ -155,6 +160,7 @@ Keywords={LaTeX, HTML, conversion}%
\newcommand{\env}[1]{\texttt{#1}}
\newcommand{\pkg}[1]{\textsf{#1}}
\newcommand{\acro}[1]{\textsc{\lowercase{#1}}}
+\newcommand{\tag}[1]{\texttt{<#1>}}
@@ -533,14 +539,14 @@ unless you place a \cs{newline} between them.
\margintag{placement}
A line of text with an inline minipage
-\margintag{inline}
+\watchout[inline]
or parbox will have the minipage or parbox placed onto its own line,
because a paragraph is a block element and cannot be made \texttt{inline-block}.
-There is limited support for minipages inside an \acro{HTML} |span|.
+There is limited support for minipages inside an \acro{HTML} \tag{span}.
\margintag{in a span}
-An \acro{HTML} |div| cannot appear inside a |span|.
-While in a |span|, minipages and parboxes are ignored.
+An \acro{HTML} \tag{div} cannot appear inside a \tag{span}.
+While in a \tag{span}, minipages and parboxes are ignored.
Use \cs{newline} or \cs{par} for an \acro{HTML} break.
When using \cs{linewidth}, \cs{textwidth}, and \cs{textheight},
@@ -568,8 +574,7 @@ title and subtitle background colors and borders and thickness,
border radius, and shadow.
CSS classes are created for \pkg{mdframed} environments and frame titles.
-Only load \pkg{mdframed} in a \env{warpprint} environment.
-\pkg{lwarp} pre-loads \pkg{mdframed} in HTML with \texttt{framemethod=none}.
+When used, \pkg{lwarp} loads \pkg{mdframed} in HTML with \texttt{framemethod=none}.
\watchout[loading]
For title font, use\\
@@ -708,10 +713,7 @@ If \textsc{MS-Windows} is not correctly detected,
use the command \cs{warpOSwindows} in the document
\DescribeMacro{\warpOSwindows}
preamble after \pkg{lwarp} is loaded. This modifies the
-creation of the \\ \hspace*{2em}\texttt{lateximages.sh} or \texttt{lateximages.cmd} \\
-batch file, which is an operating-system-specific shell script used to take
-individual pages of the \LaTeX{} \acro{PDF} output and
-convert and store them in individual \acro{SVG} files.
+operating-system path separator used by \pkg{lwarp}.
}
@@ -739,7 +741,7 @@ convert and store them in individual \acro{SVG} files.
%<*package>
% \fi
%
-% \CheckSum{8260}
+% \CheckSum{8282}
%
% \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
@@ -797,6 +799,7 @@ convert and store them in individual \acro{SVG} files.
% \changes{v0.20}{2016/12/17}{Parallel versions of aux files for print/HTML.}
% \changes{v0.20}{2017/01/03}{Moved sidebar and example code to test suite.}
% \changes{v0.20}{2017/01/25}{\pkg{caption} and \pkg{subcaption} supported.}
+% \changes{v0.21}{2017/02/23}{\ 2017/02/23}
@@ -843,12 +846,12 @@ convert and store them in individual \acro{SVG} files.
%
% \begin{abstract}
% \noindent
-% The \pkg{lwarp} package causes \LaTeX\ to directly produce \htmlfive\ output,
+% The \pkg{lwarp} package allows \LaTeX\ to directly produce \htmlfive\ output,
% using external utility programs only for the final conversion of text and images.
% Math may be represented by \acro{SVG} files or MathJax.
%
% Documents may be produced by \LaTeX, \LuaLaTeX, or \XeLaTeX.
-% A TexLua script removes the need for system utilities such as |make| and |gawk|,
+% A |texlua| script removes the need for system utilities such as |make| and |gawk|,
% and also supports |xindy| and |latexmk|. Configuration is automatic at the
% first manual compile.
%
@@ -864,24 +867,38 @@ convert and store them in individual \acro{SVG} files.
% of the package.
%
%
-% \vfill
+% \bigskip
%
% \begin{center}
% \textcolor{blue}{To update existing projects, see \cref{sec:updates},
% \nameref{sec:updates}.}
+% \end{center}
%
-% \vfill
+% \bigskip
%
-% \begin{minipage}{\linewidth}
-% \raggedright
+% \noindent
% \textcolor{red!30!black}{\bfseries
% Note that this is still a ``beta'' version of \pkg{lwarp},
% and some things may change in response to user feedback and
% further project development.
% }
-% \end{minipage}
%
-% \end{center}
+% \bigskip
+%
+% \footnotesize
+% \begin{description}
+% \item[License:] \
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+% \end{description}
+%
+%
% \end{abstract}
%
% \vspace*{\fill}
@@ -912,6 +929,21 @@ convert and store them in individual \acro{SVG} files.
% For a detailed list of changes, see the Change History on page \pageref{sec:changehistory}.
%
% \begin{description}
+% \item[v0.21:] \
+% \begin{itemize}
+% \item Documentation for installing on Windows has been updated and improved.
+% \item For Windows compatibility, the |lateximages| shell script
+% has been replaced with a |lateximages.txt| file, which is parsed
+% by |lwarpmk| to generate lateximages.
+% This does not require any changes in the user's code.
+% \item Windows |lwarpmk again| now functions.
+% \item For improved error handling, \pkg{lwarp} now verifies the
+% order in which packages are loaded, and signals an error for misplaced packages.
+% \pkg{inputenc}, \pkg{fontenc}, \pkg{newunicode}, and \pkg{fontspec}
+% must be loaded before \pkg{lwarp}, and the other packages which
+% \pkg{lwarp} knows about must be loaded after.
+% \item \pkg{lwarp} no longer requires a \cs{title} be assigned.
+% \end{itemize}
% \item[v0.20:] \
% \begin{itemize}
% \item The |makefile| and related infrastructure
@@ -1253,6 +1285,19 @@ convert and store them in individual \acro{SVG} files.
% a good choice. For new projects with a large number of documents, it may be worth
% investigating the alternatives before decided which path to take.
%
+% \subsection{Internet class}
+%
+% \changes{v0.21}{2017/02/15}{Docs: Added \protect\texttt{internet} class.}
+%
+% The closest to \pkg{lwarp} in design principle is the
+% \DescribeClass{internet}
+% \verb+internet+ class by Andrew Stacey
+% (\url{https://github.com/loopspace/latex-to-internet}),
+% an interesting project which directly produces several versions
+% of markdown, and also \acro{HTML}\ and \acro{EPUB}.
+%
+%
+%
% \subsection{TeX4ht}
%
% \url{http://tug.org/tex4ht/}\DescribeProgram{TeX4ht}
@@ -1266,21 +1311,29 @@ convert and store them in individual \acro{SVG} files.
%
% \subsection{Translators}
%
-% These systems use external programs to translate a subset of \LaTeX{} syntax into \acro{HTML}:
+% \changes{v0.21}{2017/02/14}{Docs: Added TeX2page, GladTeX.}
+%
+% These systems use external programs to translate a subset of \LaTeX{} syntax into \acro{HTML}.
+% Search for each on CTAN (\url{http:\\ctan.org}).
% \begin{description}
% \item [H\textsuperscript{E}v\textsuperscript{E}a:] \url{http://hevea.inria.fr/}
-% \DescribeProgram{Hevea}
+% \DescribeProgram{Hevea} {\footnotesize(not on CTAN)}
% \item [T\textsubscript{T}H:] \url{http://hutchinson.belmont.ma.us/tth/}
% \DescribeProgram{TtH}
% \item [GELLMU:] \url{http://www.albany.edu/~hammond/gellmu/}
% \DescribeProgram{GELLMU}
-% \item [LaTeXML:] \url{http://dlmf.nist.gov/LaTeXML/}
+% \item [\LaTeX{}ML:] \url{http://dlmf.nist.gov/LaTeXML/}
% \DescribeProgram{LaTeXML}
-% \item [Plastex:] \url{https://github.com/tiarno/plastex}
+% \item [PlasTeX:] \url{https://github.com/tiarno/plastex}
% \DescribeProgram{Plastex}
-% \item [LaTeX2html:] \url{http://www.latex2html.org/} \\
+% \item [\LaTeX2HTML:] \url{http://www.latex2html.org/}
+% \DescribeProgram{LaTeX2HTML} \\
% and \url{http://ctan.org/pkg/latex2html}.
-% \DescribeProgram{LaTeX2html}
+% \item [\TeX2page:] \url{http://ds26gte.github.io/tex2page/index.html} \DescribeProgram{TeX2page}
+% \end{description}
+% Finally, Glad\TeX\ may used to directly insert \LaTeX\ math into \acro{HTML}:
+% \begin{description}
+% \item [Glad\TeX:] \url{http://humenda.github.io/GladTeX/} \DescribeProgram{GladTeX}
% \end{description}
%
% \subsection{AsciiDoc}
@@ -1384,10 +1437,8 @@ convert and store them in individual \acro{SVG} files.
% \index{utility>programs}
% \index{programs>utility}
%
-% \vfill
-%
-% \begin{minipage}{\linewidth}
-% \captionof{table}{Required software programs\label{tab:utility}}
+% \begin{table}
+% \caption{Required software programs\label{tab:utility}}
% \hrule
% \begin{description}
%
@@ -1428,10 +1479,16 @@ convert and store them in individual \acro{SVG} files.
%
% \end{description}
%
-% \item[Extra packages provided with your operating sytem:] \
+% \item[Poppler PDF utilities:] \
+%
+% These might be provided by your operating-system package manager.
%
% From Poppler: \url{poppler.freedesktop.org}.
%
+% For Windows, also see: \\
+% \url{https://sourceforge.net/projects/poppler-win32/} \quad and: \\
+% \url{http://blog.alivate.com.au/poppler-windows/}
+%
% \begin{description}
%
% \item[pdftotext:] Used to convert \acro{PDF} to text.
@@ -1445,6 +1502,13 @@ convert and store them in individual \acro{SVG} files.
%
% \end{description}
%
+% \item[Perl:] \
+%
+% This may be provided by your operating-system package manager, and is
+% required for some of the Poppler \acro{PDF} utilities.
+%
+% \url{perl.org}, \url{strawberryperl.com}
+%
% \item[Automatically downloaded from the internet as required:] \
% \begin{description}
%
@@ -1457,7 +1521,7 @@ convert and store them in individual \acro{SVG} files.
% \end{description}
%
% \hrule
-% \end{minipage}
+% \end{table}
%
% \subsection{Installing the \protect\pkg{lwarp} package}
%
@@ -1468,8 +1532,9 @@ convert and store them in individual \acro{SVG} files.
% \raggedright
%
% \item [Pre-installed:] Try entering into a command line:
-% \userentry{lwarpmk} \\
-% If the |lwarpmk| help message appears, then \pkg{lwarp} is already installed.
+% \userentry{kpsewhich lwarp.sty}
+%
+% If a path to |lwarp.sty| is shown, then \pkg{lwarp} is already installed.
%
% \item [\TeX\ Live:]If using a \TeX\ Live distribution,
% try installing via |tlmgr|:
@@ -1499,6 +1564,9 @@ convert and store them in individual \acro{SVG} files.
% \item Renew the cache:
% \userentry{mktexlsr} \quad —\,or\,—
% \userentry{texhash}
+%
+% Or, for Windows MiK\TeX, start the program called |MiKTeX Settings (Admin)|
+% and click on the button called \textsf{Refresh FNDB}.
% \end{enumerate}
%
% \item[CTAN \texttt{.dtx} and \texttt{.ins} files:] Another form of \TeX\ package
@@ -1521,6 +1589,10 @@ convert and store them in individual \acro{SVG} files.
% \item Renew the cache:
% \userentry{mktexlsr} \quad —\,or\,—
% \userentry{texhash}
+%
+% Or, for Windows MiK\TeX, start the program called |MiKTeX Settings (Admin)|
+% and click on the button called \textsf{Refresh FNDB}.
+%
% \item See \cref{sec:locallwarpmk} to generate your local copy of |lwarpmk|.
% \item Once the local version of |lwarpmk.lua| is installed, it may be made
% available system-wide as per \cref{sec:installlwarpmk}.
@@ -1538,23 +1610,33 @@ convert and store them in individual \acro{SVG} files.
% \subsection{Installing the \protect\texttt{lwarpmk} utility}
% \label{sec:installlwarpmk}
%
+% \changes{v0.21}{2017/02/22}{Docs: Installing on Windows.}
+%
% {\small
-% (Note: It is possible to use a local copy of |lwarpmk| instead of
-% installing it system-wide.
+% (Note: If |lwarpmk| is not already installed,
+% it is easiest to use a local copy instead of installing it system-wide.
% See \cref{sec:locallwarpmk}.)
% }
%
% After the \pkg{lwarp} package is installed,
% you may need to setup the |lwarpmk| utility:
% \begin{enumerate}
-% \item At a command line, try executing |lwarpmk|. If the help message
+% \item At a command line, try executing |lwarpmk|. If the |lwarpmk| help message
% appears, then |lwarpmk| is already set up.
+% If not, it is easiest to generate and use a local copy.
+% See \cref{sec:locallwarpmk}.
+%
+% Otherwise, continue with the following:
+%
% \item Locate the file |lwarpmk.lua|, which should be in the |scripts| directory
-% of the TDS tree. On a \TeX\ Live system you may use \userentry{kpsewhich lwarpmk.lua}
+% of the TDS tree. On a \TeX\ Live or MiK\TeX\ system you may use
+% \userentry{kpsewhich lwarpmk.lua}
+%
+% (If the file is not found, you may also generate a local copy and use it instead.
+% See \cref{sec:locallwarpmk}.)
+%
% \item Create |lwarpmk|:
% \begin{description}
-% \item [The easy way:] Copy |lwarpmk.lua| to wherever |pdflatex| is located.
-% For Unix, rename |lwarpmk.lua| to |lwarpmk| and make it executable.
% \item [Unix:] Create a symbolic link and make it executable:
% \begin{enumerate}
% \item Locate the \TeX\ Live binaries:
@@ -1577,14 +1659,20 @@ convert and store them in individual \acro{SVG} files.
% \item Locate the \TeX\ Live binaries as shown above for Unix.
% \item In the binaries directory, make a \emph{copy} of |runscript.exe|
% and call it |lwarpmk.exe|
+% This will call the copy of |lwarpmk.lua|
+% which is in the |scripts| directory of the distribution.
% \end{enumerate}
-% \item [Windows MiK\TeX:] Copy |lwarpmk.lua| to a folder in the executable |PATH|:
+% \item [Windows MiK\TeX:] Create a new |lwarpmk.bat| file:
% \begin{enumerate}
% \item Locate the binaries. These will be in a directory such as: \\
-% \hspace*{2em}|C:\Program Files\MiKTeX 2.9\miktex\bin| \\
+% \hspace*{2em}|C:\Program Files\MiKTeX 2.9\miktex\bin\x64| \\
% In this directory you will find programs
-% such as |pdflatex| and |makeindex|.
-% \item Copy |lwarpmk.lua| to this directory.
+% such as |pdflatex.exe| and |makeindex.exe|.
+% \item Create a new file named |lwarpmk.bat| containing: \\
+% \hspace*{1em}
+% |texlua "C:\Program Files\MiKTeX 2.9\scripts\lwarp\lwarp.texlua" %*| \\
+% This will call the copy of |lwarpmk.lua|
+% which is in the |scripts| directory of the distribution.
% \end{enumerate}
% \end{description}
% \end{enumerate}
@@ -1603,37 +1691,88 @@ convert and store them in individual \acro{SVG} files.
% \item[Unix:] \
% \begin{enumerate}
% \item Make |lwarpmk.lua| executable: \userentry{chmod 0755 lwarpmk.lua}
-% \item Compile documents with \\
-% \hspace*{2em} |./lwarpmk.lua html| \\
-% \hspace*{2em} |./lwarpmk.lua print| \quad etc.
+% \item Compile documents with
+% \userentry{./lwarpmk.lua html}
+% \userentry{./lwarpmk.lua print} \quad etc.
% \item It may be useful to rename or link to a version without the |.lua| suffix.
% \end{enumerate}
% \item[Windows:] \
%
-% Compile documents with \\
-% \hspace*{2em} |lwarpmk html| \\
-% \hspace*{2em} |lwarpmk print| \quad etc.
+% Compile documents with either of the following, depending
+% on which command shell is being used:
+% \userentry{texlua lwarpmk.lua html}
+% \userentry{texlua lwarpmk.lua print} \quad etc.
+%
+% Or:
+%
+% \userentry{lwarpmk html}
+% \userentry{lwarpmk print} \quad etc.
% \end{description}
% \end{enumerate}
%
%
% \subsection{Installing additional utilities}
%
-% The \TeX\ utilities |latexmk| and |pdfcrop| may require
+% The \TeX\ utilities |latexmk| and |pdfcrop| may be provided by
% the installation of additional \TeX-relatex operating-system packages.
%
-% The tools from the \textsc{Poppler} project should be provided by your
+% The tools from the \textsc{Poppler} project may also be provided by your
% operating system's package-installation tools.
+% For Windows, see \cref{tab:utility} on \cpageref{tab:utility}.
+%
+% Perl may require installation as well. See \cref{tab:utility}.
%
-% To test for the existence of the additional utilities, try:
+% \begin{description}
+% \item [To test for the existence of the additional utilities:]
+% Enter the following in a command line:
% \userentry{luatex --version}
% \userentry{xindy --version}
% \userentry{latexmk --version}
+% \userentry{perl --version}
% \userentry{pdfcrop --version}
% \userentry{pdftotext -v}
% \userentry{pdfseparate --version}
% \userentry{pdftocairo -v}
+% \end{description}
%
+% Any utilities installed by hand must be added to the |PATH|.
+%
+% \DescribeProgram[requirement]{pdftotext}\index{Poppler}
+% \DescribeProgram[requirement]{pdfseparate}
+% \DescribeProgram[requirement]{pdftocairo}
+% \begin{description}
+% \item [To add the Poppler utilities to a Windows machine:] \
+% \begin{enumerate}
+% \item Download and extract the Poppler utilities |pdftotext|, |pdfseparate|,
+% and |pdftocairo| to a directory, such as |Poppler|.
+% \item In the Start window, type "Path" to search for results
+% related to Path. Or, open the control panel and search for "Path".
+% \item Choose "Edit the system environment variables" in the control panel.
+% \item Choose the "Environment Variables" button.
+% \item Choose the "Path" variable, then the "Edit" button.
+% \item Choose the "New" button to make an additional entry.
+% \item Enter the |bin| directory of the Poppler utilities, such as: \\
+% \hspace*{2em}|C:\Users\<myname>\Desktop\Poppler\poppler-0.5_x86\poppler-0.5\bin|
+%
+% Be sure to include |\bin|.
+% \item Click "Ok" when done.
+% \end{enumerate}
+% \end{description}
+%
+% \DescribeProgram[requirement]{perl}\index{Perl}
+% \begin{description}
+% \item [To add Perl to a Windows machine:] \
+% \begin{enumerate}
+% \item Download and install a version of Perl, such as Straweberry Perl,
+% to a directory without a space in its name, such as |C:\Strawberry|.
+% \item Edit the Path as seen above for the Poppler utilities.
+% \item Enter the |bin| directory of the Perl utility, such as: \\
+% \hspace*{2em}|C:\Strawberry\perl\bin|
+%
+% Be sure to include |\bin|.
+% \item Click "Ok" when done.
+% \end{enumerate}
+% \end{description}
%
%
%
@@ -1647,13 +1786,39 @@ convert and store them in individual \acro{SVG} files.
%
% \subsection{Starting a new project}
%
+% \changes{v0.21}{2017/02/23}{File \texttt{lwarp\_tutorial.txt} added.}
+%
% \begin{enumerate}
%
% \item Create a new project directory called |tutorial|.
%
% \item Inside the |tutorial| directory,
-% create a new file called |tutorial.tex|, as seen in \cref{fig:tutorial}.
-% This may be copied/pasted from this documentation directly into your own editor.
+% \DescribeFile{tutorial.tex}
+% create a new file called |tutorial.tex|.
+% This may be done several ways:
+% \begin{description}
+% \item [Copy from the documentation PDF:] \
+%
+% A listing is in \cref{fig:tutorial},
+% which may be copied/pasted from the figure directly into your own editor,
+% depending on the quality of the \acro{PDF} viewer and editor, or:
+%
+% \item [Copy from the \pkg{lwarp} documentation directory:] \
+%
+% 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!]
+%
+% This should be in the |doc/latex/lwarp/| directory along
+% with this \acro{PDF} documentation.
+% Copy |lwarp_tutorial.txt| directly into your |tutorial| directory,
+% renamed as |tutorial.tex|.
+% \end{description}
+%
+% \emph{When using Windows, use an editor other than Notepad,
+% \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}
% \quad (several times)
@@ -1687,11 +1852,16 @@ convert and store them in individual \acro{SVG} files.
% \textcolor{red}{Note: There are two pages!}
% \end{center}
%
-% \begin{verbatim}
-% \documentclass{book}
+% \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
@@ -1705,16 +1875,16 @@ convert and store them in individual \acro{SVG} files.
% % \newcommand{\HomeHTMLFilename}{index} % Filename of the homepage.
% % \newcommand{\HTMLFileName}{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{makeidx} \makeindex
% \usepackage{xcolor}
-%
+%
% \usepackage{hyperref,cleveref} % LOAD THESE LAST!
%
% % --- LATEX AND HTML CUSTOMIZATION ---
@@ -1729,32 +1899,40 @@ convert and store them in individual \acro{SVG} files.
% \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}
+% \end{Verbatim}
% \endgroup
%
%
@@ -2862,9 +3040,9 @@ convert and store them in individual \acro{SVG} files.
% \limitscaption
%
%
-% \subsubsection{\pkg{subfig} package}
+% ^^A \subsubsection{\pkg{subfig} package}
%
-% \limitssubfig
+% ^^A \limitssubfig
%
%
% \subsubsection{\pkg{floatrow} package}
@@ -2873,35 +3051,36 @@ convert and store them in individual \acro{SVG} files.
%
%
% \subsubsection{\pkg{siunitx} package}
-% \DescribePackage{siunitx}
%
+% \DescribePackage{siunitx}
% \limitssiunitx
%
%
% \subsubsection{\pkg{newclude} package}
-% \DescribePackage{newclude}
+%
% \changes{v0.14}{2016/03/29}{Docs: Newclude limitations.}
%
+% \DescribePackage{newclude}
% \limitsnewclude
%
%
% \subsubsection{\pkg{newtxmath} package}
-% \DescribePackage{newtxmath}
%
+% \DescribePackage{newtxmath}
% \limitsnewtxmath
%
%
% \subsubsection{\pkg{babel} package}
-% \DescribePackage{babel}
%
+% \DescribePackage{babel}
% \limitsbabelone
%
% \limitsbabeltwo
%
%
% \subsubsection{\pkg{enumitem} package}
-% \DescribePackage{enumitem}
%
+% \DescribePackage{enumitem}
% \limitsenumitem
%
%
@@ -3257,8 +3436,11 @@ convert and store them in individual \acro{SVG} files.
% If using |pdflatex|, convert a minimal set of Unicode characters.
% Additional characters may be defined by the user, as needed.
%
-% If using and of |pdflatex|, |xelatex|, or |lualatex|, \cs{texttimes} is
-% declared for a common multiply symbol.
+% A commonly-used multiply symbol is declared to be \cs{texttimes}.
+%
+% The first arguments of \cs{newunicodechar} below are text ligatures in
+% the source code, even though they are not printed in the following
+% listing.
% \begin{macrocode}
\RequirePackage{newunicodechar}
@@ -3266,7 +3448,7 @@ convert and store them in individual \acro{SVG} files.
\newunicodechar{⨯}{\texttimes}
\ifPDFTeX
-\newunicodechar{ff}{ff}
+\newunicodechar{ff}{ff}% the first arguments are ligatures
\newunicodechar{fi}{fi}
\newunicodechar{fl}{fl}
\newunicodechar{ffi}{ffi}
@@ -3274,7 +3456,7 @@ convert and store them in individual \acro{SVG} files.
\newunicodechar{—}{---}
\newunicodechar{–}{--}
% \end{macrocode}
-% In verbatim text in PDFTex, preserve upright quotes.
+% In PDF\TeX, preserve upright quotes in verbatim text:
% \begin{macrocode}
\RequirePackage{upquote}
\else
@@ -3479,6 +3661,110 @@ convert and store them in individual \acro{SVG} files.
+% \section{Misplaced packages}
+%
+% \changes{v0.21}{2017/02/22}{Add: Errors for misplaced packages.}
+
+
+% Several packages should only be loaded before \pkg{lwarp}, and
+% others should only be loaded after.
+%
+% Packages which should only be loaded before \pkg{lwarp} have their own \\
+% \hspace*{2em}|lwarp-<packagename>.sty| \\
+% which will trigger an error if they are loaded after
+% \pkg{lwarp}.
+% Examples include \pkg{fontspec}, \pkg{inputenc}, \pkg{fontenc},
+% and \pkg{newunicodechar}.
+%
+%
+
+% \begin{macro}{\LWR@noloadbefore} \marg{packagename} \quad
+% Error if loaded before \pkg{lwarp}.
+%
+% \begin{macrocode}
+\newcommand*{\LWR@noloadbefore}[1]{%
+\@ifpackageloaded{#1}
+{
+\PackageError{lwarp}
+{Package #1, or one which uses #1, must be loaded after lwarp}
+{Move \detokenize{\usepackage}{#1} after \detokenize{\usepackage}{lwarp}.
+Package #1 may also be loaded by something else, which must also be moved
+after lwarp.}
+}
+{}
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR@noloadafter} \marg{packagename} \quad
+% Error if loaded after \pkg{lwarp}.
+%
+% \begin{macrocode}
+\newcommand*{\LWR@noloadafter}[1]{%
+\PackageError{lwarp}
+{Package #1 must be loaded before lwarp}
+{Move \detokenize{\usepackage}{#1} before \detokenize{\usepackage}{lwarp}.}
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% Packages which should only be loaded after \pkg{lwarp} are tested
+% here to trip an error of they have already been loaded.
+%
+% The following packages must be loaded after \pkg{lwarp}:
+% \begin{macrocode}
+\LWR@noloadbefore{afterpage}
+\LWR@noloadbefore{algorithmicx}
+\LWR@noloadbefore{alltt}
+\LWR@noloadbefore{bookmark}
+\LWR@noloadbefore{booktabs}
+\LWR@noloadbefore{draftwatermark}
+\LWR@noloadbefore{epigraph}
+\LWR@noloadbefore{eso-pic}
+\LWR@noloadbefore{everypage}
+\LWR@noloadbefore{extramarks}
+\LWR@noloadbefore{fancyhdr}
+\LWR@noloadbefore{floatrow}
+\LWR@noloadbefore{float}
+\LWR@noloadbefore{geometry}
+\LWR@noloadbefore{graphics}
+\LWR@noloadbefore{graphicx}
+\LWR@noloadbefore{hyperref}
+\LWR@noloadbefore{keyfloat}
+\LWR@noloadbefore{letterspace}
+\LWR@noloadbefore{listings}
+\LWR@noloadbefore{longtable}
+\LWR@noloadbefore{ltcaption}
+\LWR@noloadbefore{mdframed}
+\LWR@noloadbefore{microtype}
+%\LWR@noloadbefore{multicol}% loaded by ltxdoc
+\LWR@noloadbefore{multirow}
+\LWR@noloadbefore{needspace}
+\LWR@noloadbefore{nowidow}
+\LWR@noloadbefore{pagenote}
+\LWR@noloadbefore{placeins}
+\LWR@noloadbefore{ragged2e}
+\LWR@noloadbefore{rotating}
+\LWR@noloadbefore{setspace}
+\LWR@noloadbefore{textpos}
+\LWR@noloadbefore{threeparttable}
+\LWR@noloadbefore{titleps}
+\LWR@noloadbefore{titlesec}
+\LWR@noloadbefore{titletoc}
+\LWR@noloadbefore{tocloft}
+\LWR@noloadbefore{trivfloat}
+\LWR@noloadbefore{wallpaper}
+\LWR@noloadbefore{wrapfig}
+\LWR@noloadbefore{xcolor}
+\LWR@noloadbefore{xfrac}
+% \end{macrocode}
+
+
+
+
+
% \section{Required packages}
% \label{sec:requiredpackages}
% \index{packages>required}
@@ -3604,12 +3890,12 @@ convert and store them in individual \acro{SVG} files.
% ^^A % \end{macrocode}
% ^^A
+% \pdflatexonly
+%
% \DescribePackage{microtype}
% \changes{v0.18}{2016/05/18}{Microtype disabled during HTML generation}
%
-% \pdflatexonly
-%
% Older browsers don't
% \index{ligatures}
% display ligatures.
@@ -4304,35 +4590,9 @@ top=1in,bottom=1in,%
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\OSmkdir}
-% The make-directory command.
-% \begin{macrocode}
-\newcommand*{\OSmkdir}{mkdir } % trailing space is required
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\OSrm}
-% The remove-file command.
-% \begin{macrocode}
-\newcommand*{\OSrm}{rm }
-% \end{macrocode}
-% \end{macro}
-
-% \begin{macro}{\OSmv}
-% The move-file command.
-% \begin{macrocode}
-\newcommand*{\OSmv}{mv }
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\OSShellPath}
-% Path to the command-line shell.
-% \begin{macrocode}
-\newcommand*{\OSShellPath}{/bin/sh}
-% \end{macrocode}
-% \end{macro}
-
% \subsection{MS-Windows}
@@ -4350,9 +4610,6 @@ top=1in,bottom=1in,%
{
\booltrue{usingOSwindows}
\renewcommand*{\OSPathSymbol}{\@backslashchar}
-\renewcommand*{\OSmkdir}{MD }
-\renewcommand*{\OSrm}{DEL }
-\renewcommand*{\OSmv}{MOVE }
}
% \end{macrocode}
% Test for windows during compile. The user may also specify
@@ -5985,9 +6242,14 @@ top=1in,bottom=1in,%
% \end{macrocode}
% \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}%
}
+% \end{macrocode}
% \end{macro}
%
@@ -6176,6 +6438,7 @@ top=1in,bottom=1in,%
% \begin{macro}{\LWR@newhtmlfile} \marg{section name}
% \changes{v0.18}{2016/04/23}{Sidetoc after title, improving responsive design.}
+% \changes{v0.21}{2017/02/22}{Skip title if not given.}
%
% Finishes the current \acro{HTML} page with footnotes, footer, navigation,
% then starts a new \acro{HTML} page with an \acro{HTML} comment telling where to
@@ -6235,7 +6498,6 @@ top=1in,bottom=1in,%
}
% \end{macrocode}
-
% At the top of the starting file:
% \begin{macrocode}
\LWR@stoppars
@@ -6250,7 +6512,7 @@ top=1in,bottom=1in,%
\LWR@htmlelementend{header}
-\LWR@printthetitle
+\ifcsvoid{thetitle}{}{\LWR@printthetitle}
\LWR@sidetoc
@@ -6731,10 +6993,13 @@ top=1in,bottom=1in,%
% \end{macrocode}
% \end{macro}
+
% \begin{macro}{\LWR@filestart} \marg{title\_suffix}
+
% Creates the opening \acro{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.}
%
% \begin{macrocode}
\newcommand*{\LWR@filestart}[1]{
@@ -6801,13 +7066,15 @@ content="width=device-width, initial-scale=1.0" /}%
% \begin{macrocode}
\LWR@htmltag{!{-}{-}[if lt IE 9]}\LWR@orignewline
\LWR@htmltag{%
-script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"{}}
+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}
-\LWR@htmltag{title}\thetitle#1\LWR@htmltag{/title}\LWR@orignewline
+\ifcsvoid{thetitle}{}{%
+\LWR@htmltag{title}\thetitle#1\LWR@htmltag{/title}\LWR@orignewline%
+}%
% \end{macrocode}
% The page's stylesheet:
% \begin{macrocode}
@@ -6860,6 +7127,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \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.}
% Executed at the beginning of the entire document.
% \begin{macrocode}
\newcommand*{\LWR@LwarpStart}
@@ -6895,22 +7163,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\setlength{\parskip}{2ex}
% \end{macrocode}
%
-% For the |lateximages| command file:
-%
+% For the |lateximages| record file:
% \begin{macrocode}
-\ifbool{usingOSwindows}
-{% Windows:
-\immediate\openout\LWR@file=lateximages.cmd
-}
-{% Unix:
-\immediate\openout\LWR@file=lateximages.sh
-\immediate\write\LWR@file{\LWR@hashmark!\OSShellPath}
-}
-% \end{macrocode}
-% The first action of the command file is to create the
-% |lateximages| directory:
-% \begin{macrocode}
-\immediate\write\LWR@file{\OSmkdir lateximages\OSPathSymbol}
+\immediate\openout\LWR@file=lateximages.txt
% \end{macrocode}
%
% Removes space after the caption in the \acro{HTML}:
@@ -8331,37 +8586,37 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% Original code is from the \pkg{fancyvrb} package.
% \begin{macrocode}
\newcommand*{\LWR@fvstartnone}{%
-% \typeout{fvstartnone}%
+\LWR@traceinfo{fvstartnone}%
\ifbool{LWR@verbtags}{\hbox to\z@{\LWR@htmltagc{div class="\LWR@Verbatimclass"}}}{}%
\hbox to\z@{\LWR@atbeginverbatim{verbatim}}%
}
\newcommand*{\LWR@fvendnone}{%
-% \typeout{fvendnone}%
+\LWR@traceinfo{fvendnone}%
\hbox to\z@{\LWR@afterendverbatim}%
\ifbool{LWR@verbtags}{\hbox to\z@{\LWR@htmltagc{/div}}}{}%
}
\newcommand*{\LWR@fvstartsingle}{%
-% \typeout{fvstartsingle}%
+\LWR@traceinfo{fvstartsingle}%
\LWR@fvstartnone%
\FV@BeginListFrame@Single%
}
\newcommand*{\LWR@fvendsingle}{%
-% \typeout{fvendsingle}%
+\LWR@traceinfo{fvendsingle}%
\FV@EndListFrame@Single%
\LWR@fvendnone%
}
\newcommand*{\LWR@fvstartline}{%
-% \typeout{fvstartline}%
+\LWR@traceinfo{fvstartline}%
\LWR@fvstartnone%
\FV@BeginListFrame@Lines%
}
\newcommand*{\LWR@fvendline}{%
-% \typeout{fvendline}%
+\LWR@traceinfo{fvendline}%
\FV@EndListFrame@Lines%
\LWR@fvendnone%
}
@@ -9523,7 +9778,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{macro}{\LWR@docmidrule} \oarg{width} \marg{trim} \marg{leftcolumn-rightcolumn}
%
-% Marks |LWR@midrules}| array elements to be ``Y'' from left to right columns.
+% Marks |LWR@midrules| array elements to be ``Y'' from left to right columns.
%
% \begin{macrocode}
\NewDocumentCommand{\LWR@docmidrule}{o d() >{\SplitArgument{1}{-}}m}%
@@ -10437,19 +10692,19 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@startref}[1]
{%
\edef\LWR@lidref{\LWR@lateximagedepthref{#1}}
-% \typeout{***LWR@startref A: !#1!}%
+\LWR@traceinfo{***LWR@startref A: !#1!}%
% \end{macrocode}
% Create the tag:
% \begin{macrocode}
\LWR@htmltag{a href="%
-% \typeout{***LWR@startref B}%
+\LWR@traceinfo{***LWR@startref B}%
\LWR@htmlrefsectionfilename{#1}%
-% \typeout{***LWR@startref C}%
+\LWR@traceinfo{***LWR@startref C}%
\#%
% \end{macrocode}
% See if |LWR@lateximagedepth| is unknown:
% \begin{macrocode}
-% \typeout{***LWR@startref D: !#1!}%
+\LWR@traceinfo{***LWR@startref D: !#1!}%
\ifthenelse{\equal{\LWR@lidref}{??}}%
% \end{macrocode}
% ``|??|'' if |LWR@lateximagedepth| is unknown:
@@ -10459,24 +10714,24 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% If |LWR@lateximagedepth| is known:
% \begin{macrocode}
{%
-% \typeout{***LWR@startref D1}%
-% \typeout{***depthref is \LWR@lidref}%
+\LWR@traceinfo{***LWR@startref D1}%
+\LWR@traceinfo{***depthref is \LWR@lidref}%
\ifthenelse{\cnttest{\LWR@lidref}{>}{0}}%
{%
-% \typeout{***LWR@startref D2}%
+\LWR@traceinfo{***LWR@startref D2}%
lateximage\LWR@lateximagenumberref{#1}%
}%
{%
-% \typeout{***LWR@startref D3}%
+\LWR@traceinfo{***LWR@startref D3}%
#1%
}%
}%
-% \typeout{***LWR@startref E}%
+\LWR@traceinfo{***LWR@startref E}%
% \end{macrocode}
% closing quote:
% \begin{macrocode}
"{}}%
-% \typeout{***LWR@startref F}%
+\LWR@traceinfo{***LWR@startref F}%
}
% \end{macrocode}
% \end{macro}
@@ -12222,7 +12477,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% A |\lateximage| is typeset on its own \acro{PDF} page inside an \acro{HTML} comment starting on the preceeding page
% and ending on following page, and instructions are written to
-% |lateximage.sh| or |lateximages.cmd| to extract the |\lateximage| from the page of the \acro{PDF} file
+% |lateximage.txt| for |lwarpmk| to extract the |\lateximage| from the page of the \acro{PDF} file
% then generate an accompanying |.svg| file image file. Meanwhile, instructions to
% show this image are placed into the \acro{HTML} file after the comment.
%
@@ -12265,7 +12520,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \end{macrocode}
% Declare the |\LWR@file| for writing
-% to generate file |lateximages.sh| or |lateximages.cmd|:
+% to generate file |lateximages.txt|:
% \begin{macrocode}
\ifcsdef{LWR@file}{}{\newwrite{\LWR@file}}
% \end{macrocode}
@@ -12299,7 +12554,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
%
% \emph{Do not include the leading backslash in the name.}
% \begin{macrocode}
-\newcommand*{\LateximageFontSizeName}{normalsize}
+\newcommand*{\LateximageFontSizeName}{large}
% \end{macrocode}
% \end{macro}
@@ -12413,25 +12668,9 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@htmltag{span id="lateximage\arabic{LWR@lateximagenumber}" %
class="lateximagesource"{}} \LWR@orignewline
% \end{macrocode}
-% Write instructions to the lateximage.sh file:
+% Write instructions to the |lateximages.txt| file:
% \begin{macrocode}
-\immediate\write\LWR@file{%
- pdfseparate -f \theLWR@nextpage \space -l %
- \theLWR@nextpage \space %
- \jobname.pdf lateximagetemp-\LWR@percent d.pdf}%
-% keep the space before 'd.pdf'
-\immediate\write\LWR@file{%
- pdfcrop --hires lateximagetemp-\theLWR@nextpage.pdf
- lateximage-\theLWR@externalfilecnt.pdf}%
-\immediate\write\LWR@file{%
- pdftocairo -svg lateximage-\theLWR@externalfilecnt.pdf
- lateximage-\theLWR@externalfilecnt.svg}%
-\immediate\write\LWR@file{%
- \OSmv lateximage-\theLWR@externalfilecnt.svg %
- lateximages\OSPathSymbol}%
-\immediate\write\LWR@file{%
- \OSrm lateximage-\theLWR@externalfilecnt.pdf
- lateximagetemp-\theLWR@nextpage.pdf}%
+\immediate\write\LWR@file{|\theLWR@nextpage|\theLWR@externalfilecnt|}%
% \end{macrocode}
% Place an open comment tag at the bottom of page; footnotes will be above this tag.
% This will hide any traces of the lateximage \acro{PDF} page which were picked up by
@@ -16578,6 +16817,11 @@ MathJax.Hub.Config({
% \DescribeFile{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.}
+%
+%
% \begin{macrocode}
\begin{VerbatimOut}{lwarpmk.lua}
#!/usr/bin/env texlua
@@ -16586,7 +16830,7 @@ MathJax.Hub.Config({
-- Print the usage of the lwarpmk command:
-printversion = "v0.20"
+printversion = "v0.21"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -16633,6 +16877,7 @@ Values must be in "quotes".
]] ) ;
end
+
-- Split one large sourcefile into a number of files,
-- starting with destfile.
-- The file is split at each occurance of <!--|Start file|newfilename|*
@@ -16722,18 +16967,28 @@ end -- file exists
-- Select some operating-system commands:
if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
rmname = "rm"
-touchname = "touch"
-chmodcmd = "chmod u+x lateximages.sh"
-lateximagesname = "./lateximages.sh"
+mvname = "mv"
+touchnamepre = "touch"
+touchnamepost = ""
+dirslash = "/"
+opquote= "\'"
elseif opsystem=="Windows" then -- For Windows
rmname = "DEL"
-touchname = "TOUCH"
-chmodcmd = ""
-lateximagesname = "lateximages.cmd"
+mvname = "MOVE"
+touchnamepre = "COPY /b"
+touchnamepost = "+,,"
+dirslash = "\\"
+opquote= "\""
else print ( "lwarpmk: Select Unix or Windows for opsystem" )
end --- for Windows
end -- loadconf
+
+function refreshdate ()
+os.execute(touchnamepre .. " " .. sourcename .. ".tex " .. touchnamepost)
+end
+
+
-- Scan the LaTeX log file for the phrase "Rerun to get",
-- indicating that the file should be compiled again.
-- Return true if found.
@@ -16803,6 +17058,48 @@ function removeaux ()
)
end
+
+
+-- Create lateximages based on lateximages.txt:
+function createlateximages ()
+print ("lwarpmk: Creating lateximages.")
+io.input("lateximages.txt")
+-- Create the lateximages directory, ignore error if alreadt exists
+err = os.execute("mkdir lateximages")
+-- Scan lateximages.txt
+for line in io.lines() do
+-- lwimgpage is the page number in the PDF which has the image
+-- lwimgnum is the sequential lateximage number to assign for the image
+i,j,lwimgpage,lwimgnum = string.find (line,"|(.*)|(.*)|")
+-- For each entry:
+if ( (i~=nil) ) then
+-- Separate out the image into its own single-page pdf:
+err = os.execute(
+"pdfseparate -f " .. lwimgpage .. " -l " ..
+ lwimgpage .. " " .. sourcename .."_html.pdf lateximagetemp-%d.pdf")
+-- Crop the image:
+err = os.execute(
+"pdfcrop --hires lateximagetemp-" .. lwimgpage ..".pdf lateximage-" .. lwimgnum ..".pdf")
+if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+-- Convert the image to svg:
+err = os.execute(
+"pdftocairo -svg lateximage-" .. lwimgnum ..".pdf lateximage-" .. lwimgnum ..".svg")
+if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+-- Move the result into lateximages/:
+err = os.execute(
+mvname .. " lateximage-" .. lwimgnum ..".svg lateximages" .. dirslash )
+if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+-- Remove the temporary files:
+err = os.execute(
+rmname .. " lateximage-" .. lwimgnum ..".pdf lateximagetemp-" .. lwimgpage ..".pdf")
+if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+end
+end -- do
+end -- function
+
+
+
+
-- lwarpmk --version :
if (arg[1] == "--version") then
@@ -16848,7 +17145,7 @@ loadconf ()
print ("lwarpmk: Processing the index.")
os.execute("texindy -M lwarp_html.xdy " .. sourcename .. ".idx")
print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
-os.execute(touchname .. " " .. sourcename .. ".tex")
+refreshdate ()
print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
print ("lwarpmk: Done.")
@@ -16860,8 +17157,9 @@ if ( uselatexmk == "true" ) then
-- The recorder option is required to detect changes in <project>.tex
-- while we are loading <project>_html.tex.
err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder "
- .. "-e '$makeindex = q/texindy -M lwarp_html.xdy/' "
- .. "-pdflatex=\"" .. latexname .." %O %S\" "
+ .. "-e "
+ .. opquote .. "$makeindex = q/texindy -M lwarp_html.xdy/" .. opquote
+ .. " -pdflatex=\"" .. latexname .." %O %S\" "
.. sourcename .."_html.tex" ) ;
if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
pdftohtml ()
@@ -16898,22 +17196,20 @@ loadconf ()
print ("lwarpmk: Processing the index.")
os.execute("texindy -M lwarp_html.xdy " .. sourcename .. "_html.idx")
print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
-os.execute(touchname .. " " .. sourcename .. ".tex")
+refreshdate ()
print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
print ("lwarpmk: Done.")
-- lwarpmk limages:
--- Make the lateximages command file executable,
--- execute it to create the images,
+-- Scan the lateximages.txt file to create lateximages,
-- then touch the source to trigger a recompile.
elseif arg[1] == "limages" then
loadconf ()
print ("lwarpmk: Processing images.")
-os.execute(chmodcmd)
-os.execute(lateximagesname)
+createlateximages ()
print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
-os.execute(touchname .. " " .. sourcename .. ".tex") ;
+refreshdate ()
print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
print ("lwarpmk: Done.")
@@ -16923,7 +17219,7 @@ print ("lwarpmk: Done.")
elseif arg[1] == "again" then
loadconf ()
print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
-os.execute(touchname .. " " .. sourcename .. ".tex") ;
+refreshdate ()
print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
print ("lwarpmk: Done.")
@@ -17702,7 +17998,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% ^^A \begin{environment}{floatrow} \oarg{numfloats}
-% \changes{v0.20}{2016/08/20}{Fix:\cs{linewidth} in a floatrow.}
+% \changes{v0.20}{2016/08/20}{Fix: \cs{linewidth} in a floatrow.}
%
% The row of floats is placed into a |div| of class |floatrow|.
% \begin{macrocode}
@@ -17768,7 +18064,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
\LWR@traceinfo{about to newfloat #1\ \LWR@frowkeyplacement\ \LWR@frowkeyfileext\ \LWR@frowkeywithin}%
\newfloat{#1}{\LWR@frowkeyplacement}%
{\LWR@frowkeyfileext}[\LWR@frowkeywithin]%
-\typeout{*** finished newfloat #1}
+\LWR@traceinfo{*** finished newfloat #1}
}%
% \end{macrocode}
% Rename the float if a name was given:
@@ -17855,9 +18151,70 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
+% \clearpage
+%
+% \iffalse
+%<*fontenc>
+% \fi
+%
+% \part{lwarp-fontenc.sty}
+%
+% \section{Fontenc}
+%
+% \DescribePackage{fontenc}
+% Error if \pkg{fontenc} is loaded after \pkg{lwarp}.
+%
+% \changes{v0.21}{2017/02/22}{\pkg{fontenc}: Added.}
+%
+
+% Discard all options for \pkg{lwarp-fontenc}:
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{fontenc}
+% \end{macrocode}
+% \begin{macrocode}
+\LWR@noloadafter{fontenc}
+% \end{macrocode}
% \iffalse
+%</fontenc>
+% \fi
+
+
+
+
+% \iffalse
+%<*fontspec>
+% \fi
+%
+% \part{lwarp-fontspec.sty}
+%
+% \section{Fontspec}
+%
+% \DescribePackage{fontspec}
+% Error if \pkg{fontspec} is loaded after \pkg{lwarp}.
+%
+% \changes{v0.21}{2017/02/22}{\pkg{fontspec}: Added.}
+%
+
+% Discard all options for \pkg{lwarp-fontspec}:
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{fontspec}
+% \end{macrocode}
+
+% \begin{macrocode}
+\LWR@noloadafter{fontspec}
+% \end{macrocode}
+
+% \iffalse
+%</fontspec>
+% \fi
+
+
+
+% \clearpage
+%
+% \iffalse
%<*geometry>
% \fi
@@ -17879,7 +18236,8 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% \fi
-
+% \clearpage
+%
% \iffalse
%<*graphics>
% \fi
@@ -17909,10 +18267,6 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
-
-
-% \clearpage
-
% \iffalse
%<*graphicx>
% \fi
@@ -18280,6 +18634,39 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
+
+
+% \clearpage
+%
+% \iffalse
+%<*inputenc>
+% \fi
+%
+% \part{lwarp-inputenc.sty}
+%
+% \section{Inputenc}
+%
+% \DescribePackage{inputenc}
+% Error if \pkg{inputenc} is loaded after \pkg{lwarp}.
+%
+% \changes{v0.21}{2017/02/22}{\pkg{inputenc}: Added.}
+%
+
+% Discard all options for \pkg{lwarp-inputenc}:
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{inputenc}
+% \end{macrocode}
+
+% \begin{macrocode}
+\LWR@noloadafter{inputenc}
+% \end{macrocode}
+
+% \iffalse
+%</inputenc>
+% \fi
+
+
+
% \clearpage
% \iffalse
@@ -19210,28 +19597,28 @@ solid
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\DeclareMicrotypeSet[3][]{}
-\newcommand*\UseMicrotypeSet[2][]{}
-\newcommand*\DeclareMicrotypeSetDefault[2][]{}
-\newcommand*\SetProtrusion[3][]{}
-\newcommand*\SetExpansion[3][]{}
-\newcommand*\SetTracking[3][]{}
-\newcommand*\SetExtraKerning[3][]{}
-\newcommand*\SetExtraSpacing[3][]{}
-\newcommand*\DisableLigatures[2][]{}
-\newcommand*\DeclareCharacterInheritance[3][]{}
-\newcommand*\DeclareMicrotypeVariants[1]{}
-\newcommand*\DeclareMicrotypeAlias[2]{}
-\newcommand*\LoadMicrotypeFile[1]{}
-\newcommand*\DeclareMicrotypeBabelHook[2]{}
-\newcommand*\microtypesetup[1]{}
-\newcommand*\microtypecontext[1]{}
-\newcommand*\textmicrotypecontext[2]{#2}
+\renewcommand*\DeclareMicrotypeSet[3][]{}
+\renewcommand*\UseMicrotypeSet[2][]{}
+\renewcommand*\DeclareMicrotypeSetDefault[2][]{}
+\renewcommand*\SetProtrusion[3][]{}
+\renewcommand*\SetExpansion[3][]{}
+\renewcommand*\SetTracking[3][]{}
+\renewcommand*\SetExtraKerning[3][]{}
+\renewcommand*\SetExtraSpacing[3][]{}
+\renewcommand*\DisableLigatures[2][]{}
+\renewcommand*\DeclareCharacterInheritance[3][]{}
+\renewcommand*\DeclareMicrotypeVariants[1]{}
+\renewcommand*\DeclareMicrotypeAlias[2]{}
+\renewcommand*\LoadMicrotypeFile[1]{}
+\renewcommand*\DeclareMicrotypeBabelHook[2]{}
+\renewcommand*\microtypesetup[1]{}
+\renewcommand*\microtypecontext[1]{}
+\renewcommand*\textmicrotypecontext[2]{#2}
\@ifpackageloaded{letterspace}{\let\MT@textls\relax}{%
-\newcommand*\lsstyle{}
-\newcommand\textls[2][]{}
+\renewcommand*\lsstyle{}
+\renewcommand\textls[2][]{}
\def\textls#1#{}
-\newcommand*\lslig[1]{#1}
+\renewcommand*\lslig[1]{#1}
}
\def\DeclareMicrotypeSet#1#{\@gobbletwo}
\def\DeclareMicrotypeVariants#1#{\@gobble}
@@ -19391,6 +19778,36 @@ solid
+% \clearpage
+%
+% \iffalse
+%<*newunicodechar>
+% \fi
+%
+% \part{lwarp-newunicodechar.sty}
+%
+% \section{Newunicodechar}
+%
+% \DescribePackage{newunicodechar}
+% Error if \pkg{newunicodechar} is loaded after \pkg{lwarp}.
+%
+% \changes{v0.21}{2017/02/22}{\pkg{newunicodechar}: Added.}
+%
+
+% Discard all options for \pkg{lwarp-newunicodechar}:
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{newunicodechar}
+% \end{macrocode}
+
+% \begin{macrocode}
+\LWR@noloadafter{newunicodechar}
+% \end{macrocode}
+
+% \iffalse
+%</newunicodechar>
+% \fi
+
+
% \iffalse
%<*nowidow>
diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.ins b/Master/texmf-dist/source/latex/lwarp/lwarp.ins
index 0226e02107e..1075ed42657 100644
--- a/Master/texmf-dist/source/latex/lwarp/lwarp.ins
+++ b/Master/texmf-dist/source/latex/lwarp/lwarp.ins
@@ -46,10 +46,13 @@ version 2005/12/01 or later.
\generate{\file{lwarp-fancyhdr.sty}{\from{lwarp.dtx}{fancyhdr}}}
\generate{\file{lwarp-float.sty}{\from{lwarp.dtx}{float}}}
\generate{\file{lwarp-floatrow.sty}{\from{lwarp.dtx}{floatrow}}}
+\generate{\file{lwarp-fontenc.sty}{\from{lwarp.dtx}{fontenc}}}
+\generate{\file{lwarp-fontspec.sty}{\from{lwarp.dtx}{fontspec}}}
\generate{\file{lwarp-geometry.sty}{\from{lwarp.dtx}{geometry}}}
\generate{\file{lwarp-graphicx.sty}{\from{lwarp.dtx}{graphicx}}}
\generate{\file{lwarp-graphics.sty}{\from{lwarp.dtx}{graphics}}}
\generate{\file{lwarp-hyperref.sty}{\from{lwarp.dtx}{hyperref}}}
+\generate{\file{lwarp-inputenc.sty}{\from{lwarp.dtx}{inputenc}}}
\generate{\file{lwarp-keyfloat.sty}{\from{lwarp.dtx}{keyfloat}}}
\generate{\file{lwarp-letterspace.sty}{\from{lwarp.dtx}{letterspace}}}
\generate{\file{lwarp-listings.sty}{\from{lwarp.dtx}{listings}}}
@@ -60,6 +63,7 @@ version 2005/12/01 or later.
\generate{\file{lwarp-multicol.sty}{\from{lwarp.dtx}{multicol}}}
\generate{\file{lwarp-multirow.sty}{\from{lwarp.dtx}{multirow}}}
\generate{\file{lwarp-needspace.sty}{\from{lwarp.dtx}{needspace}}}
+\generate{\file{lwarp-newunicodechar.sty}{\from{lwarp.dtx}{newunicodechar}}}
\generate{\file{lwarp-nowidow.sty}{\from{lwarp.dtx}{nowidow}}}
\generate{\file{lwarp-pagenote.sty}{\from{lwarp.dtx}{pagenote}}}
\generate{\file{lwarp-placeins.sty}{\from{lwarp.dtx}{placeins}}}
@@ -71,6 +75,7 @@ version 2005/12/01 or later.
\generate{\file{lwarp-titleps.sty}{\from{lwarp.dtx}{titleps}}}
\generate{\file{lwarp-titlesec.sty}{\from{lwarp.dtx}{titlesec}}}
\generate{\file{lwarp-titletoc.sty}{\from{lwarp.dtx}{titletoc}}}
+\generate{\file{lwarp-titling.sty}{\from{lwarp.dtx}{titling}}}
\generate{\file{lwarp-tocloft.sty}{\from{lwarp.dtx}{tocloft}}}
\generate{\file{lwarp-trivfloat.sty}{\from{lwarp.dtx}{trivfloat}}}
\generate{\file{lwarp-wallpaper.sty}{\from{lwarp.dtx}{wallpaper}}}