unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* LaTeX Keybindings for Math Symbols
@ 2006-04-27 15:10 Ryan Krauss
  2006-04-27 16:25 ` Reiner Steib
  0 siblings, 1 reply; 8+ messages in thread
From: Ryan Krauss @ 2006-04-27 15:10 UTC (permalink / raw)


I would like to create Latex keybindings for math symbols (or find out
what they are if they already exist).  For example, in Vim I used to
have mappings for `t -> \tau so that typing ` and then a english
character would insert the Latex math code for the corresponding greek
symbol (`a would insert \alpha and `b would insert \beta ...).

My first attempts at writing a key binding have failed:
(global-set-key "`q" "\theta")
leads to:
error: "Key sequence ` q uses invalid prefix characters"

So, I think part of the problem is that I need a valid set of
short-cut keys where I can set a,b,d,t, q, w, ...  versions to things.

Do such mappings for latex greek characters already exist?  If not,
can someone help me with an example of a valid global-set-key?

Thanks,

Ryan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: LaTeX Keybindings for Math Symbols
       [not found] <mailman.1028.1146150618.9609.help-gnu-emacs@gnu.org>
@ 2006-04-27 15:36 ` Maarten Bergvelt
  2006-04-27 15:52   ` Ryan Krauss
  0 siblings, 1 reply; 8+ messages in thread
From: Maarten Bergvelt @ 2006-04-27 15:36 UTC (permalink / raw)


In article <mailman.1028.1146150618.9609.help-gnu-emacs@gnu.org>, 
Ryan Krauss wrote:

> I would like to create Latex keybindings for math symbols (or find
> out what they are if they already exist).  For example, in Vim I
> used to have mappings for `t -> \tau so that typing ` and then a
> english character would insert the Latex math code for the
> corresponding greek symbol (`a would insert \alpha and `b would
> insert \beta ...).
> 
> My first attempts at writing a key binding have failed:
> (global-set-key "`q" "\theta")
> leads to:
> error: "Key sequence ` q uses invalid prefix characters"
> 
> So, I think part of the problem is that I need a valid set of
> short-cut keys where I can set a,b,d,t, q, w, ...  versions to things.
> 
> Do such mappings for latex greek characters already exist?  If not,
> can someone help me with an example of a valid global-set-key?

Are you aware of the existence of AucTeX?

http://www.gnu.org/software/auctex/

It looks as if you want to reinvent the wheel. In particular if you
enter Math Mode 'a inserts \alpha. 
-- 
Maarten Bergvelt		

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: LaTeX Keybindings for Math Symbols
  2006-04-27 15:36 ` Maarten Bergvelt
@ 2006-04-27 15:52   ` Ryan Krauss
  0 siblings, 0 replies; 8+ messages in thread
From: Ryan Krauss @ 2006-04-27 15:52 UTC (permalink / raw)
  Cc: help-gnu-emacs

Thank you.  As I googled around for a while, I eventually came across
auctex, and it does seem like what I want.  I was not aware of it when
I made the original post, but I am now.

Thanks,

Ryan

On 4/27/06, Maarten Bergvelt <bergv@math.uiuc.edu> wrote:
> In article <mailman.1028.1146150618.9609.help-gnu-emacs@gnu.org>,
> Ryan Krauss wrote:
>
> > I would like to create Latex keybindings for math symbols (or find
> > out what they are if they already exist).  For example, in Vim I
> > used to have mappings for `t -> \tau so that typing ` and then a
> > english character would insert the Latex math code for the
> > corresponding greek symbol (`a would insert \alpha and `b would
> > insert \beta ...).
> >
> > My first attempts at writing a key binding have failed:
> > (global-set-key "`q" "\theta")
> > leads to:
> > error: "Key sequence ` q uses invalid prefix characters"
> >
> > So, I think part of the problem is that I need a valid set of
> > short-cut keys where I can set a,b,d,t, q, w, ...  versions to things.
> >
> > Do such mappings for latex greek characters already exist?  If not,
> > can someone help me with an example of a valid global-set-key?
>
> Are you aware of the existence of AucTeX?
>
> http://www.gnu.org/software/auctex/
>
> It looks as if you want to reinvent the wheel. In particular if you
> enter Math Mode 'a inserts \alpha.
> --
> Maarten Bergvelt
>
>
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: LaTeX Keybindings for Math Symbols
  2006-04-27 15:10 LaTeX Keybindings for Math Symbols Ryan Krauss
@ 2006-04-27 16:25 ` Reiner Steib
  2006-04-27 17:10   ` Ryan Krauss
       [not found]   ` <mailman.1033.1146157859.9609.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Reiner Steib @ 2006-04-27 16:25 UTC (permalink / raw)


On Thu, Apr 27 2006, Ryan Krauss wrote:

> I would like to create Latex keybindings for math symbols (or find out
> what they are if they already exist).  For example, in Vim I used to
> have mappings for `t -> \tau so that typing ` and then a english
> character would insert the Latex math code for the corresponding greek
> symbol (`a would insert \alpha and `b would insert \beta ...).

In case you use AUCTeX:

,----[ (info "(auctex)Mathematics") ]
| 5.1 Entering Mathematics
| ========================
| 
| TeX is written by a mathematician, and has always contained good
| support for formatting mathematical text.  AUCTeX supports this
| tradition, by offering a special minor mode for entering text with many
| mathematical symbols.  You can enter this mode by typing `C-c ~'.
| 
|  -- Command: LaTeX-math-mode
|      (`C-c ~') Toggle LaTeX-math-mode.  This is a minor mode rebinding
|      the key `LaTeX-math-abbrev-prefix' to allow easy typing of
|      mathematical symbols.  ``' will read a character from the keyboard,
|      and insert the symbol as specified in `LaTeX-math-list'.  If given
|      a prefix argument, the symbol will be surrounded by dollar signs.
| 
|    You can use another prefix key (instead of ``') by  setting the
| variable `LaTeX-math-abbrev-prefix'.
| 
|    To enable LaTeX-math-mode by default, add the following in your
| `.emacs' file:
|      (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
`----

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: LaTeX Keybindings for Math Symbols
  2006-04-27 16:25 ` Reiner Steib
@ 2006-04-27 17:10   ` Ryan Krauss
  2006-04-27 21:48     ` Reiner Steib
       [not found]   ` <mailman.1033.1146157859.9609.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 8+ messages in thread
From: Ryan Krauss @ 2006-04-27 17:10 UTC (permalink / raw)


Thanks.  I had stumbled across that.

Is there a reason that the auctex menu doesn't have a \begin{equation}
option?  What is \begin{math}?

Thanks,

Ryan

On 4/27/06, Reiner Steib <reinersteib+gmane@imap.cc> wrote:
> On Thu, Apr 27 2006, Ryan Krauss wrote:
>
> > I would like to create Latex keybindings for math symbols (or find out
> > what they are if they already exist).  For example, in Vim I used to
> > have mappings for `t -> \tau so that typing ` and then a english
> > character would insert the Latex math code for the corresponding greek
> > symbol (`a would insert \alpha and `b would insert \beta ...).
>
> In case you use AUCTeX:
>
> ,----[ (info "(auctex)Mathematics") ]
> | 5.1 Entering Mathematics
> | ========================
> |
> | TeX is written by a mathematician, and has always contained good
> | support for formatting mathematical text.  AUCTeX supports this
> | tradition, by offering a special minor mode for entering text with many
> | mathematical symbols.  You can enter this mode by typing `C-c ~'.
> |
> |  -- Command: LaTeX-math-mode
> |      (`C-c ~') Toggle LaTeX-math-mode.  This is a minor mode rebinding
> |      the key `LaTeX-math-abbrev-prefix' to allow easy typing of
> |      mathematical symbols.  ``' will read a character from the keyboard,
> |      and insert the symbol as specified in `LaTeX-math-list'.  If given
> |      a prefix argument, the symbol will be surrounded by dollar signs.
> |
> |    You can use another prefix key (instead of ``') by  setting the
> | variable `LaTeX-math-abbrev-prefix'.
> |
> |    To enable LaTeX-math-mode by default, add the following in your
> | `.emacs' file:
> |      (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
> `----
>
> Bye, Reiner.
> --
>        ,,,
>       (o o)
> ---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: LaTeX Keybindings for Math Symbols
       [not found]   ` <mailman.1033.1146157859.9609.help-gnu-emacs@gnu.org>
@ 2006-04-27 19:03     ` Maarten Bergvelt
  2006-04-27 20:04       ` Ryan Krauss
  0 siblings, 1 reply; 8+ messages in thread
From: Maarten Bergvelt @ 2006-04-27 19:03 UTC (permalink / raw)


In article <mailman.1033.1146157859.9609.help-gnu-emacs@gnu.org>, 
Ryan Krauss wrote:
> Thanks.  I had stumbled across that.
> 
> Is there a reason that the auctex menu doesn't have a \begin{equation}
> option?  What is \begin{math}?

In never use menus but environments are entered in Auctex by C-c-e and
then you are prompted for the environment, with tab completion as
usual. \begin{math} is usually abbreviated as $ or \(, for inline equations.

-- 
Maarten Bergvelt		

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: LaTeX Keybindings for Math Symbols
  2006-04-27 19:03     ` Maarten Bergvelt
@ 2006-04-27 20:04       ` Ryan Krauss
  0 siblings, 0 replies; 8+ messages in thread
From: Ryan Krauss @ 2006-04-27 20:04 UTC (permalink / raw)
  Cc: help-gnu-emacs

Thanks again.  C-c-e seems to work well.

I submitted this to the AucTeX list as well, but any idea how to
define a custom math-mode completion.  There doesn't seem to be a key
binding for \frac and \ddot.

Ryan

On 4/27/06, Maarten Bergvelt <bergv@math.uiuc.edu> wrote:
> In article <mailman.1033.1146157859.9609.help-gnu-emacs@gnu.org>,
> Ryan Krauss wrote:
> > Thanks.  I had stumbled across that.
> >
> > Is there a reason that the auctex menu doesn't have a \begin{equation}
> > option?  What is \begin{math}?
>
> In never use menus but environments are entered in Auctex by C-c-e and
> then you are prompted for the environment, with tab completion as
> usual. \begin{math} is usually abbreviated as $ or \(, for inline equations.
>
> --
> Maarten Bergvelt
>
>
>
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: LaTeX Keybindings for Math Symbols
  2006-04-27 17:10   ` Ryan Krauss
@ 2006-04-27 21:48     ` Reiner Steib
  0 siblings, 0 replies; 8+ messages in thread
From: Reiner Steib @ 2006-04-27 21:48 UTC (permalink / raw)


[ Please don't do top-posting. ]

On Thu, Apr 27 2006, Ryan Krauss wrote:

> On 4/27/06, Reiner Steib <reinersteib+gmane@imap.cc> wrote:
[...]
>> In case you use AUCTeX:
>>
>> ,----[ (info "(auctex)Mathematics") ]
[...]
> Thanks.  I had stumbled across that.
>
> Is there a reason that the auctex menu doesn't have a \begin{equation}
> option?

<menu-bar> <LaTeX> <Insert Environment> <enumerate ... filecontents>
<equation>

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-04-27 21:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-27 15:10 LaTeX Keybindings for Math Symbols Ryan Krauss
2006-04-27 16:25 ` Reiner Steib
2006-04-27 17:10   ` Ryan Krauss
2006-04-27 21:48     ` Reiner Steib
     [not found]   ` <mailman.1033.1146157859.9609.help-gnu-emacs@gnu.org>
2006-04-27 19:03     ` Maarten Bergvelt
2006-04-27 20:04       ` Ryan Krauss
     [not found] <mailman.1028.1146150618.9609.help-gnu-emacs@gnu.org>
2006-04-27 15:36 ` Maarten Bergvelt
2006-04-27 15:52   ` Ryan Krauss

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).