Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
    
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 5 '12 at 7:12
add comment

1 Answer

up vote 5 down vote accepted

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 for idiots (my answer) and bibtex vs. biber and biblatex vs. natbib

share|improve this answer
    
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 5 '12 at 7: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 5 '12 at 7: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. 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 5 '12 at 7: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 5 '12 at 7: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 5 '12 at 8:00
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.