TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like my axis to be labeled $s(t)=\delta(t)$, but this does not work because of the = sign (key-value separator). I had a look into the "Comprehensive Symbols Guide" referenced here: http://w2.syronex.com/jmr/tex/texsym.old.html I also found \equal, but it seems like another package is used and to avoid that .... does anyone know how to handle that?

For comepleteness, this is what I need to compile.

% \begin{axis}[ylabel=$u_1(t)=\delta(t)$,ymax=1.2] does not work
\begin{axis}[ylabel=$u_1(t)\ne\delta(t)$,ymax=1.2] % different symbol, of course
    \addplot [->,>=latex] coordinates {
        (0, 0)
        (0, 1)
share|improve this question
What about to protect the equal sign with braces {=}? – Sigur Aug 20 '12 at 11:23
@Sigur: Yes, that's the right thing to do. Same thing is true if the titles contain commas. Equal signs and commas are parsed by the key-value system, so they need to be grouped using braces to protect them. Would you mind writing an answer? – Jake Aug 20 '12 at 11:25
@wal-o-mat: You should always post complete minimal example documents instead of code snippets. That saves others the work of having to fill in the missing bits. – Jake Aug 20 '12 at 11:26
up vote 11 down vote accepted

@Jake, thanks for the confirmation. So, the solution to that problem is to use braces to protect the equal sign, also to protect commas.



share|improve this answer
Put the braces around the whole math expression. If you put them only around the "=" it will affect the spacing before and after the "=". – Ulrike Fischer Aug 20 '12 at 11:40
@UlrikeFischer, thanks. Edited. – Sigur Aug 20 '12 at 11:43
Thank you very much! Especially answers like this which do not only help to solve this specific problem, but help to understand how to think of the problem. – wal-o-mat Aug 20 '12 at 19:25

Your Answer


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.