I've just begun using TeXShop but seem to have come across a problem – I have a centered section that uses a \medskip right after a newline. Like so:
\begin{center}
Some text \\
Some subheading \#1\\
More subheading \#3\\
\medskip
Last subheading\\
\end{center}
Which works fine. But when I do this in a paragraph, or item, or, for that matter, anything else. It seems not to work. \medskip
inserts line spaces in unexpected places, and never after the newline that directly precedes the \medskip
. I've also tried not using the newline to precede the \medskip
at all, to no avail.
Your help is much appreciated, as usual!
-L
Best Answer
You should hardly ever need to use explicit spaces in a latex document, spaces should be under the control of structural commands such as lists and section headings.
However
\medskip
is short for\vspace{\medskipamount}
and use of\vspace
in horizontal mode has a slightly odd effect that the space comes after the current line. This is almost always not what you want so\vspace
if it is used at all is best used with a blank line before it, to get into vertical mode, so the space comes between paragraphs.\\
in thecenter
environment is redefined so that it does\par
internally but in most other cases you are not in vertical mode after\\
. Perhaps you are looking for\\[\medskipamount]