1

I am following SPIE conference Latex format, to generate a PDF paper. However, at reference part I have problems.

First, here is their website http://kmh-lanl.hansonhub.com/spie/, in the Reference list formatting part they described how to create reference list.

Here is the latex file they provided

%  List Bibliography 
%  creates reference list using BibTeX and named style file

\documentclass[11pt,letterpaper]{article} 

  \oddsidemargin -.02in
  \textwidth 6.5in
  \topmargin -0.42in
  \textheight 9in
  \parskip 1ex

\def\bstfile{spiebib}  % name of bib style file to be used

\def\refname{ \vspace{-10ex}\rule{0mm}{1mm} \\ Reference list formatting -- \bstfile.bst
}

 \begin{document} 

 \vspace{-10ex}\rule{0mm}{1mm}  

 \bibliographystyle{\bstfile}
 \nocite{*}
 \bibliography{biblist}

@article{Kaczmarz37,
author = "S. Kaczmarz",
title = "Angen{\"{a}}hrte {A}ufl{\"{o}}sung von {S}ystemen
linearer {G}leichungen",
journal= "Bull. Acad. Polon. Sci. Lett.",
volume = "A35",
pages = "355-357",
year = "1937" }


 \end{document}

where

@article{Kaczmarz37,
author = "S. Kaczmarz",
title = "Angen{\"{a}}hrte {A}ufl{\"{o}}sung von {S}ystemen
linearer {G}leichungen",
journal= "Bull. Acad. Polon. Sci. Lett.",
volume = "A35",
pages = "355-357",
year = "1937" }

is the sample where you can insert your own bibliography.

However, when I compile the tex file, it looks like this: enter image description here

but according to their website, it should look like this: enter image description here

I am wondering how I can change to their style. I am following their instruction, but get very different results. Confused.

  • 1
    The @article{Kaczmarz,...} code should be placed in a biblist.bib file and after running LaTeX you have to run BibTeX, then LaTeX again (the run of BibTeX is necessary only when you change the citations in the document). – egreg Jul 12 '14 at 15:49
  • @egreg So there three files? The main latex file which needs reference list, the biblist.tex and biblist.bin? – Nick X Tsui Jul 12 '14 at 17:41
  • The main TeX file and biblist.bib containing the bibliographic data in the shown format. – egreg Jul 12 '14 at 17:43
  • @egreg I downloaded biblist.tex and biblist.bib from kmh-lanl.hansonhub.com/spie, putting them in the same folder, build, the pdf shows nothing, it is empty. – Nick X Tsui Jul 12 '14 at 17:54
  • @egreg OK I got it. I build first with the option BibTex, then build with the option Quick Build, then it works. – Nick X Tsui Jul 12 '14 at 18:13
3

The code

@article{Kaczmarz37,
author = "S. Kaczmarz",
title = "Angen{\"{a}}hrte {A}ufl{\"{o}}sung von {S}ystemen
linearer {G}leichungen",
journal= "Bull. Acad. Polon. Sci. Lett.",
volume = "A35",
pages = "355-357",
year = "1937" }

should go in a file named with extension .bib, say biblist.bib, not in the main document. Add to this file all references in the same BibTeX format that you need for the paper.

When you run LaTeX on the document, the line \bibliography{biblist} causes an annotation to be made in the .aux file. After the LaTeX run you have to call BibTeX (how to do it depends on your front-end to TeX, all of them provide some button for this). After BibTeX is finished, a file .bbl will be produced and at the next LaTeX run the references will be in place.

It's not necessary to run BibTeX each time, just when you add references. It may be needed to run LaTeX twice after a BibTeX run, for synchronizing the labels.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.