Skip to content

Instantly share code, notes, and snippets.

@shigeya
Created September 27, 2013 09:22
Show Gist options
  • Save shigeya/6726107 to your computer and use it in GitHub Desktop.
Save shigeya/6726107 to your computer and use it in GitHub Desktop.
Hack to correct encoding of PDF section browser titles
\ifluatex\else\ifx\kanjiskip\undefined\else
\ifx\ucs\undefined
\usepackage{atbegshi}
\ifnum 42146=\euc"A4A2
\AtBeginShipoutFirst{\special{pdf:tounicode EUC-UCS2}}
\else
\AtBeginShipoutFirst{\special{pdf:tounicode 90ms-RKSJ-UCS2}}
\fi\fi\fi\fi
@shigeya
Copy link
Author

shigeya commented Dec 16, 2013

You might need to install atbegshi but as far as you're using TeXlive version of TeX, it should be in your package.
link: http://www.ctan.org/pkg/atbegshi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment