9

My bibliography has to look like this:

name, givenname; name2 ,givenname2: title. edition location : publisher, Year.

e.g.

Weck, Manfred; Brecher, Christian: Werkzeugmaschinen. 6.Auflage Berlin : Springer, 2005.

my bib-file looks like this:

@BOOK{weck,
  title = {Werkzeugmaschinen},
  publisher = {Springer},
  year = {2005},
  author = {Manfred Weck and Christian Brecher},
  address = {Berlin},
  edition = {6.Auflage}
}

my tex file like this:

\usepackage[backend=biber, bibstyle=alphabetic,  sorting=nyt]{biblatex}

\DeclareBibliographyDriver{book}{
  \printnames{author}%
  \setunit{\addcolon}
  \newunit\newblock \printfield{title}%
  \setunit{\adddot}
  \newunit\newblock \printfield{edition}%
  \newunit \printlist{location} %
  \setunit{\addcolon}
  \newunit \printlist{publisher}
  \setunit{\addcomma}
  \newunit \printfield{year}
  \finentry}

but my bibliography looks like this

Manfred Weck and Christian Brecher. Werkzeugmaschinen. 6.Auflage Berlin. Springer. 2005

So the name has to come first and if there are more than one author there has to be a ; in between. semicolons and colons seem to be ignored, there's always a dot.

lockstep
  • 250,273
Andy
  • 113
  • Which (bib/cite) style do you use? And why exactly don't you use one of the existing bibliography drivers for book? – lockstep Feb 25 '12 at 15:04
  • added style and my professor gave me this format which i have to use. – Andy Feb 25 '12 at 15:06
  • Just to be sure: Does your professor want that the content of any other .bib field besides title/publisher/year/author/address/edition is ignored? And that there is no space between "6." and "Auflage"? – lockstep Feb 25 '12 at 15:12
  • only those fields are mandatory. the field edition is "6.Auflage" so i just have to insert a space between if necessary – Andy Feb 25 '12 at 15:34
  • Is it mandatory to delete other fields? (I'm working on an answer as we speak.) – lockstep Feb 25 '12 at 15:46
  • what do you with that. its my decision which fields i use. i write the bib file by my own, so i would just leave the optional fields blank – Andy Feb 25 '12 at 15:54

1 Answers1

8

Here's an example that doesn't create a new bibliography driver from scratch, but modifies the existing book driver. Try and comment out my redfinitions to see what they effect. Note that I have changed the contents of the edition field in your .bib file to an integer and instead used the babel package plus the biblatex package option abbreviate=false.

Note: In the bibliography driver in your code snippets, semicolons and colons aren't ignored, but overridden by the following \newunit which typesets \newunitpunct (by default, a period and a space) instead.

Further information may be found at Guidelines for customizing biblatex styles.

\documentclass{article}

\usepackage[ngerman]{babel}

\usepackage[backend=biber,style=alphabetic,sorting=nyt,abbreviate=false]{biblatex}

\DeclareNameAlias{default}{last-first}

\renewbibmacro*{author/editor+others/translator+others}{%
  \mkbibbold{% ADDED
  \ifboolexpr{
    test \ifuseauthor
    and
    not test {\ifnameundef{author}}
  }
    {\usebibmacro{author}}
    {\ifboolexpr{
       test \ifuseeditor
       and
       not test {\ifnameundef{editor}}
     }
       {\usebibmacro{editor+others}}
       {\usebibmacro{translator+others}}}}
  }% ADDED

\renewcommand*{\multinamedelim}{\addsemicolon\space}
\renewcommand*{\finalnamedelim}{\addsemicolon\space}

\renewcommand*{\labelnamepunct}{\mkbibbold{\addcolon\space}}

\renewbibmacro*{publisher+location+date}{%
  \printlist{location}%
  \iflistundef{publisher}
    {\setunit*{\addcomma\space}}
%    {\setunit*{addcolon\space}}% DELETED
    {\setunit*{~:\space}}% ADDED
  \printlist{publisher}%
  \setunit*{\addcomma\space}%
  \usebibmacro{date}%
  \newunit}

\DeclareFieldFormat{edition}{%
  \ifinteger{#1}
%    {\mkbibordedition{#1}~\bibstring{edition}}% DELETED
    {\mkbibordedition{#1}\bibstring{edition}}% ADDED
    {#1\isdot}}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book{weck,
  author = {Manfred Weck and Christian Brecher},
  year = {2005},
  title = {Werkzeugmaschinen},
  edition = {6},
  location = {Berlin},
  publisher = {Springer},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

enter image description here

lockstep
  • 250,273