texlive[44552] trunk: lwarp (10jun17)
commits+karl at tug.org
commits+karl at tug.org
Sat Jun 10 23:34:06 CEST 2017
Revision: 44552
http://tug.org/svn/texlive?view=revision&revision=44552
Author: karl
Date: 2017-06-10 23:34:06 +0200 (Sat, 10 Jun 2017)
Log Message:
-----------
lwarp (10jun17)
Modified Paths:
--------------
trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
trunk/Master/texmf-dist/doc/latex/lwarp/README.txt
trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
Modified: trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua 2017-06-10 21:33:48 UTC (rev 44551)
+++ trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua 2017-06-10 21:34:06 UTC (rev 44552)
@@ -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 @@
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 @@
io.write (line .. "\n") ;
end
end -- do
+io.close(sfile)
end -- function
-- Incorrect value, so print an error and exit.
@@ -102,10 +103,10 @@
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 @@
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 @@
-- 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 @@
-- 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 @@
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:
Modified: trunk/Master/texmf-dist/doc/latex/lwarp/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lwarp/README.txt 2017-06-10 21:33:48 UTC (rev 44551)
+++ trunk/Master/texmf-dist/doc/latex/lwarp/README.txt 2017-06-10 21:34:06 UTC (rev 44552)
@@ -1,5 +1,5 @@
-LaTeX lwarp package v0.31 README.txt
+LaTeX lwarp package v0.32 README.txt
Files included are:
Modified: trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua 2017-06-10 21:33:48 UTC (rev 44551)
+++ trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua 2017-06-10 21:34:06 UTC (rev 44552)
@@ -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 @@
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 @@
io.write (line .. "\n") ;
end
end -- do
+io.close(sfile)
end -- function
-- Incorrect value, so print an error and exit.
@@ -102,10 +103,10 @@
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 @@
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 @@
-- 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 @@
-- 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 @@
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:
Modified: trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx 2017-06-10 21:33:48 UTC (rev 44551)
+++ trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx 2017-06-10 21:34:06 UTC (rev 44552)
@@ -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 @@
%<*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 @@
% \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,8 +1176,14 @@
% 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 at 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.
% \end{itemize}
@@ -5489,28 +5496,34 @@
% 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 at lookforpackagename}[1]{
+\newcommand*{\LWR at lookforpackagename}[1]{%
% \end{macrocode}
% Find the n'th package name from the list:
% \begin{macrocode}
-\LWR at findword{\LWR at requirepackagenames}{#1}[\LWR at strresult]
+\LWR at findword{\LWR at requirepackagenames}{#1}[\LWR at strresult]%
% \end{macrocode}
+% Remove blanks.
+% The original name with blanks is in |LWR at strresult| and
+% the final name with no blanks goes into |LWR at strresulttwo|.
+% \begin{macrocode}
+\StrSubstitute[100]{\LWR at strresult}{ }{}[\LWR at strresulttwo]%
+% \end{macrocode}
% See if the package name was found:
% \begin{macrocode}
-\IfStrEq{\LWR at strresult}{}
+\IfStrEq{\LWR at 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 at strresult.sty}
-{% latex_html_ file found
- \StrSubstitute
- {\LWR at requirepackagenames}
- {\LWR at strresult}
- {lwarp-\LWR at strresult}[\LWR at requirepackagenames]
-}
-{}% no latex_html_* file
+\IfFileExists{lwarp-\LWR at strresulttwo.sty}%
+{% lwarp-* file found
+ \StrSubstitute%
+ {\LWR at requirepackagenames}%
+ {\LWR at strresult}%
+ {lwarp-\LWR at strresulttwo}[\LWR at requirepackagenames]%
+}%
+{}% no lwarp-* file
}% yes filename
}
% \end{macrocode}
@@ -5523,6 +5536,8 @@
% 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 @@
% \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 @@
-- 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 @@
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 @@
io.write (line .. "\n") ;
end
end -- do
+io.close(sfile)
end -- function
-- Incorrect value, so print an error and exit.
@@ -7927,10 +7945,10 @@
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 @@
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 @@
-- 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 @@
-- 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 @@
if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
end
end -- do
+io.close(limagesfile)
end -- function
@@ -13124,6 +13148,7 @@
% \begin{macro}{\LWR at strresult} Holds the result of |Str| functions.
% \begin{macrocode}
\newcommand*{\LWR at strresult}{}
+\newcommand*{\LWR at strresulttwo}{}
% \end{macrocode}
% \end{macro}
@@ -15854,7 +15879,20 @@
+% \codeall
+%
+% For the \pkg{glossaries} package, try to prevent an error where
+% \cs{glo at name} was not found:
+%
+% \changes{v0.32}{2017/06/08}{\pkg{glossaries}: Prevent error with \cs{glo at name} not defined.}
+% \begin{macrocode}
+\begin{warpall}
+\providecommand{\glo at name}{}
+\end{warpall}
+% \end{macrocode}
+
+
% \section{Math}
% \label{sec:math}
%
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty 2017-06-10 21:33:48 UTC (rev 44551)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty 2017-06-10 21:34:06 UTC (rev 44552)
@@ -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 @@
\newcommand*\LWR at findword[3][,]{%
\StrBetween[#3,\numexpr#3+1]{#1#2#1}{#1}{#1}%
}
-\newcommand*{\LWR at lookforpackagename}[1]{
-\LWR at findword{\LWR at requirepackagenames}{#1}[\LWR at strresult]
-\IfStrEq{\LWR at strresult}{}
+\newcommand*{\LWR at lookforpackagename}[1]{%
+\LWR at findword{\LWR at requirepackagenames}{#1}[\LWR at strresult]%
+\StrSubstitute[100]{\LWR at strresult}{ }{}[\LWR at strresulttwo]%
+\IfStrEq{\LWR at strresulttwo}{}%
{}% no filename
{% yes filename
-\IfFileExists{lwarp-\LWR at strresult.sty}
-{% latex_html_ file found
-\StrSubstitute
-{\LWR at requirepackagenames}
-{\LWR at strresult}
-{lwarp-\LWR at strresult}[\LWR at requirepackagenames]
-}
-{}% no latex_html_* file
+\IfFileExists{lwarp-\LWR at strresulttwo.sty}%
+{% lwarp-* file found
+\StrSubstitute%
+{\LWR at requirepackagenames}%
+{\LWR at strresult}%
+{lwarp-\LWR at strresulttwo}[\LWR at requirepackagenames]%
+}%
+{}% no lwarp-* file
}% yes filename
}
\RenewDocumentCommand{\RequirePackage}{o m o}{%
@@ -2286,7 +2287,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.") ;
@@ -2343,9 +2344,9 @@
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 @@
io.write (line .. "\n") ;
end
end -- do
+io.close(sfile)
end -- function
-- Incorrect value, so print an error and exit.
@@ -2384,10 +2386,10 @@
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 @@
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 @@
-- 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 @@
-- 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 @@
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 @@
\newcommand*{\LWR at tablecolspec}{}
\newcommand*{\LWR at strresult}{}
+\newcommand*{\LWR at strresulttwo}{}
\newcommand*{\LWR at origcolspec}{}
@@ -5975,7 +5984,11 @@
\newcommand{\hyperindexref}[1]{#1}
\end{warpprint}
+\begin{warpall}
+\providecommand{\glo at name}{}
+\end{warpall}
+
\begin{warpHTML}
\let\LWR at origtextdollar\$
More information about the tex-live-commits
mailing list