I would like to increase the minimum space between a footnote mark and the preceding text. Furthermore, I would like to decrease the minimum space between the footnote mark and the following text. He only questions I found where about the space between the footnote index and the footnote text, but that is not what I want. Here is an image of the current behavior (on the left; in some cases it looks like there is no space between the text and the number) and the desired behavior (on the right):
1 Answer
The mark is set in two locations - first in the text, and once in the footnote. You seem to only be interested in updating the in-text display.
The following minimal example updates \@makefnmark
to add some space before and remove some space afterwards. It also updates it only in the in-text display:
\documentclass{article}
\usepackage[paperheight=15\baselineskip]{geometry}% Just for this example
\usepackage{etoolbox}
\makeatletter
% \def\@makefnmark{\hbox{\@textsuperscript{\normalfont\@thefnmark}}}
\let\old@makefnmark\@makefnmark
\newcommand{\@newmakefnmark}{\hbox{\kern.1em \@textsuperscript{\normalfont\@thefnmark}\kern-.1em}}
\patchcmd{\@makefntext}{\@makefnmark}{\old@makefnmark}{}{}
\makeatother
\begin{document}
This is some text\footnote{A footnote}.
\makeatletter
\let\@makefnmark\@newmakefnmark
\setcounter{footnote}{0}
\makeatother
This is some text\footnote{A footnote}.
\end{document}
You can adjust the length in \kern 1em
to push the mark further to the left, as well as adjusting the length in \kern -.1em
to bring the subsequent content closer to it.
-
Can I ask whether there could be any problem caused by changing
\@makefntext
? I have the same problem as this person and it's difficult to figure out whether it's because of my tweak:\makeatletter\renewcommand\@makefntext[1]{\noindent{\@makefnmark} #1}\makeatother
. May 13, 2018 at 18:44 -
@user21820: The only way to assess the problem is via a minimal example, because I'm unable to replicate it as-is.– Werner ♦May 14, 2018 at 16:56
-
@Werner: Ok thanks. I'll see if I can get one maybe a few weeks later. In my case, it's like ten pages and practically anything I delete makes the problem line appear, as well as either of the following apparently unrelated things: (1) use textcolor to make the first word of that line black (no visible difference!); (2) Using
\makeatletter\renewcommand\@makefntext[1]{\noindent{\@makefnmark}~#1}\makeatother
instead. May 14, 2018 at 18:14