Math & ScienceHow to change the local vertical spacing in the align environment?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

How to change the local vertical spacing in the align environment?

Post by Cham »

I'm still having a lot of troubles in my vertical alignments. Here's a MWE showing the trouble:

Code: Select all

\documentclass[11pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{lmodern}
\usepackage[total={6in,10in},left=1.5in,top=0.5in,includehead,includefoot]{geometry}
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{1.1}
\raggedbottom
\usepackage{microtype}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathtools}

\begin{document}

%\setlength{\abovedisplayskip}{1em}
\setlength{\abovedisplayshortskip}{0pt}
\setlength{\belowdisplayskip}{\abovedisplayskip}
\setlength{\belowdisplayshortskip}{\belowdisplayskip}
\setlength{\jot}{3ex}

Blablabla :
	\begin{equation}
	\begin{aligned}
		x(u, v) &= \cosh{u} \, \cos{v}, \\
		y(u, v) &= \cosh{u} \, \sin{v}, \\
		z(u, v) &= \sinh{u}.
	\end{aligned}
	\end{equation}
Blabla bla bla :
	\begin{align*}
		dx &= \sinh{u} \, \cos{v} \: du - \cosh{u} \, \sin{v} \: dv, \\
		dy &= \sinh{u} \, \sin{v} \: du + \cosh{u} \, \cos{v} \: dv, \\
		dz &= \cosh{u} \: du.
	\end{align*}
Bla bla.

\end{document}
Preview:
align.jpg
align.jpg (26.75 KiB) Viewed 14689 times
There are two problems with this code. I don't want to change the global lengths defined in the preamble, since most equations are nicely displayed in my main document. But then the vertical space is too large between the equations in both environments shown above. How can I reduce it locally? Is \\[-11pt] or \\[-1em] the only options here? I feel nervous with adding a negative spacing, it's not "natural".

Secondly, the vertical spacing between the second text line and the second align environment is clearly too large (short skip not working there?). Why is that?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

How to change the local vertical spacing in the align environment?

Post by Cham »

Apparently, using \begingroup\setlength{\jot}{2ex} ... \endgroup solves my issue, for the few cases where I need to change the vertical spacing in some align environments.

Is this a proper solution? Or is it better to use a negative spacing for each \\ ?
Post Reply