[latex3-commits] [l3svn] 04/05: l3build: Normalise out empty \hbox after \mathon

noreply at latex-project.org noreply at latex-project.org
Fri Sep 11 18:24:41 CEST 2015


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

joseph pushed a commit to branch master
in repository l3svn.

commit 1a40a87328712d96b7bd4b6d2d2ae29367747707
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Sep 11 17:02:26 2015 +0100

    l3build: Normalise out empty \hbox after \mathon
---
 l3build/l3build.lua |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/l3build/l3build.lua b/l3build/l3build.lua
index 834b94c..a949861 100644
--- a/l3build/l3build.lua
+++ b/l3build/l3build.lua
@@ -805,6 +805,11 @@ function formatlualog(logfile, newfile)
        string.match(line, "^%.+\\whatsit$")       then
       return "", line
     end
+    -- For \mathon, we always need this line but the next
+    -- may be affected
+    if string.match(line, "^%.+\\mathon$") then
+      return line, line
+    end
     -- Remove 'display' at end of display math boxes:
     -- LuaTeX omits this as it includes direction in all cases
     line = string.gsub(line, "(\\hbox%(.*), display$", "%1")
@@ -880,6 +885,14 @@ function formatlualog(logfile, newfile)
         end
       end
     end
+    -- For \mathon, if the current line is an empty \hbox then
+    -- drop it
+    if string.match(lastline, "^%.+\\mathon$") then
+      local prefix = boxprefix(lastline)
+      if string.match(line, prefix .. "\\hbox%(0%.0+0%.0%)x0%.0$") then
+        return "", ""
+      end
+    end
     -- Much the same idea when the last line was a whatsit,
     -- but things are simpler in this case
     if string.match(lastline, "^%.+\\whatsit$") then

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


More information about the latex3-commits mailing list