列印沒有引用鍵的非引用參考書目條目列表

列印沒有引用鍵的非引用參考書目條目列表

我正在使用biblatex添加所有引用的參考文獻到自己的類別的附加功能:

\DeclareBibliographyCategory{cited}
\AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}}

如圖所示這裡。現在考慮這個 MWE:

\documentclass{scrreprt}

\usepackage[refsegment=chapter]{biblatex}
    \DeclareBibliographyCategory{cited}%so we can access all non-cited as own category
    \AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}}

\begin{filecontents}{thebib.bib}
@misc{mathworks_constant_2018,
    type = {Documentation},
    title = {Constant volume pneumatic chamber based on ideal gas law},
    url = {https://uk.mathworks.com/help/physmod/simscape/ref/constantvolumepneumaticchamber.html},
    urldate = {2022-01-01},
    journal = {Mathworks Simulink Documentation},
    author = {{Mathworks}},
    year = {2018},
}
@online{WinNT,
  author = {MultiMedia LLC},
  title = {{MS Windows NT} Kernel Description},
  year = 1999,
  url = {http://web.archive.org/web/20080207010024/http://www.808multimedia.com/winnt/kernel.htm},
  urldate = {2010-09-30}
}
\end{filecontents}
\addbibresource{thebib.bib}

\usepackage{cleveref}

\begin{document}
    \chapter{This is a chapter}
    \autocite{mathworks_constant_2018}
    \endrefsegment%anything after not in any segment -> not printed by bibbysegment
    \nocite{*}%
    \printbibheading%print big heading once
    \defbibheading{subbibliography}{\vspace*{1.5\baselineskip}\section*{\Cref{refsegment:\therefsection\therefsegment}}}%
    \bibbysegment[heading=subbibliography]%cycle through all segments and print
    \defbibheading{notcited}{\section*{Further Reading}}
    \printbibliography[notcategory=cited, heading=notcited]
\end{document}

一個例子的靈感來自這個問題

with\defbibheadingcleveref重新定義以允許可點擊的連結。它不是示例的一部分,但我將其保留在其中,這樣就不會出現任何問題。我離開hyperref了,所以他們沒有出現。結果是:

在此輸入影像描述

在這種情況下,有沒有辦法[1]進一步閱讀部分?

由於任何地方都沒有引用任何條目,因此我們不需要那裡的引用鍵。它只是為關心的人提供的清單。

答案1

您可以為以下內容定義新的參考書目環境進一步閱讀部分。我剛剛複製了 as 的定義authoryear.bbx,這給出了相當令人愉快的結果。您還需要使用該選項defernumbers來確保編號按預期顯示(您也可以將該選項新增omitnumbers\printbibliography進一步閱讀部分,儘管這不會改變這裡的輸出;只有當進一步閱讀後面是另一個編號的\printbibliography條目,以前沒有出現過)。

\documentclass{report}

\usepackage[refsegment=chapter, defernumbers=true]{biblatex}
\usepackage{cleveref}

\DeclareBibliographyCategory{cited}
\AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}}

\defbibheading{subbibliography}{%
  \section*{\Cref{refsegment:\therefsection\therefsegment}}}

\defbibheading{notcited}{\section*{Further Reading}}

\defbibenvironment{bibnonum}
  {\list
     {}
     {\setlength{\leftmargin}{\bibhang}%
      \setlength{\itemindent}{-\leftmargin}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}
  {\endlist}
  {\item}

\begin{filecontents}{\jobname.bib}
@misc{mathworks_constant_2018,
  type    = {Documentation},
  title   = {Constant volume pneumatic chamber based on ideal gas law},
  url     = {https://uk.mathworks.com/help/physmod/simscape/ref/constantvolumepneumaticchamber.html},
  urldate = {2022-01-01},
  journal = {Mathworks Simulink Documentation},
  author  = {{Mathworks}},
  year    = {2018},
}
@online{WinNT,
  author  = {MultiMedia LLC},
  title   = {{MS Windows NT} Kernel Description},
  year    = 1999,
  url     = {http://web.archive.org/web/20080207010024/http://www.808multimedia.com/winnt/kernel.htm},
  urldate = {2010-09-30}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
  \chapter{This is a chapter}
  \autocite{mathworks_constant_2018}

  \endrefsegment
  \nocite{*}
  \printbibheading
  \bibbysegment[heading=subbibliography]
  \printbibliography[notcategory=cited, env=bibnonum, heading=notcited]
\end{document}

帶編號的第 1 章參考書目。沒有數字的進一步閱讀。

我不得不使用report而不是scrreprt因為https://github.com/plk/biblatex/issues/857讓 MWE 為我服務。我還刪除了\vspace*{1.5\baselineskip}%MWE 的 ,因為我想避免它在標準類中引入過多的空間。

相關內容