LaTeX Question: Manually Formatting Citations

  • Context: LaTeX 
  • Thread starter Thread starter SamBam77
  • Start date Start date
  • Tags Tags
    Citations Latex
Click For Summary
SUMMARY

This discussion centers on the challenges of manually formatting citations in LaTeX when using Zotero and natbib. The user encounters issues with Zotero's output for certain references, specifically a web page and a conference paper, which do not conform to the required formatting standards of the achemso.bst style file. Suggested solutions include manually formatting citations, modifying the .bst file, or using the notes2bib package to create author notes that resemble citations. The user is encouraged to contact editors for guidance on resolving these formatting discrepancies.

PREREQUISITES
  • Familiarity with LaTeX document preparation system
  • Understanding of BibTeX citation management
  • Knowledge of Zotero for reference management
  • Basic experience with .bst file modifications
NEXT STEPS
  • Learn how to modify .bst files for custom citation formatting
  • Explore the notes2bib package for integrating author notes in LaTeX
  • Research best practices for using Zotero with LaTeX
  • Investigate alternative bibliography styles compatible with natbib
USEFUL FOR

Researchers, academic writers, and anyone using LaTeX for document preparation who needs to manage and format citations effectively.

SamBam77
Messages
25
Reaction score
0
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?
 
Physics news on Phys.org
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.
 
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.
 
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:
@misc{last_google_?,
	title = {Google Home Page},
	url = {[PLAIN]https://www.google.com/}[/PLAIN] ,[/PLAIN] 
	journal = {Google},
	author = {last, first},
	howpublished = {[PLAIN]https://www.google.com/}[/PLAIN] 
},

@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 written 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:
\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 website example).
 
Last edited by a moderator:
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.
 
M Quack said:
In the mean time the easiest workaround appears to use Zotero directly.
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)?
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
8K
  • · Replies 11 ·
Replies
11
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
14K