On 2020-03-14 13:25, Guenter Milde wrote:
On 2020-03-14, Daniel wrote:
On 2020-02-24 11:38, Daniel wrote:
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”.


I just learned about the LaTeX command \texorpdfstring. Basically, one
gives it two arguments where the first is the tex and the second is the
one to be used in the bookmarks (pdf). Doesn't look nice in LyX but gets
the job done. However, I had to manually switch to unicode encoding to
get it to work with the "fancy" quotation marks (Document > Settings >
Language). See the attached file.

With Unicode (utf8) encoding, there should be no need for \texorpdfstring, as
the typographical quotes are used in the latex source:

  >> \section{“Test”}

(This is one of the reasons why utf8 is the new default encoding in LyX 2.4.)

No, even with utf8, \section{``Test''} is produced in the latex source.

Daniel

--
lyx-users mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-users

Reply via email to