On 19 Jul 2015, at 16:26 , Martin Wilhelm Leidig
<listwatch(a)moss.in-berlin.de> wrote:
Hi *,
I’d like to use TM and TM2 (or at least one of them) with my custom TeXShop engines. By
including a shebang-like line in the first line of the input, e.g.,
---
%!TEX TS-program = pdflatex
---
one tells TM to use pdflatex; but there is no way to tell it to use, say, my
ho-dtxmk engine (which processes DTX files using Heiko Oberdiek’s (ho)
extracting/documentation wizardry).
So, is there a way to have TM[2] run TeXShop as the typesetting engine when I push Cmd-R
instead of running the tex binaries directly, thus functioning as the external editor in
TeXShop?
yes. Just use the following bash code to tell “TeXShop” to typeset the current active file
in TextMate:
#!/bin/bash
filename=`basename "${TM_FILEPATH}"`
osascript <<EOF
tell document "$filename" of application "TeXShop" to
typesetinteractive
EOF
This code assumes that you already opened the file with “Open for Preview” in TeXShop
beforehand! If you ticked the option “Configure for External Editor” in “TeXShop” then
just use “Open” instead of “Open for Preview”.
I attached a bundle that contains a command that contains above code. Just double click
the bundle to install it. After that:
1. Open the file you want to typeset in “TeXShop” as described above
2. Open the same file in TextMate
3. Hit `⌘R` to typeset the file with “TeXShop”
Regards from Ladenburg,
-MWL-
--
Martin Wilhelm Leidig, SatzTeXnik — Dante e.V. #1580
Professional TeXing and TeXnical counselling