I have a little problem with my footnotes and using package glossaries-extra. I'm using a solution (see here) 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 abbreviation (\gls{}
) which ends with a period at the end of a sentence in a footnote it doesn't work. I'll get two periods. I have no clue how to solve this problem. Hopefully, someone could help me. (I had a similiar question but with package acro [see here].)
MWE:
\documentclass[paper=a4,fontsize=12pt]{scrbook}
\KOMAoptions{twoside=false}
\usepackage[ngerman]{babel}
\usepackage{fontspec}
\usepackage[german=guillemets]{csquotes}
\usepackage[hidelinks]{hyperref}
\usepackage[style=german-legal-book]{biblatex}
\setmainfont{ebgaramond}[]
\usepackage[style=long,nogroupskip,nonumberlist]{glossaries-extra}
\setabbreviationstyle{short-nolong}
\glssetcategoryattribute{abbreviation}{noshortplural}{true}
\glssetcategoryattribute{abbreviationdot}{discardperiod}{true}
%
\newabbreviation[%
description={mit weiteren/m Nachweisen/Nachweis},%Darstellung der longform im Abkürzungsverzeichnis
category=abbreviationdot,%
longplural={mit weiteren Nachweisen},%
shortplural=m.~w.~N.,
sort={mwN},%
]%
{mwN}%key
{m.~w.~N.}%shortform
{mit weiterem Nachweis}%longform
%
%automatic final period in footnote
\makeatletter%
\long\def\@makefntext#1{%
\parindent 1em\noindent \hb@xt@ 1.8em{\hss\@makefnmark}#1%
\ifnum\the\spacefactor<3000
\ifnum\the\spacefactor=\blx@sf@period
\else
.%
\fi
\fi}
\makeatother
%
\begin{document}
There are no two dots at the end of sentence \gls{mwN}.\footnote{And here in the footnote is a dot at the end of the sentence}
Here is a dot.\footnote{But here, I only want one dot not two: \gls{mwN}}
\end{document}