I have a little problem with my footnotes. I'm using a solution to add a period at the end of every \footnote{} (yes, I have to use \footnote{} and not \footcite{} because I have to add some text in my footnotes, too) and most of the time it works fine. But when I'm using an acronym (\ac{}) that is at the at of a sentence in a footnote it doesn't work. I'm pretty sure it's because of the \acdot which provides that at the end of a sentence (in the main text) won't be two dots. But I have no clue how to solve this problem. Hopefully, someone could help me.
MWE:
\documentclass[a4paper,12pt]{scrbook}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[german=guillemets]{csquotes}
\usepackage[hidelinks]{hyperref}
\usepackage[style=german-legal-book]{biblatex}
\addbibresource{mylit.bib}
\bibliography{mylit}
\begin{filecontents}{mylit.bib}
@article{Smith,
Author={Smith, John},
Journal={ExamplePaper},
Title={Titel},
Year={2006},
Number={5},
Pages={1--10}
}
\end{filecontents}
\usepackage{acro}
\acsetup{
list/template = styleabbrev,
list/heading = chapter,
list/name = Abkürzungsverzeichnis
}
\DeclareAcronym{mwN}{
short = m.~w.~N\acdot ,
long = mit weiterem Nachweis ,
first-style = short
}
\let\orgfootnote\footnote
\newcommand\myautodot{%
\ifthenelse{\the\spacefactor>\sfcode`,}{}{.}%
}
\renewcommand\footnote[2][\empty]{%
\ifx#1\empty%
\orgfootnote{\normalsfcodes#2\myautodot}%
\else%
\orgfootnote[#1]{\normalsfcodes#2\myautodot}%
\fi%
}
\begin{document}
There are no two dots at the end of sentence \ac{mwN}.\footnote{And here in the footnote is a dot at the end of the sentence}
Some text.\footnote{No two dots at the end of the sentence.}
Some more text.\footnote{Some text \cite[2]{Smith}}
Different text.\footnote{I like \cite[4]{Smith}.}
Here is a dot.\footnote{But here, I only want one dot not two \ac{mwN}}
\end{document}
\footnote{But here, I only want one dot not two \ac{mwN}\spacefactor1001 }– Ulrike Fischer Apr 29 '22 at 12:44