2

How can I add reference to a particular block inside a tikzpicture.

For example in my MWE below, I want to add a reference next to work "coil". I tried using \footfullcite{.} but it didn't work

MWE (Adding underbrace in tikz)

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{patterns,snakes}

\begin{document}
\begin{tikzpicture}
\tikzstyle{ground}=[fill,pattern=north east lines,draw=none,minimum width=0.3,minimum height=0.6]

\node (wall1) [ground, minimum height=2cm] {};
\draw (wall1.north east) -- (wall1.south east);
\node [draw,minimum width=0.5cm,minimum height=0.5cm] (mass) at (2,0) {m};
\node (fix) at (0,0) {};
\draw [
    snake=coil,
    segment amplitude=5pt,
    segment length=5pt
] (wall1.east) -- (mass); 
\draw [
    thick,
    decoration={
        brace,
        mirror,
        raise=0.5cm
    },
    decorate
] (wall1.east) -- (mass) 
node [pos=0.5,anchor=north,yshift=-0.55cm] {coil}; 
\end{tikzpicture}
\end{document}
2

Referencing works inside tikzpicture. Footnote are trickier, they need to be separated as \footnotemark and \footnotetext.

\documentclass[a5paper,landscape]{article}

\usepackage{tikz}
\usetikzlibrary{patterns,snakes}

\begin{document}
\begin{tikzpicture}
\tikzstyle{ground}=[fill,pattern=north east lines,draw=none,
  minimum width=0.3,minimum height=0.6]

\node (wall1) [ground, minimum height=2cm] {};
\draw (wall1.north east) -- (wall1.south east);
\node [draw,minimum width=0.5cm,minimum height=0.5cm] (mass) at (2,0) {m};
\node (fix) at (0,0) {};
\draw [
    snake=coil,
    segment amplitude=5pt,
    segment length=5pt
] (wall1.east) -- (mass);
\draw [
    thick,
    decoration={
        brace,
        mirror,
        raise=0.5cm
    },
    decorate
] (wall1.east) -- (mass)
node [pos=0.5,anchor=north,yshift=-0.55cm] {coil \cite{coil}\footnotemark};
\end{tikzpicture}
\footnotetext{The footnote}

\begin{thebibliography}{9}
\bibitem{coil}The Author, \textit{The Title}, 2016.
\end{thebibliography}
\end{document}

Result

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.