diff options
Diffstat (limited to 'macros/latex/contrib/lwarp/lwarpmk.lua')
-rwxr-xr-x | macros/latex/contrib/lwarp/lwarpmk.lua | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/macros/latex/contrib/lwarp/lwarpmk.lua b/macros/latex/contrib/lwarp/lwarpmk.lua index a34d61e216..cb684409a3 100755 --- a/macros/latex/contrib/lwarp/lwarpmk.lua +++ b/macros/latex/contrib/lwarp/lwarpmk.lua @@ -2,7 +2,7 @@ -- Copyright 2016-2021 Brian Dunn -printversion = "v0.898" +printversion = "v0.899" requiredconfversion = "2" -- also at *lwarpmk.conf function printhelp () @@ -66,7 +66,9 @@ function splitfile (destfile,sourcefile) -- Split one large sourcefile into a number of files, -- starting with destfile. -- The file is split at each occurance of <!--|Start file|newfilename|* +-- If lwarp is in use, sets usinglwarp. -- +usinglwarp = false ; print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ; local sfile = io.open(sourcefile) io.output(destfile) @@ -76,11 +78,23 @@ if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then -- split the file io.output(newfilename) ; else +if ( (i~= nil) and (copen == "<!--") and (cstart == "Using lwarp")) then + -- verified the use of \usepackage{lwarp} + usinglwarp = true ; +else -- not a splitpoint io.write (line .. "\n") ; -end +end end end -- do io.close(sfile) +if ( usinglwarp == false ) then + print ("lwarpmk: ===") + print ("lwarpmk: \\usepackage{lwarp} was not detected.") + print ("lwarpmk: The HTML output will not be correct.") + print ("lwarpmk: Ensured that \\usepackage{lwarp} is enabled,") + print ("lwarpmk: then lwarpmk print and lwarpmk HTML again.") + print ("lwarpmk: ===") +end end -- function function cvalueerror ( line, linenum , cvalue ) |