On Dec 3, 2006, at 2:10 PM, Maarten Sneep wrote:
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).
If you tell me what sort of trickery you'd like, I can try and modify the command to use it.
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.
Well, TextMate likes to save things as UTF-8. I have an idea, but I don't know if it would actually work quite right. Tell me what you think:
Let TextMate save files as UTF-8. Specify a %!TEX encoding = enc- name. The Typeset command could then pass the file through iconv to convert to the desired encoding, and save it temporarily on disc as .filename.converted.tex, and then pass the -jobname switch to pdflatex to tell it to use the original filename as the name for the job.