[TxMt] Re: LaTeX-Bundle: handle umlaute and special characters

Piero D'Ancona pierodancona at gmail.com
Wed Aug 15 11:44:10 UTC 2007


Matthias Conrad <conrad at ...> writes:

>  If you are typing an umlaut like ä, ü, é, etc. it writes in 
> TeX-code \"{a},\"{u},\'{e} etc. to the tex-file

A very simple but partial solution to your request:
define a new command with the options

Input: Selected text or Word
Output: Replace selected text
Key equivalent: Option + u

The code for the command is the following:

#!/usr/bin/env ruby
w = STDIN.read
if w.length != 0 : print w[0,w.length-1]+"\\\"\{"+w[-1,1]+"\}"
end

It works like this: you type
   Doppelga
then you press OPT+U and the a gets umlaued
   Doppelg\"{a}
then you continue typing
   Doppelg\"{a}nger

Essentially, you type the Umlaut after the vowel
instead of before the vowel. Note that this disables
the normal key combination OPT+U for umlauts,
so you should tie it to the scope text.tex.latex
(or choose a different key shortcut).

As to your second request, concerning umlauts
and more general characters, personally I am
totally against it. I find it very confusing working
with text editors which show half text, half
preview (e.g. emacs with inline preview),
and it slows me down. Moreover when you need 
to make some correction  you must switch from 
preview to actual text, which is a pain. 
But this is my taste of course

Piero




More information about the textmate mailing list