von domwass » Mi 15. Dez 2010, 08:51
Daranus hat geschrieben:was an dem code hin zum Muster hier also nicht funktioniert ist das author und das year (es geht da scheinbar nur title?!?!...denn title konnte man so fett schreiben, year und author aber nicht).
Das liegt daran, dass sowohl Name als auch Datum (denn das Jahr ist für
biblatex nur ein Teil des Datums) in mehrere Einzelteile zerlegt werden.
Und wenn das getan ist, muss ich es (scheinbar anhand eines drivers soweit ich das bisher verstanden habe) noch so umändern, dass er mir das jahr 2 mal anzeigt.
authoryear verändert dazu einige Makros, um das Jahr nur einmal, am
Anfang, auszugeben (das halte ich auch für sinnvoll – wozu braucht man das
Jahr zweimal?). Ich habe im Minimalbeispiel unten einfach die bibmacros aus
biblatex.def wieder hineinkopiert (mit \renewbibmacro statt \newbibmacro),
dann hast du das Jahr zweimal.
\documentclass[ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel,csquotes}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Musti,
author = {Musti, Max},
date = {1985},
title = {Nikomachische Ethik},
editor = {Günther Bien},
translator = {Franz Xaver},
location = {Hamburg},
edition = {4},
}
@collection{Bien,
editor = {Günther Bien},
date = {1985},
title = {Ethik},
location = {Dortmund},
}
@incollection{Biene,
author = {Biene Maja},
editor = {Günther Bien},
date = {1985},
title = {Honik},
booktitle = {Ethik},
location = {Dortmund},
}
\end{filecontents}
\usepackage[
style = authoryear,
maxnames = 2, % bei mehr als zwei Namen: et al.
natbib = true, % zur Verwendung der alten Befehle
firstinits = true, % Abkürzung des Vornamens auf ersten Buchstaben
%terseinits = true, % Punkt hinter abgekürztem Vornamen weg
sortcites = true % sortiert die Zahlen im Zitat der Reihenfolge
]{biblatex}
% Autor, Herausgeber und Übersetzer fett
\renewbibmacro*{author}{%
\ifboolexpr{
test \ifuseauthor
and
not test {\ifnameundef{author}}
}
{\usebibmacro{bbx:dashcheck}
{\printtext[bold]{{\bibnamedash}}}% <--- geändert
{\usebibmacro{bbx:savehash}%
\printtext[bold]{\printnames{author}}% <--- geändert
\iffieldundef{authortype}
{\setunit{\addspace}}
{\setunit{\addcomma\space}}}%
\iffieldundef{authortype}
{}
{\usebibmacro{authorstrg}%
\setunit{\addspace}}}%
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
\setunit*{\addspace}}%
\usebibmacro{date+extrayear}}
\renewbibmacro*{bbx:editor}[1]{%
\ifboolexpr{
test \ifuseeditor
and
not test {\ifnameundef{editor}}
}
{\usebibmacro{bbx:dashcheck}
{\printtext[bold]{\bibnamedash}}% <--- geändert
{\printtext[bold]{\printnames{editor}}% <--- geändert
\setunit{\addcomma\space}%
\usebibmacro{bbx:savehash}}%
\usebibmacro{#1}%
\clearname{editor}%
\setunit{\addspace}}%
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
\setunit*{\addspace}}%
\usebibmacro{date+extrayear}}
\renewbibmacro*{bbx:translator}[1]{%
\ifboolexpr{
test \ifusetranslator
and
not test {\ifnameundef{translator}}
}
{\usebibmacro{bbx:dashcheck}
{\printtext[bold]{\bibnamedash}}% <--- geändert
{\printtext[bold]{\printnames{translator}}% <--- geändert
\setunit{\addcomma\space}%
\usebibmacro{bbx:savehash}}%
\usebibmacro{translator+othersstrg}%
\clearname{translator}%
\setunit{\addspace}}%
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
\setunit*{\addspace}}%
\usebibmacro{date+extrayear}}
% Jahr fett
\renewbibmacro*{date+extrayear}{%
\iffieldundef{year}
{}
{\printtext[bold]{\printtext[parens]{\printdateextra}}}}% <--- geändert
% Jahr auch am Ende des Eintrags ausgeben
\renewbibmacro*{publisher+location+date}{%
\printlist{location}%
\iflistundef{publisher}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
\renewbibmacro*{institution+location+date}{%
\printlist{location}%
\iflistundef{institution}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
\printlist{institution}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
\renewbibmacro*{organization+location+date}{%
\printlist{location}%
\iflistundef{organization}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
\printlist{organization}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
\renewbibmacro*{location+date}{%
\printlist{location}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
\renewbibmacro*{date}{\printdate}
\bibliography{\jobname}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
Gruß,
Dominik.-
[quote="Daranus"]was an dem code hin zum Muster hier also nicht funktioniert ist das author und das year (es geht da scheinbar nur title?!?!...denn title konnte man so fett schreiben, year und author aber nicht).[/quote]
Das liegt daran, dass sowohl Name als auch Datum (denn das Jahr ist für
biblatex nur ein Teil des Datums) in mehrere Einzelteile zerlegt werden.
[quote]Und wenn das getan ist, muss ich es (scheinbar anhand eines drivers soweit ich das bisher verstanden habe) noch so umändern, dass er mir das jahr 2 mal anzeigt.[/quote]
authoryear verändert dazu einige Makros, um das Jahr nur einmal, am
Anfang, auszugeben (das halte ich auch für sinnvoll – wozu braucht man das
Jahr zweimal?). Ich habe im Minimalbeispiel unten einfach die bibmacros aus
biblatex.def wieder hineinkopiert (mit \renewbibmacro statt \newbibmacro),
dann hast du das Jahr zweimal.
[code]\documentclass[ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel,csquotes}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Musti,
author = {Musti, Max},
date = {1985},
title = {Nikomachische Ethik},
editor = {Günther Bien},
translator = {Franz Xaver},
location = {Hamburg},
edition = {4},
}
@collection{Bien,
editor = {Günther Bien},
date = {1985},
title = {Ethik},
location = {Dortmund},
}
@incollection{Biene,
author = {Biene Maja},
editor = {Günther Bien},
date = {1985},
title = {Honik},
booktitle = {Ethik},
location = {Dortmund},
}
\end{filecontents}
\usepackage[
style = authoryear,
maxnames = 2, % bei mehr als zwei Namen: et al.
natbib = true, % zur Verwendung der alten Befehle
firstinits = true, % Abkürzung des Vornamens auf ersten Buchstaben
%terseinits = true, % Punkt hinter abgekürztem Vornamen weg
sortcites = true % sortiert die Zahlen im Zitat der Reihenfolge
]{biblatex}
% Autor, Herausgeber und Übersetzer fett
\renewbibmacro*{author}{%
\ifboolexpr{
test \ifuseauthor
and
not test {\ifnameundef{author}}
}
{\usebibmacro{bbx:dashcheck}
{\printtext[bold]{{\bibnamedash}}}% <--- geändert
{\usebibmacro{bbx:savehash}%
\printtext[bold]{\printnames{author}}% <--- geändert
\iffieldundef{authortype}
{\setunit{\addspace}}
{\setunit{\addcomma\space}}}%
\iffieldundef{authortype}
{}
{\usebibmacro{authorstrg}%
\setunit{\addspace}}}%
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
\setunit*{\addspace}}%
\usebibmacro{date+extrayear}}
\renewbibmacro*{bbx:editor}[1]{%
\ifboolexpr{
test \ifuseeditor
and
not test {\ifnameundef{editor}}
}
{\usebibmacro{bbx:dashcheck}
{\printtext[bold]{\bibnamedash}}% <--- geändert
{\printtext[bold]{\printnames{editor}}% <--- geändert
\setunit{\addcomma\space}%
\usebibmacro{bbx:savehash}}%
\usebibmacro{#1}%
\clearname{editor}%
\setunit{\addspace}}%
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
\setunit*{\addspace}}%
\usebibmacro{date+extrayear}}
\renewbibmacro*{bbx:translator}[1]{%
\ifboolexpr{
test \ifusetranslator
and
not test {\ifnameundef{translator}}
}
{\usebibmacro{bbx:dashcheck}
{\printtext[bold]{\bibnamedash}}% <--- geändert
{\printtext[bold]{\printnames{translator}}% <--- geändert
\setunit{\addcomma\space}%
\usebibmacro{bbx:savehash}}%
\usebibmacro{translator+othersstrg}%
\clearname{translator}%
\setunit{\addspace}}%
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
\setunit*{\addspace}}%
\usebibmacro{date+extrayear}}
% Jahr fett
\renewbibmacro*{date+extrayear}{%
\iffieldundef{year}
{}
{\printtext[bold]{\printtext[parens]{\printdateextra}}}}% <--- geändert
% Jahr auch am Ende des Eintrags ausgeben
\renewbibmacro*{publisher+location+date}{%
\printlist{location}%
\iflistundef{publisher}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
\renewbibmacro*{institution+location+date}{%
\printlist{location}%
\iflistundef{institution}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
\printlist{institution}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
\renewbibmacro*{organization+location+date}{%
\printlist{location}%
\iflistundef{organization}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
\printlist{organization}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
\renewbibmacro*{location+date}{%
\printlist{location}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
\renewbibmacro*{date}{\printdate}
\bibliography{\jobname}
\begin{document}
\nocite{*}
\printbibliography
\end{document}[/code]
Gruß,
Dominik.-