2

I'm trying to get my bibliography into a tabular format. I started with using these two answers: Audrey's answer moewe's answer

I ended up with this:

% !TEX encoding = UTF-8 Unicode
\documentclass{scrartcl}%
\usepackage[ngerman]{babel}%
\usepackage[utf8]{inputenc}%
\usepackage[T1]{fontenc}%
\usepackage{lipsum}%
\usepackage[%
backend=biber,%
bibstyle=authortitle,% BIBLIOGRAPHY
citestyle=authoryear,% CITATIONS
hyperref=true,%
backref=false,%
sorting=nty,%
maxnames=99,%
isbn=false,%
block=ragged,%
dashed=false,%
]{biblatex}
% ==========================================================
%
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@COMMENTARY{beck.ok,
    MAINTITLE       = {Beck'scher Online-Kommentar BGB},
    SHORTTITLE      = {},
    EDITOR          = {Bamberger, Heinz Georg and Roth, Herbert and Hau, Wolfgang and Poseck, Roman},
    SHORTHAND       = {BeckOK},
    VOLUME          = {},
    TITLE           = {},
    YEAR            = {2018},
    EDITION         = {45},
    OPTIONS         = {howcited},
}

@COMMENTARY{muko.bd1,
    MAINTITLE       = {Münchener Kommentar zum Bürgerlichen Recht},
    SHORTTITLE      = {},
    SHORTHAND       = {MünchKomm},
    EDITOR          = {Säcker, Franz},
    SHORTAUTHOR     = {},
    VOLUME          = {1},
    TITLE           = {Allgemeiner Teil},
    YEAR            = {2015},
    ADDRESS         = {},
    EDITION         = {7},
    OPTIONS         = {howcited},
}

@INCOLLECTION{fs.roxin,
    AUTHOR          = {Beckemper, Katharina},
    TITLE           = {Unvernunft als Zurechnungskriterium in den „Retterfällen“},
    EDITOR          = {Manfred, Heinrich},
    BOOKTITLE       = {Strafrecht als Scientia Universalis - Festschrift f{\"u}r Claus Roxin zum 80. Geburtstag},
    SHORTTITLE      = {FS Roxin},
    YEAR            = {2011},
    PAGES           = {397--411},
    OPTIONS         = {fshowcited},
}

@ARTICLE{jus2007.881,
    author          = {Jörg Neuner},
    title           = {Was ist eine Willenserklärung?},
    journal         = {JuS},
    year            = {2007},
    pages           = {881--888},
}
%   
\end{filecontents}
\addbibresource{\jobname.bib}
%
%
%
% === merged files ====
%
%
% biblatex.cfg
% biblatex.cfg
% biblatex.cfg
%%%
\DeclareNameAlias{sortname}{family-given-bold}
\DeclareNameFormat{family-given-bold}{\mkbibbold{%
  \ifgiveninits
    {\usebibmacro{name:family-given}{\namepartfamily}{\namepartgiveni}{\namepartprefix}{\namepartsuffix}}
    {\usebibmacro{name:family-given}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}}%
  \usebibmacro{name:andothers}}}
% ==========================================================
% === Titel nicht kursiv ===
%
\DeclareFieldFormat{citetitle}{\normalfont{#1}}% Zitate: Schriftart der Titel
\DeclareFieldFormat{title}{\normalfont{#1}}% Titel im LitVZ
\DeclareFieldFormat{maintitle}{\normalfont{#1}}
\DeclareFieldFormat{journaltitle}{\normalfont{#1}}%
%
\DeclareFieldFormat[incollection]{title}{#1}
\DeclareFieldFormat[incollection]{booktitle}{\normalfont{#1}}
\DeclareFieldFormat[incollection]{editor}{\normalfont{#1}}
% ==========================================================
% === kein Punkt in Library ===
%
\renewcommand{\finentrypunct}{}% Kein Punkt am Ende des Eintrags im LitVZ
% ==========================================================
% === Hrsg. ===
%
\DeclareFieldFormat{authortype}{\mkbibparens{#1}}% Authortyp in Klammern
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}% Editortyp in Klammern
\DeclareFieldFormat[incollection]{editortype}{\mkbibparens{#1}}%
% ==========================================================
\DeclareDelimFormat{authortypedelim}{\addspace}% Kein Komma nach Autor
\DeclareDelimFormat{editortypedelim}{\addspace}% Kein Komma nach Editor
% ==========================================================
\DeclareDelimFormat[bib,biblist]{nametitledelim}{\addspace}%\labelnamepunct% Kein Punkt zwischen Autoren und Werk
% ==========================================================
% === Auflage/Aufl. ===
%
\DefineBibliographyStrings{german}{%
  edition          = {\ifbibliography{Auflage}{Aufl\adddot}},% 'Auflage' statt 'Aufl.'
}
% ==========================================================
% === kein Anfuhrungszeichen im Titel ===
%
\DeclareFieldFormat[article]{title}{{#1\isdot}}
\DeclareFieldFormat[incollection]{citetitle}{{#1\isdot}}
% ==========================================================
% === kein S. bei @article & @incollection ===
%
\DeclareFieldFormat[article]{pages}{#1}%
\DeclareFieldFormat[incollection]{pages}{#1}%
% ==========================================================
% === Erkennt Satzzeichen & setzt kein Komma ausser bei Abkurzungen ===
%
\DefineBibliographyExtras{german}{\DeclarePunctuationPairs{comma}{*}}
% ==========================================================
% === @article keine Titel zitieren ===
%
\DeclareFieldFormat[article]{citetitle}{}%
% ==========================================================
% === nur erste Seite zitieren @article @incollection ===
%
 \AtEveryCite{% 
  \DeclareFieldFormat[article,incollection]{pages}{\mkfirstpage{#1}}% 
}% 

% ==========================================================
% === bei @article @incollection postnote in klammern fur seitenzahl ===
%
\AtEveryCite{%
    \DeclareFieldFormat[article, incollection]{postnote}{\mkbibparens{#1}}%
}

% ==========================================================
% === bib driver @commentary ===
%
\DeclareBibliographyDriver{commentary}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{maintitle+title}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{edition}
  \newunit
  \usebibmacro{location+date}%
  \newunit\newblock
  \usebibmacro{finentry}}
% ==========================================================
% === @commentary prenote position === otherwise use: https://tex.stackexchange.com/a/430758/53779
%
\DeclareCiteCommand{\footcite}[\mkbibfootnote]%
  {\ifentrytype{commentary}{}{\usebibmacro{prenote}}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}%
   \ifentrytype{commentary}{\thinspace\thinspace\textbf{\addslash}\thinspace\textit{\usebibmacro{prenote}}}{}}
  {\multicitedelim}
  {\usebibmacro{postnote}}
%
\DeclareCiteCommand{\cite}%[\mkbibcite]%
  {\ifentrytype{commentary}{}{\usebibmacro{prenote}}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}%
   \ifentrytype{commentary}{\thinspace\thinspace\textbf{\addslash}\thinspace\textit{\usebibmacro{prenote}}}{}}
  {\multicitedelim}
  {\usebibmacro{postnote}}
% ==========================================================
% === @incollection herausgeber der festschrift nicht fett ===
%
\DeclareNameAlias{ineditor}{family-given}

\newbibmacro*{bbx:in:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
    {\printnames[ineditor]{editor}%
     \setunit{\printdelim{editortypedelim}}%
     \usebibmacro{#1}%
     \clearname{editor}}
    {}}
\newbibmacro*{in:editor}{%
  \usebibmacro{bbx:in:editor}{editorstrg}}
\newbibmacro*{in:editor+others}{%
  \usebibmacro{bbx:in:editor}{editor+othersstrg}}

\DeclareBibliographyDriver{incollection}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \newunit\newblock
  \usebibmacro{in:editor+others}%<----- new macro
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit\newblock
%  \usebibmacro{editor+others}% OLD
  \newunit\newblock
  \printfield{edition}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit
  \printfield{volumes}%
  \newunit\newblock
  \usebibmacro{series+number}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}
% ==========================================================
% === Kommentare: zitiert als Option ===
%
\newtoggle{tnbcbx@howcited}
\DeclareEntryOption[boolean]{howcited}[true]{\settoggle{tnbcbx@howcited}{#1}}
\DeclareBibliographyOption[boolean]{howcited}[true]{\settoggle{tnbcbx@howcited}{#1}}
\DeclareTypeOption[boolean]{howcited}[true]{\settoggle{tnbcbx@howcited}{#1}}

\newbibmacro{howcited}{%
  \iftoggle{tnbcbx@howcited}
    {\iffieldundef{shorthand}
       {}
       {\setunit{\addspace}%
        \printtext[parens]{%
          \bibstring{citedas}%
          \setunit{\addcolon\space}%
          \printfield{shorthand}%
          \setunit{\addslash}%
          \bibstring[\emph]{bearbeiter}}}}
    {}}

\renewbibmacro{finentry}{\usebibmacro{howcited}\usebibmacro{fshowcited}\finentry}

\NewBibliographyString{bearbeiter}
\DefineBibliographyStrings{ngerman}{
  citedas    = {zitiert als},
  bearbeiter = {Bearbeiter},
}

% ==========================================================
% === Incollection zitiert als option ===
%
\newtoggle{tnbcbx@fshowcited}
\DeclareEntryOption[boolean]{fshowcited}[true]{\settoggle{tnbcbx@fshowcited}{#1}}
\DeclareBibliographyOption[boolean]{fshowcited}[true]{\settoggle{tnbcbx@fshowcited}{#1}}
\DeclareTypeOption[boolean]{fshowcited}[true]{\settoggle{tnbcbx@fshowcited}{#1}}

\newbibmacro{fshowcited}{%
  \iftoggle{tnbcbx@fshowcited}
    {\iffieldundef{shorttitle}
       {}
       {\setunit{\addspace}%
        \printtext[parens]{%
          \bibstring{citedas}%
          \setunit{\addcolon\space}%
          \emph{\printnames{labelname}}%
          \setunit{\addcomma\space}%
          \printfield{shorttitle}%
          }}}
    {}}

\renewbibmacro{finentry}{\usebibmacro{howcited}\usebibmacro{fshowcited}\finentry}
% ==========================================================
% mybiblatexcfg.tex
% mybiblatexcfg.tex
% mybiblatexcfg.tex
%
\renewcommand{\finentrypunct}{}% kein Punkt am Ende im LitVZ
% ==========================================================
\AtEveryBibitem{%
\ifentrytype{commentary}{% TRUE
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}%
}{}% FALSE
}
%
\AtEveryBibitem{%
\ifentrytype{book}{% TRUE
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}%
}{}% FALSE
}
%
\AtEveryBibitem{%
\ifentrytype{article}{% TRUE
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}%
}{}% FALSE
}
 % %
\AtEveryBibitem{%
\ifentrytype{incollection}{% TRUE
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}%
}{}% FALSE
}
% 
%==========================================================
\AtEveryCite{%
\renewcommand{\mkbibnamefamily}[1]{\mkbibemph{#1}}%
}%
% ==========================================================
\renewcommand*{\multinamedelim}{~\textbf{/}\space}%
  \renewcommand*{\finalnamedelim}{~\textbf{/}\space}%
% ==========================================================
\renewcommand*{\newunitpunct}{\addcomma\space}%
% ==========================================================
\renewbibmacro{in:}{% 
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
% ==========================================================
\renewbibmacro{issue+date}{%
  %\printtext[parens]{% Klammern um Jahr weg
    \printfield{issue}%
    \setunit*{\addspace}%
    \usebibmacro{date}%}%
  \newunit}
% ==========================================================
% =========== print 'Author, Journal Year, firstpage' =========
% ======================== 09.05.18 ====================
\newbibmacro*{cite:article:journal}{%
       \newunit
       \printfield{journaltitle}
       %\newunit% no comma between journal and year
}
%
\newbibmacro*{cite:article:pages}{%
\newunit%\addcomma
\printfield{pages}}
%
\newbibmacro*{cite:book:shorttitle}{%
  \printfield[citetitle]{labeltitle}}
%
\renewbibmacro{postnote}{%
  \iffieldundef{postnote}
    {}
    {%\setunit{%\postnotedelim}%
    \printfield{postnote}}}
% ========================================================
\renewbibmacro{cite}{%
\ifentrytype{commentary}{\usebibmacro{cite:shorthand}}{}%
  \iffieldundef{shorthand}%
    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}%
       {\usebibmacro{cite:label}%
        \setunit{\printdelim{nonameyeardelim}}}%
       {\printnames{labelname}%
        \setunit{\printdelim{nameyeardelim}}}%
       \ifentrytype{book}% === field
       {\setunit{\printdelim{nametitledelim}}\usebibmacro{cite:book:shorttitle}}% === true
       {}%\usebibmacro{cite:labeldate+extradate}% === false
        \ifentrytype{article}% === field
        {\usebibmacro{cite:article:journal}\usebibmacro{cite:labeldate+extradate}
        \usebibmacro{cite:article:pages}%
        }% === true
     {}% === false
     \ifentrytype{incollection}%
     {{\setunit{\printdelim{nametitledelim}}}
     \usebibmacro{cite:book:shorttitle}
     \usebibmacro{cite:article:pages}%
     }% === true
     {}% === false
    {\usebibmacro{cite:shorthand}}
    }{}%
    }
%
% ==========================================================
% ==========================================================
\makeatletter

% user-level command for printing tabular bibliography
\let\printbibtabular\printbibliography
\patchcmd{\printbibtabular}{\blx@printbibliography}{\bbx@printbibtabular}{}{}
\patchcmd{\printbibtabular}{\blx@printbibliography}{\bbx@printbibtabular}{}{}
\let\bbx@printbibtabular\blx@printbibliography
\patchcmd{\bbx@printbibtabular}{\blx@bibliography}{\bbx@bibtabular}{}{}
\patchcmd{\bbx@printbibtabular}
  {\def\blx@theenv{bibliography}}{\def\blx@theenv{bibtabular}}{}{}

% underlying macros
\def\bbx@bibtabular#1{%
  \blx@bibheading\blx@theheading\blx@thetitle
  \blx@bibnote\blx@theprenote
  \begingroup
  \blx@bibinit
  \let\@noitemerr\@empty
  \let\blx@noitem\blx@warn@bibempty
  \ifnum\bibinitsep=\z@
    \let\blx@initsep\relax
  \fi
  \ifnum\bibnamesep=\z@
    \let\blx@namesep\relax
  \fi
  \csuse{blx@hook@bibinit}%
  \csuse{blx@hook@bibinit@next}%
  % copy filtered list of entries to internal list macro
  \def\blx@do##1{%
    \blx@ifdata{##1}{%
      \begingroup
      \blx@getdata{##1}
      \blx@bibcheck
      \iftoggle{blx@skipentry}{}{%
        \global\let\blx@noitem\@empty
        \listadd\blx@tempa{##1}}%
      \endgroup}{}}
  \let\blx@done\relax
  \blx@listloop{#1}
  % tabular output for each item in list macro
  \def\do##1{\bbx@tab@label{##1} & \bbx@tab@item{##1} \\}
  \csuse{blx@env@\blx@theenv}%
  \dolistloop{\blx@tempa}
  \csuse{blx@endenv@\blx@theenv}%
  \blx@bibnote\blx@thepostnote
  \endgroup}

\def\bbx@tab@label#1{%
  \blx@ifdata{#1}
    {\begingroup
     \blx@getdata{#1}%
     \blx@bibcheck
     \iftoggle{blx@skipentry}{}{%
       \blx@setdefaultrefcontext{#1}%
       \global\let\blx@noitem\@empty
       \blx@setoptions@type\abx@field@entrytype
       \blx@setoptions@entry
       \blx@thelabelnumber
       \addtocounter{instcount}\@ne
       \csuse{bbx@tabenv@\blx@theenv}\relax}
     \endgroup}
    {}}

\def\bbx@tab@item#1{%
  \blx@ifdata{#1}
    {\begingroup
     \blx@getdata{#1}%
     \blx@bibcheck
     \iftoggle{blx@skipentry}{}{%
       \blx@setdefaultrefcontext{#1}%
       \global\let\blx@noitem\@empty
       \blx@setoptions@type\abx@field@entrytype
       \blx@setoptions@entry
       \csuse{blx@item@\blx@theenv}\relax
       \blx@initsep
       \blx@namesep
       \csuse{blx@hook@bibitem}%
       \blx@execute
       \blx@initunit
       \blx@anchor
       \blx@beglangbib
       \bibsentence
       \blx@pagetracker
       \blx@driver\abx@field@entrytype
       \blx@postpunct
       \blx@endlangbib}%
     \endgroup}
    {}}

% user-level command for defining tabular bibliography format
\newrobustcmd*{\defbibtabular}[5]{%
  \long\csdef{blx@env@#1}{#2}%
  \long\csdef{blx@endenv@#1}{#3}%
  \long\csdef{bbx@tabenv@#1}{#4}%
  \long\csdef{blx@item@#1}{#5}}

% user-level access to some entry options
\def\useeditorfalse{\togglefalse{blx@useeditor}}
\def\usetranslatorfalse{\togglefalse{blx@usetranslator}}

\makeatother

% sortname labels (a robust style should add provision for missing labelnames)
\newbibmacro*{sortname}{%
  \renewcommand*{\multinamedelim}{\addslash\break}%
  \let\finalnamedelim\multinamedelim
  \printtext[]{\printnames[family-given]{labelname}}}

% bibitem hook to suppress redundant sortname list
\newbibmacro*{omitsortname}{%
  \ifnameundef{labelname}{}{%
    \ifnameundef{author}
      {\ifnameundef{editor}
         {\ifusetranslator{\clearname{translator}}{}}}
         {\clearname{editor}}
      {\clearname{author}}%
    \useeditorfalse%
    \usetranslatorfalse}}

% demo new tabular bibliography format
\defbibtabular{bibtabular}
  {\begin{tabular}{p{0.3\textwidth}p{0.7\textwidth}}}
  {\end{tabular}}
  {\usebibmacro{sortname}}
  {\usebibmacro{omitsortname}}

% add multiline labels in default bibliography format
\defbibenvironment{bibliography}
  {\list
     {\usebibmacro{sortname}}
     {\setlength{\labelwidth}{0.3\textwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
     \renewcommand*{\makelabel}[1]{%
       \nobreak\strut\smash{\parbox[t]\labelwidth{\raggedright##1}}}}
  {\endlist}
  {\item\usebibmacro{omitsortname}}
  \setlength{\bibitemsep}{\itemsep}
% ==========================================================
%
\begin{document}
%
% ==========================================================
\printbibliography[title=Literaturverzeichnis alt,heading=bibintoc]
\printbibtabular[title=Literaturverzeichnis]
\tableofcontents% 
% ==========================================================
Test
\footcite[399]{fs.roxin}\footcite[Wendtland][§ 240 Rn. 63]{beck.ok}\footcite[888]{jus2007.881}
%-----------------------------------------------------------------
\end{document}

I'm still struggling with the following:

  1. The author names are weirdly alligned.
  2. The authors & editors are still being printed in the right column.
  3. Somehow the entry types article & incollection are not processed correctly.

I'd like it to look somehow like that:

That's how the right column should look. Although in the left I would like to have authors and editors. Like shown here: left column with authors and editors

And like already defined the author and editor names should be in bold font while their family name should also be textsc.

Any ideas how to achieve that?

  • 2
    Note that you cannot get bold small-caps unless you use a font family which supports them. The default fonts do not. – cfr Jul 31 '18 at 2:54
  • Yes I know thanks. I’ll be using TeX Gyre Termes for the small caps. – texnewbie Jul 31 '18 at 6:59
2

I'd like to point to a newer answer of mine (Custom BibLaTeX bib with two blocks and authors below each other?), where I have addressed some quirks of my answer to Tabular Bibliography.

Indeed both your first and second issue should be addressed there.

The names are stretched out because the tabular uses a p column, which justifies its contents, you want a fixed-width left-aligned column. See How to create fixed width table columns with text raggedright/centered/raggedleft?

\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
% demo new tabular bibliography format
\defbibtabular{bibtabular}
  {\def\arraystretch{1.5}%
   \begin{tabular}{@{}L{\dimexpr0.3\textwidth-\tabcolsep\relax}
                    L{\dimexpr0.7\textwidth-\tabcolsep\relax}@{}}}
  {\end{tabular}}
  {\usebibmacro{sortname}}
  {\usebibmacro{omitsortname}}

A more stable solution to remove the names in the right column is

% bibitem hook to suppress redundant sortname list
\newbibmacro*{omitsortname}{%
  \ifnameundef{labelname}
    {}
    {\clearname{\thefield{labelnamesource}}}}

Unfortunately, I don't understand you point three: @articles and @incollections look OK to me.

Finally, you need to print the labelname in the sortname format.

% sortname labels (a robust style should add provision for missing labelnames)
\newbibmacro*{sortname}{%
  \DeclareDelimFormat{multinamedelim}{\addslash\break}%
  \DeclareDelimAlias{finalnamedelim}{multinamedelim}%
  \printnames[sortname]{labelname}}

I have also changed your logic with respect to \mkbibnamefamily slightly: It's

\renewcommand*{\mkbibnamefamily}{\textsc}
\AtEveryCite{%
  \renewcommand{\mkbibnamefamily}{\mkbibemph}%
}

now.

Together with a few other simplifications of the code we get

\documentclass{scrartcl}%
\usepackage[ngerman]{babel}%
\usepackage[utf8]{inputenc}%
\usepackage[T1]{fontenc}%
\usepackage{lipsum}%
\usepackage[%
backend=biber,%
bibstyle=authortitle,% BIBLIOGRAPHY
citestyle=authoryear,% CITATIONS
hyperref=true,%
backref=false,%
sorting=nty,%
maxnames=99,%
isbn=false,%
block=ragged,%
dashed=false,%
]{biblatex}
% ==========================================================
%
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@COMMENTARY{beck.ok,
    MAINTITLE       = {Beck'scher Online-Kommentar BGB},
    EDITOR          = {Bamberger, Heinz Georg and Roth, Herbert and Hau, Wolfgang and Poseck, Roman},
    SHORTHAND       = {BeckOK},
    YEAR            = {2018},
    EDITION         = {45},
    OPTIONS         = {howcited},
}

@COMMENTARY{muko.bd1,
    MAINTITLE       = {Münchener Kommentar zum Bürgerlichen Recht},
    SHORTHAND       = {MünchKomm},
    EDITOR          = {Säcker, Franz},
    VOLUME          = {1},
    TITLE           = {Allgemeiner Teil},
    YEAR            = {2015},
    EDITION         = {7},
    OPTIONS         = {howcited},
}

@INCOLLECTION{fs.roxin,
    AUTHOR          = {Beckemper, Katharina},
    TITLE           = {Unvernunft als Zurechnungskriterium in den „Retterfällen“},
    EDITOR          = {Manfred, Heinrich},
    BOOKTITLE       = {Strafrecht als Scientia Universalis - Festschrift f{\"u}r Claus Roxin zum 80. Geburtstag},
    SHORTTITLE      = {FS Roxin},
    YEAR            = {2011},
    PAGES           = {397--411},
    OPTIONS         = {fshowcited},
}

@ARTICLE{jus2007.881,
    author          = {Jörg Neuner},
    title           = {Was ist eine Willenserklärung?},
    journal         = {JuS},
    year            = {2007},
    pages           = {881--888},
}
%   
\end{filecontents}
\addbibresource{\jobname.bib}

\DeclareNameAlias{sortname}{family-given-bold}
\DeclareNameFormat{family-given-bold}{%
  \mkbibbold{%
    \ifgiveninits
      {\usebibmacro{name:family-given}
         {\namepartfamily}
         {\namepartgiveni}
         {\namepartprefix}
         {\namepartsuffix}}
      {\usebibmacro{name:family-given}
         {\namepartfamily}
         {\namepartgiven}
         {\namepartprefix}
         {\namepartsuffix}}%
    \usebibmacro{name:andothers}}}
% ==========================================================
% === Titel nicht kursiv ===
%
\DeclareFieldFormat*{citetitle}{#1}% Zitate: Schriftart der Titel
\DeclareFieldFormat*{title}{#1}% Titel im LitVZ
\DeclareFieldFormat*{maintitle}{#1}
\DeclareFieldFormat*{journaltitle}{#1}%
\DeclareFieldFormat*{booktitle}{#1}
% ==========================================================
% === kein Punkt in Library ===
%
\renewcommand{\finentrypunct}{}% Kein Punkt am Ende des Eintrags im LitVZ
% ==========================================================
% === Hrsg. ===
%
\DeclareFieldFormat{authortype}{\mkbibparens{#1}}% Authortyp in Klammern
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}% Editortyp in Klammern
\DeclareFieldFormat[incollection]{editortype}{\mkbibparens{#1}}%
% ==========================================================
\DeclareDelimFormat{authortypedelim}{\addspace}% Kein Komma nach Autor
\DeclareDelimFormat{editortypedelim}{\addspace}% Kein Komma nach Editor
% ==========================================================
\DeclareDelimFormat[bib,biblist]{nametitledelim}{\addspace}%\labelnamepunct% Kein Punkt zwischen Autoren und Werk
% ==========================================================
% === Auflage/Aufl. ===
%
\DefineBibliographyStrings{german}{%
  edition          = {\ifbibliography{Auflage}{Aufl\adddot}},% 'Auflage' statt 'Aufl.'
}
% ==========================================================
% === kein Anfuhrungszeichen im Titel ===
%
% ==========================================================
% === kein S. bei @article & @incollection, nur erste Seite im Zitat ===
%
\DeclareFieldFormat[article,incollection]{pages}{%
  \ifcitation
    {\mkfirstpage{#1}}
    {#1}}%
% ==========================================================
% === Erkennt Satzzeichen & setzt kein Komma ausser bei Abkurzungen ===
%
\DefineBibliographyExtras{german}{\DeclarePunctuationPairs{comma}{*}}
% ==========================================================
% === @article keine Titel zitieren ===
%
\DeclareFieldFormat[article]{citetitle}{}%<--- this is a really bad idea!
% ==========================================================
% === bei @article @incollection postnote in Klammern für Seitenzahl ===
%
\DeclareFieldFormat[article, incollection]{postnote}{\mkbibparens{#1}}%

% ==========================================================
% === bib driver @commentary ===
%
\DeclareBibliographyDriver{commentary}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{maintitle+title}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{edition}
  \newunit
  \usebibmacro{location+date}%
  \newunit\newblock
  \usebibmacro{finentry}}
% ==========================================================
% === @commentary prenote position === otherwise use: https://tex.stackexchange.com/a/430758/53779
%
\DeclareCiteCommand{\footcite}[\mkbibfootnote]%
  {\ifentrytype{commentary}{}{\usebibmacro{prenote}}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}%
   \ifentrytype{commentary}
     {\thinspace\thinspace\textbf{\addslash}\thinspace
      \textit{\usebibmacro{prenote}}}
     {}}
  {\multicitedelim}
  {\usebibmacro{postnote}}
%
\DeclareCiteCommand{\cite}%[\mkbibcite]%
  {\ifentrytype{commentary}{}{\usebibmacro{prenote}}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}%
   \ifentrytype{commentary}
     {\thinspace\thinspace\textbf{\addslash}\thinspace
      \textit{\usebibmacro{prenote}}}
     {}}
  {\multicitedelim}
  {\usebibmacro{postnote}}
% ==========================================================
% === @incollection herausgeber der festschrift nicht fett ===
%
\DeclareNameAlias{ineditor}{family-given}

\newbibmacro*{bbx:in:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
    {\printnames[ineditor]{editor}%
     \setunit{\printdelim{editortypedelim}}%
     \usebibmacro{#1}%
     \clearname{editor}}
    {}}
\newbibmacro*{in:editor}{%
  \usebibmacro{bbx:in:editor}{editorstrg}}
\newbibmacro*{in:editor+others}{%
  \usebibmacro{bbx:in:editor}{editor+othersstrg}}

\DeclareBibliographyDriver{incollection}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \newunit\newblock
  \usebibmacro{in:editor+others}%<----- new macro
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit\newblock
%  \usebibmacro{editor+others}% OLD
  \newunit\newblock
  \printfield{edition}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit
  \printfield{volumes}%
  \newunit\newblock
  \usebibmacro{series+number}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}
% ==========================================================
% === Kommentare: zitiert als Option ===
%
\newtoggle{tnbcbx@howcited}
\DeclareEntryOption[boolean]{howcited}[true]{\settoggle{tnbcbx@howcited}{#1}}
\DeclareBibliographyOption[boolean]{howcited}[true]{\settoggle{tnbcbx@howcited}{#1}}
\DeclareTypeOption[boolean]{howcited}[true]{\settoggle{tnbcbx@howcited}{#1}}

\newbibmacro{howcited}{%
  \iftoggle{tnbcbx@howcited}
    {\iffieldundef{shorthand}
       {}
       {\setunit{\addspace}%
        \printtext[parens]{%
          \bibstring{citedas}%
          \setunit{\addcolon\space}%
          \printfield{shorthand}%
          \setunit{\addslash}%
          \bibstring[\emph]{bearbeiter}}}}
    {}}

\renewbibmacro{finentry}{\usebibmacro{howcited}\usebibmacro{fshowcited}\finentry}

\NewBibliographyString{bearbeiter}
\DefineBibliographyStrings{ngerman}{
  citedas    = {zitiert als},
  bearbeiter = {Bearbeiter},
}

% ==========================================================
% === Incollection zitiert als option ===
%
\newtoggle{tnbcbx@fshowcited}
\DeclareEntryOption[boolean]{fshowcited}[true]{\settoggle{tnbcbx@fshowcited}{#1}}
\DeclareBibliographyOption[boolean]{fshowcited}[true]{\settoggle{tnbcbx@fshowcited}{#1}}
\DeclareTypeOption[boolean]{fshowcited}[true]{\settoggle{tnbcbx@fshowcited}{#1}}

\newbibmacro{fshowcited}{%
  \iftoggle{tnbcbx@fshowcited}
    {\iffieldundef{shorttitle}
       {}
       {\setunit{\addspace}%
        \printtext[parens]{%
          \bibstring{citedas}%
          \setunit{\addcolon\space}%
          \emph{\printnames{labelname}}%
          \setunit{\addcomma\space}%
          \printfield{shorttitle}%
          }}}
    {}}

\renewbibmacro{finentry}{\usebibmacro{howcited}\usebibmacro{fshowcited}\finentry}
% ==========================================================
% mybiblatexcfg.tex
% mybiblatexcfg.tex
% mybiblatexcfg.tex
%
\renewcommand{\finentrypunct}{}% kein Punkt am Ende im LitVZ
% ==========================================================
\renewcommand*{\mkbibnamefamily}{\textsc}
\AtEveryCite{%
  \renewcommand{\mkbibnamefamily}{\mkbibemph}%
}
% ==========================================================
\DeclareDelimFormat{multinamedelim}{~\textbf{/}\space}%
\DeclareDelimAlias{finalnamedelim}{multinamedelim}%
% ==========================================================
\renewcommand*{\newunitpunct}{\addcomma\space}%
% ==========================================================
\renewbibmacro{in:}{% 
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
% ==========================================================
\renewbibmacro{issue+date}{%
  %\printtext[parens]{% Klammern um Jahr weg
    \printfield{issue}%
    \setunit*{\addspace}%
    \usebibmacro{date}%}%
  \newunit}
% ==========================================================
% =========== print 'Author, Journal Year, firstpage' =========
% ======================== 09.05.18 ====================
\newbibmacro*{cite:article:journal}{%
  \newunit
  \printfield{journaltitle}%
  %\newunit% no comma between journal and year
}
%
\newbibmacro*{cite:article:pages}{%
  \newunit%\addcomma
  \printfield{pages}}
%
\newbibmacro*{cite:book:shorttitle}{%
  \printfield[citetitle]{labeltitle}}
%
\renewbibmacro{postnote}{%
  \iffieldundef{postnote}
    {}
    {%\setunit{%\postnotedelim}%
    \printfield{postnote}}}

% ========================================================
\renewbibmacro{cite}{%
\ifentrytype{commentary}{\usebibmacro{cite:shorthand}}{}%
  \iffieldundef{shorthand}%
    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}%
       {\usebibmacro{cite:label}%
        \setunit{\printdelim{nonameyeardelim}}}%
       {\printnames{labelname}%
        \setunit{\printdelim{nameyeardelim}}}%
       \ifentrytype{book}% === field
       {\setunit{\printdelim{nametitledelim}}\usebibmacro{cite:book:shorttitle}}% === true
       {}%\usebibmacro{cite:labeldate+extradate}% === false
        \ifentrytype{article}% === field
        {\usebibmacro{cite:article:journal}\usebibmacro{cite:labeldate+extradate}
        \usebibmacro{cite:article:pages}%
        }% === true
     {}% === false
     \ifentrytype{incollection}%
     {{\setunit{\printdelim{nametitledelim}}}
     \usebibmacro{cite:book:shorttitle}
     \usebibmacro{cite:article:pages}%
     }% === true
     {}% === false
    {\usebibmacro{cite:shorthand}}
    }{}%
    }
%
% ==========================================================
% ==========================================================
\makeatletter

% user-level command for printing tabular bibliography
\let\printbibtabular\printbibliography
\patchcmd{\printbibtabular}{\blx@printbibliography}{\bbx@printbibtabular}{}{}
\patchcmd{\printbibtabular}{\blx@printbibliography}{\bbx@printbibtabular}{}{}
\let\bbx@printbibtabular\blx@printbibliography
\patchcmd{\bbx@printbibtabular}{\blx@bibliography}{\bbx@bibtabular}{}{}
\patchcmd{\bbx@printbibtabular}
  {\def\blx@theenv{bibliography}}{\def\blx@theenv{bibtabular}}{}{}


% underlying macros
\def\bbx@bibtabular#1{%
  \blx@langstrings
  \blx@bibheading\blx@theheading\blx@thetitle
  \blx@bibnote\blx@theprenote
  \begingroup
  \blx@bibinit
  \let\@noitemerr\@empty
  \let\blx@noitem\blx@warn@bibempty
  \ifnum\bibinitsep=\z@
    \let\blx@initsep\relax
  \fi
  \ifnum\bibnamesep=\z@
    \let\blx@namesep\relax
  \fi
  \csuse{blx@hook@bibinit}%
  \csuse{blx@hook@bibinit@next}%
  % copy filtered list of entries to internal list macro
  \def\blx@do##1{%
    \blx@ifdata{##1}{%
      \begingroup
      \blx@getdata{##1}%
      \blx@bibcheck
      \iftoggle{blx@skipentry}{}{%
        \global\let\blx@noitem\@empty
        \listadd\blx@tempa{##1}}%
      \endgroup}{}}%
  \let\blx@done\relax
  \blx@listloop{#1}%
  % tabular output for each item in list macro
  \def\do##1{\bbx@tab@label{##1} & \bbx@tab@item{##1}\\}%
  \csuse{blx@env@\blx@theenv}%
  \dolistloop{\blx@tempa}%
  \csuse{blx@endenv@\blx@theenv}%
  \blx@bibnote\blx@thepostnote
  \endgroup
  \endgroup% this closed a goup opened by \printbibtabular
}

\def\bbx@tab@label#1{%
  \begingroup
  \blx@getdata{#1}%
  \blx@setdefaultrefcontext{#1}%
  \blx@setoptions@type\abx@field@entrytype
  \blx@setoptions@entry
  \blx@thelabelnumber
  \blx@initsep
  \blx@namesep
  \csuse{blx@hook@bibitem}%
  \addtocounter{instcount}\@ne
  \blx@anchor
  \csuse{bbx@tabenv@\blx@theenv}\relax
  \endgroup
}

\def\bbx@tab@item#1{%
  \begingroup
  \blx@getdata{#1}%
  \blx@setoptions@type\abx@field@entrytype
  \blx@setoptions@entry
  \blx@thelabelnumber
  \csuse{blx@hook@bibitem}%
  \csuse{blx@item@\blx@theenv}\relax
  \blx@execute
  \blx@initunit
  \blx@beglangbib
  \bibsentence
  \blx@pagetracker
  \blx@driver\abx@field@entrytype
  \blx@postpunct
  \blx@endlangbib
  \endgroup
}

% user-level command for defining tabular bibliography format
\newrobustcmd*{\defbibtabular}[5]{%
  \long\csdef{blx@env@#1}{#2}%
  \long\csdef{blx@endenv@#1}{#3}%
  \long\csdef{bbx@tabenv@#1}{#4}%
  \long\csdef{blx@item@#1}{#5}}

\makeatother

% sortname labels (a robust style should add provision for missing labelnames)
\newbibmacro*{sortname}{%
  \DeclareDelimFormat{multinamedelim}{\addslash\break}%
  \DeclareDelimAlias{finalnamedelim}{multinamedelim}%
  \printnames[sortname]{labelname}}

% bibitem hook to suppress redundant sortname list
\newbibmacro*{omitsortname}{%
  \ifnameundef{labelname}
    {}
    {\clearname{\thefield{labelnamesource}}}}

\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
% demo new tabular bibliography format
\defbibtabular{bibtabular}
  {\def\arraystretch{1.5}%
   \begin{tabular}{@{}L{\dimexpr0.3\textwidth-\tabcolsep\relax}
                      L{\dimexpr0.7\textwidth-\tabcolsep\relax}@{}}}
  {\end{tabular}}
  {\usebibmacro{sortname}}
  {\usebibmacro{omitsortname}}

% add multiline labels in default bibliography format
\defbibenvironment{bibliography}
  {\list
     {\usebibmacro{sortname}}
     {\setlength{\labelwidth}{0.3\textwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
     \renewcommand*{\makelabel}[1]{%
       \nobreak\strut\smash{\parbox[t]\labelwidth{\raggedright##1}}}}
  {\endlist}
  {\item\usebibmacro{omitsortname}}
  \setlength{\bibitemsep}{\itemsep}
% ==========================================================
%
\begin{document}
%
% ==========================================================
\printbibliography[title=Literaturverzeichnis alt,heading=bibintoc]
\printbibtabular[title=Literaturverzeichnis]
\tableofcontents% 
% ==========================================================
Test
\footcite[399]{fs.roxin}\footcite[Wendtland][§ 240 Rn. 63]{beck.ok}\footcite[888]{jus2007.881}
%-----------------------------------------------------------------
\end{document}

The picture shows two bibliographies: A standard bibliography with names in label position and a tabular bibliography with two columns. The first column contains bold names with family name in small caps, the second column the publication information.

  • Amazing. Like always; thanks for the explanations! – texnewbie Jul 31 '18 at 7:06
  • 1
    With the L column you should be able to do away with block=ragged, - unless you like it, of course. – moewe Jul 31 '18 at 7:09
  • For some reason the bibliography gets cut off. Instead of printing a new page when the first bibliography page is full. Any ideas how to fix this? I just double checked it by using your MWE and if I add enough bib entries it happens. This is how the bottom of the page looks imgur.com/a/O2FyOBI – texnewbie Oct 15 '18 at 16:53
  • @texnewbie It is a well known feature of standard LaTeX tables like tabular that they don't break across pages. You need something like longtable. – moewe Oct 16 '18 at 4:07
  • 1
    The newest version of my biblatex-ext bundle has a package for tabular bibliographies. You may want to have a look at it. – moewe Oct 16 '18 at 11:03

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.