# Proper spacing on footnote symbols

I'm using custom symbols for my footnotes. I want to do them in an old-fashioned style so I'm alternating between daggers and double-daggers. I'm having trouble once it gets up to four instances of either symbol. The two symbols to the right get squashed together:

I'm not sure what's causing this, but I'd like to fix it.

I'm using LyX and XeTeX on a Mac.

Here is just the Preamble:

%% Footnotes
%% allows the use of multiple types of footnotes
\usepackage{perpage}
\MakePerPage{footnote}

%% Footnote Symbols
%% use daggers and double daggers as footnote symbols
%%
%% define which symbols are to be used
\makeatletter
\newcommand*{\myfnsymbolsingle}[1]{%
\ensuremath{%
\ifcase#1% 0
\or % 1
\dagger
\or % 2
\ddagger
\or % 3
\dagger\dagger
\or % 4
\ddagger\ddagger
\or % 5
\dagger\dagger\dagger
\or % 6
\ddagger\ddagger\ddagger
\or % 7
\dagger\dagger\dagger\dagger
\or % 8
\ddagger\ddagger\ddagger\ddagger
\else % >= 9
\@ctrerr
\fi
}%
}
\makeatother
%% redefine the command for creating footnotes
\newcommand*{\myfnsymbol}[1]{%
\myfnsymbolsingle{\value{#1}}%
}
%% multiply the symbols for iterations above the upper bound, if needed
\usepackage{alphalph}
\newalphalph{\myfnsymbolmult}[mult]{\myfnsymbolsingle}{}
\renewcommand*{\thefootnote}{%
\myfnsymbolmult{\value{footnote}}%
}
%% add space between the footnote character and text in the footer
\usepackage{scrextend}
\deffootnote[1em]{1.5em}{1em}{%
\textsuperscript{\thefootnotemark}~%
}


And, here is a Minimal Working Copy, in LyX format (the file has an .lyx extension):

#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
\begin_document
\save_transient_properties true
\origin unavailable
\textclass scrbook
\begin_preamble
%% Footnotes
%% allows the use of multiple types of footnotes
\usepackage{perpage}
\MakePerPage{footnote}

%% Footnote Symbols
%% use daggers and double daggers as footnote symbols
%%
%% define which symbols are to be used
\makeatletter
\newcommand*{\myfnsymbolsingle}[1]{%
\ensuremath{%
\ifcase#1% 0
\or % 1
\dagger
\or % 2
\ddagger
\or % 3
\dagger\dagger
\or % 4
\ddagger\ddagger
\or % 5
\dagger\dagger\dagger
\or % 6
\ddagger\ddagger\ddagger
\or % 7
\dagger\dagger\dagger\dagger
\or % 8
\ddagger\ddagger\ddagger\ddagger
\else % >= 9
\@ctrerr
\fi
}%
}
\makeatother
%% redefine the command for creating footnotes
\newcommand*{\myfnsymbol}[1]{%
\myfnsymbolsingle{\value{#1}}%
}
%% multiply the symbols for iterations above the upper bound, if needed
\usepackage{alphalph}
\newalphalph{\myfnsymbolmult}[mult]{\myfnsymbolsingle}{}
\renewcommand*{\thefootnote}{%
\myfnsymbolmult{\value{footnote}}%
}
%% add space between the footnote character and text in the footer
\usepackage{scrextend}
\deffootnote[1em]{1.5em}{1em}{%
\textsuperscript{\thefootnotemark}~%
}
\end_preamble
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman "default" "Kaiti SC"
\font_sans "default" "Kaiti SC"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts true
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\graphics default
\default_output_format pdf4
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize 12
\spacing single
\use_hyperref true
\pdf_bookmarks true
\pdf_bookmarksnumbered false
\pdf_bookmarksopen false
\pdf_bookmarksopenlevel 1
\pdf_pdfborder false
\pdf_backref false
\pdf_pdfusetitle true
\papersize custom
\use_geometry true
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date true
\justification true
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\end_index
\paperwidth 6in
\paperheight 9in
\leftmargin 0.8in
\topmargin 0.8in
\rightmargin 0.6in
\bottommargin 0.8in
\footskip 0.3in
\secnumdepth -2
\tocdepth 0
\paragraph_separation indent
\paragraph_indentation 0pt
\quotes_language swedish
\papercolumns 1
\papersides 2
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false

\begin_body

\begin_layout Standard
Lorem ipsum dolor sit amet
\begin_inset Foot
status open

\begin_layout Plain Layout
footnote 1
\end_layout

\end_inset

, consectetur adipiscing elit, sed do
\begin_inset Foot
status open

\begin_layout Plain Layout
footnote 2
\end_layout

\end_inset

eiusmod tempor incididunt ut labore et dolore magna aliqua.
\begin_inset Foot
status open

\begin_layout Plain Layout
footnote 3
\end_layout

\end_inset

\begin_inset Foot
status open

\begin_layout Plain Layout
footnote 4
\end_layout

\end_inset

quis nostrud exercitation ullamco laboris
\begin_inset Foot
status open

\begin_layout Plain Layout
footnote 5
\end_layout

\end_inset

nisi ut aliquip ex ea commodo consequat.
\begin_inset Foot
status open

\begin_layout Plain Layout
footnote 6
\end_layout

\end_inset

Duis aute irure dolor in reprehenderit
\begin_inset Foot
status open

\begin_layout Plain Layout
footnote 7
\end_layout

\end_inset

in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
\begin_inset Foot
status open

\begin_layout Plain Layout
footnote 8
\end_layout

\end_inset

Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.
\end_layout

\end_body
\end_document


The solution is to use textcomp package that provides \textdagger and \textdaggerdbl instead of \dagger and \ddagger.

My debugging show that four \daggers or \ddaggers in the row (in math mode ofcourse) causes these strange spaces [So, the specific problem has nothing to do with your code. I suppose is a function of the even amount of \daggers and \ddaggers. You can check the problem on my MWE that contains some daggers in a row to let you see without much effort. Two daggers also are closer than others but in just two the effect is invisible].

Code:

\documentclass{article}
%% Footnotes
%% allows the use of multiple types of footnotes
\usepackage{perpage}
\MakePerPage{footnote}
\usepackage{textcomp}

%% Footnote Symbols
%% use daggers and double daggers as footnote symbols
%%
%% define which symbols are to be used
\makeatletter
\newcommand*{\myfnsymbolsingle}[1]{%
%
\ifcase#1% 0
\or % 1
\textdagger
\or % 2
\textdaggerdbl
\or % 3
\textdagger\textdagger
\or % 4
\textdaggerdbl\textdaggerdbl
\or % 5
\textdagger\textdagger\textdagger
\or % 6
\textdaggerdbl\textdaggerdbl\textdaggerdbl
\or % 7
\textdagger\textdagger\textdagger\textdagger
\or % 8
\textdaggerdbl\textdaggerdbl\textdaggerdbl\textdaggerdbl
\else % >= 9
\@ctrerr
\fi
%
}
\makeatother
%% redefine the command for creating footnotes
\newcommand*{\myfnsymbol}[1]{%
\myfnsymbolsingle{\value{#1}}%
}
%% multiply the symbols for iterations above the upper bound, if needed
\usepackage{alphalph}
\newalphalph{\myfnsymbolmult}[mult]{\myfnsymbolsingle}{}
\renewcommand{\thefootnote}{%
\myfnsymbolmult{\value{footnote}}%
}
%% add space between the footnote character and text in the footer
\usepackage{scrextend}
\deffootnote[1em]{1.5em}{1em}{%
\textsuperscript{\thefootnotemark}~%
}

\begin{document}
\footnote{first} and \footnote{second} and \footnote{third} and \footnote{fourth} and \footnote{fifth}
and \footnote{sixth} and \footnote{seventh} and \footnote{eighth}

Test math daggers:

1:$\dagger$ 2:$\dagger\dagger$ 3:$\dagger\dagger\dagger$ 4:$\dagger\dagger\dagger\dagger$ 5:$\dagger\dagger\dagger\dagger\dagger$
6:$\dagger\dagger\dagger\dagger\dagger\dagger$ 7:$\dagger\dagger\dagger\dagger\dagger\dagger\dagger$
8:$\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger$  9:$\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger$
10:$\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger$  11:$\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger$
12:$\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger$
\end{document}


Output:

• Thank you for your solution. I didn't realize that there was another way to enter the daggers and double daggers. When I tried taking out the part of the code where they were manually-entered, and relying on the section below it to multiply them, it actually fixed things. I don't know why entering them manually in my case caused a problem.
– Aces
Oct 19, 2017 at 12:29
• Welcome @J.D. You have +1 from me too... I think that it has to be a "grouping functionality" of latex in math mode for these symbols. I can not explain it with other way. You can see what happens in every even set above. I don't really know. But in "programming" pluralism is a good thing. So it is good we have two solutions. Oct 19, 2017 at 12:35

To explain why it happens: \dagger is math symbol of type "mathbin". The spacing around such symbols is different if there is something on both sides of the symbol or only one side. One can see the same with the plus sign. The standard method to force the larger space is to use an empty mathgroup {}. The standard method to suppress the space is to add braces around the symbol which makes them of type mathord.

\documentclass{article}

\begin{document}
$+x+x$

${}+x+x$

$\dagger\dagger\dagger\dagger{}$

${\dagger}{\dagger}{\dagger}{\dagger}$

\end{document}


• Thank you very much for that explanation! That's really helpful to know.
– Aces
Oct 25, 2017 at 18:19

I'm still not sure why this issue occurred, but I found a resolution to it.

What caused the problem was manually entering the characters into the Preamble in multiples, like so:

    \or % 3
\dagger\dagger
\or % 4
\ddagger\ddagger
\or % 5
\dagger\dagger\dagger
\or % 6
\ddagger\ddagger\ddagger
\or % 7
\dagger\dagger\dagger\dagger
\or % 8
\ddagger\ddagger\ddagger\ddagger


When that section was removed and the section noted in ALL CAPS in the comments below was used instead, the problem was solved:

%% Footnotes
%% allows the use of multiple types of footnotes
\usepackage{perpage}
\MakePerPage{footnote}

%% Footnote Symbols
%% use daggers and double daggers as footnote symbols
%%
%% define which symbols are to be used
\makeatletter
\newcommand*{\myfnsymbolsingle}[1]{%
\ensuremath{%
\ifcase#1% 0
\or % 1
\dagger
\or % 2
\ddagger
\else % >= 9
\@ctrerr
\fi
}%
}
\makeatother
%% redefine the command for creating footnotes
\newcommand*{\myfnsymbol}[1]{%
\myfnsymbolsingle{\value{#1}}%
}

%% RELY ON THIS SECTION TO MULTIPLY SYMBOLS, INSTEAD
%% multiply the symbols for iterations above the upper bound, if needed
\usepackage{alphalph}
\newalphalph{\myfnsymbolmult}[mult]{\myfnsymbolsingle}{}
\renewcommand*{\thefootnote}{%
\myfnsymbolmult{\value{footnote}}%
}

%% add space between the footnote character and text in the footer
\usepackage{scrextend}
\deffootnote[1em]{1.5em}{1em}{%
\textsuperscript{\thefootnotemark}~%
}


Here is an image of the result:

The spacing is quite neat and tidy, now.

I hope this can be of help to others.