7

I'd like to change the footnote symbol to an asterisk '*' for one particular footnote, that is placed in a table. In the rest of the document the footnotes appear as default, with numbering, and that is to stay that way.

Note: there are other footnotes in the table itself, that should remain lettered, as the default.

Example Code:

\begin{table}[!h]
    \begin{tabular}{c|c}
        \hline
        First Name & Dennis \\ \hline
        Last Name & the Menace \footnote{Lettered footnote.} \\ \hline
        Age & 12  \footnote{Asterisk footnote!} \\ \hline
        Music & Chop Suey  \footnote{Second lettered footnote.} \\ \hline
        Shoe size & 15 \\ \hline
    \end{tabular}
    \caption[Denis information.]{Some other description.}
    \label{tab:denisInfo}
\end{table}

Result:

enter image description here

1
  • Please complete your code snippet to a minimlal working document. In a standard document without extra packages your code does not produce footnotes. Commented Sep 22, 2017 at 13:25

2 Answers 2

7

You can try like this:

\documentclass[a4paper, 12pt]{article}
\usepackage{footnote}
\usepackage{footmisc}
\makesavenoteenv{tabular}
\makesavenoteenv{table}

\renewcommand{\thefootnote}{\alph{footnote}}

\newcommand{\astfootnote}[1]{%
\let\oldthefootnote=\thefootnote%
\setcounter{footnote}{0}%
\renewcommand{\thefootnote}{\fnsymbol{footnote}}%
\footnote{#1}%
\let\thefootnote=\oldthefootnote%
}

\begin{document}

\begin{table}[!h]
    \begin{tabular}{c|c}
        \hline
        First Name & Dennis \\ \hline
        Last Name & the Menace \footnote{Lettered footnote.} \\ \hline
        Age & 12  \astfootnote{Asterisk footnote!} \\ \hline
        Music & Chop Suey  \footnote{Second lettered footnote.} \\ \hline
        Shoe size & 15 \\ \hline
    \end{tabular}
    \caption[Denis information.]{Some other description.}
    \label{tab:denisInfo}
\end{table}

\end{document}

Output:

enter image description here

1
  • 3
    Is there a reason why there is so much space for the asterisk footnote? I'm not able to find a way to remove it. Commented Apr 2, 2019 at 16:05
6

This is an improved and corrected version of koleygr's answer. It allows you to intermix two series of footnotes. Use \footnote to get the next numbered footnote (1, 2, 3, ...). Use \symfootnote to get the next symbolic footnote (*, †, ‡, ...). You can freely use \label and \ref in the usual way to refer to both kinds of footnotes.

Just for fun, I have included a line (starting with \ifnum) that wraps around to the start of the *, †, ‡, ... series if you've already used up the 9 symbols in it.

\newcounter{savefootnote}
\newcounter{symfootnote}
\newcommand{\symfootnote}[1]{%
   \setcounter{savefootnote}{\value{footnote}}%
   \setcounter{footnote}{\value{symfootnote}}%
   \ifnum\value{footnote}>8\setcounter{footnote}{0}\fi%
   \let\oldthefootnote=\thefootnote%
   \renewcommand{\thefootnote}{\fnsymbol{footnote}}%
   \footnote{#1}%
   \let\thefootnote=\oldthefootnote%
   \setcounter{symfootnote}{\value{footnote}}%
   \setcounter{footnote}{\value{savefootnote}}%
}

Your question is a bit more complicated, because your table uses lettered footnotes (a, b, c, ...). This is probably because it falls within a minipage. Within that environment, the \footnote command uses the separate mpfootnote counter (which it sets to zero at the start of the environment). So below is a more complete solution that makes everything work in the minipage environment, too. This is the same as my previous solution, but now each line that refers to counters gives two commands. The first command deals with the ordinary counters, and the second command deals with their minipage counterparts. (Two commands per line is not normally good style, but in this case it shows the structure of what's going on and may be easier to maintain.)

\usepackage{etoolbox}

\newcounter{savefootnote}\newcounter{savempfootnote}
\newcounter{symfootnote}\newcounter{symmpfootnote}
\AtBeginEnvironment{minipage}{\setcounter{symmpfootnote}{0}}
\newcommand{\symfootnote}[1]{%
   \setcounter{savefootnote}{\value{footnote}}\setcounter{savempfootnote}{\value{mpfootnote}}%
   \setcounter{footnote}{\value{symfootnote}}\setcounter{mpfootnote}{\value{symmpfootnote}}%
   \ifnum\value{footnote}>8\setcounter{footnote}{0}\fi\ifnum\value{mpfootnote}>8\setcounter{mpfootnote}{0}\fi%
   \let\oldthefootnote=\thefootnote\let\oldthempfootnote=\thempfootnote%
   \renewcommand{\thefootnote}{\fnsymbol{footnote}}\renewcommand{\thempfootnote}{\fnsymbol{mpfootnote}}%
   \footnote{#1}%
   \let\thefootnote=\oldthefootnote\let\thempfootnote=\oldthempfootnote%
   \setcounter{symfootnote}{\value{footnote}}\setcounter{symmpfootnote}{\value{mpfootnote}}%
   \setcounter{footnote}{\value{savefootnote}}\setcounter{mpfootnote}{\value{savempfootnote}}%
}
2
  • I think my case fits your solution, but I need to understand better the code to know for sure. I have to alternate 2 types of footnotes, one numbered by default and a parallel series numbered with asterisks. It seems to me that it is a simpler case than this question.
    – Aradnix
    Commented Apr 8, 2023 at 8:41
  • 1
    Just change ">8" to ">0" in my solution. Then \symfootnote will always give you an asterisk. (Instead of rotating among the first 9 symbols, it will "rotate among the first 1 symbols." :-) Commented Apr 11 at 16:30

You must log in to answer this question.

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