For citations as in C, you could write \parencite[Kap.~4]{testart}
or \parencite[5]{testart}
(see examples below).
Note that you should use the citation macros with curly braces, so use \cite{MeierMüller2003}
not \cite MeierMüller2003
.
To change the andothers
string from u. a
to et al.
, you need to edit the localisation strings. Just put the following two lines after \DeclareLanguageMapping{ngerman}{ngerman-apa}
in your document.
\DefineBibliographyStrings{ngerman}{%
andothers ={et\addabbrvspace al\adddot},
andmore ={et\addabbrvspace al\adddot},
}
Alternatively, you can create a file with the following content and save it under ngerman-apaed.lbx
in the directory your .tex
document is located.
\ProvidesFile{ngerman-apaed.lbx}
\InheritBibliographyExtras{ngerman-apa}% extras are inherited from ngerman ...
\DeclareBibliographyStrings{%
inherit = {ngerman-apa},% .... as well as all the keys
andothers = {{et\addabbrvspace al\adddot}{et\addabbrvspace al\adddot}},
andmore = {{et\addabbrvspace al\adddot}{et\addabbrvspace al\adddot}},
}
You then modify the line \DeclareLanguageMapping{ngerman}{ngerman-apa}
to \DeclareLanguageMapping{ngerman}{ngerman-apaed}
.
MWE
\documentclass[ngerman, a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\addbibresource{\jobname.bib}
\DeclareLanguageMapping{ngerman}{ngerman-apa}
\DefineBibliographyStrings{ngerman}{%
andothers ={et\addabbrvspace al\adddot},
andmore ={et\addabbrvspace al\adddot},
}
\begin{filecontents}{\jobname.bib}
@article{testartlong,
author = {Arnold Uthor and William Riter and Rita Esearcher and Steven C. Ientist and Stuart Udent and Peter R. Ofessor and Lewis E. C. Turer},
title = {A Very Interesting Article},
journal = {Journal of Articles},
volume = {8},
number = {2},
page = {1-5},
date = {2010},
}
@article{testart,
author = {Arnold Uthor and William Riter},
title = {A Very Interesting Article},
journal = {Journal of Articles},
volume = {7},
number = {3},
page = {1-5},
date = {2010},
}
@book{testbook,
author = {Walter Ordsmith},
editor = {Eddie Ditor},
title = {The Work},
subtitle = {Subtitle},
date = {1983},
}
@online{testonline,
author = {Bernie Logger},
title = {A Very Opinionated Blog Post},
url = {http://example.com},
year = {2013},
}
\end{filecontents}
\begin{document}
\begin{tabular}{rl}
\verb|\cite{testart}| & \cite{testart}\\
\verb|\textcite{testart}| & \textcite{testart}\\
\verb|\parencite{testart}| & \parencite{testart}\\
\verb|\parencite[Kap.~4]{testart}| & \parencite[Kap.~4]{testart}\\
\verb|\parencite[15]{testart}| & \parencite[15]{testart}
\end{tabular}
\parencite{testartlong} and \parencite[5]{testbook}
\nocite{*}
\printbibliography
\end{document}
Edit
For multiple citations within one pair of parentheses use \parencites
or \parencite
.
\parencites(Herzkreislauf;)()[34]{testartlong}[Kap.~4]{testbook}
yields (Herzkreislauf; Uthor et al., 2010, S. 34; Ordsmith, 1983, Kap. 4)
; \parencites[Pre][Post]{testartlong,testbook}
gives us (Pre Ordsmith, 1983; Uthor et al., 2010, Post)
.
See also sections 3.7 to 3.7.6 of the BibLaTeX documentation
By default, biblatex
does not seem to support a supervisor, so some changes have to be made, but we can keep these changes to a minimum.
Firstly, we define the new name list supervisor
via a new datamodel (thesis.dbx
)
\ProvidesFile{thesis.dbx}[2014/06/14 supervisor for theses]
\RequireBiber[3]
\DeclareDatamodelFields[type=list,datatype=name]{supervisor}
\DeclareDatamodelEntryfields[thesis]{supervisor}
Save the lines above in a file called thesis.dbx
and put it somewhere LaTeX can find it.
In the MWE below, this is done automatically via filecontents
.
The datamodel needs to be loaded via the datamodel
option (datamodel=thesis
, e.g. \usepackage[style=authoryear,backend=biber,datamodel=thesis]{biblatex}
).
Secondly, we need to declare the new strings you asked for in an .lbx
file (the file should be called english-thesis.lbx
)
\ProvidesFile{english-thesis.lbx}[2014/06/14 english for thesis]
\InheritBibliographyExtras{english}
\NewBibliographyString{supervision,jointsupervision}
\DeclareBibliographyStrings{%
inherit = {english},
supervision = {{under the supervision of}{under sup\adddotspace of}},
jointsupervision = {{under the joint supervision of}{under joint sup\adddotspace of}},
}
Make sure to save the file somewhere LaTeX can find it (as above: in the MWE below, the file is created with filecontents
).
We then employ this language variant via \DeclareLanguageMapping{english}{english-thesis}
.
Finally, we define a new bibmacro
\newbibmacro*{thesissupervisor}{%
\ifnameundef{supervisor}{}{%
\ifnumgreater{\value{supervisor}}{1}
{\bibstring{jointsupervision}}
{\bibstring{supervision}}
\printnames{supervisor}}}
that prints the supervisor and the introducing string depending on the number of supervisors.
We then patch the @thesis
driver to use our new macro (that is done with the awesome xpatch
package).
\xpatchbibdriver{thesis}
{\printfield{type}}
{\printfield{type}
\newunit
\usebibmacro{thesissupervisor}}
{\typeout{yep}}
{\typeout{no}}
The supervisor is now simply added to the supervisor
field like so
@thesis{geer,
author = {de Geer, Ingrid},
title = {Earl, Saint, Bishop, Skald~-- and Music},
type = {phdthesis},
institution = {Uppsala Universitet},
date = 1985,
subtitle = {The Orkney Earldom of the Twelfth Century. A Musicological
Study},
location = {Uppsala},
supervisor = {James Oint and Stan Upervisor},
}
MWE
\documentclass[british,12pt,a4paper]{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@thesis{geer,
author = {de Geer, Ingrid},
title = {Earl, Saint, Bishop, Skald~-- and Music},
type = {phdthesis},
institution = {Uppsala Universitet},
date = 1985,
subtitle = {The Orkney Earldom of the Twelfth Century. A Musicological
Study},
location = {Uppsala},
supervisor = {James Oint and Stan Upervisor},
}
@thesis{loh,
author = {Loh, Nin C.},
title = {High-Resolution Micromachined Interferometric Accelerometer},
type = {mathesis},
institution = {Massachusetts Institute of Technology},
date = 1992,
location = {Cambridge, Mass.},
supervisor = {Stan Upervisor},
}
\end{filecontents*}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{xpatch}
\usepackage[style=authoryear,backend=biber,datamodel=thesis]{biblatex}
\usepackage{hyperref}
\begin{filecontents*}{thesis.dbx}
\ProvidesFile{thesis.dbx}[2014/06/14 supervisor for theses]
\RequireBiber[3]
\DeclareDatamodelFields[type=list,datatype=name]{supervisor}
\DeclareDatamodelEntryfields[thesis]{supervisor}
\end{filecontents*}
\begin{filecontents*}{english-thesis.lbx}
\ProvidesFile{english-thesis.lbx}[2014/06/14 english for thesis]
\InheritBibliographyExtras{english}
\NewBibliographyString{supervision,jointsupervision}
\DeclareBibliographyStrings{%
inherit = {english},
supervision = {{under the supervision of}{under sup\adddotspace of}},
jointsupervision = {{under the joint supervision of}{under joint sup\adddotspace of}},
}
\end{filecontents*}
\DeclareLanguageMapping{english}{english-thesis}
\newbibmacro*{thesissupervisor}{%
\ifnameundef{supervisor}{}{%
\ifnumgreater{\value{supervisor}}{1}
{\bibstring{jointsupervision}}
{\bibstring{supervision}}
\printnames{supervisor}}}
\xpatchbibdriver{thesis}
{\printfield{type}}
{\printfield{type}
\newunit
\usebibmacro{thesissupervisor}}
{\typeout{yep}}
{\typeout{no}}
\addbibresource{\jobname.bib}
\nocite{*}
\begin{document}
\printbibliography
\end{document}
If you cannot create the new name list supervisor
, you could try and abuse the editor
field, then there is no need for the .dbx
file.
This solution should work with BibTeX as well.
The macros thesissupervisor
becomes
\newbibmacro*{thesissupervisor}{%
\ifnameundef{editor}{}{%
\ifnumgreater{\value{editor}}{1}
{\bibstring{jointsupervision}}
{\bibstring{supervision}}
\printnames{editor}}}
You then give the supervisor in the editor
field in the bib entry like so
@thesis{geer,
author = {de Geer, Ingrid},
title = {Earl, Saint, Bishop, Skald~-- and Music},
type = {phdthesis},
institution = {Uppsala Universitet},
date = 1985,
subtitle = {The Orkney Earldom of the Twelfth Century. A Musicological
Study},
location = {Uppsala},
editor = {James Oint and Stan Upervisor},
}
MWE
\documentclass[british,12pt,a4paper]{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@thesis{geer,
author = {de Geer, Ingrid},
title = {Earl, Saint, Bishop, Skald~-- and Music},
type = {phdthesis},
institution = {Uppsala Universitet},
date = 1985,
subtitle = {The Orkney Earldom of the Twelfth Century. A Musicological
Study},
location = {Uppsala},
editor = {James Oint and Stan Upervisor},
}
@thesis{loh,
author = {Loh, Nin C.},
title = {High-Resolution Micromachined Interferometric Accelerometer},
type = {mathesis},
institution = {Massachusetts Institute of Technology},
date = 1992,
location = {Cambridge, Mass.},
editor = {Stan Upervisor},
}
\end{filecontents*}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{xpatch}
\usepackage[style=authoryear,backend=bibtex]{biblatex}
\usepackage{hyperref}
\begin{filecontents*}{english-thesis.lbx}
\ProvidesFile{english-thesis.lbx}[2014/06/14 english for thesis]
\InheritBibliographyExtras{english}
\NewBibliographyString{supervision,jointsupervision}
\DeclareBibliographyStrings{%
inherit = {english},
supervision = {{under the supervision of}{under sup\adddotspace of}},
jointsupervision = {{under the joint supervision of}{under joint sup\adddotspace of}},
}
\end{filecontents*}
\DeclareLanguageMapping{english}{english-thesis}
\newbibmacro*{thesissupervisor}{%
\ifnameundef{editor}{}{%
\ifnumgreater{\value{editor}}{1}
{\bibstring{jointsupervision}}
{\bibstring{supervision}}
\printnames{editor}}}
\xpatchbibdriver{thesis}
{\printfield{type}}
{\printfield{type}
\newunit
\usebibmacro{thesissupervisor}}
{\typeout{yep}}
{\typeout{no}}
\addbibresource{\jobname.bib}
\nocite{*}
\begin{document}
\printbibliography
\end{document}
Best Answer
Since we need to modify the citation commands, the solution depends on the style quite a lot and
biblatex-apa
's cite macros differ from the standard ones inauthortitle
quite a bit, this is why your attempt didn't work.It is probably easiest to modify the
cite
macro directly here (one could changecite:plabelyear+extrayear
but that could interfere with other commands)is a copy of the definition from
apa.cbx
with two lines added in towards the end.MWE