diff options
author | Karl Berry <karl@freefriends.org> | 2019-03-06 22:24:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-03-06 22:24:57 +0000 |
commit | db28af0c6e1e6a1e6ccd86b36e0741fefe34e830 (patch) | |
tree | 8f54161a5a158f63398bc23c24ac96de0c97382a /Build | |
parent | 8ed69c4a691d843c39f9eee1cf766a669c713033 (diff) |
lwarp (6mar19)
git-svn-id: svn://tug.org/texlive/trunk@50266 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua b/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua index 8b2d9a9c5d6..8520b37c9a6 100755 --- a/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua +++ b/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua @@ -2,7 +2,7 @@ -- Copyright 2016-2018 Brian Dunn -printversion = "v0.67" +printversion = "v0.68" requiredconfversion = "2" -- also at *lwarpmk.conf function printhelp () @@ -396,6 +396,15 @@ function warnlimages () print ("lwarpmk: ===") end -- warnlimages +function warnlimagesrecompile () +-- Warning if must recompile before creating limages: + print ("") + print ("lwarpmk: ===") + print ("lwarpmk: The document must be recompiled before creating the lateximages.") + print ("lwarpmk: Enter \"lwarpmk html\" again, then try \"lwarpmk limages\" again.") + print ("lwarpmk: ===") +end --warnlimagesrecompile + function checklimages () -- -- Check <sourcename>.txt to see if need to recompile first. @@ -424,12 +433,14 @@ for line in limagesfile:lines() do end end -- if i~=nil end -- do +-- The last line should be |end|end|end|. +-- If not, the compile must have aborted, and the images are incomplete. +if ( lwimgpage ~= "end" ) then + warnlimagesrecompile() + os.exit(1) ; +end if ( pagezerowarning ) then - print ("") - print ("lwarpmk: ===") - print ("lwarpmk: The document must be recompiled before creating the lateximages.") - print ("lwarpmk: Enter \"lwarpmk html\" again, then try \"lwarpmk limages\" again.") - print ("lwarpmk: ===") + warnlimagesrecompile() os.exit(1) ; end -- pagezerowarning end -- checklimages @@ -509,6 +520,8 @@ if ( (i~=nil) ) then -- Skip if the page number is 0: if ( lwimgpage == "0" ) then pagezerowarning = true + -- Skip if the page number is "end": + else if ( lwimgpage == "end" ) then else -- Skip is this image is hashed and already exists: local lwimgfullname = imagesdirectory .. dirslash .. lwimgname .. ".svg" @@ -531,6 +544,7 @@ if ( (i~=nil) ) then createwindowsimage (lwimgfullname) end end -- not hashed or not exists + end -- not page "end" end -- not page 0 end -- not nil end -- createonelateximage |