diff options
Diffstat (limited to 'Master/texmf-dist/source/latex-dev/base/ltfinal.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex-dev/base/ltfinal.dtx | 73 |
1 files changed, 69 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx b/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx index d6fa6e8a7bf..19f82934aa6 100644 --- a/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx +++ b/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltfinal.dtx} - [2021/02/25 v2.2m LaTeX Kernel (Final Settings)] + [2021/04/18 v2.2o LaTeX Kernel (Final Settings)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltfinal.dtx} @@ -242,7 +242,73 @@ % \end{macro} % \end{macro} % -% +% \begin{macro}{trace_stack_levels} +% Now define the Lua function to emulate \cs{tracingstacklevels} and +% install it in the \texttt{input_level_string} callback. +% \begin{macrocode} +%</2ekernel> +%<*2ekernel|latexrelease> +% \end{macrocode} +% In \texttt{latexrelease} mode we always remove the function from +% the callback, then add the correct version later. +% \begin{macrocode} +%<latexrelease>\ifx\directlua\@undefined +%<latexrelease>\else +%<latexrelease> \directlua{% +%<latexrelease> if luatexbase.callbacktypes['input_level_string'] and % +%<latexrelease> luatexbase.in_callback('input_level_string','tracingstacklevels') then +%<latexrelease> luatexbase.remove_from_callback('input_level_string','tracingstacklevels') +%<latexrelease> end}% +%<latexrelease>\fi +%<latexrelease>\IncludeInRelease{2021/06/01}{trace_stack_levels}% +%<latexrelease> {Lua trace_stack_levels function}% +\ifx\directlua\@undefined +\else +%<*2ekernel> + \expanded{% + \everyjob{\the\everyjob + \noexpand%\directlua +%</2ekernel> + \directlua{% + local function trace_stack_levels (input_ptr) + local tracingstacklevels = tex.count.tracingstacklevels + if tex.tracingmacros > 0 or input_ptr < tracingstacklevels then + if tracingstacklevels > 0 then + if input_ptr < tracingstacklevels then + return "\string\n\string~" .. string.rep(".",input_ptr) + else + return "\string~\string~" + end + else + return "\string\n" + end + else + return "" + end + end +%<latexrelease> if luatexbase.callbacktypes['input_level_string'] then + luatexbase.add_to_callback('input_level_string', + trace_stack_levels,'tracingstacklevels') +%<latexrelease> end + }% +%<*2ekernel> + }}% +%</2ekernel> +\fi +%<latexrelease>\EndIncludeInRelease +%<latexrelease> +% \end{macrocode} +% Then for the full rollback, just do nothing, since the function +% was already taken out of the rollback above. +% \begin{macrocode} +%<latexrelease>\IncludeInRelease{0000/00/00}{trace_stack_levels}% +%<latexrelease> {Lua trace_stack_levels function}% +%<latexrelease>% Nothing here +%<latexrelease>\EndIncludeInRelease +%</2ekernel|latexrelease> +%<*2ekernel> +% \end{macrocode} +% \end{macro} % % The default values of the picture and |\fbox| parameters: % \begin{macrocode} @@ -574,7 +640,7 @@ % \begin{macrocode} %</2ekernel> %<*2ekernel|latexrelease> -%<latexrelease>\IncludeInRelease{2021/05/01}% +%<latexrelease>\IncludeInRelease{2021/06/01}% %<latexrelease> {\pdfgentounicode}{Preload glyphtounicode}% \ifx \pdfgentounicode \@undefined \else %<*2ekernel> @@ -1194,7 +1260,6 @@ % {Load first aid file if existing} % \begin{macrocode} \@input{latex2e-first-aid-for-external-files.ltx} -\@input{ltpara.ltx} % \end{macrocode} % % |