Mark,
just open the LaTeX Bundle and edit the "Typeset & View" command, everything needed is there. e.g. you could include a new variable for your projects that gets used in this case and allows for more flexibility than "hard-coding" it in the bundle itself.
If you think these may be useful additions to us Latextmaters, send 'em to this list as well!
Dan
On 2 Apr 2006, at 14:55, Daniel Käsmayr wrote:
Mark,
just open the LaTeX Bundle and edit the "Typeset & View" command, everything needed is there. e.g. you could include a new variable for your projects that gets used in this case and allows for more flexibility than "hard-coding" it in the bundle itself.
If you think these may be useful additions to us Latextmaters, send 'em to this list as well!
Dan
Thanks, Dan. I tried, perhaps naively, to do just that. Specifically, I tried modifying the TEX variable
TEX=${TM_LATEX_COMPILER:=latexmk.pl}
by adding the options after the latexmk.pl but I get an error message:
Couldn't find latexmk.pl -pvc
Best, Mark _________________ Mark Eli Kalderon Department of Philosophy University College London Gower Street London WC1E 6BT
Dept webpage: http://www.ucl.ac.uk/philosophy Personal wepage: http://www.kalderon.demon.co.uk
Mark,
have you set latexmk.pl in your project folder as environment variable? (see latex helpfile for that?)
you could do this:
in the latex bundle search for:
run_tex () { if [ "$TEX" != latexmk.pl ] then "$TEX" ${TM_LATEX_OPTIONS:=-interaction=nonstopmode -file-line- error-style} "$1" else "$TEX" -f -r "${TM_BUNDLE_PATH}/latexmkrc" "$1" fi }
and replace with:
run_tex () { if [ "$TEX" != latexmk.pl ] then "$TEX" ${TM_LATEX_OPTIONS:=-interaction=nonstopmode -file-line- error-style} "$1" else "$TEX" -f -r "${TM_BUNDLE_PATH}/latexmkrc" "$1" -pvc fi }
I guess if you would like to be more flexible you would need to add another variable for your options and replace the hardcoded options above with that variable; maybe like:
else "$TEX" -f -r "${TM_BUNDLE_PATH}/latexmkrc" "$1" "$ {TM_LATEX_OPT_MKRC}"
and then set the Variable TM_LATEX_OPT_MKRC in your project to "- pvc" (which would also provide you with an easy way to switch different sets of variables by creating the variables in your project [all same name, but just one selected/checked]).
Dan
Mark, On Apr 2, 2006, at 9:32 AM, Mark Eli Kalderon wrote:
On 2 Apr 2006, at 14:55, Daniel Käsmayr wrote:
Thanks, Dan. I tried, perhaps naively, to do just that. Specifically, I tried modifying the TEX variable
TEX=${TM_LATEX_COMPILER:=latexmk.pl}
by adding the options after the latexmk.pl but I get an error message:
Couldn't find latexmk.pl -pvc
Allan just committed a fix for that on the repository just now. The problem, in a nutshell, is that when you make your local modifications, the command is saved in a different location, together with your local modifications, and hence latexmk.pl is not in the right place anymore. Allan moved latexmk.pl at a place where TextMate will still look for it, even if things get moved around.
I would suggest removing the file with your local modifications to the command, then updating with svn, and then redoing your modifications from within TextMate. Alternatively, here are the modifications you'll need to do:
In the "LaTeX and View" command: change else "$TEX" -f -r "${TM_BUNDLE_PATH}/latexmkrc" "$1" to else "$TEX" -f -r "${TM_BUNDLE_SUPPORT}/latexmkrc" "$1"
Also move the file latexmkrc inside the Support subdirectory of the Latex.bundle directory. That should do it.
Best, Mark
Haris
On 2/4/2006, at 18:04, Charilaos Skiadas wrote:
Couldn't find latexmk.pl -pvc
Allan just committed a fix for that on the repository just now.
Actually, the latexmk.pl is already in the proper location. It was the resource file I moved.
The error message sounds like the OP specified -pvc as part of the executable to run, and that is why it was not found.
For the OP: The proper way to “activate” latexmk.pl is by going to Preferences -> Advanced -> Shell Variables and adding a new ‘TM_LATEX_COMPILER’ variable with a value of ‘latexmk.pl’.
But presently it is not possible to specify additional arguments (without modifying the command). Something we should probably update the command to support via (another) variable. The addition by Daniel sounds appropriate.
If you do modify the command (as you did), you need to copy the ‘latexmkrc’ file from the default bundle (/Applications/TextMate.app/ Contents/SharedSupport/Bundles/Latex.tmbundle/) to the local/modified bundle (~/Library/Application Support/TextMate/Bundles/ Latex.tmbundle/) -- this is what my svn commit fixed (which Haris mentioned), so in the future, it will not be necessary to do so, when customizing the Typeset & View command (but for 1.5.1 it is, unless one uses the bundle from svn).