Skip to content

Commit

Permalink
lwarp (6mar19)
Browse files Browse the repository at this point in the history
git-svn-id: svn://tug.org/texlive/trunk/Build/source@50266 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
kberry committed Mar 6, 2019
1 parent f7c1004 commit 6ce3819
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions texk/texlive/linked_scripts/lwarp/lwarpmk.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

-- Copyright 2016-2018 Brian Dunn

printversion = "v0.67"
printversion = "v0.68"
requiredconfversion = "2" -- also at *lwarpmk.conf

function printhelp ()
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 6ce3819

Please sign in to comment.