2

I'm relatively new to the world of LaTeX, but so far I managed to put together a nice looking layout by browsing through StackExchange and reading manuals. Now I've been trying for 3 days to get things working. It's time to ask the pro's.

I've prepared a minimal example because I can't get biber and biblatex working. I get 12 warnings in my log when compiling my PDF.

All because of my cites and footnotes don't translate well. I boils done to a undefined control sequence problem: \citet and \citep don't get me anywhere with biblatex. This (full log here):

LaTeX Warning: Citation 'McGrane:2014' on page 1 undefined on input line 68.

Package biblatex Warning: '\textcite' not defined by citation style.
(biblatex)                Falling back to '\cite' on input line 68.

LaTeX Warning: Empty bibliography on input line 92.

LaTeX Warning: There were undefined references.

Package biblatex Warning: Please (re)run Biber on the file:
(biblatex)                min-biblatex
(biblatex)                and rerun LaTeX afterwards.

Of course my references don't get converted they look like the cite-key from BibDesk (Basich:2003) and… my bibliography doesn't get printed, too :/

Aside from using Sublime Text for building the PDF I also tried the commandline with pdflatex min-biblatex, biber min-biblatex, pdflatex min-biblatex, pdflatex min-biblatex and as last resort TeXShop, too.

(Almost)MWE

\documentclass[12pt,parskip=half-,a4paper,twoside=false,bibliography=totocnumbered,version=first,listof=numbered,numbers=noenddot,version=first]{scrreprt}
\usepackage{ifpdf}
\ifpdf
% ENCODING & TRANSLATION
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\inputencoding{utf8}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
% BIBLIOGRAPHY & CITATION
\usepackage{hyperref}
%   ::BIBLIOGRAPHY::
\usepackage[natbib=true,
            backref=true,
            hyperref=true,
            showmedium=false,
            % autocite=footnote,
            % firstinits=true,
            % indexing=true,
            url=true,           %
            style=mla,          %  style=debug, alphabetic
            backend=biber,      %
            % doi=false,
            texencoding=utf8,
            bibencoding=utf8]{biblatex}

\listfiles
\usepackage{filecontents}
\begin{filecontents}{literature.bib}
%% This BibTeX bibliography file was created using BibDesk.
%% Saved with string encoding Unicode (UTF-8)
@webpage{McGrane:2014,
    Author = {Sally McGrane},
    Day = {17},
    Lastchecked = {2014-03-23},
    Month = {February},
    Note = {Last checked: 2014-03-23},
    Publisher = {The New Yorker},
    Title = {To the Magic Mountain!},
    Url = {http://www.newyorker.com/books/page-turner/to-the-magic-mountain},
    Year = {2014}}

@webpage{ThomasMannArchiv,
    Lastchecked = {2014-06-18},
    Publisher = {Thomas-Mann-Archiv},
    Title = {Das Internationale Sanatorium »Berghof«},
    Url = {http://www.tma.ethz.ch/assets/Uploads/Ueber-uns/Thomas-Sprecher/Dokumente/4.-Das-Internationale-Sanatorium-Berghof.pdf}}

@book{Mann:1924,
    Address = {Frankfurt am Main},
    Author = {Thomas Mann},
    Edition = {Gro{\ss}e kommentierte Frankfurter Ausgabe, Band 5.1},
    Editor = {Michael Neumann},
    Publisher = {S. Fischer},
    Title = {Der Zauberberg},
    Year = {2010}}

\end{filecontents}
\addbibresource{literature.bib}

\begin{document}
\chapter{Cites and Footnotes}
\label{citesandfootnotes}

Footnote 1\footnote{~\citep{Anderson:1999}} and 2\footnote{~\citep[S. 23f]{Monagas:2007}}. Inline cites [e.g.][p. 2]~\citep{Sprecher:2002} and ~\citep[p 66f]{Basich:2003}. Three cites: author v1~\citep{McGrane:2014}, v2 \citet{Mann:1924} and a quote from  \citet{ThomasMannArchiv}:

\begin{quote}

This is a quote.
\end{quote}

\section{Pics and Tables}
\label{picsandtables}

\begin{figure}[htbp]
\caption{A diagram}
\label{dia1}
\end{figure}

\begin{figure}[htbp]
\caption{A table}
\label{table_tab}
\end{figure}

%end of text
\pagebreak
\appendix
\begingroup
\printbibliography
\listoffigures
\endgroup
\end{document}

I also cleaned the cache via rm -rf `biber --cache since I read that biber is prone to malfunction because of it.


Setup

  • I use BibDesk to manage my references.
  • I have the latest MacTeX bundle installed (TeXShop, TeXworks, biber, etc.) which leaves me at biber 1.8 with the fitting biblatex package.
  • I write in MultiMarkdown and let Scrivener convert my text to LaTeX. This also means that my LaTeX content will always look like what you see after \begin{document}.
  • I compile with Sublime Text 3 and the LaTeX-Plus package (which uses latexmk). Sometimes I also use TeXShop.

Before biblatex there was natbib

I used to use natbib where everything almost worked, too. Despite these five issues:

  1. No support for [e.g.][p. 333]~\citep{author-key}
  2. Can't get lastchecked (aka date accessed) field from BibDesk to show up in the bibliography. Dissatisfying workaround: use the note field in BibDesk.
  3. Inline cites still show up in apacite format (author, year, page) instead of mla format (author, page)
  4. Doesn't replace unknown author (aka with no author field) in inline citation with something useful.
  5. natbib => not ideal for humanities

apacite style worked pretty well, but I needed mla – that's how I end up giving biblatex a shot.

For reference purposes the mla minimal example:


Stuff I came across that didn't help me:

  • I just read the error log "Package biblatex Warning: '\textcite' not defined by citation style." I don't know the mla-style. Maybe you should check, whether it defines citations and everything. A short view on the manual shows, that the author only speaks of \autocite. Maybe other cite-commands are not implemented. – musicman Jul 24 '14 at 18:50
  • also, the manual dates from May 2013. Could be outdated? mirrors.ctan.org/macros/latex/contrib/biblatex-contrib/… – musicman Jul 24 '14 at 18:52
  • The webpage entry type is undefined, nor is there any such field. Four citations do not exist in literature.bib as defined in you post. Apart from that, everything compiles fine with MiKTeX. – Bernard Jul 24 '14 at 19:01
  • When citations are not resolved this is normally due to problems in the biber run. Show the blg-file. – Ulrike Fischer Jul 25 '14 at 7:16
  • @UlrikeFischer I was able to solve that by adding citestyle=authoryear. – patrick Jul 25 '14 at 20:25
2

As Bernard says, it works except for the bits which don't work due to non-existent types, unrecognised fields or missing bibliography entries.

Rather than webpage, you may want online. Rather than lastchecked, you probably want urldate:

\documentclass[12pt,parskip=half-,a4paper,twoside=false,bibliography=totocnumbered,version=first,listof=numbered,numbers=noenddot,version=first]{scrreprt}
\usepackage{ifpdf}
\ifpdf
% ENCODING & TRANSLATION
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\inputencoding{utf8}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
% BIBLIOGRAPHY & CITATION
\usepackage{hyperref}
%   ::BIBLIOGRAPHY::
\usepackage[natbib=true,
            backref=true,
            hyperref=true,
            showmedium=false,
            % autocite=footnote,
            % firstinits=true,
            % indexing=true,
            url=true,           %
            style=mla,          %  style=debug, alphabetic
            backend=biber,      %
            % doi=false,
            texencoding=utf8,
            bibencoding=utf8]{biblatex}

\listfiles
\usepackage{filecontents}
\begin{filecontents}{literature.bib}
%% This BibTeX bibliography file was created using BibDesk.
%% Saved with string encoding Unicode (UTF-8)
@online{McGrane:2014,
    Author = {Sally McGrane},
    Day = {17},
    urldate = {2014-03-23},
    Month = {February},
    Publisher = {The New Yorker},
    Title = {To the Magic Mountain!},
    Url = {http://www.newyorker.com/books/page-turner/to-the-magic-mountain},
    Year = {2014}}

@online{ThomasMannArchiv,
    urldate = {2014-06-18},
    Publisher = {Thomas-Mann-Archiv},
    Title = {Das Internationale Sanatorium »Berghof«},
    Url = {http://www.tma.ethz.ch/assets/Uploads/Ueber-uns/Thomas-Sprecher/Dokumente/4.-Das-Internationale-Sanatorium-Berghof.pdf}}

@book{Mann:1924,
    Address = {Frankfurt am Main},
    Author = {Thomas Mann},
    Edition = {Gro{\ss}e kommentierte Frankfurter Ausgabe, Band 5.1},
    Editor = {Michael Neumann},
    Publisher = {S.\ Fischer},
    Title = {Der Zauberberg},
    Year = {2010}}

\end{filecontents}
\addbibresource{literature.bib}

\begin{document}
\chapter{Cites and Footnotes}
\label{citesandfootnotes}

Footnote 1\footnote{~\citep{Anderson:1999}} and 2\footnote{~\citep[S. 23f]{Monagas:2007}}. Inline cites [e.g.][p. 2]~\citep{Sprecher:2002} and ~\citep[p 66f]{Basich:2003}. Three cites: author v1~\citep{McGrane:2014}, v2 \citet{Mann:1924} and a quote from  \citet{ThomasMannArchiv}:


\printbibliography

\end{document}

Partially complete bibliography and citations

  • Fixing the missing references was indeed a no-no. Also switching from @webpage to @online was good. In the meantime I read all the relevant documentations and learned quite a bit about (Bib)LaTeX in the last days. Thanks for the pointer. – patrick Jul 26 '14 at 16:43
1

As @cfr and @Bernard pointed out I made some mistakes and submitted a version with missing bibliography entries (==> never submit a StackExchange question when you're super-tired).

Correction 1: I edited the MWE to have proper bib entries.


I also switched my BibDesk setup to a confirm more with BibLateX – see BibLateX Types and Fields where you can download a TypeInfo.plist which has all the glitz and glam of BibLaTex.

Correction 2: In addition to the above I switched from @webpage to @online.


My syntax for using prenotes and postnotes was messed up. As stated in the initial question I use MultiMarkdown and let Scrivener convert my document to a .tex file.

Correction 3: Here's the correct MMD syntax – note the two \.

MMD =====> [see\]\[6][#Mann:1924]
LaTeX ===> ~\citep[see][6]{Mann:1924}
PDF =====> (see Mann, 1924, S. 6)

No type (i.e. "Web", "Print", etc.) was added to the bibliography. In addition, Urldate still gets printed without an automatic prefix like "Last checked/Access Date/Last accessed". Automatic is a must since I write in more than one language.

I guess problems like this don't occur if you don't rely on natbib=true and can just use plain biblatex-mla styles with autocite & Co. But that's an okay price to pay for writing in Markdown and Scrivener. Maybe some day I'm smart enough to use renewcommand to the max and transform my whole natbib-dependent output.

Correction 4: Set showmedium to true so that the type of medium gets printed. This is mandatory when writing in MLA style.

↑ This doesn't correct the missing prefix but can certainly be neglected now since the published date and the date of the last access are now divided by the type of medium which makes for a cleaner reading experience.


You might have noted that the bibliography sported a "(Siehe S. 1)" after every entry. It was unnecessary and without a purpose.

Correction 5: Set backref to false.


With MLA the correct format for cites is (Author page) without the comma.

Correction 6: Add \renewcommand{\postnotedelim}{\addspace} to your preamble. It removes the comma in-between cites. To remove the additional info (p./S.) also add \DeclareFieldFormat{postnote}{#1}.


Here's the cleaned-up version with additional bug fixes to emulate all MLA necessary standards.

\documentclass[12pt,parskip=half-,a4paper,twoside=false,bibliography=totocnumbered,version=first,listof=numbered,numbers=noenddot,version=first]{scrreprt}
\usepackage{ifpdf}
\ifpdf
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\inputencoding{utf8}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage{hyperref}
\usepackage[backref=false,
            natbib=true,
            hyperref=true,
            showmedium=true,
            autocite=footnote,
            url=true,
            style=mla,
            citestyle=authortitle-ticomp,
            sorting=nyvt,
            backend=biber,
            texencoding=utf8,
            maxnames=2,
            bibencoding=utf8]{biblatex}
\renewcommand{\postnotedelim}{\addspace}
\DeclareFieldFormat{postnote}{#1}
\listfiles
\usepackage{filecontents}
\begin{filecontents}{literature.bib}
@article{Anderson:1999,
    Author = {Anderson, Kirsten L.},
    Journal = {Journal of Sport and Social Issues},
    Pages = {55-79},
    Title = {Snowboarding: The Construction of Gender in an Emerging Sport},
    Type = {Journal},
    Volume = {23},
    Year = {1999}}
@online{McGrane:2014,
    Author = {McGrane, Sally},
    Day = {17},
    Month = {February},
    Publisher = {The New Yorker},
    Title = {To the Magic Mountain!},
    Url = {http://www.newyorker.com/books/page-turner/to-the-magic-mountain},
    Urldate = {2014-03-23},
    Urlday = {23},
    Urlmonth = {March},
    Urlyear = {2014},
    Year = {2014}}
@book{Mann:1924,
    Author = {Mann, Thomas},
    Edition = {Gro{\ss}e kommentierte Frankfurter Ausgabe},
    Volumes = {5.1},
    Editor = {Neumann, Michael},
    Publisher = {S. Fischer GmbH},
    Rating = {5},
    Title = {Der Zauberberg},
    Location = {Frankfurt am Main},
    Note = {PDF Version},
    Year = {2010}}
\end{filecontents}
\addbibresource{literature.bib}
\begin{document}
\chapter{Footnotes, Cites and Quotes}
\label{citation}
First mention of primary literature\footfullcite[page 23]{Mann:1924}.

Postnote ~\citep[19]{Anderson:1999}.

Ibid test ~\citep[see][]{Anderson:1999} and ~\citep[see][762]{Anderson:1999}.

Inline prenote  \citet[see][]{Mann:1924}.

Pre-{} and postnote ~\citep[e.g.][99]{McGrane:2014}.

Prenote ~\citep[see][]{McGrane:2014}.

Just the key ~\citep{Anderson:1999}.

\begin{quote}

This is a quote.~\citep[984]{Mann:1924}
\end{quote}

Next section reference see \autoref{figures}

\chapter{Pics and Tables Demo}
\label{figures}

Test section reference \autoref{citation}


\begin{figure}[htbp]
\caption{A diagram~\citep{McGrane:2014}}
\label{dia1}
\end{figure}

\begin{figure}[htbp]
\caption{A table~\citep[see][]{McGrane:2014}}
\label{table_tab}
\end{figure}

%end of text
\pagebreak
\appendix
\begingroup
\printbibliography
\listoffigures
\endgroup
\end{document}

LIVE PREVIEW


Note regarding correction 3 and 4: I'm still running into (compatibility?) problems when authoring a PDF designed for digital consume (i.e. not for print). When I try to use the eprint and eprinttype fields

More in this post: urls do not show up in in biblatex-mla Works Cited list - TeX - LaTeX Stack Exchange

If showmedium is off and all eprint parameters are set there are two URL outputs. Especially urldate is tricky since I could delete URL and just use eprint and eprinttype but then there would be the date duplication. Messy. I guess this is also a natbib=true issue.

PS: I also don't get how to format these: Do I always have to use muse… whatever… I have to google this. This last chapter is only here for reference purposes of fellow BibLaTex + natbib users.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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