1

At the moment I write macros without breaking them up, like so:

\NewDocumentCommand{\HC}{ o }{\IfNoValueTF{#1} {\emph{HC}\xspace}{\emph{HC}, p.#1\xspace}}

This obviously gets pretty hard to follow once things get longer. Examples on this site are always broken into separate lines, using % at the end of each line. I have never been sure what the rules are for how to do this effectively, or what the practice of arranging code in this way is. I feel that I am falling into a very bad habit by ignoring this. Is there a guide to this anywhere on this site or elsewhere, or is it just personal preference?

DavidR
  • 1,107

0 Answers0