From 966f3ce66328982f136ff1744dee70000acccf01 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 10 Nov 2019 22:10:55 +0000 Subject: lwarp git-svn-id: svn://tug.org/texlive/trunk@52729 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/lwarp/README.txt | 2 +- Master/texmf-dist/doc/latex/lwarp/lwarp.pdf | Bin 2486257 -> 2493809 bytes Master/texmf-dist/scripts/lwarp/lwarpmk.lua | 2 +- Master/texmf-dist/source/latex/lwarp/lwarp.dtx | 627 +++++++++++++-------- Master/texmf-dist/source/latex/lwarp/lwarp.ins | 1 + .../tex/latex/lwarp/lwarp-accessibility.sty | 24 + .../texmf-dist/tex/latex/lwarp/lwarp-afterpage.sty | 2 + .../texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty | 18 +- .../texmf-dist/tex/latex/lwarp/lwarp-caption.sty | 7 + .../tex/latex/lwarp/lwarp-common-multimedia.sty | 14 +- .../texmf-dist/tex/latex/lwarp/lwarp-geometry.sty | 12 +- .../texmf-dist/tex/latex/lwarp/lwarp-graphics.sty | 4 +- .../texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty | 130 ++--- Master/texmf-dist/tex/latex/lwarp/lwarp-media9.sty | 5 +- .../texmf-dist/tex/latex/lwarp/lwarp-movie15.sty | 6 +- .../texmf-dist/tex/latex/lwarp/lwarp-titlesec.sty | 2 +- Master/texmf-dist/tex/latex/lwarp/lwarp.sty | 201 ++++--- 17 files changed, 608 insertions(+), 449 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/lwarp/lwarp-accessibility.sty (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/lwarp/README.txt b/Master/texmf-dist/doc/latex/lwarp/README.txt index 8783fb594cf..195a61cffbc 100644 --- a/Master/texmf-dist/doc/latex/lwarp/README.txt +++ b/Master/texmf-dist/doc/latex/lwarp/README.txt @@ -1,5 +1,5 @@ -LaTeX lwarp package v0.77 README.txt +LaTeX lwarp package v0.78 README.txt Files included are: diff --git a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf index 5f1099dd493..1c3d9aec650 100644 Binary files a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf and b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf differ diff --git a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua index e0477be8a65..2ccc1fa5bd0 100755 --- a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua +++ b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua @@ -2,7 +2,7 @@ -- Copyright 2016-2019 Brian Dunn -printversion = "v0.76" +printversion = "v0.78" requiredconfversion = "2" -- also at *lwarpmk.conf function printhelp () diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx index 6cc5665d1aa..e52d6bfdb3e 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} -% [2019/10/15 v0.77 Allows LaTeX to directly produce HTML5 output.] +% [2019/11/07 v0.78 Allows LaTeX to directly produce HTML5 output.] % %<*driver> \documentclass{ltxdoc} @@ -337,9 +337,9 @@ Keywords={LaTeX, HTML, conversion}% \small See the \nameref{sec:indexgen} for ``how-to'', and the \nameref{sec:indextrb} if something doesn't work. +A \nameref{sec:troubleshooting} section is also available. The \nameref{sec:indexidx} contains automated entries for each package, macro, environment, counter, boolean, and other objects; individually and also sorted by category. -A \nameref{sec:troubleshooting} section is also available. \smallskip \hrule \end{minipage}\margintag{Need help?} @@ -1002,7 +1002,7 @@ While emulating \pkg{memoir}, \pkg{lwarp} pre-loads a number of packages (\cref{sec:patch-memoir-packages}). This can cause an options clash when the user's document later loads the same \trouble[options clash]{memoir=\pkg{memoir}>options clash} -\trouble{options clash>memoir=\pkg{memoir}} +\trouble{options>clash with \pkg{memoir}} packages with options. To fix this problem, specify the options before loading \pkg{lwarp}: \begin{sourcedisplay} @@ -2348,18 +2348,31 @@ Subtitles are in a \element{div} of class |mdframedsubtitle|, and likewise for subsubtitles. } -\newcommand{\limitscaption}{% -To pass options to caption, select the options before loading \pkg{lwarp}: -\trouble[options]{caption=\pkg{caption}>options} +\newcommand{\limitspackageloading}{% +Package options may cause problems with \pkg{lwarp}, especially if +they include curley braces. + +If selecting options with braces in \cs{usepackage} does not work: \begin{sourcedisplay} -\cs{documentclass}\{article\} \\ -\dots \\ -\cs{PassOptionsToPackage}\{options\_list\}\{caption\} \\ +\cs{usepackage}[font=\textred{\{}it,small\textred{\}}]\{caption\}\% does not work +\end{sourcedisplay} +\dots\ try instead selecting the package options before loading \pkg{lwarp}: +\begin{sourcedisplay} +\cs{PassOptionsToPackage}\{font=\{it,small\}\}\{caption\} \\ \dots \\ \cs{usepackage\{lwarp\}} \\ \dots \\ \cs{usepackage\{caption\}} \end{sourcedisplay} +\dots\ or try setting package options after the package has been loaded: +\begin{sourcedisplay} +\cs{usepackage}\{caption\} \\ +\cs{captionsetup}\{font=\{it,small\}\} +\end{sourcedisplay} +} + +\newcommand{\limitscaption}{% +\limitspackageloading To ensure proper float numbering, set caption positions such as: @@ -2679,7 +2692,7 @@ This boolean may be tested by the user for later use. %<*package> % \fi % -% \CheckSum{33423} +% \CheckSum{33374} % % \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 @@ -2799,6 +2812,7 @@ This boolean may be tested by the user for later use. % \changes{v0.75}{2019/09/23}{\ 2019/09/23} % \changes{v0.76}{2019/10/08}{\ 2019/10/08} % \changes{v0.77}{2019/10/15}{\ 2019/10/15} +% \changes{v0.78}{2019/11/07}{\ 2019/11/07} @@ -3019,6 +3033,22 @@ This boolean may be tested by the user for later use. % % \begin{description} % \needspace{2\baselineskip} +% \item[v0.78:] Fixes for support files, \attribute{alt} tags, hyperlinks, and the 2019/10 \LaTeX\ release. +% \begin{itemize} +% \item Docs: Improved documentation regarding package options. +% \margintag{docs} +% See \cref{sec:thingstoavoid}. +% \item Fix to overwrite existing support files +% using new \env{filecontents} environment. +% \item \pkg{breqn}: Previously broken by the 2019/10 \LaTeX\ update, but +% \margintag{packages} +% now working again. +% \item \pkg{graphics}: Fix for \cs{includegraphics} \attribute{alt} tags. +% \item \pkg{babel-french}: Fix for hyperlinks. +% \item \pkg{media9}, \pkg{movie15}, \pkg{multimedia}: Fix for the 2019/10 \LaTeX\ update. +% \item \pkg{accessibility}: Added. +% \end{itemize} +% \needspace{2\baselineskip} % \item[v0.77:] Updates to fix recently-broken packages. % \begin{itemize} % \item \pkg{booktabs}: Updated to v1.6180339. @@ -5039,7 +5069,7 @@ This boolean may be tested by the user for later use. % % \midrule % -% Accessibility: & \ipkg{accsupp}, \ipkg{axessibility}. \\ +% Accessibility: & \epkg{accessibility}, \ipkg{accsupp}, \ipkg{axessibility}. \\ % % \midrule % @@ -6318,7 +6348,7 @@ This boolean may be tested by the user for later use. % \begin{enumerate} % \item Declare the \cs{documentclass}. % \item Load text fonts. -% \item Load \pkg{inputenc} or \pkg{inputenx}, \pkg{fontenc}, and/or \pkg{fontspec}. +% \item Load \pkg{inputenc} or \pkg{inputenx}, \pkg{fontenc}, or \pkg{fontspec}. % \item Load \pkg{lwarp}. % \item Load remaining packages. % \end{enumerate} @@ -6335,10 +6365,15 @@ This boolean may be tested by the user for later use. % \item \limitsmathinsectionnames % \item \limitsincludegraphicsscale % \item Possible changes to \env{tabular} environments include: +% \watchout[tabular] % |*| columns, \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, \pkg{xtab}, % \pkg{bigdelim}. See \cref{sec:limitstabular}. +% \item If using braces in package options, +% \watchout[package options] +% such as with \pkg{caption}, see \cref{sec:thingstoavoid}. % \item Possible option clashes with \pkg{memoir}. See \cref{sec:limitsmemoir}. % \item If using indexes, see \cref{sec:indexsetup}. +% \watchout[indexes] % \item If using many indexes, glossaries, |.aux| files, etc., % see \cref{sec:indexsetup} regarding \pkg{morewrites}. % If \pkg{morewrites} is already used, be sure to add the setup with |allocate=10|. @@ -7820,7 +7855,7 @@ This boolean may be tested by the user for later use. % \cs{HTMLAuthor} may be used to set the meta tag to a simple list of names. % % -% +% \clearpage % % \section{Special cases and limitations} % \label{sec:limitations} @@ -7843,6 +7878,12 @@ This boolean may be tested by the user for later use. % In the document, avoid the following: % % \begin{description} +% \item [Package options:] \ +% \trouble[options with braces]{options>with braces} +% \trouble{caption=\pkg{caption}>options} +% \trouble{package>options with braces} +% \trouble{Missing \cs{begin}\{document\}>package options} +% \limitspackageloading % \item [\texttt{page} counter:] Do not adjust the \texttt{page} counter. % If doing so is required for the print version, place the % adjustment inside a \env{warpprint} environment. @@ -9254,6 +9295,7 @@ This boolean may be tested by the user for later use. % % \DescribePackage{caption} % \DescribePackage{subcaption} +% \label{sec:limitscaption} % \limitscaption % % @@ -10524,6 +10566,12 @@ This boolean may be tested by the user for later use. % % \item [Options clash:] If using \pkg{memoir}, see \cref{sec:limitsmemoir}. % +% \item [``Missing \cs{begin}\{document\}.'':] +% Some packages require that their options be +% specified before \pkg{lwarp} is loaded, or via the package's setup +% macro, especially if these options include the use of braces. +% See \cref{sec:thingstoavoid}. +% % \item [``No room for a new \cs{write}.'':] Before |\usepackage{lwarp}|, add: % \trouble{No room for a new \cs{write}} % \trouble{morewrites} @@ -11395,6 +11443,7 @@ This boolean may be tested by the user for later use. \LWR@loadafter{a5comb} \LWR@notmemoirloadafter{abstract} \LWR@loadafter{academicons} +\LWR@loadafter{accessibility} \LWR@loadafter{accsupp} \LWR@loadafter{acro} \LWR@loadafter{acronym} @@ -13386,31 +13435,56 @@ This boolean may be tested by the user for later use. % \DescribePackage{filecontents} % -% Used to write helper files, done in print mode. -% -% Patched to work with \pkg{morewrites}, per -% \href -% {https://tex.stackexchange.com/questions/312830/does-morewrites-not-support-filecontents-and-can-i-write-body-of-environment-us/312910} -% {\texttt{https://tex.stackexchange.com/questions/312830/\\ -% does-morewrites-not-support-filecontents-and-can-i-write-body-of-environment-us/\\ -% 312910}} +% Used to write helper files while creating the print version. % % \changes{v0.34}{2017/08/02}{\pkg{filecontents}: Required. Patched for \pkg{morewrites}.} +% \changes{v0.78}{2019/11/05}{\pkg{filecontents}: Fix to overwrite existing files using new \env{filecontents} environment.} % -% (Recent versions of \LaTeX\ (as of Fall 2019) now include the functionality -% of the \pkg{filecontents} package, but the package will still be used -% for those who still have older installations.) +% Recent versions of \LaTeX\ (as of Fall 2019) now include the functionality +% of the \pkg{filecontents} package, but with a new optional argument +% used to specify whether to force the overwriting of an existing file. +% If an older \LaTeX\ kernel is used, the original \pkg{filecontents} package is used, +% but it is patched to throw away the new optional argument. % % \begin{macrocode} -\RequirePackage{filecontents} +\@ifundefined{filec@ntents@opt}{% older kernel, discard optional args -\@ifpackagelater{filecontents}{2011/10/09}% -{} -{ -\newwrite\fcwrite -\let\LWR@origfilec@ntents\filec@ntents -\def\filec@ntents{\def\chardef##1\write{\let\reserved@c\fcwrite}\LWR@origfilec@ntents} -} + \RequirePackage{filecontents} + + \LetLtxMacro\LWR@orig@filec@ntents\filec@ntents + + \@ifpackagelater{filecontents}{2011/10/08} + { +% \end{macrocode} +% For a newer version of the \pkg{filecontents} package, simply +% discard the optional argument. +% \begin{macrocode} + \renewcommand*{\filec@ntents}[1][]{\LWR@orig@filec@ntents} + } + {% patch older package for morewrites +% \end{macrocode} +% For an older version of \pkg{filecontents}, +% discard the optional argument, and also patch to work with \pkg{morewrites}, per +% \href +% {https://tex.stackexchange.com/questions/312830/does-morewrites-not-support-filecontents-and-can-i-write-body-of-environment-us/312910} +% {\texttt{https://tex.stackexchange.com/questions/312830/\\ +% does-morewrites-not-support-filecontents-and-can-i-write-body-of-environment-us/\\ +% 312910}} +% \begin{macrocode} + \newwrite\fcwrite + \renewcommand*{\filec@ntents}[1][]{% + \def\chardef##1\write{\let\reserved@c\fcwrite}% + \LWR@orig@filec@ntents% + } + } + +}% older kernel +{% newer kernel +% \end{macrocode} +% For a newer kernel with a \env{filecontents} environment which accepts the +% optional \optn{overwrite} argument, use the environment as-is. +% \begin{macrocode} +}% newer kernel, filecontents env accepts optional args, do not load package % \end{macrocode} % \begin{macrocode} @@ -13559,6 +13633,7 @@ This boolean may be tested by the user for later use. % Remember the original \cs{RequirePackage}: % \begin{macrocode} \LetLtxMacro\LWR@origRequirePackage\RequirePackage +\LetLtxMacro\LWR@origRequirePackageWithOptions\RequirePackageWithOptions % \end{macrocode} % \begin{macro}{\LWR@requirepackagenames} @@ -13792,13 +13867,13 @@ This boolean may be tested by the user for later use. \IfValueTF{#1}% {% options given \IfValueTF{#3}% version given? - {\LWR@origRequirePackage[#1]{\LWR@parsedrequirepackagenames}[#3]}% - {\LWR@origRequirePackage[#1]{\LWR@parsedrequirepackagenames}}% + {\LWR@origRequirePackage[#1]{\LWR@parsedrequirepackagenames}[#3]}% + {\LWR@origRequirePackage[#1]{\LWR@parsedrequirepackagenames}}% }% {% no options given \IfValueTF{#3}% version given? - {\LWR@origRequirePackage{\LWR@parsedrequirepackagenames}[#3]}% - {\LWR@origRequirePackage{\LWR@parsedrequirepackagenames}}% + {\LWR@origRequirePackage{\LWR@parsedrequirepackagenames}[#3]}% + {\LWR@origRequirePackage{\LWR@parsedrequirepackagenames}}% }% } \LetLtxMacro\usepackage\RequirePackage @@ -13824,13 +13899,15 @@ This boolean may be tested by the user for later use. Using package `#1' and adding lwarp modifications,\MessageBreak including options,}% \IfValueTF{#2} -{\ProvidesPackage{lwarp-#1}[#2]} -{\ProvidesPackage{lwarp-#1}} -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{#1}} -\ProcessOptions\relax -\IfValueTF{#2} -{\LWR@origRequirePackage{#1}[#2]} -{\LWR@origRequirePackage{#1}} + {\ProvidesPackage{lwarp-#1}[#2]} + {\ProvidesPackage{lwarp-#1}} +\DeclareOption*{% + \PassOptionsToPackage{\CurrentOption}{#1}% +} +\ProcessOptions\relax% +\IfValueTF{#2}% + {\LWR@origRequirePackage{#1}[#2]}% + {\LWR@origRequirePackage{#1}}% % \end{macrocode} % In some cases, the following seems to be required % to avoid an ``unknown option'' error, such @@ -13838,7 +13915,7 @@ This boolean may be tested by the user for later use. % \changes{v0.62}{2018/11/11}{Fix: Unknown option error.} % \begin{macrocode} \DeclareOption*{}% -\ProcessOptions\relax +\ProcessOptions\relax% } % \end{macrocode} % \end{macro} @@ -15386,7 +15463,7 @@ This boolean may be tested by the user for later use. % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} -\begin{filecontents*}{lwarp.css} +\begin{filecontents*}[overwrite]{lwarp.css} /* CSS stylesheet for the LaTeX lwarp package Copyright 2016-2019 Brian Dunn — BD Tech Concepts LLC @@ -17016,7 +17093,7 @@ span.sidetocthetitle { display: none } % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} -\begin{filecontents*}{lwarp_sagebrush.css} +\begin{filecontents*}[overwrite]{lwarp_sagebrush.css} @import url("lwarp.css") ; @@ -17287,7 +17364,7 @@ nav.sidetoc a:hover { % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} -\begin{filecontents*}{lwarp_formal.css} +\begin{filecontents*}[overwrite]{lwarp_formal.css} @import url("lwarp.css") ; @@ -17504,7 +17581,7 @@ nav.botnavigation { % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} -\begin{filecontents*}{sample_project.css} +\begin{filecontents*}[overwrite]{sample_project.css} /* ( --- Start of project.css --- ) */ /* ( --- A sample project-specific CSS file for lwarp --- ) */ @@ -17541,7 +17618,7 @@ nav.botnavigation { % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} -\begin{filecontents*}{lwarp.ist} +\begin{filecontents*}[overwrite]{lwarp.ist} preamble "\\begin{theindex} \\providecommand*\\lettergroupDefault[1]{} @@ -17591,7 +17668,7 @@ page_compositor "." % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} -\begin{filecontents*}{lwarp.xdy} +\begin{filecontents*}[overwrite]{lwarp.xdy} (require "tex/inputenc/latin.xdy") (merge-rule "\\PS *" "Postscript") (require "texindy.xdy") @@ -17709,7 +17786,7 @@ page_compositor "." % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} -\begin{filecontents*}{lwarp_mathjax.txt} +\begin{filecontents*}[overwrite]{lwarp_mathjax.txt}