Reputation: 53
I have some parts of the book with my literature. I use a bibliography with BiBLaTeX after every single chapter a and at the end of the book I print Global Bibliography. I need to show the Bibliography as Articles, Books, Online, Conference etc. every position should be sorted via appearing in the book and have a number in braclet like belkow
and at the end of the Global Bibliography
All appeared correctly. All entries are processed in citation order. I use a simple option for BibLaTeX
\usepackage[sorting=none,defernumbers=true,refsegment=chapter]{biblatex}
I can add more options but this is nothing that helps but only improve the listing - this is the main idea that I need. To print the bibliography after chapters I use segment option.
\printbibheading [title=BIBLIOGRAPHY,heading=subbibliography]
\printbibliography[segment=\therefsegment,type=book,heading=subbibintoc,title={Books},resetnumbers=false]
\printbibliography[segment=\therefsegment,type=article,heading=subbibintoc,title={Articles},resetnumbers=false]
\printbibliography[segment=\therefsegment,type=misc,heading=subbibintoc,title={Online},resetnumbers=false]
\printbibliography[segment=\therefsegment,type=inproceedings,heading=subbibintoc,title={Conferences}, resetnumbers=false]
for printing Global Bibliography the same apart of
segment=\therefsegment
option. I is easy now.
The problem is that numbering refers to the chapters and the citation order but I would like the opposite one. The listing of the Global Bibliography now is ok and should stay. Every book and every article etc (titles) are via citation order but should be numbered from up to down from 1 to the end 36 positions and such number from the Global bibliography should be taken and appear in the appropriate position after Chapters. For example, the numbering of the Global bibliography should look like
and in this way before article 1 Len Schwer. “Optional Strain-rate... has number [11] Len Schwer. “Optional Strain-rate... and should appear with its [11] number after chapter!
I should be well see that in the Global bibliography we can see publications from 1 to 36 and after chapters observing which global position was used in the current chapter. In the Global bibliography, we can additionally observe the Names of the author which appears in citation order, aren’t we?
My working example is here.
\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 [sorting=none,defernumbers=true,refsegment=chapter]{biblatex}
\addbibresource {biblatex-examples.bib}
\usepackage {silence}
\usepackage {indentfirst}
\usepackage {mathpazo}
\usepackage {setspace}
\usepackage {titlesec}
\titleformat{\chapter}[hang]{\raggedright\Large\bfseries}{\arabic{chapter}.\space}{0pt}{}{}
\titlelabel{\thetitle.\space}
\titlespacing*{\chapter}{0pt}{-\baselineskip}{\baselineskip}
\begin{document}
\chapter{Chapter 1}
Lorem\cite{nietzsche:ksa1}~\cite{sigfridsson}~\cite{moraux}~\cite{knuth:ct:c}.
\printbibheading [title=BIBLIOGRAPHY,heading=subbibliography]
\printbibliography[segment=\therefsegment,type=book,heading=subbibintoc,title={Books},resetnumbers=false]
\printbibliography[segment=\therefsegment,type=article,heading=subbibintoc,title={Articles},resetnumbers=false]
\printbibliography[segment=\therefsegment,type=online,heading=subbibintoc,title={Online},resetnumbers=false]
\printbibliography[segment=\therefsegment,type=inproceedings,heading=subbibintoc,title={Conferences}, resetnumbers=false]
\vspace{5mm}
{\let\clearpage\relax \chapter{Chapter 2}}
Lorem~\cite{vizedom:related}~\cite{gerhardt}~\cite{augustine}~\cite{ctan}.
\printbibheading [title=BIBLIOGRAPHY,heading=subbibliography]
\printbibliography[segment=\therefsegment,type=book,heading=subbibintoc,title={Books},resetnumbers=false]
\printbibliography[segment=\therefsegment,type=article,heading=subbibintoc,title={Articles},resetnumbers=false]
\printbibliography[segment=\therefsegment,type=online,heading=subbibintoc,title={Online},resetnumbers=false]
\printbibliography[segment=\therefsegment,type=inproceedings,heading=subbibintoc,title={Conferences}, resetnumbers=false]
\vspace{5mm}
{\let\clearpage\relax \chapter{Chapter 3}}
Lorem~\cite{wassenberg}~\cite{baez/online}.
\printbibheading [title=BIBLIOGRAPHY,heading=subbibliography]
\printbibliography[segment=\therefsegment,type=book,heading=subbibintoc,title={Books},resetnumbers=false]
\printbibliography[segment=\therefsegment,type=article,heading=subbibintoc,title={Articles},resetnumbers=false]
\printbibliography[segment=\therefsegment,type=online,heading=subbibintoc,title={Online},resetnumbers=false]
\printbibliography[segment=\therefsegment,type=inproceedings,heading=subbibintoc,title={Conferences}, resetnumbers=false]
\printbibheading [title=GLOBAL BIBLIOGRAPHY AT THE END,heading=subbibliography]
\printbibliography[type=book,heading=subbibliography,title={Books},resetnumbers=false]
\printbibliography[type=article,heading=subbibliography,title={Articles},resetnumbers=false]
\printbibliography[type=online,heading=subbibliography,title={Online},resetnumbers=false]
\printbibliography[type=inproceedings,heading=subbibliography,title={Conferences},resetnumbers=false]
\end{document}
Regards,
LF
Upvotes: 3
Views: 988
Reputation: 53
\documentclass[10pt,oneside,a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[backend=biber, style=numeric, sorting=none, refsegment=chapter]{biblatex}
\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]
}
}
}
\defbibheading{subsubbibintoc}[\refname]{%
\subsection*{#1}%
\addcontentsline{toc}{subsection}{#1}}
\addbibresource{biblatex-examples.bib}
\begin{document}
\tableofcontents
\chapter{Chapter 1}
Lorem \autocite{nietzsche:ksa1}
ipsum \autocite{sigfridsson}
dolor \autocite{moraux}
sit \autocite{knuth:ct:c}.
\printbibheading[title=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{Chapter 2}}
Lorem~\cite{vizedom:related}
ipsum~\cite{gerhardt}
dolor~\cite{augustine}
sit~\cite{ctan}.
\printbibheading[title=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{Chapter 3}}
Lorem~\cite{wassenberg},
ipsum~\cite{baez/online}.
\printbibheading[title=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 at the end,heading=bibintoc]
\printbibliography[type=book,heading=subbibintoc,title={Books}]
\printbibliography[type=article,heading=subbibintoc,title={Articles}]
\printbibliography[type=online,heading=subbibintoc,title={Online}]
\printbibliography[type=inproceedings,heading=subbibintoc,title={Conferences}]
\end{document}
or
\documentclass[10pt,oneside,a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[
backend=biber,
style=numeric-comp,
sorting=none,
defernumbers,
refsegment=chapter,
]{biblatex}
\makeatletter
\newrobustcmd*{\DefernumbersEnable}{%
\toggletrue{blx@defernumbers}%
\let\blx@thelabelnumber\blx@addlabelnumber
\let\abx@aux@number\blx@aux@number}
\newrobustcmd*{\DefernumbersDisable}{%
\togglefalse{blx@defernumbers}%
\let\blx@thelabelnumber\relax
\let\abx@aux@number\@gobblefive}
\makeatother
\AtBeginDocument{%
\DefernumbersDisable
\BiblatexSplitbibDefernumbersWarningOff}
\defbibheading{subsubbibintoc}[\refname]{%
\subsection*{#1}%
\addcontentsline{toc}{subsection}{#1}}
\addbibresource{biblatex-examples.bib}
\begin{document}
\tableofcontents
\chapter{Chapter 1}
Lorem \autocite{nietzsche:ksa1}
ipsum \autocite{sigfridsson}
dolor \autocite{moraux}
sit \autocite{knuth:ct:c}.
\printbibheading[title=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{Chapter 2}}
Lorem~\cite{vizedom:related}
ipsum~\cite{gerhardt}
dolor~\cite{augustine}
sit~\cite{ctan}.
\printbibheading[title=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{Chapter 3}}
Lorem~\cite{wassenberg},
ipsum~\cite{baez/online}.
\printbibheading[title=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}]
\DefernumbersEnable % we want the numbering from this bib
\printbibheading[title=Global bibliography at the end,heading=bibintoc]
\printbibliography[type=book,heading=subbibintoc,title={Books}]
\printbibliography[type=article,heading=subbibintoc,title={Articles}]
\printbibliography[type=online,heading=subbibintoc,title={Online}]
\printbibliography[type=inproceedings,heading=subbibintoc,title={Conferences}]
\end{document}
The answer was givent in TeX group by moewe member. Thank you.
Upvotes: 1