3

I'd like to have a biblography style using biblatex that looks like this:

Author. Title, Editors, Locations Year

I managed to cobble something together, however 2 problems remain, that I have not been able to solve:

  • If I there is additional information in the .bbl-File they will get listed in the bibliography (this could be fixed by just not having Citavi put out those fields, but I'd like the ability to control that within latex and not have to re-export the .bbl everythime I decide to change that). I already found some options in biblatex controlling certain parts (ISBN for example), but not a comprehensive overview.
  • If the type is phdthesis, the last comma (between locations and year) will still appear: enter image description here

Here is a MWE:

    \documentclass[]{scrartcl}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}


\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
    @book{Cicero.1999,
        author = {Cicero},
        year = {1999},
        title = {On the commonwealth; and, On the laws},
        address = {Cambridge and New York},
        editor = {Zetzel, J. E. G.},
        keywords = {primary}
    }
    @phdthesis{Rae.1991,
        author = {{Rae L. M.}},
        year = {1991},
        title = {A study of the versification of the African carmina Latina epigraphica},
        address = {Vancouver},
        type = {Diss.},
        keywords = {secondary}
    }
\end{filecontents}


\usepackage[bibstyle=authortitle,
            block=space,    
            isbn=false,             
            ]{biblatex}
\addbibresource{\jobname.bib}


\defbibheading{bibliography}[Bibliographie]{\section*{#1}}
\AtBeginBibliography{%
    \renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}}
\DeclareFieldFormat[article]{journaltitle}{#1}
\DeclareFieldFormat[article]{title}{\textit{#1}}
\DeclareFieldFormat[thesis]{title}{\textit{#1}}
\DeclareFieldFormat[thesis]{type}{(#1)}
\DeclareFieldFormat[article]{pages}{#1} %removing pp. before pages

\renewcommand\multilistdelim{\addslash} %delim between multiple 3+ Publ./Locations
\renewcommand\finallistdelim{\addslash} %delim between 2 Publ./Locations
\renewcommand\newunitpunct{\addcomma\space} %delim after Units
\renewcommand\labelnamepunct{\adddot\space} %delim after autor

\renewbibmacro*{publisher+location+date}{
    \printlist{location}
    \iflistundef{publisher}
    {\setunit*{\space}}
    {\setunit*{\space}}
    \printlist{publisher}
    \setunit*{\space}
    \usebibmacro{date}
    \newunit}

\renewbibmacro*{location+date}{
    \printlist{location}
    \setunit*{\space}
    \usebibmacro{date}
    \newunit}


\begin{document}
    \nocite{*}
        \printbibheading
        \printbibliography[keyword=primary,heading=
            subbibliography,%
            title={Primary}]
        \printbibliography[keyword=secondary,heading=
            subbibliography,%
            title={Secondary}]
\end{document}

I'm not happy with my solution so far (even the parts, that work, feel really messy) and would really appreciate some pointers.

4

Thanks for your great MWE. You haven't done too badly compared to many first posts on modifying biblatex styles!

But there are some problems with what you've done so far. I've noted these and added the extra things you need.

  1. Don't put braces around your authors, e.g., author = {{Rae L. M.}}. I assume you've done this because you don't want a comma. But it's better to give the author in the standard format in your bib file and modify \revsdnamepunct. Other settings can be changed if you are not getting the name printed how you want in citations.
  2. You don't need to explicitly set the thesis type to Diss. You can request the abbreviated string in the bibliography in the type field format using \bibsstring.
  3. You are better of using \mkbibemph rather than \emph and \mkbibparens rather than (). They behave a little more cleverly.
  4. When you change the definitions of bibmacros make sure you include % signs on the end of each line otherwise you will get unwanted spaces.
  5. To remove the comma before the date in your phdthesis you need to modify the institution+location+date macro.
  6. You can clear unwanted fields by using \clearfield, \clearlist, and \clearname in the \AtEveryBibitem macro. e.g., \AtEveryBibitem{\clearfield{note}}. Check in the biblatex manual whether your field is a list or a name or just an ordinary field.
  7. biblatex prefers date over year and location over address.
  8. You can use \renewcaptionname to change the definition of \refname to Bibliographie.
  9. Finally, a comma will be inserted after (Diss.) unless we replace the \newunit with \setunit*{\addspace} in the thesis driver. You can do this by loading the xpatch package and using \xpatchbibdriver

Here's an example of how I might do things with your MWE:

\documentclass{scrartcl}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Cicero.1999,
  author   = {Cicero},
  date     = {1999},
  title    = {On the commonwealth; and, On the laws},
  location = {Cambridge and New York},
  editor   = {Zetzel, J. E. G.},
  keywords = {primary}
}
@phdthesis{Rae.1991,
  author   = {Rae, L. M.},
  date     = {1991},
  title    = {A study of the versification of the African carmina Latina epigraphica},
  location = {Vancouver},
  keywords = {secondary}
}
\end{filecontents}

\usepackage[bibstyle=authortitle,block=space,isbn=false]{biblatex}
\addbibresource{\jobname.bib}

\renewcaptionname{ngerman}{\refname}{Bibliographie}
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}
\DeclareFieldFormat[article]{journaltitle}{#1}
\DeclareFieldFormat[article,thesis]{title}{\mkbibemph{#1}}
\DeclareFieldFormat[thesis]{type}{\mkbibparens{\bibsstring{#1}}}
\DeclareFieldFormat[article]{pages}{#1} %removing pp. before pages

\renewcommand\multilistdelim{\addslash} %delim between multiple 3+ Publ./Locations
\renewcommand\finallistdelim{\addslash} %delim between 2 Publ./Locations
\renewcommand\newunitpunct{\addcomma\space} %punct after Units
\renewcommand\labelnamepunct{\adddot\space} %punct after autor
\renewcommand\revsdnamepunct{} %punct after family name

\renewbibmacro*{publisher+location+date}{
  \printlist{location}%
  \iflistundef{publisher}
    {\setunit*{\space}}
    {\setunit*{\addcolon\space}}%
  \printlist{publisher}%
  \setunit*{\space}%
  \usebibmacro{date}%
  \newunit}

\renewbibmacro*{institution+location+date}{%
  \printlist{location}%
  \iflistundef{institution}
    {\setunit*{\space}}
    {\setunit*{\addcolon\space}}%
  \printlist{institution}%
  \setunit*{\space}%
  \usebibmacro{date}%
  \newunit}

\renewbibmacro*{location+date}{
  \printlist{location}%
  \setunit*{\space}%
  \usebibmacro{date}%
  \newunit}

\usepackage{xpatch}
\xpatchbibdriver{thesis}
  {\printfield{type}% replace this
   \newunit}
  {\printfield{type}% with this
   \setunit*{\addspace}}
  {}
  {}

\begin{document}
\nocite{*}
\printbibheading
\printbibliography[keyword=primary,heading=subbibliography,title={Primary}]
\printbibliography[keyword=secondary,heading=subbibliography,title={Secondary}]
\end{document}

enter image description here

  • wow, thats a really comprehensive answer. thanks so much :D – Imalayan Jan 12 '18 at 9:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.