2

I think I've been using this code:

\renewcommand{\footnotesize}{\fontfamily{phv}\selectfont\scriptsize}
  1. It changes the font of the footnote but not the number of the footnote itself. Any way to change the font of the footnote number as well?

  2. By the way, how do I configure so that the there is no indent for each footnote but add a small space after the number?

  3. Can I also add a minor spacing (1 line) between each footnote?

\documentclass[10pt,a4paper, oneside, final]{article}
\titleformat*{\section}{\fontfamily{phv}\selectfont\LARGE}
\titleformat*{\subsection}{\fontfamily{phv}\selectfont\normalsize\bfseries}
\renewcommand{\footnotesize}{\fontfamily{phv}\selectfont\scriptsize} 
3
  • Can you provide the community with a minimal working example (MWE) that replicates your current behaviour?
    – Werner
    Feb 2, 2016 at 3:00
  • You probably didn't click on the link I sent. We want a minimal working document. Not just a code snippet.
    – Werner
    Feb 2, 2016 at 3:30
  • I did click the link but just wait... this isn't my document. I need some time to figure out which is minimal. But just in general, could you format the footnote >
    – user97009
    Feb 2, 2016 at 3:37

1 Answer 1

3

Don't change \footnotesize...

We need to change three components to address your three requirements.

  1. Change the footnote number.

    For this we need to adjust \@makefnmark, which starts out like this (from latex.ltx):

    \def\@makefnmark{\hbox{\@textsuperscript{\normalfont\@thefnmark}}}
    

    We can replace the insertion of \normalfont with \fontfamily{phv}\selectfont using the following etoolbox:

    \patchcmd{\@makefnmark}{\normalfont}{\fontfamily{phv}\selectfont}{}{}
    
  2. Remove indent of footnote number and add a space.

    For this we need to look at how the actual footnote text is set. This is done using the macro \@footnotetext (again, from latex.ltx):

    \long\def\@footnotetext#1{\insert\footins{%
        \reset@font\footnotesize
        \interlinepenalty\interfootnotelinepenalty
        \splittopskip\footnotesep
        \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
        \hsize\columnwidth \@parboxrestore
        \protected@edef\@currentlabel{%
           \csname p@footnote\endcsname\@thefnmark
        }%
        \color@begingroup
          \@makefntext{%
            \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
        \color@endgroup}}%
    

    \reset@font resets... the font. We can change that to

    \patchcmd{\@footnotetext}{\reset@font}{\fontfamily{phv}\selectfont}{}{}
    
  3. Remove indent of footnote text. This starts with setting the footnote mark using \@makefntext (from article.cls):

    \newcommand\@makefntext[1]{%
        \parindent 1em%
        \noindent
        \hb@[email protected]{\hss\@makefnmark}#1}
    

    While a \parindent is set at 1em, the first paragraph is set without indent - \noindent - with the footnote number set in a box of width 1.8em, rght aligned. We can change this to be left aligned using the following etoolbox patch:

    \patchcmd{\@makefntext}{\hss\@makefnmark}{\@makefnmark}{}{}
    

    If you want, you can even change the 1.8em.

  4. Add some minor gap between footnotes.

    The gap between footnotes (including the footnote rule and the first footnote) is given by \footnotesep. Its length depends on the document class font size option. Under 10pt, this is 6.65\p@ (6.65pt). You can make this (say) twice as large by adding

    \setlength\footnotesep{2\footnotesep}% Default is 6.65pt under a 10pt document class font size
    

    to the document preamble.

Here is a complete minimal example showing the output:

enter image description here

\documentclass{article}
\usepackage[paperheight=15\baselineskip]{geometry}

\usepackage{etoolbox}
\makeatletter
\patchcmd{\@footnotetext}{\reset@font}{\fontfamily{phv}\selectfont}{}{}
\patchcmd{\@makefnmark}{\normalfont}{\fontfamily{phv}\selectfont}{}{}
\patchcmd{\@makefntext}{\hss\@makefnmark}{\@makefnmark}{}{}
\setlength\footnotesep{2\footnotesep}% Default is 6.65pt under a 10pt document class font size
\makeatother

\begin{document}

Texta\footnote{Some footnote.}
Textb\footnote{Another footnote that spans multiple lines within the footnote area.
               Another footnote that spans multiple lines within the footnote area.}

\end{document}
2
  • wow thanks. But I've a question, let's say I name my .tex as main.tex, do I create a new text file as main.ltx to store the macros?
    – user97009
    Feb 2, 2016 at 8:02
  • @user97009: No. Include the part starting with \usepackage{etoolbox} and ending with \makeatother inside your document preamble somewhere.
    – Werner
    Feb 2, 2016 at 8:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .