4

My friend has a problem where he uses \footcite together with authorstyle-icomp and wants things like "ibid." (ebd. in German) to be uppercased when they're at the beginning of a footnote. Also, his bibliography includes Arabic surnames like "al-Kabir", which need to be uppercased as well if a footnote starts with them. So pretty much: footnotes always must start with an uppercase letter.

I tried to solve the problem with a macro I found over at https://stackoverflow.com/questions/2818119/automatically-capitalize-first-letter-of-first-word-in-a-new-sentence-in-latex (\uppercasesingleletter), which unfortunately (a) still uppercases everything and (b) doesn't let itself be integrated into a renewed footnote command.

Here's the Minimal-not-Working Example:

\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 Answer 1

8

This won't work. \uppercase is a primitive which will works ok for simple text, but not with arbitrary content, and not with complicated commands like \cite.

In your case I also see no need to use it. The footnotes starts with an uppercase already in most cases. There is the \Cite command, and for the az-Zayn you can use \autocap:

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

(see also Biblatex, capitalization of arabic names and name prefixes)

\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}

Btw: Don't add "p. " in the postnotes. Let biblatex do it.

enter image description here

3
  • Ulrike, thank you for setting us straight! This works perfectly and given things like \large vs. \Large was probably quite guessable. I'm still glad I asked because I had looked for an answer here on tex.sx and now there is one.
    – Sixtyfive
    Aug 1, 2015 at 14:20
  • Btw, everybody here uses screenshots to show what solutions look like (I've done it myself in questions already) ... I wonder, do you use your OS's screenshot facility or some LaTeX-related tool?
    – Sixtyfive
    Aug 1, 2015 at 14:22
  • I'm using the snipping tool from windows. Aug 1, 2015 at 14:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .