The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

LaTeX citations

RichyRichy Registered User regular
edited April 2007 in Help / Advice Forum
This is my first time using LaTeX, and I'm confused a little. I've got my bib file, with references written like this:
@article{madsen2004,
  author =       "R. E. Madsen, S. Sigurdsson, L. K. Hansen and J. Larsen",
  title =        "Pruning the vocabulary for better context recognition",
  journal =      "Proceedings of the 2004 IEEE International Joint Conference on Neural Networks",
  year =         "2004",
  volume =       "2",
  pages =        "1439-1444",
  month =        "July",
}

When I compile my tex file, the references appear in the list, but in the text they are all displayed as ?. I don't know why. Right now, my best and only theory comes from the fact that the refs are supposed to be displayed in the text as (Madsen 2004). Where does the program get the name "Madsen" from the bib entry? I'm guessing it's not sophisticated enough to parse the author field. So I must be missing a field. But what is it called?

Or am I way off? What else could be causing the problem?

sig.gif
Richy on

Posts

  • BarrakkethBarrakketh Registered User regular
    edited April 2007
    Did you run:
    • latex
    • bibtex
    • latex
    • latex
    ?

    Barrakketh on
    Rollers are red, chargers are blue....omae wa mou shindeiru
  • RichyRichy Registered User regular
    edited April 2007
    Yes, I did.

    Richy on
    sig.gif
  • RichyRichy Registered User regular
    edited April 2007
    Sometimes it compiles, and sometimes it doesn't. Without me making any change in the tex or bib file at all.

    Compiling the tex file, I can get this error:
    ! undefined control sequence.
    <argument> ...me \xdef \prev@citename {\@citename 
                                                                                           } \let \citename \oldcitename
    

    Compiling the bib file, normally after I got the above error, I get this error:
    "I found no \bibdata command--while reading file test3.aux
    Warning--I didn't find a database entry for "madsen2004""

    Normally, those go away when I delete all compilation files, but it seems to me like it shouldn't happen at all.


    EDIT: More specifically, it seems that the error occurs every other time I try to compile the tex. I compile once and it works, then a second time and it fails, then a third time and it works, and so on...

    Richy on
    sig.gif
  • BarrakkethBarrakketh Registered User regular
    edited April 2007
    What system are you compiling these on? I hacked together a quick file and had the same problems you were having. It turns out that I was missing a package (tetex-extra) that contained the standard bibliography styles.

    To address something earlier:
    Right now, my best and only theory comes from the fact that the refs are supposed to be displayed in the text as (Madsen 2004). Where does the program get the name "Madsen" from the bib entry? I'm guessing it's not sophisticated enough to parse the author field.
    Actually, it is sophisticated enough. Using the "apalike" bibliography style, using \cite{madsen2004} prints out:
    R.E. Madsen and Larsen, 2004

    If you're interested you can take a look at the style definition (apalike.bst).

    EDIT: What are your \cite and \bibliographystyle commands?

    Barrakketh on
    Rollers are red, chargers are blue....omae wa mou shindeiru
  • RichyRichy Registered User regular
    edited April 2007
    The style command is:
    \bibliographystyle{plain}
    
    and the cites are in the text like this
    blah blah blah \cite{madsen2004} blah blah blah
    

    The document class I use is clv2.cls given here. I include it at the begining of my document using
    \documentclass[shortpaper,manuscript]{clv2}
    

    I just realised that there is also a document style available, but when I try to use it with
    \documentstyle[fullname]{article}
    
    I get an error "two \documentclass or \documentstyle commands"


    EDIT:
    I'm using WinEdt on Windows XP.

    Richy on
    sig.gif
  • BarrakkethBarrakketh Registered User regular
    edited April 2007
    Richy wrote: »
    The style command is:
    \bibliographystyle{plain}
    
    and the cites are in the text like this
    blah blah blah \cite{madsen2004} blah blah blah
    
    The plain style will only number them (to my knowledge).
    The document class I use is clv2.cls given here. I include it at the begining of my document using
    \documentclass[shortpaper,manuscript]{clv2}
    

    Ok.
    I just realised that there is also a document style available, but when I try to use it with
    \documentstyle[fullname]{article}
    
    I get an error "two \documentclass or \documentstyle commands"

    According to this:
    This document applies to version 2 of CL class file. Prior style files such as “cl.sty”
    and “coli.sty” do not have all of the features described here.
    The cls file that you are using now should work fine. However, your bibliography will require a different style to display properly.

    Also from the page you linked, they provide this archive that contains files you should need (if they aren't already provided for you on the machine you're using): fullname.bst and fullname.sty. Once they are installed you should be able to use
    \bibliographyclass{fullname}
    
    and
    \usepackage{fullname}
    

    Since you're not all that familiar with LaTeX, you should give The Not So Short Introduction to LaTeX a read.

    Barrakketh on
    Rollers are red, chargers are blue....omae wa mou shindeiru
  • RichyRichy Registered User regular
    edited April 2007
    Alright, thanks, I fixed it. I put the fullname.bst and fullname.sty in the same folder as the tex file, and I changed the code as such:
    \documentclass[shortpaper,manuscript]{clv2}
    \usepackage{fullname}
    
    \begin{document}
    
    blah blah blah \cite{madsen2004} blah blah blah
    
    \bibliographystyle{fullname}
    \bibliography{RichyRefs}
    
    \end{document}
    

    I get a new error now, when I try to compile the tex. It seems I'm out of memory??
    ! TeX capacity exceeded, sorry [main memory size=2000001].
    \@internalcite ->\def \whichcite {cite
                                          }\def \citename ##1{##1 }\global \pare...
    l.8 blah blah blah \cite
                            {madsen2004} blah blah blah
    If you really absolutely need more capacity,
    you can ask a wizard to enlarge me.
    
     
    Here is how much of TeX's memory you used:
     2450 strings out of 95898
     27093 string characters out of 1194896
     2000002 words of memory out of 2000001
     5426 multiletter control sequences out of 60000
     6484 words of font info for 19 fonts, out of 500000 for 1000
     14 hyphenation exceptions out of 607
     39i,1n,24p,360b,76s stack positions out of 1500i,500n,5000p,200000b,32768s
    No pages of output.
    
    How is that even possible?

    Richy on
    sig.gif
  • BarrakkethBarrakketh Registered User regular
    edited April 2007
    I'm a 'tard and didn't read one of the files included with Fullname.zip. Remove the \usepackage{fullname} and place fullname in the options (between the brackets) in your \documentclass entry.

    I'm continue playing around with the various ways to cite entries after I take my dog out.

    Barrakketh on
    Rollers are red, chargers are blue....omae wa mou shindeiru
  • RichyRichy Registered User regular
    edited April 2007
    It worked! Thanks!

    Finally, after 10 hours, I have working references!

    Richy on
    sig.gif
  • BarrakkethBarrakketh Registered User regular
    edited April 2007
    Richy wrote: »
    It worked! Thanks!

    Finally, after 10 hours, I have working references!

    Not yet ;)

    Multiple authors should be separated by the word "and". The citation will then read "Madsen et al. 2004". Using what you gave me it lists both Madsen's & Larsen's name. As far as names go, this is pretty concise as to how it's handled.

    Glad I could help.

    Barrakketh on
    Rollers are red, chargers are blue....omae wa mou shindeiru
Sign In or Register to comment.