1

I have a document, I can't seem to figure out how to compile so that the document 'sees' the bibliography (.bib file) in TeXnicCenter.

Here are my bibliography commands:

\bibstyle{ieeetr}
\bibliography{BibTest}

I compile using the LaTeX-DVI-PDF profile, in which I have not selected the "Do Not Use Bibtex in this profile":

enter image description here

The document compiles just fine, except for the cites, for which I get question marks.

Do I need to use a package in order to get the bibliography to compile or what do I need to do?

Werner
  • 603,163
Greg
  • 101
  • You should show a visual of your output profile LaTeX-DVI-PDF. Also, did you compile multiple times (see Question mark instead of citation number)? – Werner Feb 14 '15 at 14:54
  • Do you use TeXnicCenter "Projects"? If so, is "Uses BibTeX" checked in the Project Properties? DID YOU COMPILE TWICE? – Paul Gessler Feb 14 '15 at 14:55
  • I use "Files", not "Projects". I compiled twice (well, more than twice..). – Greg Feb 14 '15 at 15:17
  • If you are not using a "Project", then you have to manually select Build -> Current File -> BibTeX in order to run BibTeX. Then recompile the document after doing that. – Paul Gessler Feb 14 '15 at 15:25
  • Here is a link to a pic of the output profile: http://imgur.com/jSGsUp0 Thanks!! – Greg Feb 14 '15 at 15:25
  • "If you are not using a "Project", then you have to manually select Build -> Current File -> BibTeX in order to run BibTeX. Then recompile the document after doing that." Ooh, that is promising! Doing that, I now get an Bibtex error message "I found no \bibstyle command while reading thesis.aux", although I have the bibstyle command as in my original post – Greg Feb 14 '15 at 15:28
  • 1
    \bibstyle should not appear in your .tex file; there it should be some \bibliographystyle. \bibstyle is written into the generated .aux file by the \bibliographystyle instruction. – Paul Gessler Feb 14 '15 at 15:34
  • And I also just realized: I was wrong about needing to manually run bibtex. It does work when choosing "Build current file" (Ctrl + F7). At least it helped you to see the log messages. :-) – Paul Gessler Feb 14 '15 at 15:38
  • Thanks for the wisdom! I changed to include the \bibliographystyle command, compiled the document twice, and then Build-Current File-Bibtex and I HAVE ACTUAL CITES IN MY DOCUMENT!! THANK YOU!! – Greg Feb 14 '15 at 15:47
  • @PaulGessler - You should write up a combination of your comments as a stand-alone answer. – Mico Feb 14 '15 at 18:26

1 Answers1

2

\bibstyle does not belong in the .tex file: this macro is meant to be used in the .aux file, and it is written there by \bibliographystyle, which should be used in the .tex file.

So bibtex complains that it "found no \bibstyle command while reading thesis.aux".

Use \bibliographystyle in the .tex file, then the correct macros will be written to the .aux file, and all will be well.

As an aside: if you're writing something as big as a thesis (deduced from the filename in the error message since no MWE was given), I highly recommend you create a TeXnicCenter project for this. It makes dealing with multiple included files much easier.

Paul Gessler
  • 29,607