LaTeX forum ⇒ GeneralHelp me backslash

LaTeX specific issues not fitting into one of the other forums of this category.
Posts: 1
Joined: Fri Dec 01, 2017 6:32 am

Help me backslash

Postby kullboys » Fri Dec 01, 2017 6:37 am


I got a working latex code (got from somebody) which has this syntax:
  2. 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?


User avatar
Site Moderator
Posts: 3582
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri Dec 01, 2017 7:44 am

This is not a valid latex code. Errors are expected. Seems like some parser removed and added backslashes.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

User avatar
Stefan Kottwitz
Site Admin
Posts: 8523
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany

Postby Stefan Kottwitz » Fri Dec 01, 2017 12:50 pm

Welcome to the forum!

The correct syntax is:


A backslash is used for commands and macros (so called "control sequences"). Everything that starts with a backslash \, is a command or macro (well, control sequence in TeX speak). This line above creates a macro called \ABC, that contains the text ABCDEFG.

If you would see stuff like \(, \[, or \{, these are actually macros too, just short.

Site admin

Marcus Bettin
Posts: 2
Joined: Tue Oct 03, 2017 11:07 am

Postby Marcus Bettin » Fri Dec 08, 2017 1:53 pm

Thanks for the code!

Return to “General”

Who is online

Users browsing this forum: Bing [Bot] and 9 guests