Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

A picture is worth a thousand macros:

alt text

I don't blame LaTeX for having difficulty in formatting this entry.

What can I do, however, to alleviate the effects and avoid the Word-like indentation?

A related question suggested by the site is http://tex.stackexchange.com/questions/299/how-to-get-long-texttt-sections-to-break which indeed produces a better aligned entry: alt text

While I like the sane alignment, I'm not not very happy with the switch to a monospaced font (while it works in the regular text, in bibliographical entries it attracts too much attention and takes too much space).

Any other suggestions?

The entry for the above test bibitem is:

\begin{thebibliography}

\bibitem{anything-here}
"Lorem Ipsum Society,
\emph{dolor sit amet, consectetur}, May 2010
retrieved on Oct 16, 2010 from http://www.lorem-ipsum.com/whatever-here/about\%20something/here\%20takes/space\%20in\%20a\%20long/url\%20foobar.aspx 

\end{thebibliography}
share|improve this question
    
I'm not sure what you mean by "Word-like indentation" here. In what respect is the indentation better in entry [18]? –  Hendrik Vogt Oct 17 '10 at 7:09
1  
@Hendrik: I suspect he didn't mean to say indentation, but is really talking about the extremely underfull lines. –  Harald Hanche-Olsen Oct 17 '10 at 7:20
add comment

2 Answers

Preamble:

\usepackage{url} % hyperref works too
\urlstyle{same}  % (sf also works, for something more subtle than tt)

Then insert urls as:

\url{http://www.example.com/~lev/my%20long%20url}
share|improve this answer
add comment

I think that \raggedright might be your friend here. You don't get justified entries, of course, but that can often look much better than having many underfull lines.

Before trying that, you can try to convince the various url handling packages to break lines. I have

\usepackage[hyphens]{url}
\ifpdf
\usepackage[breaklinks=true,pdfborder={0 0 0},bookmarksopen]{hyperref}
\else
\usepackage[pdfborder={0 0 0},bookmarksopen]{hyperref}
\usepackage[hyphenbreaks]{breakurl}
\fi

in one paper I wrote. I can't remember the rationale for using url and hyperref, but I must have had a reason at one point.

The microtype package might be able to help you get better breaks too.

share|improve this answer
1  
I prefer to \usepackage{ragged2e} and \RaggedRight. –  Lev Bishop Oct 17 '10 at 5:00
    
@Lev Bishop: Oh, I'm not familiar with ragged2e. I'll have to check it out. –  TH. Oct 17 '10 at 6:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.