von Gast » Sa 23. Dez 2017, 22:55
Man sollte sich vielleicht die Frage stellen, ab wann "leicht abgeänderter APA-Stil" eine hole Phrase wird. Warum muss jeder mit ein bisschen "Macht" an irgendwelchen Zitierstilen irgendwelche Anpassungen fordern?
Wie dem auch sei. Mir scheint für den Beispieleintrag @incollection klüger als @inbook ohne, dass ich das jetzt groß nachgeprüft hätte - oder dass es eine große Rolle spielen würde.
Leider kommen wir diesmal nicht damit weg, zwei Makros umzudefinieren. Es muss etwas mehr sein. Dazu nehmen wir
xpatch zur Hilfe, dann können wir die Driver/Makros direkt umdefinieren, ohne ihre ganze Definition wiederholen zu müssen.
\documentclass[a4paper, 12pt]{scrartcl}
\usepackage[a4paper]{geometry}
\geometry{left=4cm, right=3cm, top=2.5cm, bottom=2.5cm}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[backend=biber, style=authoryear-comp,bibstyle=apa]{biblatex}
\DeclareLanguageMapping{ngerman}{ngerman-apa}
\usepackage[babel,german=guillemets]{csquotes}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@incollection{test,
author = {Felix Rauner},
title = {Die Bedeutung der Berufsbildung beim Übergang von der Schule in die Arbeitswelt},
booktitle = {Perspektiven gewerblich-technischer Erstausbildung},
editor = {Pahl, J.-P.},
date = {1996},
edition = {1},
publisher = {Kallmeyersche},
location = {Seelze-Velber},
pages = {25-40}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\renewcommand{\labelnamepunct}{\addcolon\space}
\renewcommand{\intitlepunct}{\addcolon\space}
\DeclareNameFormat{apanames}{%
\ifthenelse{\value{listcount}=\maxprtauth\AND\value{listcount}<\value{listtotal}}
{\addcomma\addspace\ldots}
{\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{listtotal}}
{}
{\usebibmacro{name:apa:family-given}%
{\namepartfamily}%
{\namepartgiven}%
{\namepartgiveni}%
{\namepartprefix}%
{\namepartsuffix}}}%
\ifthenelse{\value{listcount}=\value{listtotal}}%
{\ifmorenames{\printdelim{andothersdelim}\bibstring{andothers}}{}}{}}
\renewbibmacro*{in}{%
\ifbool{bbx:in}%
{}%
{\global\booltrue{bbx:in}%
\bibcpstring{in}\setunit{\intitlepunct}}}
\usepackage{xpatch}
\xpatchbibdriver{inbook}
{\usebibmacro{editor+trans}%
\newblock}
{\usebibmacro{editor+trans}%
\setunit*{\labelnamepunct}\newblock}
{}{}
\xpatchbibdriver{incollection}
{\usebibmacro{editor+trans}%
\setunit*{\addcomma\addspace}\newblock}
{\usebibmacro{editor+trans}%
\setunit*{\labelnamepunct}\newblock}
{}{}
\xpatchbibdriver{inproceedings}
{\usebibmacro{editor+trans}%
\setunit*{\addcomma\addspace}\newblock}
{\usebibmacro{editor+trans}%
\setunit*{\labelnamepunct}\newblock}
{}{}
\renewbibmacro*{bookaddinfo}{%
\newunit\newblock
\printfield{edition}%
\setunit*{\addcomma\addspace}%
\printfield{volumes}}
%keine Klammern um Auflage:
\renewbibmacro*{addinfo}{%
\newunit\newblock
\printfield{edition}%
\setunit*{\addcomma\addspace}%
\printfield{chapter}%
\setunit*{\addcomma\addspace}%
\notbool{bbx:volseen}%
{\iffieldundef{volume}{}{\global\booltrue{bbx:volseen}}%
\printfield{volume}%
\iffieldundef{part}{}{\printfield{part}}}{}%
\setunit*{\addcomma\addspace}%
\printfield{number}%
\setunit*{\addcomma\addspace}%
\printfield{volumes}%
\newunit}
\xpatchbibdriver{inbook}
{\usebibmacro{location+publisher}%
\newunit\newblock}
{\usebibmacro{location+publisher}%
\setunit{\addcomma\space}%
\printfield{pages}%
\newunit\newblock}
{}{}
\xpatchbibdriver{incollection}
{\usebibmacro{location+publisher}%
\newunit\newblock}
{\usebibmacro{location+publisher}%
\setunit{\addcomma\space}%
\printfield{pages}%
\newunit\newblock}
{}{}
\xpatchbibdriver{inproceedings}
{\usebibmacro{location+publisher}%
\newunit\newblock}
{\usebibmacro{location+publisher}%
\setunit{\addcomma\space}%
\printfield{pages}%
\newunit\newblock}
{}{}
\begin{document}
Wie in der Literatur \autocite[30]{test}
\printbibliography
\end{document}
Man sollte sich vielleicht die Frage stellen, ab wann "leicht abgeänderter APA-Stil" eine hole Phrase wird. Warum muss jeder mit ein bisschen "Macht" an irgendwelchen Zitierstilen irgendwelche Anpassungen fordern?
Wie dem auch sei. Mir scheint für den Beispieleintrag [tt]@incollection[/tt] klüger als [tt]@inbook[/tt] ohne, dass ich das jetzt groß nachgeprüft hätte - oder dass es eine große Rolle spielen würde.
Leider kommen wir diesmal nicht damit weg, zwei Makros umzudefinieren. Es muss etwas mehr sein. Dazu nehmen wir [p]xpatch[/p] zur Hilfe, dann können wir die Driver/Makros direkt umdefinieren, ohne ihre ganze Definition wiederholen zu müssen.
[code]\documentclass[a4paper, 12pt]{scrartcl}
\usepackage[a4paper]{geometry}
\geometry{left=4cm, right=3cm, top=2.5cm, bottom=2.5cm}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[backend=biber, style=authoryear-comp,bibstyle=apa]{biblatex}
\DeclareLanguageMapping{ngerman}{ngerman-apa}
\usepackage[babel,german=guillemets]{csquotes}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@incollection{test,
author = {Felix Rauner},
title = {Die Bedeutung der Berufsbildung beim Übergang von der Schule in die Arbeitswelt},
booktitle = {Perspektiven gewerblich-technischer Erstausbildung},
editor = {Pahl, J.-P.},
date = {1996},
edition = {1},
publisher = {Kallmeyersche},
location = {Seelze-Velber},
pages = {25-40}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\renewcommand{\labelnamepunct}{\addcolon\space}
\renewcommand{\intitlepunct}{\addcolon\space}
\DeclareNameFormat{apanames}{%
\ifthenelse{\value{listcount}=\maxprtauth\AND\value{listcount}<\value{listtotal}}
{\addcomma\addspace\ldots}
{\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{listtotal}}
{}
{\usebibmacro{name:apa:family-given}%
{\namepartfamily}%
{\namepartgiven}%
{\namepartgiveni}%
{\namepartprefix}%
{\namepartsuffix}}}%
\ifthenelse{\value{listcount}=\value{listtotal}}%
{\ifmorenames{\printdelim{andothersdelim}\bibstring{andothers}}{}}{}}
\renewbibmacro*{in}{%
\ifbool{bbx:in}%
{}%
{\global\booltrue{bbx:in}%
\bibcpstring{in}\setunit{\intitlepunct}}}
\usepackage{xpatch}
\xpatchbibdriver{inbook}
{\usebibmacro{editor+trans}%
\newblock}
{\usebibmacro{editor+trans}%
\setunit*{\labelnamepunct}\newblock}
{}{}
\xpatchbibdriver{incollection}
{\usebibmacro{editor+trans}%
\setunit*{\addcomma\addspace}\newblock}
{\usebibmacro{editor+trans}%
\setunit*{\labelnamepunct}\newblock}
{}{}
\xpatchbibdriver{inproceedings}
{\usebibmacro{editor+trans}%
\setunit*{\addcomma\addspace}\newblock}
{\usebibmacro{editor+trans}%
\setunit*{\labelnamepunct}\newblock}
{}{}
\renewbibmacro*{bookaddinfo}{%
\newunit\newblock
\printfield{edition}%
\setunit*{\addcomma\addspace}%
\printfield{volumes}}
%keine Klammern um Auflage:
\renewbibmacro*{addinfo}{%
\newunit\newblock
\printfield{edition}%
\setunit*{\addcomma\addspace}%
\printfield{chapter}%
\setunit*{\addcomma\addspace}%
\notbool{bbx:volseen}%
{\iffieldundef{volume}{}{\global\booltrue{bbx:volseen}}%
\printfield{volume}%
\iffieldundef{part}{}{\printfield{part}}}{}%
\setunit*{\addcomma\addspace}%
\printfield{number}%
\setunit*{\addcomma\addspace}%
\printfield{volumes}%
\newunit}
\xpatchbibdriver{inbook}
{\usebibmacro{location+publisher}%
\newunit\newblock}
{\usebibmacro{location+publisher}%
\setunit{\addcomma\space}%
\printfield{pages}%
\newunit\newblock}
{}{}
\xpatchbibdriver{incollection}
{\usebibmacro{location+publisher}%
\newunit\newblock}
{\usebibmacro{location+publisher}%
\setunit{\addcomma\space}%
\printfield{pages}%
\newunit\newblock}
{}{}
\xpatchbibdriver{inproceedings}
{\usebibmacro{location+publisher}%
\newunit\newblock}
{\usebibmacro{location+publisher}%
\setunit{\addcomma\space}%
\printfield{pages}%
\newunit\newblock}
{}{}
\begin{document}
Wie in der Literatur \autocite[30]{test}
\printbibliography
\end{document}[/code]