Generalbackslash

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
manojg
Posts: 24
Joined: Thu Apr 28, 2011 3:20 am

backslash

Post by manojg »

Hello,

I got a working latex code (got from somebody) which has this syntax:

Code: Select all

newcommand* \{\ABC} \{ABCDEFG}
As I understood, the backslash removes the white space. But I am getting error due to the two backslashes outside {}.

Any suggestions?

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

backslash

Post by Stefan Kottwitz »

A backslash doesn't remove whitspace. It's used at the beginning of control sequences, such as commands.

A correct syntax would be:

Code: Select all

\newcommand*{\ABC}{ABCDEFG}
Stefan
LaTeX.org admin
manojg
Posts: 24
Joined: Thu Apr 28, 2011 3:20 am

Re: backslash

Post by manojg »

Thanks Stefan
Post Reply