this is my first stackexchange question so apologies for any bad etiquette.
I'm writing a document in double spacing. I don't wants the gaps between the lines of a multi-line equation to be that large, though.
I know that I can make this change globally by using
\setlength{\jot}{<size>}
...but this also affects other spacings that I don't want to change, e.g. in an xymatrix or when using \gather
I also know that I can keep the changes local by using
\begingroup\setlength{\jot}{<size>}\begin{split}
...
\end{split}\endgroup
...but there is a very large number of split equations in my document and I'd prefer not to make it even messier by doing this.
I tried to define a new environment to effect this local change, like so
\newenvironment{Split}%
{\begingroup\setlength{\jot}{-3pt}\begin{split}}%
{\end{split}\endgroup}
But when I try to implement this in the document I get the following error message:
LaTeX Error: \begin{split} on input line xxx ended by \end{Split}.
I've had success in defining new environments before so I don't know what I'm doing wrong this time.
MWE:
\documentclass{article}
\usepackage{setspace}
\doublespacing
\usepackage{amsmath}
\newenvironment{Split}%
{\begingroup\setlength{\jot}{-3pt}\begin{split}}%
{\end{split}\endgroup}
\begin{document}
\begin{equation}
\begin{split}
y&=x+x\\
&=2x
\end{split}
\end{equation}
\begin{equation}
\begin{Split}
y&=x+x\\
&=2x
\end{Split}
\end{equation}
\end{document}
\begingroup
and\endgroup
as they are provided by\newenvironment
. In addition, if you replace\begin{split}
with\split
and\end{split}
with\endsplit
then your code at least compiles, but the spacing is unaffected. I'm not sure why the spacing is unaffected and I don't have time to investigate now.texdoc technote
section 6...\setlength{\jot}{-3pt}
in the preamble: the length is used in all alignment environments.