Under your keyword
filter approach with biblatex
, superficial adjustments to the labelnumber
field (such as adding the suffix a
or b
and resetting the secondary entry count) can be made by redefining the labelnumber
format. Here's an example.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[colorlinks=true,citecolor=red]{hyperref}
\usepackage[defernumbers=true]{biblatex}
\newcounter{bbx:primcount}
\setcounter{bbx:primcount}{0}
% Count number of primary entries; expand labelnumberwidth
% to accommodate suffixes (NB: this might need tweaking when there
% are relatively many more secondary entries)
\makeatletter
\AtDataInput{%
\ifkeyword{secondary}
{}
{\addtocounter{bbx:primcount}{1}%
\blx@setlabwidth{\labelnumberwidth}{%
\csuse{abx@ffd@*@labelnumberwidth}{\thefield{labelnumber}a}}}}
\makeatother
% Print labelnumbers with suffixes, adjust secondary labelnumber
\DeclareFieldFormat{labelnumber}{%
\ifkeyword{secondary}
{{\number\numexpr#1-\value{bbx:primcount}}b}
{#1a}}
\addbibresource{biblatex-examples.bib}
\begin{document}
Filler text \cites[10--15]{aristotle:anima}{aristotle:physics}.
Filler text \cite[23--25]{nussbaum}. Filler text \cite{hyman}.
\printbibheading
\printbibliography[keyword=primary,heading=subbibliography,title={Primary Sources (a)}]
\printbibliography[keyword=secondary,heading=subbibliography,title={Secondary Sources (b)}]
\end{document}
This solution assumes that all entries are assigned one of the keywords primary
or secondary
, but entries without the latter keyword can be treated as primary by replacing the filter keyword=primary
with notkeyword=secondary
.
The same problem but with prefixes to the labelnumber
is relatively easy using the prefixnumbers
option.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[colorlinks=true,citecolor=red]{hyperref}
\usepackage[defernumbers=true]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
Filler text \cites[10--15]{aristotle:anima}{aristotle:physics}.
Filler text \cite[23--25]{nussbaum}. Filler text \cite{hyman}.
\printbibheading
\printbibliography[keyword=primary,heading=subbibliography,title={Primary Sources},prefixnumbers={A}]
\printbibliography[keyword=secondary,heading=subbibliography,title={Secondary Sources},prefixnumbers={B}]
\end{document}
Referring to your comments I assume that you want a bibliography at the end of each chapter using biblatex and biber. Important is the option refsection=chapter
combined with the heading subbibliography
at the \printbibliography
command in each chapter.
You can compile the example code below by:
- pdflatex document.tex
- biber document
- pdflatex document.tex
- pdflatex document.tex
\documentclass{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{lipsum}
\usepackage{filecontents}
\begin{filecontents*}{bibch1.bib}
@article{hamid2011potential,
title={Potential risk factors associated with human encephalitis: application of canonical correlation analysis},
author={Hamid, Jemila S and Meaney, Christopher and Crowcroft, Natasha S and Granerod, Julia and Beyene, Joseph},
journal={BMC medical research methodology},
volume={11},
number={1},
pages={120},
year={2011},
publisher={BioMed Central}
}
@article{hattie1985methodology,
title={Methodology review: assessing unidimensionality of tests and ltenls},
author={Hattie, John},
journal={Applied psychological measurement},
volume={9},
number={2},
pages={139--164},
year={1985},
publisher={Sage Publications Sage CA: Thousand Oaks, CA}
}
@article{kirk1973numerical,
title={On the numerical approximation of the bivariate normal (tetrachoric) correlation coefficient},
author={Kirk, David B},
journal={Psychometrika},
volume={38},
number={2},
pages={259--268},
year={1973},
publisher={Springer}
}
@article{lee2015access,
title={Access to finance for innovative SMEs since the financial crisis},
author={Lee, Neil and Sameen, Hiba and Cowling, Marc},
journal={Research policy},
volume={44},
number={2},
pages={370--380},
year={2015},
publisher={Elsevier}
}
\end{filecontents*}
\begin{filecontents*}{bibch2.bib}
@article{samuel2015effect,
title={The effect of credit risk on the performance of commercial banks in Nigeria},
author={Samuel, Olawale Luqman},
journal={African Journal of Accounting, Auditing and Finance},
volume={4},
number={1},
pages={29--52},
year={2015},
publisher={Inderscience Publishers (IEL)}
}
@article{froot1998risk,
title={Risk management, capital budgeting, and capital structure policy for financial institutions: an integrated approach},
author={Froot, Kenneth A and Stein, Jeremy C},
journal={Journal of Financial Economics},
volume={47},
number={1},
pages={55--82},
year={1998},
publisher={Elsevier}
}
@article{salas2002credit,
title={Credit risk in two institutional regimes: Spanish commercial and savings banks},
author={Salas, Vicente and Saurina, Jesus},
journal={Journal of Financial Services Research},
volume={22},
number={3},
pages={203--224},
year={2002},
publisher={Springer}
}
@article{cornett2011liquidity,
title={Liquidity risk management and credit supply in the financial crisis},
author={Cornett, Marcia Millon and McNutt, Jamie John and Strahan, Philip E and Tehranian, Hassan},
journal={Journal of Financial Economics},
volume={101},
number={2},
pages={297--312},
year={2011},
publisher={Elsevier}
}
@article{aebi2012risk,
title={Risk management, corporate governance, and bank performance in the financial crisis},
author={Aebi, Vincent and Sabato, Gabriele and Schmid, Markus},
journal={Journal of Banking \& Finance},
volume={36},
number={12},
pages={3213--3226},
year={2012},
publisher={Elsevier}
}
%%%%%%%%%%%%%%%%%
\end{filecontents*}
\begin{filecontents*}{texch1.tex}
\chapter{First Chapter}
\lipsum[2-3]
\nocite{hamid2011potential, hattie1985methodology, kirk1973numerical,%
lee2015access}
\printbibliography[heading=subbibliography]
\end{filecontents*}
\begin{filecontents*}{texch2.tex}
\chapter{Second Chapter}
\lipsum[2-3]
\nocite{samuel2015effect, froot1998risk, salas2002credit, cornett2011liquidity,%
aebi2012risk}
\printbibliography[heading=subbibliography]
\end{filecontents*}
\usepackage[babel]{csquotes}
\usepackage{xpatch}
\usepackage[backend=biber, style=alphabetic, refsection=chapter]{biblatex}
\addbibresource{bibch1.bib}
\addbibresource{bibch2.bib}
\begin{document}
\include{texch1}
\include{texch2}
\end{document}
This is what you get:
Best Answer
Does that solve your problem?