是否有一種參考書目樣式只列印引用的 BibTeX 條目?

是否有一種參考書目樣式只列印引用的 BibTeX 條目?

我不喜歡參考書目樣式的一件事是,有時資訊會丟失,並且某些引文樣式使得很難將引文和參考書目中的條目連結起來。一個極端的反應是列印.bib用於代替參考書目的文件,而不是運行biberbibtex將未格式化的條目留在\textcite和朋友中。

BibLaTeX 中可以實現稍微好一點的版本嗎?

\documentclass{article}
\usepackage{biblatex}

\begin{filecontents}{\jobname.bib}

@article{Seshadrinathan2010A-Subjective-St,
    Author = {K. Seshadrinathan and R. Soundararajan and A. C. Bovik and L. K. Cormack},
    title={foo},
    year={2011},
    journal={bla}
}

@article{Seshadrinathan2009Study-of-Subjec,
    Author = {K. Seshadrinathan and R. Soundararajan and A. C. Bovik and L. K. Cormack},
    title={bar},
    year={2010},
    journal={bla}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}

Some words \textcites{Seshadrinathan2010A-Subjective-St}{Seshadrinathan2009Study-of-Subjec}.

\printbibliography

\end{document}

一些單字Seshadrinathan2010A-主觀-StSeshadrinathan2009主題研究

參考書目

@文章{Seshadrinathan2010A-主觀-St,

    Author = {K. Seshadrinathan and R. Soundararajan and A. C. Bovik and L. K. Cormack},

    title={foo},
    year={2011},
    journal={bla}
}

@article{Seshadrinathan2009Study-of-Subjec,
    Author = {K. Seshadrinathan and R. Soundararajan and A. C. Bovik and L. K. Cormack},
    title={bar},
    year={2010},
    journal={bla}

也許

參考書目

Seshadrinathan2010A-主觀-St:

作者:K. Seshadrinathan、R. Soundararajan、AC Bovik 和 LK Cormack

標題: 富

年份: 2011

期刊: bla

Seshadrinathan2009主題研究

作者:K. Seshadrinathan、R. Soundararajan、AC Bovik 和 LK Cormack

標題列

年份: 2010

答案1

當米科質疑這種方法背後的動機時,他提出了一些非常好的觀點。

正如您所看到的,輸出相當巨大,讀者可能會迷失在您強加給她的資訊牆中。精心挑選的參考書目風格將使您的讀者更容易找到他們想要的內容。即使將整份.bib文件交給讀者也不能保證您沒有犯下可能導致混亂或阻礙讀者找到正確引文的錯誤。當您的條目不符合 的資料模型時,文件.bib使您的讀者比由適當樣式產生的參考書目中的輸出更具優勢,但您很容易收到警告。總而言之,簡單地顯示整個文件的缺點應該大於優點:我當然從未見過有人試圖將他們的文件作為論文或教科書中的正確參考書目冒充。.bibbiblatexbiber --validate-datamodel.bib.bib


也就是說,您可以使用該debug樣式

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[british]{babel}
\usepackage{csquotes}
\usepackage[style=debug]{biblatex}

\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{sigfridsson}
\printbibliography
\end{document}

在此輸入影像描述

biblatex此樣式僅列出資料模型中 Biber已知的欄位。如果您使用奇怪的欄位或欄位名稱中有拼字錯誤,它們就會消失。當然biber --validate-datamodel警告你這一點。


只是為了好玩,這裡有一個更接近您最初意圖的解決方案。

在以下情況下運行 LaTeX,並啟用 shell 轉義兩次。不需要進一步運行 Biber,所需的運行已經透過 shell 轉義完成。如果您決定另外正常執行 Biber,則引用將從粗體變為正常形式,style=debug如上所示。如果您決定不正常執行 Biber,當然會收到警告,提醒您再次執行 Biber,但您可以忽略這些警告。

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[british]{babel}
\usepackage{csquotes}
\usepackage[style=debug]{biblatex}
\usepackage{listings}
\lstset{basicstyle=\ttfamily, breaklines=true}
\addbibresource{biblatex-examples.bib}

\usepackage{filecontents}
\begin{filecontents*}{onlycitedsort.conf}
<?xml version="1.0" encoding="UTF-8"?>
<config>
  <output_align>true</output_align>
  <output_fieldcase>lower</output_fieldcase>
  <output_safechars>1</output_safechars>
  <sorting>
    <sort order="1">
      <sortitem order="1">entrykey</sortitem>
    </sort>
  </sorting>
</config>
\end{filecontents*}

\IfFileExists{\jobname.bcf}
  {\immediate\write18{biber --output_format=bibtex \jobname.bcf}%
   \immediate\write18{biber --tool --configfile=onlycitedsort.conf \jobname_biber.bib}}
 {\typeout{Please rerun LaTeX.}}

\begin{document}
\cite{sigfridsson,worman,geer,cicero,vizedom:related}
\IfFileExists{\jobname_biber_bibertool.bib}
  {\lstinputlisting{\jobname_biber_bibertool.bib}}
  {empty bibliography}
\end{document}

獲得

在此輸入影像描述

相關內容