[TxMt] LaTeX: feature suggestions for the LaTeX bundle.

Maarten Sneep maarten.sneep at xs4all.nl
Sun Dec 3 19:10:40 UTC 2006


Hi,

On 2-dec-2006, at 20:35, Charilaos Skiadas wrote:
> On Dec 2, 2006, at 8:50 AM, Maarten Sneep wrote:
>> TeXShop defines some meta comments, describing the source, and how  
>> it can be typeset. From the help-files:
>>
>> %!TEX TS-program = command
>> %!TEX encoding = encoding
>> %:Marker
>> %!TEX root = Document
>
> By an odd coincidence, Kevin Ballard added yesterday support for %! 
> TEX root, and some rudimentary support for %!TEX TS-program. To  
> check that out, you will need to check out the subversion version  
> of the bundle, which gets updated very frequently. Look at the  
> TextMate manual [1] in the section “Getting More Bundles” for  
> information how to set that up, and you can email the list with any  
> problems (or even better, join us at the ##textmate IRC channel)

OK, I'll try to get the latest edition.

>> It would be useful to have a "open selection" command that opens a  
>> referenced file, and an open master command. I have some of those  
>> in my scripts in my bundle [1], for regular tex files, and  
>> graphics files (either open the original metapost source, of open  
>> the graphic in preview or so).
>
> That's actually not a bad idea, and should be easy to implement. I  
> suppose you mean something like: If the caret is over the filename  
> in \include{filename}, then to open filename for editing, or if the  
> caret is over the image in \includegraphics{image}, to open the  
> image. Or would you rather the command scans the entire line for  
> any such relevant things, and offer you a popup if there are more  
> than one?

I scan the whole line where the insertion point is, and open the  
first one I find. A variation of the command opens all referenced  
files in the current document. For the graphics you may want to  
perform some additional trickery (people who use metapost may want  
the source of the image, rather than the pdf -- and some more name- 
mangling may be needed).

> Addendum: I just prepared such a command, and will be committing it  
> shortly. Probably not perfect yet.

The technical term is iteration, I believe.

> As far as encoding goes, TextMate always presents its commands with  
> utf-8 data, taking care of trying to figure out the encoding of the  
> original file as best it can, and keeping this transparent from the  
> bundle items, which just act on utf-8 data. Allan has talked  
> extensively on his views on the whole encoding issue [2]. Let us  
> know of any particular problems you encounter.

Well, tex was written in the pure 7-bit era, when computing dinosaurs  
inhabited the face if the internet, there may even have been a  
version that could run on an EBCDIC system. There are versions coming  
(xetex, luatex) that will handle utf-8 natively, but at this moment,  
tex itself is only 8-bit clean. There is an inputenc module that  
handles utf8, but it is far from complete. Most tex users who want to  
type characters beyond 7-bit ASCII will rely on one of the 8-bit sets  
(iso-latin-1 through 15, etc). Since this encodung is given in the  
source, it is not completely trivial to change this automagically.

> Perhaps here I will take the opportunity to list the various  
> resources on the workings of the LaTeX bundle, even though they are  
> slightly out of date (and the mailing list archives offer for the  
> moment more up to date info).

Thanks for the pointers.

>> I have a sample project that shows most of the issues, mail me off- 
>> list if you are interested.
>
> Please do send it to me.

Do not expect it to compile (an update to Memoir seems to have  
introduced a bug somewhere). I'll send the archive in a separate  
message.

Maarten


More information about the textmate mailing list