This is a follow-up to Customizing biblatex lists of abbreviations: separate lists for different authors. With moewe's
\DeclareBibliographyDriver{shorthand}{%
\usebibmacro{title}%
\newunit\newblock
\printdate}
there's only title and date in the list of shorthands. However, it turns out I need two types of shorthand lists, one with only title and date, and the other with author, title, and date. The reason is that I have abbreviations of two main authors, but also abbreviations from a number of other authors; for the latter it would be helpful for the reader to see the author. So, for example, I would like to have a slight change from what one gets from moewe's code:
The change is that I'd like to have
KS Frege, Gottlob, Kleine Schriften, 1967
in the final, "Shorthands by other authors" part.
Edit following David Purton's answer.
The answer is very helpful but doesn't fully work. The problem now is that all entries by the authors in question show up in the lists of shorthands, even those for which there is no shorthand in the .bib file. Here's an MWE:
\documentclass{book}
\usepackage{fontspec}
\usepackage{microtype}
\usepackage{polyglossia}
\setmainlanguage{english}
\usepackage[style=authoryear,natbib=true,backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{Frege1967,
Title = {{K}leine {S}chriften},
Address = {Hildesheim},
Author = {Frege, Gottlob},
Publisher = {Georg Olms},
Year = {1967},
Shorthand = {\emph{KS}}
}
@Article{Russell1905b,
Title = {{O}n {D}enoting},
Author = {Russell, Bertrand},
Year = {1905},
Number = {56},
Pages = {479-493},
Volume = {14},
Journal = {Mind}
}
@Book{Bradley1893,
Title = {{A}ppearance and {R}eality: a {M}etaphysical {E}ssay},
Address = {London},
Author = {Bradley, Francis Herbert},
Publisher = {Swan Sonnenshein},
Year = {1893},
Shorthand = {\emph{AR}}
}
@Article{Korselt1903,
Title = {{Ü}ber die {G}rundlagen der {G}eometrie},
Author = {Korselt, Alwin},
Journaltitle = {Jahresbericht der Deutschen Mathematiker Vereinigung},
Year = {1903},
Pages = {402–7}
}
@Inbook{Peirce1880a,
Title = {{A} {B}oolian {A}lgebra with {O}ne {C}onstant},
Author = {Peirce, Charles Sanders},
Booktitle = {Collected Papers of Charles Sanders Peirce},
Year = {1880},
Editor = {Hartshorne, Charles and Weiss, Paul and Burks, Arthur},
Pages = {12-20},
Publisher = {Harvard University Press},
Volume = {4}
}
@Article{Moore1899,
Title = {{T}he {N}ature of {J}udgment},
Author = {Moore, G. E.},
Year = {1899},
Number = {30},
Pages = {176-193},
Volume = {8},
Journal = {Mind},
Shorthand = {\emph{NJ}},
}
@Mvbook{Whitehead1910-1913,
Title = {{P}rincipia {M}athematica},
Author = {Whitehead, Alfred North and Russell, Bertrand},
Year = {1910-1913},
Edition = {1},
Address = {Cambridge},
Publisher = {Cambridge University Press},
Shorthand = {\emph{PM}}
}
@Inbook{Frege1918,
Title = {{T}hought},
Author = {Frege, Gottlob},
Year = {1918},
Pages = {351-372},
Crossref = {Frege1984}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\newcommand*{\generateauthorcategory}[3]{%
\DeclareBibliographyCategory{by#1}%
\DeclareIndexNameFormat{cat#1}{%
\ifboolexpr{
test {\ifdefstring{\namepartfamily}{#2}}
and
test {\ifdefstring{\namepartgiven}{#3}}
}%
{\addtocategory{by#1}{\thefield{entrykey}}}
{}}%
\AtDataInput{\indexnames[cat#1][1-999]{author}}}
\generateauthorcategory{frege}{Frege}{Gottlob}
\generateauthorcategory{russell}{Russell}{Bertrand}
\generateauthorcategory{moore}{Moore}{G.\bibnamedelimi E.}
\defbibfilter{moorerussell}{%
( category=bymoore or category=byrussell )
}
\defbibfilter{notmainprimary}{%
not category=byfrege
and not category=bymoore
and not category=byrussell
}
\defbibcheck{primarysource}{%
\iffieldint{year}
{\ifnumless{\thefield{year}}{1925}
{}
{\skipentry}}
{\skipentry}}
\defbibcheck{secondarysource}{%
\iffieldint{year}
{\ifnumgreater{\thefield{year}}{1925}
{}
{\skipentry}}
{\skipentry}}
\DeclareBiblistFilter{author}{
\filter[type=field,filter=shorthand]
}
\DeclareBiblistFilter{title}{
\filter[type=field,filter=shorthand]
}
\DeclareBibliographyDriver{author}{%
\usebibmacro{title}%
\newunit\newblock
\printdate}
\DeclareBibliographyDriver{title}{%
\renewbibmacro*{date+extradate}{}%
\usebibmacro{author/editor+others/translator+others}%
\setunit{\addcomma\space}\newblock
\usebibmacro{title}%
\setunit{\addcomma\space}\newblock
\printdate}
\begin{document}
\chapter*{Abbreviations}
Full details of these works are in the Bibliography.
\printbiblist[env=shorthand,title={Works of Frege}, heading=subbibliography, category=byfrege]{author}
\printbiblist[env=shorthand,title={Works of Moore and Russell}, heading=subbibliography, filter=moorerussell]{author}
\printbiblist[env=shorthand,title={Other Primary Works}, heading=subbibliography, check=primarysource, notcategory=byfrege, notcategory=bymoore, notcategory=byrussell]{title}
\nocite{Frege1967,Russell1905b,Bradley1893,Korselt1903,Moore1899,Peirce1880a,Whitehead1910-1913,Frege1918}
\end{document}
When built in TeXStudio the result is:
"Thought," "On Denoting," and the Korselt and Peirce papers are in the list, but have no shorthands. So the question is how to exclude these from the list.
I've just now tried to implement moeve's suggestion in comment to David Purton's answer by adding \DeclareBiblistFilter's, but alas this has no effect. Most likely I've not written the right filters.



biblatexand Biber do you use? – moewe Dec 25 '17 at 06:46\DeclareSortingTemplate{shorthand}{ \sort[final]{ \field{sortshorthand} } \sort{ \field{shorthand} } }is the standard definition forshorthandsorting. In David's answer you'd need to have the same definitions for anauthorandtitlesorting template. – moewe Dec 27 '17 at 22:09