1

I would like to change the bibliography and citation style to this APA-based style:

Books: Menger, C. (1982). Grundsätze der Volkswirtschaftslehre. Wenen: Braumüller.

Websites: Nakamoto, S. (2009). Bitcoin: A Peer-to-Peer Electronic Cash System. Geraadpleegd op 16-02-2015, http://bitcoin.org/bitcoin.pdf

Spoken: Casares, W. (2014). Getting to a Billion Bitcoin Users, Bitcoin2014 congres. If title is empty, then like Shrem, C. (2014), Webwinkel Vakdagen.

For all three categories: if no year is given, put (z.d.) instead of the year.

\documentclass[a4paper,dutch]{report}
\usepackage[scaled=.90]{helvet}
\usepackage{courier, csquotes, babel, url}
\usepackage[backend=bibtex,style=apa,citestyle=verbose-ibid,bibstyle=numeric,sorting=nty,defernumbers=true]{biblatex}
\def\UrlBreaks{\do\/\do-}

\addbibresource{main.bib} 

\usepackage{chngcntr}
\counterwithout{footnote}{chapter}
\let\footcite\footfullcite

\usepackage{xpatch}
\xpatchbibmacro{url+urldate}
  {\usebibmacro{urldate}}
  {\ifcitation{}{\usebibmacro{urldate}}}
  {}
  {}
\renewcommand{\newunitpunct}{\addcomma\addspace}


\DeclareBibliographyCategory{websites}
\DeclareBibliographyCategory{spoken}
\DeclareBibliographyCategory{books}

\AtEveryCitekey{%
  \ifentrytype{misc}{%
    \iffieldundef{howpublished}{%
      \addtocategory{websites}{\thefield{entrykey}}%
    }{%
      \addtocategory{spoken}{\thefield{entrykey}}%
    }%
  }{%
  }%
}

\AtEveryCitekey{%
  \ifentrytype{book}{%
      \addtocategory{books}{\thefield{entrykey}}%
  }{}%
}

\begin{document}

\footcite{menger1} \footcite{shrem3} \footcite{guardian3} \footcite{paper1}

\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Literatuurlijst}

\chapter*{Literatuurlijst}
\section*{Boeken}

\begingroup
\let\clearpage\relax
\sloppy
\printbibliography[category=books,heading=none]
\endgroup

\section*{Online artikelen}
\begingroup
\let\clearpage\relax
\sloppy
\printbibliography[category=websites,heading=none]
\endgroup

\section*{Conferenties}
\begingroup
\let\clearpage\relax
\sloppy
\printbibliography[category=spoken,heading=none]
\endgroup


\end{document} 

main.bib file:

%books
@book{menger1,
  author = {Menger, C.},
  title = {Grunds{\"a}tze der Volkswirtschaftslehre},
  publisher = {Braum{\"u}ller},
  pubcity = {Wenen},
  year = {1982} 
}

%spoken
@misc{shrem3,
  author = "Shrem, C.",
  title = "",
  month = jan,
  year = "2014",
  howpublished = "Webwinkel Vakdagen"
}

@misc{wences1,
  author = "Casares, W.",
  title = "Getting to a Billion Bitcoin Users",
  month = may,
  year = "2014",
  howpublished = "Bitcoin2014 congres"
}

%websites
@misc{guardian3,
  author = {The Guardian},
  title = {Cyprus banks remain closed to prevent run on deposits},
  url = "http://www.theguardian.com/world/2013/mar/26/cyprus-banks-closed-prevent-run-deposits",
  year = "2010",
  urldate = "2014-11-15"
}

@misc{paper1,
  author = {Nakamoto, S.},
  title = {Bitcoin: A Peer-to-Peer Electronic Cash System},
  url = "http://bitcoin.org/bitcoin.pdf",
  year = "2009",
  urldate = "2015-02-16"
}
Scripter
  • 215
  • 1
  • 12

1 Answers1

1

Yo are using biblatex-apa, which requires biber since version 4.5. That means, that you have to run biber instead of bibtex (or use latexmk or arara to automate the buid process).

If I understood you correctly, you want to turn off sentence case, this can be done with:

\DeclareFieldFormat{apacase}{#1}

In order to set the language to dutch you have to set the language mapping accordingly:

\DeclareLanguageMapping{dutch}{dutch-apa}

Now "g.d." is printed, when no date is given. You can change that to "z.d." if you want to by redefining the nodate-string:

\DefineBibliographyStrings{dutch}{%
    nodate = {z.d.}
}

You have to modify the stings retrieved and from to obtain the desired result for visited URLs:

\DefineBibliographyStrings{dutch}{%
   retrieved = {geraadpleegd op},
   from = {},
}

Also note, that if you want to use an institution like "The Guardian" as author, you have to put an additional pair of curly brackets around it (or "The" will be interpreted as a first name):

author = {{The Guardian}}

Putting it all together (and leaving some ornamental code out) will look like this:

\documentclass[a4paper]{report}
\usepackage[dutch]{babel}
\usepackage{csquotes, url}
\usepackage[backend=biber,
            citestyle=verbose-ibid,
            urldate=short,
            style=apa]{biblatex}

\DeclareLanguageMapping{dutch}{dutch-apa}
\NewBibliographyString{retrieved}
\NewBibliographyString{from}
\DefineBibliographyStrings{dutch}{%
   nodate = {z.d.},
   retrieved = {geraadpleegd op},
   from = {},
}

\DeclareFieldFormat{apacase}{#1}

\DeclareBibliographyCategory{websites}
\DeclareBibliographyCategory{spoken}
\DeclareBibliographyCategory{books}

\AtEveryCitekey{%
  \ifentrytype{misc}{%
    \iffieldundef{howpublished}{%
      \addtocategory{websites}{\thefield{entrykey}}%
    }{%
      \addtocategory{spoken}{\thefield{entrykey}}%
    }%
  }{%
  }%
}

\AtEveryCitekey{%
  \ifentrytype{book}{%
      \addtocategory{books}{\thefield{entrykey}}%
  }{}%
}
\let\footcite\footfullcite

% --- adding the bibliography

\begin{filecontents}{main.bib}
   %books
   @book{menger1,
     author = {Menger, C.},
     title = {Grunds{\"a}tze der Volkswirtschaftslehre},
     publisher = {Braum{\"u}ller},
     location = {Wenen},
     year = {1982}
   }
   %spoken
   @misc{shrem3,
     author = "Shrem, C.",
     month = jan,
     year = "2014",
     howpublished = "Webwinkel Vakdagen"
   }

   @misc{wences1,
     author = "Casares, W.",
     title = "Getting to a Billion Bitcoin Users",
     month = may,
     year = "2014",
     howpublished = "Bitcoin2014 congres"
   }

   %websites
   @misc{guardian3,
     author = {{The Guardian}},
     title = {Cyprus banks remain closed to prevent run on deposits},
     url = "http://www.theguardian.com/world/2013/mar/26/cyprus-banks-closed-prevent-run-deposits",
     year = "2010",
     urldate = "2014-11-15"
   }

   @misc{paper1,
     author = {Nakamoto, S.},
     title = {Bitcoin: A Peer-to-Peer Electronic Cash System},
     url = "http://bitcoin.org/bitcoin.pdf",
     year = "2009",
     urldate = "2015-02-16"
   }
   % nodate variants
   %books
   @book{menger1nd,
     author = {Menger, C.},
     title = {Grunds{\"a}tze der Volkswirtschaftslehre},
     publisher = {Braum{\"u}ller},
     location = {Wenen},
   }
   %spoken
   @misc{shrem3nd,
     author = "Shrem, C.",
     title = "",
     month = jan,
     howpublished = "Webwinkel Vakdagen"
   }
   @misc{wences1nd,
     author = "Casares, W.",
     title = "Getting to a Billion Bitcoin Users",
     howpublished = "Bitcoin2014 congres"
   }
   %websites
   @misc{guardian3nd,
     author = {{The Guardian}},
     title = {Cyprus banks remain closed to prevent run on deposits},
     url = "http://www.theguardian.com/world/2013/mar/26/cyprus-banks-closed-prevent-run-deposits",
     urldate = "2014-11-15"
   }
   @misc{paper1nd,
     author = {Nakamoto, S.},
     title = {Bitcoin: A Peer-to-Peer Electronic Cash System},
     url = "http://bitcoin.org/bitcoin.pdf",
     urldate = "2015-02-16"
   }
\end{filecontents}

\addbibresource{main.bib}

\begin{document}

   With year:
   a\footcite{menger1} b\footcite{shrem3} c\footcite{guardian3} d\footcite{paper1} e\footcite{wences1}

   Without year:
   a\footcite{menger1nd} b\footcite{shrem3nd} c\footcite{guardian3nd} d\footcite{paper1nd} e\footcite{wences1nd}

   \chapter*{Literatuurlijst}
   \addcontentsline{toc}{chapter}{Literatuurlijst}

   \section*{Boeken}
   \printbibliography[category=books,heading=none]

   \section*{Online artikelen}
   \printbibliography[category=websites,heading=none]

   \section*{Conferenties}
   \printbibliography[category=spoken,heading=none]

\end{document}

And the output:

enter image description here

DG'
  • 21,727
  • When I run your example, I don't get the z.d. notes but (nodate). I would like to check for a year in the bib file, if not then add the z.d. instead of adding zd to all cites.

    It also gives me Guardian, T. instead of The Guardian. I would like to use the name of the online articles I use in the bib file. Books and spoken are okay now.

    – Scripter Mar 04 '15 at 21:40
  • The online articles are shown with TITLE, verkregen DATE, van URL. I would like to change that to TITLE. Geraadpleegd op DATE, URL. – Scripter Mar 04 '15 at 21:44
  • When I run your example, z.d. isn't given either. I use the online editor overleaf.com – Scripter Mar 05 '15 at 10:57
  • MikTex does the same. May it be possible to change thuis With another piece of code or package? – Scripter Mar 05 '15 at 12:55
  • Just updated all my installed packages. MikTeX 2.9 even doesn't recognize all cites (name as footnote). I run pdfLaTeX+MakeIndex+BibTeX.

    Overleaf does it right but gives nodate. I added z.d. as year manually, this solved the problem. But automatic z.d. would be better.

    – Scripter Mar 05 '15 at 16:54
  • 2
    @RemcoSwienink You will have to run Biber instead of BibTeX, you can find out how to do that here. – moewe Mar 05 '15 at 17:01
  • Thanks again. But I see the pubcity isn't mentioned. Could you do that? – Scripter Mar 06 '15 at 12:32
  • 1
    pubcity is not a valid biblatex field. You have to use location instead. The biblatex manual has a list of valid fields and other useful information. – DG' Mar 06 '15 at 14:30
  • I see. But Wenen: isn't showed in my output. – Scripter Mar 06 '15 at 14:56