From e4ffc94de80b5a8d33a11ee2b096e8a7157f9168 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Fri, 17 Jun 2016 14:38:08 +0100 Subject: [PATCH] Move the latexmk timing command into a configurable `latexmkCommandPrefix`. By default, no timing information will be taken. On Linux with GNU user land, this value should be configured to `["/usr/bin/time", "-v"]`. On Mac, gnu-time should be installed and configured to `["/usr/local/bin/gtime", "-v"]`. --- app/coffee/LatexRunner.coffee | 4 +++- config/settings.defaults.coffee | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/coffee/LatexRunner.coffee b/app/coffee/LatexRunner.coffee index 65a3046..748c277 100644 --- a/app/coffee/LatexRunner.coffee +++ b/app/coffee/LatexRunner.coffee @@ -49,7 +49,9 @@ module.exports = LatexRunner = timings["sys-time"] = stderr?.match(/System time.*: (\d+.\d+)/m)?[1] or 0 callback error, output, stats, timings - _latexmkBaseCommand: ["/usr/bin/time", "-v", "latexmk", "-cd", "-f", "-jobname=output", "-auxdir=$COMPILE_DIR", "-outdir=$COMPILE_DIR"] + _latexmkBaseCommand: (Settings?.clsi?.latexmkCommandPrefix || []).concat( + ["latexmk", "-cd", "-f", "-jobname=output", "-auxdir=$COMPILE_DIR", "-outdir=$COMPILE_DIR"] + ) _pdflatexCommand: (mainFile) -> LatexRunner._latexmkBaseCommand.concat [ diff --git a/config/settings.defaults.coffee b/config/settings.defaults.coffee index ae8e132..f77df86 100644 --- a/config/settings.defaults.coffee +++ b/config/settings.defaults.coffee @@ -28,6 +28,9 @@ module.exports = # modem: # socketPath: false # user: "tex" + # latexmkCommandPrefix: [] + # # latexmkCommandPrefix: ["/usr/bin/time", "-v"] # on Linux + # # latexmkCommandPrefix: ["/usr/local/bin/gtime", "-v"] # on Mac OSX, installed with `brew install gnu-time` internal: clsi: