Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

hyperref, lualatex and unicode bookmarks issue

425 views
Skip to first unread message

meho_r

unread,
Jul 29, 2011, 3:15:10 PM7/29/11
to
Heiko,

I followed the discussion about garbled page numbers in Adobe Reader
on Linux [1], but it ended with discussion about backslash. So, I'd
like to ask what is a general solution for unicode chars in bookmarks
with lualatex? I have exactly the same problem as OP in cited post
when running lualatex: with unicode option bookmarks are fine, but
page numbers are garbled, while with unicode=false page numbers are
fine but bookmarks show some strange characters instead of non-ascii
ones.

Note that the same code results in perfectly normal page numbers in
the PDF file opened with Adobe Reader 9 on Linux when I compile it
with xelatex. Is this a driver-related problem?

[1] http://groups.google.com/group/comp.text.tex/browse_thread/thread/a2661d8af7d1c513/74ec6d33d1e1d725?

Example code:

\documentclass{article}

\usepackage{hyperref}

\begin{document}

\section{Test 1 čćžđš}

Some text.\clearpage

\section{Test 2 šđžćč}

Some text.

\end{document}

Heiko Oberdiek

unread,
Jul 29, 2011, 5:33:36 PM7/29/11
to
meho_r <meho...@gmail.com> wrote:

> I followed the discussion about garbled page numbers in Adobe Reader
> on Linux [1], but it ended with discussion about backslash. So, I'd
> like to ask what is a general solution for unicode chars in bookmarks
> with lualatex? I have exactly the same problem as OP in cited post
> when running lualatex: with unicode option bookmarks are fine, but
> page numbers are garbled, while with unicode=false page numbers are
> fine but bookmarks show some strange characters instead of non-ascii
> ones.
>
> Note that the same code results in perfectly normal page numbers in
> the PDF file opened with Adobe Reader 9 on Linux when I compile it
> with xelatex. Is this a driver-related problem?

AFAIK there is also some bug involved in some versions of AR, if
the page labels are encoded in Unicode.

I would use
\usepackage[pdfencoding=auto]{hyperref}

Then unicode is enabled (needed to deal with the "big chars" that
luaTeX supports). And page labels or bookmarks are converted
back to PDFDocEncoding, if the string can be encoded in this
encoding.

--
Heiko Oberdiek

Meho R

unread,
Aug 20, 2011, 7:48:26 PM8/20/11
to
Thanks a lot, Heiko, auto pdfencoding solved the problem completely.
0 new messages