Clasificación de entradas de bibliografía.

Clasificación de entradas de bibliografía.

Mientras trabajaba enBiblatex: dos estilos de cita para el mismo tipo de 'comentario'He creado estilos/tipos de bibliografía separados para comentarios legales alemanes, a sabercomentario: títuloycomentario:editor. Las entradas de citas y bibliografía funcionan como se esperaba.

Sin embargo, existe un problema de clasificación: las entradas con tipo = comentario:título deben ordenarse por título, mientras que las entradas con el tipo comentario:editor deben ordenarse por editor.

Aquí está el MWE actual que demuestra el problema.Zivilprozessordnungtiene que ser el último,Comentarios de Erfurter zum Arbeitsrechttiene que ser el primero. Tenga en cuenta que no sólo utilizaré comentarios, por lo que cualquier solución tendrá que aplicarse aartículo,libroyincoleccióntambién.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}

\usepackage{filecontents}
\begin{filecontents}{jobname.bib}

@COMMENTARY:EDITOR{palandt,
    editor = {Palandt, Otto},
    editortype = {founder},
    YEAR = {2019},
    TITLE = {Bürgerliches Gesetzbuch mit Nebengesetzen},
    EDITION = {79},
    ISBN = {978-3-406-73800-5},
    PUBLISHER = {C.H. Beck},
    ADDRESS = {München},
    shorthand = {Palandt},
    addendum   = {(zit. als Palandt/\emph{Bearbeiter})}
    %OPTIONS = {howcited},
}

@COMMENTARY:TITLE{muekobgb,
  maintitle  = {Münchener Kommentar zum Bürgerlichen Gesetzbuch},
  editor     = {Säcker, Franz},
  volume     = {1},
  title      = {Allgemeiner Teil},
  edition    = {7},
  address    = {München},
  year       = {2015},
  shorthand  = {MüKoBGB},
  addendum   = {(zit. als MüKoBGB/\emph{Bearbeiter})}
  %OPTIONS    = {howcited},
}

@COMMENTARY:TITLE{hdbversr,
  maintitle  = {Ver\-sicherungs\-rechts-Hand\-buch},
  editor     = {Beckmann, Roland Michael and Matusche-Beckmann, Annemarie},
  edition    = {3},
  address    = {München},
  year       = {2015},
  shorthand  = {VersRHdb},   
  %OPTIONS    = {howcited},
  addendum = {(zit. als \emph{Bearbeiter} in: VersRHdb)},
}

@COMMENTARY:EDITOR{maunzduerig,
  maintitle  = {Grundgesetz},
  editor     = {Maunz,  Theodor  and  Dürig,  Günter},
  editortype = {founder},
  edition    = {80. Erg.-Lfrg., Juni 2017},
  address    = {München},
  %year       = {2015},
  shorthand  = {Maunz/Dürig},   
  %OPTIONS    = {howcited},
  addendum = {(zit. als \emph{Bearbeiter} in: Maunz/Dürig)},  
}

@COMMENTARY:TITLE{erfk,
  maintitle  = {Erfurter Kommentar zum Arbeitsrecht},
  editor     = {Müller-Glöge, Rudi and Preis, Ulrich and Schmidt, Ingrid},
  edition    = {16},
  address    = {München},
  year       = {2016},
  shorthand  = {ErfK},
  addendum   = {(zit. als ErfK/\emph{Bearbeiter})}
  %OPTIONS    = {howcited},
}

@COMMENTARY:TITLE{blah,
  maintitle  = {Zivilprozessordnung. Mit FamFG, GVG und anderen Nebengesetzen},
  editor     = {Baumbach, Adolf and Lauterbach, Wolfgang and Albers, Jan and Hartmann, Peter},
  edition    = {74},
  address    = {München},
  year       = {2016},
  shorthand  = {BLAH},
  addendum   = {(zit. als BLAH/\emph{Bearbeiter})}
  %OPTIONS    = {howcited},
}

@COMMENTARY:TITLE{blah2,
  maintitle  = {Zivilprozessordnung mit verschiedenen Editor-Typen},
  editor     = {Baumbach, Adolf},
  editortype = {founder},
  editora    = {Lauterbach, Wolfgang}, 
  editoratype = {continuator},
  editorb    = {Albers, Jan and Hartmann, Peter},
  editorbtype = {editor},
  edition    = {74},
  address    = {München},
  year       = {2016},
  shorthand  = {BLAH2},
  addendum   = {(zit. als BLAH2/\emph{Bearbeiter})}
  %OPTIONS    = {howcited},
}

@COMMENTARY:TITLE{staudinger,
  maintitle  = {Kommentar zum Bürgerlichen Gesetzbuch},
  editor     = {Staudinger, J. von},
  editortype = {founder},

}
\end{filecontents}

\usepackage[%
  backend=biber,%
  sorting=nty,%
  sortcites=true,%
  maxnames=4,%
  minnames=4,%
  style=ext-authortitle-ibid,%
  articlein=false,%
  %innamebeforetitle=true,
  useprefix=true,%
  isbn=false,%
]{biblatex}
\usepackage[babel, german=quotes]{csquotes}
\usepackage{xpatch}
\addbibresource{jobname.bib}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Globale Änderungen
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Namen kursiv (außer bei commentary:title)
\renewcommand*{\mkbibnamefamily}[1]{%
  \ifboolexpr{%
    test {\ifentrytype{commentary:title}}%
    }%
  {}%
  \mkbibemph{#1}}

\renewcommand*{\mkbibnamegiven}[1]{%
  \ifboolexpr{
    test {\ifentrytype{commentary:title}}
    }%
  {}%
  \mkbibemph{#1}}

\renewcommand*{\mkbibnameprefix}[1]{%
  \ifboolexpr{
    test {\ifentrytype{commentary:title}}
    }%
  {}%
  \mkbibemph{#1}}

\renewcommand*{\mkbibnamesuffix}[1]{%
\ifboolexpr{
    test {\ifentrytype{commentary:title}}
    }%
  {}%
  \mkbibemph{#1}}

%Im Literaturverzeichnis Doppelpunkt nach Namen, kein Punkt
\renewcommand*{\labelnamepunct}{\addcolon\space} 

%  Schrägstriche zwischen den Autoren 
\renewcommand*{\multinamedelim}{\addslash}% 
\renewcommand*{\finalnamedelim}{\multinamedelim}%

% ebd. kursiv
\renewcommand*{\mkibid}{\mkbibemph}

% Keine Ausgabe des Verlags
\AtEveryCitekey{\clearlist{publisher}}
\AtEveryBibitem{\clearlist{publisher}}

% Keine Ausgabe des Ortes
%\AtEveryCitekey{\clearlist{location}}
%\AtEveryBibitem{\clearlist{location}}

% Namen sortiert als Nachname, Vorname
\DeclareNameAlias{sortname}{family-given}

% Kein Punkt am Ende des Eintrags im LitVZ
%\renewcommand{\finentrypunct}{}

% kein Punkt nach Addendum
\renewcommand*{\finentrypunct}{%
  \iffieldundef{addendum}%
    {\addperiod}%
    {}%
  }

% 'Auflage' statt 'Aufl.'
%\DefineBibliographyStrings{german}{%
%  edition = {\ifbibliography{Auflage}{Aufl\adddot}},%
%}%

% Erkennt Satzzeichen & setzt kein Komma ausser bei Abkurzungen
%\DefineBibliographyExtras{german}{\DeclarePunctuationPairs{comma}{*}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Definition von 'commentary'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareBibliographyDriver{commentary:editor}{%
  \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}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\space}%
  \usebibmacro{date}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}%
  \newblock
  \usebibmacro{finentry}}

\DeclareBibliographyDriver{commentary:title}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{maintitle+title}% neu
  \newunit\newblock% neu
  \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}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\space}%
  \usebibmacro{date}%
  \newunit\newblock
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}%
  \newblock
  \usebibmacro{finentry}}

\let\oldpostnotedelim\postnotedelim
\renewcommand*{\postnotedelim}{  
  \ifboolexpr{
    test {\ifentrytype{commentary:editor}}
    or
    test {\ifentrytype{commentary:title}}
    }%
  {}%
  {\oldpostnotedelim}} 

\DeclareFieldFormat{postnote:stem}{\oldpostnotedelim\mkpageprefix[pagination][\mknormrange]{#1}}
\DeclareFieldFormat{postnote:prefix}{\addslash\mkbibemph{#1}}
\DeclareFieldFormat{postnote}{\mkpostnote{#1}}

\makeatletter
\newrobustcmd*{\mkpostnote}[1]{\mkpostnote@i#1&}

\def\mkpostnote@i{%
  \@ifnextchar(%)
    {\mkpostnote@ii}
    {\mkpostnote@ii()}}

\def\mkpostnote@ii(#1)#2&{%
  \ifblank{#1}{}{%
    \blx@getformat\cbx@postnote@prefix@fmt{ffd}{}{postnote:prefix}%
    \cbx@postnote@prefix@fmt{#1}}%
  \ifblank{#2}{}{%
    \blx@getformat\cbx@postnote@stem@fmt{ffd}{}{postnote:stem}%
    \cbx@postnote@stem@fmt{#2}}%
  }
\def\cbx@postnote@stem@fmt{}
\def\cbx@postnote@prefix@fmt{}
\makeatother

% 'editortype' in Klammern
\DeclareFieldFormat[commentary:editor,commentary:title]{editortype}{\mkbibparens{#1}}

% Doppelpunkt nach 'editortype'
\renewcommand*{\editortypedelim}{
  \ifboolexpr{
    test {\ifentrytype{commentary:editor}}
    or
    test {\ifentrytype{commentary:title}}
    }
    {}%
    {\addcomma\space}%
  }%

% Titel nicht kursiv
\DeclareFieldFormat[commentary:editor]{title}{\normalfont{#1}}
\DeclareFieldFormat[commentary:editor]{citetitle}{\normalfont{#1}}
\DeclareFieldFormat[commentary:editor]{maintitle}{\normalfont{#1}}


% Kursive Schrift für Bearbeiter von Kommentaren und "in: "
\DeclareFieldFormat[commentary:title,commentary:editor]{prenote}{\mkbibemph{#1}\addspace in \addcolon}%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Mustertext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\section*{Beispiele juristischer Kommentare}

\subsection*{Kommentare mit Zitierschema \texttt{commentator:mid}}
\cite[(Ellenberger)§ 134 Rn. 14]{palandt}.\footcite[(Ellenberger)§ 134 Rn. 14]{palandt}\\
\cite[(Armbrüster)§~138 Rn.~9]{muekobgb}.\footcite[(Armbrüster)§ 138 Rn. 9]{muekobgb} \\
\cite[(Hartmann)§ 287 Rn. 5]{blah}. \footcite[(Hartmann)§ 287 Rn. 5]{blah} \\
\cite[(Hartmann)§ 286 Rn. 13]{blah2}. \footcite[(Hartmann)§ 286 Rn. 13]{blah2}\\
\cite[(Bearbeiter)§ 1 KSchG Rn. 2]{erfk}.\footcite[(Bearbeiter)§ 1 KSchG Rn. 2]{erfk}\\

\subsection*{Kommentare mit Zitierschema \texttt{commentator:pre}}

\cite[Matusche-Beckmann][§ 3 Rn. 15]{hdbversr}.\footcite[Matusche-Beckmann][§ 3 Rn. 15]{hdbversr}\\
\cite[Mustermann][Art.~20 Rn.~3]{maunzduerig}.\footcite[Mustermann][Art. 20 Rn. 3]{maunzduerig}

\printbibliography[type=commentary:editor,title={Literatur (nur \texttt{commentary:editor})}]

\printbibliography[type=commentary:title,title={Literatur (nur \texttt{commentary:title})}]

\printbibliography

\end{document}

Respuesta1

Si no desea utilizar autor, editor y otros nombres para ordenar, puede emitir las opciones useauthor=false, useditor=false,para esas entradas. En las nuevas versiones biblatexes posible hacerlo por tipo.

\ExecuteBibliographyOptions[commentary:title]{useeditor=false}

Entonces sólo necesitas asegurarte de que el esquema de clasificación también tenga en cuenta maintitle, ya que utilizas ese campo ampliamente. La definición habitual sólo toma sorttitley title. Una extensión natural de la definición estándar sería

\DeclareSortingTemplate{nty}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{sorttitle}
    \field{maintitle}
    \field{title}
  }
  \sort{
    \field{sorttitle}
    \field{maintitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
}

En total

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}


\usepackage[%
  backend=biber,%
  sorting=nty,%
  sortcites=true,%
  maxnames=4,%
  minnames=4,%
  style=ext-authortitle-ibid,%
  articlein=false,%
  %innamebeforetitle=true,
  useprefix=true,%
  isbn=false,%
]{biblatex}
\usepackage[babel, german=quotes]{csquotes}

\ExecuteBibliographyOptions[commentary:title]{useeditor=false}

\DeclareSortingTemplate{nty}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{sorttitle}
    \field{maintitle}
    \field{title}
  }
  \sort{
    \field{sorttitle}
    \field{maintitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
}


\renewcommand*{\mkbibnamefamily}[1]{%
  \ifboolexpr{%
    test {\ifentrytype{commentary:title}}%
    }%
  {#1}%
  {\mkbibemph{#1}}}

\renewcommand*{\mkbibnamegiven}[1]{%
  \ifboolexpr{
    test {\ifentrytype{commentary:title}}
    }%
  {#1}%
  {\mkbibemph{#1}}}

\renewcommand*{\mkbibnameprefix}[1]{%
  \ifboolexpr{
    test {\ifentrytype{commentary:title}}
    }%
  {#1}%
  {\mkbibemph{#1}}}

\renewcommand*{\mkbibnamesuffix}[1]{%
  \ifboolexpr{
    test {\ifentrytype{commentary:title}}
    }%
  {#1}%
  {\mkbibemph{#1}}}


%Im Literaturverzeichnis Doppelpunkt nach Namen, kein Punkt
\DeclareDelimFormat[bib]{nametitledelim}{\addcolon\space} 

%  Schrägstriche zwischen den Autoren 
\DeclareDelimFormat{multinamedelim}{\addslash}% 
\DeclareDelimAlias{finalnamedelim}{multinamedelim}%

% ebd. kursiv
\renewcommand*{\mkibid}{\mkbibemph}

% Keine Ausgabe des Verlags
\AtEveryCitekey{\clearlist{publisher}}
\AtEveryBibitem{\clearlist{publisher}}

% Keine Ausgabe des Ortes
%\AtEveryCitekey{\clearlist{location}}
%\AtEveryBibitem{\clearlist{location}}

% Namen sortiert als Nachname, Vorname
\DeclareNameAlias{sortname}{family-given}

% Kein Punkt am Ende des Eintrags im LitVZ
%\renewcommand{\finentrypunct}{}

% kein Punkt nach Addendum
\renewcommand*{\finentrypunct}{%
  \iffieldundef{addendum}%
    {\addperiod}%
    {}%
  }

% 'Auflage' statt 'Aufl.'
%\DefineBibliographyStrings{german}{%
%  edition = {\ifbibliography{Auflage}{Aufl\adddot}},%
%}%

% Erkennt Satzzeichen & setzt kein Komma ausser bei Abkurzungen
%\DefineBibliographyExtras{german}{\DeclarePunctuationPairs{comma}{*}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Definition von 'commentary'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\DeclareBibliographyDriver{commentary:editor}{%
  \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}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\space}%
  \usebibmacro{date}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}%
  \newblock
  \usebibmacro{finentry}}

\DeclareBibliographyDriver{commentary:title}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{maintitle+title}% neu
  \newunit\newblock% neu
  \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}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\space}%
  \usebibmacro{date}%
  \newunit\newblock
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}%
  \newblock
  \usebibmacro{finentry}}

\let\oldpostnotedelim\postnotedelim
\renewcommand*{\postnotedelim}{%
  \ifboolexpr{
    test {\ifentrytype{commentary:editor}}
    or
    test {\ifentrytype{commentary:title}}
    }%
  {}%
  {\oldpostnotedelim}} 

\DeclareFieldFormat{postnote:stem}{\oldpostnotedelim\mkpageprefix[pagination][\mknormrange]{#1}}
\DeclareFieldFormat{postnote:prefix}{\addslash\mkbibemph{#1}}
\DeclareFieldFormat{postnote}{\mkpostnote{#1}}

\makeatletter
\newrobustcmd*{\mkpostnote}[1]{\mkpostnote@i#1&}

\def\mkpostnote@i{%
  \@ifnextchar(%)
    {\mkpostnote@ii}
    {\mkpostnote@ii()}}

\def\mkpostnote@ii(#1)#2&{%
  \ifblank{#1}{}{%
    \blx@getformat\cbx@postnote@prefix@fmt{ffd}{}{postnote:prefix}%
    \cbx@postnote@prefix@fmt{#1}}%
  \ifblank{#2}{}{%
    \blx@getformat\cbx@postnote@stem@fmt{ffd}{}{postnote:stem}%
    \cbx@postnote@stem@fmt{#2}}%
  }
\def\cbx@postnote@stem@fmt{}
\def\cbx@postnote@prefix@fmt{}
\makeatother

% 'editortype' in Klammern
\DeclareFieldFormat[commentary:editor,commentary:title]{editortype}{\mkbibparens{#1}}

% Doppelpunkt nach 'editortype'
\renewcommand*{\editortypedelim}{%
  \ifboolexpr{
    test {\ifentrytype{commentary:editor}}
    or
    test {\ifentrytype{commentary:title}}
    }
    {\addspace}%
    {\addcomma\space}%
  }%

% Titel nicht kursiv
\DeclareFieldFormat[commentary:editor]{title}{\normalfont{#1}}
\DeclareFieldFormat[commentary:editor]{citetitle}{\normalfont{#1}}
\DeclareFieldFormat[commentary:editor]{maintitle}{\normalfont{#1}}


% Kursive Schrift für Bearbeiter von Kommentaren und "in: "
\DeclareFieldFormat[commentary:title,commentary:editor]{prenote}{\mkbibemph{#1}\space\bibstring{in}\addcolon}%


\begin{filecontents}{\jobname.bib}
@COMMENTARY:EDITOR{palandt,
    editor = {Palandt, Otto},
    editortype = {founder},
    YEAR = {2019},
    TITLE = {Bürgerliches Gesetzbuch mit Nebengesetzen},
    EDITION = {79},
    ISBN = {978-3-406-73800-5},
    PUBLISHER = {C.H. Beck},
    ADDRESS = {München},
    shorthand = {Palandt},
    addendum   = {(zit. als Palandt/\emph{Bearbeiter})}
    %OPTIONS = {howcited},
}

@COMMENTARY:TITLE{muekobgb,
  maintitle  = {Münchener Kommentar zum Bürgerlichen Gesetzbuch},
  editor     = {Säcker, Franz},
  volume     = {1},
  title      = {Allgemeiner Teil},
  edition    = {7},
  address    = {München},
  year       = {2015},
  shorthand  = {MüKoBGB},
  addendum   = {(zit. als MüKoBGB/\emph{Bearbeiter})}
  %OPTIONS    = {howcited},
}

@COMMENTARY:TITLE{hdbversr,
  maintitle  = {Ver\-sicherungs\-rechts-Hand\-buch},
  editor     = {Beckmann, Roland Michael and Matusche-Beckmann, Annemarie},
  edition    = {3},
  address    = {München},
  year       = {2015},
  shorthand  = {VersRHdb},   
  %OPTIONS    = {howcited},
  addendum = {(zit. als \emph{Bearbeiter} in: VersRHdb)},
}

@COMMENTARY:EDITOR{maunzduerig,
  maintitle  = {Grundgesetz},
  editor     = {Maunz,  Theodor  and  Dürig,  Günter},
  editortype = {founder},
  edition    = {80. Erg.-Lfrg., Juni 2017},
  address    = {München},
  %year       = {2015},
  shorthand  = {Maunz/Dürig},   
  %OPTIONS    = {howcited},
  addendum = {(zit. als \emph{Bearbeiter} in: Maunz/Dürig)},  
}

@COMMENTARY:TITLE{erfk,
  maintitle  = {Erfurter Kommentar zum Arbeitsrecht},
  editor     = {Müller-Glöge, Rudi and Preis, Ulrich and Schmidt, Ingrid},
  edition    = {16},
  address    = {München},
  year       = {2016},
  shorthand  = {ErfK},
  addendum   = {(zit. als ErfK/\emph{Bearbeiter})}
  %OPTIONS    = {howcited},
}

@COMMENTARY:TITLE{blah,
  maintitle  = {Zivilprozessordnung. Mit FamFG, GVG und anderen Nebengesetzen},
  editor     = {Baumbach, Adolf and Lauterbach, Wolfgang and Albers, Jan and Hartmann, Peter},
  edition    = {74},
  address    = {München},
  year       = {2016},
  shorthand  = {BLAH},
  addendum   = {(zit. als BLAH/\emph{Bearbeiter})}
  %OPTIONS    = {howcited},
}

@COMMENTARY:TITLE{blah2,
  maintitle  = {Zivilprozessordnung mit verschiedenen Editor-Typen},
  editor     = {Baumbach, Adolf},
  editortype = {founder},
  editora    = {Lauterbach, Wolfgang}, 
  editoratype = {continuator},
  editorb    = {Albers, Jan and Hartmann, Peter},
  editorbtype = {editor},
  edition    = {74},
  address    = {München},
  year       = {2016},
  shorthand  = {BLAH2},
  addendum   = {(zit. als BLAH2/\emph{Bearbeiter})}
  %OPTIONS    = {howcited},
}

@COMMENTARY:TITLE{staudinger,
  maintitle  = {Kommentar zum Bürgerlichen Gesetzbuch},
  editor     = {Staudinger, J. von},
  editortype = {founder},

}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\section*{Beispiele juristischer Kommentare}

\subsection*{Kommentare mit Zitierschema \texttt{commentator:mid}}
\cite[(Ellenberger)§ 134 Rn. 14]{palandt}.\footcite[(Ellenberger)§ 134 Rn. 14]{palandt}\\
\cite[(Armbrüster)§~138 Rn.~9]{muekobgb}.\footcite[(Armbrüster)§ 138 Rn. 9]{muekobgb} \\
\cite[(Hartmann)§ 287 Rn. 5]{blah}. \footcite[(Hartmann)§ 287 Rn. 5]{blah} \\
\cite[(Hartmann)§ 286 Rn. 13]{blah2}. \footcite[(Hartmann)§ 286 Rn. 13]{blah2}\\
\cite[(Bearbeiter)§ 1 KSchG Rn. 2]{erfk}.\footcite[(Bearbeiter)§ 1 KSchG Rn. 2]{erfk}\\

\subsection*{Kommentare mit Zitierschema \texttt{commentator:pre}}

\cite[Matusche-Beckmann][§ 3 Rn. 15]{hdbversr}.\footcite[Matusche-Beckmann][§ 3 Rn. 15]{hdbversr}\\
\cite[Mustermann][Art.~20 Rn.~3]{maunzduerig}.\footcite[Mustermann][Art. 20 Rn. 3]{maunzduerig}

\printbibliography[type=commentary:editor,title={Literatur (nur \texttt{commentary:editor})}]

\printbibliography[type=commentary:title,title={Literatur (nur \texttt{commentary:title})}]

\printbibliography

\end{document}

Cambié algunas cosas pequeñas que me llamaron la atención, pero no revisé todo el código.

Las redefiniciones de \mkbibnamefamilyhicieron lo que se suponía que debían hacer, pero aun así recomendaría la forma un poco más estándar de escribirlas que usé aquí.

En teoria

\ifboolexpr{%
  test {\ifentrytype{commentary:title}}%
}%

Por supuesto, podría ser reemplazado por

\ifentrytype{commentary:title}

información relacionada