diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/base/ltluatex.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/base/ltluatex.dtx | 92 |
1 files changed, 44 insertions, 48 deletions
diff --git a/Master/texmf-dist/source/latex/base/ltluatex.dtx b/Master/texmf-dist/source/latex/base/ltluatex.dtx index ffde612ec4b..b7c46459421 100644 --- a/Master/texmf-dist/source/latex/base/ltluatex.dtx +++ b/Master/texmf-dist/source/latex/base/ltluatex.dtx @@ -24,7 +24,7 @@ \ProvidesFile{ltluatex.dtx} %</driver> %<*tex> -[2017/02/18 v1.1c +[2017/03/28 v1.1e %</tex> %<plain> LuaTeX support for plain TeX (core) %<*tex> @@ -170,7 +170,7 @@ % % \subsection{Allocators in Lua} % -% \DescribeMacro{new\_attribute} +% \DescribeMacro{new_attribute} % |luatexbase.new_attribute(|\meta{attribute}|)|\\ % Returns an allocation number for the \meta{attribute}, indexed from~$1$. % The attribute will be initialised with the marker value |-"7FFFFFFF| @@ -182,18 +182,18 @@ % consistently for attributes declared in \TeX\ or Lua. % % \noindent -% \DescribeMacro{new\_whatsit} +% \DescribeMacro{new_whatsit} % |luatexbase.new_whatsit(|\meta{whatsit}|)|\\ % Returns an allocation number for the custom \meta{whatsit}, indexed from~$1$. % % \noindent -% \DescribeMacro{new\_bytecode} +% \DescribeMacro{new_bytecode} % |luatexbase.new_bytecode(|\meta{bytecode}|)|\\ % Returns an allocation number for a bytecode register, indexed from~$1$. % The optional \meta{name} argument is just used for logging. % % \noindent -% \DescribeMacro{new\_chunkname} +% \DescribeMacro{new_chunkname} % |luatexbase.new_chunkname(|\meta{chunkname}|)|\\ % Returns an allocation number for a Lua chunk name for use with % |\directlua| and |\latelua|, indexed from~$1$. @@ -287,7 +287,7 @@ % % \subsection{Module utilities} % -% \DescribeMacro{provides\_module} +% \DescribeMacro{provides_module} % |luatexbase.provides_module(|\meta{info}|)|\\ % This function is used by modules to identify themselves; the |info| should be % a table containing information about the module. The required field @@ -297,9 +297,9 @@ % information will be recorded in the log. Other fields are ignored. % % \noindent -% \DescribeMacro{module\_info} -% \DescribeMacro{module\_warning} -% \DescribeMacro{module\_error} +% \DescribeMacro{module_info} +% \DescribeMacro{module_warning} +% \DescribeMacro{module_error} % |luatexbase.module_info(|\meta{module}, \meta{text}|)|\\ % |luatexbase.module_warning(|\meta{module}, \meta{text}|)|\\ % |luatexbase.module_error(|\meta{module}, \meta{text}|)|\\ @@ -316,7 +316,7 @@ % \subsection{Callback management} % % \noindent -% \DescribeMacro{add\_to\_callback} +% \DescribeMacro{add_to_callback} % |luatexbase.add_to_callback(|^^A % \meta{callback}, \meta{function}, \meta{description}|)| % Registers the \meta{function} into the \meta{callback} with a textual @@ -324,20 +324,20 @@ % in the order loaded. % % \noindent -% \DescribeMacro{remove\_from\_callback} +% \DescribeMacro{remove_from_callback} % |luatexbase.remove_from_callback(|\meta{callback}, \meta{description}|)| % Removes the callback function with \meta{description} from the \meta{callback}. % The removed function and its description % are returned as the results of this function. % % \noindent -% \DescribeMacro{in\_callback} +% \DescribeMacro{in_callback} % |luatexbase.in_callback(|\meta{callback}, \meta{description}|)| % Checks if the \meta{description} matches one of the functions added % to the list for the \meta{callback}, returning a boolean value. % % \noindent -% \DescribeMacro{disable\_callback} +% \DescribeMacro{disable_callback} % |luatexbase.disable_callback(|\meta{callback}|)| % Sets the \meta{callback} to \texttt{false} as described in the Lua\TeX{} % manual for the underlying \texttt{callback.register} built-in. Callbacks @@ -345,18 +345,18 @@ % no functions registered using the callback. % % \noindent -% \DescribeMacro{callback\_descriptions} +% \DescribeMacro{callback_descriptions} % A list of the descriptions of functions registered to the specified % callback is returned. |{}| is returned if there are no functions registered. % % \noindent -% \DescribeMacro{create\_callback} +% \DescribeMacro{create_callback} % |luatexbase.create_callback(|\meta{name},meta{type},\meta{default}|)| % Defines a user defined callback. The last argument is a default % function or |false|. % % \noindent -% \DescribeMacro{call\_callback} +% \DescribeMacro{call_callback} % |luatexbase.call_callback(|\meta{name},\ldots|)| % Calls a user defined callback with the supplied arguments. % @@ -433,10 +433,12 @@ % update to |etex.src| which already has some Lua\TeX-specific % code, but does not define the correct range for Lua\TeX. % +% 2015-07-13 higher range in luatex. % \begin{macrocode} -% 2015-07-13 higher range in luatex \edef \et@xmaxregs {\ifx\directlua\@undefined 32768\else 65536\fi} -% luatex/xetex also allow more math fam +% \end{macrocode} +% luatex/xetex also allow more math fam. +% \begin{macrocode} \edef \et@xmaxfam {\ifx\Umathchar\@undefined\sixt@@n\else\@cclvi\fi} % \end{macrocode} % @@ -513,9 +515,7 @@ \long\def\@firstofone#1{#1} % \end{macrocode} % -% \begin{macrocode} % Fix up allocations not to clash with |etex.src|. -% \end{macrocode} % % \begin{macrocode} \expandafter\csname newcount\endcsname\e@alloc@attribute@count @@ -785,9 +785,9 @@ %<latexrelease>\EndIncludeInRelease % \end{macrocode} % -% \begin{macrocode} % \changes{v1.0b}{2015/10/02}{Fix backing out of \TeX{} code} % \changes{v1.0c}{2015/10/02}{Allow backing out of Lua code} +% \begin{macrocode} %<latexrelease>\IncludeInRelease{0000/00/00} %<latexrelease> {\newluafunction}{LuaTeX}% %<latexrelease>\let\e@alloc@attribute@count\@undefined @@ -823,14 +823,6 @@ %<2ekernel> \the\everyjob %<*2ekernel,latexrelease> \directlua{% -%% Horrible hack, locally reset the luatex version number -%% This is not required for the source version of luaotfload -%% but is required due to an error in the version check in the -%% public version (January 2017) -%% https://github.com/lualatex/luaotfload/issues/387 -%% It is expected that this will be removed before TeXLive 2017 - local tmp_version=tex.luatexversion % - tex.luatexversion=199 % if xpcall(function ()% require('luaotfload-main')% end,texio.write_nl) then % @@ -839,7 +831,6 @@ texio.write_nl('Error in luaotfload: reverting to OT1')% tex.print('\string\\def\string\\encodingdefault{OT1}')% end % - tex.luatexversion=tmp_version% }% \let\f@encoding\encodingdefault \expandafter\let\csname ver@luaotfload.sty\endcsname\fmtversion @@ -910,7 +901,7 @@ local modules = modules or { } % \end{macrocode} % \end{macro} % -% \begin{macro}{provides\_module} +% \begin{macro}{provides_module} % \changes{v1.0a}{2015/09/24}{Function added} % \changes{v1.0f}{2015/10/03}{use luatexbase\_log} % Local function to write to the log. @@ -983,11 +974,11 @@ local function msg_format(mod, msg_type, text) end % \end{macrocode} % -% \begin{macro}{module\_info} +% \begin{macro}{module_info} % \changes{v1.0a}{2015/09/24}{Function added} -% \begin{macro}{module\_warning} +% \begin{macro}{module_warning} % \changes{v1.0a}{2015/09/24}{Function added} -% \begin{macro}{module\_error} +% \begin{macro}{module_error} % \changes{v1.0a}{2015/09/24}{Function added} % Write messages. % \begin{macrocode} @@ -1089,7 +1080,7 @@ luatexbase.registernumber = registernumber % % \subsection{Attribute allocation} % -% \begin{macro}{new\_attribute} +% \begin{macro}{new_attribute} % \changes{v1.0a}{2015/09/24}{Function added} % \changes{v1.1c}{2017/02/18}{Parameterise count used in tracking} % As attributes are used for Lua manipulations its useful to be able @@ -1106,7 +1097,8 @@ luatexbase.attributes = attributes % \end{macrocode} % % \begin{macrocode} -local attribute_count_name = attribute_count_name or "e@alloc@attribute@count" +local attribute_count_name = + attribute_count_name or "e@alloc@attribute@count" local function new_attribute(name) tex_setcount("global", attribute_count_name, tex_count[attribute_count_name] + 1) @@ -1124,7 +1116,7 @@ luatexbase.new_attribute = new_attribute % % \subsection{Custom whatsit allocation} % -% \begin{macro}{new\_whatsit} +% \begin{macro}{new_whatsit} % \changes{v1.1c}{2017/02/18}{Parameterise count used in tracking} % Much the same as for attribute allocation in Lua. % \begin{macrocode} @@ -1145,12 +1137,13 @@ luatexbase.new_whatsit = new_whatsit % % \subsection{Bytecode register allocation} % -% \begin{macro}{new\_bytecode} +% \begin{macro}{new_bytecode} % \changes{v1.1c}{2017/02/18}{Parameterise count used in tracking} % Much the same as for attribute allocation in Lua. % The optional \meta{name} argument is used in the log if given. % \begin{macrocode} -local bytecode_count_name = bytecode_count_name or "e@alloc@bytecode@count" +local bytecode_count_name = + bytecode_count_name or "e@alloc@bytecode@count" local function new_bytecode(name) tex_setcount("global", bytecode_count_name, tex_count[bytecode_count_name] + 1) @@ -1167,12 +1160,13 @@ luatexbase.new_bytecode = new_bytecode % % \subsection{Lua chunk name allocation} % -% \begin{macro}{new\_chunkname} +% \begin{macro}{new_chunkname} % \changes{v1.1c}{2017/02/18}{Parameterise count used in tracking} % As for bytecode registers but also store the name in the % |lua.name| table. % \begin{macrocode} -local chunkname_count_name = chunkname_count_name or "e@alloc@luachunk@count" +local chunkname_count_name = + chunkname_count_name or "e@alloc@luachunk@count" local function new_chunkname(name) tex_setcount("global", chunkname_count_name, tex_count[chunkname_count_name] + 1) @@ -1329,8 +1323,10 @@ local callbacktypes = callbacktypes or { finish_pdfpage = data, % \end{macrocode} % Section 8.7: font-related callbacks. +% \changes{v1.1e}{2017/03/28}{glyph\_stream\_provider added} % \begin{macrocode} define_font = exclusive, +% glyph_stream_provider = exclusive,% luatex 1.05 % \end{macrocode} % \changes{v1.0m}{2016/02/11}{pdf\_stream\_filter\_callback removed} % \begin{macrocode} @@ -1467,7 +1463,7 @@ local handlers = { local user_callbacks_defaults = { } % \end{macrocode} % -% \begin{macro}{create\_callback} +% \begin{macro}{create_callback} % \changes{v1.0a}{2015/09/24}{Function added} % \changes{v1.0i}{2015/11/29}{Check name is not nil in error message (PHG)} % \changes{v1.0k}{2015/12/02}{Give more specific error messages (PHG)} @@ -1495,7 +1491,7 @@ luatexbase.create_callback = create_callback % \end{macrocode} % \end{macro} % -% \begin{macro}{call\_callback} +% \begin{macro}{call_callback} % \changes{v1.0a}{2015/09/24}{Function added} % \changes{v1.0i}{2015/11/29}{Check name is not nil in error message (PHG)} % \changes{v1.0k}{2015/12/02}{Give more specific error messages (PHG)} @@ -1526,7 +1522,7 @@ luatexbase.call_callback=call_callback % \end{macrocode} % \end{macro} % -% \begin{macro}{add\_to\_callback} +% \begin{macro}{add_to_callback} % \changes{v1.0a}{2015/09/24}{Function added} % Add a function to a callback. First check arguments. % \changes{v1.0k}{2015/12/02}{Give more specific error messages (PHG)} @@ -1590,7 +1586,7 @@ luatexbase.add_to_callback = add_to_callback % \end{macrocode} % \end{macro} % -% \begin{macro}{remove\_from\_callback} +% \begin{macro}{remove_from_callback} % \changes{v1.0a}{2015/09/24}{Function added} % \changes{v1.0k}{2015/12/02}{adjust initialisation of cb local (PHG)} % \changes{v1.0k}{2015/12/02}{Give more specific error messages (PHG)} @@ -1647,7 +1643,7 @@ luatexbase.remove_from_callback = remove_from_callback % \end{macrocode} % \end{macro} % -% \begin{macro}{in\_callback} +% \begin{macro}{in_callback} % \changes{v1.0a}{2015/09/24}{Function added} % \changes{v1.0h}{2015/11/27}{Guard against undefined list latex/4445} % Look for a function description in a callback. @@ -1671,7 +1667,7 @@ luatexbase.in_callback = in_callback % \end{macrocode} % \end{macro} % -% \begin{macro}{disable\_callback} +% \begin{macro}{disable_callback} % \changes{v1.0a}{2015/09/24}{Function added} % As we subvert the engine interface we need to provide a way to access % this functionality. @@ -1687,7 +1683,7 @@ luatexbase.disable_callback = disable_callback % \end{macrocode} % \end{macro} % -% \begin{macro}{callback\_descriptions} +% \begin{macro}{callback_descriptions} % \changes{v1.0a}{2015/09/24}{Function added} % \changes{v1.0h}{2015/11/27}{Match test in in-callback latex/4445} % List the descriptions of functions registered for the given callback. |