diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-15 21:33:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-15 21:33:56 +0000 |
commit | 072dd7a5acb701ae0b52122ddb634413bb00ed39 (patch) | |
tree | 70c906df684aaddd51f1dc14ec3fbc937cd46133 /Master | |
parent | 445d236c0f79073b0e5509e7343fd934459ffca7 (diff) |
tex-ini-files (15apr16)
git-svn-id: svn://tug.org/texlive/trunk@40533 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
10 files changed, 100 insertions, 117 deletions
diff --git a/Master/texmf-dist/doc/generic/tex-ini-files/README.md b/Master/texmf-dist/doc/generic/tex-ini-files/README.md index 2807e9b07ee..3a7b94b0bdd 100644 --- a/Master/texmf-dist/doc/generic/tex-ini-files/README.md +++ b/Master/texmf-dist/doc/generic/tex-ini-files/README.md @@ -9,19 +9,18 @@ work with XeTeX and LuaTeX. ## Shared configuration -The file `pdftexconfig.dat` contains common settings for pdfTeX +The file `pdftexconfig.tex` contains common settings for pdfTeX and LuaTeX, most of which are concerned with direct PDF output. -These settings are given in a key-value format and are named -based on the pdfTeX 1.40 primitives. The values for the settings -themselves is taken from the standard values in TeX Live 2010 -with the paper size set as A4. +This file is designed to be loaded directly by pdfTeX and can +be parsed by the `luatexconfig.tex` to allow the same settings +to be used by LuaTeX directly. The format of the file +`pdftexconfig.tex` is strictly -Loading this data in pdfTeX is achieved by `pdftexconfig.tex`, -whereas for LuaTeX the file `luatexconfig.tex` is needed. Both -of these files will load the shared data file and assign the -appropriate primitives. + <pdfTeX primitive> = <value> -The loaders recognise the marker control sequence `\dvimode`. +for all non-comment non-blank lines. + +The LuaTeX loader recognise the marker control sequence `\dvimode`. If this is defined, the loaders will set the format to produce DVI file, and otherwise will select direct PDF output. The loader will then undefine `\dvimode`. @@ -45,6 +44,8 @@ files and engines available from late 2015 onward, in particular: Major changes: - 2016-02-27 First version of bundle +- 2016-04-14 Do not assume e-TeX availability in `pdftexconfig.tex` +- 2016-04-15 New approach to loading shared pdfTeX/LuaTeX data A full history of this bundle is available from https://github.com/josephwright/tex-ini-files diff --git a/Master/texmf-dist/tex/generic/tex-ini-files/dvilualatex.ini b/Master/texmf-dist/tex/generic/tex-ini-files/dvilualatex.ini index fab2324984d..476ee45f45b 100644 --- a/Master/texmf-dist/tex/generic/tex-ini-files/dvilualatex.ini +++ b/Master/texmf-dist/tex/generic/tex-ini-files/dvilualatex.ini @@ -1,4 +1,4 @@ -% tex-ini-files 2016-04-14: dvilualatex.ini +% tex-ini-files 2016-04-15: dvilualatex.ini \let\dvimode\relax \input lualatex.ini diff --git a/Master/texmf-dist/tex/generic/tex-ini-files/dviluatex.ini b/Master/texmf-dist/tex/generic/tex-ini-files/dviluatex.ini index 5511d4144b7..abe93aa343b 100644 --- a/Master/texmf-dist/tex/generic/tex-ini-files/dviluatex.ini +++ b/Master/texmf-dist/tex/generic/tex-ini-files/dviluatex.ini @@ -1,4 +1,4 @@ -% tex-ini-files 2016-04-14: dvilualatex.ini +% tex-ini-files 2016-04-15: dvilualatex.ini \let\dvimode\relax \input luatex.ini diff --git a/Master/texmf-dist/tex/generic/tex-ini-files/lualatex.ini b/Master/texmf-dist/tex/generic/tex-ini-files/lualatex.ini index 3bcdbc197f5..1f7a49813a8 100644 --- a/Master/texmf-dist/tex/generic/tex-ini-files/lualatex.ini +++ b/Master/texmf-dist/tex/generic/tex-ini-files/lualatex.ini @@ -1,4 +1,4 @@ -% tex-ini-files 2016-04-14: lualatex.ini +% tex-ini-files 2016-04-15: lualatex.ini % Originally written 2008 by Karl Berry. Public domain. diff --git a/Master/texmf-dist/tex/generic/tex-ini-files/luatex.ini b/Master/texmf-dist/tex/generic/tex-ini-files/luatex.ini index 4dafd459375..1a592cf15d2 100644 --- a/Master/texmf-dist/tex/generic/tex-ini-files/luatex.ini +++ b/Master/texmf-dist/tex/generic/tex-ini-files/luatex.ini @@ -1,4 +1,4 @@ -% tex-ini-files 2016-04-14: luatex.ini +% tex-ini-files 2016-04-15: luatex.ini % Karl Berry, originally written 2008. Public domain. % PDF output by default. diff --git a/Master/texmf-dist/tex/generic/tex-ini-files/luatexconfig.tex b/Master/texmf-dist/tex/generic/tex-ini-files/luatexconfig.tex index aa9cb55af96..5ad8913b65a 100644 --- a/Master/texmf-dist/tex/generic/tex-ini-files/luatexconfig.tex +++ b/Master/texmf-dist/tex/generic/tex-ini-files/luatexconfig.tex @@ -1,4 +1,4 @@ -% tex-ini-files 2016-04-14: luatexconfig.tex +% tex-ini-files 2016-04-15: luatexconfig.tex % Load shared (PDF) settings in LuaTeX @@ -6,63 +6,64 @@ \catcode`\{=1 % \catcode`\}=2 % \catcode`\#=6 % - % Enable one marker primitive and one for the looping - \directlua{ - tex.enableprimitives("", {"pdfvariable", "unless"}) + % Settings that were primitives + % accessed in newer LuaTeX releases via \pdfvariable + \def\list{% + {compresslevel}% + {decimaldigits}% + {horigin}% + {minorversion}% + {objcompresslevel}% + {pkresolution}% + {vorigin}% }% - % From plain.tex - \def\loop#1\repeat{\def\body{#1}\iterate}% - \def\iterate{% - \body - \let\next\iterate - \else - \let\next\relax + \def\do#1{% + \ifx\relax#1\else + \directlua{tex.enableprimitives("", {"pdf#1"})}% + \expandafter\do \fi - \next }% - \let\repeat\fi - % The format of the data lines themselves is simple - \ifx\pdfvariable\undefined - \def\parse#1 = #2\relax{% - \directlua{tex.enableprimitives("", {"pdf#1"})}% - \expandafter\global\csname pdf#1\endcsname = #2 % - \expandafter\global\expandafter\let\csname pdf#1\endcsname\undefined - }% - \directlua{tex.enableprimitives("", {"pdfoutput"})}% - \global\pdfoutput = \ifx\dvimode\undefined 1\else 0\fi\relax - \global\let\pdfoutput\undefined - \else - \directlua{ - tex.enableprimitives("", {"pageheight", "pagewidth", "outputmode"}) - }% - \global\outputmode = \ifx\dvimode\undefined 1\else 0\fi\relax - \global\let\outputmode\undefined - \def\parse#1 = #2\relax{% - \expandafter\ifx\csname #1\endcsname\relax - \global\pdfvariable #1 = #2 % - \else - \expandafter\global\csname #1\endcsname = #2 % + % Enable all \pdf... primitives in one go + \expandafter\do\list{output}{pageheight}{pagewidth}{variable}\relax + % Other required primitives that are not named \pdf... + \directlua{tex.enableprimitives("", + {"pageheight", "pagewidth", "outputmode"})}% + % Newer LuaTeX releases don't have \pdfoutput, etc.: + % emulate names where appropriate + \ifx\pdfoutput\undefined + \global\let\pdfoutput\outputmode + \global\let\pdfpageheight\pageheight + \global\let\pdfpagewidth\pagewidth + \def\do#1{% + \ifx\relax#1\else + \expandafter\xdef\csname pdf#1\endcsname{\pdfvariable #1}% + \expandafter\do \fi }% + \expandafter\do\list\relax \fi - \def\storedpar{\par}% - % Read the raw data - \openin0=pdftexconfig.dat % - \loop\unless\ifeof0 % - \read0 to \line - \unless\ifx\line\storedpar - \if\relax\line\relax - \else - \expandafter\parse\line\relax - \fi + % The file pdftexconfig.tex contains only <primitive> = <value> lines + % so can now be read using the (emulated) primitives + % This needs to be global so set \globaldefs for this step + \globaldefs=1 % + \input{pdftexconfig}% + \globaldefs=0 % + % Pick up on a request for DVI mode and apply it whilst \pdfoutput is + % still defined + \ifx\dvimode\relax + \global\pdfoutput=0 % + \fi + \global\let\dvimode\undefined + % Clean up all of the globally-allocated names + \def\do#1{% + \ifx\relax#1\else + \global\expandafter\let\csname pdf#1\endcsname\undefined + \expandafter\do \fi - \repeat + }% + \expandafter\do\list{output}{pageheight}{pagewidth}{variable}\relax + \global\let\outputmode\undefined + \global\let\pageheight\undefined + \global\let\pagewidth\undefined + \global\let\dvimode\undefined \endgroup - -% Tidy up primitives and DVI mode marker -\global\let\pageheight\undefined -\global\let\pagewidth\undefined -\global\let\pdfvariable\undefined -\global\let\unless\undefined - -\global\let\dvimode\undefined diff --git a/Master/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.dat b/Master/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.dat deleted file mode 100644 index 3bd403e5d3d..00000000000 --- a/Master/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.dat +++ /dev/null @@ -1,18 +0,0 @@ -% tex-ini-files 2016-04-14: pdftexconfig.dat - -% Shared configuration for pdfTeX/LuaTeX low-level settings - -% Paper size: dimensions given in absolute terms -pageheight = 297 true mm -pagewidth = 210 true mm - -% Enable PDF 1.5 output and thus more compression -minorversion = 5 -objcompresslevel = 2 - -% Low-level settings unlikely ever to need to change -compresslevel = 9 -decimaldigits = 3 -pkresolution = 600 -horigin = 1 true in -vorigin = 1 true in diff --git a/Master/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex b/Master/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex index a3f7b6eca23..44c25abcbd4 100644 --- a/Master/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex +++ b/Master/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex @@ -1,32 +1,21 @@ -% tex-ini-files 2016-04-14: pdftexconfig.tex +% tex-ini-files 2016-04-15: pdftexconfig.tex % Load shared (PDF) settings in pdfTeX -% This needs a bit of work to read the file line-by-line -\begingroup - \catcode`\{=1 % - \catcode`\}=2 % - \catcode`\#=6 % - % From apnum.tex - \def\loop#1\repeat{\def\body{#1\relax\expandafter\body\fi}\body}% - \let\repeat\fi - % The format of the data lines themselves is simple - \def\parse#1 = #2\relax{\expandafter\global\csname pdf#1\endcsname = #2 }% - \def\storedpar{\par}% - % Read the raw data - \openin0=pdftexconfig.dat % - \loop\ifeof0 \else - \read0 to \line - \ifx\line\storedpar\else - \if\relax\line\relax - \else - \expandafter\parse\line\relax - \fi - \fi - \repeat -\endgroup +% Enable PDF output +\pdfoutput = 1 -\global\pdfoutput = \ifx\dvimode\undefined 1\else 0\fi\relax -\global\let\dvimode\undefined +% Paper size: dimensions given in absolute terms +\pdfpageheight = 297 true mm +\pdfpagewidth = 210 true mm -\endinput +% Enable PDF 1.5 output and thus more compression +\pdfminorversion = 5 +\pdfobjcompresslevel = 2 + +% Low-level settings unlikely ever to need to change +\pdfcompresslevel = 9 +\pdfdecimaldigits = 3 +\pdfpkresolution = 600 +\pdfhorigin = 1 true in +\pdfvorigin = 1 true in diff --git a/Master/texmf-dist/tex/generic/tex-ini-files/xelatex.ini b/Master/texmf-dist/tex/generic/tex-ini-files/xelatex.ini index da3501908d8..ef0432c241c 100644 --- a/Master/texmf-dist/tex/generic/tex-ini-files/xelatex.ini +++ b/Master/texmf-dist/tex/generic/tex-ini-files/xelatex.ini @@ -1,4 +1,4 @@ -% tex-ini-files 2016-04-14: xelatex.ini +% tex-ini-files 2016-04-15: xelatex.ini % Public domain. Originally by Jonathan Kew. diff --git a/Master/texmf-dist/tex/generic/tex-ini-files/xetex.ini b/Master/texmf-dist/tex/generic/tex-ini-files/xetex.ini index bc74c985fd6..717589b4693 100644 --- a/Master/texmf-dist/tex/generic/tex-ini-files/xetex.ini +++ b/Master/texmf-dist/tex/generic/tex-ini-files/xetex.ini @@ -1,4 +1,4 @@ -% tex-ini-files 2016-04-14: xetex.ini +% tex-ini-files 2016-04-15: xetex.ini % Public domain. Originally by Jonathan Kew. @@ -34,7 +34,7 @@ \global\XeTeXinterchartoks 1 1 = {\xtxHanGlue} \global\XeTeXinterchartoks 1 2 = {\xtxHanGlue} \global\XeTeXinterchartoks 1 3 = {\nobreak\xtxHanGlue} - + \global\XeTeXinterchartoks 2 1 = {\nobreak\xtxHanGlue} \global\XeTeXinterchartoks 2 2 = {\nobreak\xtxHanGlue} \global\XeTeXinterchartoks 2 3 = {\xtxHanGlue} @@ -66,7 +66,7 @@ \let\s@vef@nt=\und@fined % -% Allocator for \XeTeXintercharclass values, from Enrico Gregorio +% Allocator for \XeTeXintercharclass values, from Enrico Gregorio % \newcount\xe@alloc@intercharclass % allocates intercharclass \xe@alloc@intercharclass=\thr@@ % from 4 (1,2 and 3 are used by CJK, AFAIK) @@ -80,7 +80,17 @@ \errmessage{No room for a new #3}% \fi} \def\newXeTeXintercharclass{% - \xe@alloc@\xe@alloc@intercharclass\XeTeXintercharclass\chardef\@cclv} % At most 254 + \xe@alloc@\xe@alloc@intercharclass\XeTeXcharclass\chardef\xe@charclass@boundary} + +% The limit for character class has been enlarged from 256 to 4096 since XeTeX 0.99994. +% So the boundary of character class is changed from 255 to 4095. +% Primitive \XeTeXinterwordspaceshaping is introduced by XeTeX 0.99994. +% We can use it as a flag. +\ifx\XeTeXinterwordspaceshaping\und@fined + \chardef\xe@charclass@boundary=\@cclv +\else + \chardef\xe@charclass@boundary=4095 % +\fi % Primitives in pdfTeX and LuaTeX, we'll just use macros here. % Since we are generating a whatsit, not 100% compatible, |