[OS X TeX] Exponents in Hyperref bookmark

Victor Ivrii vivrii at gmail.com
Tue Jul 10 00:28:57 CEST 2012


On Mon, Jul 9, 2012 at 5:21 PM, David Arnold <dwarnold45 at suddenlink.net> wrote:
> Michael,
>
> No, don't think so. Open:
>
> http://mathrev.redwoods.edu/ElemAlgText/chapter6/chapter6.pdf
>
> Open the bookmarks and click on section 6.3. The math is typeset in the document, but not in the bookmark. I am wondering if there is a way to get this particular math (ax^2+bx+c when a=1) typeset as well in the bookmark.
>
> D.
>

You example shows that the author does not know how to deal with the
issue. While not every math expression has a text equivalent, many
have. In your particular example  the only problem are ^2, so alt text
is

\texttwosuperior

So your alt text is

ax\texttwosuperior + bx + c

consult

/usr/local/texlive/YEAR/texmf-dist/tex/latex/hyperref/puenc.def

See hyperref manual p. 18 (sect 4.1.2)

You need to call hyperref
\usepackage[...,unicode,pdfencoding=auto]{hyperref}


PS Not sure if you want a=1 or a\ne 1; the latter is more difficult

Some symbols which are not declared there (\ne) one can still declare
in preamble: f.e. I use

\DeclareTextCommand{\textneq}{PU}{\9042\142}
\DeclareTextCommand{\textinfty}{PU}{\9042\036}
\DeclareTextCommand{\textge}{PU}{\9042\145}
\DeclareTextCommand{\textle}{PU}{\9042\144}
\DeclareTextCommand{\texthat}{PD1}{\136}



which I found by analyzing unicode (UTF8) table. Not sure why they are
not declared



PPS General tex questions are better addressed in texhax list as some
ver knowledgeable people don't use Mac and don't subscribe this list



> On Jul 9, 2012, at 1:48 PM, Michael Welsh wrote:
>
>> On 10/07/2012, at 8:40 AM, David Arnold wrote:
>>>
>>> Hi,
>>>
>>> I have a section title:
>>>
>>> \section{Factoring $ax^2+bx+c$ when $a\ne1$}
>>>
>>> However, the bookmark in the resulting PDF does not typeset the math. Is there a way to do this?
>>
>> Is \texorpdfstring what you're after?
>>
>> \section{Factoring \texorpdfstring{$ax^2+bx+c$}{text equivalent} when \texorpdfstring{$a\ne1$}{text equivalent}}
>>
>


HTH

 Victor
-- 
========================
Victor Ivrii, Professor, Department of Mathematics, University of Toronto
http://www.math.toronto.edu/ivrii



More information about the macostex-archives mailing list