I've examined this in a bit more detail in my blog, but for the purposes of answering the question I'll do a bit of editing and post the key points here.
First, the standard \newcount
, \newtoks
, etc., functions allocate globally. So something like
\begingroup
\newcount\mycount
\endgroup
will permanently consume a register, even though \mycount
disappears at the end of the group. The etex package provides \loccount
, \loctoks
, etc., which do free up the allocation at the end of a group. So
\begingroup
\loccount\mycount
\endgroup
is at least not going to consume registers. However, there are other issues.
In most languages, a local variable is local to some function, and nested functions have there own independent local variables. In TeX, things are different, as it is a macro language and only grouping makes things local. So something like
\def\BadIdea{%
\loccount\mycount
...
}
will not destroy \mycount
at the end of the material inserted by \BadIdea
. On the other hand, things will work within a group, so doing
\def\BetterIdea{%
\begingroup
\loccount\mycount
....
\endgroup
}
will destroy \mycount
as expected. However, you'd get much the same effect by doing
\newcount\mycount
\def\BetterIdea{%
\begingroup
....
\endgroup
}
or even (if you know it's safe)
\def\BetterIdea{%
\begingroup
\@tempcnta=<value>
....
\endgroup
}
i.e. using the general scratch registers.
As local variables for TeX are about groups, and not about macros, I think that best practice remains to allocate globally and use locally. With my LaTeX3 'hat' on, I'd point out that we did try some local allocations out, and when we worked things through decided it was a bit of a nightmare.
Not a complete answer, but a (hopefully) useful hint: The observed inattentiveness of the parskip=full
class option to a change of \baselinestretch
seems to be caused by the fontspec
package. The following example (compiled with XeLaTeX, fontspec
commented out) yields a value for \parskip
of about 17.4 pt (i.e., the same as \baselineskip
).
\documentclass[a4paper,12pt,parskip=full]{scrartcl}
% \usepackage{fontspec}
\linespread{1.2}
\begin{document}
lineskip: \the\lineskip\\
baselineskip: \the\baselineskip\\
baselinestretch: \baselinestretch\\
parskip: \the\parskip\\
\end{document}
Best Answer
It's probably bad practice, although hard to say with no context.
Firstly
\\
does not end the paragraph. If your narrative reaches a point where a large visual break is needed then a paragraph break would seem more natural.If all paragraph breaks need the same visual skip then there is nothing more to do, but if this is a special break then using
Not only makes the source document more readable, and you can define
\newthought
in one place to affect all such constructs in the document, starting with