5

I want to have a tikzpicture as a footnote instead of a number. In my specific case I want a duck (from tikzducks) with a sign that has the number of the footnote. The working command for this is:

\usepackage{tikzducks}
\newcommand{\enteB}[1]{\begin{tikzpicture}
        \shuffleducks 
        \duck[signpost=\scalebox{0.9}{
            \parbox{0.5cm}{\color{white}
                \centering #1}}, scale=.4,\randomhead,
        \randomaccessories]\end{tikzpicture}}

I found for using Roman numerals this code on the Internet:

\renewcommand{\thefootnote}{\Roman{footnote}}

Wich works but when I do this with

\renewcommand{\thefootnote}{\enteB{\Arabic{footnote}}}

It won't compile when I simpy use:

\begin{document}
    \footnote{Test}
\end{document}

Are there any simple solutions for this?

edit: The minimal example is:

\documentclass[ngerman]{scrartcl}
\usepackage[hidelinks]{hyperref}
\usepackage{tikzducks}

\usepackage{tikz}

\newcommand{\enteB}[1]{\begin{tikzpicture}
        \shuffleducks 
        \duck[signpost=\scalebox{0.9}{
            \parbox{0.5cm}{\color{white}
                \centering #1}}, scale=.4,\randomhead,
        \randomaccessories]\end{tikzpicture}}
\renewcommand{\thefootnote}{\enteB{\arabic{footnote}}}

\begin{document}
    Tests
    \footnote{Test}
    \enteB{\arabic{footnote}}
\end{document}
1
  • make a small but complete example. That makes it much easier to test your issue. Commented May 27 at 13:30

1 Answer 1

6

Well you can't redefine \thefootnote like this, the command should be expandable, (e.g. to allow to write it to the aux-file if you use a \label). So you must redefine the command that prints the marker:

\documentclass{article}
\usepackage{tikzducks}
\newcommand{\enteB}[1]{\begin{tikzpicture}
        \shuffleducks 
        \duck[signpost=\scalebox{0.9}{
            \parbox{0.5cm}{%
                \centering \textcolor{white}{#1}}}, scale=.4,\randomhead,
        \randomaccessories]\end{tikzpicture}}
\makeatletter
\def\@makefnmark{\hbox{\@textsuperscript{\normalfont\enteB{\@thefnmark}}}}  
\makeatother      

\begin{document}
some text with a footnote\footnote{Test\label{fn}}. Reference: footnote \ref{fn}
\end{document}

enter image description here enter image description here

Be aware that the two ducks are different, if you want to keep them in sync you should set a seed.

3
  • 2
    (using the footnote number as seed might be a convenient way to keep them in sync) Commented May 27 at 13:49
  • Is there any list where I can find a list of options like @makefnmark for like chapters and so on, or like a documentation of all this detailed things?
    – JoniBue1
    Commented May 28 at 14:11
  • 1
    \@makefnmark is and internal command (as you can see from the @ in the name) and basically you have to study the code to find this things out. (With the new footnote code we are developing for the tagged PDF project they will be better interfaces, but that is not finished yet.). Commented May 28 at 14:27

You must log in to answer this question.

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