From f2c544db15e39f47082849b2a648f144852810d0 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 20 Nov 2023 20:54:50 +0000 Subject: tex-ini-files, now merging most from TL-specific dirs git-svn-id: svn://tug.org/texlive/trunk@68920 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/latexconfig/latex.ini | 22 -------- .../tex/latex/latexconfig/lualatexquotejobname.lua | 26 --------- .../tex/latex/latexconfig/lualatexquotejobname.tex | 63 ---------------------- .../texmf-dist/tex/latex/latexconfig/mllatex.ini | 3 -- .../texmf-dist/tex/latex/latexconfig/pdflatex.ini | 5 -- .../tex/latex/tex-ini-files/dvilualatex.ini | 4 ++ .../texmf-dist/tex/latex/tex-ini-files/latex.ini | 24 +++++++++ .../tex/latex/tex-ini-files/lualatex.ini | 19 +++++++ .../latex/tex-ini-files/lualatexquotejobname.lua | 27 ++++++++++ .../texmf-dist/tex/latex/tex-ini-files/mllatex.ini | 5 ++ .../tex/latex/tex-ini-files/pdflatex.ini | 6 +++ .../texmf-dist/tex/latex/tex-ini-files/xelatex.ini | 17 ++++++ 12 files changed, 102 insertions(+), 119 deletions(-) delete mode 100644 Master/texmf-dist/tex/latex/latexconfig/latex.ini delete mode 100644 Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.lua delete mode 100644 Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex delete mode 100644 Master/texmf-dist/tex/latex/latexconfig/mllatex.ini delete mode 100644 Master/texmf-dist/tex/latex/latexconfig/pdflatex.ini create mode 100644 Master/texmf-dist/tex/latex/tex-ini-files/dvilualatex.ini create mode 100644 Master/texmf-dist/tex/latex/tex-ini-files/latex.ini create mode 100644 Master/texmf-dist/tex/latex/tex-ini-files/lualatex.ini create mode 100644 Master/texmf-dist/tex/latex/tex-ini-files/lualatexquotejobname.lua create mode 100644 Master/texmf-dist/tex/latex/tex-ini-files/mllatex.ini create mode 100644 Master/texmf-dist/tex/latex/tex-ini-files/pdflatex.ini create mode 100644 Master/texmf-dist/tex/latex/tex-ini-files/xelatex.ini (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/latexconfig/latex.ini b/Master/texmf-dist/tex/latex/latexconfig/latex.ini deleted file mode 100644 index 984b8e96ce2..00000000000 --- a/Master/texmf-dist/tex/latex/latexconfig/latex.ini +++ /dev/null @@ -1,22 +0,0 @@ -% Thomas Esser, 1998. public domain. -% -\ifx\pdfoutput\undefined \else - \ifx\pdfoutput\relax \else - % - % We're building the latex format with the pdfetex engine (started 2004). - \input pdftexconfig - \pdfoutput=0 - % - % pdfTeX related primitives are no longer hidden by default - % (started 2005). Uncomment and recreate the format files by running - % "fmtutil --all" resp. "fmtutil-sys --all" to revert to the old - % (2004) behaviour. - % \input pdftex-dvi.tex - % - \fi -\fi -% -% the usual format initialization. -\scrollmode -\input latex.ltx -\endinput diff --git a/Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.lua b/Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.lua deleted file mode 100644 index 1809a67874d..00000000000 --- a/Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.lua +++ /dev/null @@ -1,26 +0,0 @@ --- $Id: lualatexquotejobname.tex 22957 2011-06-13 20:49:26Z mpg $ --- Manuel Pegourie-Gonnard, originally written 2010. WTFPL v2. --- --- Goal: see lualatexquotejobname.tex --- --- Cache the results of previous calls, not so much for the speed gain which --- probably doesn't matter, but to avoid repeated error messages. -local jobname_cache = {} -callback.register('process_jobname', function(jobname) - -- use a cached version if available - local cached = jobname_cache[jobname] - if cached ~= nil then return cached end - -- remove the quotes in jobname - local clean, n_quotes = jobname:gsub([["]], [[]]) - -- complain if they wasn't an even number of quotes (aka unbalanced) - if n_quotes % 2 ~= 0 then - texio.write_nl('! Unbalanced quotes in jobname: ' .. jobname ) - end - -- add quotes around the cleaned up jobname if necessary - if jobname:find(' ') then - clean = '"' .. clean .. '"' - end - -- remember the result before returning - jobname_cache[jobname] = clean - return clean -end) diff --git a/Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex b/Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex deleted file mode 100644 index cea56d72bcd..00000000000 --- a/Master/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.tex +++ /dev/null @@ -1,63 +0,0 @@ -% $Id$ -% Manuel Pegourie-Gonnard, originally written 2010. WTFPL v2. -% -% Quote \jobname if it contains spaces, similarly to what other engines do. -% -% Recent versions of luatex kindly provide a process_jobname callback for -% this. Detect if it is available and use a fallback in pure TeX otherwise. -% If using the callback, register it at \everyjob time since callbacks are not -% dumped in formats currently. -% -% The TeX version fails (jobname is set to texput) with invocations like -% luatex '\input foo' -% but work correctly with the following: -% luatex foo\ bar -% luatex -jobname foo\ bar '\input "foo bar"' -% It is is not possible to support all this case without the callback. It is -% debatable if supporting another set cases would be better, but this is the -% historical (TL 2010) behaviour, so just keep it. -% -% \jobname quoting is normalized in the same way as in web2c's -% normalize_quotes() function (see lib/texmfmp.c, non-XeTeX case), that is: -% - remove quotes -% - complain if quotes are not "balanced" (ie not in even number) -% - enclose the result in quotes iff it contains spaces -% -% This file is inputed after latex.ltx. -% -\makeatletter -\everyjob\expandafter{\the\everyjob - \ifcase\directlua{ - tex.sprint(callback.list().process_jobname == nil and 0 or 1)}\relax - % no callback, do what we can in TeX - \begingroup - % strip quotes from job name and count them - \def\stripquotes#1"#2\@nil{% - \edef\clean{\clean#1}% - \ifx\empty#2\empty \else - \advance\count@\@ne - \stripquotes#2\@nil - \fi}% - \count@\z@ - \def\clean{}% - \expandafter\stripquotes\jobname"\@nil - % complain if their was not an even ("balanced") number of quotes - \ifodd\count@ - \errmessage{Unbalanced quotes in jobname: \jobname}% - \fi - % now check if their are spaces and quote if necessary - \def\testsp#1 #2\@nil{% - \ifx\empty#2\empty - \edef\fixjobname{\def\noexpand\jobname{\clean}}% - \else - \edef\fixjobname{\def\noexpand\jobname{"\clean"}}% - \fi}% - \edef\dotest{\noexpand\testsp\clean\space\noexpand\@nil}\dotest - % do it after closing the group - \expandafter\endgroup\fixjobname - \or % callback available, use it - % function in a separate file for convenience (uses %, ~, etc) - \directlua{dofile(assert(kpse.find_file("lualatexquotejobname.lua")))} - \fi} -\makeatother -\endinput diff --git a/Master/texmf-dist/tex/latex/latexconfig/mllatex.ini b/Master/texmf-dist/tex/latex/latexconfig/mllatex.ini deleted file mode 100644 index 3ae01d135c2..00000000000 --- a/Master/texmf-dist/tex/latex/latexconfig/mllatex.ini +++ /dev/null @@ -1,3 +0,0 @@ -% Thomas Esser, 1998. public domain. -\scrollmode -\input latex.ltx diff --git a/Master/texmf-dist/tex/latex/latexconfig/pdflatex.ini b/Master/texmf-dist/tex/latex/latexconfig/pdflatex.ini deleted file mode 100644 index f868629c086..00000000000 --- a/Master/texmf-dist/tex/latex/latexconfig/pdflatex.ini +++ /dev/null @@ -1,5 +0,0 @@ -% Thomas Esser, 1998. public domain. -\input pdftexconfig.tex -\scrollmode -\input latex.ltx -\endinput diff --git a/Master/texmf-dist/tex/latex/tex-ini-files/dvilualatex.ini b/Master/texmf-dist/tex/latex/tex-ini-files/dvilualatex.ini new file mode 100644 index 00000000000..dcb75e3f534 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tex-ini-files/dvilualatex.ini @@ -0,0 +1,4 @@ +% tex-ini-files 20223-11-17: dvilualatex.ini + +\let\dvimode\relax +\input lualatex.ini diff --git a/Master/texmf-dist/tex/latex/tex-ini-files/latex.ini b/Master/texmf-dist/tex/latex/tex-ini-files/latex.ini new file mode 100644 index 00000000000..665dda30364 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tex-ini-files/latex.ini @@ -0,0 +1,24 @@ +% tex-ini-files 20223-11-17: latex.ini + +% Thomas Esser, 1998. public domain. +% +\ifx\pdfoutput\undefined \else + \ifx\pdfoutput\relax \else + % + % We're building the latex format with the pdfetex engine (started 2004). + \input pdftexconfig + \pdfoutput=0 + % + % pdfTeX related primitives are no longer hidden by default + % (started 2005). Uncomment and recreate the format files by running + % "fmtutil --all" resp. "fmtutil-sys --all" to revert to the old + % (2004) behaviour. + % \input pdftex-dvi.tex + % + \fi +\fi +% +% the usual format initialization. +\scrollmode +\input latex.ltx +\endinput diff --git a/Master/texmf-dist/tex/latex/tex-ini-files/lualatex.ini b/Master/texmf-dist/tex/latex/tex-ini-files/lualatex.ini new file mode 100644 index 00000000000..a23534c094d --- /dev/null +++ b/Master/texmf-dist/tex/latex/tex-ini-files/lualatex.ini @@ -0,0 +1,19 @@ +% tex-ini-files 20223-11-17: lualatex.ini + +% Originally written 2008 by Karl Berry. Public domain. + +\input luatexconfig.tex + +\begingroup + \catcode`\{=1 % + \catcode`\}=2 % + % Set up job name quoting before latex.ltx + % Web2c pdfTeX/XeTeX quote job names containing spaces, but LuaTeX does + % not do this at the engine level. The behaviour can be changed using + % a callback. Originally this code was loaded via lualatexquotejobname.tex + % but that required a hack around latex.ltx: the behaviour has been altered + % to allow the callback route to be used directly. + \global\everyjob{\directlua{require("lualatexquotejobname.lua")}} +\endgroup + +\input latex.ltx diff --git a/Master/texmf-dist/tex/latex/tex-ini-files/lualatexquotejobname.lua b/Master/texmf-dist/tex/latex/tex-ini-files/lualatexquotejobname.lua new file mode 100644 index 00000000000..2980c78e264 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tex-ini-files/lualatexquotejobname.lua @@ -0,0 +1,27 @@ +-- tex-ini-files 20223-11-17: lualatexquotejobname.tex + +-- Manuel Pegourie-Gonnard, originally written 2010. WTFPL v2. +-- +-- Goal: see lualatexquotejobname.tex +-- +-- Cache the results of previous calls, not so much for the speed gain which +-- probably doesn't matter, but to avoid repeated error messages. +local jobname_cache = {} +callback.register('process_jobname', function(jobname) + -- use a cached version if available + local cached = jobname_cache[jobname] + if cached ~= nil then return cached end + -- remove the quotes in jobname + local clean, n_quotes = jobname:gsub([["]], [[]]) + -- complain if they wasn't an even number of quotes (aka unbalanced) + if n_quotes % 2 ~= 0 then + texio.write_nl('! Unbalanced quotes in jobname: ' .. jobname ) + end + -- add quotes around the cleaned up jobname if necessary + if jobname:find(' ') then + clean = '"' .. clean .. '"' + end + -- remember the result before returning + jobname_cache[jobname] = clean + return clean +end) diff --git a/Master/texmf-dist/tex/latex/tex-ini-files/mllatex.ini b/Master/texmf-dist/tex/latex/tex-ini-files/mllatex.ini new file mode 100644 index 00000000000..727b702a862 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tex-ini-files/mllatex.ini @@ -0,0 +1,5 @@ +% tex-ini-files 20223-11-17: mllatex.ini + +% Thomas Esser, 1998. public domain. +\scrollmode +\input latex.ltx diff --git a/Master/texmf-dist/tex/latex/tex-ini-files/pdflatex.ini b/Master/texmf-dist/tex/latex/tex-ini-files/pdflatex.ini new file mode 100644 index 00000000000..6e89d697d64 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tex-ini-files/pdflatex.ini @@ -0,0 +1,6 @@ +% tex-ini-files 20223-11-17: pdflatex.ini + +% Thomas Esser, 1998. public domain. +\input pdftexconfig.tex +\input latex.ltx +\endinput diff --git a/Master/texmf-dist/tex/latex/tex-ini-files/xelatex.ini b/Master/texmf-dist/tex/latex/tex-ini-files/xelatex.ini new file mode 100644 index 00000000000..902392407ba --- /dev/null +++ b/Master/texmf-dist/tex/latex/tex-ini-files/xelatex.ini @@ -0,0 +1,17 @@ +% tex-ini-files 20223-11-17: xelatex.ini + +% Public domain. Originally by Jonathan Kew. + +% Primitives in pdftex and luatex, we'll just use macros here. +% Since we are generating a whatsit, not 100% compatible, +% but hopefully close enough. +% +\begingroup + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \csname protected\endcsname\gdef\pdfmapfile#1{\special{pdf:mapfile #1}}% + \csname protected\endcsname\gdef\pdfmapline#1{\special{pdf:mapline #1}}% +\endgroup + +\input latex.ltx -- cgit v1.2.3