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}
> 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
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
> 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
> [...] 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 <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.