2

I want to include the website title in my bibliography. In the bibtex file (created by Zotero) the website title is stored as journal.

\RequirePackage{filecontents}

\begin{filecontents*}{mybib.bib}
@book{test1,
    address = {London},
    url = {www.jstor.com/somearticle.html},
    urldate = {2013-10-29},
    title = {Cyberprotest: {New} media, citizens, and social movements},
    publisher = {Routledge},
    editor = {van de Donk, Wim B. H. J.},
    year = {2004}
}
@misc{test2,
    title = {This is the title of the webpage},
    url = {www.blog.com},
    urldate = {2013-08-29},
    journal = {This is the title of the website},
    month = feb,
    year = {2009}
}
}
\end{filecontents*}

\documentclass[a4paper]{article}


% Set the values for the bibliography
\usepackage[
    style=apa,
    backend=biber,
    isbn=false,
    url=false,
    doi=false,
    eprint=false,
    hyperref=true,
    backref=false,
    firstinits=false,
]{biblatex}

% Remove series & month
\AtEveryBibitem{
  \clearfield{series}
  \clearfield{labelmonth}
  \clearfield{edition}
}

% Set language
\usepackage[british]{babel}
\DeclareLanguageMapping{british}{british-apa}

\addbibresource{mybib.bib}

\begin{document}

\cite{test1} 

\cite{test2}

\printbibliography
\end{document}

which produces

enter image description here

  • Just a note, if you do not use any of xpatch's commands (\xpatch..., \xappto.. and the like; you do not seem to use it in this MWE, but I cannot be not sure about your actual document), there is no point in loading it. – moewe Apr 20 '14 at 4:51
  • Now to your problem: This is clearly a misuse of the journal entry by Zotero, and as such should probably be dealt with at a Zotero-level (i.e. make sure that the entry is not exported in this particular manner; I'm sure there are a lot of options to control exporting to .bib files). This issue brings to light another problem though: Neither @misc nor @online (I would have argued that @online is the more appropriate entry type here) support the maintitle field or anything else that would work as the "website title". – moewe Apr 20 '14 at 5:01
  • A work-around would be to put the website title into title and the page title into subtitle (this will yield unsatisfying in-text citations though). Or you could use the titleaddon field for the website name. A last option is to not display the website title at all, also a viable option (in the few cases I had to cite actual webpages [make sure there is not floating around another document you could cite, a journal article or a techreport or the like], most of them did not have a website title that was worthwhile to be included). – moewe Apr 20 '14 at 5:05
  • @moewe Actually I need to cite an article of the online Stanford Encyclopedia of Philosophy (here the link to their citation instructions: plato.stanford.edu/cite.html). The the title of the website seems quite relevant. – Francesco Apr 20 '14 at 5:27
  • 1
    The website actually suggests @incollection (see Author and Citation Information for "Classical Logic"), @inreference is actually just a special alias for @incollection, the biblatex standard styles treat both types the same (AFAIK). – moewe Apr 20 '14 at 5:41
3

We can add support for the maintitle field in @online and @misc using the amazing xpatch package as easily as

\xpatchbibdriver{misc}
  {\usebibmacro{title}}
  {\usebibmacro{title}%
   \newunit\newblock
   \usebibmacro{maintitle}}
  {}{}

\xpatchbibdriver{online}
  {\usebibmacro{title}}
  {\usebibmacro{title}%
   \newunit\newblock
   \usebibmacro{maintitle}}
  {}{}

This will add the maintitle after the title.


In your special case though since you want to cite the SEP, you should probably go with the suggestions on their website (see Author and Citation Information for "Classical Logic" for example): use @incollection.

@incollection{sep-set-theory,
  author       = {Jech, Thomas},
  title        = {Set Theory},
  booktitle    = {The Stanford Encyclopedia of Philosophy},
  editor       = {Edward N. Zalta},
  url          = {http://plato.stanford.edu/archives/win2011/entries/set-theory/},
  urldate      = {2014-04-23},
  year         = {2011},
  edition      = {Winter 2011},
}

MWE

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@collection{cybeprotest,
  editor    = {van de Donk, Wim and Brian D. Loader and Paul G. Nixon and Dieter Rucht},
  title     = {Cyberprotest},
  subtitle  = {New Media, Citizens and Social Movements},
  publisher = {Routledge},
  address   = {location},
  date      = {2004},
  url       = {www.jstor.com/somearticle.html},
  urldate   = {2013-10-29},
  isbn      = {978-0-415-29784-4},
}
@online{web,
  title     = {This is the title of the webpage},
  maintitle = {This is the title of the website},
  date      = {2009-02},
  url       = {http://www.example.com},
  urldate   = {2013-08-29},
}
@incollection{sep-set-theory,
  author       = {Jech, Thomas},
  title        = {Set Theory},
  booktitle    = {The Stanford Encyclopedia of Philosophy},
  editor       = {Edward N. Zalta},
  url          = {http://plato.stanford.edu/archives/win2011/entries/set-theory/},
  urldate      = {2014-04-23},
  year         = {2011},
  edition      = {Winter 2011},
}
\end{filecontents*}
\documentclass[british]{article}
\usepackage[
    style=apa,
    backend=biber,
    firstinits=false,
]{biblatex}
\AtEveryBibitem{
  \clearfield{series}
  \clearfield{labelmonth}
  \clearfield{edition}
}
\usepackage{babel}
\usepackage{xpatch}
\DeclareLanguageMapping{british}{british-apa}
\usepackage[british]{hyperref}

\addbibresource{\jobname.bib}

\xpatchbibdriver{misc}
  {\usebibmacro{title}}
  {\usebibmacro{title}%
   \newunit\newblock
   \usebibmacro{maintitle}}
  {}{}

\xpatchbibdriver{online}
  {\usebibmacro{title}}
  {\usebibmacro{title}%
   \newunit\newblock
   \usebibmacro{maintitle}}
  {}{}

\begin{document}
  \nocite{*}
  \printbibliography
\end{document}

enter image description here

| improve this answer | |

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.