是否有可能以字母顺序获取参考书目条目,即按照速记的“标题”(而不是作品作者)进行排序?感谢@moewe 一直以来的帮助,以下代码是从他的一个答案中复制而来的(添加了 Vernay 条目):
\documentclass[a4paper, 12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[french, ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[autostyle]{csquotes}
\usepackage[
backend=biber,
style=ext-authoryear,
innamebeforetitle=true,
innameidem=true,
maxcitenames=2,
dashed=false,
]{biblatex}
\DefineBibliographyExtras{french}{\restorecommand\mkbibnamefamily}
\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{ineditor}{sortname}
\DeclareDelimFormat[bib]{multinamedelim}{\addspace\slash\space}
\DeclareDelimFormat{multinamedelim}{\slash}
\DeclareDelimAlias{finalnamedelim}{multinamedelim}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldAlias{translatortype}{editortype}
\DeclareDelimAlias{translatortypedelim}{editortypedelim}
\DeclareDelimFormat[bib]{nametitledelim}{\adddot\space}
\renewbibmacro{begentry}{%
\printfield{shorthand}%
\setunit*{\addspace=\space}%
}
\renewbibmacro*{in:}{%
\setunit{\addcomma\space}%
\bibstring{in}%
\printunit{\intitlepunct}}
\renewbibmacro*{volume+number+eid}{%
\printfield{volume}%
\setunit*{\addnbthinspace}%
\printfield{number}%
\setunit{\addcomma\space}%
\printfield{eid}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
\urlstyle{same}
\DeclareFieldFormat{url}{URL: <\url{#1}>}
\DeclareFieldFormat{urldate}{\mkbibbrackets{#1}}
\DefineBibliographyStrings{german}{
editor = {Hrsg\adddot},
editors = {Hrsg\adddot},
}
\DeclareFieldFormat{superedition}{\textsuperscript{#1}}
\makeatletter
\renewbibmacro*{date+extradate}{%
\iffieldundef{origyear}{%
}{%
\setunit*{\addspace}%
\printtext{\mkbibbrackets{\printorigdate}}%
\setunit*{\addspace}
}%
\iffieldundef{labelyear}
{}
{\printtext[\blx@delimcontext labeldate]{%
\printfield[superedition]{edition}%
\global\clearfield{edition}%
\iflabeldateisdate
{\printdateextra}
{\printlabeldateextra}}}}
\makeatother
\renewbibmacro*{series+number}{%
\setunit{\addspace}%
\iffieldundef{series}
{}
{\printtext[parens]{%
\printfield{series}%
\setunit*{\sernumdelim}%
\printfield{number}}}%
\newunit}
\renewbibmacro*{byeditor+others}{%
\ifnameundef{editor}
{}
{\setunit{\addcomma\addspace}%
\usebibmacro{byeditor+othersstrg}%
\setunit{\addspace}%
\printnames[byeditor]{editor}%
\clearname{editor}%
\setunit{\addspace}%
\newunit}%
\usebibmacro{byeditorx}%
\usebibmacro{bytranslator+others}}
\begin{filecontents}{\jobname.bib}
@mvbook{Battaglia,
author = {Battaglia, Salvatore},
title = {Grande dizionario della lingua italiana},
publisher = {UTET},
date = {1961/2008},
address = {Turin},
volumes = 21,
shorthand = {GDLI},
}
@mvbook{Vernay,
author = {Vernay, Henri},
title = {Dictionnaire onomasiologique des langues romanes},
publisher = {Niemeyer},
date = {1991},
address = {Tübingen},
volume = 1,
shorthand = {DOLR},
}
@book{Holtus,
editor = {Günther, Holtus and Metzeltin, Michael and Schmitt, Christian},
maintitle = {Lexikon der Romanistischen Linguistik},
title = {Kontakt, Migration und Kunstsprachen.
Kontrastivität, Klassifikation und Typologie},
volume = {7},
address = {Tübingen},
publisher = {Niemeyer},
shorthand = {LRL7},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}
\enquote{Il participio dei verbi intransitivi coniugati con *essere* è accordato con il soggetto}
\autocite[117]{Battaglia}
Lorem \autocite{Holtus,sigfridsson,Vernay}
\printbibliography
\end{document}
因此默认情况下,作品 DOLR 必须是列出的最后一个条目,因为它是作者的姓氏。但是,我希望它显示在最开始,以便按简写排序(D 是给定条目中的第一个字母)。
答案1
您可以重新定义排序方案,以便通过在所需位置shorthand
插入来考虑。\field{shorthand}
\documentclass[a4paper, 12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[french, ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[autostyle]{csquotes}
\usepackage[
backend=biber,
style=ext-authoryear,
innamebeforetitle=true,
innameidem=true,
maxcitenames=2,
dashed=false,
]{biblatex}
\DefineBibliographyExtras{french}{\restorecommand\mkbibnamefamily}
\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{ineditor}{sortname}
\DeclareDelimFormat[bib]{multinamedelim}{\addspace\slash\space}
\DeclareDelimFormat{multinamedelim}{\slash}
\DeclareDelimAlias{finalnamedelim}{multinamedelim}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldAlias{translatortype}{editortype}
\DeclareDelimAlias{translatortypedelim}{editortypedelim}
\DeclareDelimFormat[bib]{nametitledelim}{\adddot\space}
\renewbibmacro{begentry}{%
\printfield{shorthand}%
\setunit*{\addspace=\space}%
}
\renewbibmacro*{in:}{%
\setunit{\addcomma\space}%
\bibstring{in}%
\printunit{\intitlepunct}}
\renewbibmacro*{volume+number+eid}{%
\printfield{volume}%
\setunit*{\addnbthinspace}%
\printfield{number}%
\setunit{\addcomma\space}%
\printfield{eid}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
\urlstyle{same}
\DeclareFieldFormat{url}{URL: <\url{#1}>}
\DeclareFieldFormat{urldate}{\mkbibbrackets{#1}}
\DefineBibliographyStrings{german}{
editor = {Hrsg\adddot},
editors = {Hrsg\adddot},
}
\DeclareFieldFormat{superedition}{\textsuperscript{#1}}
\makeatletter
\renewbibmacro*{date+extradate}{%
\iffieldundef{origyear}{%
}{%
\setunit*{\addspace}%
\printtext{\mkbibbrackets{\printorigdate}}%
\setunit*{\addspace}
}%
\iffieldundef{labelyear}
{}
{\printtext[\blx@delimcontext labeldate]{%
\printfield[superedition]{edition}%
\global\clearfield{edition}%
\iflabeldateisdate
{\printdateextra}
{\printlabeldateextra}}}}
\makeatother
\renewbibmacro*{series+number}{%
\setunit{\addspace}%
\iffieldundef{series}
{}
{\printtext[parens]{%
\printfield{series}%
\setunit*{\sernumdelim}%
\printfield{number}}}%
\newunit}
\renewbibmacro*{byeditor+others}{%
\ifnameundef{editor}
{}
{\setunit{\addcomma\addspace}%
\usebibmacro{byeditor+othersstrg}%
\setunit{\addspace}%
\printnames[byeditor]{editor}%
\clearname{editor}%
\setunit{\addspace}%
\newunit}%
\usebibmacro{byeditorx}%
\usebibmacro{bytranslator+others}}
\DeclareSortingTemplate{nyt}{
\sort{
\field{presort}
}
\sort[final]{
\field{sortkey}
}
\sort{
\field{shorthand}
\field{sortname}
\field{author}
\field{editor}
\field{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sortyear}
\field{year}
}
\sort{
\field{sorttitle}
\field{title}
}
\sort{
\field{volume}
\literal{0}
}
}
\begin{filecontents}{\jobname.bib}
@mvbook{Battaglia,
author = {Battaglia, Salvatore},
title = {Grande dizionario della lingua italiana},
publisher = {UTET},
date = {1961/2008},
address = {Turin},
volumes = 21,
shorthand = {GDLI},
}
@mvbook{Vernay,
author = {Vernay, Henri},
title = {Dictionnaire onomasiologique des langues romanes},
publisher = {Niemeyer},
date = {1991},
address = {Tübingen},
volume = 1,
shorthand = {DOLR},
}
@book{Holtus,
editor = {Günther, Holtus and Metzeltin, Michael and Schmitt, Christian},
maintitle = {Lexikon der Romanistischen Linguistik},
title = {Kontakt, Migration und Kunstsprachen.
Kontrastivität, Klassifikation und Typologie},
volume = {7},
address = {Tübingen},
publisher = {Niemeyer},
shorthand = {LRL7},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}
\enquote{Il participio dei verbi intransitivi coniugati con *essere* è accordato con il soggetto}
\autocite[117]{Battaglia}
Lorem \autocite{Holtus,sigfridsson,Vernay}
\printbibliography
\end{document}