[TxMt] LaTeX Bundle question

Brad Miller bonelake at gmail.com
Thu Feb 7 02:47:52 UTC 2008


How do you tell a running version of xdvi to change its position/page  
from the shell?  If it can be done from the shell I'll look at adding  
it.  If xdvi is to be an officially supported viewer then its going to  
take me a bit of time to make it work with the rest of the bundle  
options in texMate.py.  All of the viewing commands assumed that pdf  
was the format that was going to be viewed so its not a trivial  
change.  You are the first person to request support for xdvi.  I'm  
curious if others would want xdvi supported as well.

If it is a short shell script then it really would be very easy for  
you to add your own bundle command.

type ctrl-opt-cmd-b to bring up the bundle editor
You should see a bundle with your own name, or you can add the command  
to the latex bundle.
click add new command in the lower left corner.
Give your new command a name:  dvisync
Save: Nothing
Command(s)  Whatever shell script tells xdvi to update itself.  The  
two variables you may want are:
Input:  None
Output: discard
key equivalent:  your choice
Scope Selector:  text.tex.latex


Close the bundle editor, and you've made your first TextMate command.
On Feb 6, 2008, at 3:53 PM, Geoff Vallis wrote:

> Replying to Brad and Niels in one go:
> On Feb 6, 2008, at 4:13 PM, Niels Kobschaetzki wrote:
>> The "Show in PDF Viewer"-command says "texMate.py sync 1" (you can  
>> see
>> that in the Bundle Editor)
>> and locate tells me that texMate.py is located in
>> "/Applications/TextMate.app/Contents/SharedSupport/Bundles/ 
>> Latex.tmbundle/Support/bin/texMate.py"
>> and a search in TextMate in that file says that the stuff you are
>> searching for starts propably at line 109…
> On Feb 6, 2008, at 4:33 PM, Brad Miller wrote:
>>> Brad,
>>> That's too bad if so, and seems a bit odd, to me at least. After  
>>> all, an applescript can call a shell script, which could be used  
>>> to call xdvi, presuming that the parameters like line number and  
>>> file name could be passed on to the shell script. And I thought  
>>> that Textmate could in any case invoke shell commands directly,  
>>> which is all one would need along with the file name and line  
>>> number.
>>> I am presumably missing something!
>> You are probably right.  I didn't think about it very carefully,  
>> and I don't really know anything about xdvi anymore as I've been  
>> very happily using pdf for several years now.
>> I would presume that if it can all be done in a shell script then  
>> using the TM_ variables would give you enough info to put together  
>> a script.  In fact this script could simply be the body of a  
>> TextMate bundle command.
>> Brad
> Thanks to both of you. Looking at texMate.py, it seems that in order  
> to forward sync, TextMate calls the scripts that are provided by the  
> PDF viewers, such as forward-search.sh in TeXniscope. On the face of  
> it, it seems that one might be able to substitute a call to xdvi for  
> one of these scripts, as the functionality and calling parameters  
> are very similar. I guess I'll give it a shot -- unless someone who  
> actually knows what they are doing wants to do it? I suspect it is a  
> piece of cake in that case, and I'd be happy to provide any  
> knowledge of xdvi that might be needed. (Unfortunately, I barely  
> know what a 'bundle' is...)
> Geoff
> ______________________________________________________________________
> 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