Discussion:
break url in tabular
(too old to reply)
Jinsong Zhao
2008-04-05 10:09:47 UTC
Permalink
Dear all,

When using hyperref with breakurl, after comipled using latex + dvips
+ ps2pdf, I found that there is a blank line before the url. What's
the problem?

Any suggestions will be appreciated!

Thanks!
Jinsong

------------>begin of mini example <-----------

\documentclass{article}
\usepackage[dvips]{hyperref}
\usepackage{breakurl}
\listfiles
\begin{document}

\begin{tabular}{|p{3cm}|l|}
\hline
\url{http://www.example.org/example.html} & something here
something here something here\\
\hline
\end{tabular}

\end{document}
----------> end of mini example <------------

*File List*
article.cls 2005/09/16 v1.4f Standard LaTeX document class
size10.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
hyperref.sty 2007/02/07 v6.75r Hypertext links for LaTeX
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
pd1enc.def 2007/02/07 v6.75r Hyperref: PDFDocEncoding definition
(HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
kvoptions.sty 2006/08/22 v2.4 Connects package keyval with LaTeX
options (HO
)
url.sty 2005/06/27 ver 3.2 Verb mode for urls, etc.
hdvips.def 2007/02/07 v6.75r Hyperref driver for dvips
pdfmark.def 2007/02/07 v6.75r Hyperref definitions for pdfmark
specials
breakurl.sty 2006/08/26 v1.20 Breakable hyperref URLs
xkeyval.sty 2006/11/18 v2.5f package option processing (HA)
xkeyval.tex 2006/11/18 v2.5f key=value parser (HA)
nameref.sty 2006/12/27 v2.28 Cross-referencing by name of section
refcount.sty 2006/02/20 v3.0 Data extraction from references (HO)
***********
Ulrike Fischer
2008-04-05 12:50:51 UTC
Permalink
Post by Jinsong Zhao
Dear all,
When using hyperref with breakurl, after comipled using latex + dvips
+ ps2pdf, I found that there is a blank line before the url. What's
the problem?
The tabular. You get empty line sometimes when the first thing is a
command that doesn't switch to horizontal mode, \color{red} eg. instead
of the \url gives also a blank line. Use \leavevmode:

\listfiles
\documentclass{article}
\usepackage[dvips]{hyperref}
\usepackage{breakurl}
\listfiles
\begin{document}

\begin{tabular}{|p{3cm}|l|}
\hline\leavevmode
\url{http://www.example.org/example.html} & something here
something here something here\\
\hline
\end{tabular}

\end{document}
--
Ulrike Fischer
Jinsong Zhao
2008-04-05 13:36:35 UTC
Permalink
Post by Ulrike Fischer
The tabular. You get empty line sometimes when the first thing is a
command that doesn't switch to horizontal mode, \color{red} eg. instead
\listfiles
\documentclass{article}
\usepackage[dvips]{hyperref}
\usepackage{breakurl}
\listfiles
\begin{document}
\begin{tabular}{|p{3cm}|l|}
\hline\leavevmode
\url{http://www.example.org/example.html} & something here
something here something here\\
\hline
\end{tabular}
\end{document}
--
Ulrike Fischer
Thank you very much. It works!

And, I just get a message from the author of breakurl package.
He just fixed this bug, and the corrected package will appear on CTAN,
soon.

Thanks again.

Jinsong
Heiko Oberdiek
2008-04-05 14:39:18 UTC
Permalink
Post by Jinsong Zhao
Dear all,
When using hyperref with breakurl, after comipled using latex + dvips
+ ps2pdf, I found that there is a blank line before the url. What's
the problem?
Any suggestions will be appreciated!
Thanks!
Jinsong
------------>begin of mini example <-----------
\documentclass{article}
\usepackage[dvips]{hyperref}
\usepackage{breakurl}
\listfiles
\begin{document}
\begin{tabular}{|p{3cm}|l|}
\hline
As workaround add \leavevmode here.
Post by Jinsong Zhao
\url{http://www.example.org/example.html} & something here
something here something here\\
\hline
\end{tabular}
\end{document}
Make a bug-report to the author of breakurl.

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

Loading...