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

Hyperref adds a linebreak

6 views
Skip to first unread message

Henrik Holm

unread,
Feb 20, 2002, 2:58:18 PM2/20/02
to
I tried this in an earlier posting, however I got no
response. Am trying again.

I'm using some code borrowed from a Donald Arseneau posting in
order to get an itemized list inside a tabular. It works very
nicely, producing just the result I expect.

what I want is something like

a Foo
b bar
c 1. Foo
2. Bar
d baz
e bax

This is also what I get, unless hyperref is also used. Then,
the result is

a Foo
b bar
c
1. Foo
2. Bar
d baz
e bax

Note that this does not happen in draft mode; then I get what
I want.

In the code below, I have tried to shave to the bone -- it is
the smallst set of code I have found which will demonstrating
the odd behavior. However, it is neither particularly robust
nor convenient.


Henrik


\documentclass{article}

\usepackage{hyperref}
%% \usepackage[draft]{hyperref}

\begin{document}

\begin{tabular}{lp{0.5\linewidth}}
a & Bar\\
b & Second definition is quite long so that it breaks across
two lines. \\
c & {
\begin{minipage}[t]{\linewidth}
\begin{enumerate}
\setlength{\itemsep}{-\parsep}
\item c has several definitions
\item this is the second
\end{enumerate}
\end{minipage}
}
\\
d & Bar \\
e & Bar \\
\end{tabular}

\end{document}

Donald Arseneau

unread,
Feb 21, 2002, 5:38:37 AM2/21/02
to
Henrik Holm <h.h...@spray.no> writes:

> This is also what I get, unless hyperref is also used. Then,
> the result is
>
> a Foo
> b bar
> c
> 1. Foo
> 2. Bar

Your problem is that hyperref inserts a reference mark
(a target anchor passed in a \special) before the item.
That mark provides a top reference-point that is adopted
by the surrounding minipage[t], just the same as if you
began the minipage with \vspace{0pt}. I don't know the
solution, given that \item does its numbering well-before
entering the paragraph. You might try disabling hyperref
within the list.


Donald Arseneau as...@triumf.ca

Henrik Holm

unread,
Feb 21, 2002, 8:40:36 AM2/21/02
to
[Donald Arseneau]

I think I understand. It makes a lot of sense to disable
hyperref for that part of the document (I don't refer to it
anyway).

I tried to look in the htperref manual and the hyperref/pdfTeX
paper by Heiko Oberdiek, but I couldn't find any information
about how to temporarily turn off hyperref. Do you (or Heiko)
know how to do that?


Henrik

Donald Arseneau

unread,
Feb 22, 2002, 3:55:36 AM2/22/02
to
Henrik Holm <h.h...@spray.no> writes:

> about how to temporarily turn off hyperref. Do you (or Heiko)
> know how to do that?

I have trouble with the complexities of hyperref, but my
guess is to restore the meaning of \refstepcounter to its
notmal LaTeX definition. (It might be
\let\refstepcounter\@@refstepcounter
but you will have to look in hyperref.sty to see what
it renames it to (\HY@refstepcounter or \@@refstepcounter
or ??)

Donald Arseneau as...@triumf.ca

Heiko Oberdiek

unread,
Feb 22, 2002, 7:29:06 AM2/22/02
to
Henrik Holm <h.h...@spray.no> wrote:

> [...] but I couldn't find any information


> about how to temporarily turn off hyperref. Do you (or Heiko)
> know how to do that?

You can try environment "NoHyper".

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

Henrik Holm

unread,
Feb 22, 2002, 9:38:54 AM2/22/02
to
[Heiko Oberdiek]

> Henrik Holm <h.h...@spray.no> wrote:
>
> > [...] but I couldn't find any information about how to
> > temporarily turn off hyperref. Do you (or Heiko) know
> > how to do that?
>
> You can try environment "NoHyper".

That did it. Thanks!


Henrik.

0 new messages