脚注の最初の文字が常に大文字になるようにするにはどうすればよいですか?

脚注の最初の文字が常に大文字になるようにするにはどうすればよいですか?

\footcite私の友人は、を と一緒に使用しauthorstyle-icomp、 の先頭にある「ibid.」(ドイツ語では ebd.) などを大文字にしたいという問題を抱えていますfootnote。また、彼の参考文献には「al-Kabir」などのアラビア語の姓が含まれており、 がそれらの姓で始まる場合は、これも大文字にする必要がありますfootnote。つまり、脚注は常に大文字で始まる必要があります。

私は見つけたマクロを使って問題を解決しようとしましたhttps://stackoverflow.com/questions/2818119/latex で新しい文の最初の単語の最初の文字を自動的に大文字にする\uppercasesingleletter)は、残念ながら、(a)依然としてすべてを大文字にし、(b)新しいコマンドに統合できませんfootnote

以下に、最小限の動作しない例を示します。

\documentclass{scrartcl}

\usepackage{csquotes}
\usepackage{polyglossia}
\setmainlanguage[spelling=new]{german}

\def\uppercasesingleletter#1{\uppercase{#1}}

\let\oldfootnote\footnote
% compiles, but doesn't do anything
\renewcommand\footnote[1]{\oldfootnote{\uppercasesingleletter{#1}}}
% does not compile in the first place
% \renewcommand\footnote[1]{\oldfootnote{\uppercasesingleletter{#1}}}

\begin{filecontents}{test.bib}
    @book{ali:title:2008,
    title = {Ali's Title},
    author = {Ali, Jamal},
    date = {2008}
    }

    @book{azzayn:title:1965,
    title = {Az-Zayn's Title},
    editor = {az-Zayn, Ahmad},
    date = {1965}
    }
\end{filecontents}

\usepackage[backend=biber,citestyle=authoryear-icomp]{biblatex}
\addbibresource{test.bib}

\DeclareFieldFormat*{citetitle}{\emph{#1}}

\begin{document}

\uppercasesingleletter{only the first letter of this should be uppercase!}

To this here I want to make a reference.\footcite[p. 14]{ali:title:2008} And another one.\footcite[p. 15]{ali:title:2008}

However, what follows needs some more explaining.\footnote{\cite[p. 16]{ali:title:2008}, compare \cite[p. 141]{azzayn:title:1965}.}

First we go back to the first source,\footcite[p. 12]{ali:title:2008} and then we can see that this is an entirely different thing though.\footcite[p. 150]{azzayn:title:1965}

\end{document}

答え1

これは動作しません。\uppercaseは、単純なテキストでは正常に動作するプリミティブですが、任意のコンテンツや のような複雑なコマンドでは動作しません\cite

あなたの場合、それを使用する必要はないと思います。脚注はほとんどの場合、すでに大文字で始まっています。があり、\Cite commandaz-Zayn の場合は を使用できます\autocap

   @book{azzayn:title:1965,
    title = {Az-Zayn's Title},
    editor = {\autocap{a}z-Zayn, Ahmad},
    date = {1965}
    }

(参照Biblatex、アラビア語の名前と名前の接頭辞の大文字化

\documentclass{scrartcl}
\usepackage{csquotes}
\usepackage{polyglossia}
\setmainlanguage{english}
\usepackage[backend=biber,citestyle=authoryear-icomp]{biblatex}
\addbibresource{bib.bib}

\begin{document}

\footcite[14]{ali:title:2008}\footcite[1]{ali:title:2008}

\footnote{\Cite[16]{ali:title:2008}, compare \cite[141]{azzayn:title:1965}.}

\footcites[16]{ali:title:2008}[compare][141]{azzayn:title:1965}

\footcite[12]{ali:title:2008} \footcite[150]{azzayn:title:1965}

\end{document}

ところで: ポストノートに「p. 」を追加しないでください。biblatex に任せてください。

ここに画像の説明を入力してください

関連情報