Biblatex:详细,带有 op. ult. cit. 和 op. cit

Biblatex:详细,带有 op. ult. cit. 和 op. cit

我需要为\cite脚注中的命令整理书目字符串。

我正在寻找一种解决方案,可以更精确地区分“同上。最后。同上。“(如果你能给我一个同样适用于的解决方案,我会非常高兴”上文及同上。“) 和 ”同上。同上。“。

根据我所要求的惯例,在具有verbose书目样式的论文中(我可以使用“ trad1”或“ trad2”):

  1. 我使用“N. SURNAME,全名。副标题,其他数据”(例如书籍或书籍中的“书名、编辑、出版商、城市 yyyy、页码。”;例如,对于文章“in “Journal string”, vol., num., yyyy, pp.”)为第一次引用;

  2. 我用 ”同上。“ 如果我指的是与紧接在前的脚注相同的引文(以及当我提到它们时,相对于来源而言是相同的页面);

  3. 如果我指的是紧接在前的同一篇引文,而我指出了不同的页码(相对于前一个脚注中的页码,或者当我没有指出前一个脚注中的页码时),我会使用“Ivi”;

  4. 在脚注中,我使用

    a. “姓氏,同上。同上。,页”。如果在我的所有引文中,这个条目是唯一按姓氏列出的条目;

    b. 或者,如果我使用两个或多个具有相同作者的条目,我会使用“姓氏,同上。最后。同上。,页。”如果我引用的是第一个脚注中引用的同一篇作品,我会用“姓氏,上文及同上。“当我指的是同一页面时);或者“姓氏,标题,cit.,pp。”如果我引用任何其他作品(即与最后引用的作品不同),则我应将其标记为“。

这是我的代码片段。我无法理解如何输入上文及同上。我失败了,因为我给了同上。最后。同上。

\usepackage[style=verbose-trad1,giveninits=true,sorting=nyt,citetracker=true,ibidtracker=context,idemtracker=context,loccittracker=context,opcittracker=true,singletitle=false,uniquetitle=true,uniquework=true,ibidpage=true,citepages=omit,strict=true,refsection=chapter,citereset=chapter,autocite=inline]{biblatex}
\usepackage{csquotes}
% \usepackage{biblatex-shortfields}

\NewBibliographyString{opcited,ultimacitata,ultimapaginacitata}
% Indicatori
\DefineBibliographyStrings{italian}{%
    opcited={\emph{\autocap{o}p\adddot\ cit\adddot}},
    ultimacitata={\emph{\autocap{O}p\adddot\ ult\adddot\ cit\adddot}},
    ultimapaginacitata={\emph{\autocap{O}p\adddot et loc\adddot\ ult\adddot\ cit\adddot}},
    idem={\textsc{\autocap{i}d}\adddot},
    idemsf={\textsc{\autocap{e}ad}\adddot},
    idempm={\textsc{\autocap{e}id}\adddot},
    idempf={\textsc{\autocap{e}aed}\adddot},
    idempp={\textsc{\autocap{e}id}\adddot},
}

\DefineBibliographyStrings{british}{%
    opcited={\emph{\autocap{o}p\adddot\ cit\adddot}},
    ultimacitata={\emph{\autocap{O}p\adddot\ ult\adddot\ cit\adddot}},
    ultimapaginacitata={\emph{\autocap{O}p\adddot et loc\adddot\ ult\adddot\ cit\adddot}},
    idem={\textsc{\autocap{i}d}\adddot},
    idemsf={\textsc{\autocap{e}ad}\adddot},
    idempm={\textsc{\autocap{e}id}\adddot},
    idempf={\textsc{\autocap{e}aed}\adddot},
    idempp={\textsc{\autocap{e}id}\adddot},
}

\renewbibmacro*{cite:ibid}%
    {\ifloccit%
        {\usebibmacro{cite:loccit}}%
        {\printtext{%
            \bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{\bibstring[\mkibid]{ibidem}}}%
        }}%


\renewbibmacro*{cite:title}{%
    \ifsingletitle%
        {\usebibmacro{cite:opcit}}%
        {\printtext[bibhyperlink]{\printfield[citetitle]{labeltitle}{\setunit{\addcomma\space}}}\bibstring{opcit}}%
    }

\renewbibmacro*{cite:opcit}{%
    \ifsingletitle%
        {\printtext[bibhyperlink]{\bibstring[\mkibid]{ultimacitata}}}%
        {\printtext[bibhyperlink]{\bibstring[\mkibid]{opcited}}}%
    }

我重申,我需要区分“位置最后。同上。“ 和 ”同上。同上。“,因为我使用第一个字符串仅仅是为了引用同一作者引用的最后一部作品(在两部或多部作品中);而我使用“同上。同上。“仅用于引用同一作者引用的一部作品。当我使用“同上。“引用与紧接在前的注释相同的作品(可能为同一页),或使用“Ivi”引用相同的作品,但与紧接在前的注释中使用的页面不同。


更新 1

这是一份完全可编译的示例文档。我的评论已加下划线。

\documentclass[12pt]{article}
\usepackage{graphicx}

\usepackage{etoolbox}
\patchcmd{\frontmatter}{roman}{scroman}{}{}
\makeatletter
\DeclareRobustCommand{\doscroman}{\textsc}
\def\scroman#1{\expandafter\@scroman\csname{c@a#1}\endscname}
\def\@scroman#1{\expandafter\doscroman\expandafter{\romannumeral#1}}
\makeatother

%%%%%%%%%%%%%%%%%%
%% Bib settings %%
%%%%%%%%%%%%%%%%%%
\usepackage[style=verbose-trad1,giveninits=true,sorting=nyt,citetracker=true,ibidtracker=context,idemtracker=context,loccittracker=context,opcittracker=true,singletitle=false,uniquetitle=true,uniquework=true,idemtracker=true,ibidpage=true,citepages=omit,strict=true,refsection=section,citereset=section,autocite=inline]{biblatex}
\usepackage{csquotes}
% \usepackage{biblatex-shortfields}

\NewBibliographyString{ivi,opcited,opnoultcit}
% Indicatori
\DefineBibliographyStrings{italian}{%
    opcit={\autocap{c}it\adddot},
    opcited={\autocap{o}p\adddot\ ult\adddot\ cit\adddot},
    opnoultcit={\autocap{o}p\adddot\ cit\adddot},
    loccit={\autocap{o}p\adddot\ et loc\adddot\ ult\adddot\ cit\adddot},
    ivi={\autocap{i}vi},
    idem={\textsc{\autocap{i}d}\adddot},
    idemsf={\textsc{\autocap{e}ad}\adddot},
    idempm={\textsc{\autocap{e}id}\adddot},
    idempf={\textsc{\autocap{e}aed}\adddot},
    idempp={\textsc{\autocap{e}id}\adddot},
}

\DefineBibliographyStrings{english}{%
    opcit={\autocap{c}it\adddot},
    opcited={\autocap{o}p\adddot\ ult\adddot\ cit\adddot},
    opnoultcit={\autocap{o}p\adddot\ cit\adddot},
    loccit={\autocap{o}p\adddot\ et loc\adddot\ ult\adddot\ cit\adddot},
    ivi={\autocap{i}vi},
    idem={\textsc{\autocap{i}d}\adddot},
    idemsf={\textsc{\autocap{e}ad}\adddot},
    idempm={\textsc{\autocap{e}id}\adddot},
    idempf={\textsc{\autocap{e}aed}\adddot},
    idempp={\textsc{\autocap{e}id}\adddot},
}

\renewbibmacro*{cite:ibid}{%
    \ifloccit%
        {\printtext{%
            \bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{\bibstring[\mkbibemph]{ibidem}}}\global\toggletrue{cbx:loccit}%
        }%
        {\printtext[bibhyperlink]{\bibstring{ivi}}}%
}

% \renewbibmacro*{cite:title}{%
%     {\printtext[bibhyperlink]{\printfield[citetitle]{labeltitle}{\setunit{\addcomma\space}}}\bibstring{opcit}}%
% }

\renewbibmacro*{cite:title}{%
    \printtext[bibhyperlink]{\printfield[citetitle]{labeltitle}\setunit{\addcomma\space}\bibstring{opcit}}%
}

\renewbibmacro*{cite:opcit}{%
    \printtext[bibhyperlink]{\bibstring[\mkbibemph]{opcited}}%
}
    
\renewbibmacro*{cite:loccit}{%
    {\printtext[bibhyperlink]%
    {\bibstring[\mkbibemph]{loccit}}}%
    \global\toggletrue{cbx:loccit}%
}

% Ometti l'autore
\makeatletter
\newcommand{\int@suppauth}{%
  \def\ifciteibid{\@secondoftwo}%
  \renewbibmacro*{cite:name}{}%
  \renewbibmacro*{cite:idem}{}%
  \renewbibmacro*{author}{}%
  \renewbibmacro*{editor+others}{}%
  \renewbibmacro*{translator+others}{}}

\newcommand{\suppauth}{\AtNextCite{\int@suppauth}}

\DeclareCiteCommand*{\parencite}[\mkbibparens]
  {\int@suppauth
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{cite:postnote}}

\DeclareCiteCommand*{\cite}
  {\int@suppauth
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{cite:postnote}}
\makeatother

% Punteggiatura
\renewcommand*{\bibinitdelim}{}
\renewcommand*{\subtitlepunct}{\adddot\addspace}
\renewcommand*{\newunitpunct}{\addcomma\addspace}
\renewcommand*{\intitlepunct}{\addspace}
\DeclareAutoCiteCommand{autonote}[r]{\footcite}{\footcites}
\DeclareAutoCiteCommand{footnote}[r]{\footcite}{\footcites}
\DeclareAutoCiteCommand{textnote}[r]{\texttcite}{\textcites}

% Formato grafico dei campi
\DeclareFieldFormat{title}{\mkbibemph{#1}}
\DeclareFieldFormat{titleaddon}{\mkbibemph{#1}}
\DeclareFieldFormat[article]{title}{\mkbibemph{#1}}
\DeclareFieldFormat[inproceedings]{title}{\mkbibemph{#1}}
\DeclareFieldFormat[incollection]{title}{\mkbibemph{#1}}
\DeclareFieldFormat[inreference]{title}{s.v.~\mkbibemph{#1}}
\DeclareFieldFormat[inbook]{title}{\mkbibemph{#1}}
% \DeclareFieldFormat[inbook,inproceedings]{booktitle}{in\space\mkbibemph{#1}}
\DeclareFieldFormat[suppbook]{title}{\mkbibemph{#1}\nopunct}
\DeclareFieldFormat[misc]{title}{#1}
\DeclareFieldFormat[oldcassazione]{title}{#1}
\DeclareFieldFormat[costituzione]{title}{#1}
\DeclareFieldFormat[eulaw]{title}{#1}
\DeclareFieldFormat[codicisoftlaw]{title}{#1}
\DeclareFieldFormat[costituzione]{citetitle}{#1}
\DeclareFieldFormat[eulaw]{citetitle}{#1}
\DeclareFieldFormat[codicisoftlaw]{citetitle}{#1}
\DeclareFieldFormat[thesis]{title}{\mkbibemph{#1}}
\DeclareFieldFormat{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat{citetitleaddon}{\mkbibemph{#1}}
\DeclareFieldFormat[article]{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat[incollection]{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat[inreference]{citetitle}{s.v.~\mkbibemph{#1}}
\DeclareFieldFormat[inbook]{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat[thesis]{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat[inproceedings]{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat[nparticle]{journaltitle}{‘{#1}’}
\DeclareFieldFormat{series}{\mkbibquote{#1}}
% \DeclareFieldFormat{journaltitle}{\mkbibquote{#1}}
% \DeclareFieldFormat{journaltitle}{%
%     \iffieldundef{shortjournal}%
%     {\em#1}%
%     {\mkbibquote{#1}}%
% }

\DeclareFieldFormat{edition}{\ifinteger{#1}{\bibstring{edition}~}\textsc{\doscroman{\romannumeral#1}}}
% \DeclareFieldFormat[inproceedings]{title}{\mkbibemph{#1}}
\DeclareFieldFormat{volume}{\bibstring{jourvol}\addnbspace\textsc{\doscroman{\romannumeral#1}}}

% Abbreviazione riviste
\renewbibmacro*{journal}{%
  \ifboolexpr{
    test {\iffieldundef{journaltitle}}
    and
    test {\iffieldundef{journalsubtitle}}
  }
    {}
    {\iffieldundef{shortjournal}%
       {\printtext[journaltitle]{%
          \printfield[titlecase]{journaltitle}%
          \setunit{\subtitlepunct}%
          \printfield[titlecase]{journalsubtitle}}}
       {\printfield[journaltitle]{shortjournal}}%
     \newunit}%
  \iffieldundef{journaltitleaddon}
    {}
    {\printfield{journaltitleaddon}}}

\DeclareBibliographyDriver{shortjournal}{%
  \printfield{journaltitle}}

\defbibcheck{shortjournal}{%
   \iffieldundef{shortjournal}
     {\skipentry}
     {\iffieldundef{journaltitle}
       {\skipentry}
       {\ifcsdef{sjcheck@\therefsection
          -\strfield{shortjournal}=\strfield{journaltitle}}
         {\skipentry}
         {\savefieldcs{journaltitle}{sjcheck@\therefsection
            -\strfield{shortjournal}=\strfield{journaltitle}}}}}}

\DeclareBibliographyDriver{shortjournal}{\printfield{journaltitle}}
% \DeclareBiblistFilter{shortjournal}{\filter[type=field,filter=shortjournal]}

\AtBeginBiblist{shortjournal}{\DeclareFieldFormat{journaltitle}{\em#1}\DeclareFieldFormat{shortjournal}{{#1}}}
\defbibenvironment{shortjournal}{%
    \list{}{%
    \labelsep\biblabelsep%
    \labelwidth=4cm%
    \leftmargin\labelwidth%
    \advance\leftmargin\labelsep%
    \itemsep\bibitemsep%
    \parsep\bibparsep%
    \let\makelabel\printshortjournal}}%
    {\endlist}%
    {\item}
\newcommand*{\printshortjournal}{\RaggedRight\printfield{shortjournal}}%


% Formato autore
% \AtBeginBibliography{
    \def\ifmknamesc{%
      \ifboolexpr{ test {\ifcurrentname{labelname}}
                   or test {\ifcurrentname{author}}
                   or ( test {\ifnameundef{author}} and test {\ifcurrentname{editor}} ) }}
    \renewcommand*{\mkbibnameprefix}[1]{%
      \ifmknamesc{\textsc{#1}}{#1}}
    \renewcommand*{\mkbibnamefamily}[1]{%
      \ifmknamesc{\textsc{#1}}{#1}}
% }

\AtBeginBibliography{\DeclareNameFormat{sortname}{\ifgiveninits{\usebibmacro{name:given-family}{\namepartfamily}{\namepartgiveni}{\namepartprefix}{\namepartsuffix}}{\usebibmacro{name:given-family}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}}\usebibmacro{name:andothers}}}

% Formato curatore
\DefineBibliographyStrings{italian}{%
    editor={a cura di},
    editors={a cura di}
}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}

% Attivare funzione idem - previo idemtracker:true
\makeatletter
\newbibmacro{ifrepeatauthor}{\ifciteidem}
\newbibmacro{repeatedauthor}{%
    \bibstring[\mkibid]{idem\thefield{gender}}}%
    % \bibstring[\mkbibsc]{idem\thefield{gender}}}%
    % \iftoggle{cbx:scauthorscite}{\bibstring[\mkbibsc]{idem\thefield{gender}}}{}}%
    \AtBeginBibliography{%
        \renewbibmacro{ifrepeatauthor}{\usebibmacro{bbx:dashcheck}}%
        \renewbibmacro{repeatedauthor}{\bibnamedash}%
    }
    \renewbibmacro*{author}{%
        \ifboolexpr{
            test \ifuseauthor
            and
            not test {\ifnameundef{author}}
        }
        {\usebibmacro{ifrepeatauthor}
        {\usebibmacro{repeatedauthor}}
        {\printnames{author}%
        \setunit{\printdelim{authortypedelim}}%
        \usebibmacro{bbx:savehash}}%
        \usebibmacro{authorstrg}}
        {\global\undef\bbx@lasthash}}
    \renewbibmacro*{bbx:editor}[1]{%
        \ifboolexpr{
            test \ifuseeditor
            and
            not test {\ifnameundef{editor}}
        }
        {\usebibmacro{ifrepeatauthor}
        {\usebibmacro{repeatedauthor}}
        {\printnames{editor}%
        \setunit{\printdelim{editortypedelim}}%
        \usebibmacro{bbx:savehash}}%
        \usebibmacro{#1}%
        \clearname{editor}}
        {\global\undef\bbx@lasthash}}
    \renewbibmacro*{bbx:translator}[1]{%
        \ifboolexpr{
            test \ifusetranslator
            and
            not test {\ifnameundef{translator}}
        }
        {\usebibmacro{ifrepeatauthor}
        {\usebibmacro{repeatedauthor}}
        {\printnames{translator}%
        \setunit{\printdelim{translatortypedelim}}%
        \usebibmacro{bbx:savehash}}%
        \usebibmacro{#1}%
        \clearname{translator}}
        {\global\undef\bbx@lasthash}}
\makeatother

% Indicazione del riferimento in testo senza il nome dell'autore

% Citazione nel testo del nome dell'autore
    \makeatletter%
    \newrobustcmd*{\nextcitenotfullname}{%
        \AtNextCite{%
        \renewcommand*{\mkbibnamefamily}{}%
        \renewcommand*{\mkbibnameprefix}{}%
        }}%
    \newrobustcmd*{\nextcitefullname}{%
        \AtNextCite{\DeclareNameAlias{labelname}{given-family}%
        \renewcommand*{\mkbibnamefamily}{}%
        \renewcommand*{\mkbibnameprefix}{}%
        \togglefalse{abx@bool@giveninits}}}
    \newrobustcmd*{\citeauthorname}{\nextcitenotfullname\citeauthor}
    \newrobustcmd*{\citeauthorfullname}{\nextcitefullname\citeauthor}
    \makeatother

% Istruzioni per riviste
% \renewbibmacro*{issue+date}{%
    % \iffieldundef{number}{\setunit{\addcomma\space}\printfield{number}\usebibmacro{date}}{\setunit{/}\usebibmacro{date}}\newunit}
\renewbibmacro*{volume+number+eid}{%
    \setunit{\addcomma\addspace}%
    \iffieldundef{number}%
        {\printfield{volume}\newunit}%
        {\ifbibliography%
            {\printfield{volume}\newunit}%
        }%
    \newunit\newblock%
    \printfield{number}%
    \newunit\newblock%
    \printfield{eid}%
}

\renewbibmacro{issue+date}{%
    \setunit{\addcomma\space}%
    \iffieldundef{issue}%
        {\usebibmacro{date}\newunit}%
        {\ifbibliography%
            {\printfield{issue}\setunit{/}}%
        \usebibmacro{date}
        }%
    \newunit}

\newcommand*{\volnumdelim}{\addcomma\addspace}
\renewbibmacro*{volume+number+eid}{%
  \iffieldundef{volume}
  {}
  {\setunit{\addcomma\space}\bibstring{jourvol}\addnbspace\printfield{volume}%
  \setunit*{\volnumdelim}}%
  \iffieldundef{number}{}%
  {\setunit{\addcomma\space}\bibstring{number}\addnbspace\printfield{number}}%
  \setunit{\addcomma\space}%
  \printfield{eid}}
\DeclareFieldFormat[article]{volume}{\textsc{\romannumeral#1}}

% Istruzioni per collettanee
\usepackage{biblatex-opcit-booktitle}

% Libri: casa editrice, luogo, anno
\renewbibmacro*{publisher+location+date}{\printlist{publisher}\iflistundef{location}{\setunit*{\addcomma\space}}{\setunit*{\addcomma\space}}\printlist{location}\setunit*{~}\usebibmacro{date}\newunit}

% Citazione Url e DOI
\renewbibmacro*{doi+eprint+url}{%
    \ifbibliography{%
    \iftoggle{bbx:doi}%
    {\printfield{doi}}%
    {}%
    \iftoggle{bbx:eprint}%
    {\usebibmacro{eprint}}%
    {}%
    \iftoggle{bbx:url}%
    {\usebibmacro{url+urldate}}%
    {}}}{}

%%%%%%%%%%%%%%%%%%%%%%%%
% Nuovi tipi d'entrate %
%%%%%%%%%%%%%%%%%%%%%%%%

% Newspapers
\NewBibliographyString{innpaper}
\DefineBibliographyStrings{italian}{%
    innpaper={su}
}

\newbibmacro*{su:}{%
    \bibstring{innpaper}\addspace}
    % \printunit{\intitlepunct}}

\DeclareBibliographyDriver{nparticle}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \usebibmacro{author/translator+others}%
    \setunit{\labelnamepunct}\newblock
    \usebibmacro{title}%
    \newunit
    \printlist{language}%
    \newunit\newblock
    \usebibmacro{byauthor}%
    \newunit\newblock
    \usebibmacro{bytranslator+others}%
    \newunit\newblock
    \printfield{version}%
    \newunit\newblock
    {\usebibmacro{su:}}%
    \usebibmacro{journal+issuetitle}%
    \newunit\newblock
    \usebibmacro{byeditor+others}%
    \newunit\newblock
    \usebibmacro{note+pages}%
    \newunit\newblock
    \iftoggle{bbx:isbn}
    {\printfield{issn}}
    {}%
    \newunit\newblock
    \usebibmacro{doi+eprint+url}%
    \newunit\newblock
    \usebibmacro{pageref}%
    \usebibmacro{finentry}}

% Costituzione e leggi brevi
\DeclareBibliographyDriver{costituzione}%
    {%
    \printfield{title}%
    \ifbibliography{%
    \newunit\newblock%
    \printfield{note}\addspace\printdate%
    \newunit\newblock%
    \printfield{subtitle}%
    \newunit\newblock%
    \printfield{addendum}%
    }{}%
    \finentry}

% Related
\AtEveryCitekey{\togglefalse{bbx:related}}

% Ordine riferimenti bibliografici
\DeclareSortingTemplate{sortjournals}{
    \sort[direction=ascending]{\field{shortjournal}}
    \sort[direction=ascending]{\field{journaltitle}}
}

\DeclareSortingTemplate{iuris}{
        \sort[direction=ascending]{\field{year}}
        \sort[direction=ascending]{\field{month}}
        \sort[direction=ascending]{\field{day}}
        \sort[direction=ascending]{\field{number}}
        \sort{\field{author}}
    }

% Input finali
\renewcommand*{\bibfont}{\small}
\renewbibmacro*{citeindex}{\indexnames{labelname}{}}


\addbibresource{quoted.bib}

\begin{filecontents}{quoted.bib}
@article{secondauthor,
    author={Neri, Lucia},gender={sf},
    title={Mario Rossi and its nice book},
    subtitle={A new writing theory?},
    journal={Dream up},
    number={5},year={2021},
    pages={231--233}
}

@book{firstauthor,
    author={Rossi, Mario},gender={sm},
    title={My first book},
    subtitle={Writing skills},
    edition={3},
    editor={Muratore, Adriano},
    publisher={Happy Penguin Feet},
    address={Somewhere},
    year={2023}
}

@inbook{secondauthorbis,
    author={Neri, Lucia},gender={sf},
    title={A new rulebook},
    booktitle={Grammar for pigeons},
    editor={Graziani, Amedeo and Endrici, Rosalba},
    publisher={Animal School},
    address={Nowhere},
    year={2024},
    pages={75--92}
}
\end{filecontents}

\usepackage{hyperref}

\title{Test}
\author{Francesco Contini}
\date{}

\begin{document}

\maketitle
\section{Introduction}
Just an example\footnote{See \cite{firstauthor}.}. \citeauthorfullname{firstauthor} explains its modern theory\footnote{See \cite[25--75]{firstauthor}.} and gives us some exercises\footnote{See \cite[25--75]{firstauthor}.}. A recent review tells us it is something of new\footnote{See \cite[233]{secondauthor}. The author confirms its affirmation to the last edition of the book in \cite[90]{secondauthorbis}.}. But, if we read any of these entries, we discover that both are totally demented: there is no any book\footnote{I am referring to \cite{firstauthor}. \underline{Here I would like to have} \emph{op.\ cit.} instead, because I cite in the entire document only this entry by Mario Rossi.}. So that also reviews are totally crazy, especially the curatorship\footnote{\Cite[90]{secondauthorbis}. See also \cite{secondauthor}. \underline{It works.}}.

Finally, not only I totally dreamt up the book\footnote{\Cite{firstauthor}. \underline{Here I would like to have \emph{op.\ cit.} instead. Explanations \emph{supra}.}}, but also the reviews\footnote{So \cite{secondauthor}; \cite{secondauthorbis}. \underline{It works.}}.


\printbibliography[heading=bibintoc]

\end{document}

更新 2

@book{firstauthor}只需使用以下命令更改文件内容中的条目quoted.bib

@book{firstauthor,
    author={Rossi, Mario},gender={sm},
    title={My first book},
    subtitle={Writing skills},
    edition={3},
    editor={Muratore, Adriano},
    publisher={Happy Penguin Feet},
    address={Somewhere},
    year={2023},
    related={firstauthorformeredition},
    relatedtype={reprintof}
}

@book{firstauthorformeredition,
    author={Rossi, Mario},gender={sm},
    title={My first book},
    subtitle={Writing skills},
    publisher={Happy Penguin Feet},
    address={Somewhere},
    year={2021},
}

答案1

\ifsingletitle使用该选项启用测试就足够了singletitle=true,(由于某种原因,代码有一个明确的......)并像这样singletitle=false,使用它。cite:opcit

\renewbibmacro*{cite:opcit}{%
  \ifsingletitle
    {\printtext[bibhyperlink]{\bibstring[\mkbibemph]{opnoultcit}}}
    {\printtext[bibhyperlink]{\bibstring[\mkbibemph]{opultcit}}}%
}

(我稍微重命名了 bibstrings,因为我发现原来的名称令人困惑)。

\documentclass[12pt]{article}

\usepackage{etoolbox}
\patchcmd{\frontmatter}{roman}{scroman}{}{}
\makeatletter
\DeclareRobustCommand{\doscroman}{\textsc}
\def\scroman#1{\expandafter\@scroman\csname{c@a#1}\endscname}
\def\@scroman#1{\expandafter\doscroman\expandafter{\romannumeral#1}}
\makeatother

\usepackage[
  style=verbose-trad1,
  sorting=nyt,
  giveninits=true,
  citetracker=true,
  ibidtracker=context,
  idemtracker=context,
  loccittracker=context,
  opcittracker=true,
  singletitle=true,
  uniquework=true,
  idemtracker=true,
  ibidpage=true,
  citepages=omit,
  strict=true,
  refsection=section,
  citereset=section,
  autocite=inline,
]{biblatex}
\usepackage{csquotes}
% \usepackage{biblatex-shortfields}

\NewBibliographyString{ivi,opultcit,opnoultcit}
% Indicatori
\DefineBibliographyStrings{italian}{%
  opcit      = {cit\adddot},
  opultcit   = {op\adddot\ ult\adddot\ cit\adddot},
  opnoultcit = {op\adddot\ cit\adddot},
  loccit     = {op\adddot\ et loc\adddot\ ult\adddot\ cit\adddot},
  ivi        = {ivi},
  idem       = {\textsc{\autocap{i}d}\adddot},
  idemsf     = {\textsc{\autocap{e}ad}\adddot},
  idempm     = {\textsc{\autocap{e}id}\adddot},
  idempf     = {\textsc{\autocap{e}aed}\adddot},
  idempp     = {\textsc{\autocap{e}id}\adddot},
}

\DefineBibliographyStrings{english}{%
  opcit      = {cit\adddot},
  opultcit   = {op\adddot\ ult\adddot\ cit\adddot},
  opnoultcit = {op\adddot\ cit\adddot},
  loccit     = {op\adddot\ et loc\adddot\ ult\adddot\ cit\adddot},
  ivi        = {ivi},
  idem       = {\textsc{\autocap{i}d}\adddot},
  idemsf     = {\textsc{\autocap{e}ad}\adddot},
  idempm     = {\textsc{\autocap{e}id}\adddot},
  idempf     = {\textsc{\autocap{e}aed}\adddot},
  idempp     = {\textsc{\autocap{e}id}\adddot},
}

\renewbibmacro*{cite:ibid}{%
    \ifloccit%
        {\printtext{%
            \bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{\bibstring[\mkbibemph]{ibidem}}}\global\toggletrue{cbx:loccit}%
        }%
        {\printtext[bibhyperlink]{\bibstring{ivi}}}%
}

% \renewbibmacro*{cite:title}{%
%     {\printtext[bibhyperlink]{\printfield[citetitle]{labeltitle}{\setunit{\addcomma\space}}}\bibstring{opcit}}%
% }

\renewbibmacro*{cite:title}{%
    \printtext[bibhyperlink]{\printfield[citetitle]{labeltitle}\setunit{\addcomma\space}\bibstring{opcit}}%
}

\renewbibmacro*{cite:opcit}{%
  \ifsingletitle
    {\printtext[bibhyperlink]{\bibstring[\mkbibemph]{opnoultcit}}}
    {\printtext[bibhyperlink]{\bibstring[\mkbibemph]{opultcit}}}%
}

\renewbibmacro*{cite:loccit}{%
    {\printtext[bibhyperlink]%
    {\bibstring[\mkbibemph]{loccit}}}%
    \global\toggletrue{cbx:loccit}%
}

% Ometti l'autore
\makeatletter
\newcommand{\int@suppauth}{%
  \def\ifciteibid{\@secondoftwo}%
  \renewbibmacro*{cite:name}{}%
  \renewbibmacro*{cite:idem}{}%
  \renewbibmacro*{author}{}%
  \renewbibmacro*{editor+others}{}%
  \renewbibmacro*{translator+others}{}}

\newcommand{\suppauth}{\AtNextCite{\int@suppauth}}

\DeclareCiteCommand*{\parencite}[\mkbibparens]
  {\int@suppauth
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{cite:postnote}}

\DeclareCiteCommand*{\cite}
  {\int@suppauth
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{cite:postnote}}
\makeatother

% Punteggiatura
\renewcommand*{\bibinitdelim}{}
\renewcommand*{\subtitlepunct}{\adddot\addspace}
\renewcommand*{\newunitpunct}{\addcomma\addspace}
\renewcommand*{\intitlepunct}{\addspace}
\DeclareAutoCiteCommand{autonote}[r]{\footcite}{\footcites}
\DeclareAutoCiteCommand{footnote}[r]{\footcite}{\footcites}
\DeclareAutoCiteCommand{textnote}[r]{\texttcite}{\textcites}

% Formato grafico dei campi
\DeclareFieldFormat{title}{\mkbibemph{#1}}
\DeclareFieldFormat{titleaddon}{\mkbibemph{#1}}
\DeclareFieldFormat[article]{title}{\mkbibemph{#1}}
\DeclareFieldFormat[inproceedings]{title}{\mkbibemph{#1}}
\DeclareFieldFormat[incollection]{title}{\mkbibemph{#1}}
\DeclareFieldFormat[inreference]{title}{s.v.~\mkbibemph{#1}}
\DeclareFieldFormat[inbook]{title}{\mkbibemph{#1}}
% \DeclareFieldFormat[inbook,inproceedings]{booktitle}{in\space\mkbibemph{#1}}
\DeclareFieldFormat[suppbook]{title}{\mkbibemph{#1}\nopunct}
\DeclareFieldFormat[misc]{title}{#1}
\DeclareFieldFormat[oldcassazione]{title}{#1}
\DeclareFieldFormat[costituzione]{title}{#1}
\DeclareFieldFormat[eulaw]{title}{#1}
\DeclareFieldFormat[codicisoftlaw]{title}{#1}
\DeclareFieldFormat[costituzione]{citetitle}{#1}
\DeclareFieldFormat[eulaw]{citetitle}{#1}
\DeclareFieldFormat[codicisoftlaw]{citetitle}{#1}
\DeclareFieldFormat[thesis]{title}{\mkbibemph{#1}}
\DeclareFieldFormat{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat{citetitleaddon}{\mkbibemph{#1}}
\DeclareFieldFormat[article]{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat[incollection]{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat[inreference]{citetitle}{s.v.~\mkbibemph{#1}}
\DeclareFieldFormat[inbook]{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat[thesis]{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat[inproceedings]{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat[nparticle]{journaltitle}{‘{#1}’}
\DeclareFieldFormat{series}{\mkbibquote{#1}}
% \DeclareFieldFormat{journaltitle}{\mkbibquote{#1}}
% \DeclareFieldFormat{journaltitle}{%
%     \iffieldundef{shortjournal}%
%     {\em#1}%
%     {\mkbibquote{#1}}%
% }

\DeclareFieldFormat{edition}{\ifinteger{#1}{\bibstring{edition}~}\textsc{\doscroman{\romannumeral#1}}}
% \DeclareFieldFormat[inproceedings]{title}{\mkbibemph{#1}}
\DeclareFieldFormat{volume}{\bibstring{jourvol}\addnbspace\textsc{\doscroman{\romannumeral#1}}}

% Abbreviazione riviste
\renewbibmacro*{journal}{%
  \ifboolexpr{
    test {\iffieldundef{journaltitle}}
    and
    test {\iffieldundef{journalsubtitle}}
  }
    {}
    {\iffieldundef{shortjournal}%
       {\printtext[journaltitle]{%
          \printfield[titlecase]{journaltitle}%
          \setunit{\subtitlepunct}%
          \printfield[titlecase]{journalsubtitle}}}
       {\printfield[journaltitle]{shortjournal}}%
     \newunit}%
  \iffieldundef{journaltitleaddon}
    {}
    {\printfield{journaltitleaddon}}}

\DeclareBibliographyDriver{shortjournal}{%
  \printfield{journaltitle}}

\defbibcheck{shortjournal}{%
   \iffieldundef{shortjournal}
     {\skipentry}
     {\iffieldundef{journaltitle}
       {\skipentry}
       {\ifcsdef{sjcheck@\therefsection
          -\strfield{shortjournal}=\strfield{journaltitle}}
         {\skipentry}
         {\savefieldcs{journaltitle}{sjcheck@\therefsection
            -\strfield{shortjournal}=\strfield{journaltitle}}}}}}

\DeclareBibliographyDriver{shortjournal}{\printfield{journaltitle}}
% \DeclareBiblistFilter{shortjournal}{\filter[type=field,filter=shortjournal]}

\AtBeginBiblist{shortjournal}{\DeclareFieldFormat{journaltitle}{\em#1}\DeclareFieldFormat{shortjournal}{{#1}}}
\defbibenvironment{shortjournal}{%
    \list{}{%
    \labelsep\biblabelsep%
    \labelwidth=4cm%
    \leftmargin\labelwidth%
    \advance\leftmargin\labelsep%
    \itemsep\bibitemsep%
    \parsep\bibparsep%
    \let\makelabel\printshortjournal}}%
    {\endlist}%
    {\item}
\newcommand*{\printshortjournal}{\RaggedRight\printfield{shortjournal}}%


% Formato autore
% \AtBeginBibliography{
    \def\ifmknamesc{%
      \ifboolexpr{ test {\ifcurrentname{labelname}}
                   or test {\ifcurrentname{author}}
                   or ( test {\ifnameundef{author}} and test {\ifcurrentname{editor}} ) }}
    \renewcommand*{\mkbibnameprefix}[1]{%
      \ifmknamesc{\textsc{#1}}{#1}}
    \renewcommand*{\mkbibnamefamily}[1]{%
      \ifmknamesc{\textsc{#1}}{#1}}
% }

\AtBeginBibliography{\DeclareNameFormat{sortname}{\ifgiveninits{\usebibmacro{name:given-family}{\namepartfamily}{\namepartgiveni}{\namepartprefix}{\namepartsuffix}}{\usebibmacro{name:given-family}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}}\usebibmacro{name:andothers}}}

% Formato curatore
\DefineBibliographyStrings{italian}{%
    editor={a cura di},
    editors={a cura di}
}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}

% Attivare funzione idem - previo idemtracker:true
\makeatletter
\newbibmacro{ifrepeatauthor}{\ifciteidem}
\newbibmacro{repeatedauthor}{%
    \bibstring[\mkibid]{idem\thefield{gender}}}%
    % \bibstring[\mkbibsc]{idem\thefield{gender}}}%
    % \iftoggle{cbx:scauthorscite}{\bibstring[\mkbibsc]{idem\thefield{gender}}}{}}%
    \AtBeginBibliography{%
        \renewbibmacro{ifrepeatauthor}{\usebibmacro{bbx:dashcheck}}%
        \renewbibmacro{repeatedauthor}{\bibnamedash}%
    }
    \renewbibmacro*{author}{%
        \ifboolexpr{
            test \ifuseauthor
            and
            not test {\ifnameundef{author}}
        }
        {\usebibmacro{ifrepeatauthor}
        {\usebibmacro{repeatedauthor}}
        {\printnames{author}%
        \setunit{\printdelim{authortypedelim}}%
        \usebibmacro{bbx:savehash}}%
        \usebibmacro{authorstrg}}
        {\global\undef\bbx@lasthash}}
    \renewbibmacro*{bbx:editor}[1]{%
        \ifboolexpr{
            test \ifuseeditor
            and
            not test {\ifnameundef{editor}}
        }
        {\usebibmacro{ifrepeatauthor}
        {\usebibmacro{repeatedauthor}}
        {\printnames{editor}%
        \setunit{\printdelim{editortypedelim}}%
        \usebibmacro{bbx:savehash}}%
        \usebibmacro{#1}%
        \clearname{editor}}
        {\global\undef\bbx@lasthash}}
    \renewbibmacro*{bbx:translator}[1]{%
        \ifboolexpr{
            test \ifusetranslator
            and
            not test {\ifnameundef{translator}}
        }
        {\usebibmacro{ifrepeatauthor}
        {\usebibmacro{repeatedauthor}}
        {\printnames{translator}%
        \setunit{\printdelim{translatortypedelim}}%
        \usebibmacro{bbx:savehash}}%
        \usebibmacro{#1}%
        \clearname{translator}}
        {\global\undef\bbx@lasthash}}
\makeatother

% Indicazione del riferimento in testo senza il nome dell'autore

% Citazione nel testo del nome dell'autore
    \makeatletter%
    \newrobustcmd*{\nextcitenotfullname}{%
        \AtNextCite{%
        \renewcommand*{\mkbibnamefamily}{}%
        \renewcommand*{\mkbibnameprefix}{}%
        }}%
    \newrobustcmd*{\nextcitefullname}{%
        \AtNextCite{\DeclareNameAlias{labelname}{given-family}%
        \renewcommand*{\mkbibnamefamily}{}%
        \renewcommand*{\mkbibnameprefix}{}%
        \togglefalse{abx@bool@giveninits}}}
    \newrobustcmd*{\citeauthorname}{\nextcitenotfullname\citeauthor}
    \newrobustcmd*{\citeauthorfullname}{\nextcitefullname\citeauthor}
    \makeatother

% Istruzioni per riviste
% \renewbibmacro*{issue+date}{%
    % \iffieldundef{number}{\setunit{\addcomma\space}\printfield{number}\usebibmacro{date}}{\setunit{/}\usebibmacro{date}}\newunit}
\renewbibmacro*{volume+number+eid}{%
    \setunit{\addcomma\addspace}%
    \iffieldundef{number}%
        {\printfield{volume}\newunit}%
        {\ifbibliography%
            {\printfield{volume}\newunit}%
        }%
    \newunit\newblock%
    \printfield{number}%
    \newunit\newblock%
    \printfield{eid}%
}

\renewbibmacro{issue+date}{%
    \setunit{\addcomma\space}%
    \iffieldundef{issue}%
        {\usebibmacro{date}\newunit}%
        {\ifbibliography%
            {\printfield{issue}\setunit{/}}%
        \usebibmacro{date}
        }%
    \newunit}

\newcommand*{\volnumdelim}{\addcomma\addspace}
\renewbibmacro*{volume+number+eid}{%
  \iffieldundef{volume}
  {}
  {\setunit{\addcomma\space}\bibstring{jourvol}\addnbspace\printfield{volume}%
  \setunit*{\volnumdelim}}%
  \iffieldundef{number}{}%
  {\setunit{\addcomma\space}\bibstring{number}\addnbspace\printfield{number}}%
  \setunit{\addcomma\space}%
  \printfield{eid}}
\DeclareFieldFormat[article]{volume}{\textsc{\romannumeral#1}}

% Istruzioni per collettanee
\usepackage{biblatex-opcit-booktitle}

% Libri: casa editrice, luogo, anno
\renewbibmacro*{publisher+location+date}{\printlist{publisher}\iflistundef{location}{\setunit*{\addcomma\space}}{\setunit*{\addcomma\space}}\printlist{location}\setunit*{~}\usebibmacro{date}\newunit}

% Citazione Url e DOI
\renewbibmacro*{doi+eprint+url}{%
    \ifbibliography{%
    \iftoggle{bbx:doi}%
    {\printfield{doi}}%
    {}%
    \iftoggle{bbx:eprint}%
    {\usebibmacro{eprint}}%
    {}%
    \iftoggle{bbx:url}%
    {\usebibmacro{url+urldate}}%
    {}}}{}

%%%%%%%%%%%%%%%%%%%%%%%%
% Nuovi tipi d'entrate %
%%%%%%%%%%%%%%%%%%%%%%%%

% Newspapers
\NewBibliographyString{innpaper}
\DefineBibliographyStrings{italian}{%
    innpaper={su}
}

\newbibmacro*{su:}{%
    \bibstring{innpaper}\addspace}
    % \printunit{\intitlepunct}}

\DeclareBibliographyDriver{nparticle}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \usebibmacro{author/translator+others}%
    \setunit{\labelnamepunct}\newblock
    \usebibmacro{title}%
    \newunit
    \printlist{language}%
    \newunit\newblock
    \usebibmacro{byauthor}%
    \newunit\newblock
    \usebibmacro{bytranslator+others}%
    \newunit\newblock
    \printfield{version}%
    \newunit\newblock
    {\usebibmacro{su:}}%
    \usebibmacro{journal+issuetitle}%
    \newunit\newblock
    \usebibmacro{byeditor+others}%
    \newunit\newblock
    \usebibmacro{note+pages}%
    \newunit\newblock
    \iftoggle{bbx:isbn}
    {\printfield{issn}}
    {}%
    \newunit\newblock
    \usebibmacro{doi+eprint+url}%
    \newunit\newblock
    \usebibmacro{pageref}%
    \usebibmacro{finentry}}

% Costituzione e leggi brevi
\DeclareBibliographyDriver{costituzione}%
    {%
    \printfield{title}%
    \ifbibliography{%
    \newunit\newblock%
    \printfield{note}\addspace\printdate%
    \newunit\newblock%
    \printfield{subtitle}%
    \newunit\newblock%
    \printfield{addendum}%
    }{}%
    \finentry}

% Related
\AtEveryCitekey{\togglefalse{bbx:related}}

% Ordine riferimenti bibliografici
\DeclareSortingTemplate{sortjournals}{
    \sort[direction=ascending]{\field{shortjournal}}
    \sort[direction=ascending]{\field{journaltitle}}
}

\DeclareSortingTemplate{iuris}{
        \sort[direction=ascending]{\field{year}}
        \sort[direction=ascending]{\field{month}}
        \sort[direction=ascending]{\field{day}}
        \sort[direction=ascending]{\field{number}}
        \sort{\field{author}}
    }

% Input finali
\renewcommand*{\bibfont}{\small}
\renewbibmacro*{citeindex}{\indexnames{labelname}{}}


\addbibresource{\jobname.bib}

\begin{filecontents}{\jobname.bib}
@article{secondauthor,
    author={Neri, Lucia},gender={sf},
    title={Mario Rossi and its nice book},
    subtitle={A new writing theory?},
    journal={Dream up},
    number={5},year={2021},
    pages={231--233}
}

@book{firstauthor,
    author={Rossi, Mario},gender={sm},
    title={My first book},
    subtitle={Writing skills},
    edition={3},
    editor={Muratore, Adriano},
    publisher={Happy Penguin Feet},
    address={Somewhere},
    year={2023}
}

@inbook{secondauthorbis,
    author={Neri, Lucia},gender={sf},
    title={A new rulebook},
    booktitle={Grammar for pigeons},
    editor={Graziani, Amedeo and Endrici, Rosalba},
    publisher={Animal School},
    address={Nowhere},
    year={2024},
    pages={75--92}
}
\end{filecontents}

\usepackage{hyperref}

\title{Test}
\author{Francesco Contini}
\date{}

\begin{document}
\section{Introduction}
Just an example\footnote{See \cite{firstauthor}.}.
\citeauthor{firstauthor} explains its modern theory%
\footnote{See \cite[25--75]{firstauthor}.}
and gives us some exercises\footnote{See \cite[25--75]{firstauthor}.}.
A recent review tells us it is something of new%
\footnote{See \cite[233]{secondauthor}.
The author confirms its affirmation to the last edition of the book in
\cite[90]{secondauthorbis}.}.
But, if we read any of these entries, we discover that both are totally demented:
there is no any book\footnote{I am referring to \cite{firstauthor}.
\underline{Here I would like to have} \emph{op.\ cit.} instead,
because I cite in the entire document only this entry by Mario Rossi.}.
So that also reviews are totally crazy, especially the curatorship%
\footnote{\Cite[90]{secondauthorbis}.
See also \cite{secondauthor}. \underline{It works.}}.

Finally, not only I totally dreamt up the book%
\footnote{\Cite{firstauthor}.
\underline{Here I would like to have \emph{op.\ cit.} instead.
Explanations \emph{supra}.}},
but also the reviews\footnote{So \cite{secondauthor};
\cite{secondauthorbis}. \underline{It works.}}.


\printbibliography[heading=bibintoc]
\end{document}

5 我指的是 Rossi,上文。6 Neri,上文等,上文。另请参阅 ead.,《Mario Rossi 及其精彩著作》,上文。7 Rossi,上文。8 So Neri,上文等,上文;ead.,《新规则手册》,上文。


\ifsingletitle这是对called的 LaTeX 端重新实现\ifcitesingletitle,它仅考虑单标题测试中引用的作品。这应该可以避免条目related等问题。

\documentclass[12pt]{article}


\usepackage[
  style=verbose-trad1,
  sorting=nyt,
  giveninits=true,
  citetracker=true,
  ibidtracker=context,
  idemtracker=context,
  loccittracker=context,
  opcittracker=true,
  singletitle=true,
  uniquework=true,
  idemtracker=true,
  ibidpage=true,
  citepages=omit,
  strict=true,
  refsection=section,
  citereset=section,
  autocite=inline,
]{biblatex}
\usepackage{csquotes}
% \usepackage{biblatex-shortfields}

\NewBibliographyString{ivi,opultcit,opnoultcit}
% Indicatori
\DefineBibliographyStrings{italian}{%
  opcit      = {cit\adddot},
  opultcit   = {op\adddot\ ult\adddot\ cit\adddot},
  opnoultcit = {op\adddot\ cit\adddot},
  loccit     = {op\adddot\ et loc\adddot\ ult\adddot\ cit\adddot},
  ivi        = {ivi},
  idem       = {\textsc{\autocap{i}d}\adddot},
  idemsf     = {\textsc{\autocap{e}ad}\adddot},
  idempm     = {\textsc{\autocap{e}id}\adddot},
  idempf     = {\textsc{\autocap{e}aed}\adddot},
  idempp     = {\textsc{\autocap{e}id}\adddot},
}

\DefineBibliographyStrings{english}{%
  opcit      = {cit\adddot},
  opultcit   = {op\adddot\ ult\adddot\ cit\adddot},
  opnoultcit = {op\adddot\ cit\adddot},
  loccit     = {op\adddot\ et loc\adddot\ ult\adddot\ cit\adddot},
  ivi        = {ivi},
  idem       = {\textsc{\autocap{i}d}\adddot},
  idemsf     = {\textsc{\autocap{e}ad}\adddot},
  idempm     = {\textsc{\autocap{e}id}\adddot},
  idempf     = {\textsc{\autocap{e}aed}\adddot},
  idempp     = {\textsc{\autocap{e}id}\adddot},
}

\makeatletter
\def\abx@aux@citesingletitlecount#1#2{%
  \csnumgdef{blx@citesingletitle@counter@#1}{#2}}

\def\ifcitesingletitle{%
  \ifcsundef{blx@citesingletitle@counter@\thefield{namehash}}
    {\@secondoftwo}
    {\ifnumless{\csuse{blx@citesingletitle@counter@\thefield{namehash}}}{2}}}

\let\blx@citesingletitle@namelist\empty

\AtEveryCitekey{%
  \xifinlist{\thefield{namehash}}{\blx@citesingletitle@namelist}
    {}
    {\listxadd{\blx@citesingletitle@namelist}{\thefield{namehash}}}%
  \xifinlistcs{\thefield{entrykey}}{blx@citesingletitle@\thefield{namehash}}
    {}
    {\listcsxadd{blx@citesingletitle@\thefield{namehash}}{\thefield{entrykey}}}%
}

\blx@AtEndDocument{%
  \def\do#1{%
    \begingroup
      \blx@tempcnta\z@
      \def\do##1{%
        \advance\blx@tempcnta\@ne
      }
      \dolistcsloop{blx@citesingletitle@#1}%
      \blx@auxwrite\@mainaux{}{%
        \string\abx@aux@citesingletitlecount{#1}{\the\blx@tempcnta}}%
      \ifnumequal{0\csuse{blx@citesingletitle@counter@#1}}{\blx@tempcnta}
        {}
        {\blx@rerun@latex}%
    \endgroup
  }
  \dolistloop{\blx@citesingletitle@namelist}%
}
\makeatother


\renewbibmacro*{cite:ibid}{%
  \ifloccit%
    {\printtext{%
       \bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
         \bibstring[\mkbibemph]{ibidem}}}%
     \global\toggletrue{cbx:loccit}}%
    {\printtext[bibhyperlink]{\bibstring{ivi}}}}

\renewbibmacro*{cite:title}{%
  \printtext[bibhyperlink]{%
    \printfield[citetitle]{labeltitle}%
    \setunit{\addcomma\space}%
    \bibstring{opcit}}%
}

\renewbibmacro*{cite:opcit}{%
  \ifcitesingletitle
    {\printtext[bibhyperlink]{\bibstring[\mkbibemph]{opnoultcit}}}
    {\printtext[bibhyperlink]{\bibstring[\mkbibemph]{opultcit}}}%
}

\renewbibmacro*{cite:loccit}{%
  \printtext[bibhyperlink]{%
    \bibstring[\mkbibemph]{loccit}}%
  \global\toggletrue{cbx:loccit}%
}


\begin{filecontents}{\jobname.bib}
@article{secondauthor,
    author={Neri, Lucia},gender={sf},
    title={Mario Rossi and its nice book},
    subtitle={A new writing theory?},
    journal={Dream up},
    number={5},year={2021},
    pages={231--233}
}
@book{firstauthor,
    author={Rossi, Mario},gender={sm},
    title={My first book},
    subtitle={Writing skills},
    edition={3},
    editor={Muratore, Adriano},
    publisher={Happy Penguin Feet},
    address={Somewhere},
    year={2023},
    related={firstauthorformeredition},
    relatedtype={reprintof}
}
@book{firstauthorformeredition,
    author={Rossi, Mario},gender={sm},
    title={My first book},
    subtitle={Writing skills},
    publisher={Happy Penguin Feet},
    address={Somewhere},
    year={2021},
}
@inbook{secondauthorbis,
    author={Neri, Lucia},gender={sf},
    title={A new rulebook},
    booktitle={Grammar for pigeons},
    editor={Graziani, Amedeo and Endrici, Rosalba},
    publisher={Animal School},
    address={Nowhere},
    year={2024},
    pages={75--92}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\usepackage{hyperref}

\begin{document}
\section{Introduction}
Just an example\footnote{See \cite{firstauthor}.}.
\citeauthor{firstauthor} explains its modern theory%
\footnote{See \cite[25--75]{firstauthor}.}
and gives us some exercises\footnote{See \cite[25--75]{firstauthor}.}.
A recent review tells us it is something of new%
\footnote{See \cite[233]{secondauthor}.
The author confirms its affirmation to the last edition of the book in
\cite[90]{secondauthorbis}.}.
But, if we read any of these entries, we discover that both are totally demented:
there is no any book\footnote{I am referring to \cite{firstauthor}.
\underline{Here I would like to have} \emph{op.\ cit.} instead,
because I cite in the entire document only this entry by Mario Rossi.}.
So that also reviews are totally crazy, especially the curatorship%
\footnote{\Cite[90]{secondauthorbis}.
See also \cite{secondauthor}. \underline{It works.}}.

Finally, not only I totally dreamt up the book%
\footnote{\Cite{firstauthor}.
\underline{Here I would like to have \emph{op.\ cit.} instead.
Explanations \emph{supra}.}},
but also the reviews\footnote{So \cite{secondauthor};
\cite{secondauthorbis}. \underline{It works.}}.


\printbibliography[heading=bibintoc]
\end{document}

相关内容