Thursday, May 14, 2015

latex: bibliography error

how to get the ieee bibliography template to work.

context:
ieee latex template for photonics journal using TeXworks editor.

procedure:
  1. in file Optogenetics.tex: add "\cite{Deisseroth2006}" to random section.
  2. in file Optogenetics.tex: define style and .bib file 
    \bibliographystyle{IEEEtran}
    \bibliography{Optogenetics}
    view raw gistfile1.txt hosted with ❤ by GitHub
    to the position where the references should be placed.
  3. create file Optogenetics.bib with the following content:
    @electronic{Deisseroth2006,
    author = "Michael Shell",
    title = "{IEEE}tran Homepage",
    url = "http://www.michaelshell.org/tex/ieeetran/",
    year = "2007"
    }
    view raw gistfile1.txt hosted with ❤ by GitHub
  4. execute.
error:
when adding references using ieee bibliography template, the following error occurs:

! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.3 \end{thebibliography}
view raw gistfile1.txt hosted with ❤ by GitHub
fix:
replaced procedure #2 with:
\bibliography{Optogenetics}
\bibliographystyle{plain}
view raw gistfile1.txt hosted with ❤ by GitHub
tried executing and it worked, .bib file loads perfectly. reverted to the code as written in procedure #2 (using IEEEtrans style) and the error no longer appeared, can't figure out why. i think it also helped that i restarted the editor but i'm not really sure.

::

No comments:

Post a Comment