Fonts & Character SetsSpecial Characters in PDF Bookmarks

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
AliceWonder
Posts: 28
Joined: Wed Oct 31, 2012 12:04 am

Special Characters in PDF Bookmarks

Post by AliceWonder »

Fedora 18 64-bit but using official TeXLive 2012 as distributed from TUG, not using Fedora's TeX system. The relevant parts of preamble to the environment.

Code: Select all

Code, edit and compile here:
\usepackage[greek,english]{babel}
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage{lucimono} %%my package, sets Lucida Mono EF as monospace font
\usepackage[kerkis]{psgreek}
\usepackage[colorlinks,linkcolor=blue,urlcolor=blue]{hyperref}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
I am writing an article (standard article class) on bitcoin.
At the present, there is not an official symbol for bitcoin and the most commonly used symbols in graphics are not yet in fonts.

For this reason, I use the following definitions.

Code: Select all

Code, edit and compile here:
\newcommand{\btc}{BTC}
\newcommand{\mbtc}{mBTC}
\newcommand{\ubtc}{\foreignlanguage{greek}{m}BTC}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
That way if there becomes an official symbol and a glyph that works in LaTeX is produced, I can just update those.

I use those within a LaTeX section:

Code: Select all

\subsection{\btc{}, \mbtc{}, \ubtc{}}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Compiling via PDFLaTeX the mu character works perfectly in the typeset ToC and the in subsection heading and everywhere else. The problem is in the table of contents for the PDF itself (not the typeset ToC).

There, the link to the subsection uses m instead of Greek mu for my \ubtc{} command. So it looks like

BTC, mBTC, mBTC

That last mBTC should be Greek character mu BTC. I would prefer it use the mu obviously, but if that is not possible, then use a "u" instead of "m".

How do I do this?
Last edited by AliceWonder on Wed Jul 17, 2013 12:03 pm, edited 2 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
AliceWonder
Posts: 28
Joined: Wed Oct 31, 2012 12:04 am

Special Characters in PDF Bookmarks

Post by AliceWonder »

I should add, the reason I'm using psgreek is because I don't like the character produced by $\mu$ - it looks funny with Times, and using psgreek made it easy to experiment with different available type 1 greek fonts until I found one that matches Times well enough.
AliceWonder
Posts: 28
Joined: Wed Oct 31, 2012 12:04 am

Re: Special Characters in PDF Bookmarks

Post by AliceWonder »

Using textcomp does the right thing but not with the right font. I tried declaring the font family but it didn't bold the character in the subsection heading.

It looks like I may be able to hack the textgreek package to do the right thing by adding support for the font I want to use but I haven't tried yet.

Another approach might be to modify the PDF bookmark after hyperref creates it but I don't know how hard that is.
AliceWonder
Posts: 28
Joined: Wed Oct 31, 2012 12:04 am

Special Characters in PDF Bookmarks

Post by AliceWonder »

Solved it -

Code: Select all

\newcommand{\ubtc}{\texorpdfstring{\foreignlanguage{greek}{m}}{\textmu{}}BTC}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
That results in the nice font of my choice in the typeset part of the document while using the generic mu character in the PDF bookmark.
Post Reply