
どこで必要になるか?論文の準備です。
何を達成したいですか? 参考文献/出版物の 2 つの個別のリストが必要です。mine.bib
自分の出版物用のファイルがあり、main.bib
それを論文で参考文献を引用するために使用します。
としてここに示されている私の出版物は参照番号なしで提示する必要があり、すべてのmine.bib
項目をリストする必要があります。
main.bib
ただし、参考文献リストには引用された参考文献のみを記載する必要があります。
MWE(ここから):
\documentclass{article}
\usepackage[backend=biber,
natbib=true,
style=ieee,
citestyle=numeric-comp,
sorting=none,
doi=false,
isbn=false,
url=true,
]{biblatex}
\DeclareRobustCommand\nocite[1]{%
{\def\cite##1{\ignorespaces}#1}}
\newcommand\nocitecaption[1]{\caption[\nocite{#1}]{#1}}
\begin{filecontents}{mine.bib}
@book{appleby,
author = {Humphrey Appleby},
title = {On the Importance of the Civil Service},
date = {1980},
}
\end{filecontents}
\addbibresource{mine.bib}
\begin{document}
\begin{refsection}[mine.bib] % also tried [mine]
\nocite{*}
\printbibliography[title={List of Publications}]
\end{refsection}
\end{document}
しかし、PDF でのみ印刷され*
、警告が表示されます:Empty bibliography on input line 123
なぜ\DeclareRobustCommand
?これ 二重入力を避けるため。
答え1
あなたのコード
\DeclareRobustCommand\nocite[1]{%
{\def\cite##1{\ignorespaces}#1}}
を再定義します。これは、特に後で通常の定義で\nocite
使用したい場合には、良い考えではありません。\nocite
別の名前を選択してください。 は\DeclareRobustCommand
既存の名前を上書きしても問題がないので、使用している名前がすでに使用されていないことを確認するために、一見不必要と思われる を\newcommand
追加しました。
\documentclass{article}
\usepackage[backend=biber,
natbib=true,
style=ieee,
citestyle=numeric-comp,
sorting=none,
doi=false,
isbn=false,
url=true,
]{biblatex}
\newcommand*{\suppresscite}{}
\DeclareRobustCommand\suppresscite[1]{%
{\def\cite##1{\ignorespaces}#1}}
\newcommand\nocitecaption[1]{\caption[\suppresscite{#1}]{#1}}
\begin{filecontents}{mine.bib}
@book{appleby,
author = {Humphrey Appleby},
title = {On the Importance of the Civil Service},
date = {1980},
}
\end{filecontents}
\addbibresource{mine.bib}
\begin{document}
\begin{refsection}[mine.bib] % also tried [mine]
\nocite{*}
\printbibliography[title={List of Publications}]
\end{refsection}
\end{document}