[TxMt] LATEX Bundle : Missing(perhaps) features
Charilaos Skiadas
skiadas at hanover.edu
Tue Nov 21 13:48:32 UTC 2006
On Nov 21, 2006, at 3:40 AM, Alain Matthes wrote:
> Hello (sorry for my bad english)
>
> 1) Insert a macro applied at a selection :
>
> selection --> \<caret and choice>{selection} --> \macro{selection}
>
> If i want to apply a macro like \fbox or colorbox, i would like to
> make this :
>
>
> i've an expression $\gamma\leq3$ and i want \fbox{$\gamma\leq3$}
>
> i would like to select $\gamma\leq3$ and with a shortcut get this:
>
> \<caret>{$\gamma\leq3$} and now i can write fbox or colorbox ?
>
> I miss the feature ?
>
ctrl-shift-W (Wrap Selection In -> Command)
> 2) Is it a possible in a special environment to use a special
> langage grammar,
> and/or a special coloring syntax and/or a special completion ??
>
Yes, in fact we already do this for the lstlisting environments. It
requires changing the grammar a bit, by adding some rules, and of
course also to know what the special syntax/completions you want to
perform are. We already have three special completion behaviors:
1) When typing a command, like "\bet", pressing escape will complete
based on a fixed set of commands, in this case it will complete to
\beta. If you find some commands missing, we can add them.
2) When inside a \ref{}, escape completes using all \label{} entries.
3) When inside a \cite{}, escape completes using bibliography entries.
So what you want is doable, provided you specify the syntax needed
between the \begin-\end groups.
> for exemple
>
> \begin{pspicture} .... \end{pdpicture}
>
> or
>
> \begin{tikzpicture} .... \end{tikzpicture}
>
> I give these environments because there are rich with a lot of
> macros like beamer, listings
>
> Greetings Alain Matthes
Haris
More information about the textmate
mailing list