[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] composed characters in LaTeX source code
From: |
Stephen Berman |
Subject: |
Re: [AUCTeX] composed characters in LaTeX source code |
Date: |
Thu, 08 Nov 2018 21:10:34 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
On Thu, 8 Nov 2018 18:58:02 +0100 jfbu <address@hidden> wrote:
> Le 08/11/2018 à 18:45, jfbu a écrit :
>> Le 08/11/2018 à 18:07, Stephen Berman a écrit :
>>> 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'.
>>
>> Hi
>>
>> I wanted to test your problem but I have another issue, which is that
>> typing
>>
>> 'xb M-x 8 <RET> 302 <RET>ac'
>>
>> the 'a' gets superimposed on top of the b in my Emacs buffer:
>>
>> (see attached image)
That's strange, and doesn't happen for me (see the screenshot in my
followup to Joost Kremers). Does it also look like that in emacs -Q?
And what version of Emacs?
>> As per your issue, it is going to be very hard in LaTeX to get the accent on
>> top of previous letter. (I think, but my knowledge of Unicode is
>> scarce). With LuaLaTeX that could be possible.
Haven't tried LuaLaTeX yet, but XeLaTeX does work, though with
suboptimal display (see my other followup again).
>> If really the combining accent is supposedly typed *after* the letter
>> (which sounds strange to me, but again, I am no Unicode-guy).
>
> Ok, I learned since that's way.
>
> As per your original question
>
> https://tex.stackexchange.com/questions/79333/is-there-a-way-to-get-pdflatex-to-accept-unicode-combining-accents
>
> has a comment by D. Carlisle who said in 2012: I think the answer is "No".
>
> A further comment by the same, when asked about "peek at previous character"
>
> yes but you can't go back, you can in simple case write a macro that parses
> the entire text stream re-ordering tokens when it sees a combining character,
> but it would be very fragile and likely break most other package commands. If
> your accented letters are single characters in Unicode form NFC then
> normalising the input before passing to TeX will be a lot more robust.
>
> (quote from D. C.)
>
> The available answer recommends using Perl to malax the file and normalize the
> Unicode characters.
Thanks for the URL and quotes; in fact, I had also found that before
posting, but I don't think it would work for me anyway, because in my
case it's about composed characters for which there are no corresponding
single Unicode characters, so nothing to normalize to.
Steve Berman
Re: [AUCTeX] composed characters in LaTeX source code, Joost Kremers, 2018/11/08