-
Notifications
You must be signed in to change notification settings - Fork 3
/
luametatexconfig.tex
58 lines (53 loc) · 1.59 KB
/
luametatexconfig.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
% Adapted based on tex-ini-files 2016-04-15: luatexconfig.tex
% Load shared (PDF) settings in LuaMetaTeX
\begingroup
\catcode`\{=1 %
\catcode`\}=2 %
\catcode`\#=6 %
\def\list{%
{compresslevel}%
{decimaldigits}%
{horigin}%
{minorversion}%
{objcompresslevel}%
{pkresolution}%
{vorigin}%
}%
% LuaMetaTeX doesn't have \pdfoutput, etc.:
% emulate names where appropriate
\let\pdfoutput\outputmode
\let\pdfpageheight\pageheight
\let\pdfpagewidth\pagewidth
\def\do#1{%
\ifx\relax#1\else
\expandafter\edef\csname pdf#1\endcsname{\pdfvariable #1}%
\expandafter\do
\fi
}%
\expandafter\do\list\relax
% 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 the rest of the group
\globaldefs=1 %
% \input{pdftexconfig}%
% Copied in here because the original uses `true` dimensions which aren't supported
\pdfoutput = 1
% Paper size: dimensions given in absolute terms
\pdfpageheight = 297 mm
\pdfpagewidth = 210 mm
% 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 in
\pdfvorigin = 1 in
% Pick up on a request for DVI mode and apply it whilst \pdfoutput is
% still defined
\ifx\dvimode\relax
\pdfoutput=0 %
\fi
\let\dvimode\undefined
\endgroup