在下面给出的 latex 文件中,我想按姓氏(第一作者)的字母顺序对参考文献进行排序。目前,参考文献以数字形式引用,其中第一次提到的引用在参考书目中被分配编号 1,第二次提到的引用被分配编号 2,依此类推。下图显示了当前的排序方式。
我希望参考书目(以及不同章节中的正文)中的参考文献的编号基于按姓氏(第一作者)的字母顺序排列在上面给出的例子中,顺序应该是1.> L Amendola et al., 2.> A Einstein, 3.> S Perlmutter
。我该怎么做?
这是我的tex
文件。
\documentclass[a4paper,twoside]{latexclass}
\usepackage[style=numeric-comp, sorting=none, backend=bibtex, doi=false, isbn=false, natbib=true]{biblatex}
\makeatletter
\def\blx@maxline{77}
\makeatother
\newcommand*{\bibtitle}{References}
\renewcommand*{\bibfont}{\raggedright\small}
\addbibresource{ref.bib}
\providecommand\apj{The Astrophysical Journal}
\DeclareUnicodeCharacter{2009}{\,}
\DeclareUnicodeCharacter{2212}{\,}
\DeclareUnicodeCharacter{223C}{\,}
\begin{document}
\section{Section}
Cite \cite{Perlmutter1999, Amendola2017, Einstein1915}
{\renewcommand*\MakeUppercase[1]{#1}%
\printbibliography[heading=bibintoc,title={\bibtitle}]}
\end{document}
这是我的cls
文件(latexclass.cls
)
\LoadClass[openright,12pt]{report}
\newif\ifmc@nobind
\mc@nobindfalse
\DeclareOption{nobind}{\mc@nobindtrue}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\ProcessOptions\relax
\ifmc@nobind
\usepackage[sort]{natbib}
\usepackage[biblabels]{authorindex}
\usepackage[includehead,hmargin={3.1cm, 3.1cm}, vmargin={2.5cm,2.7cm}, headsep=.8cm,footskip=1.2cm]{geometry}
\else
\usepackage[includehead,hmargin={3.6cm, 2.6cm}, vmargin={2.5cm,2.7cm}, headsep=.8cm,footskip=1.2cm]{geometry}
\fi
\usepackage{microtype}
\usepackage{nicefrac}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{multicol,multirow,array}
\usepackage{rotating}
\usepackage{booktabs}
\usepackage{pdfpages}
\usepackage{xfrac}
\usepackage{enumitem}
\usepackage{dcolumn}
\newcolumntype{d}[3]{D{.}{\cdot}{#1} }
\usepackage{notoccite}
\usepackage[colorlinks=false,pdfpagelabels]{hyperref}
\usepackage[nohints,tight]{minitoc}
\setcounter{minitocdepth}{2}
\let\oldmtc@verse\mtc@verse
\renewcommand{\mtc@verse}[1]{\oldmtc@verse{#1}\setlength{\baselineskip}{\z@}}
\usepackage[nottoc]{tocbibind}
\let\@ldtoc\tableofcontents
\renewcommand*\tableofcontents{{%
\renewcommand*\MakeUppercase[1]{##1}\@ldtoc}}
\let\@ldlof\listoffigures
\renewcommand*\listoffigures{{%
\renewcommand*\MakeUppercase[1]{##1}\@ldlof}}
\let\@ldlot\listoftables
\renewcommand*\listoftables{{%
\renewcommand*\MakeUppercase[1]{##1}\@ldlot}}
\let\@ldbib\bibliography
\renewcommand*\bibliography[1]{{%
\renewcommand*\MakeUppercase[1]{##1}\@ldbib{#1}}}
\usepackage{lmodern}
\usepackage[LGR,TS1,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[greek,latin,english]{babel}
\usepackage{csquotes}
\hyphenpenalty=500
\def\longs{{\fontencoding{TS1}\selectfont s}}
\colorlet{shadecolor}{blue!20}
这是我的bib
文件 ( ref.bib
)
@ARTICLE{Amendola2017,
author = {{Amendola}, L. and {Kunz}, M. and {Saltas}, I.~D. and {Sawicki}, I.},
title = "{The fate of large-scale structure in modified gravity after GW170817 and GRB170817A}",
journal = {ArXiv e-prints},
archivePrefix = "arXiv",
eprint = {1711.04825},
keywords = {Astrophysics - Cosmology and Nongalactic Astrophysics, General Relativity and Quantum Cosmology, High Energy Physics - Theory},
year = 2017,
month = nov,
adsurl = {http://adsabs.harvard.edu/abs/2017arXiv171104825A},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@article{Einstein1915,
title = "The Field Equations of Gravitation",
journal = "Preussische Akademie der Wissenschaften, Sitzungsberichte",
volume = "844",
number = "7",
pages = "117 - 137",
year = "1915",
url = "http://einsteinpapers.press.princeton.edu/vol6-trans/129",
author = "A. Einstein"
}
@ARTICLE{Perlmutter1999,
author = {{Perlmutter}, S. and {Aldering}, G. and {Goldhaber}, G. and
{Knop}, R.~A. and {Nugent}, P. and {Castro}, P.~G. and {Deustua}, S. and
{Fabbro}, S. and {Goobar}, A. and {Groom}, D.~E. and {Hook}, I.~M. and
{Kim}, A.~G. and {Kim}, M.~Y. and {Lee}, J.~C. and {Nunes}, N.~J. and
{Pain}, R. and {Pennypacker}, C.~R. and {Quimby}, R. and {Lidman}, C. and
{Ellis}, R.~S. and {Irwin}, M. and {McMahon}, R.~G. and {Ruiz-Lapuente}, P. and
{Walton}, N. and {Schaefer}, B. and {Boyle}, B.~J. and {Filippenko}, A.~V. and
{Matheson}, T. and {Fruchter}, A.~S. and {Panagia}, N. and {Newberg}, H.~J.~M. and
{Couch}, W.~J. and {Project}, T.~S.~C.},
title = "{Measurements of {$\Omega$} and {$\Lambda$} from 42 High-Redshift Supernovae}",
journal = {\apj},
eprint = {astro-ph/9812133},
keywords = {COSMOLOGY: OBSERVATIONS, COSMOLOGY: DISTANCE SCALE, STARS: SUPERNOVAE: GENERAL, Cosmology: Observations, Cosmology: Distance Scale, Stars: Supernovae: General},
year = 1999,
month = jun,
volume = 517,
pages = {565-586},
doi = {10.1086/307221},
adsurl = {http://adsabs.harvard.edu/abs/1999ApJ...517..565P},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
答案1
您已使用选项设置了 biblatex sorting=none
。这将为您提供按引用顺序排序的参考文献。如果您希望按第一作者的字母顺序排序,则应使用nyt
(name, year, title) 或nty
(name, title, year)。但是,由于nyt
已经是默认设置,您只需sorting=none
从 biblatex 的选项中省略即可。
\documentclass[a4paper,twoside]{report}
\usepackage[style=numeric-comp, backend=bibtex, doi=false, isbn=false, natbib=true]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@ARTICLE{Amendola2017,
author = {{Amendola}, L. and {Kunz}, M. and {Saltas}, I.~D. and {Sawicki}, I.},
title = "{The fate of large-scale structure in modified gravity after GW170817 and GRB170817A}",
journal = {ArXiv e-prints},
archivePrefix = "arXiv",
eprint = {1711.04825},
keywords = {Astrophysics - Cosmology and Nongalactic Astrophysics, General Relativity and Quantum Cosmology, High Energy Physics - Theory},
year = 2017,
month = nov,
adsurl = {http://adsabs.harvard.edu/abs/2017arXiv171104825A},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@article{Einstein1915,
title = "The Field Equations of Gravitation",
journal = "Preussische Akademie der Wissenschaften, Sitzungsberichte",
volume = "844",
number = "7",
pages = "117 - 137",
year = "1915",
url = "http://einsteinpapers.press.princeton.edu/vol6-trans/129",
author = "A. Einstein"
}
@ARTICLE{Perlmutter1999,
author = {{Perlmutter}, S. and {Aldering}, G. and {Goldhaber}, G. and
{Knop}, R.~A. and {Nugent}, P. and {Castro}, P.~G. and {Deustua}, S. and
{Fabbro}, S. and {Goobar}, A. and {Groom}, D.~E. and {Hook}, I.~M. and
{Kim}, A.~G. and {Kim}, M.~Y. and {Lee}, J.~C. and {Nunes}, N.~J. and
{Pain}, R. and {Pennypacker}, C.~R. and {Quimby}, R. and {Lidman}, C. and
{Ellis}, R.~S. and {Irwin}, M. and {McMahon}, R.~G. and {Ruiz-Lapuente}, P. and
{Walton}, N. and {Schaefer}, B. and {Boyle}, B.~J. and {Filippenko}, A.~V. and
{Matheson}, T. and {Fruchter}, A.~S. and {Panagia}, N. and {Newberg}, H.~J.~M. and
{Couch}, W.~J. and {Project}, T.~S.~C.},
title = "{Measurements of {$\Omega$} and {$\Lambda$} from 42 High-Redshift Supernovae}",
journal = {The Astrophysical Journal},
eprint = {astro-ph/9812133},
keywords = {COSMOLOGY: OBSERVATIONS, COSMOLOGY: DISTANCE SCALE, STARS: SUPERNOVAE: GENERAL, Cosmology: Observations, Cosmology: Distance Scale, Stars: Supernovae: General},
year = 1999,
month = jun,
volume = 517,
pages = {565-586},
doi = {10.1086/307221},
adsurl = {http://adsabs.harvard.edu/abs/1999ApJ...517..565P},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\newcommand*{\bibtitle}{References}
\begin{document}
\section{Section}
Cite \cite{Perlmutter1999, Amendola2017, Einstein1915}
\printbibliography[heading=bibintoc,title={\bibtitle}]
\end{document}