Get unicode output for quotation marks

Daniel xracoonx at gmx.de
Mon Feb 24 12:34:39 UTC 2020


On 2020-02-24 12:09, Jean-Marc Lasgouttes wrote:
> Le 24/02/2020 à 11:38, Daniel a écrit :
>> Hi,
>>
>> Is there a way to get LyX to use unicode for quotation marks?
>>
>> In particular, I am using quotation marks in a section title which 
>> generates the following LaTeX code:
>>
>> \section{``Test''}
>>
>> However, I would like it to generate
>>
>> \section{“Test”}
>>
>> The problem is that otherwise the bookmarks in PDFs also show ``Test'' 
>> instead of “Test”.
> 
> You should get that if you use xetex/luatex (aka 'Use non-TeX fonts').
> 
> JMarc

Ah, I see. LyX actually does not use the unicode characters “ and ” but 
\textquotedblleft and \textquotedblright{} when I insert the unicode 
character. So, I guess what I want is to have `` and '' be replaced by 
those commands.

Yes, using xetex changes the code preview to usage of unicode. Is it on 
purpse one cannot useb pdflatex that way?

By the way, I noticed two strange things:

1. If I typeset the document I sent before first with pdflatex and then 
with xetex I get an error:

  \babel at aux{english}{}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

If I typeset a second time with xetex or straight from the beginning, it 
works as expected.

2. With xetexThe plain quotation marks show as Mapping=34 in the bookmarks.

Daniel



More information about the lyx-users mailing list