PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : biblatex:Separator am Ender der entries?



taugenix
22-08-2013, 17:46
Hi,
nutze eine alte Latex Vorlage aus dem Internet für mein Dokument und habe damit immer wieder Probleme bzgl. Bibliography. Die meisten konnte ich mit googles Hilfe in den Griff bekommen.

Die Vorlage ist sehr kompliziert und besteht aus 2 Dateien (eine *.cls und eine *.sty). Ich habe mal versucht, die relevanten Stellen herauszusuchen und in dem folgendem Codeblock zusammengefasst:

hgbthesis.cls:


...%hier stehen ca. 300 Zeilen Code,die ich niemandem zumuten will

%% ------------ biblatex -----------------------------------------

\usepackage{csquotes} % recommended for biblatex

\usepackage[style=numeric,backend=bibtex8,sorting=none,hyperre f]{biblatex}

%\usepackage[style=numeric-comp,backend=bibtex8]{biblatex}
%Note: biblatex with bibtex backend is frozen at version 1.7.
% do not use these:
%\usepackage[style=alphabetic]{biblatex}[2011/05/12]
%\usepackage[style=authoryear]{biblatex}[2011/05/12]
%\usepackage[style=ieee]{biblatex}[2011/05/12]
%\usepackage[style=nature]{biblatex}[2011/05/12]

\ExecuteBibliographyOptions{sortcites=true,defernu mbers=true,isbn=false,doi=false}

%% titles of reference section + 3 categories of references:
\newcommand{\@bibtitle}{Quellenverzeichnis}
\newcommand{\@bibtitleLiteratur}{Literatur}
\newcommand{\@bibtitleAvmedia}{Filme und audiovisuelle Medien}
\newcommand{\@bibtitleOnline}{Online-Quellen}

\ifthenelse{\equal{\hgb@MainLanguage}{english}}{%
\renewcommand{\@bibtitle}{References}
\renewcommand{\@bibtitleLiteratur}{Literature}
\renewcommand{\@bibtitleAvmedia}{Films and audio-visual media}
\renewcommand{\@bibtitleOnline}{Online sources}
}{}

\defbibfilter{literature}{
not ( type=movie or type=video or type=music or type=audio or
type=online or type=electronic or type=www or type=software )}

\defbibfilter{avmedia}{%
( type=movie or type=video or type=music or type=audio or type=software )}

\defbibfilter{online}{%
( type=online or type=electronic or type=www )}


\defbibheading{noheader}[]{} % 'none' should be defined but isn't

% German format in biblatex is flawed: it adds wrong spaces and prohibits
% line breaking within date strings. Corrected by Wilbur as follows.
% Taken from german.lbx: replaced \thinspace by breaking zero space \hskip0pt
\DefineBibliographyExtras{ngerman}{%
\def\mkbibdatelong#1#2#3{%
\iffieldundef{#3}
{\hskip0pt}
{\mkbibordinal{\thefield{#3}}%
\iffieldundef{#2}{}{\space}}% %was: \nobreakspace
\iffieldundef{#2}
{\hskip0pt}
{\mkbibmonth{\thefield{#2}}%
\iffieldundef{#1}{\hskip0pt}{\space}}%
\stripzeros{\thefield{#1}}}%
%
\def\mkbibdateshort#1#2#3{%
\iffieldundef{#3}
{\hskip0pt}
{\mkdatezeros{\thefield{#3}}\addcomma
\iffieldundef{#2}{}{\hskip0pt}}%
\iffieldundef{#2}
{\hskip0pt}
{\mkdatezeros{\thefield{#2}}%
\iffieldundef{#1}
{\hskip0pt}
{\iffieldundef{#3}{/}{\addcomma\hskip0pt}}}%
\mkdatezeros{\thefield{#1}}}%
}

% Similar problem with badly braking date strings in english.
% Taken from english.lbx: added breaking zero space \hskip0pt to /
\DefineBibliographyExtras{english}{%
\def\mkbibdatelong#1#2#3{%
\iffieldundef{#2}
{}
{\mkbibmonth{\thefield{#2}}%
\iffieldundef{#3}
{\iffieldundef{#1}{}{\space}}
{\space}}% %was: \nobreakspace
\iffieldundef{#3}
{}
{\stripzeros{\thefield{#3}}%
\iffieldundef{#1}{}{,\space}}%
\stripzeros{\thefield{#1}}}%
%
\def\mkbibdateshort#1#2#3{%
\iffieldundef{#2}
{}
{\mkdatezeros{\thefield{#2}}%
\iffieldundef{#3}
{\iffieldundef{#1}{}{/{\hskip0pt}}}
{/{\hskip0pt}}}%
\iffieldundef{#3}
{}
{\mkdatezeros{\thefield{#3}}%
\iffieldundef{#1}{}{/{\hskip0pt}}}%
\mkdatezeros{\thefield{#1}}}%
}


%This is only a wrapper to \addbibresource to allow the use
%of the classic bibtex-workflow in the future.
\newcommand{\AddBibFile}[1]{
\addbibresource{#1}%
}

%See http://www.jr-x.de/publikationen/latex/tipps/zeilenumbruch.html
\newenvironment{bibhyphenation}%
{\hyphenpenalty=20% (50)
\tolerance=9999% (200)
\exhyphenpenalty=0% (50)
\linepenalty=0% (10)
\setlength{\emergencystretch}{3em}}%
{}

% Currently the only public macro:
% \MakeBibliography ... creates a reference section split subsections (default)
% \MakeBibliography[nosplit] ... creates a one-piece reference section
\newcommand{\MakeBibliography}[1][]{
% opt. arg (#1): optional argument "nosplit" to get a 1-piece bibliography
\clearpage
\ifthenelse{\equal{#1}{nosplit}}%
{% create a single bibliography with all entries:
%\printbibheading[heading=bibintoc,title={#2}]
\printbibheading[heading=bibintoc,title={\@bibtitle}]
\begin{bibhyphenation}
\printbibliography[heading=noheader]
\end{bibhyphenation}
}
{% split the bibliography using the predefined categories:
%\printbibheading[heading=bibintoc,title={#2}]
\printbibheading[heading=bibintoc,title={\@bibtitle}]
\begin{bibhyphenation}
\printbibliography[filter=literature,heading=subbibintoc,title={\@bib titleLiteratur}]
\printbibliography[filter=avmedia,heading=subbibintoc,title={\@bibtit leAvmedia}]
\printbibliography[filter=online,heading=subbibintoc,title={\@bibtitl eOnline}]
\end{bibhyphenation}
}%
}


Wenn ich jetzt einen Eintrag aus meinem bibfile zitiere, der z.B. so ausschaut:


@Article{Area2,
author = {B. V. Derjaguin},
title = {Effect of contact deformations on the adhesion of particles},
journal = {J. Coll. Interf. Sci.},
year = {1975},
volume = {53}
}


,werden die einzelnen Einträge (Name,Titel,Journal,etc...) standartmäßig durch Punkte getrennt. Dummerweise sollen dort (warum auch immer) Kommas stehen.

Versucht habe ich es folgendermaßen:


\renewcommand*{\newunitpunct}{\addcomma\space}

Auf den ersten Blick schien das auch gut zu funktionieren. Allerdings erhalte ich auf diese Weise folgende Ausgabe:


B. V. Derjaguin, "Effect of contact deformations on the adhesion of particles", J. Coll. Interf. Sci. 53 (1975),


D.h. also, am ende der Einträge steht ein sinnloses Komma.
Gibt's ne Möglichkeit das mit wenig Aufwand wieder hinzubiegen?
Wenn nein, lass ichs einfach mit Punkten dazwischen, mir wird sowieso nicht klar was das mit den Kommas soll.

Festus
22-08-2013, 18:04
Probier mal


\renewcommand{\finentrypunct}{\adddot}

für einen Punkt am Ende (oder eine leere Klammer für gar kein End-Zeichen).