auctex
[Top][All Lists]
Advanced

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

[AUCTeX] composed characters in LaTeX source code


From: Stephen Berman
Subject: [AUCTeX] composed characters in LaTeX source code
Date: Thu, 08 Nov 2018 18:07:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Emacs can correctly display composed characters, and I want to use such
characters in a LaTeX source file but when I run the latter through
pdflatex, the PDF output display is wrong.

For example, there is no Unicode codepoint for the character 'b' with a
circumflex (unlike e.g. 'a' with a circumflex), but in Emacs I can
display this character by typing the sequence 'b M-x 8 <RET> COMBINING
CIRCUMFLEX ACCENT <RET>' (or equivalently, 'b M-x 8 <RET> 302 <RET>).

I have a file containing such composed characters that I've imported to
a LaTeX file but in the output of pdflatex, the circumflex is displayed
over the character following the one it is composed with, e.g., the
sequence 'b^a' (where '^' means U+0302, the combining circumflex accent)
is displayed in Emacs with the circumflex over 'b' but in the PDF output
the circumflex is over 'a'.

The desired PDF output is of course obtainable by using the sequence
'\^{b}a' in the LaTeX source, but that would require using search and
replace and keeping two files, since I want to use the file with the
composed characters elsewhere in Emacs apart from LaTeX.

In the LaTeX source I'm using the inputenc package with option utf8, and
since it does not have a preset mapping for U+302, I've added this line
the the preamble:

\DeclareUnicodeCharacter{0302}{\^} 

But this works only for single Unicode codepoints, not for composed
characters.  Is there some way to use a composed character in the LaTeX
source and get the correct display in the output?

(Sorry for posting a non-auctex-specific question to this list, but I
failed to find an answer on the web and hope that there's enough TeX-fu
here.  Otherwise, I'd appreciate pointers to a more appropriate list
(I'd rather not use a web forum).)

Steve Berman




reply via email to

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