0

what is wrong with this

\documentclass{article}
\begin{document}
$$\phi\rightarrow\phi^'=\phi+\delta\phi=\phi+\Phi_\nu\omega^\nu$$
\end{document}
gernot
  • 49,614

1 Answers1

1

Your questions is not very clear about what you need and there is no minimal working example. However, I assume you are asking why the latex line doesn't compile inside a document? I must admit I don't exactly know why the syntax $x^'$ doesn't work, but I do know that the following does work:

$$\phi\rightarrow\phi^{'}=\phi+\delta\phi=\phi+\Phi_\nu\omega^\nu$$

giving

Dash as superscript

or

$$\phi\rightarrow\phi'=\phi+\delta\phi=\phi+\Phi_\nu\omega^\nu$$

giving

Normal dash

The second option is the standard way to denote a modified variable (i.e. no need for the dash being a superscript).

I hope this solves your problem!

Wolfgang
  • 108
  • Yes, ^ does expansion and so the apostrophe isn't a “single token”. – egreg Dec 07 '16 at 17:29
  • 3
    please edit the answer to remove the suggestion of ^{'} which removes the error message but makes the wrong output as it is ^{^{\prime}} so a scriptscript style prime. – David Carlisle Dec 07 '16 at 19:40
  • You should also avoid using $$...$$ in a LaTeX document: see Dai Bowen’s comment to the question. – GuM Dec 08 '16 at 00:11
  • @DavidCarlisle: the question author didn't specify that they didn't want a superscript. I did not want to assume that they wanted just the prime, so I gave both options. Note that I did comment on the fact that standard usage is just the '. @GustavoMezzetti: again, that's not what the questions was about so I did not address that. In fact, I would recommend using \begin{equation}, \end{equation} instead of \[ and \], unless you know you will not need any equation numbering anywhere in the doc. – Wolfgang Dec 09 '16 at 14:22
  • @Wolfgang do you think it possible that anyone would want a super-superscript here? It seems reasonable to assume that the OP thought that x^{'} would give a superscript prime not what it does give which is x^{^{\prime}} – David Carlisle Dec 09 '16 at 14:25
  • @DavidCarlisle, it may be reasonable to assume so, I guess it's a judgement call. I just wanted to cover my bases. – Wolfgang Dec 14 '16 at 14:34