Superfullcite 的 style=alphabetical

Superfullcite 的 style=alphabetical

我正在使用\superfullcite{}解釋這裡。據我了解(恐怕不多),它基本上\footfullcite{}只是作為腳註出現一次,即使被引用了幾次。我非常喜歡這個,因為它允許我(使用\AtEveryCiteKey{\clearfield{...}})將(小)引文放入頁腳(或簇絨的邊距)中,並在末尾添加(完整的長)引文。

然而,它使用numeric-comp,我寧願讓我的引文的連結像[XYZ99]這樣,(我猜應該是alphabetic)這樣,不存在隱含的數字順序,按字母順序排序時會變得混亂。但如果一個人只閱讀參考書目。

我不太確定該怎麼做。所缺少的基本上只是標籤的更改,但是我不確定如何做到這一點。

  • 繼續使用numeric-compsorting=true以某種方式修改標籤?
  • 開始使用alphabetic並嘗試開始\superfullcite{}工作?

MWE 就是這個

% !TEX TS-program = pdflatex
% !TEX encoding = UTF-8 Unicode
%\documentclass[a4paper, nobib, notoc, symmetric, marginals=raggedouter, justified]{tufte-book} % 
%\morefloats
%\morefloats
\documentclass{article}
\usepackage{csquotes}
\usepackage{hyphenat} 
\usepackage[american]{babel}


\usepackage[block=nbpar, firstinits=false, backref=true, maxcitenames=1, maxbibnames=99,  isbn=false, doi=false, url=false, eprint=false, style=numeric-comp, backend=biber, sorting=none, citetracker=true, defernumbers=true]{biblatex}

\bibliography{biblatex-examples}
%%=====
\makeatletter
\DeclareCiteCommand{\notefullcite}[\mkbibbrackets]
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{notefullcite}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}%
   \usebibmacro{postnote}}

\newbibmacro*{notefullcite}{%
  \ifciteseen
    {}
    {\footnotetext[\thefield{labelnumber}]{%
       \usedriver{}{\thefield{entrytype}}.}}}


% Declare superfullcite and remap it to cite
\DeclareCiteCommand{\superfullcite}[\cbx@superscript]%
  {\usebibmacro{cite:init}%
   \let\multicitedelim=\supercitedelim
   \iffieldundef{prenote}
     {}
     {\BibliographyWarning{Ignoring prenote argument}}%
   \iffieldundef{postnote}
     {}
     {\BibliographyWarning{Ignoring postnote argument}}}
  {\usebibmacro{citeindex}%
   \usebibmacro{superfullcite}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}}

\newbibmacro*{superfullcite}{%
  \ifciteseen
    {}
    {\xappto\cbx@citehook{%
       \noexpand\footnotetext[\thefield{labelnumber}]{%
         \fullcite{\thefield{entrykey}}.}}}}

\newrobustcmd{\cbx@superscript}[1]{%
  \mkbibsuperscript{#1}%
  \cbx@citehook
  \global\let\cbx@citehook=\empty}
\let\cbx@citehook=\empty
\makeatother

%\renewcommand{\cite}[1]{\superfullcite{#1}} %remap \superfullcite to \cite



\begin{document}
Some filler text \notefullcite{cotton}, then some more text
\notefullcite{hammond}. Perhaps some more text and the same
citation again \notefullcite{hammond}. Yet another one
\notefullcite{knuth:ct:a}. Now all again
\notefullcite{cotton,hammond,knuth:ct:a}.

Some filler text,\superfullcite{augustine} then some more
text.\superfullcite{companion} Perhaps some more text and the
same citation again.\superfullcite{companion} Yet another
one.\superfullcite{kastenholz} Now all
again.\superfullcite{augustine,companion,kastenholz}
\printbibliography

\end{document}

正如您所看到的,我使用了sorting=none但無法將樣式更改為字母順序,因為cite:init和類似的巨集不起作用。有人可以詳細說明一下這些的作用嗎?搜尋 biblatex 文件顯示 0 個結果。

答案1

我們可以定義一個新命令\sfcite,列印標準引文並\footfullcite在引文第一次出現時添加 ,即帶有完整書目條目的腳註。

\DeclareCiteCommand{\sfcite}[\mkbibbrackets]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}%
   \ifciteseen
     {}
     {\footfullcite{\thefield{entrykey}}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

(上面的定義旨在與 一起使用alphabetic,但是如果刪除它,[\mkbibbrackets]它可以與許多其他標準樣式一起使用。基本思想是在定義中添加\ifciteseen{}{\footfullcite{\thefield{entrykey}}}後面的塊。)\usebibmacro{cite}

微量元素

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[style=alphabetic,backend=biber,citetracker=constrict]{biblatex}
\usepackage[colorlinks=true]{hyperref}

\addbibresource{biblatex-examples.bib}

\DeclareCiteCommand{\sfcite}[\mkbibbrackets]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}%
   \ifciteseen
     {}
     {\footfullcite{\thefield{entrykey}}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\begin{document}
Lorem \sfcite{wilde} ipsum \sfcite{cicero} dolor \sfcite{wilde} sit
\sfcite{geer} amet \sfcite{knuth:ct:a,knuth:ct:b}.

Cite again \sfcite{geer} and \sfcite{cicero}.
\end{document}

在此輸入影像描述

相關內容