Results 1 to 7 of 7

Thread: Need help with latex/bibtex

  1. #1
    Join Date
    Apr 2006
    Location
    in the dark
    Beans
    1,513

    Need help with latex/bibtex

    Im just testing the waters with this for the moment as Im seeing if this would be good to use to write my thesis. Im trying this out in OSX using Texshop as the latex editor and Bibdesk as a frontend to bibtex.

    Basically I've made a latex document with a reference in it. Then made a reference list using bibdesk. I've got them in the same folder (is this what you are supposed to do?)

    But then when I tell texshop to make the pdf I get a question mark where my reference should be and a page at the end with the heading 'Bibliography' but no references under it.

    here is the latex file
    Code:
    \documentclass[a4paper,12pt]{book}
    \usepackage{cite}
    \begin{document}
    
    \title{something}
    \author{me}
    \date{2nd March 2008}
    \maketitle
    
    \begin{equation}
    z(w,z) = \int{\sin(x)}dx
    \end{equation}
    pretend reference \cite{Lang:2000}
    
    \bibliography{references}
    \bibliographystyle{apa}
    \end{document}
    and here is the bibtex file which is created by bibdesk, which I titled references.
    Code:
    @conference{Lang:2000,
    	Address = {Athens, Greece},
    	Author = {J.H. Lang},
    	Booktitle = {Something else},
    	Date-Added = {2008-03-02 10:59:35 +1100},
    	Date-Modified = {2008-03-02 12:50:43 +1100},
    	Pages = {20-30},
    	Read = {No},
    	Title = {Something},
    	Year = {2000}}
    Can anyone help me
    Imagination is more important than knowledge

  2. #2
    Join Date
    Sep 2006
    Location
    Bruxelles, Belgium
    Beans
    657

    Re: Need help with latex/bibtex

    Is the references file called "references.bib" ? Everything looks ok ...

  3. #3
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: Need help with latex/bibtex

    Does your OSX LaTeX frontend run the stuff often enough to get the references resolved? If you would do it by hand you would have to rerun latex (and bibtex) a few times until it got everything sorted.

  4. #4
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: Need help with latex/bibtex

    No, no, your example above is a little shaky.

    First, I think \usepackage{cite} does not do what you think it does
    Code:
    cite.sty       Compressed, sorted lists of numerical citations: [8,11-16]
    Normally, if you want "Author Year" citation you use natbib. For normal, numbered citations [1],[2] you don't need any package here.

    Then you specify "apa" as the bibliography style. Do you have an actual bibstyle called "apa.bst"? There are a few different APA bibstyles. The multitude is a little confusing. There is a full-blown APA conformant package called apacite. I myself have simply used newapa.bst in the past, but that one is not really APA, I guess.

    The quickest fix to your example is this:
    Code:
    \documentclass{book}
    \usepackage{apacite}
    \begin{document}
    \title{something}
    \author{me}
    \date{2nd March 2008}
    \maketitle
    
    \begin{equation}
    z(w,z) = \int{\sin(x)}dx
    \end{equation}
    pretend reference \cite{Lang:2000}
    \bibliographystyle{apacite}
    \bibliography{references}
    \end{document}
    BTW, the book class is perhaps not the right one for a thesis. You may want to check out memoir.cls or KOMA-Script's scrrprt.cls.
    Last edited by hugmenot; March 2nd, 2008 at 04:35 PM. Reason: revised

  5. #5
    Join Date
    May 2008
    Beans
    76
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Need help with latex/bibtex

    @slimdog360: you question is old but this might help somebody. suppose your document is called 'thesis.tex'
    first you compile your document: latex thesis
    (no extension necessary)
    then you run bibtex on it: bibtex thesis
    then you run latex again (two times). and that's it. I use emacs+auctex which is a very good environment for typing latex documents (I only have to click buttons to run those commands, no need of using a command line)
    cheers

  6. #6
    Join Date
    Mar 2007
    Beans
    118
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Need help with latex/bibtex

    indeed perroazul, your post just helped me quite a bit

  7. #7
    Join Date
    Nov 2005
    Location
    Leeds, UK
    Beans
    1,634
    Distro
    Ubuntu Development Release

    Re: Need help with latex/bibtex

    Thanks perroazul, that was a helpful post!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •