2

I wish to insert a % symbol in a line. But the rest of the statement goes missing since % is usually intended for comment. How can I resolve this problem?

6

You should escape it: \%.

For "special character" using \ will say to TeX to not understand it as a special character but a classic one that will be printed in the document.

This is the case for # or _ too for exemple.

| improve this answer | |
2

You can also use the \SI{70}{\percent} command from the siunitx package.

| improve this answer | |
1

Just put a backslash before % such as to write 70% we have to use 70\%.

| improve this answer | |
  • There should be some tiny space between the number and the “unit”, i.e. 70\,\%. – Henri Menke Dec 1 '15 at 8:49
  • @HenriMenke Not generally used; it's not a unit. – egreg Dec 1 '15 at 9:40
  • @egreg That is why I put unit in quotation marks. Also a quick web search revealed that there is no consensus on the space. – Henri Menke Dec 1 '15 at 9:49
  • This kind of spaces is automatically done with the siunitx package. – Jérôme Dequeker Dec 1 '15 at 12:07

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