按简称对参考书目进行排序?

按简称对参考书目进行排序?

我正在撰写一份报告,其中引用了大量主要来源,但没有作者字段。为了避免冗长,我确保“短标题”字段是文本中打印的内容。

通常很难在参考书目中识别短标题;但是,我的参考书目在完整参考文献之前先打印短标题。这有助于找到参考文献,所以一切都很好。例如,

@report{example_1965,
    title = {This is an example report blah blah},
    shorttitle ={Example Report},
    date = {1965-8-27},
}

在参考书目中打印如下:

Example Report (August 27, 1965). This is an example report blah blah.

只有一个问题:书目仍然按标题字母顺序排列,不是由 shorttitle 撰写。结果,一切都乱了套。例如:

Example Report 2 (August 27, 1965). A This is an example report blah blah.

Example Report 3 (August 27, 1965). B This is an example report blah blah.

Example Report 1 (August 27, 1965). C This is an example report blah blah.

理想情况下,报告应按其简称(编号)排序,因为该名称在每个参考文献中都排在第一位。我如何指示biblatex按“简称”而不是“标题”排序?

经过大量搜索后,我真的被这个问题难住了。有人暗示“标签”之类的选项可能会起作用,但我不想浏览 3000 多个来源的列表来查找并将所有相关的“短标题”更改为“标签”。我忽略了什么解决方案吗?

梅威瑟:

\documentclass[12pt]{report}

\begin{filecontents}{\abibliography.bib}
    @report{example_1965_1,
    title = {C This is an example report blah blah},
    shorttitle ={Example Report 1},
    date = {1965-8-27},
}
    @report{example_1965_2,
    title = {B This is an example report blah blah},
    shorttitle ={Example Report 2},
    date = {1965-8-29},
}
    @report{example_1965_3,
    title = {A This is an example report blah blah},
    shorttitle ={Example Report 3},
    date = {1965-8-28},
}
\end{filecontents}

% some customizations my publisher requires
\usepackage[
natbib=true,
maxcitenames=2, 
maxbibnames=99,
style=authoryear,
backend=bibtex, 
sorting=nyt, 
citetracker=true,
citestyle=authoryear-comp,
refsegment=chapter
]{biblatex}
\addbibresource{abibliography.bib}

\ExecuteBibliographyOptions[incollection]{useeditor=false}
\DeclareNameAlias{sortname}{last-first} 

\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{6}}}

\AtEveryBibitem{\clearfield{issn}}
\AtEveryBibitem{\clearlist{issn}}

\AtEveryBibitem{\clearfield{language}}
\AtEveryBibitem{\clearlist{language}}

\AtEveryBibitem{\clearfield{doi}}
\AtEveryBibitem{\clearlist{doi}}

\AtEveryBibitem{\clearfield{url}}
\AtEveryBibitem{\clearlist{url}}

\AtEveryBibitem{%
  \ifentrytype{online}
    {}
    {\clearfield{urlyear}\clearfield{urlmonth}\clearfield{urlday}}}


\begin{document}

    \tableofcontents

    \chapter{some_chapter}

blah blah \citep{example_1965_3} and \citep{example_1965_2} and \citep{example_1965_1}

% bibliographies
    \clearpage

% more required customizations
\titleformat{\chapter}[display]
{\normalfont\bfseries\filcenter}{}{0pt}{\large\bfseries\filcenter{#1}} 
\titlespacing*{\chapter}
  {0pt}{0pt}{30pt}

\begin{singlespace}
    \setlength\bibitemsep{\baselineskip}  
    \addcontentsline{toc}{chapter}{Bibliography}
    \printbibliography[title={References}]
\end{singlespace}

\end{document}

答案1

backend=bibtex,定义排序的选项相当有限。官方支持的唯一方法是设置字段sorttitle(设置为与 相同的值shorttitle),但这需要额外的工作并导致数据重复。

\documentclass[12pt]{article}

\usepackage[
  backend=bibtex, 
  natbib=true,
  style=authoryear-comp,
  maxcitenames=2, 
  maxbibnames=99,
  citetracker=true,
  doi=false,
  url=false,
  isbn=false,
%  refsegment=chapter,
]{biblatex}


\ExecuteBibliographyOptions[incollection]{useeditor=false}
\DeclareNameAlias{sortname}{family-given} 

\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{6}}}

\DeclareListInputHandler{list}{\def\NewValue{}}

\AtEveryBibitem{%
  \ifentrytype{online}
    {}
    {\clearfield{urlyear}\clearfield{urlmonth}\clearfield{urlday}}}

\begin{filecontents}{\jobname.bib}
@report{example_1965_1,
  title      = {C This is an example report blah blah},
  shorttitle = {Example Report 1},
  sorttitle  = {Example Report 1},
  date       = {1965-08-27},
}
@report{example_1965_2,
  title      = {B This is an example report blah blah},
  shorttitle = {Example Report 2},
  sorttitle  = {Example Report 2},
  date       = {1965-08-29},
}
@report{example_1965_3,
  title      = {A This is an example report blah blah},
  shorttitle = {Example Report 3},
  sorttitle  = {Example Report 3},
  date       = {1965-08-28},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
blah blah \citep{example_1965_3} and \citep{example_1965_2} and \citep{example_1965_1}

\printbibliography[title={References}]
\end{document}

参考书目中的示例报告 1//示例报告 2//示例报告 3


除非你有非常好的理由坚持使用 BibTeX,否则我建议你看看 Biber。更改backend=bibtex,backend=biber,并告诉你的编辑器为你运行 Biber (Biblatex 与 Biber:配置我的编辑器以避免未定义的引用)。

使用 Biber,更改所选排序方案nyt以考虑该shorttitle字段几乎是微不足道的。我们只需要\field{shorttitle}在正确的位置插入(原始定义可以在biblatex.def(v3.16)的第 1507-1534 行找到)。

请注意,Biber 会抱怨您的date字段,因为它们不是有效的 ISO 8601 格式。月份和日期必须用两位数字表示(用零填充)。所以date = {1965-8-27},应该是date = {1965-08-27},这样的。

\documentclass[12pt]{article}

\usepackage[
  backend=biber, 
  natbib=true,
  style=authoryear-comp,
  maxcitenames=2, 
  maxbibnames=99,
  citetracker=true,
  doi=false,
  url=false,
  isbn=false,
%  refsegment=chapter,
]{biblatex}


\ExecuteBibliographyOptions[incollection]{useeditor=false}
\DeclareNameAlias{sortname}{family-given} 

\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{6}}}

\DeclareListInputHandler{list}{\def\NewValue{}}

\AtEveryBibitem{%
  \ifentrytype{online}
    {}
    {\clearfield{urlyear}\clearfield{urlmonth}\clearfield{urlday}}}

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

\begin{filecontents}[force]{\jobname.bib}
@report{example_1965_1,
  title      = {C This is an example report blah blah},
  shorttitle = {Example Report 1},
  date       = {1965-08-27},
}
@report{example_1965_2,
  title      = {B This is an example report blah blah},
  shorttitle = {Example Report 2},
  date       = {1965-08-29},
}
@report{example_1965_3,
  title      = {A This is an example report blah blah},
  shorttitle = {Example Report 3},
  date       = {1965-08-28},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
blah blah \citep{example_1965_3} and \citep{example_1965_2} and \citep{example_1965_1}

\printbibliography[title={References}]
\end{document}

相关内容