Is there a reason to use the style like:
\def\xx{foo}
\let\yy = \xx
instead of:
\def \xx{foo}
\let \yy = \xx
I'm new to TeX, but everyone seems to prefer the former, while I think the latter looks more natural and readable.
Is there a reason to use the style like:
\def\xx{foo}
\let\yy = \xx
instead of:
\def \xx{foo}
\let \yy = \xx
I'm new to TeX, but everyone seems to prefer the former, while I think the latter looks more natural and readable.
TeX allows both styles; you can type
\def\xx{foo}
\def\xx {foo}
\def \xx {foo}
\def \xx{foo}
\let\yy=\xx
\let\yy =\xx
\let\yy = \xx
\let\yy= \xx
But also
\let\yy\xx
In the case of \def\xx, you take advantage from the fact that spaces after control words are ignored during tokenization. However,
\def\?{foo}
\def\? {foo}
would be different, because spaces are not ignored after control symbols.
For \let is the same, plus the fact that TeX allows <one optional space> after the equals sign, which is itself optional. Stick to your own style, provided it's syntactically sound.
It's a question of habits, mostly. My eyes bleed when I see dramatic indentation in C programming style.
equationenvironment: empty line or not? – Werner Dec 07 '15 at 18:29The TeXbookbefore posting this question). – Alice Dec 07 '15 at 18:42\def\xx{foo}because are related control sequences that I regard as one "order", whereas I do not like join unrelated commands as\thispagestyle{empty}\color{red}\small(but here I prefer line breaks instead of spaces) although may be is not so bad format when the lines of code are distracting and you want to focus only in the contents, not in the surrounding code. – Fran Dec 09 '15 at 12:56