$$ = \sum_{e \in A} w(e)
= \sum_{e \in A} w(e)+ \sum_{e \in \{(r,v)| v \in V(G)\}} w(e)
= w( \~{A} ) $$
I get the following error message:
Error: Please use \mathaccent for accents in math mode for the following code
I'm not sure what's wrong with it. I'm in math mode by using $$ $$
, am I not?
Best Answer
The immediate problem is solved by replacing the text-mode instruction
\~{A}
with the math-mode directive\tilde{A}
.You may also want to make the equation both more compact and more readable by (a) introducing a line break in the material set below the third
\sum
symbol (via a\substack
instruction) and (b) eliminating the whitespace that's otherwise inserted to the left and right of that summation symbol (via a\mathclap
instruction).Addendum: For the sake of completeness/reference, here's a list of common accents and how they should be produced in text and math mode, respectively. Note that the positions and, in the case of text-upright versus text-italic font shapes, even the shapes of the accents can differ between text and math modes. In math mode, in contrast, the shapes of the math-accent characters are the same regardless of whether
\mathrm
("math roman") or\mathit
("math italics" -- the default) is in effect.