[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Use live LaTeX format for typesetting (71ef4c0c)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Jul 19 10:21:30 CEST 2019


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

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

commit 71ef4c0cb20cbfbcfb6103452989338376ac4fec
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Jul 19 09:21:30 2019 +0100

    Use live LaTeX format for typesetting
    
    We have to do a little work to create and find the `fmt` file.


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

71ef4c0cb20cbfbcfb6103452989338376ac4fec
 base/build.lua   | 10 ++++++----
 build-config.lua | 17 +++++++++++++++--
 2 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/base/build.lua b/base/build.lua
index 5fce976b..7d190ae3 100644
--- a/base/build.lua
+++ b/base/build.lua
@@ -101,8 +101,9 @@ unpacksuppfiles =
 testsuppdir = "testfiles/helpers"
 
 -- No dependencies at all (other than l3build of course)
-checkdeps  = { }
-unpackdeps = { }
+checkdeps   = { }
+typesetdeps = { }
+unpackdeps  = { }
 
 -- Customise typesetting
 indexstyle = "source2e.ist"
@@ -140,8 +141,9 @@ function format ()
   if not options["config"] or options["config"][1] ~= "config-TU" then
     cp("fonttext.cfg",supportdir,unpackdir)
   end
-  local checkengines = options["engine"] or checkengines
-  for _,i in ipairs(checkengines) do
+  local fmtengines = options["engine"] or checkengines
+  table.insert(fmtengines,"pdftex")
+  for _,i in ipairs(fmtengines) do
     errorlevel = format (i, string.gsub (i, "tex$", "") .. "latex.fmt")
     if errorlevel ~=0 then
       return errorlevel
diff --git a/build-config.lua b/build-config.lua
index f6ca13cd..ff072d6b 100644
--- a/build-config.lua
+++ b/build-config.lua
@@ -2,8 +2,9 @@
 
 -- The LaTeX2e kernel is needed by everything except 'base'
 -- There is an over-ride for that case
-checkdeps  = checkdeps  or {maindir .. "/base"}
-unpackdeps = unpackdeps or {maindir .. "/base"}
+checkdeps   = checkdeps   or {maindir .. "/base"}
+typesetdeps = typesetdeps or {maindir .. "/base"}
+unpackdeps  = unpackdeps  or {maindir .. "/base"}
 
 -- Set up the check system to work in 'stand-alone' mode
 -- This relies on a format being built by the 'base' dependency
@@ -17,6 +18,18 @@ stdengine      = stdengine          or "etex"
 tagfiles       = tagfiles or {"README.md"}
 typesetsuppfiles = typesetsuppfiles or {"ltxdoc.cfg", "ltxguide.cfg"}
 
+-- Ensure the local format file is used
+typesetexe = 'pdftex -interaction=nonstopmode "&pdflatex"'
+typesetopts = ""
+
+-- Force finding the format file
+function tex(file,dir)
+  local dir = dir or "."
+  return runcmd(typesetexe .. " " .. typesetopts .. " \"" .. typesetcmds
+    .. "\\input " .. file .. "\"",
+    dir,{"TEXINPUTS","TEXFORMATS"})
+end
+
 -- Build TDS-style zips
 packtdszip = true
 





More information about the latex3-commits mailing list