按字母顺序排列的附加参考书目(sorting=none)

按字母顺序排列的附加参考书目(sorting=none)

我当前的工作示例(由于“moewe”)如下所示:

\documentclass[10pt,oneside,a4paper]{book}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage     [left=3.5cm,right=2.5cm,tmargin=2.5cm,bmargin=2.5cm]{geometry}

\usepackage     {titlesec}
\titleformat    {\chapter}[hang]{\raggedright\Large\bfseries}{\arabic{chapter}.\space\space}{0pt}{}{}
\titlespacing*  {\chapter}{0pt}{-\baselineskip}{\baselineskip}


\usepackage[backend=biber,language=english, style=numeric,sorting=none, ,citestyle=numeric,giveninits=true,dashed=false,bibstyle=authoryear,
refsegment=chapter,backref=true]{biblatex}

\BiblatexSplitbibDefernumbersWarningOff

\DeclareSortingTemplate{none}{
  \sort{\field{presort}}
  \sort{\citeorder}
  \sort{\intciteorder}
}


\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \pertype{book}
      \step[fieldset=presort, fieldvalue=aa]
    }
    \map{
      \pertype{article}
      \step[fieldset=presort, fieldvalue=bb]
    }
    \map{
      \pertype{online}
      \step[fieldset=presort, fieldvalue=cc]
    }
    \map{
      \pertype{inproceedings}
      \step[fieldset=presort, fieldvalue=dd]
    }
  }
}
\makeatletter
\input{numeric.bbx}
\makeatother

\DeclareNameAlias{author}{family-given}                         
\DeclareNameAlias{translator}{family-given}                         
\renewcommand*{\revsdnamepunct}{}


\defbibheading{subsubbibintoc}[\refname]{\subsection*{#1}} 
\defbibheading{subsubbibliography}[\refname]{\subsection*{#1}}  

\addbibresource{biblatex-examples.bib}

\usepackage     {silence}
\WarningFilter  {latex}{Empty bibliography}


\begin{document}
\pagestyle{empty}
\tableofcontents
\chapter{First chapter}

Lorem \autocite{sigfridsson}
ipsum \autocite{nietzsche:ksa1}
dolor \autocite{moraux}
sit \autocite{knuth:ct:c}~\autocite{spiegelberg}.

\printbibheading[title=Chapter bibliography,heading=subbibintoc]
\printbibliography[segment=\therefsegment,type=book,heading=subsubbibintoc,title={Books}]
\printbibliography[segment=\therefsegment,type=article,heading=subsubbibintoc,title={Articles}]
\printbibliography[segment=\therefsegment,type=online,heading=subsubbibintoc,title={Online}]
\printbibliography[segment=\therefsegment,type=inproceedings,heading=subsubbibintoc,title={Conferences}]

\vspace{5mm}
{\let\clearpage\relax \chapter{Second chapter}}

Lorem~\cite{vizedom:related}
ipsum~\cite{gerhardt}
dolor~\cite{augustine}
sit~\cite{ctan}.

\printbibheading[title=Chapter bibliography,heading=subbibintoc]
\printbibliography[segment=\therefsegment,type=book,heading=subsubbibintoc,title={Books}]
\printbibliography[segment=\therefsegment,type=article,heading=subsubbibintoc,title={Articles}]
\printbibliography[segment=\therefsegment,type=online,heading=subsubbibintoc,title={Online}]
\printbibliography[segment=\therefsegment,type=inproceedings,heading=subsubbibintoc,title={Conferences}]

\vspace{5mm}
{\let\clearpage\relax \chapter{Third chapter}}

Lorem~\cite{wassenberg},
ipsum~\cite{baez/online}.

\printbibheading[title=Chapter bibliography,heading=subbibintoc]
\printbibliography[segment=\therefsegment,type=book,heading=subsubbibintoc,title={Books}]
\printbibliography[segment=\therefsegment,type=article,heading=subsubbibintoc,title={Articles}]
\printbibliography[segment=\therefsegment,type=online,heading=subsubbibintoc,title={Online}]
\printbibliography[segment=\therefsegment,type=inproceedings,heading=subsubbibintoc,title={Conferences}]

\printbibheading[title=Global Bibliography,heading=bibintoc]
\printbibliography[type=book,heading=subsubbibliography,title={Books}]
\printbibliography[type=article,heading=subsubbibliography,title={Articles}]
\printbibliography[type=online,heading=subsubbibliography,title={Online}]
\printbibliography[type=inproceedings,heading=subsubbibliography,title={Conferences}]

\printbibliography[title=Global Bibliography ALFABETIC ORDER (additionally),heading=bibintoc]

\end{document}

我在最后列出了全球参考书目,其中按顺序列出了引用,但编号为 1-11,分为书籍、文章和会议等。这样就没问题了。

我需要一个额外的全局书目在最后,但按字母顺序排列,数字在此之前引用(我知道它们将不排序)。现在我有了连接在一起的引用顺序,而无需按书籍等进行划分。

在此处输入图片描述

我不想改变排序选项,因为sorting=none必须保留。我只需要按字母顺序额外显示,以便更快地找到合适的姓氏、足够的引文数量和页码。

答案1

对于不同的排序,我们需要refcontext使用相关sorting选项开始新的排序。但由于我们想保留数字标签,因此我们需要保存以前的排序refcontext并将其恢复为标签编号。

请注意,我将解决方案更改为BibLaTeX 和全球书目编号从 [1] 排序到 [36],使用 refsegment=chapter 和 sorting=none 选项从使用presort到使用字段userapresort也会改变其他排序方案的排序顺序,这不是我们想要的。

\documentclass[10pt,oneside,a4paper]{book}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[
  backend=biber,
  bibstyle=authoryear,
  citestyle=numeric,
  sorting=none,
  giveninits=true,
  dashed=false,
  refsegment=chapter,
  backref=true,
]{biblatex}

\makeatletter
\input{numeric.bbx}
\makeatother

\BiblatexSplitbibDefernumbersWarningOff

\DeclareSortingTemplate{none}{
  \sort{\field{usera}}
  \sort{\citeorder}
  \sort{\intciteorder}
}


\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \pertype{book}
      \step[fieldset=usera, fieldvalue=aa]
    }
    \map{
      \pertype{article}
      \step[fieldset=usera, fieldvalue=bb]
    }
    \map{
      \pertype{online}
      \step[fieldset=usera, fieldvalue=cc]
    }
    \map{
      \pertype{inproceedings}
      \step[fieldset=usera, fieldvalue=dd]
    }
  }
}

\DeclareNameAlias{author}{family-given}                         
\DeclareNameAlias{translator}{family-given}                         
\renewcommand*{\revsdnamepunct}{}


\defbibheading{subsubbibintoc}[\refname]{\subsection*{#1}} 
\defbibheading{subsubbibliography}[\refname]{\subsection*{#1}}  

\addbibresource{biblatex-examples.bib}

\usepackage{silence}
\WarningFilter{latex}{Empty bibliography}


\begin{document}
\pagestyle{empty}
\tableofcontents
\chapter{First chapter}

Lorem \autocite{sigfridsson}
ipsum \autocite{nietzsche:ksa1}
dolor \autocite{moraux}
sit \autocite{knuth:ct:c}~\autocite{spiegelberg}.

\printbibheading[title=Chapter bibliography,heading=subbibintoc]
\printbibliography[segment=\therefsegment,type=book,heading=subsubbibintoc,title={Books}]
\printbibliography[segment=\therefsegment,type=article,heading=subsubbibintoc,title={Articles}]
\printbibliography[segment=\therefsegment,type=online,heading=subsubbibintoc,title={Online}]
\printbibliography[segment=\therefsegment,type=inproceedings,heading=subsubbibintoc,title={Conferences}]

\vspace{5mm}
{\let\clearpage\relax \chapter{Second chapter}}

Lorem~\cite{vizedom:related}
ipsum~\cite{gerhardt}
dolor~\cite{augustine}
sit~\cite{ctan}.

\printbibheading[title=Chapter bibliography,heading=subbibintoc]
\printbibliography[segment=\therefsegment,type=book,heading=subsubbibintoc,title={Books}]
\printbibliography[segment=\therefsegment,type=article,heading=subsubbibintoc,title={Articles}]
\printbibliography[segment=\therefsegment,type=online,heading=subsubbibintoc,title={Online}]
\printbibliography[segment=\therefsegment,type=inproceedings,heading=subsubbibintoc,title={Conferences}]

\vspace{5mm}
{\let\clearpage\relax \chapter{Third chapter}}

Lorem~\cite{wassenberg},
ipsum~\cite{baez/online}.

\printbibheading[title=Chapter bibliography,heading=subbibintoc]
\printbibliography[segment=\therefsegment,type=book,heading=subsubbibintoc,title={Books}]
\printbibliography[segment=\therefsegment,type=article,heading=subsubbibintoc,title={Articles}]
\printbibliography[segment=\therefsegment,type=online,heading=subsubbibintoc,title={Online}]
\printbibliography[segment=\therefsegment,type=inproceedings,heading=subsubbibintoc,title={Conferences}]

\printbibheading[title=Global Bibliography,heading=bibintoc]
\printbibliography[type=book,heading=subsubbibliography,title={Books}]
\printbibliography[type=article,heading=subsubbibliography,title={Articles}]
\printbibliography[type=online,heading=subsubbibliography,title={Online}]
\printbibliography[type=inproceedings,heading=subsubbibliography,title={Conferences}]

\csletcs{saved@blx@refcontext@context}{blx@refcontext@context}
\newrefcontext[sorting=nyt]
\makeatletter
\AtNextBibliography{%
  \def\blx@setdefaultrefcontext#1{}%
  \csletcs{blx@refcontext@context}{saved@blx@refcontext@context}}
\makeatother
\printbibliography[title=Global Bibliography (alphabetic),heading=bibintoc]

\end{document}

全球书目:按字母顺序排列,编号不连续

编辑根据以下情况更新\begingroup \endgroup 更改引用编号

相关内容