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

Maarten Sneep maarten.sneep at xs4all.nl
Sat Dec 2 16:15:36 UTC 2006


On 2-dec-2006, at 16:48, Jacob Rus wrote:

> Interestingly, the following patch was checked into the TextMate  
> bundles subversion repository about 7 hours ago:

[snip]

> So it seems that much of what you are looking for is on the way.   
> But as for encoding, TextMate really prefers UTF-8 for everything,  
> so I'm not sure whether things will necessarily be made easier for  
> other encodings.

You lot are too fast… The encoding is mainly for reading files, but  
TeX (at this moment, this will change) can handle only classical 8- 
bit encodings. So both for storing and reading some support for US  
ASCII, and related 8-bit encodings is needed for TeX.

>> 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).
>
> How exactly does this work?  There are similar commands in a few  
> bundles (I dunno about LaTeX), and you can make TextMate commands  
> pretty flexibly, so I imagine you'll be able to get this to work  
> without much effort.

\include{dir/file} reads in dir/file.tex (and starts a new page in  
the output). The location is relative to the location of the master  
or root file of the project.
\input{dir/file} reads the contents of dir/file.tex in place  
(location again relative to the current location.

Tricky bits: the \include command is a plain tex command, and can  
handle file names with spaces \input{"dir/file with spaces"} (the  
same is still true of \include). However, and this is the really  
tricky bit: \input dir/file or \input "dir/file with spaces" are  
equivalent to \input{dir/file} and \input{"dir/file with spaces"},  
respectively. If an extension is specified, it takes precedence,  
but .tex is tried in any case.

\includegraphics pretty much works the same way, but a set of  
extensions is tried. One additional trick: there may be a graphics  
search path in effect, to search a completely different tree  
altogether. I've never used that, but there are command-line  
utilities to help out here (kpsewhich, kpsewhat). It is probably too  
tricky to try to support this for a first release.

> I imagine Haris and others can answer your questions better than I  
> can.  Again, welcome.

I can wait…

Thanks for the quick response.

Maarten


More information about the textmate mailing list