help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to translate LaTeX into UTF-8 in Elisp?


From: Marcin Borkowski
Subject: Re: How to translate LaTeX into UTF-8 in Elisp?
Date: Mon, 03 Jul 2017 06:56:36 +0200
User-agent: mu4e 0.9.19; emacs 26.0.50

On 2016-12-08, at 18:04, Marcin Borkowski <mbork@mbork.pl> wrote:

> Hi all,
>
> I have a string with embedded sequences like "\'e" or "\H{o}".  The
> Emacs TeX input method knows how to convert them into "é" or "ő" (when
> typing, of course).  Is there a way to use that to perform similar
> conversions in a string?

Hi all,

I'm revisiting this old thread now.  Since I got no satisfying answers
back then, here is my plan for solution.  I'm going first to map \', \`
etc. onto /names/ (this is a rather short list!), construct a Unicode
name of the character I want and then use =ucs-names=.

For instance, \' maps to "ACUTE", then \'a will map to "LATIN SMALL
LETTER A ACUTE" and this can be fed into =char-from-name=.

It is a horrible hack, but it should work.  Any better ideas?

Best,

--
Marcin Borkowski



reply via email to

[Prev in Thread] Current Thread [Next in Thread]