# When to use % after a command [duplicate]

I am writing my own class file and when I am browsing through code developed by others I see % sign popping up at the end of command lines while other authors do not use it. Consider the following example from `biblatex`:

``````\DeclareCiteCommand{\citeauthor}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
{\ifciteindex
{\indexnames{labelname}}
{}%
\printnames{labelname}}
{\multicitedelim}
{\usebibmacro{postnote}}
``````

Here the % sign is used after the second and third line. Other others only use it in constructs like

``````\newcommand*{\bla}{%
\a
\b}
``````

where % is only present at the first line. Finally there are authors that use it almost everywhere (after every line). As a class/package writer what should I do?

• This is a duplicate of the above question, but to rephrase the answer, just use a `%` if, if writing the code on one line, you do not want a space at that point. – David Carlisle Feb 10 '14 at 15:05
• In your two examples I would use `%` as shown in the second, and in the first I would add `%` on line 6 – David Carlisle Feb 10 '14 at 15:09

This is probably not a complete answer, but whitespace after a command such as `\a` does not count. So, in your second example, there is no need to add `%` after `\a`.