summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-newproject.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-newproject.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-newproject.sty66
1 files changed, 58 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-newproject.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-newproject.sty
index b1fd0af99d6..dadda5adcd6 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-newproject.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-newproject.sty
@@ -35,6 +35,7 @@
\DeclareVoidOption{warpHTML}{\boolfalse{LWRNP@genconf}}
\DeclareVoidOption{lwarpmk}{\includecomment{LWR@createlwarpmk}}
\DeclareStringOption[\jobname]{BaseJobname}
+\DeclareStringOption[english]{lwarpmklang}
\booltrue{LWRNP@genconf}% warpprint
@@ -43,7 +44,7 @@
\providecommand*{\BaseJobname}{\LWRNP@BaseJobname}
\providecommand*{\HomeHTMLFileName}{\BaseJobname}
-\providecommand*{\HTMLFileName}{}
+\providecommand*{\HTMLfiveName}{}
\providecommand*{\UseLatexmk}{false}
\ifbool{LWRNP@genconf}{\typeout{lwarp-newproject: generating configuration files}}{}
@@ -86,8 +87,9 @@
\immediate\write\LWR@file{%
homehtmlfilename = "\HomeHTMLFileName"%
}
-\immediate\write\LWR@file{htmlfilename = "\HTMLFileName"}
+\immediate\write\LWR@file{htmlfilename = "\HTMLfiveName"}
\immediate\write\LWR@file{uselatexmk = "\UseLatexmk"}
+\immediate\write\LWR@file{language = "\LWRNP@lwarpmklang"}
\immediate\closeout\LWR@file
}{}
@@ -1637,7 +1639,6 @@ nav.botnavigation {
\end{VerbatimOut}
-
\begin{VerbatimOut}{lwarp_mathjax.txt}
<!-- https://groups.google.com/forum/#!topic/
mathjax-users/jUtewUcE2bY -->
@@ -1721,9 +1722,18 @@ MathJax.Hub.Config({
});
</script>
+<!-- Alternative CDN provider: -->
+<script type="text/javascript" async
+ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML-full">
+</script>
+
+<!-- No longer supported after April 30, 2017: -->
+<!--
<script
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full">
</script>
+-->
+
\end{VerbatimOut}
@@ -1736,7 +1746,7 @@ MathJax.Hub.Config({
-- Print the usage of the lwarpmk command:
-printversion = "v0.27"
+printversion = "v0.29"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -1747,15 +1757,17 @@ print ( [[
lwarpmk print [project]: Compile a 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 an 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:
Convert project_html.pdf to project_html.html and
individual HTML files.
-lwarpmk clean [project]: Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log
+lwarpmk clean [project]: Remove project.aux, .toc, .lof/t, .idx, .ind, .log, .gl*
lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html
lwarpmk -h: Print this help message.
lwarpmk --help: Print this help message.
@@ -1776,6 +1788,7 @@ sourcename = "projectname" (the source-code filename w/o .tex)
homehtmlfilename = "index" (or perhaps the project name)
htmlfilename = "" (or "projectname" - filename prefix)
uselatexmk = "false" (or "true" to use latexmk to build PDFs)
+languge = "english" (use a language supported by xindy)
--
Filenames must contain only letters, numbers, underscore, or dash.
Values must be in "quotes".
@@ -1817,6 +1830,8 @@ function loadconf ()
local conffile = "lwarpmk.conf"
-- Optional configuration filename:
if arg[2] ~= nil then conffile = arg[2]..".lwarpmkconf" end
+-- Default language:
+language = "english"
-- Verify the file exists:
if (lfs.attributes(conffile,"mode")==nil) then -- file not exists
print("lwarpmk: " .. conffile .." does not exist.")
@@ -1861,6 +1876,7 @@ elseif ( cvarname == "sourcename" ) then sourcename = cvalue
elseif ( cvarname == "homehtmlfilename" ) then homehtmlfilename = cvalue
elseif ( cvarname == "htmlfilename" ) then htmlfilename = cvalue
elseif ( cvarname == "uselatexmk" ) then uselatexmk = cvalue
+elseif ( cvarname == "language" ) then language = cvalue
else
print ( linenum .. " : " .. line ) ;
print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
@@ -1957,7 +1973,8 @@ function removeaux ()
sourcename ..".lot " .. sourcename .. "_html.lot " ..
sourcename ..".idx " .. sourcename .. "_html.idx " ..
sourcename ..".ind " .. sourcename .. "_html.ind " ..
- sourcename ..".log " .. sourcename .. "_html.log "
+ sourcename ..".log " .. sourcename .. "_html.log " ..
+ sourcename ..".gl* " .. sourcename .. "_html.gl* "
)
end
@@ -2047,6 +2064,22 @@ refreshdate ()
print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
print ("lwarpmk: Done.")
+-- lwarp printglossary:
+-- Compile the glossary then touch the source
+-- to trigger a recompile of the document:
+
+elseif arg[1] == "printglossary" then
+loadconf ()
+print ("lwarpmk: Processing the glossary.")
+
+os.execute("xindy -L " .. language .. " -C utf8 -I xindy -M " .. sourcename ..
+ " -t " .. sourcename .. ".glg -o " .. sourcename .. ".gls "
+ .. sourcename .. ".glo")
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+refreshdate ()
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
-- lwarpmk html:
elseif arg[1] == "html" then
@@ -2098,6 +2131,23 @@ refreshdate ()
print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
print ("lwarpmk: Done.")
+-- lwarpmk htmlglossary:
+-- Compile the glossary then touch the source
+-- to trigger a recompile of the document:
+
+elseif arg[1] == "htmlglossary" then
+loadconf ()
+print ("lwarpmk: Processing the glossary.")
+
+os.execute("xindy -L " .. language .. " -C utf8 -I xindy -M " ..sourcename ..
+ "_html -t " .. sourcename .. "_html.glg -o " ..sourcename ..
+ "_html.gls " ..sourcename .. "_html.glo")
+
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+refreshdate ()
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
-- lwarpmk limages:
-- Scan the lateximages.txt file to create lateximages,
-- then touch the source to trigger a recompile.
@@ -2122,7 +2172,7 @@ print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
print ("lwarpmk: Done.")
-- lwarpmk clean:
--- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log
+-- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log, .gl*
elseif arg[1] == "clean" then
loadconf ()
@@ -2130,7 +2180,7 @@ removeaux ()
print ("lwarpmk: Done.")
-- lwarpmk cleanall
--- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log
+-- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log, .gl*
-- and also project.pdf, *.html
elseif arg[1] == "cleanall" then