参考书目按使用顺序排列,出版物部分按日期排序

参考书目按使用顺序排列,出版物部分按日期排序

我已经将 biblatex 与 biber 结合使用,因此这应该是可行的。我想要得到的是:

  • 完整的参考书目(上标数字样式,按出现顺序编号,简洁美观)

  • 我的出版物清单等。这些内容可能会或可能不会出现在参考书目中。我refsection为此使用了一个环境。

下面的 MWE 就是这样做的,但出版物列表应该按日期顺序排列,而不会影响主要书目的排序顺序。我该如何仅为 指定排序顺序refsection

\documentclass{article}
\usepackage[
    sorting=none,
    firstinits=true,
    maxbibnames=100,
    style=numeric-comp,
    sortcites=true,
    backend=biber,
    defernumbers=true,
    natbib
]{biblatex}
\begin{filecontents}{\jobname.bib}
@misc{me_poster,
    title="a poster",
    author="Me",
    keywords="me",
    year=2013
}
@article{me_article,
    title="a journal article",
    author="Me",
    journal="journal of stuff",
    year="2012",
    keywords="me"
}
@article{AuthorA_article,
    title="An Article",
    journal ="journal of applied stuff",
    author="Author, A",
    year="1999"
}
@book{AuthorB_book,
    title="A book",
    author="Author, B",
    year="1666"
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
    \section{Body}
        Some people said some stuff.\supercite{AuthorA_article, AuthorB_book}
    \section{My publications}
        \begin{refsection}%
            \DeclareFieldFormat{labelnumberwidth}{#1}%
            \nocite{*}%
            \printbibliography[omitnumbers=true,keyword=me,title={Publications and presentations},heading=bibintoc]%
        \end{refsection}%
    \printbibliography
\end{document}

上述代码的输出

答案1

您可以简单地加载biblatex而不使用该sorting选项,并在发出命令时使用该选项\printbibliography

因此,对于完整的参考书目,您将使用

\printbibliography[sorting=none]

而对于出版物列表

\printbibliography[sorting=ynt,omitnumbers=true,keyword=me,title={Publications and presentations},heading=bibintoc]

梅威瑟:

\documentclass{article}
\usepackage[
    firstinits=true,
    maxbibnames=100,
    style=numeric-comp,
    sortcites=true,
    backend=biber,
    defernumbers=true,
    natbib
]{biblatex}
\begin{filecontents}{\jobname.bib}
@misc{me_poster,
    title="a poster",
    author="Me",
    keywords="me",
    year=2013
}
@article{me_article,
    title="a journal article",
    author="Me",
    journal="journal of stuff",
    year="2012",
    keywords="me"
}
@article{AuthorA_article,
    title="An Article",
    journal ="journal of applied stuff",
    author="Author, A",
    year="1999"
}
@book{AuthorB_book,
    title="A book",
    author="Author, B",
    year="1666"
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
    \section{Body}
        Some people said some stuff.\supercite{AuthorA_article, AuthorB_book}
    \section{My publications}
        \begin{refsection}%
            \DeclareFieldFormat{labelnumberwidth}{#1}%
            \nocite{*}%
            \printbibliography[sorting=ynt,omitnumbers=true,keyword=me,title={Publications and presentations},heading=bibintoc]%
        \end{refsection}%
    \printbibliography[sorting=none]
\end{document} 

输出:

在此处输入图片描述

答案2

考虑一下这个新排序方案的定义ymdnt,它按年、月、日、名称、标题排序。此实现按升序排序,但如果需要,很容易按降序排序。好处在于使用month/day字段的项目可以正确排序,而标准nyt方案并未考虑到这一点。

我还重新修改了一些修复以简化它们:

  • 我们引用所有内容,然后按照引用的方式对其进行追踪,以便将其放入常规参考书目中。
  • 使用新的bibenvironment来删除标签(这将使labelnumberwidth字段格式的改变更加美观)。

代码

\documentclass{article}
\usepackage[
    sorting=none,
    firstinits=true,
    maxbibnames=100,
    style=numeric-comp,
    sortcites=true,
    backend=biber,
    defernumbers=true,
    natbib
]{biblatex}
\begin{filecontents}{\jobname.bib}
@misc{me_poster,
    title="a poster",
    author="Me",
    keywords="me",
    year=2013
}
@article{me_article,
    title="a journal article",
    author="Me",
    journal="journal of stuff",
    year="2012",
    keywords="me"
}
@article{AuthorA_article,
    title="An Article",
    journal ="journal of applied stuff",
    author="Author, A",
    year="1999"
}
@book{AuthorB_book,
    title="A book",
    author="Author, B",
    year="1666"
}
\end{filecontents}
\addbibresource{\jobname.bib}
\nocite{*} % Cite everything; we'll track them explicitly

% Add cited entries to cited category
\DeclareBibliographyCategory{cited}
\AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}}

% New bib environment: same as standard but with no numbers
\defbibenvironment{myrefs}
  {\DeclareFieldFormat{labelnumberwidth}{}\list{}{%
     \leftmargin\bibhang
     \itemindent-\leftmargin
     \itemsep\bibitemsep
     \parsep\bibparsep}}
  {\endlist}
  {\item}

% Sort by year in Self Publications
% Create new sort scheme that includes year and month
\DeclareSortingScheme{ymdnt}{
        \sort{                                                                                                                                                
                \field{presort}
        }
        \sort[final]{
                \field{sortkey}
        }
        \sort[direction=ascending]{ % Change if descending desired
                \field{sortyear}
                \field{year}
        }
        \sort[direction=ascending]{
                \field[padside=left,padwidth=2,padchar=0]{month}
                \literal{00}
        }
        \sort[direction=ascending]{
                \field[padside=left,padwidth=2,padchar=0]{day}
                \literal{00}
        }
        \sort{
                \name{sortname}
                \name{author}
                \name{editor}
                \name{translator}
                \field{sorttitle}
                \field{title}
        }
        \sort{
                \field{sorttitle}
        }
        \sort{
                \field[padside=left,padwidth=4,padchar=0]{volume}
                \literal{0000}
        }
}

\begin{document}
    \section{Body}
        Some people said some stuff.\supercite{AuthorA_article, AuthorB_book}
    \section{My publications}
            \printbibliography[omitnumbers=true,env=myrefs,keyword=me,title={Publications and presentations},heading=bibintoc,sorting=ymdnt]

    \printbibliography[category=cited]
\end{document}

结果

参考书目

相关内容