[TxMt] LaTeX Bundle question
Brad Miller
bonelake at gmail.com
Wed Feb 6 21:33:58 UTC 2008
On Feb 6, 2008, at 1:13 PM, Geoff Vallis 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
> Geoff
>
>
> On Feb 6, 2008, at 1:43 PM, Brad Miller wrote:
>
>> Geoff,
>>
>> The pdfsync commands rely on the applescript capability of the
>> viewers like Skim. I don't think that is going to be possible with
>> xdvi.
>>
>> Brad
>>
>> On Feb 6, 2008, at 11:00 AM, Geoff Vallis wrote:
>>
>>> 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.
>>>>>
>>>>> 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
>>>>
>>>>
>>>> ______________________________________________________________________
>>>> 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
>>>
>>>
>>> ______________________________________________________________________
>>> 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
>>
>>
>> ______________________________________________________________________
>> 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
>
>
> ______________________________________________________________________
> 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