[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Building pdfLaTeX format needs .ini file (b4dfa251)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Jul 19 22:37:03 CEST 2019


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/b4dfa2518686b9216fdc4e05835ede6c38bb2a74

>---------------------------------------------------------------

commit b4dfa2518686b9216fdc4e05835ede6c38bb2a74
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Jul 19 21:37:03 2019 +0100

    Building pdfLaTeX format needs .ini file
    
    At least so we get the same typesetting as with
    system-wide format.


>---------------------------------------------------------------

b4dfa2518686b9216fdc4e05835ede6c38bb2a74
 base/build.lua           | 11 +++++++++--
 support/pdflatex.ini     | 12 ++++++++++++
 support/pdftexconfig.tex | 21 +++++++++++++++++++++
 3 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/base/build.lua b/base/build.lua
index 0ab15206..86e80ecf 100644
--- a/base/build.lua
+++ b/base/build.lua
@@ -94,7 +94,9 @@ unpacksuppfiles =
     "MathClass.txt",
     "UnicodeData.txt",
     "UShyphen.tex",
-    "ot1lmr.fd"
+    "ot1lmr.fd",
+    "pdflatex.ini",
+    "pdftexconfig.tex"
   }
 
 -- Custom settings for the check system
@@ -118,11 +120,16 @@ function format ()
   end
   local function format (engine,fmtname)
     -- the relationships are all correct
+    local sourcefile = unpackdir .. "/latex.ltx"
+    local finalname = string.gsub(engine,"tex","latex")
+    if fileexists(localdir .. "/" .. finalname .. ".ini") then
+       sourcefile = localdir .. "/" .. finalname .. ".ini"
+    end
     local errorlevel = os.execute (
         os_setenv .. " TEXINPUTS=" .. unpackdir .. os_pathsep .. localdir
         .. os_concat ..
         engine .. " -etex -ini " .. " -output-directory=" .. unpackdir ..
-        " " .. unpackdir .. "/latex.ltx"
+        " " .. sourcefile
       )
     if errorlevel ~=0 then
       return errorlevel
diff --git a/support/pdflatex.ini b/support/pdflatex.ini
new file mode 100644
index 00000000..5bcf5270
--- /dev/null
+++ b/support/pdflatex.ini
@@ -0,0 +1,12 @@
+% tex-ini-files 2016-05-10: pdflatex.ini
+
+% Thomas Esser, 1998. public domain.
+\input pdftexconfig.tex
+\scrollmode
+\begingroup
+  \catcode`\{=1 %
+  \catcode`\}=2 %
+  \expandafter\gdef\csname c_sys_backend_tl\endcsname{pdfmode}
+\endgroup
+\input latex.ltx
+\endinput
diff --git a/support/pdftexconfig.tex b/support/pdftexconfig.tex
new file mode 100644
index 00000000..44c25abc
--- /dev/null
+++ b/support/pdftexconfig.tex
@@ -0,0 +1,21 @@
+% tex-ini-files 2016-04-15: pdftexconfig.tex
+
+% Load shared (PDF) settings in pdfTeX
+
+% Enable PDF output
+\pdfoutput           = 1
+
+% Paper size: dimensions given in absolute terms
+\pdfpageheight       = 297 true mm
+\pdfpagewidth        = 210 true 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 true in
+\pdfvorigin          = 1 true in





More information about the latex3-commits mailing list