[OS X TeX] New Format Macro (Applescript) for TeXShop
Ramón Figueroa-Centeno
ramonf at hawaii.edu
Mon Mar 30 06:34:53 EDT 2009
Aloha,
Using Claus Gerhardt's Flashmode I tend to forget that I would like the first line of my documents to have a format command, e.g. %&pdflatex. These format directives are, of course, useful in much wider contexts.
Therefore, I wrote a Format Macro to insert these format commands in TeXShop.
Incidentally, searching the web for documentation on the use of these directives has been frustrating because most search engines will ignore "%&". So my knowledge is limited.
I am assuming that all of the formats can be found typing
fmtutil --listcfg | awk '/^[^#].*/ {print $1}'
in the Terminal (plus ones that might be in a TeX document's directory).
In my distribution I get: aleph, lamed, amstex, cont-en, cont-en, mptopdf, metafun, cslatex, pdfcslatex, csplain, pdfcsplain, eplain, jadetex, pdfjadetex, latex, pdflatex, lualatex, pdflualatex, luatex, pdfluatex, mf, mpost, mfplain, mex, pdfmex, mltex, mllatex, omega, lambda, etex, pdfetex, pdftex, physe, phyzzx, tex, texsis, utf8mex, xetex, xelatex, xmltex and pdfxmltex. Are all of the legal possibilities for a format command, e.g. "%&mex"?
Now, I modified my Macros for Engine, Program and Root to respect documents that have in their first line format commands. For example, when using the Program Macro and such a first line starting with %&pdflatex is found then the "% !TEX TS-program" directive will be inserted in the second line.
You can find these (and more) in my website: <http://www2.hawaii.edu/~ramonf/TeXShop/index.html>.
Thanks,
Ramón
--
View this message in context: http://n2.nabble.com/New-Format-Macro-%28Applescript%29-for-TeXShop-tp2556556p2556556.html
Sent from the MacOSX-TeX mailing list archive at Nabble.com.
More information about the MacOSX-TeX
mailing list