[latex3-commits] [l3svn] branch master updated: l3build: provide table for demo file to include in typesetting

noreply at latex-project.org noreply at latex-project.org
Sat May 13 11:16:09 CEST 2017


This is an automated email from the git hooks/post-receive script.

joseph pushed a commit to branch master
in repository l3svn.

The following commit(s) were added to refs/heads/master by this push:
       new  217dfe6   l3build: provide table for demo file to include in typesetting
217dfe6 is described below

commit 217dfe6a42cb0dc6efe346956a065f4bacb841fa
Author: XZS <d.f.fischer at web.de>
Date:   Thu Apr 13 23:01:52 2017 +0200

    l3build: provide table for demo file to include in typesetting
    
    Often, examples of the output a package can generate are included as
    images in the documentation, but should not be shipped themselves. A
    new variable cares for them. They are compiled before the
    documentation that includes them.
---
 l3build/l3build.dtx |    1 +
 l3build/l3build.lua |   39 ++++++++++++++++++++++-----------------
 2 files changed, 23 insertions(+), 17 deletions(-)

diff --git a/l3build/l3build.dtx b/l3build/l3build.dtx
index 8166587..2966966 100644
--- a/l3build/l3build.dtx
+++ b/l3build/l3build.dtx
@@ -86,6 +86,7 @@
 \luavarset{makeindexfiles}  {\{"*.ist"\}}{MakeIndex files to be included in a TDS-style zip}
 \luavarset{sourcefiles}     {\{"*.dtx", "*.ins"\}}{Files to copy for unpacking.}
 \luavarset{textfiles}       {\{"*.md", "*.txt"\}}{Plain text files to send to CTAN as-is.}
+\luavarset{typesetdemofiles}{\{~\}}       {Files to typeset before the documentation (as demos), but where the PDF results are not included in the release.}
 \luavarset{typesetfiles}    {\{"*.dtx"\}} {Files to typeset for documentation.}
 \luavarset{typesetsuppfiles}{\{~\}}       {Files needed to support typesetting when \enquote{sandboxed}.}
 \luavarset{unpackfiles}     {\{"*.ins"\}} {Files to run to perform unpacking.}
diff --git a/l3build/l3build.lua b/l3build/l3build.lua
index f514429..212b0c3 100644
--- a/l3build/l3build.lua
+++ b/l3build/l3build.lua
@@ -99,6 +99,7 @@ installfiles     = installfiles     or {"*.sty"}
 makeindexfiles   = makeindexfiles   or {"*.ist"}
 sourcefiles      = sourcefiles      or {"*.dtx", "*.ins"}
 textfiles        = textfiles        or {"*.md", "*.txt"}
+typesetdemofiles = typesetdemofiles or { }
 typesetfiles     = typesetfiles     or {"*.dtx"}
 typesetsuppfiles = typesetsuppfiles or { }
 unpackfiles      = unpackfiles      or {"*.ins"}
@@ -1839,7 +1840,9 @@ end
 function doc(files)
   -- Set up
   cleandir(typesetdir)
-  for _,i in ipairs({bibfiles, docfiles, sourcefiles, typesetfiles}) do
+  for _,i in ipairs(
+    {bibfiles, docfiles, sourcefiles, typesetfiles, typesetdemofiles}
+  ) do
     for _,j in ipairs(i) do
       cp(j, ".", typesetdir)
     end
@@ -1850,24 +1853,26 @@ function doc(files)
   depinstall(typesetdeps)
   unpack()
   -- Main loop for doc creation
-  for _,i in ipairs(typesetfiles) do
-    for _, dir in ipairs({unpackdir, typesetdir}) do
-      for _,j in ipairs(filelist(dir, i)) do
-        -- Allow for command line selection of files
-        local typeset = true
-        if files and next(files) then
-          typeset = false
-          for _,k in ipairs(files) do
-            if k == stripext(j) then
-              typeset = true
-              break
+  for _, typesetfiles in ipairs({typesetdemofiles, typesetfiles}) do
+    for _,i in ipairs(typesetfiles) do
+      for _, dir in ipairs({unpackdir, typesetdir}) do
+        for _,j in ipairs(filelist(dir, i)) do
+          -- Allow for command line selection of files
+          local typeset = true
+          if files and next(files) then
+            typeset = false
+            for _,k in ipairs(files) do
+              if k == stripext(j) then
+                typeset = true
+                break
+              end
             end
           end
-        end
-        if typeset then
-          local errorlevel = typesetpdf(abspath(dir) .. "/" .. j)
-          if errorlevel ~= 0 then
-            return errorlevel
+          if typeset then
+            local errorlevel = typesetpdf(relpath(dir, ".") .. "/" .. j)
+            if errorlevel ~= 0 then
+              return errorlevel
+            end
           end
         end
       end

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list