[TxMt] LaTeX Bundle question

Brad Miller bonelake at gmail.com
Wed Feb 6 15:39:07 UTC 2008


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   -------------



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  

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.
> 1. 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).
> 2. 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 at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate

More information about the textmate mailing list