Math & ScienceSmall vertical spacing glitch in footnote

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

Small vertical spacing glitch in footnote

Post by Cham »

I'm having an extra vertical space under an align environment that I need to remove. Here's a MWE to show the problem:

Code: Select all

\documentclass[12pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[total={6in,10in},left=1.5in,top=0.5in,includehead,includefoot,showframe]{geometry}
\usepackage{setspace}
\setstretch{1.1}
\raggedbottom
\usepackage{microtype}
\usepackage[bottom]{footmisc}  % Options : [ perpage ], [ symbol ], [ multiple ]
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathtools}

\begin{document}

Blablabla\footnote{Blablabla :
	\begin{align*}
		x &= \frac{A}{B},
		& y &= \frac{C}{D}.
	\end{align*}
}

\end{document}
Here's a preview with the spacing problem shown in red:
extraspace.jpg
extraspace.jpg (15.38 KiB) Viewed 6559 times
How can I remove the extra space just under these aligned equations, in that footnote?

Adding the command \vspace{-12pt} just under the align environment is a solution, but it feels like an ugly hack to me. Is there a better solution?

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
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Small vertical spacing glitch in footnote

Post by Stefan Kottwitz »

Hi Cham,

an align environment is not perfect in a footnote, since it comes with space before and after. You could set it to zero within the footnote:

Code: Select all

Blablabla\footnote{\setlength{\belowdisplayskip}{0pt}Blablabla :
	\begin{align*}
		x &= \frac{A}{B},
		& y &= \frac{C}{D}.
	\end{align*}%
}
Stefan
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Small vertical spacing glitch in footnote

Post by Cham »

Thanks Stefan,

it's working. But I also get the same problem with an equation environment (unless I used your trick). That's occuring with a more complicated preamble settup. The MWE below doesn't show it:

Code: Select all

\documentclass[12pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[total={6in,10in},left=1.5in,top=0.5in,includehead,includefoot,showframe]{geometry}
\usepackage{setspace}
\setstretch{1.1}
\raggedbottom
\usepackage{microtype}
\usepackage[bottom]{footmisc}  % Options : [ perpage ], [ symbol ], [ multiple ]
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathtools}

\begin{document}

Blablabla\footnote{Blablabla :
	\begin{equation*}
		x = \frac{A}{B},
		\qquad\qquad
		y = \frac{C}{D}.
	\end{equation*}
}

\end{document}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Small vertical spacing glitch in footnote

Post by Stefan Kottwitz »

Yes, also equation is for "displayed" math, centered with space before and after.

Aligned math without additional space can be done using an aligned environment, such as

Code: Select all

Blablabla\footnote{Blablabla :

     \centering
	$\begin{aligned}
		x &= \frac{A}{B},
		& y &= \frac{C}{D}.
	\end{aligned}$
}
Such an aligned block can be arranged in footnotes, text, or even in tables.

Stefan
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Small vertical spacing glitch in footnote

Post by Cham »

Thanks again, Stefan. I prefer your first solution. I believe my case is solved now :) .
Post Reply