
私は博士論文に 2 つの参考文献を入れたいと思っています。最初の参考文献には、論文に含まれている私自身の出版物をリストし、ローマ数字で番号を付けて冒頭に表示します。テキストの本文では、この参考文献をローマ数字で引用し、メインの参考文献を通常の数字で引用できるようにする必要があります。
これまでの私の最高の試みは、ローマ数字と Biblatex によるサブ書誌およびその他のスレッドには、2 つの欠点があります。最初の参考文献への引用がラテン数字で番号付けされており、メイン テキスト内から最初の参考文献をまったく引用できないことです (メイン テキストから引用したいのですが)。
最小限の(完全にではない)動作例:
\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}
答え1
自分の目的に十分な解決策を見つけたので、自分の質問に答えます。@cfr が示唆したように、ローマ数字の省略形フィールドを使用すると、基本的にうまくいきます。分離部分は、メイン テキストの参照セクションを使用しないことで機能します。
これを改善したいと考えている人にとって、残っている欠点は次のとおりです。
- 短縮フィールドにローマ数字を手動で入力する必要がある
- DeclareSourceMap は、私の出版物がメインの参考文献に再び表示されないようにするためだけに使うには、少しやり過ぎのように感じます。これを実現するより良い方法はあるでしょうか?
- 本文で別の参照セクションを使用したい場合、このままでは機能しません(幸いなことに私は使用しません)。
コード:
\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}