unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* TeX input method
@ 2006-10-02 19:40 Stefan Monnier
  2006-10-03 13:17 ` David Kastrup
  0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2006-10-02 19:40 UTC (permalink / raw)


I like the TeX input method and tend to turn it on in ever more buffers.
But as I do that I start to bump into cases where it annoys me.
Overall it's a pretty discrete input method, but I recently got annoyed by
some of the keys it uses.

I'm sure other people have other pet peeves, but here are my two main
problems and suggestion to fix each.

- First problem: ~ is mapped to the non-breaking space.  It actually took me
  a while to understand why my ~ key didn't insert a tilde: TeX usually only
  fiddles with key sequences, so you get to see visually that thjere's
  something going on (because of the underscored text, and the echo area
  output).  I suggest to leave ~ alone and use `\ SPC' for nbsp.
  But then inserting \ can become a bit cumbersome (although C-q \ still
  works), so maybe this should be complemented by a mapping from `\ \' -> \.
  Here is the patch hunk I'm using right now in latin-ltx.el for that:

   @@ -901,7 +901,8 @@
     ("\\Bbb{Z}" ?ℤ)
     ("--" ?–)
     ("---" ?—)
   - ("~" ? )                           ; nbsp
   + ("\\\\" ?\\)
   + ("\\ " ? ) ;; ("~" ? )      ; nbsp ; Hijacking ~ would be too annoying.
     ("\\mu" ?μ)
     ("\\rho" ?ρ)
     ("\\mathscr{I}" ?ℐ)                ; moment of inertia

- Second problem: the TeX input method uses a leading { even though it's not
  necessary: all the corresponding chars can be input with a simpler
  key-sequence (just skip the { and }).  E.g. the german ß can be input with
   `{ \ s s }' or with `\ s s'.

  So I think we should remove those redundant key-sequences and thus free
  the { key.  See attached patch for that.


        Stefan


--- orig/leim/quail/latin-ltx.el
+++ mod/leim/quail/latin-ltx.el
@@ -45,17 +45,17 @@
 
 (quail-define-rules
  ("!`" ?¡)
- ("{\\pounds}" ?£) ("\\pounds" ?£)
- ("{\\S}" ?§) ("\\S" ?§)
+ ("\\pounds" ?£) ;; ("{\\pounds}" ?£)
+ ("\\S" ?§) ;; ("{\\S}" ?§)
  ("\\\"{}" ?¨)
- ("{\\copyright}" ?©) ("\\copyright" ?©)
+ ("\\copyright" ?©) ;; ("{\\copyright}" ?©)
  ("$^a$" ?ª)
  ("\\={}" ?¯)
  ("$\\pm$" ?±) ("\\pm" ?±)
  ("$^2$" ?²)
  ("$^3$" ?³)
  ("\\'{}" ?´)
- ("{\\P}" ?¶) ("\\P" ?¶)
+ ("\\P" ?¶) ;; ("{\\P}" ?¶)
  ;; Fixme: Yudit has the equivalent of ("\\cdot" ?⋅), for U+22C5, DOT
  ;; OPERATOR, whereas · is MIDDLE DOT.  JadeTeX translates both to
  ;; \cdot.
@@ -71,8 +71,8 @@
  ("\\~{A}" ?Ã)  ("\\~A" ?Ã)
  ("\\\"{A}" ?Ä)  ("\\\"A" ?Ä)
  ("\\\k{A}" ?Ą)
- ("{\\AA}" ?Å) ("\\AA" ?Å)
- ("{\\AE}" ?Æ) ("\\AE" ?Æ)
+ ("\\AA" ?Å) ;; ("{\\AA}" ?Å)
+ ("\\AE" ?Æ) ;; ("{\\AE}" ?Æ)
  ("\\c{C}" ?Ç)  ("\\cC" ?Ç)
  ("\\`{E}" ?È)  ("\\`E" ?È)
  ("\\'{E}" ?É)  ("\\'E" ?É)
@@ -93,14 +93,14 @@
  ("\\\"{O}" ?Ö)  ("\\\"O" ?Ö)
  ("\\\k{O}" ?Ǫ)
  ("$\\times$" ?×) ("\\times" ?×)
- ("{\\O}" ?Ø) ("\\O" ?Ø)
+ ("\\O" ?Ø) ;; ("{\\O}" ?Ø)
  ("\\`{U}" ?Ù) ("\\`U" ?Ù)
  ("\\'{U}" ?Ú) ("\\'U" ?Ú)
  ("\\^{U}" ?Û) ("\\^U" ?Û)
  ("\\\"{U}" ?Ü) ("\\\"U" ?Ü)
  ("\\\k{U}" ?Ų)
  ("\\'{Y}" ?Ý) ("\\'Y" ?Ý)
- ("{\\ss}" ?ß) ("\\ss" ?ß)
+ ("\\ss" ?ß) ;; ("{\\ss}" ?ß)
 
  ("\\`{a}" ?à) ("\\`a" ?à)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'n" ?ń)
  ("\\c{N}" ?Ņ) ("\\cN" ?Ņ)
@@ -206,8 +206,8 @@
 
  ("\\H{O}" ?Ő) ("\\HO" ?Ő)
  ("\\U{o}" ?ő) ("\\Uo" ?ő)
- ("{\\OE}" ?Œ) ("\\OE" ?Œ)
- ("{\\oe}" ?œ) ("\\oe" ?œ)
+ ("\\OE" ?Œ) ;; ("{\\OE}" ?Œ)
+ ("\\oe" ?œ) ;; ("{\\oe}" ?œ)
  ("\\'{R}" ?Ŕ) ("\\'R" ?Ŕ)
  ("\\'{r}" ?ŕ) ("\\'r" ?ŕ)
  ("\\c{R}" ?Ŗ) ("\\cR" ?Ŗ)

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

end of thread, other threads:[~2006-10-06  8:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-02 19:40 TeX input method Stefan Monnier
2006-10-03 13:17 ` David Kastrup
2006-10-03 13:50   ` Stefan Monnier
2006-10-03 13:56     ` David Kastrup
2006-10-03 14:29       ` Stefan Monnier
2006-10-04  2:55         ` Kenichi Handa
2006-10-05  5:30           ` Miles Bader
2006-10-05  7:26             ` David Kastrup
2006-10-05 13:39               ` Stefan Monnier
2006-10-05 13:59               ` Stefan Monnier
2006-10-05 14:19                 ` David Kastrup
2006-10-05 14:52                   ` Stefan Monnier
2006-10-06  8:16                     ` Kim F. Storm

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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