
Gostaria de ter duas bibliografias na minha tese de doutorado, onde a primeira listasse publicações minhas que estão incluídas na tese, e aparecesse no início, numeradas em algarismos romanos. O corpo principal do texto deverá então poder citar esta bibliografia, com algarismos romanos, e a bibliografia principal com algarismos ordinários.
Minha melhor tentativa até agora, seguindoSubbibliografia com números romanos e Biblatexe alguns outros tópicos, tem duas falhas: as citações da primeira bibliografia são numeradas com algarismos latinos, e não consigo citar a primeira bibliografia dentro do texto principal (que é onde gostaria de citá-la).
Exemplo mínimo (não exatamente) de trabalho:
\documentclass{article}
\usepackage[backend=biber]{biblatex}
\DeclareFieldFormat{Roman}{\RN{#1}}
% The following definition is copied from numeric.bbx
\defbibenvironment{roman-numerals}
{\list
{\printtext[labelnumberwidth]{%
\printfield{prefixnumber}%
\printfield[Roman]{labelnumber}}}
{\setlength{\labelwidth}{\labelnumberwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\item}
\begin{filecontents}{\jobname.bib}
@misc{A01,
author = {Author, A.},
year = {2001},
title = {Alpha},
}
@misc{B02,
author = {Buthor, B.},
year = {2002},
title = {Bravo},
}
\end{filecontents}
\begin{filecontents}{\jobname-mine.bib}
@misc{Mine1,
author = {Me, M.},
year = {2001},
title = {Alpha},
}
@misc{Mine2,
author = {Me, M.},
year = {2002},
title = {Bravo},
}
@misc{Mine3,
author = {Me, M.},
year = {2003},
title = {Charlie},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{\jobname-mine.bib}
\begin{document}
\begin{refsection}[\jobname-mine.bib]
\nocite{*}
\printbibliography[title={My publications}, env=roman-numerals]
\end{refsection}
Some text that won't be here, but note roman numerals don't work even here \cite{Mine1, Mine3}.
\section{Main text}
\begin{refsection}[\jobname.bib]
Citing things in body \cite{A01, B02}. Would like to cite things in section mine \cite{Mine1}
\printbibliography[title=References]
\end{refsection}
\end{document}
Responder1
Encontrei uma solução boa o suficiente para meus próprios propósitos, por isso estou respondendo minha própria pergunta. Como sugerido pelo @cfr, usar o campo abreviado para os algarismos romanos basicamente resolve. A parte de separação funciona sem usar uma seção de referência para o texto principal.
Desvantagens restantes, para quem estiver interessado em tentar melhorar isso:
- precisa inserir manualmente os algarismos romanos nos campos abreviados
- o DeclareSourceMap parece um pouco exagerado por apenas impedir que minhas publicações reapareçam na bibliografia principal. Existe alguma maneira melhor de fazer isso?
- isso não funcionará como está se alguém quiser usar referências separadas no corpo principal (felizmente não)
O código:
\documentclass{article}
\usepackage[backend=biber]{biblatex}
%test data: other references
\begin{filecontents}{\jobname.bib}
@misc{A01,
author = {Author, A.},
year = {2001},
title = {Alpha},
}
@misc{B02,
author = {Buthor, B.},
year = {2002},
title = {Bravo},
}
\end{filecontents}
%test data: my papers
\begin{filecontents}{\jobname-mine.bib}
@misc{Mine1,
author = {Me, M.},
year = {2001},
title = {My Alpha},
shorthand={\RN{1}}
}
@misc{Mine2,
author = {Me, M.},
year = {2002},
title = {My Bravo},
shorthand={\RN{2}}
}
@misc{Mine3,
author = {Me, M.},
year = {2003},
title = {My Charlie},
shorthand={\RN{3}}
}
\end{filecontents}
%Auto-add the keyword thpaper. Not strictly necessary, but saves some trouble
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{\perdatasource{\jobname-mine.bib} \step[fieldset = keywords, fieldvalue = {thpaper}]
}
}
}
\addbibresource{\jobname.bib}
\addbibresource{\jobname-mine.bib}
\begin{document}
%Print the references to my papers. Refsection allows easy shortcutting with nocite{*} limited to the correct file
\begin{refsection}[\jobname-mine.bib]
\nocite{*}
\printbibliography[title={My publications}]
\end{refsection}
\section{Main text}
Citing things in body \cite{A01, B02}. Would like to cite my own publications \cite{Mine1}, and now it works, with the roman numerals even.
%Print the main bibliography, notkeyword=thpaper keeps my papers from re-appearing.
%Using a refsection with a filename would be nicer, but that breaks the citations to my
%publications.
\printbibliography[title=References, notkeyword=thpaper]
\end{document}