[TxMt] LaTeX Bundle question

Geoff Vallis gkv at Princeton.EDU
Fri Feb 8 17:43:29 UTC 2008


With help from Brad in setting the root file correctly, I finally got  
a working bundle for syncing with xdvi. It is very short, and I listed  
it below. It doesn't go through texMate.py. I do think that it would  
be nice eventually to incorporate xdvi syncing into texMate.py, but at  
least for now this does the trick.  Note that syncing requires that  
latex be called with the option '-src' so that source specials are  
included.

Relatedly, would be be possible to create a command 'Typeset (DVI)'  
that is analogous to 'Typeset and View (PDF)', that calls the latex  
(dvi) engine (but not dvips), that goes through texMate.py, and that  
one can call with a keyboard shortcut without either changing one's  
latex preferences and without adding a special TS-program line at the  
top of the file?

Thanks to all for their comments.

Geoff

--------------------------

divsync bundle:

TM_LATEX_MASTER=`${TM_RUBY:-ruby} <<"RUBY"
require "#{ENV['TM_SUPPORT_PATH']}/lib/escape.rb"
require "#{ENV['TM_SUPPORT_PATH']}/lib/LaTeXUtils.rb"

master = LaTeX.master(ENV['TM_LATEX_MASTER'] || ENV['TM_FILEPATH'])
puts master
RUBY`

DVIFILE=${TM_LATEX_MASTER:-$TM_FILEPATH}

/pathto/dvisync.sh $TM_LINE_NUMBER $TM_FILENAME ${DVIFILE%.tex}.dvi

---------------------------

dvisync.sh:  (shell script)

#!/bin/tcsh
/usr/texbin/xdvi -sourceposition $1$2 $3

---------------------------



On Feb 7, 2008, at 9:52 PM, Charilaos Skiadas wrote:

> Geoff are you by any chance setting the TM_LATEX_MASTER variable  
> under TextMate -> Preferences -> Advanced? Then TM will always use  
> that.
> But perhaps I've missed some part of this conversation.
>
> I don't use xdvi for the very simple reason that by this point in  
> time I don't feel the need to look at the output, simply looking at  
> the code tells me all I need to know about how the output is going  
> to be like, for the most part. And usually I don't have X11 running.
>
> I'm a bit confused though. Do you still go through texMate.py,  
> calling the existing compile command, or do you use your own command  
> (command \equiv bundle item)? If it's the latter, then I don't see  
> how the %!TEX directive will work, unless you do something special  
> in your command. TextMate by itself does not do anything with the  
> file, it just calls your command directly. In texMate,py, we have a  
> lot of code whose job is exactly to locate the root file, if any,  
> and use that, and that's what the built in compilation command uses.
>
> Haris Skiadas
> Department of Mathematics and Computer Science
> Hanover College
>
>




More information about the textmate mailing list