BibTeX, biblatex and biberCan't get Bibtex to work with Texworks (MikTex)

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
ge0rg
Posts: 9
Joined: Sat Jul 25, 2015 7:00 am

Can't get Bibtex to work with Texworks (MikTex)

Post by ge0rg »

Hello citiztens of the internet,

it is seven in the morning and I am still awake, trying to set up my tex document so that I can finally start working. Before I give up, I'd like to ask you guys what I am doing wrong.
I should note that I started using latex today, and so far everything works fine, except bibtex, and I would like to get it working now to avoid doing additional work later on.
As the title says, I use Texworks.

Here is my minimized tex file:

Code: Select all

\documentclass[12pt,a4paper]{article}


\begin{document}


\newpage
\tableofcontents

\newpage

\section{Section}

\newpage

\subsection{Subsection}


\newpage

\nocite{*}
\bibliography{blabla} 
\bibliographystyle{plain}


\end{document}
Here is my .bib file wich I copied from a tutorial:

Code: Select all

@BOOK{DUMMY:1,
AUTHOR="John Doe",
TITLE="The Book without Title",
PUBLISHER="Dummy Publisher",
YEAR="2100",
}
My problem is now that whatever I do, I only get a page titled "References" without the actual references. The bib file is in the same directory as the tex file, even though I tried to put it into the MikTex/bibtex/bib directory.

I run Texworks with pdfLatex+MakeIndex+BibTex, so BibTex should run...I also tried "compiling" the bib file seperately with TexWorkx, i.e. I opened it in Texworks and tried to build it. If I did it with just BibTex, I got no error message or anything, it seemed to go through the file without problem.
When I ran it with pdfLatex+MakeIndex+BibTex, I get the following:

Code: Select all

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (MiKTeX 2.9 64-bit)
entering extended mode
(C:/Users/ge0rg/Desktop/searle/bib.bib)
*
and after that, nothing happens, Texworks never finishes running it (the symbol in the upper left corner never returns to green), and I can only interrupt it.
I don't know if that is supposed to happen.

Up to this point I was really amazed how effortless Latex makes formatting and everything, and I was not expecting this setback. I tried to find a solution for 3 hours now, so I'm counting on you ;).
I go to sleep now, good night!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Can't get Bibtex to work with Texworks (MikTex)

Post by Johannes_B »

Welcome and good morning/afternoon.

BibTeX should be run on the aux-file of the main document, since this is the one containing the citations.

If you run the whole chain on your main file, a blg-file will have been created. Can you show it to us?

By the way, many introductions on the net are quite bad and it is really hard (impossible) for a starter to judge the quality. Nicola Talbot's LaTeX for complete novices is a very good place to start.
Her next volume dickimaw-thesis even introduces the more advanced and modern tool to create bibliographies: biblatex with biber. A very powerful couple and worth looking into right now from the start.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
ge0rg
Posts: 9
Joined: Sat Jul 25, 2015 7:00 am

Can't get Bibtex to work with Texworks (MikTex)

Post by ge0rg »

Hey, yes, I do have a .blg file:

Code: Select all

This is BibTeX, Version 0.99dThe top-level auxiliary file: untitled-7.aux
I couldn't open database file blabla.bib
---line 5 of file untitled-7.aux
 : \bibdata{blabla
 :                }
I'm skipping whatever remains of this command
The style file: plain.bst
I found no database files---while reading file untitled-7.aux
(There were 2 error messages)
Is there something wrong with my .bib file?

I'll definitely also look into your links.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Can't get Bibtex to work with Texworks (MikTex)

Post by Johannes_B »

You tell LaTeX and BibTeX that the database file is called blabla.bib.


You log file above indicates, that you database in fact is called bib.bib

Either way, you need a better naming sheme, no matter if it is for testing or for real documents.

Call your main file: georgBibtexTests.tex and your literature: georgTestbibliography.bib

For a real document, i would suggest nameDegreeYear, for example muellerBachelor2012 or smithPhd2015 and according muellerBachelor2012Refs.bib or smithPhd2015refs.bib
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
ge0rg
Posts: 9
Joined: Sat Jul 25, 2015 7:00 am

Re: Can't get Bibtex to work with Texworks (MikTex)

Post by ge0rg »

EDIT:

Okay, I don't know what happened now, but after I copied the contents of the files into new files in a new folder, everything seems to be working now! Yehay!

Thanks a lot for your help!
Post Reply