On Jan 25, 2006, at 5:37 PM, Matthias Damm wrote:
Am 25.01.2006 um 23:36 schrieb Charilaos Skiadas:
Matthias, do you have any reference for this? Is this documented behavior? Is it special to TexShop, or general to LaTeX?
I don't think it is general to LaTeX, and the only reference for TeXShop I found is in the version history (http://www.uoregon.edu/ ~koch/texshop/version.html): Tags: a source code line which begins with %: is interpreted as a tag and listed in the tag pulldown menu. Choosing a tag scrolls to the corresponding line in the source code.
But it is very helpful :-)
Well, it's there now! Hope it works as you expect it to. (You do update through subversion, right?)
I downloaded TMCodeBrowser, but I am neiter sure if I understand what it does, nor do I know exactly what I would have to change. In other words: I don't really have a clue what I have to do ...
In your home directory, TMCodeBrowser should have created a file titled ".ctags.tmcodebrowser". It is not visible in finder I think, but you can see it if you type "ls .c*" in the terminal. You would want to edit this file in textmate, so in the terminal you would want to run a command like "mate .ctags.tmcodebrowser". If the file is not there, then you would want to create it.
This file contains a section for latex, which looks like this:
--langdef=latex --langmap=latex:.tex --regex-latex=/\label{*([^} \t]+)[ \t]*}/\1/l,label/ --regex-latex=/^\(sub)*section{([^}]*)}/\2/s,section/
If it doesn't then add it. To get the comments, you would probably have to add a line like this: --regex-latex=/(%:.*)/\1/c,comment/ or if you want it to only match at the beginning of a line: --regex-latex=/^(%:.*)/\1/c,comment/
I'l like to mention two other things:
- TextMate removes the "\section" etc. commands in the menu and
indents the text, but this is not done for \part, \chapter. Is this the desired behavior?
No, just neglect on our part. I'll try to fix it.
- In koma-script alternative forms of the document structure
commands exist: \addpart, \addchap and \addsec (which generate unnumbered headings) and \minisec. Is it possible to add those as well?
I don't know anything about koma-script, but if it is not standard latex behavior I would rather we create a separate bundle for it, which could be done if anyone wants to do it. I can help, but probably wouldn't want to be in charge of creating it. We've done something like that for the beamer class. Is this something similar perhaps? You can have a look at the beamer class and create your a similar syntax for koma-script.
And I think there is a bug in TextMate when you use the search in the Bundle editor.
Do the following to reproduce it:
Allan is aware of the problem. Don't know if he has a solution yet.
Thanks, Matthias
-- Matthias Damm mad@macpla.net PGP key: http://macpla.net/MatthiasDamm.asc PGP fingerprint: CED3 6074 7F7D 3148 C6F3 DFF2 05FF 3A0B 0D12 4D41
Haris