Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LaTeX blank after number and before text

How could I make a blank after the number in my footnotes? In a general way, for ALL footnotes!

Example:

good: 1 Hello World

bad : 1Hello World

like image 577
lony Avatar asked Dec 08 '09 21:12

lony


4 Answers

The correct answer is not to redefine \thefootnote, because that adds space wherever the footnote is referenced; for example:

\documentclass{article}
\renewcommand{\thefootnote}{\arabic{footnote}~}
\begin{document}
hello\footnote{test\label{foo}} but don't forget about fn.\,\ref{foo}.
\end{document}

Note the extra space when the footnote number is referred to!

The footnote itself (including the number) is placed by the macro \@makefntext, whose default definition is

\parindent 1em\noindent \hb@xt@ 1.8em{\hss \@makefnmark }#1

Here's an example of a replacement that adds some space after the footnote number:

\documentclass{article}
\makeatletter
\long\def\@makefntext#1{%
  \parindent 1em\noindent\hb@xt@ 1.8em{\hss\@makefnmark}~#1%
}
\makeatother
\begin{document}
hello\footnote{test\label{foo}} but don't forget about fn.\,\ref{foo}.
\end{document}

You might also wish to reduce the indent on the left, for example.

like image 62
Will Robertson Avatar answered Sep 27 '22 21:09

Will Robertson


EDIT: Ok, redesigned. Ugly hack, but hey, isn't LaTeX just a whole bunch of those?

Put the following into your preamble:

\let\myfootnote\footnote
\renewcommand{\footnote}[1]{\myfootnote{~#1}}

This will simply prefix your footnote text automagically with a non-breaking space, therefore creating a space after the foot note mark at the bottom of the page. And it won't touch the footnote mark in the middle of the text which is why it still works properly directly before punctuation.

like image 31
Joey Avatar answered Sep 27 '22 20:09

Joey


\hspace 

can always supply horizontal spacing somewhere.

\footnote{\ insert footnote here}
\footnote{~insert footnote here}

Work, but I do not know if it is the official way to do it. The "~" is officially used in cases like:

Mr.~Smith 

To provide the usual whitespace after the abbreviation "." The "\ " I do not know, I just happend to see its use some time ago after accidently putting it in a sentence.

like image 31
bastijn Avatar answered Sep 27 '22 20:09

bastijn


You could try ~ a non-breakable space

like image 20
HH321 Avatar answered Sep 27 '22 22:09

HH321