无法打印某些参考资料

无法打印某些参考资料

我正在整理简历,其中有一个技术报告部分,但是在将此部分和某些其他部分包含在输出文档中时遇到了困难。

\begin{refsection} % This is a custom heading for those references marked as "Technical Report" 
\nocite{*}
\printbibliography[sorting=chronological, type=techreport, title={technical reports}, keyword={Technical Report}, heading=subbibliography]
\end{refsection}

techreport我的档案里肯定有清单.bib

@article{Natarajan2011,
author = {Natarajan, Nagarajan and Singh-Blom, Ulf Martin and Tewari, Ambuj and Woods, John O and Dhillon, Inderjit S and Marcotte, Edward M},
file = {:Users/jwoods/Downloads/Papers/Natarajan2011.pdf:pdf},
journal = {UTCS Technical Report},
title = {{Predicting gene\textendash disease associations using multiple species data.}},
volume = {TR-11-37},
year = {2011},
type = {techreport},
keyword = {Technical Report}

我尝试过单独使用keywordtype参数,但对我来说不起作用。奇怪的是,article尽管我已小心地排除了技术报告,但技术报告还是出现在了该部分中:

\begin{refsection} % Articles that aren't in preparation
\nocite{*}
\printbibliography[sorting=chronological, type=article, title={articles}, notkeyword={In Preparation}, notkeyword={Technical Report}, heading=subbibliography]
\end{refsection}

\DeclareBibliographyDriver在某些情况下它似乎也会忽略我的命令,例如,对于我的论文:

\RequirePackage[style=verbose, maxnames=99, sorting=ydnt]{biblatex}

\DeclareFieldFormat[patent]{title}{#1\par}
\DeclareFieldFormat[article]{title}{#1\par}
\DeclareFieldFormat[book]{title}{#1\par}
\DeclareFieldFormat[inproceedings]{title}{#1\par}
\DeclareFieldFormat[phdthesis]{title}{#1\par}

%
% ... other declarations, which do work ...
%

\DeclareBibliographyDriver{phdthesis}{%
  \printfield{title}%
  \newblock%
  \printnames{author}%
  \par%
  \newblock%
  {%
    \footnotesize\addfontfeature{Color=lightgray}%
    \printfield{title}%
    \setunit{\addcomma\space}%
    \printfield{year}%
    %\setunit{\addcomma\space}%
    %\printlist{location}%
    \newunit%
  }
  \par\vspace{0.3\baselineskip}
}

相反,当我在一行上清楚地指明标题而在下一行上清楚地指明作者时,它会以作者、标题的标准格式打印。

看来我一定是误解了这些\printbibliography命令。有人能帮我纠正这个误解吗?

答案1

三个错误!

  1. 选项\printbibliography(关键)type 不是按字段过滤条目type,而是按打印 bibitem entry names。这意味着,,,@book等等@article......(没有@)。示例 bibentry 是@article如果将其更改为@techreport,则如果type选项(\printbibliography)为则有效报告

对于按字段过滤(不同于关键字),您可以使用check选项和\defbibcheck。例如,要按以下条件过滤:type等于过滤技术报告

\defbibcheck{techreport}{%
\iffieldundef{type}
 {\skipentry}
 {\iffieldequalstr{type}{techreport}
    {}
    {\skipentry}}}

\printbibliography[check=techreport]

  1. bibtex 字段是keywords不是关键词. bibtex 示例条目使用关键词

  2. 默认情况下biblatex不使用条目phdthesis。它使用thesis条目phdthesis和。并且如果条目是或,mastersthesis可以使用字段进行选择。当定义为带有时,将其“转换”为条目并定义typemasterthesisphdthesisentry@pdfthesisbiblatexthesistype字段定义为博士论文

在问题的例子中,需要重新定义thesis驱动程序并声明条目title的格式thesis

\DeclareFieldFormat[thesis]{title}{#1\par}

\DeclareBibliographyDriver{thesis}{%
  \printfield{title}%
  \newblock%
  \printnames{author}%
  \par%
  \newblock%
  {%
    \printfield{title}%
    \setunit{\addcomma\space}%
    \printfield{year}%
    \newunit%
  }
  \par\vspace{0.3\baselineskip}}

梅威瑟:

\documentclass{article}
\RequirePackage[style=authoryear, maxnames=99]{biblatex}
\begin{filecontents}{MWE.bib}
    @techreport{Natarajan2011,
    author = {Natarajan, Nagarajan and Singh-Blom, Ulf Martin and Tewari, Ambuj and Woods, John O and Dhillon, Inderjit S and Marcotte, Edward M},
    file = {:Users/jwoods/Downloads/Papers/Natarajan2011.pdf:pdf},
    journal = {UTCS Technical Report},
    title = {{Predicting gene\textendash disease associations using multiple species data.}},
    volume = {TR-11-37},
    year = {2011},
    type = {techreport},
    keywords = {Technical Report}}

    @phdthesis{thesis000,
    author = {Author Name},
    title = {Title of the thesis},
    type= {phdthesis},
    year = {2011}}
\end{filecontents}

\addbibresource{MWE.bib}

\defbibcheck{techreport}{%
\iffieldundef{type}
 {\skipentry}
 {\iffieldequalstr{type}{techreport}
    {}
    {\skipentry}}}

\DeclareFieldFormat[thesis]{title}{#1\par}

\DeclareBibliographyDriver{thesis}{%
  \printfield{title}%
  \newblock%
  \printnames{author}%
  \par%
  \newblock%
  {%
    \printfield{title}%
    \setunit{\addcomma\space}%
    \printfield{year}%
    \newunit%
  }
  \par\vspace{0.3\baselineskip}}

\begin{document}

\begin{refsection} 
\nocite{*}
\printbibliography[type=report,title=Printing the {\it reports} entries]
\printbibliography[check=techreport,title=Filtering by {\it type} field equals to techreport]
\printbibliography[keyword=Technical Report,title=Filtering by keyword]
\printbibliography[title=Editing the {\it thesis} driver, type=thesis]
\end{refsection}

\end{document}

在此处输入图片描述

相关内容