Question: When `\newcommand` is used, it is somewhat common that it is used in such a way that the (rendered) post starts with a blank line. 

While this is minor, it is still somewhat unfortunate, and can be avoided easily.

[One answer illustrates the problem](https://meta.mathoverflow.net/a/1282/9072), [another one a solution](https://meta.mathoverflow.net/a/1283/9072), [and still another an almost but not quite solution](https://meta.mathoverflow.net/a/1284/9072). 

If there are better or other ideas or related thoughts, please, share them.

Answer: 
You can also introduce new commands only when they are first needed.
Such as $\newcommand{\where}{\text{here}}\where$ or $\where$.

---

Source:

```
You can also introduce newcommands only when they are first needed.
Such as $\newcommand{\where}{\text{here}}\where$ or $\where$.

```
$\newcommand{\test}{\text{test}}$Here we have no space at the start, and the source is slightly easier to parse.
To achieve this, we use html comments.

---

Source: 

```
$\newcommand{\test}{\text{test}}$<!--
%
-->Here we have no space at the start, and the source is slightly easier to parse.
To achieve this, we use html comments.

```