\autocap 在 Ibidem 上失败(Biblatex Verbose 样式)

\autocap 在 Ibidem 上失败(Biblatex Verbose 样式)

当需要时,我无法将 Ibidem 变为大写。

我尝试了 \autocap,但没有成功:

MWE:

% !BIB TS-program = biber
% !BIB program = biber
% !TEX encoding = UTF-8 Unicode
% !TeX TS-program = xelatexmk

\begin{filecontents}{archivio.bib}

@collection{Bre:Mo2,
    Title = {Questo è il titolo con 2 curatori},
    Address = {Bari},
    Editor = {John Smith AND James Brown},
    Publisher = {Laterza},
    Year = {1998}}  

\end{filecontents}


\documentclass[A4, 11pt, twoside, openright]{book}
\usepackage{fontspec}
\usepackage{polyglossia}                        
    \setmainlanguage{italian}

\usepackage{xpatch}     
\usepackage[style=verbose-trad2,            
            language=italian,
            ibidpage=true,
        ]{biblatex} 

\NewBibliographyString{ibidemloccit,ibidemnoloccit}

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

\DefineBibliographyStrings{italian}{ibidemloccit={\mkbibemph{\autocap{i}bidem}}}

\addbibresource{archivio.bib}  


\begin{document}

I just want the “Ibidem" go on autocap. So after the fullstop the “I” must be uppercase:\\

\cite[178-179]{Bre:Mo2}
\vspace*{2ex}

And now fullstop. \cite[178-179]{Bre:Mo2}

\end{document}

答案1

\autocap在您的示例中按预期工作,但它本身无法在这里提供帮助。

问题是biblatex无法检测前面的标点符号。它\cite根本不知道它是在句号之后,或者更确切地说在新句子的开头。如果要用引文开头句子,则应使用大写形式\Cite而不是\cite\Autocite而不是\autocite等等)。如果不对 LaTeX 设置进行较大的更改,则无法可靠地自动检测先前的标点符号。

\documentclass[a4paper, 11pt, twoside, openright]{book}
\usepackage{fontspec}
\usepackage{polyglossia}
    \setmainlanguage{italian}

\usepackage{csquotes}
\usepackage[style=verbose-trad2,
            ibidpage=true,
        ]{biblatex}

\NewBibliographyString{ibidemloccit,ibidemnoloccit}

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

\DefineBibliographyStrings{italian}{ibidemloccit={\mkbibemph{\autocap{i}bidem}}}

\addbibresource{biblatex-examples.bib}

\begin{document}
I just want the “Ibidem" go on autocap. So after the fullstop the “I” must be uppercase:

\cite[178-179]{sigfridsson}

And now fullstop. \Cite[178-179]{sigfridsson}
\end{document}

现在就是句号。同上

相关内容