Page Layout ⇒ Allowing line break with in-text citation?
-
- Posts: 29
- Joined: Thu Feb 19, 2009 3:23 pm
Allowing line break with in-text citation?
Anyway I am using a custom (author-date) citation style created with the custom-bib program. Citations should mostly appear in the text like so (Citation 2009:101). I have a couple of citations that have two authors with long names that are being treated like one word, making the paragraph look really wierd. I can't figure out how to get these citations to wrap to the next line at the margin, like normal text.
For example, if I have a paragraph that carries on like this, and want to put a citation (Jiminez Martinez and Valdez Diaz 2009:158-159) into it that is sort of long, it should wrap at whatever word is at the end of the paragraph (at the moment, it wraps to the next line after the "Valdez"). However, the citation
(Jiminez Martinez and Valdez Diaz 2009:158-159) in question looks like this in the document (i.e. it starts on a new line, regardless of how little text is on the line before it).
Does anyone know how I can fix this? There aren't any extra {} in the .bib file for the citation that is causing problems.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Re: Allowing line break with in-text citation?
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Allowing line break with in-text citation?
welcome to the board!
My in-text citations could be broken, I'm using natbib. Perhaps post a compilable minimal working example, we could examine that.
Stefan
Re: Allowing line break with in-text citation?
Thank you. Here's an example. I am using a Harvard style bibliography. Thanks a lot for your help.
- Attachments
-
- example.zip
- (21.1 KiB) Downloaded 1043 times
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Allowing line break with in-text citation?
Code: Select all
\usepackage{cite}
Re: Allowing line break with in-text citation?
-
- Posts: 29
- Joined: Thu Feb 19, 2009 3:23 pm
Re: Allowing line break with in-text citation?
In trying to construct a MWE I have run across a strange problem. When using my custom style, I get "citation XX on page X is undefined" errors. If I use, say, plain or humannat, the citation appears just fine, although the line wrap issue is still present.
I would just use humannat except that it has two issues: any text in the "note" field is printed in the references, and it has trouble with certain non-English names. For example, one author's first name is João Zilhão, which appears in the references at the end of the thesis as Zilhão, J. a.
-
- Posts: 29
- Joined: Thu Feb 19, 2009 3:23 pm
Re: Allowing line break with in-text citation?
http://newsgroups.derkeiler.com/Archive ... 00301.html
and
http://newsgroups.derkeiler.com/Archive ... 00370.html
The important bit is to try enclosing the author's last name in curly brackets in the bibtex file. So, using my previous example:
Jiminez Martinez and Valdez Diaz 2009:158-159
@ARTICLE{martinez09citation,
author = {{Jim\'{i}nez Mar\'{i}inez}, Emiliano and {Valdez D\'{i}az}, Francisco},
title = {Citation},
journal = {Journal},
year = {2009},
volume = {13},
pages = {150-160},
}
It's worked for me so far, anyway!
-
- Posts: 29
- Joined: Thu Feb 19, 2009 3:23 pm
Re: Allowing line break with in-text citation?
ETA:
Actually, all you need to do is add the option breaklinks:
\usepackage[breaklinks]{hyperref}
Re: Allowing line break with in-text citation?
Thank you so much