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

\hypertarget marks baselines

91 views
Skip to first unread message

rednal

unread,
Jul 30, 2005, 6:48:55 PM7/30/05
to
Hi.

When creating internal links with hypertarget/hyperlink I find that the
link leads to the targets' "baselines" instead of the targets' full
views. For example:

\documentclass{article}
\usepackage{hyperref}
\begin{document}
Creating the \hypertarget{tgt}{target}.
\newpage
Accessing the previous target with \hyperlink{tgt}{this link}.
\end{document}

In Acrobat Reader, clicking "this link" on page 2 doesn't show the word
"target" on page 1, but only that appearing below the baseline: the
depth of the letter g.

I tried using "raiselinks" option but I guess this is not the solution.
My hyperref is v6.74m.

Hope you can help. Thanks in advance.

Heiko Oberdiek

unread,
Jul 31, 2005, 6:37:27 AM7/31/05
to
"rednal" <dtp...@yahoo.es> wrote:

> When creating internal links with hypertarget/hyperlink I find that the
> link leads to the targets' "baselines" instead of the targets' full
> views. For example:
>
> \documentclass{article}
> \usepackage{hyperref}
> \begin{document}
> Creating the \hypertarget{tgt}{target}.
> \newpage
> Accessing the previous target with \hyperlink{tgt}{this link}.
> \end{document}
>
> In Acrobat Reader, clicking "this link" on page 2 doesn't show the word
> "target" on page 1, but only that appearing below the baseline: the
> depth of the letter g.

\raisebox.

Yours sincerely
Heiko <ober...@uni-freiburg.de>

rednal

unread,
Jul 31, 2005, 10:45:30 AM7/31/05
to
Hi Heiko. Thanks for answering but I'm sorry. I don't understand your
suggestion. Where am I supposed to place that \raisebox?

Heiko Oberdiek

unread,
Jul 31, 2005, 11:11:47 AM7/31/05
to
"rednal" <dtp...@yahoo.es> wrote:

> Hi Heiko. Thanks for answering but I'm sorry. I don't understand your
> suggestion. Where am I supposed to place that \raisebox?

Please, look in a LaTeX book, it should be explained there.

\usepackage{calc}
\raisebox{\heightof{\"A}}{\hypertarget{...}{}}

Yours sincerely
Heiko <ober...@uni-freiburg.de>

rednal

unread,
Jul 31, 2005, 11:49:13 AM7/31/05
to
OK Heiko. Before sending the previous mail I'd tried the following:

...
Creating the \raisebox{10pt}{\hypertarget{tgt}{}} target.
...

Where 10pt is the size of the type in use. And it did work.

What I wondered is if \hypertarget always marks the baselines and the
only way to create a full view target is placing a
"\raisebox{...}{\hypertarget{...}{}}" just before the word I want to
target. I mean, placing the word to target as the second argument of
\hypertarget won't ever work as I want?

Sorry for not having been clear in the previous mail. I hope not to
have upset you. Really appreciate your help.

Heiko Oberdiek

unread,
Jul 31, 2005, 2:26:17 PM7/31/05
to
"rednal" <dtp...@yahoo.es> wrote:

> Creating the \raisebox{10pt}{\hypertarget{tgt}{}} target.

Minus one space.

> Where 10pt is the size of the type in use. And it did work.

(Available in \f@size).

> What I wondered is if \hypertarget always marks the baselines and the
> only way to create a full view target is placing a
> "\raisebox{...}{\hypertarget{...}{}}" just before the word I want to
> target. I mean, placing the word to target as the second argument of
> \hypertarget won't ever work as I want?

It depends on the driver, dvips supports it, probably because
breaking across lines is not supported here. (Also you need option
nesting).

But with driver pdftex, the contents of the second argument
can be broken across lines. Then you have the problem to
get the right anchor rectangle.

Yours sincerely
Heiko <ober...@uni-freiburg.de>

0 new messages