2

Using the empheq environment from the empheq package in a TikZ node is throwing errors for me (although it seems to be plotted correctly):

\documentclass{scrartcl}

\usepackage{empheq}
\usepackage{tikz}

\begin{document}
    \begin{tikzpicture}
        \node at (0,0)
        { % empheq is plotted but throws errors
            \begin{empheq}[left=\empheqlbrace]{align*}
                a = b
            \end{empheq}
        };
    \end{tikzpicture}
\end{document}

Errors

  1. Bad math environment delimiter.
  2. \begin{equation*} on input line ... ended by \end{AmSequation*}.

What I already know

From Aligned equations inside of TikZ node. I have learned that align environment can be replaced by aligned:

    % --- align does not work ---
    \node at (0,0) {  \begin{align*} a = b \end{align*}  };

    % --- aligned does ---        
    \node at (0,0) {  $\begin{aligned} a = b \end{aligned}$  };

Please note that I depend on empheq's functionality although the minimal working examples here do not reveal that.

2

tikz is an interesting beast. In this case empheq need to know the size of the area it is in. tikz nodes does not normally set such a size.

You can either put the empheq inside minipage or \parbox. or use the text width node option.

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.