5

Purpose:
I am using fancyhdr package to put some text on my headers and footers.

Problem:
I want my footnotes to appear as a part of the fancy footer and not appear separately as shown.

Other Trials:
I have tried \usepackage[bottom]{footmisc}, but that just gets the regular footnote to appear at the bottom of the page, but does not integrate the footnote with the fancy footer.

MWE

\documentclass{article}
\usepackage{fancyhdr}
\fancypagestyle{plain}{%
  \cfoot{\thepage}
  \renewcommand{\headrulewidth}{0.4pt}
  \renewcommand{\footrulewidth}{0.4pt}
}
\pagestyle{plain}

\begin{document}

The family of exponential densities would be useful in Maximum Likelihood estimators later in the course. \footnote{Lets try and do some mathematica simulations for showing these densities and the effect of parameter variations.}

\end{document}

My fancy footnote conflicts with regular footnote

5
  • 1
    What is a "regula footnote"?
    – Clément
    Jun 27, 2014 at 19:01
  • 2
    So you want to place the footnote in the actual "fancy" footer?
    – Werner
    Jun 27, 2014 at 19:18
  • That code will not produce the output posted.
    – cfr
    Jun 27, 2014 at 20:44
  • It looks like what you want is for LaTeX to revert to the "standard" plain page style -- i.e., no "footrule" -- whenever there's at least one footnote on a page. Is this interpretation correct?
    – Mico
    Jun 28, 2014 at 6:39
  • 1
    Sorry for the confusion guys! What I want is what @Werner mentions. 1)I don't want to change the style of the page! 2) I want my footnotes to come in the actual "fancy" footer.
    – EndLoop
    Jun 28, 2014 at 10:35

1 Answer 1

3

I was facing the same problem, after seeing this answer Frank Engelhardt aproach I tried to improve it with the package etoolbox, even moves the page number to the right when a footnote exist and can handle multiple footnotes. (Frank's versions it's simpler, but can't handle more than one and you have to manually label them.)

\documentclass{article}
\usepackage{fancyhdr}%
\usepackage{etoolbox}%

\newcommand{\makefootnotelist}[1]{%
    \parbox{0.8\textwidth} {%
        \footnotesize{%
            \renewcommand*{\do}[1]{##1\\}%
            \dolistcsloop{#1}}}}%
\newcommand{\fancyfootnote}[1]{%
    \footnotemark{}%
    \def\listname{footlist\thepage}%
    \def\n{$^{\the\numexpr\value{footnote}}$}
    \ifcsdef{\listname}%
        {\listcseadd{\listname}{\n\ #1}}%
        {\csedef{\listname}{}%
        \listcseadd{\listname}{\n\ #1}}%
    \fancypagestyle{fancyfootnote}{%
        \fancyfoot[LO,RE]{\makefootnotelist{\listname}}%
        \fancyfoot[RO,LE]{\thepage}%
        \fancyfoot[C]{}%
    }\thispagestyle{fancyfootnote}}%

\fancypagestyle{plain}{%
  \fancyfoot[C]{\thepage}
  \renewcommand{\headrulewidth}{0.4pt}
  \renewcommand{\footrulewidth}{0.4pt}
}
\begin{document}
The family of exponential densities would be useful in Maximum Likelihood estimators later in the course. \fancyfootnote{Lets try and do some mathematica simulations for showing these densities and the effect of parameter variations.}
\end{document}

You can even redefine \footnote so you don't have to use a different one:

% Use instead of fancyfootnote
\renewcommand{\footnote}[1]{% ... }%

\cfoot{} it's now deprecated, use \fancyfoot[C]{} instead

Example with your code.

1
  • 1
    Thanks a lot. Sorry it took time figuring out etiquette for Q&A portals. Cheers!
    – EndLoop
    Oct 21, 2020 at 2:22

You must log in to answer this question.

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