# Need help correcting (deliberately faulty) equation code

For a test, I need to edit and correct the following equation, which I understand to contain several syntax errors.

5\square{3X}+2X**2-\frac{3X/2}*


Unfortunately, I'm unfamiliar with LaTeX syntax.

• What's the question? Commented Feb 5, 2019 at 16:12
• What is 2X**2 meant to be? A power of 2? That's not the way of typing it in TeX however
– user31729
Commented Feb 5, 2019 at 16:17
• I’m applying for a proofreading job specializing in manufacturing content. This is a question in the job application, with mandatory entry. They are asking me to edit the incorrect expression; I have no experience in doing this and am looking for help. Commented Feb 5, 2019 at 17:31
• The question is very vague, but, as I understand it, the equation is incorrectly expressed in LaTeX guidelines. Might be bracket placement, spaces, use of ampersand; I just don’t know. Any ideas appreciated. Commented Feb 5, 2019 at 17:48

Thanks for clarifying your (typesetting) objective.

I spottted (at least) six [6!!] mistakes in the code fragment you posted:

• The macro \square is non-standard. Instead of \square{...}, just write (...)^2.

• Use of { and } to denote the scope of the squaring operations. Use ( and ) instead.

• Use of ** instead of ^ to denote exponentiation.

• The \frac macro takes two arguments, not one. Thus, don't write \frac{3X/2}. Instead, write \frac{3X}{2}.

• The final * (asterisk) symbol seems entirely misplaced.

• Last but not least, one needs to initiate and terminate math mode explicitily, e.g., via $ directives. With some misgivings -- after all, still further errors might be lurking somewhere -- I'd write $5(3X)^2+2X^2-\frac{3X}{2}$ Maybe, just maybe, the \square macro was defined via an instruction such as \newcommand\square[1]{(#1)^2}. If that's the case -- you better verify that it is -- you could write $5\square{3X}+2X^2-\frac{3X}{2}\$


However, I can't see the point of bothering defining a macro called \square.

• Thank you! I submitted it as the answer. Still don’t get how it relates to proofreading manufacturing documents. Commented Feb 5, 2019 at 18:32