diff options
Diffstat (limited to 'Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.dtx')
-rw-r--r-- | Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.dtx | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.dtx b/Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.dtx index aad394b9896..ce72e35d7d2 100644 --- a/Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.dtx +++ b/Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.dtx @@ -244,12 +244,12 @@ %<@@=lltxmath> \NeedsTeXFormat{LaTeX2e}[2009/09/24] \RequirePackage{expl3}[2012/08/14] -\ProvidesExplPackage{lualatex-math}{2013/01/13}{1.2}% +\ProvidesExplPackage{lualatex-math}{2013/08/03}{1.3}% {Patches for mathematics typesetting with LuaLaTeX} \RequirePackage { etoolbox } [ 2007/10/08 ] \RequirePackage { luatexbase } [ 2010/05/27 ] \RequirePackage { filehook } [ 2011/03/09 ] -\RequireLuaModule { lualatex-math } [ 2011/05/05 ] +\RequireLuaModule { lualatex-math } [ 2013/08/03 ] % \end{macrocode} % % \begin{macro}{\@@_restore_catcode:N} @@ -935,25 +935,34 @@ % % \section{Implementation of the \hologo{LuaLaTeX} module} % -% For the Lua module, we use the standard \pkg{luatexbase-modutils} template -% and the \func{module} function. +% For the Lua module, we use the standard \pkg{luatexbase-modutils} template. +% \changes{v1.3}{2013/08/03}{Stop using the deprecated \func{module} function} % \begin{macrocode} %<*lua> require("luatexbase.modutils") require("luatexbase.cctb") +lualatex = lualatex or {} +lualatex.math = lualatex.math or {} local err, warn, info, log = luatexbase.provides_module({ name = "lualatex-math", - date = "2011/05/05", - version = 0.1, + date = "2013/08/03", + version = 1.3, description = "Patches for mathematics typesetting with LuaLaTeX", author = "Philipp Stephani", licence = "LPPL v1.3+" }) -local unpack = unpack -local string = string -local tex = tex +% \end{macrocode} +% \begin{function}{unpack} +% \changes{v1.3}{2013/08/03}{Integrate Philipp Gesang’s patch to make the +% \func{unpack} function compatible with Lua~5.2} +% The function \func{unpack} needs to be treated specially as it got moved +% around in Lua~5.2. +% \begin{macrocode} +local unpack = unpack or table.unpack +% \end{macrocode} +% \end{function} +% \begin{macrocode} local cctb = luatexbase.catcodetables -module("lualatex.math") % \end{macrocode} % % \begin{function}{print_fam_slot} @@ -963,7 +972,7 @@ module("lualatex.math") % \meta{family}\texttt{\textvisiblespace}\meta{slot}, suitable for the % right-hand side of \eg \verb|\fontcharht\textfont|. % \begin{macrocode} -function print_fam_slot(char) +function lualatex.math.print_fam_slot(char) local code = tex.getmathcode(char) local class, family, slot = unpack(code) local result = string.format("%i %i ", family, slot) @@ -979,15 +988,18 @@ end % \meta{class}\texttt{\textvisiblespace}\meta{family}\texttt{\textvisiblespace}\meta{slot}, % suitable for the right-hand side of \cmd{\Umathchardef}. % \begin{macrocode} -function print_class_fam_slot(char) +function lualatex.math.print_class_fam_slot(char) local code = tex.getmathcode(char) local class, family, slot = unpack(code) local result = string.format("%i %i %i ", class, family, slot) tex.sprint(cctb.string, result) end -%</lua> % \end{macrocode} % \end{function} +% \begin{macrocode} +return lualatex.math +%</lua> +% \end{macrocode} % % % \section{Test files} |