Skip to content

Commit 5d86fc7

Browse files
committed
makeglossaries, sync with latexcgi
1 parent 46ec734 commit 5d86fc7

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

assets/scripts/runlatex.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ const norunregex = /^\s*([/%#\*]+ *!TEX.*[^a-zA-Z]none *|[^% \t\\][^\\]*)(\n|$)/
6464
const commentregex = / %.*/;
6565
const engineregex = /% *!TEX.*[^a-zA-Z](((pdf|xe|lua|u?p)?latex(-dev)?)|context|(pdf|xe|lua|[ou]?p)?tex) *\n/i;
6666
const returnregex = /% *!TEX.*[^a-zA-Z](pdfjs|pdf|log|make4ht|latexml|lwarp) *\n/i;
67+
const bibregex = /% *!TEX.*[^a-zA-Z](p?bibtex8?|biber) *\n/i;
68+
const makeglossariesregex = /% *!TEX.*[^a-zA-Z](makeglossaries(-light)?) *\n/i;
6769
const makeindexregex = /% *!TEX.*[^a-zA-Z]makeindex( [a-z0-9\.\- ]*)\n/ig;
6870

6971

@@ -373,6 +375,14 @@ function latexcgi(nd) {
373375
rtnv=rtn[1].toLowerCase();
374376
addinput(fm,"return",rtnv);
375377
}
378+
var bibcmd = t.match(bibregex);
379+
if(bibcmd != null) {
380+
addinput(fm,"bibcmd",bibcmd[1].toLowerCase());
381+
}
382+
var makegcmd = t.match(makeglossariesregex);
383+
if(makegcmd != null) {
384+
addinput(fm,"makeglossaries",makegcmd[1].toLowerCase());
385+
}
376386
var mki = makeindexregex.exec(t);
377387
while (mki != null) {
378388
addinputnoenc(fm,"makeindex[]",mki[1]);

0 commit comments

Comments
 (0)