! You can't use `\unskip' in vertical mode. ... How to get space between lines?
The amsart
class redefines ~
to be \protect\nonbreakingspace
that indeed does \unskip
and \ignorespaces
, because it wants to catch cases when users type
some ~ word
and normalize them as if it were some~word
.
The correct way for “leaving a blank line” is to say
text above
\bigskip
text below
With the definition in amsart
, this makes ~
illegal at the start of a paragraph.
In your case, it seems you're using consecutive math displays, which is wrong for other reasons: you should use gather*
. Note that $$...$$
should never be used in LaTeX.
\begin{gather*}
eq1 \\
eq2 \\[3ex]% some vertical space
eq3
\end{gather*}
There are several other alignment environments available. Check texdoc amsmath
.
The standard definition of ~
will not generate this error
\documentclass{article}
\usepackage{amsthm}
\begin{document}
\begin{proof}
...
$$some stuff$$
$$some more stuff$$
~ % want space here to set apart from above
$$yet more stuff$$
...
\end{proof}
\end{document}
produces
You appear to have a local redefinition of ~
that starts with \unskip
which is clearly incorrect but a quick search of my local tex tree didn't suggest a package you could be using that makes such a definition.
Even though the above is error free, the vertical "gap" is not a vertical space it is a horizontal line of a "white paragraph" just consisting of ~
as such it will not behave correctly, neither stretching nor shrinking nor being discarded at a page break.
$$
is not supported latex syntax, but display math environments should never be used one after the other, whether $$
or supported environments such as \begin{equation}
.
If you use a multline environment you can if needed increase the spacing for example
\documentclass{article}
\usepackage{amsthm,amsmath}
\begin{document}
\begin{proof}
...
\begin{gather*}
some stuff\\
some more stuff\\[1cm]
yet more stuff
\end{gather*}
...
\end{proof}
\end{document}
i'm largely guessing here, but since you're using amsart
, ...
from your description, it seems that you want a large gap between two math displays. that is usually considered inappropriate (see recommendations in Mathematics into Type), but presumably you have a reason.
there is a standard facility for adding space between two lines of a multi-line display. that is to specify the value of the dimension as an option after the \\
separating two lines of such a display. remember, do not leave a space between the backslashes and the
option. amsmath
goes to great lengths to recognize spaces in this position, so that
expressions on the "next" line that start with brackets won't get trapped by the default
latex assumption that anything in that location in brackets must be an option.
example:
\begin{gather*}
x + y = z \\[12pt]
abc = def
\end{gather*}