17

First of all I would like to thank you because you helped me out a lot with all your answers to the already online questions.

Now, here is my problem. I am trying to do a bibliography file with TeXworks but I get this error when I try to compile (pdfLaTeX+MakeIndex+bibTeX):

    This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit)
    entering extended mode
    ****PATH here******
    ! Undefined control sequence.
    l.1 \documentclass
        [a4paper,11pt]{report}

I've been reading some similar questions but I don't find the way to fix it (maybe I am missing something). I found one that says that I am trying to compile a LaTeX file using TeX compiler but I don't know how to change the configuration.

This is the .bib fiel content:

    \documentclass[a4paper,11pt]{report}
    \usepackage[english]{babel}     % faire de l'anglais
    \usepackage[latin1]{inputenc}   % accents dans le source
    \usepackage[T1]{fontenc}        % accents dans le DVI
    \usepackage{url}
    \begin{document}

    @Article{ref11,
author={Danihelka, Jiri and Kencl, Lukas},
journal={Cloud Futures Workshop 2012 },
title={Colaborative 3D Environments over Windows Azure},
year={2012},
month={May},
pages={},
note={}
    }

    @book{ref12,
author = {Lee, Henry and Chuvyrov, Eugene},
    title = {Beginning Windows Phone 7 Development},
    publisher = {Apress},
    volume = {},
    number = {},
    series = {},
    address = {},
    edition = {Second edition},
    year = {2011},
    month = {July},
    note = {}
    }

    @Article{ref13,
author={},
journal={},
title={Cloud computing},
year={},
month={},
pages={},
url={\url{http://en.wikipedia.org/wiki/Cloud_computing}}
    }

    \end{document}
15
  • 18
    You are running pdfTeX, not pdfLaTeX. Check carefully which option you have selected in TeXworks.
    – Joseph Wright
    Mar 17, 2013 at 13:00
  • 3
    Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say "thank you" to users who helped you.
    – hpesoj626
    Mar 17, 2013 at 13:31
  • 1
    As I said, I am using pdfLaTeX+MakeIndex+bibTeX to compile. If I go to preferences->compile, and I edit the option pdfLaTeX+MakeIndex+bibTeX, this are the parameters: Program: texify.exe Parameters: --pdf --tex-option=$synctexoption $fullname What should I change?
    – jlcivico
    Mar 17, 2013 at 14:28
  • 1
    Can you give us some more background? Please provide a minimal working example (MWE) that exhibits this problem.
    – hpesoj626
    Mar 17, 2013 at 16:01
  • 3
    @jlcivico Your .bib file should not contain \documentclass, \begin{document}, etc.; only bibtex/biblatex entries!
    – jub0bs
    Mar 17, 2013 at 16:19

1 Answer 1

4

Your .bib file should only contain BibTeX entries (and possibly comments). It should not contain \documentclass, \usepackage, \begin{document}, etc.

If your .bib file has "mybiblio" as base name and contains

@Article{ref11,
    author  = {Danihelka, Jiri and Kencl, Lukas},
    journal = {Cloud Futures Workshop 2012 },
    title   = {Colaborative 3D Environments over Windows Azure},
    year    = {2012},
    month   = {May},
    pages   = {},
    note    = {}
}

@book{ref12,
    author      = {Lee, Henry and Chuvyrov, Eugene},
    title       = {Beginning Windows Phone 7 Development},
    publisher   = {Apress},
    volume      = {},
    number      = {},
    series      = {},
    address     = {},
    edition     = {Second edition},
    year        = {2011},
    month       = {July},
    note        = {}
}

@Article{ref13,
    author  = {},
    journal = {},
    title   = {Cloud computing},
    year    = {},
    month   = {},
    pages   = {},   
    url = {\url{http://en.wikipedia.org/wiki/Cloud_computing}}
}

then running pdflatex, then bibtex, then pdflatex twice on the following code should work and produce the expected output:

\documentclass[a4paper,11pt]{report}
\usepackage[english]{babel}     % faire de l'anglais
\usepackage[latin1]{inputenc}   % accents dans le source
\usepackage[T1]{fontenc}        % accents dans le DVI
\usepackage{url}
\begin{document}

As seen in \cite{ref11}, blah blah blah.

\bibliographystyle{plain}
\bibliography{mybiblio}
\end{document}

enter image description here

1
  • 3
    May be it's worthwhile to mention run pdflatex first, then bibtex again pdflatex and again pdflatex to get the final pdf with citations for a new user. Mar 17, 2013 at 17:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .