GeneralIssue with linespacing and amsmath, amsthm, amssymb

General information and discussion about TeXnicCenter
Post Reply
omkardpd
Posts: 86
Joined: Sun Feb 24, 2008 7:23 am

Issue with linespacing and amsmath, amsthm, amssymb

Post by omkardpd »

Hi,

Does \usepackage{amsmath, amsthm, amssymb} statement in preamble affect linespacing in equation display in Latex? Without this \usagepacke, linespacings among equations were singlespacing, but if I use this usepackage for other features, spacing just double, which I am not interested in.

Can someone suggest a way to tackle this issue?

Thank you

Omkar

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
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Issue with linespacing and amsmath, amsthm, amssymb

Post by gmedina »

Please post a minimal working example showing this inter-line spacing change. The following simple code shows the same spacing with or without the amsmath package:

Code: Select all

\documentclass{article}
%\usepackage{amsmath}


\begin{document} 

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\begin{equation}
 a=b
\end{equation}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

\end{document}
By the way, since your problem does not depend on TeXnicCenter, your post belongs to one of the subforums LaTeX->General or LaTeX->Packages and Document classes
1,1,2,3,5,8,13,21,34,55,89,144,233,...
omkardpd
Posts: 86
Joined: Sun Feb 24, 2008 7:23 am

Re: Issue with \usepackage{amsmath, amsthm, amssymb}

Post by omkardpd »

Hi,

Please check this code.

\documentclass [oneside, 10pt, a4paper, onecolumn, fleqn]{article}
\usepackage{setspace}
\onehalfspace
\usepackage{array}
\usepackage{geometry}
\geometry{left=25mm,right=25mm,top=25mm,bottom=25mm}
\usepackage{amsmath}

\begin{document}

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

\begin{equation}
a=b
\end{equation}

\begin{equation}
c=d
\end{equation}

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

\end{document}

Try to get the pdf. Just check the space between eq (1) and (2) printed. Now remove the \usepackage{amsmath}. Rerun and check the space between same equations. It's reduced.

Thank you,

Omkar
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Issue with linespacing and amsmath, amsthm, amssymb

Post by gmedina »

When you use the amsmath package, blank lines will produce additional vertical space. The following example shows how to correct this problem: in the first pair of equations a commented out blank line was added for clarity's sake; in the second pair of equations no blank lines were used. If you want to preserve the indentation obtained leaving a blank line after an equation, you can use the \indent command:

Code: Select all

\documentclass[fleqn]{article}
\usepackage{setspace}
\onehalfspace
\usepackage{amsmath}

\begin{document} 

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
%
\begin{equation}
a=b
\end{equation}
%
\begin{equation}
c=d
\end{equation}
%
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\begin{equation}
a=b
\end{equation}
\begin{equation}
c=d
\end{equation}
\indent text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

\end{document}
Remark: I removed the no essential parts of your preamble.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Issue with linespacing and amsmath, amsthm, amssymb

Post by Juanjo »

Even more, instead of

Code: Select all

\begin{equation}
a=b
\end{equation}
\begin{equation}
c=d
\end{equation}
I would suggest

Code: Select all

\begin{gather}
a=b \\
c=d
\end{gather}
Post Reply