LaTeX forum ⇒ BibTeX, biblatex and biberProblem using achemso style

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
yotama9
Posts: 61
Joined: Thu Sep 24, 2009 2:59 pm

Problem using achemso style

Postby yotama9 » Tue Jun 01, 2010 3:03 pm

Hi guys.

I'm trying to use the achemso style for my bibtex citation. When I cite a source, I see in the text, and in my bibliography list the all the authors names and publication year instead of simply a number:

In the text:
bla bla bla bla [Bronsted(1928)] bla bla bla bla

in the bibliography:
[Bronsted(1928)] Bronsted, J. N. Chemical Reviews 1928, 5, 231–338.

While what I need is:

In the text:
bla bla bla bla [1] bla bla bla bla

in the bibliography:
[1] Bronsted, J. N. Chemical Reviews 1928, 5, 231–338.

Also, is there a way for automatically abbreviating the journal names?

Thanks.

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Postby josephwright » Tue Jun 01, 2010 5:46 pm

Please post an example of what you are doing: as you will see in the demo file this does work properly. On the journal abbreviations you'll have to do this at the database level (JabRef can automatically convert full names to abbreviations, for example). I did experiment with some code to do this automatically, but there are various issues and I decided against it.
Joseph Wright

yotama9
Posts: 61
Joined: Thu Sep 24, 2009 2:59 pm

Postby yotama9 » Tue Jun 01, 2010 8:22 pm

I just realized that the references need to be inside the TeX file and not in a bibliography file. Is there any way around this?

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Postby josephwright » Tue Jun 01, 2010 8:45 pm

achemso works with standard BibTeX databases. Please post an example of what you are doing: it is very hard to offer advice without some clues.
Joseph Wright

yotama9
Posts: 61
Joined: Thu Sep 24, 2009 2:59 pm

Postby yotama9 » Tue Jun 01, 2010 10:12 pm

OK I've attached a simple example. The attached pdf file has two bibliography. One generated by the bib file and the other with the embedded system. Here is the .tex and .bib files:

\documentclass{report}

Here is my .tex file:
  1. \begin{document}
  2. Hello \cite{a} \cite{b}
  3.  
  4. \bibliographystyle{achemso}
  5. \bibliography{a}
  6. \begin{thebibliography}{9}
  7.  
  8. \bibitem{b}
  9. Leslie Lamport,
  10. \emph{\LaTeX: A Document Preparation System}.
  11. Addison Wesley, Massachusetts,
  12. 2nd Edition,
  13. 1994.
  14.  
  15. \end{thebibliography}
  16. \end{document}


and here is my a.bib file:
  1. @article{a,
  2. author = {Bohm, Andrew and Balbo, Paul B.},
  3. doi = {10.1042/BJ20082019},
  4. issn = {0264-6021},
  5. journal = {Biochemical Journal},
  6. keywords = {Folder - Bio},
  7. mendeley-tags = {Folder - Bio},
  8. number = {2},
  9. pages = {229--238},
  10. title = {{Proton transfer in the mechanism of polyadenylate polymerase}},
  11. url = {http://www.biochemj.org/bj/420/bj4200229.htm},
  12. volume = {420},
  13. year = {2009}
  14. }

notice that \cite{a} uses for citation in the bib file and generate [author (year)] and \cite{b} usess for citation in the tex file and generate [1]

I want the latter citation style to happen when I use a .bib file. Is that possible?
Attachments
a.pdf
The resulting pdf
(58.99 KiB) Downloaded 242 times

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Postby josephwright » Tue Jun 01, 2010 10:21 pm

If you load the achemso bibliography style directly (rather than using the achemso package or class to do so) then you have to load natibib. The achemso BibTeX style requires natbib, and that is why you are getting odd results.
  1. \documentclass{article}
  2. \usepackage{natbib}
  3. \begin{document}
  4. Hello \cite{a}
  5. \bibliographystyle{achemso}
  6. \bibliography{a}
  7. \end{document}

Note that I recommend using the achemso package to do all of the necessary loading.
Joseph Wright


Return to “BibTeX, biblatex and biber”

Who is online

Users browsing this forum: No registered users and 2 guests