From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Umlauts in LaTeX export Date: Wed, 03 Nov 2010 23:51:54 -0400 Message-ID: <21363.1288842714@gamaville.dokosmarshall.org> References: <87sjzibe53.fsf@berkeley.edu> <26AC1DD2-BF5D-4D61-930D-50B2D9DF7A5C@nf.mpg.de> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=44458 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDqrw-0000RO-Kk for emacs-orgmode@gnu.org; Wed, 03 Nov 2010 23:52:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PDqrv-0003SH-7S for emacs-orgmode@gnu.org; Wed, 03 Nov 2010 23:52:08 -0400 Received: from vms173001pub.verizon.net ([206.46.173.1]:45274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PDqrv-0003SA-49 for emacs-orgmode@gnu.org; Wed, 03 Nov 2010 23:52:07 -0400 Received: from gamaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173001.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LBC0053ZDEIEAO0@vms173001.mailsrvcs.net> for emacs-orgmode@gnu.org; Wed, 03 Nov 2010 22:51:54 -0500 (CDT) In-reply-to: Message from Jean-Marie Gaillourdet of "Wed\, 03 Nov 2010 18\:51\:08 BST." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jean-Marie Gaillourdet Cc: Richard Lawrence , nicholas.dokos@hp.com, emacs-orgmode mailing list Jean-Marie Gaillourdet wrote: > Dear Richard, >=20 > Stefan Vollmar writes: >=20 > > Dear Richard, > > > > sitting in front of a German keyboard, writing=20 > > > > G=C3=B6del > > > > seems to be the obvious solution for modern LaTeX and Emacs > > versions - you could define some shortcut to insert the appropriate > > Unicode character into your text (as your keyboard probably does not > > feature a "=C3=B6" key), or copy/paste the Umlauts from another Emacs > > file as necessary. If you do not need it very often, this might be a > > reasonable alternative. >=20 > Although I am german, I use an american keyboard layout for coding and > everything else. But there is a nice emacs solution to enter umlauts: > =3DC-x RET C-\ german-postfix RET=3D This enables an input method which > allows you to enter all german umlauts: =C3=A4 =C3=BC =C3=B6 =C3=84 =C3= =9C =C3=96 and =C3=9F.=20 >=20 > Entering an `a' followed immediately by an `e' generates an =C3=A4, follo= wed > by another `e' it becomes `ae`, similar for =C3=BC and =C3=B6 . `s` follo= wed by > `z` generates an `=C3=9F`. Larger variants are typed by typing two large > letters. >=20 There are a couple of assumptions here (and in Eric F.'s mail about the TeX input method as well). One is that the buffer is encoded in UTF-8: if you use e.g iso-8859-1, you can use whatever input method you want, but you'll end up with a byte in your file that LaTeX won't like. The second assumption (which is satisfied by default when an org file is exported to LaTeX) is that \usepackage[utf8]{inputenc} is used in the LaTeX file.[fn:1] Assuming that both of these assumptions are satisfied, this is indeed the best way to deal with umlauts, accented characters, cedillas and the like: the buffer *looks* like the LaTeX output. But remember that there is an encoding there nevertheless. Nevertheless that does not absolve org from dealing with \" properly. In fact, it deals with it correctly in a heading but not in the text: --8<---------------cut here---------------start------------->8--- * G\"odel G\"odel --8<---------------cut here---------------end--------------->8--- gives: --8<---------------cut here---------------start------------->8--- ... \section{G\"odel} \label{sec-1} G\''odel --8<---------------cut here---------------end--------------->8--- However, surrounding the o with braces breaks things in both places. I think part of the problem is that headings and text go through different processing: e.g. text goes through org-export-latex-content, whereas headings don't. So fixing a problem like this in one place is not enough. Nick Footnotes: [fn:1] This may or may not be correct if you use omega or xetex or one of the more recent TeX variants, but I don't know much about them.