summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-06-10 21:34:06 +0000
committerKarl Berry <karl@freefriends.org>2017-06-10 21:34:06 +0000
commit0a543d44f49029704fe666953858d028b000d5d2 (patch)
treeccb8c9d5504de05b302302db32fd970f92148f9a /Master
parentd8d28aa3d46f4ab90e745b504027ee820bea0bc2 (diff)
lwarp (10jun17)
git-svn-id: svn://tug.org/texlive/trunk@44552 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/lwarp/README.txt2
-rw-r--r--Master/texmf-dist/doc/latex/lwarp/lwarp.pdfbin1483901 -> 1484432 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/lwarp/lwarpmk.lua29
-rw-r--r--Master/texmf-dist/source/latex/lwarp/lwarp.dtx88
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty59
5 files changed, 118 insertions, 60 deletions
diff --git a/Master/texmf-dist/doc/latex/lwarp/README.txt b/Master/texmf-dist/doc/latex/lwarp/README.txt
index f25fabf29ce..22db4ca6457 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.31 README.txt
+LaTeX lwarp package v0.32 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 777827e8416..52671ae8d0d 100644
--- a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
+++ b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
index e738e2e0b09..83cfd06edd9 100755
--- a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
+++ b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
@@ -4,7 +4,7 @@
-- Print the usage of the lwarpmk command:
-printversion = "v0.31"
+printversion = "v0.32"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -61,9 +61,9 @@ end
function splitfile (destfile,sourcefile)
print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ;
-io.input(sourcefile)
+local sfile = io.open(sourcefile)
io.output(destfile)
-for line in io.lines() do
+for line in sfile:lines() do
i,j,copen,cstart,newfilename = string.find (line,"(.*)|(.*)|(.*)|") ;
if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then -- split the file
io.output(newfilename) ;
@@ -71,6 +71,7 @@ else -- not a splitpoint
io.write (line .. "\n") ;
end
end -- do
+io.close(sfile)
end -- function
-- Incorrect value, so print an error and exit.
@@ -102,10 +103,10 @@ os.exit(1) -- exit the entire lwarpmk script
else -- file exists
-- Read the file:
print ("lwarpmk: Reading " .. conffile ..".")
-io.input(conffile) ;
+local cfile = io.open(conffile)
-- Scan each line:
local linenum = 0
-for line in io.lines() do -- scan lines
+for line in cfile:lines() do -- scan lines
linenum = linenum + 1
i,j,cvarname,cvalue = string.find (line,"([%w-_]*)%s*=%s*\"([%w%-_%.]*)\"") ;
-- Error if incorrect enclosing characters:
@@ -146,6 +147,7 @@ printconf () ;
os.exit(1) ;
end
end -- do scan lines
+io.close(cfile)
end -- file exists
-- Select some operating-system commands:
if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
@@ -185,10 +187,14 @@ end
-- Return true if found.
function reruntoget (filesource)
-io.input(filesource)
-for line in io.lines() do
-if ( string.find(line,"Rerun to get") ~= nil ) then return true end
+local fsource = io.open(filesource)
+for line in fsource:lines() do
+if ( string.find(line,"Rerun to get") ~= nil ) then
+io.close(fsource)
+return true
end
+end
+io.close(fsource)
return false
end
@@ -255,11 +261,11 @@ 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
+local limagesfile = io.open("lateximages.txt")
+-- Create the lateximages directory, ignore error if already exists
err = os.execute("mkdir lateximages")
-- Scan lateximages.txt
-for line in io.lines() do
+for line in limagesfile: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,"|(.*)|(.*)|")
@@ -287,6 +293,7 @@ rmname .. " lateximage-" .. lwimgnum ..".pdf lateximagetemp-" .. lwimgpage ..".p
if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
end
end -- do
+io.close(limagesfile)
end -- function
-- Use latexmk to compile source and index:
diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
index d974635bdcd..a956f0a45f7 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/05/15 v0.31 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2017/06/09 v0.32 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -972,7 +972,7 @@ This boolean may be tested by the user for later use.
%<*package>
% \fi
%
-% \CheckSum{10985}
+% \CheckSum{10994}
%
% \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
@@ -1042,6 +1042,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.29}{2017/04/15}{\ 2017/04/15}
% \changes{v0.30}{2017/04/29}{\ 2017/04/29}
% \changes{v0.31}{2017/05/15}{\ 2017/05/15}
+% \changes{v0.32}{2017/06/09}{\ 2016/06/09}
@@ -1175,7 +1176,13 @@ This boolean may be tested by the user for later use.
% For a detailed list of changes, see the Change History on page \pageref{sec:changehistory}.
%
% \begin{description}
-% \item[v0.31:] \
+% \item[v0.32:] Bug fixes; no source changes needed:
+% \begin{itemize}
+% \item |lwarpmk| has been adjusted to work with the latest |luatex|.
+% \item Spaces in the \cs{usepackage} and \cs{RequirePackage} package lists are now accepted and ignored.
+% \item Fix for the \pkg{glossaries} package and \cs{glo@name}.
+% \end{itemize}
+% \item[v0.31:] Bug fix; no source changes needed:
% \begin{itemize}
% \item Improved compatibility with \pkg{keyfloat},
% including the new \env{keywrap} environment.
@@ -5489,28 +5496,34 @@ top=1in,bottom=1in,%
% If this is a package name, re-direct it to the \pkg{lwarp} version
% by renaming it |lwarp-| followed by the original name.
% \begin{macrocode}
-\newcommand*{\LWR@lookforpackagename}[1]{
+\newcommand*{\LWR@lookforpackagename}[1]{%
% \end{macrocode}
% Find the n'th package name from the list:
% \begin{macrocode}
-\LWR@findword{\LWR@requirepackagenames}{#1}[\LWR@strresult]
+\LWR@findword{\LWR@requirepackagenames}{#1}[\LWR@strresult]%
+% \end{macrocode}
+% Remove blanks.
+% The original name with blanks is in |LWR@strresult| and
+% the final name with no blanks goes into |LWR@strresulttwo|.
+% \begin{macrocode}
+\StrSubstitute[100]{\LWR@strresult}{ }{}[\LWR@strresulttwo]%
% \end{macrocode}
% See if the package name was found:
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{}
+\IfStrEq{\LWR@strresulttwo}{}%
{}% no filename
{% yes filename
% \end{macrocode}
% If found, and if an \pkg{lwarp}-equivalent name exists, use |lwarp-|* instead.
% \begin{macrocode}
-\IfFileExists{lwarp-\LWR@strresult.sty}
-{% latex_html_ file found
- \StrSubstitute
- {\LWR@requirepackagenames}
- {\LWR@strresult}
- {lwarp-\LWR@strresult}[\LWR@requirepackagenames]
-}
-{}% no latex_html_* file
+\IfFileExists{lwarp-\LWR@strresulttwo.sty}%
+{% lwarp-* file found
+ \StrSubstitute%
+ {\LWR@requirepackagenames}%
+ {\LWR@strresult}%
+ {lwarp-\LWR@strresulttwo}[\LWR@requirepackagenames]%
+}%
+{}% no lwarp-* file
}% yes filename
}
% \end{macrocode}
@@ -5523,6 +5536,8 @@ top=1in,bottom=1in,%
% if an \pkg{lwarp} version of a package exists,
% select it instead of the \LaTeX\ version.
%
+% \changes{v0.32}{2017/06/09}{Fix: Ignores blanks in package list.}
+%
% \begin{macrocode}
\RenewDocumentCommand{\RequirePackage}{o m o}{%
% \end{macrocode}
@@ -7819,6 +7834,8 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-
% \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.}
+% \changes{v0.32}{2017/06/08}{\protect\texttt{lwarpmk}: Fix: \protect\texttt{io.lines()} changed to \protect\texttt{file:lines()}
+% due to \protect\texttt{luatex} changes.}
%
% \begin{macrocode}
\begin{VerbatimOut}{lwarpmk.lua}
@@ -7828,7 +7845,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-
-- Print the usage of the lwarpmk command:
-printversion = "v0.31"
+printversion = "v0.32"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -7886,9 +7903,9 @@ end
function splitfile (destfile,sourcefile)
print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ;
-io.input(sourcefile)
+local sfile = io.open(sourcefile)
io.output(destfile)
-for line in io.lines() do
+for line in sfile:lines() do
i,j,copen,cstart,newfilename = string.find (line,"(.*)|(.*)|(.*)|") ;
if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then -- split the file
io.output(newfilename) ;
@@ -7896,6 +7913,7 @@ else -- not a splitpoint
io.write (line .. "\n") ;
end
end -- do
+io.close(sfile)
end -- function
-- Incorrect value, so print an error and exit.
@@ -7927,10 +7945,10 @@ os.exit(1) -- exit the entire lwarpmk script
else -- file exists
-- Read the file:
print ("lwarpmk: Reading " .. conffile ..".")
-io.input(conffile) ;
+local cfile = io.open(conffile)
-- Scan each line:
local linenum = 0
-for line in io.lines() do -- scan lines
+for line in cfile:lines() do -- scan lines
linenum = linenum + 1
i,j,cvarname,cvalue = string.find (line,"([%w-_]*)%s*=%s*\"([%w%-_%.]*)\"") ;
-- Error if incorrect enclosing characters:
@@ -7971,6 +7989,7 @@ printconf () ;
os.exit(1) ;
end
end -- do scan lines
+io.close(cfile)
end -- file exists
-- Select some operating-system commands:
if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
@@ -8012,10 +8031,14 @@ end
-- Return true if found.
function reruntoget (filesource)
-io.input(filesource)
-for line in io.lines() do
-if ( string.find(line,"Rerun to get") ~= nil ) then return true end
+local fsource = io.open(filesource)
+for line in fsource:lines() do
+if ( string.find(line,"Rerun to get") ~= nil ) then
+ io.close(fsource)
+ return true
end
+end
+io.close(fsource)
return false
end
@@ -8088,11 +8111,11 @@ 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
+local limagesfile = io.open("lateximages.txt")
+-- Create the lateximages directory, ignore error if already exists
err = os.execute("mkdir lateximages")
-- Scan lateximages.txt
-for line in io.lines() do
+for line in limagesfile: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,"|(.*)|(.*)|")
@@ -8120,6 +8143,7 @@ rmname .. " lateximage-" .. lwimgnum ..".pdf lateximagetemp-" .. lwimgpage ..".p
if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
end
end -- do
+io.close(limagesfile)
end -- function
@@ -13124,6 +13148,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{macro}{\LWR@strresult} Holds the result of |Str| functions.
% \begin{macrocode}
\newcommand*{\LWR@strresult}{}
+\newcommand*{\LWR@strresulttwo}{}
% \end{macrocode}
% \end{macro}
@@ -15854,6 +15879,19 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
+% \codeall
+%
+% For the \pkg{glossaries} package, try to prevent an error where
+% \cs{glo@name} was not found:
+%
+% \changes{v0.32}{2017/06/08}{\pkg{glossaries}: Prevent error with \cs{glo@name} not defined.}
+% \begin{macrocode}
+\begin{warpall}
+\providecommand{\glo@name}{}
+\end{warpall}
+% \end{macrocode}
+
+
% \section{Math}
% \label{sec:math}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index 6e15502dd1d..bad047aecbf 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2017/05/15 v0.31 Allows LaTeX to directly produce HTML5 output.]
+ [2017/06/09 v0.32 Allows LaTeX to directly produce HTML5 output.]
@@ -390,19 +390,20 @@ top=1in,bottom=1in,%
\newcommand*\LWR@findword[3][,]{%
\StrBetween[#3,\numexpr#3+1]{#1#2#1}{#1}{#1}%
}
-\newcommand*{\LWR@lookforpackagename}[1]{
-\LWR@findword{\LWR@requirepackagenames}{#1}[\LWR@strresult]
-\IfStrEq{\LWR@strresult}{}
+\newcommand*{\LWR@lookforpackagename}[1]{%
+\LWR@findword{\LWR@requirepackagenames}{#1}[\LWR@strresult]%
+\StrSubstitute[100]{\LWR@strresult}{ }{}[\LWR@strresulttwo]%
+\IfStrEq{\LWR@strresulttwo}{}%
{}% no filename
{% yes filename
-\IfFileExists{lwarp-\LWR@strresult.sty}
-{% latex_html_ file found
-\StrSubstitute
-{\LWR@requirepackagenames}
-{\LWR@strresult}
-{lwarp-\LWR@strresult}[\LWR@requirepackagenames]
-}
-{}% no latex_html_* file
+\IfFileExists{lwarp-\LWR@strresulttwo.sty}%
+{% lwarp-* file found
+\StrSubstitute%
+{\LWR@requirepackagenames}%
+{\LWR@strresult}%
+{lwarp-\LWR@strresulttwo}[\LWR@requirepackagenames]%
+}%
+{}% no lwarp-* file
}% yes filename
}
\RenewDocumentCommand{\RequirePackage}{o m o}{%
@@ -2286,7 +2287,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-
-- Print the usage of the lwarpmk command:
-printversion = "v0.31"
+printversion = "v0.32"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -2343,9 +2344,9 @@ end
function splitfile (destfile,sourcefile)
print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ;
-io.input(sourcefile)
+local sfile = io.open(sourcefile)
io.output(destfile)
-for line in io.lines() do
+for line in sfile:lines() do
i,j,copen,cstart,newfilename = string.find (line,"(.*)|(.*)|(.*)|") ;
if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then -- split the file
io.output(newfilename) ;
@@ -2353,6 +2354,7 @@ else -- not a splitpoint
io.write (line .. "\n") ;
end
end -- do
+io.close(sfile)
end -- function
-- Incorrect value, so print an error and exit.
@@ -2384,10 +2386,10 @@ os.exit(1) -- exit the entire lwarpmk script
else -- file exists
-- Read the file:
print ("lwarpmk: Reading " .. conffile ..".")
-io.input(conffile) ;
+local cfile = io.open(conffile)
-- Scan each line:
local linenum = 0
-for line in io.lines() do -- scan lines
+for line in cfile:lines() do -- scan lines
linenum = linenum + 1
i,j,cvarname,cvalue = string.find (line,"([%w-_]*)%s*=%s*\"([%w%-_%.]*)\"") ;
-- Error if incorrect enclosing characters:
@@ -2428,6 +2430,7 @@ printconf () ;
os.exit(1) ;
end
end -- do scan lines
+io.close(cfile)
end -- file exists
-- Select some operating-system commands:
if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
@@ -2467,10 +2470,14 @@ end
-- Return true if found.
function reruntoget (filesource)
-io.input(filesource)
-for line in io.lines() do
-if ( string.find(line,"Rerun to get") ~= nil ) then return true end
+local fsource = io.open(filesource)
+for line in fsource:lines() do
+if ( string.find(line,"Rerun to get") ~= nil ) then
+io.close(fsource)
+return true
+end
end
+io.close(fsource)
return false
end
@@ -2537,11 +2544,11 @@ 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
+local limagesfile = io.open("lateximages.txt")
+-- Create the lateximages directory, ignore error if already exists
err = os.execute("mkdir lateximages")
-- Scan lateximages.txt
-for line in io.lines() do
+for line in limagesfile: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,"|(.*)|(.*)|")
@@ -2569,6 +2576,7 @@ rmname .. " lateximage-" .. lwimgnum ..".pdf lateximagetemp-" .. lwimgpage ..".p
if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
end
end -- do
+io.close(limagesfile)
end -- function
-- Use latexmk to compile source and index:
@@ -4888,6 +4896,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@tablecolspec}{}
\newcommand*{\LWR@strresult}{}
+\newcommand*{\LWR@strresulttwo}{}
\newcommand*{\LWR@origcolspec}{}
@@ -5975,6 +5984,10 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\newcommand{\hyperindexref}[1]{#1}
\end{warpprint}
+\begin{warpall}
+\providecommand{\glo@name}{}
+\end{warpall}
+
\begin{warpHTML}