[TxMt] Patch for LaTex Bundle
Xavier Cambar
xcambar at gmail.com
Sat May 5 15:14:37 UTC 2007
Going on this way, I found out that the command was used to open
files in a separate window.
I am looking for a way to open incuded files in a tab. I thought of a
recursive search, starting from the folder of the master file (if not
defined, the currently opened one), or even better, opening the right
file from the ones in the current project. Anyhow, there are many
ways to make this efficient, but I have no idea how to open a file in
a tab... Commands generally use 'mate', which (as far as I know)
isn't able of this...
Well, any idea?
Xavier
Le 4 mai 07 à 21:19, Charilaos Skiadas a écrit :
> Xavier,
>
> Thanks for the patch, sorry it took me so long to commit it.
>
> Haris Skiadas
> Department of Mathematics and Computer Science
> Hanover College
>
> On Apr 20, 2007, at 12:27 PM, Xavier CAMBAR wrote:
>
>> Context:
>> I needed to insert tex files which filenames contained spaces into
>> my document. LaTex can handle this efficiently if quotes are
>> provided in the \include (like in \include{"bla bla/bla bla"}).
>>
>> For easy moving along my document, I intended to use the "Open
>> Included File" command. But that command doesn't handle the quoted
>> filenames, as the quotes are taken into account as normal characters.
>> So here I am with a line to be added to that command in order to
>> correct that misbehaviour:
>>
>> 10: ...
>> 11: if options.empty?
>> 12: print "Did not find any appropriate item to open in #{ENV
>> ['TM_SELECTED_TEXT'] ? "selection" : "current line" }"
>> 13: else
>> 14: options[0].each{|el| el.gsub!(/(^\")?(\"$)?/, '')}
>> #<-- Here it is!
>> 15: filepath = `kpsewhich #{e_sh options[0]}`.chomp
>> 16: if filepath.empty?
>> 17: ...
>>
>> I don't know how to commit changes in a bundle (according I am
>> allowed to!). So now it's up to you, folks, to add it to the
>> repository.
>> Note that I quickly and unformally tested it, and everything seems
>> ok.
>>
>> Xavier Cambar
>
>
> ______________________________________________________________________
> 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