In an effort to avoid actual writing this afternoon, I decided to add some enhancements to the LaTeX syntax bundle.
Here's what I've done:
\textbf{foobar} -> highlights with textbf as the usual maroonish/purplish command color but foobar is bolded in black \textit{foobar} -> sames as above but foobar is italicized in black \texttt{foobar} -> same as above but in a teletype font, ha, no really, its underlined.
Added highlighting for strings like: `foo' and ``foo'' These are colored in the same green as math. I find this one really helpful as it also points out when I've forgotten to use the proper pairing of quotes. I thought about highlighting "foo" in red to really remind me that its wrong.
Added $ to the list of smart typing pairs. I don't know about the rest of you but 99% of the time when I type a $ in LaTeX its to do math.
I also brightened up that maroonish purplish color just slightly since it seemed a bit dim to me.
Since these changes seem generally useful and non-controversial (except maybe the color change). I'd be happy to contribute these to the subversion repository if Alan would grant me an account.
However, since there are already at least three people in the history file I thought I would post my ideas for further discussion. Any requests?
Brad -- Brad Miller, PhD Assistant Professor Luther College http://www.cs.luther.edu/~bmiller jabber: bnmnetp@jabber.org
At 5:20 PM -0600 1/28/05, Brad Miller wrote:
In an effort to avoid actual writing this afternoon, I decided to add some enhancements to the LaTeX syntax bundle.
The changes sound nice! The LaTeX bundle could use some improvement. When you check it in on svn, I'll have a look. If there ends up being some delay in getting you on svn, you can mail me the bundle and I'll check it in...
best, Eric
On Jan 29, 2005, at 3:52, Eric Hsu wrote:
[...] The LaTeX bundle could use some improvement.
With the much improved bundle editor :), maybe one of you could create a few templates and add? Otherwise I can add the template I use for letters (written in LaTeX).
If there ends up being some delay in getting you on svn, you can mail me the bundle and I'll check it in...
Adding should be instant, since I have a script to create an account (generating nick-name/pw), subscribe user to ML etc. which I just love to use!
At 6:48 AM +0100 1/29/05, Allan Odgaard wrote:
[...] The LaTeX bundle could use some improvement.
With the much improved bundle editor :), maybe one of you could create a few templates and add? Otherwise I can add the template I use for letters (written in LaTeX).
Brad...? :)
- Eric
Yes,
First task of the morning is to check out the bundles and add in what I did yesterday. I've added a couple more snippets already for verbatim and listings.
I've not done any templates, but they look pretty easy, especially with the editor. Here's what I think would be useful, based on my own use cases. Templates: -- a basic article setup -- Lab assignment writeups -- Exams (uses the exam package)
The feature I would really like to figure out how to do is how to keep track of labels, so I could have some kind of autocomplete when I type \ref{fig:x <some command key> I get a list of matching labels to choose from.
Brad
On Jan 29, 2005, at 12:25 AM, Eric Hsu wrote:
At 6:48 AM +0100 1/29/05, Allan Odgaard wrote:
[...] The LaTeX bundle could use some improvement.
With the much improved bundle editor :), maybe one of you could create a few templates and add? Otherwise I can add the template I use for letters (written in LaTeX).
Brad...? :)
- Eric
-- Eric Hsu, Assistant Professor of Mathematics San Francisco State University erichsu@math.sfsu.edu http://math.sfsu.edu/hsu ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Brad Miller, PhD Assistant Professor Luther College http://www.cs.luther.edu/~bmiller jabber: bnmnetp@jabber.org
The feature I would really like to figure out how to do is how to keep track of labels, so I could have some kind of autocomplete when I type \ref{fig:x <some command key> I get a list of matching labels to choose from.
I have essentially this set up, along with a more general system that does LaTeX autocomplete stuff... So in the situation you describe, it'll autocomplete the label and display its context in a tooltip (rotating through different possible matches with repeated keypresses) and, if nothing matches, just display a list of labels. There's also a script that does this kind of autocompletion for BibTeX \cite{blah<some command key, and, if you're in neither a \ref nor a \cite, it tries to autocomplete with a LaTeX command. (For the \cite stuff, you need to define a shell variable $TM_BIBFILE that contains the full pathname of the bibliography file you're using.)
I'm attaching the scripts... Fiddling will likely be required to get these to work on any set-up other than mine... It should essentially work, though, if you just dump everything into your ~/Library/Latex.tmbundle/Macros directory. (Or go into the macro and change the path appropriately.) It's triggered by command-shift-spacebar.
(I'm not getting anywhere near svn---catastrophe would ensue if I did, and in any case, these really would need to be fiddled with a bit, changing some filepaths and stuff, to fit elegantly into a bundle.)
Marcin
Brilliant! It almost worked right out of the box, except that command-shift-space appears to be bound to who knows what else on my system right now. So I rebound it to ctrl-command-space and it took right off. Thanks!
For my citations I have been using the Bibdesk (http://bibdesk.sourceforge.net/), and its OS X service. Its worth a look if you haven't seen it.
Brad
On Jan 29, 2005, at 11:16 AM, otheraccount@verizon.net wrote:
The feature I would really like to figure out how to do is how to keep track of labels, so I could have some kind of autocomplete when I type \ref{fig:x <some command key> I get a list of matching labels to choose from.
I have essentially this set up, along with a more general system that does LaTeX autocomplete stuff... So in the situation you describe, it'll autocomplete the label and display its context in a tooltip (rotating through different possible matches with repeated keypresses) and, if nothing matches, just display a list of labels. There's also a script that does this kind of autocompletion for BibTeX \cite{blah<some command key, and, if you're in neither a \ref nor a \cite, it tries to autocomplete with a LaTeX command. (For the \cite stuff, you need to define a shell variable $TM_BIBFILE that contains the full pathname of the bibliography file you're using.)
I'm attaching the scripts... Fiddling will likely be required to get these to work on any set-up other than mine... It should essentially work, though, if you just dump everything into your ~/Library/Latex.tmbundle/Macros directory. (Or go into the macro and change the path appropriately.) It's triggered by command-shift-spacebar.
(I'm not getting anywhere near svn---catastrophe would ensue if I did, and in any case, these really would need to be fiddled with a bit, changing some filepaths and stuff, to fit elegantly into a bundle.)
Marcin
<LaTeXcompletion.tgz>__________________________________________________ ____________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Brad Miller, PhD Assistant Professor Luther College http://www.cs.luther.edu/~bmiller jabber: bnmnetp@jabber.org
Hey Brad, if you have time, can you check in those macros into the LaTeX bundle?
- Eric ___ Sent with SnapperMail www.snappermail.com
Do you mean the ref and cite completion macros from from Marcin? I can commit them if that is agreeable.
I made one small change, to the macro, to have it use $TM_BUNDLE_DIR for the path information.
Brad
On Jan 29, 2005, at 1:11 PM, Eric Hsu wrote:
Hey Brad, if you have time, can you check in those macros into the LaTeX bundle?
- Eric
Sent with SnapperMail www.snappermail.com
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Brad Miller, PhD Assistant Professor Luther College http://www.cs.luther.edu/~bmiller jabber: bnmnetp@jabber.org
Hm... Sorry to be stiffing others/Brad with the svn stuff. But honestly, I'd have to learn it from scratch, which I don't have time to do right now, so, I assure you, I would accidentally blow up the earth.
By the way, if there's a readme file in the bundle somewhere, it might be worth mentioning there that you have to set the environment variable $TM_BIBFILE to the full pathname of the bib file.
With respect to Bibdesk, which came up earlier---that was partly the impetus for trying to do cite completion via TextMate. As nice as it is in other respects, Bibdesk strikes me as incredibly slow and crash-prone about doing completions, and does them sort of weirdly. So it seems to me it reflects really well on TextMate that it'd be possible to whip up a faster alternative with just a few scripts... Impressive of it. Or rather of Allan, inasmuch as it's probably not writing itself. Yet.
On Jan 30, 2005, at 6:18 PM, Allan Odgaard wrote:
On Jan 30, 2005, at 18:10, Brad Miller wrote:
Do you mean the ref and cite completion macros from from Marcin? I can commit them if that is agreeable.
I think he does, and personally I'd love for you to do that!
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate