Page LayoutCitations spilling into margins

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
gdsaxton
Posts: 6
Joined: Fri Jul 24, 2009 10:15 pm

Citations spilling into margins

Post by gdsaxton »

Hi,

I am relatively new to LaTeX and am having a problem I haven't seen on any of the forums. Specifically, I am using natbib, and when a citation (e.g., \citep command) is close to the right-hand-side of the margin and it's a long citation (e.g., Weisbrod and Dominguez, 1986), the text spills over into the margins in the PDF document, which is rather ugly. This is the only place in any of my documents where I've had a problem with the margins. Any advice?

Thanks in advance for your help.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Citations spilling into margins

Post by localghost »

I think the closest solution is to reorganize the concerned sentence. That would make the citation appear at another place.


Best regards and welcome to the board
Thorsten
gdsaxton
Posts: 6
Joined: Fri Jul 24, 2009 10:15 pm

Re: Citations spilling into margins

Post by gdsaxton »

Thanks, that does work, I was just hoping for another solution. :)
arwintcher
Posts: 29
Joined: Thu Feb 19, 2009 3:23 pm

Re: Citations spilling into margins

Post by arwintcher »

I don't know if this helps you, but I found that some of my references had extra {}s around parts of it, especially the title. I think the intention is to preserve the formatting, but it had the effect of forcing very long titles or lists of authors onto one line.

I took out the extra brackets and the titles wrapped around lines, like I would expect them to.

I don't know if this effect is specific to JabRef, but that's where I noticed it.
gdsaxton
Posts: 6
Joined: Fri Jul 24, 2009 10:15 pm

Re: Citations spilling into margins

Post by gdsaxton »

Thanks, but unfortunately that's not it. I still haven't been able to figure it out--the only solution I've found is rearranging the sentence whenever it occurs.
arwintcher
Posts: 29
Joined: Thu Feb 19, 2009 3:23 pm

Re: Citations spilling into margins

Post by arwintcher »

I know it's been a while since you posted this but I just found a solution for a similar problem and thought it might help you.

Are you using natbib together with hyperref, by any chance? If so, then try adding breaklinks to hyperref. It fixed my problem with citations refusing to break from one line to the next!

Like this:
\usepackage[breaklinks]{hyperref}
gdsaxton
Posts: 6
Joined: Fri Jul 24, 2009 10:15 pm

Re: Citations spilling into margins

Post by gdsaxton »

Thanks! I never found a good solution other than moving the citation, so I'll give this a whirl. Thanks for sharing.
arismendi
Posts: 1
Joined: Tue Feb 19, 2013 1:00 pm

Citations spilling into margins

Post by arismendi »

I was having the same problem using springer template with natbib (spbasic.bst). The problem was I had:

Code: Select all

\citep{Goldenberg}, \citep{Gupta}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
I changed it to

Code: Select all

\citep{Goldenberg, Gupta}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
and problem solved. I hope this could be useful for someone.

Cheers!
Last edited by cgnieder on Tue Feb 19, 2013 9:24 pm, edited 1 time in total.
Post Reply