0

How can I add a footnote to a text that is inside a tikzpicture in latex?

Thank you.

  • 5
    Hi, Welcome! The answer to your question could depend on a lot of things: it is this a standalone picture, it is integrated into a document, which type of document class you use, if you use hyperref... could you please post a simple minimal working example (MWE) so that we can help you? – Rmano Sep 28 '20 at 06:37
  • Duplicate of https://tex.stackexchange.com/questions/107603/create-a-footnote-in-node-in-a-tikzpicture – user202729 Feb 24 '24 at 13:31

1 Answers1

7

You can do footnotes in TikZ pictures the same way you do footnotes in tables or figures, i.e. either you use \footnotemark inside and \footnotetext outside or you wrap the text in a minipage to have the footnote placed directly underneath in the middle of the page.

\documentclass{article}
\usepackage{tikz}
\setlength{\textheight}{3cm} % only for demo!
\begin{document}

\begin{tikzpicture}[every node/.style={ draw=red, rectangle, rounded corners }] \node (a) {Hello world!\footnotemark};

\node [below of=a] (b) {% \begin{minipage}{5cm} foobar\footnote{This footnote is inside the picture} \end{minipage}% }; \end{tikzpicture} \footnotetext{This footnote is outside the picture}

\end{document}

enter image description here

Henri Menke
  • 109,596