0

My current working example (due to "moewe") is like below:

\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}

I have the Global Bibliography at the end with citation in order but numbered from 1-11 divided on books, articles and eg. Conferences. It is OK.

I need an extra Global Bibliography at the end, but in alphabetical order where the numbers refer to this before (I am aware they will be unsorted). Now I have citation orders connected together without division on book etc.

enter image description here

I don't want changing the sort option because sorting=none must remain. I just need additional displaying in alphabetical order in case of faster find appropriate surname, adequate number and page of citation.

1 Answer 1

1

For a different sorting we need to start a new refcontext with the relevant sorting option. But since we want to retain the numeric labels we need to save the previous refcontext and restore it for the label numbers.

Note that I changed the solution to BibLaTeX and number of the Global Bibliography sort from [1] to [36] with refsegment=chapter and sorting=none options from using presort to using the field usera. presort would also change the sort order of the other sorting schemes, which is not what we want.

\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}

Global bibliography: sorted alphabetically, numbering discontinuous

edit Updated in light of \begingroup \endgroup changing citation numbers.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .