summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-06 21:43:13 +0000
committerKarl Berry <karl@freefriends.org>2016-04-06 21:43:13 +0000
commitc534836c5cf31728afb592a36ab345f786e06e39 (patch)
tree0ab23c1a08aac90df04c7e472d529af19f395d2c /Master/texmf-dist/tex/generic
parent5c59ebfc8bb1cabb783923ac8f627f6982216385 (diff)
tex-ini-files (27feb16)
git-svn-id: svn://tug.org/texlive/trunk@40270 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic')
-rw-r--r--Master/texmf-dist/tex/generic/tex-ini-files/dvilualatex.ini4
-rw-r--r--Master/texmf-dist/tex/generic/tex-ini-files/dviluatex.ini4
-rw-r--r--Master/texmf-dist/tex/generic/tex-ini-files/lualatex.ini19
-rw-r--r--Master/texmf-dist/tex/generic/tex-ini-files/luatex.ini12
-rw-r--r--Master/texmf-dist/tex/generic/tex-ini-files/luatexconfig.tex68
-rw-r--r--Master/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex40
-rw-r--r--Master/texmf-dist/tex/generic/tex-ini-files/xelatex.ini17
-rw-r--r--Master/texmf-dist/tex/generic/tex-ini-files/xetex.ini99
8 files changed, 263 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/tex-ini-files/dvilualatex.ini b/Master/texmf-dist/tex/generic/tex-ini-files/dvilualatex.ini
new file mode 100644
index 00000000000..3779819e1e1
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/tex-ini-files/dvilualatex.ini
@@ -0,0 +1,4 @@
+% tex-ini-files 2016-02-27: 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
new file mode 100644
index 00000000000..e60ec1eb65f
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/tex-ini-files/dviluatex.ini
@@ -0,0 +1,4 @@
+% tex-ini-files 2016-02-27: 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
new file mode 100644
index 00000000000..2de7eda514d
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/tex-ini-files/lualatex.ini
@@ -0,0 +1,19 @@
+% tex-ini-files 2016-02-27: 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/generic/tex-ini-files/luatex.ini b/Master/texmf-dist/tex/generic/tex-ini-files/luatex.ini
new file mode 100644
index 00000000000..3da734be83c
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/tex-ini-files/luatex.ini
@@ -0,0 +1,12 @@
+% tex-ini-files 2016-02-27: luatex.ini
+
+% Karl Berry, originally written 2008. Public domain.
+% PDF output by default.
+
+% Must be done first (as needs to 'tidy up')
+\input luatexconfig.tex
+% Activate primitives
+\input luatexiniconfig.tex
+\input load-unicode-data.tex
+\input etex.src
+\dump
diff --git a/Master/texmf-dist/tex/generic/tex-ini-files/luatexconfig.tex b/Master/texmf-dist/tex/generic/tex-ini-files/luatexconfig.tex
new file mode 100644
index 00000000000..fa9f81a3b9e
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/tex-ini-files/luatexconfig.tex
@@ -0,0 +1,68 @@
+% tex-ini-files 2016-02-27: luatexconfig.tex
+
+% Load shared (PDF) settings in LuaTeX
+
+\begingroup
+ \catcode`\{=1 %
+ \catcode`\}=2 %
+ \catcode`\#=6 %
+ % Enable one marker primitive and one for the looping
+ \directlua{
+ tex.enableprimitives("", {"pdfvariable", "unless"})
+ }%
+ % From plain.tex
+ \def\loop#1\repeat{\def\body{#1}\iterate}%
+ \def\iterate{%
+ \body
+ \let\next\iterate
+ \else
+ \let\next\relax
+ \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 %
+ \fi
+ }%
+ \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
+ \fi
+ \repeat
+\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.tex b/Master/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex
new file mode 100644
index 00000000000..6ab04b81193
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex
@@ -0,0 +1,40 @@
+% tex-ini-files 2016-02-27: 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 plain.tex
+ \def\loop#1\repeat{\def\body{#1}\iterate}%
+ \def\iterate{%
+ \body
+ \let\next\iterate
+ \else
+ \let\next\relax
+ \fi
+ \next
+ }%
+ \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\unless\ifeof0 %
+ \read0 to \line
+ \unless\ifx\line\storedpar
+ \if\relax\line\relax
+ \else
+ \expandafter\parse\line\relax
+ \fi
+ \fi
+ \repeat
+\endgroup
+
+\global\pdfoutput = \ifx\dvimode\undefined 1\else 0\fi\relax
+\global\let\dvimode\undefined
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/tex-ini-files/xelatex.ini b/Master/texmf-dist/tex/generic/tex-ini-files/xelatex.ini
new file mode 100644
index 00000000000..8e34b9c95ee
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/tex-ini-files/xelatex.ini
@@ -0,0 +1,17 @@
+% tex-ini-files 2016-02-27: 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 %
+ \protected\gdef\pdfmapfile#1{\special{pdf:mapfile #1}}%
+ \protected\gdef\pdfmapline#1{\special{pdf:mapline #1}}%
+\endgroup
+
+\input latex.ltx
diff --git a/Master/texmf-dist/tex/generic/tex-ini-files/xetex.ini b/Master/texmf-dist/tex/generic/tex-ini-files/xetex.ini
new file mode 100644
index 00000000000..15f0fb7b7ea
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/tex-ini-files/xetex.ini
@@ -0,0 +1,99 @@
+% tex-ini-files 2016-02-27: xetex.ini
+
+% Public domain. Originally by Jonathan Kew.
+
+%% Disable the \font\preloaded=... entries from plain.tex
+%% as XeTeX is primarily intended for use with other fonts
+\catcode`\{=1 \catcode`\}=2 \catcode`\#=6 \catcode`\^=7 \catcode`\@=11
+
+\scrollmode
+
+% General Unicode set up
+\input load-unicode-data.tex %
+
+% Classes that have always been defined by the XeTeX format
+\input load-unicode-xetex-classes.tex %
+
+% Let etex.src handle things if eTeX is not enabled!
+\ifx\XeTeXinterchartoks\undefined
+\else
+ % basic line-breaking support for CJK etc; override for more sophisticated spacing,
+ % automatic font changes, etc.
+
+ \gdef\xtxHanGlue{\hskip0pt plus 0.1em\relax} % between ideographs
+ \gdef\xtxHanSpace{\hskip0.2em plus 0.2em minus 0.1em\relax} % before/after runs of CJK
+
+ \global\XeTeXinterchartoks 0 1 = {\xtxHanSpace}
+ \global\XeTeXinterchartoks 0 2 = {\xtxHanSpace}
+ \global\XeTeXinterchartoks 0 3 = {\nobreak\xtxHanSpace}
+
+ \global\XeTeXinterchartoks 1 0 = {\xtxHanSpace}
+ \global\XeTeXinterchartoks 2 0 = {\nobreak\xtxHanSpace}
+ \global\XeTeXinterchartoks 3 0 = {\xtxHanSpace}
+
+ \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}
+
+ \global\XeTeXinterchartoks 3 1 = {\xtxHanGlue}
+ \global\XeTeXinterchartoks 3 2 = {\xtxHanGlue}
+ \global\XeTeXinterchartoks 3 3 = {\nobreak\xtxHanGlue}
+\fi
+
+\let\s@vef@nt=\font
+\let\preloaded=2
+\def\font{\futurelet\next\d@ntpreload}
+\def\d@ntpreload{\ifx\next\preloaded
+ \let\next\sk@pf@nt
+ \begingroup \catcode`\%=12 \catcode13=12
+ \else
+ \let\next\s@vef@nt
+ \fi \next}
+\lccode1=13
+\lowercase{\def\sk@pf@nt\preloaded=#1^^A{\endgroup}}
+
+\input etex.src
+
+% Restore the \font command and undefine other stuff
+\catcode`\@=11
+\let\font=\s@vef@nt
+\let\d@ntpreload=\und@fined
+\let\sk@pf@nt=\und@fined
+\let\s@vef@nt=\und@fined
+
+%
+% 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)
+\def\xe@alloc@#1#2#3#4#5{\global\advance#1\@ne
+ \xe@ch@ck#1#4#2% make sure there's still room
+ \allocationnumber#1%
+ \global#3#5\allocationnumber
+ \wlog{\string#5=\string#2\the\allocationnumber}}
+\def\xe@ch@ck#1#2#3{%
+ \ifnum#1<#2\else
+ \errmessage{No room for a new #3}%
+ \fi}
+\def\newXeTeXintercharclass{%
+ \xe@alloc@\xe@alloc@intercharclass\XeTeXintercharclass\chardef\@cclv} % At most 254
+
+% Primitives in pdfTeX and LuaTeX, we'll just use macros here.
+% Since we are generating a whatsit, not 100% compatible,
+% but hopefully close enough.
+\protected\def\pdfmapfile#1{\special{pdf:mapfile #1}}
+\protected\def\pdfmapline#1{\special{pdf:mapline #1}}
+
+\catcode`\@=12
+
+\XeTeXuseglyphmetrics=1
+\XeTeXdashbreakstate=1
+
+\errorstopmode
+
+\dump
+\endinput