Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

LaTeX Question: Manually Formatting Citations

  1. Jul 28, 2012 #1
    I am using Zotero to collect and organize all of my citations, which I then export in a bibtex format to use in my LaTeX document, using natbib to make my bibliography. The problem is that I have a couple 'odd' references that do not format correctly. I think this is due to a combination of Zotero not outputting correctly, and my bib style sheet not having the write guidelines for this format. In any case, it does not show the correct formatting (best case), or throws a bunch of errors when compiling (worst case).

    Since I only have a couple of these instances, rather than tracking down the main problem(s) that cause it, I just wanted to manually format the citation myself. Is there a way to do this? I think I would just prefer to hard-code in the correct text, and then tell LaTeX to print that citation in the correct place (in the reference list at the end) when I reference that source. How can I do this?
     
  2. jcsd
  3. Jul 29, 2012 #2

    fzero

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I'm unfamiliar with Zotero, but I imagine that you use it to periodically generate a fresh .bib file, so it would be cumbersome to always cut and paste the odd references into the file. Since \bibliography{#1,#2,...} takes multiple arguments, if you can remove the odd references from Zotero, you can simply hand format them into a 2nd .bib file using the natbib specs.
     
  4. Jul 29, 2012 #3
    What fzero says.

    I use JabRef to keep my .bib files up to date.

    If you show us a few examples of bibtex entries where Zotero/Bibtex/Latex screws up we be able to give you hints on how to work aroiund the problem.
     
  5. Jul 29, 2012 #4
    Yes, you are right. Zotero is only the software that I use to download and organize my references in, and which I use to periodically generate my updated .bib reference list. It would be very easy for me to remove the odd references from Zotero and manage them separately, it is getting them into Latex afterward that I am having problems with.

    I will show two examples of types of citations that are not showing correctly: a web page and a conference paper.

    The output from Zotero when I write the .bib file is:
    Code (Text):

    @misc{last_google_????,
        title = {Google Home Page},
        url = {[PLAIN]https://www.google.com/}[/PLAIN] [Broken],[/PLAIN] [Broken]
        journal = {Google},
        author = {last, first},
        howpublished = {[PLAIN]https://www.google.com/}[/PLAIN] [Broken]
    },

    @inproceedings{soumetz_drug_2004,
        title = {Drug delivery for nerve tissue regeneration},
        doi = {10.1109/NANO.2004.1392310},
        author = {Soumetz, F. C. and Giacomini, M. and Pastorino, L. and Phillips, J. B. and Brown, R. A. and Ruggiero, C.},
        month = aug,
        year = {2004},
        pages = {239--241}
    }
     
    You can see that the web page was outputted as a “misc” item, and the conference paper was writen as an “inproceedings” item.

    I am using the standard file “achemso.bst” (from the American Chemical Society) to format my citations in Latex,
    \bibliographystyle{achemso}
    Inside this file there are no guidelines for how to format “misc” references, so compilation of my bibliography fails and I do not get anything if I want to cite a web page. There is a set of rules for formatting “inproceedings” references, but it is incorrect...at least as far as the ACS formatting standards go in their style guide (pg 37 of 55).

    My latex code is:
    Code (Text):

    \documentclass[english]{article}
    \usepackage{babel}
    \usepackage[super, comma, sort&compress]{natbib}

    \begin{document}

    blah blah blah \cite{soumetz_drug_2004}

    \bibliography{Refs}
    \bibliographystyle{achemso}

    \end{document}
     
    If, however, I generate the citation directly from zotero (as opposed to exporting it to a bib file), it is generated correctly, since I have added the appropriate style guidelines for zotero.

    Instead of just hard coding in the few problem references that I have, another solution would be to just fix the achemso style guideline file, I suppose. I could follow the pattern I see for other reference types and build my own, but this does not solve everything, since part of the problem is zotero is outputting the data in an incomplete way for the style sheet to use (for example, the name of the conference (for the conference paper example), or the date last accessed (for the web site example).
     
    Last edited by a moderator: May 6, 2017
  6. Jul 29, 2012 #5
    Your bibtex entries look ok to me, so I guess the fault is in the .bst file as you point out.

    Hacking .bst files is possible but not completely trivial.

    I suggest that you contact the editors (or contact persons listed for LaTex documents) and present your example entries. Point out the problem and ask for suggestions.

    In the mean time the easiest workaround appears to use Zotero directly.
    An alternative is to use a different item type and add the missing information as note.
     
  7. Jul 29, 2012 #6
    If I do this, however, the citation that it generates is not in any way connected with latex...it would be something that I could copy-past into other editors. That is what I originally wanted to do, take this output (which is correct) and use it to hard-code in my latex citation. How else might I get the information in there?

    How about the “notes2bib” package, that allows users to make author notes in the reference list? I could make the citation an author note, but make it look exactly like a citation. But I have never been able to get this package to work for me. I am not sure if it is my computer, or whether I am just using it wrong. Could someone provide a simplest working example for this package using natbib for references (as opposed to biblatex)?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: LaTeX Question: Manually Formatting Citations
Loading...