Results 1 to 5 of 5

Thread: BibTeX: author-date citation treated like one word?

  1. #1
    Join Date
    Feb 2008
    Beans
    83

    BibTeX: author-date citation treated like one word?

    I am using LaTex to write a social science thesis, which means I am using a Harvard (author-date) citation style. I have a couple of citations that have two authors with long names. 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 to the margin, like this, and want to put a citation into it that is sort of long (Jiminez Martinez and Valdez Diaz 2009:158-159), it should wrap at whatever word is at the end of the paragraph. However, when I have citations like this, the whole citation is treated as if it were a sinlge word instead of four or five. It makes the paragraph spacing look really wierd.

    Does anyone know how I can fix this? There aren't any extra {} in the .bib file.
    Acer Aspire 7520 laptop, 4GB RAM, Nvidia GeForce 7000m graphics card, dual boot Vista/Fedora 13.

  2. #2
    Join Date
    Dec 2005
    Location
    Sweden
    Beans
    37
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: BibTeX: author-date citation treated like one word?

    Hi,

    have you tried to add some hyphenation marks '\-' in the author's names in the .bib file. Like

    Jim\-inez Mart\-inez, Val\-dez Diaz

    I guess you get the idea. I do not know if this works, just a guess.

  3. #3
    Join Date
    Nov 2006
    Location
    New Zealand
    Beans
    422

    Re: BibTeX: author-date citation treated like one word?

    Xnst, I think Mander is wanting the lines to wrap between the words, not hyphenate. I'm stumped unfortunately.

    Mander, try posting this question at the LaTeX Community forum:
    http://www.latex-community.org/forum/

  4. #4
    Join Date
    Feb 2008
    Beans
    83

    Re: BibTeX: author-date citation treated like one word?

    I finally found the answer. In a nutshell, bibtex inserts non-breaking spaces into the .bbl file when the document is compiled. See here and here for details.

    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!
    Acer Aspire 7520 laptop, 4GB RAM, Nvidia GeForce 7000m graphics card, dual boot Vista/Fedora 13.

  5. #5
    Join Date
    Feb 2008
    Beans
    83

    Re: BibTeX: author-date citation treated like one word?

    On further research, while putting the names in curly brackets helps, my real problem was a conflict between the natbib and hyperref packages.

    Use the "breaklinks" option in hyperref:
    \usepackage[breaklinks]{hyperref}

    Then you can have hyperlinks *and* line breaks in your citations!
    Acer Aspire 7520 laptop, 4GB RAM, Nvidia GeForce 7000m graphics card, dual boot Vista/Fedora 13.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •