diff options
author | Karl Berry <karl@freefriends.org> | 2018-04-02 21:21:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-04-02 21:21:55 +0000 |
commit | 36c3a7f80fb543246ba005efd3dc2e4046861e1a (patch) | |
tree | f2eb377d700406021e9c244a1e2d58095ff3a536 /Master/texmf-dist/tex/latex/lwarp | |
parent | 1610548529befd1cb7d72da00a3a889261436642 (diff) |
lwarp (2apr18)
git-svn-id: svn://tug.org/texlive/trunk@47250 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp.sty | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index 7651948a52d..7620ac5f591 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty @@ -17,7 +17,7 @@ %% version 2005/12/01 or later. \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{lwarp} - [2018/04/01 v0.52 Allows LaTeX to directly produce HTML5 output.] + [2018/04/01 v0.53 Allows LaTeX to directly produce HTML5 output.] @@ -3075,7 +3075,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX- -- Print the usage of the lwarpmk command: -printversion = "v0.52" +printversion = "v0.53" function printhelp () print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ; @@ -3096,10 +3096,11 @@ lwarpmk again [project]: Touch the source code to trigger recompiles. lwarpmk limages [project]: Process the "lateximages" created by lwarp.sty. lwarpmk pdftohtml [project]: For use with latexmk or a Makefile: - Convert project_html.pdf to project_html.html and - individual HTML files. + Converts project_html.pdf to project_html.html and individual HTML files. + Finishes the HTML conversion even if there was a compile error. lwarpmk clean [project]: Remove .aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl* lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html +lwarpmk cleanlimages: Removes all images from the "lateximages" directory. lwarpmk -h: Print this help message. lwarpmk --help: Print this help message. @@ -3406,6 +3407,8 @@ if opsystem=="Windows" then end -- create lwarp_one_limage.cmd -- Track the number of parallel processes numimageprocesses = 0 +-- Track warning to recompile if find a page 0 +pagezerowarning = false -- Scan lateximages.txt for line in limagesfile:lines() do -- lwimgpage is the page number in the PDF which has the image @@ -3415,7 +3418,9 @@ i,j,lwimgpage,lwimghash,lwimgname = string.find (line,"|(.*)|(.*)|(.*)|") -- For each entry: if ( (i~=nil) ) then -- Skip if the page number is 0: -if ( lwimgpage ~= "0" ) then +if ( lwimgpage == "0" ) then + pagezerowarning = true +else -- Skip is this image is hashed and already exists: local lwimgfullname = "lateximages" .. dirslash .. lwimgname .. ".svg" if ( @@ -3496,6 +3501,12 @@ end -- not nil end -- do io.close(limagesfile) print ( "lwarpmk limages: done" ) +if ( pagezerowarning == true ) then + print ( "lwarpmk limages: WARNING: Images will be incorrect." ) + print ( "lwarpmk limages: Enter \"lwarpmk cleanlimages\", then" ) + print ( "lwarpmk limages: recompile the document one more time, then" ) + print ( "lwarpmk limages: repeat \"lwarpmk images\" again." ) +end -- pagezerowarning end -- function -- Use latexmk to compile source and index: @@ -3709,6 +3720,14 @@ os.execute ( rmname .. " " .. ) print ("lwarpmk: Done.") +-- lwarpmk cleanlimages +-- Remove images from the lateximages directory. + +elseif arg[1] == "cleanlimages" then +loadconf () +os.execute ( rmname .. " lateximages/*" ) +print ("lwarpmk: Done.") + -- lwarpmk with no argument : elseif (arg[1] == nil) then |