仅对古典文本排除同上和同上

仅对古典文本排除同上和同上

我想区分文学和古代资料。因此,我使用了“classictext”和“entrysubtype”。我有这样一个问题:对于我的文学作品,我想使用“ibid”,但对于那些古代资料,我不想使用“ibid。”或“idem。”,而是重复来源。我该怎么做?这是 MWE:

\documentclass{article}
\usepackage[style=sbl,citepages=separate,backend=biber,sblfootnotes=false,ibidpage=true,ibidtracker=true,idemtracker=true,pagetracker=spread,sorting=nyvt,url=false,isbn=false,doi=false,clearlang=false,uniquename=false]{biblatex} 

    \usepackage{filecontents}
    \begin{filecontents}{\jobname.bib}
           @book{Guillaum.Gnostique.SC,
 editor = {Guillaumont, Antoine and Guillaumont, Claire},
 gender = {pm},
 date = {1989},
 title = {Évagre le Pontique. Le Gnostique. Ou a celui qui est devenu digne de la science},
 shorttitle = {Évagre le Pontique. Le Gnostique},
 location = {Paris},
 keywords = {Evagrius},
series = {SC},
number = {356},
location = {Paris},
 }
@classictext{Evagr.Gnost.gr,
author = {{Evagr. Pont. Gnost.}},
xref = {Guillaum.Gnostique.SC},
  entrysubtype = {classical}, Options = {skipbib=true}, Options = {skipbiblist=true}, 
  shorthand    = {Evagr. Pont. Gnost.},
}
    \end{filecontents}

    
    \DeclareSourcemap{
      \maps[datatype=bibtex]{
        \map{
          \step[fieldsource=entrysubtype, match={classical},final]
          \step[fieldset=pagination, fieldvalue={none}]
        }
      }
    }
    
    \DeclareFieldFormat{shorthand}{%
      \iffieldequalstr{entrysubtype}{classical}
        {\mkbibemph{#1\isdot}}
        {#1\isdot}}
    
    \renewcommand*{\postnotedelim}{%
      \iffieldequalstr{entrysubtype}{classical}
        {}
        {\addcomma}%
      \addspace}
    
    \addbibresource{\jobname.bib}
    \addbibresource{biblatex-examples.bib}
    \begin{document}
    \cite[4]{Evagr.Gnost.gr}; \cite[5]{Evagr.Gnost.gr}\\
\cite[6]{Guillaum.Gnostique.SC}; \cite[7]{Guillaum.Gnostique.SC}    
    

    \end{document}

答案1

我们可以在“同上”中插入另一个条件来检查是否entrysubtype等于classical

\documentclass{article}
\usepackage[style=sbl,citepages=separate,backend=biber,sblfootnotes=false,ibidpage=true,ibidtracker=true,idemtracker=true,pagetracker=spread,sorting=nyvt,url=false,isbn=false,doi=false,clearlang=false,uniquename=false]{biblatex} 


\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldsource=entrysubtype, match={classical},final]
      \step[fieldset=pagination, fieldvalue={none}]
    }
  }
}

\DeclareFieldFormat{shorthand}{%
  \iffieldequalstr{entrysubtype}{classical}
    {\mkbibemph{#1\isdot}}
    {#1\isdot}}

\renewcommand*{\postnotedelim}{%
  \iffieldequalstr{entrysubtype}{classical}
    {}
    {\addcomma}%
  \addspace}


\renewbibmacro*{cite}{%
  \boolfalse{suppresspostnote}%
  \boolfalse{usevolpostnotedelim}%
  \global\togglefalse{usingibid}%
  \global\togglefalse{inentrytype}%
  \global\toggletrue{blx@testpostnotedelim}%
  \ifciteseen
    {\global\toggletrue{relatedseen}}
    {\global\togglefalse{relatedseen}}%
  \ifciteseen{}{\iffieldundef{pages}{}{\booltrue{suppresspostnote}}}%
  \iffieldundef{shorthand}
    {\ifciteseen{}{\bibhypertarget{\strfield{entrykey}}{}}}
    {}%
  \printtext{%
    \ifboolexpr{%
        test {\ifciteibid}
        and
        not test {\iffirstonpage}
        and not test {\iffieldequalstr{entrysubtype}{classical}}
    }
      {\usebibmacro{cite:ibid}}
      {\usebibmacro{ifciteuseshorthand}
         {\usebibmacro{cite:shorthand}}
         {\usedriver{}{cite:\thefield{entrytype}}%
          \ifcsstring{blx@shorthand}{intro}
            {\usebibmacro{shorthandintro}}
            {}}}}}



\begin{filecontents}{\jobname.bib}
@book{Guillaum.Gnostique.SC,
  editor = {Guillaumont, Antoine and Guillaumont, Claire},
  gender = {pm},
  date = {1989},
  title = {Évagre le Pontique. Le Gnostique. Ou a celui qui est devenu digne de la science},
  shorttitle = {Évagre le Pontique. Le Gnostique},
  location = {Paris},
  keywords = {Evagrius},
  series = {SC},
  number = {356},
  location = {Paris},
}
@classictext{Evagr.Gnost.gr,
  author = {{Evagr. Pont. Gnost.}},
  xref = {Guillaum.Gnostique.SC},
  entrysubtype = {classical},
  Options = {skipbib=true},
  Options = {skipbiblist=true}, 
  shorthand    = {Evagr. Pont. Gnost.},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite[4]{Evagr.Gnost.gr}; \cite[5]{Evagr.Gnost.gr}\\
\cite[6]{Guillaum.Gnostique.SC}; \cite[7]{Guillaum.Gnostique.SC}    


\end{document}

埃瓦格。桥。诺斯特。 4;埃瓦格。桥。诺斯特。 5 Antoine Guillaumont 和 Claire Guillaumont 编辑,Évagre le Pontique。灵知。哪一个是科学所要求的,SC 356 (巴黎,1989),6;同上,第 7 页

相关内容