無法列印某些註釋

無法列印某些註釋

我正在整理一份簡歷,並有一個技術報告部分,但無法將此部分以及某些其他部分包含在輸出文件中。

\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 是 a,@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條目。如果條目是或 ,則可以使用該欄位進行選擇。當定義 a with時,將其「轉換」為條目並將欄位定義為phdthesismastersthesistypemasterthesisphdthesisentry@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}

在此輸入影像描述

相關內容