Brad,
Thanks very much. Your script works as advertised.
I'd like now to be able to sync from the source document in TextMate to the xdvi window. I presume that I need to add some command in the Latex bundle that is analogous to the existing command 'show in PDF viewer (pdfsync)'. When I look at that command in the bundle editor it is not very informative as to how to do this. Any suggestions?
Geoff
On Feb 6, 2008, at 10:39 AM, Brad Miller wrote:
Geoff,
Using the following directive at the top of your latex file %!TEX TS-program = mytex.sh
Then, write your own shell script to typeset the document in latex with your own options and own viewer. Here's what I wrote up as a quick test:
---------- snip and save to mytex.sh -------------
#!/bin/bash
FILE="${TM_LATEX_MASTER:-$TM_FILEPATH}"
latex -src-specials -interaction=nonstopmode -file-line-error $@ # "$FILE" #&& dvips -t a4 "${FILE%.tex}.dvi" && ps2pdf "${FILE.tex}.ps"
xdvi -sourceposition $TM_LINE_NUMBER$$FILE "${FILE%.tex}.dvi"
Save the above to /usr/local/bin or some other directory on your path and you are good to go.
Make sure to uncheck automatically open pdf in the latex preferences window.
On Feb 6, 2008, at 7:56 AM, Geoff Vallis wrote:
Hello,
I'm new to TextMate so please forgive my ignorance. My question is: is it possible to, or would it be possible to make, TextMate work well with xdvi? Even though part of the world is trending toward using PDF to display on the Mac, e.g. with Skim, there are still some advantages to xdvi, in particular that the display and updating are very fast, and it is much faster to latex a long document than to pdflatex it.
There are two things that would be needed.
- When using latex as the engine, it seems that TextMate also
invokes dvips to create a PDF file. This should be turned off. (Perhaps there is already an option for this?) Also, one would need to invoke latex with src-specials turned on (latex -src-specials).
- One would like to be able to synchronize from TextMate to xdvi.
This can be done with a command like: xdvi -sourceposition lineno$texfile $dvifile for example xdvi -sourceposition 50myfile.tex mymasterfile.dvi
Syncing from xdvi to TextMate is already relatively easy.
I'm guessing all this may be easy for those who are familiar with bundle editing (not me!), or even perhaps has been done already?
Thanks Geoff Vallis
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate