* AucTeX: shortcut for a font-specifier
@ 2002-09-08 11:38 Dani Martí
2002-09-10 9:08 ` Kai Großjohann
0 siblings, 1 reply; 3+ messages in thread
From: Dani Martí @ 2002-09-08 11:38 UTC (permalink / raw)
Hi everybody,
I would like to define a shortcut to insert a '\textcolor{color}{text}'
in my LaTeX document with 'color' package, in the same we can easily
insert standard font specifiers like '\emph{text}' just by typing `C-c
C-f C-e'. In other words, how to implement this?
`C-c C-f C-a' should insert \textcolor{}{} and ask you the
color and text with which to fill the two
arguments.
[Of course, the shortcut `C-c C-f C-a' may be
different, as long as it is not already defined]
The only difference is that \textcolor has two arguments instead of two,
but I think this may be easy to implement by a lisp expert.
Bells & Whistles: it would be nice to have auto-completion when you are
being asked for a color (1st argument). The colors could be the standard
68 colors known to dvips: GreenYellow, Yellow, Goldenrod, Dandelion...
Thanks a lot in advance,
Dani Marti
--
Go away, I'm all right.
-- H.G. Wells'last words.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: AucTeX: shortcut for a font-specifier
2002-09-08 11:38 AucTeX: shortcut for a font-specifier Dani Martí
@ 2002-09-10 9:08 ` Kai Großjohann
2002-09-10 11:17 ` Reiner Steib
0 siblings, 1 reply; 3+ messages in thread
From: Kai Großjohann @ 2002-09-10 9:08 UTC (permalink / raw)
Dani Martí <dmarti@NOSPAMifae.es> writes:
> I would like to define a shortcut to insert a '\textcolor{color}{text}'
> in my LaTeX document with 'color' package, in the same we can easily
> insert standard font specifiers like '\emph{text}' just by typing `C-c
> C-f C-e'. In other words, how to implement this?
See the variable TeX-font-list. But that doesn't support prompts out
of the box. Dunno how to do that. Maybe you have to use the macro
insertion support for that. (C-c C-m textcolor RET will insert that
macro, if AUC-TeX knows about it. You can use completion to enter
the macro name. Maybe that's sufficient?)
kai
--
A large number of young women don't trust men with beards. (BFBS Radio)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: AucTeX: shortcut for a font-specifier
2002-09-10 9:08 ` Kai Großjohann
@ 2002-09-10 11:17 ` Reiner Steib
0 siblings, 0 replies; 3+ messages in thread
From: Reiner Steib @ 2002-09-10 11:17 UTC (permalink / raw)
On Tue, Sep 10 2002, Kai Großjohann wrote:
> Dani Martí <dmarti@NOSPAMifae.es> writes:
>
>> I would like to define a shortcut to insert a '\textcolor{color}{text}'
>> in my LaTeX document with 'color' package, in the same we can easily
>> insert standard font specifiers like '\emph{text}' just by typing `C-c
>> C-f C-e'. In other words, how to implement this?
>
> See the variable TeX-font-list.
Isn't it LaTeX-font-list from `latex.el'?
(eval-after-load "latex"
'(add-to-list 'LaTeX-font-list
(quote (15 "\\textcolor{" "}{}"))))
`C-c C-f C-o' inserts "\textcolor{}{}" (cursor in the first pair of
brackets). But no completion for the colors.
It would be nice to update the menus too (LaTeX / Insert Font, LaTeX /
Change Font, ...). I don't know what is the best way to achieve this.
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-09-10 11:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-08 11:38 AucTeX: shortcut for a font-specifier Dani Martí
2002-09-10 9:08 ` Kai Großjohann
2002-09-10 11:17 ` Reiner Steib
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).