Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to tag an equation with a card suit. My equation works fine with other labels but the suits do not work.

\begin{equation}
y^2 + 2 = x^3, x, y \in \mathbb{Z}. \tag{\kreuz}
\end{equation}

This works, but,

\begin{equation}
\lvert x^2 - 2y^2 \rvert = 1 \tag{\clubsuit}
\end{equation}

Gives error: Missing $ inserted \end{equation}

Any ideas?

share|improve this question
3  
Welcome to TeX.SX!. Can you please add a full minimal working example so that people can see what packages etc you need to get your code to work (but don't add code that is not needed). This makes it much easier for people to help you. –  Andrew Aug 18 at 6:49

1 Answer 1

up vote 7 down vote accepted

Content inside \tag is not in math mode! (I am surprised too). As \clubsuit is to be used in math mode, add $ around \clubsuit.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
  \begin{equation}
    \lvert x^2 - 2y^2 \rvert = 1 \tag{$\clubsuit$}
  \end{equation}
\end{document}

enter image description here

share|improve this answer
    
Thanks, that's awesome. Really surprising. –  Matthew Norton Aug 18 at 8:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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