[texhax] document broken under windows

Heiko Oberdiek heiko.oberdiek at googlemail.com
Fri Oct 8 23:55:34 CEST 2010


On Fri, Oct 08, 2010 at 09:06:41PM +0200, Arno Trautmann wrote:

> Uwe Lueck wrote:
> > Even under Linux, the endash and the appostrophe appear wrong in the bookmarks. 
> 
> Yes, that is no viewer problem but in the pdf itself. But to be honest,
> I don???t care about the bookmarks here as they are not of great use.
> Furthermore, if I enter a unicode character to a unicode-aware engine
> (typeset using luaTeX) and it does not come out as such, I first
> consider this to be a bug. But I don???t blame anyone for it as I didn???t
> try to solve it anyways.
> 
> > Only in the past year I have learnt how to get good bookmarks with \pdfstringdefDisableCommands. 
> > I would suggest using \textendash and some \apostrophe in the titles and then perhaps 
> > \pdfstringdefDisableCommands{\def\textendash{-}\def\apostrophe{\rq}}
> 
> That???s not a nice way ???
> 
> > Heiko may know something better.
> 
> Hope so. Heiko? ???

* \usepackage[unicode]{bookmark}
  Then direct UTF-8 input is supported (via utf8.def or utf8x.def).
  Using lualatex I got the endash and the apostrophe in the bookmarks.

* \usepackage{bookmark}
  Then the bookmarks don't need two runs.
  I also prefer:
  \bookmarksetup{numbered}

Your PDF is errorneous, xpdf complains:
  Error (34318): Illegal character ')'
  Error (34318): Dictionary key must be a name object
  Error (40975): Illegal character ')'
  Error (40975): Dictionary key must be a name object
  Error (40975): Illegal character ')'
  Error (40975): Dictionary key must be a name object

When I compile the file using \pdfobjcompresslevel=0, then xpdf doesn't show
an error, however using \pdfobjcompresslevel=2 I got errors using xpdf:
  Error (35708): Dictionary key must be a name object
  Error (39036): Illegal character ')'
  Error (39039): Dictionary key must be a name object
Therefore I suspect a bug in luatex 0.63.0.
Workaround:
Disabling object compression of PDF-1.5:

\ifcsname pdfobjcompresslevel\endcsname
  \pdfobjcompresslevel=0
\fi

Yours sincerely
  Heiko Oberdiek


More information about the texhax mailing list