1

I am working on a group project, and writing this in latex. Because of sending files forth and back this is easier with a single file. Therefore we want to include the bibliography directly into the file. Alas this proves some problems. For one the citatitions does not show up properly, we need them to be of the form "(author,year)" and secondly the bibliography does not show up? We tried compiling it first using the quickbuild in texmaker, then run bibtex, then run quickbuild again but nothing helped

If someone would look at the file we would be extremely grateful

\documentclass[a4paper,12pt,round]{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{test1,
  author    = {Goossens, Michel and Mittelbach,
               Frank and Samarin, Alexander},
  title     = {The LaTeX Companion},
  publisher = {Addison-Wesley},
  location  = {Reading, Mass.},
  year      = {1994},
}
\end{filecontents}
\usepackage[T1]{fontenc}                             % Vise norske tegn.
\usepackage[norsk]{babel}                            % Tilpasning til norsk.
\usepackage[utf8]{inputenc}                          % For å kunne skrive norske tegn.
\usepackage{lipsum}
\usepackage[style=authortitle-dw]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{hyperref}
\author{Øistein Søvik, Silje, Magnus , Maja}
\title{PPU4000 \\ Examen Paedagogicum}

\begin{document}
\maketitle 

\tableofcontents

\lipsum[1] \Cite{test1} \lipsum[2]

\printbibliography
\end{document}
Andrew Swann
  • 95,762
N3buchadnezzar
  • 11,348
  • 7
  • 55
  • 114
  • As doncherry says, the default back-end for biblatex is now biber. You probably want to use the backend=bibtex option when loading biblatex. – Joseph Wright Nov 05 '12 at 07:12

1 Answers1

5

Compiling your MWE with latexmk works just fine for me. (Latexmk automatically determines the number and kinds of compilations necessary.) Note that recent versions of biblatex use Biber as the default backend instead of BibTeX. I don't have a lot of experience with biblatex, but latexmk definitely makes your life easier.

As for the citation format, use this:

\usepackage[style=authoryear]{biblatex}

And to get the parentheses:

\parencite{test1}

These questions might be of interest for you: biblatex in a nutshell (for beginners) (my answer) and bibtex vs. biber and biblatex vs. natbib

doncherry
  • 54,637
  • I think it has to do with how strange texmaker does it compiling, because even after using your settings nothing shows up. I used latex->bibtex->latex->latex and this is what it tells me "Overwriting file `./jobname.bib', Data encoding is utf8, Citation 'test1' on page 1 undefined, empty bibliography". I just cant see where my error is? ... – N3buchadnezzar Nov 05 '12 at 07:24
  • @N3buchadnezzar I just tried it manually (i.e. without latexmk) and the following compilation cycle worked: pdflatex, biber, pdflatex, pdflatex. The overwriting of the .bib file shouldn't matter as long as it doesn't change. – doncherry Nov 05 '12 at 07:32
  • STill doesnt work, I guess it must be a local error. But I just want to effing fix it... I tried compilling my document with LaTeXmk, but alas no changes. http://i.imgur.com/hXKdx.png?1 as in no bibliography and no change in styles. My refferences are listed as (test1) and test1 respectively. – N3buchadnezzar Nov 05 '12 at 07:56
  • And now things works, I have no idea why. I did download biber, and latexmk again though. Close this one if you want =) – N3buchadnezzar Nov 05 '12 at 07:57
  • @N3buchadnezzar Glad it works. Deleting the auxiliary files often helps. (Another use for latexmk: latexmk -c foo.tex.) I tried backend=bibtex with latexmk and it worked, too; but I got some of the same warnings that you got. – doncherry Nov 05 '12 at 08:00
  • @N3buchadnezzar I just realized that pointing you to a "for idiots" question might seem kind of insulting -- it was not intended this way! I just think that question contains some helpful information, regardless of its title. – doncherry Nov 05 '12 at 08:03
  • No problems, one last question. (If you want to continue this in chat thats fine too) do you know how to get the propper citation for my refferences aka (author,year) ? =) – N3buchadnezzar Nov 05 '12 at 08:09
  • @N3buchadnezzar http://chat.stackexchange.com/rooms/6333/room-for-doncherry-and-n3buchadnezzar – doncherry Nov 05 '12 at 08:11