#!/usr/bin/env texlua -- Copyright 2016-2018 Brian Dunn -- Print the usage of the lwarpmk command: printversion = "v0.55" function printhelp () print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ; end function printusage () print ( [[ lwarpmk print [project]: Compile the print version if necessary. lwarpmk print1 [project]: Forced single compile of the print version. lwarpmk printindex [project]: Process the index for the print version. lwarpmk printglossary [project]: Process the glossary for the print version. lwarpmk html [project]: Compile the HTML version if necessary. lwarpmk html1 [project]: Forced single compile of the HTML version. lwarpmk htmlindex [project]: Process the index for the html version. lwarpmk htmlglossary [project]: Process the glossary for the html version. 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: 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. ]] ) printconf () end -- Print the format of the configuration file lwarpmk.conf: function printconf () print ( [[ An example lwarpmk.conf or .lwarpmkconf project file: -- opsystem = "Unix" (or "Windows") latexname = "pdflatex" (or "lualatex", or "xelatex") sourcename = "projectname" (the source-code filename w/o .tex) homehtmlfilename = "index" (or perhaps the project name) htmlfilename = "" (or "projectname" - filename prefix) latexmk = "false" (or "true" to use latexmk to build PDFs) xindylanguge = "english" (use a language supported by xindy) xindycodepage = "utf8" (use a codepage supported by xindy) xindystyle = "lwarp.xdy" (or a custom file based on lwarp.xdy) pdftotextenc = "UTF-8" (use an encoding supported by pdftotext) -- Filenames must contain only letters, numbers, underscore, or dash. Values must be in "quotes". ]] ) ; end -- Split one large sourcefile into a number of files, -- starting with destfile. -- The file is split at each occurance of