Merge pull request #51 from sharelatex/bg-fix-latexmk-args

allow latexmk to pass through options
This commit is contained in:
Brian Gough 2017-03-03 13:19:23 +00:00 committed by GitHub
commit 1fed715230

View file

@ -62,31 +62,32 @@ module.exports = LatexRunner =
else else
CommandRunner.kill ProcessTable[id], callback CommandRunner.kill ProcessTable[id], callback
_latexmkBaseCommand: (Settings?.clsi?.latexmkCommandPrefix || []).concat( _latexmkBaseCommand: (Settings?.clsi?.latexmkCommandPrefix || []).concat([
["latexmk", "-cd", "-f", "-jobname=output", "-auxdir=$COMPILE_DIR", "-outdir=$COMPILE_DIR"] "latexmk", "-cd", "-f", "-jobname=output", "-auxdir=$COMPILE_DIR", "-outdir=$COMPILE_DIR",
) "-synctex=1","-interaction=batchmode"
])
_pdflatexCommand: (mainFile) -> _pdflatexCommand: (mainFile) ->
LatexRunner._latexmkBaseCommand.concat [ LatexRunner._latexmkBaseCommand.concat [
"-pdf", "-e", "$pdflatex='pdflatex -synctex=1 -interaction=batchmode %O %S'", "-pdf",
Path.join("$COMPILE_DIR", mainFile) Path.join("$COMPILE_DIR", mainFile)
] ]
_latexCommand: (mainFile) -> _latexCommand: (mainFile) ->
LatexRunner._latexmkBaseCommand.concat [ LatexRunner._latexmkBaseCommand.concat [
"-pdfdvi", "-e", "$latex='latex -synctex=1 -interaction=batchmode %O %S'", "-pdfdvi",
Path.join("$COMPILE_DIR", mainFile) Path.join("$COMPILE_DIR", mainFile)
] ]
_xelatexCommand: (mainFile) -> _xelatexCommand: (mainFile) ->
LatexRunner._latexmkBaseCommand.concat [ LatexRunner._latexmkBaseCommand.concat [
"-xelatex", "-e", "$pdflatex='xelatex -synctex=1 -interaction=batchmode %O %S'", "-xelatex",
Path.join("$COMPILE_DIR", mainFile) Path.join("$COMPILE_DIR", mainFile)
] ]
_lualatexCommand: (mainFile) -> _lualatexCommand: (mainFile) ->
LatexRunner._latexmkBaseCommand.concat [ LatexRunner._latexmkBaseCommand.concat [
"-pdf", "-e", "$pdflatex='lualatex -synctex=1 -interaction=batchmode %O %S'", "-lualatex",
Path.join("$COMPILE_DIR", mainFile) Path.join("$COMPILE_DIR", mainFile)
] ]