Skip to Content.
Sympa Menu

texmacs-users - Init.scm snippets for French people

Subject: mailing-list for TeXmacs Users

List archive

Init.scm snippets for French people


Chronological Thread 
  • From: David Allouche <address@hidden>
  • To: address@hidden
  • Subject: Init.scm snippets for French people
  • Date: Sat, 23 Mar 2002 16:58:37 +0100

By popular demand, here are the Init.scm snippets I designed for typing
french text.

First snippets defines a custom keymap that makes it easier to type in french
accented characters on a QWERTY or Dvorak keyboard. It uses key sequences
(esp. those with apostrophe and comma, beware of the order) that are not
normally used un french text. Other special characters are not meaningful in
french text.

(set-keymap (in-french?)
("a `" "à") ("A `" "À") ("a ^" "â") ("A ^" "Â")
("e '" "é") ("E '" "É") ("e `" "è") ("E `" "È")
("e ^" "ê") ("E ^" "Ê") ("e \"" "ë") ("E \"" "Ë")
("i ^" "î") ("I ^" "Î")
("o ^" "ô") ("O ^" "Ô")
("u `" "ù") ("U `" "Ù") ("u ^" "û") ("U ^" "Û")
(", c" "ç") (", C" "Ç")
("a e" "æ") ("A e" "Æ") ("A E" "Æ")
("o e" "÷") ("O e" "×") ("O E" "×"))


Second snippet is a hack to word around the fact that the typesetter does not
properly handle local typesetting rules regarding puntuactions and spaces.
Maybe that should be a wishlist item... Beware though, careless use can cause
insertion of several thin spaces!

It also demonstrate the powerful but under-used insert-object function and an
application of quasi-quotation.

(define (make-french-left-punctuation str)
(insert-object `(concat (hspace "0.4spc") ,str)))

(define (make-french-right-punctuation str)
(insert-object `(concat ,str (hspace "0.4spc"))))

(set-keymap (in-french?)
(":" (make-french-left-punctuation ":"))
(";" (make-french-left-punctuation ";"))
("?" (make-french-left-punctuation "?"))
("!" (make-french-left-punctuation "!"))
("< *" (make-french-right-punctuation " "))
("> *" (make-french-left-punctuation " "))
("< <" (make-french-right-punctuation " "))
("> >" (make-french-left-punctuation " ")))


The last snippet simply re-enable input of em-dashes. Maybe that should be a
bug...

(set-keymap (in-text?) ("- - -" " "))
--

-- David --


  • Init.scm snippets for French people, David Allouche, 03/23/2002

Archive powered by MHonArc 2.6.19.

Top of Page