GeneralQuestion about brackets in newcommand

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
dmt
Posts: 82
Joined: Sat Mar 15, 2008 8:13 pm

Question about brackets in newcommand

Post by dmt »

What is the difference between the following two uses of \newcommand?

Code: Select all

\newcommand\foo{stuff}
and

Code: Select all

\newcommand{\foo}{stuff}
I didn't think there was any difference, but I have noticed some odd spacing irregularities in some cases.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Re: Question about brackets in newcommand

Post by Juanjo »

There is no difference between both uses of \newcommand. The irregularities you notice will surely have a different cause. Post here some example.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
dmt
Posts: 82
Joined: Sat Mar 15, 2008 8:13 pm

Re: Question about brackets in newcommand

Post by dmt »

Wow, I must have had some weird typo before since I am now unable to reproduce the problem. Thanks for the answer anyway. Good to know for the future.
Post Reply