In standalone code this works for me, drawing a nice red colored box around my equations (based on TikX \underbrace like replacement that I use without any trouble):
\documentclass{article}
\usepackage{tikz}
\newcounter{tikzNodeNum}
\newcommand{\xmyBoxed}[2]{%
\tikz[baseline]{%
\node[draw=red,rounded corners,anchor=base] (m#2)%
{$\displaystyle#1$};%
}%
}
\newcommand{\myBoxed}[1]{%
\stepcounter{tikzNodeNum}%
\xmyBoxed{#1}{\thetikzNodeNum}%
}
\begin{document}
\begin{equation}
\myBoxed{
a + b = c
}
\end{equation}
\begin{equation}
\myBoxed{
a + b = c
}
\end{equation}
\begin{equation}
\myBoxed{
a + b = c
}
\end{equation}
\end{document}
However, in larger documents, pdfLaTeX hangs when it processes a use of this. I haven't been able to reproduce the hang in any sort of MWE. Could somebody who knows TikZ syntax take a look above and see if there are any syntax errors that could be causing this trouble (when it works, it does draw my boxed equations nicely).
remember pictureoption if you ever want to use the node name again.) What is the typical content that you use it with? You can’t use a&inside*align*environments and expectamsmathto align it correctly. Have you seen thehf-tikzpackage? It seems you’re re-inventing the wheel. – Qrrbrbirlbel Feb 16 '13 at 02:07