Text FormattingParagraph Spacing around Equations

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Paragraph Spacing around Equations

Post by Cham »

I'm having a spacing problem around my equations. Frequently, the text spacing is too small below an equation. Sometimes, it's too large above the equation. Is there a way to tell LaTeX to use a constant spacing around all equations ?

I'm currently using the following commands in my preamble :

Code: Select all

\documentclass[12pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}

\usepackage{textcomp}
\usepackage{setspace}
\setstretch{1.1}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{mathrsfs}
\usepackage{upgreek}
\usepackage{tensor}

\usepackage{microtype}

\raggedbottom

\usepackage[bottom]{footmisc}

\pagestyle{headings}

\usepackage{anysize}
\marginsize{1.5in}{1in}{0.5in}{0.5in}

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Paragraph Spacing around Equations

Post by localghost »

Read Section 11.5.1 of the »Math mode« document.


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

Paragraph Spacing around Equations

Post by Cham »

I'm not sure to understand. If I add the following code in my preamble, and edit the numbers, it doesn't change anything :

Code: Select all

\abovedisplayskip=12pt plus 3pt minus 9pt
\abovedisplayshortskip=0pt plus 3pt
\belowdisplayskip=12pt plus 3pt minus 9pt
\belowdisplayshortskip=7pt plus 3pt minus 4pt
I understand that the vertical spacing isn't the same if the last line above the equation is short or long (this is a good thing). But the vertical space below the equation isn't always the same, even when the next text line is long.

Here's an example of the problem :
spacing.jpg
spacing.jpg (77.77 KiB) Viewed 10026 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Paragraph Spacing around Equations

Post by localghost »

As the document says these are the predefined values of those length registers. So it shouldn't surprise that nothing changes. The document has an explicit example in the same section.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Paragraph Spacing around Equations

Post by Cham »

localghost wrote:As the document says these are the predefined values of those length registers. So it shouldn't surprise that nothing changes. The document has an explicit example in the same section.
Well, did you saw the example I gave above ? The spacing isn't the same below the equations...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Paragraph Spacing around Equations

Post by localghost »

Cham wrote:Well, did you saw the example I gave above ? The spacing isn't the same below the equations...
I can't see any example. Only an attached picture. If you always want equidistant spaces, set all lengths to the same fixed value without tolerances that allow the spaces to be compressed or stretched.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Paragraph Spacing around Equations

Post by Cham »

localghost wrote: I can't see any example. Only an attached picture. If you always want equidistant spaces, set all lengths to the same fixed value without tolerances that allow the spaces to be compressed or stretched.
The picture illustrates the problem I'm talking about.

What should be the proper command to set all lengths to a constant value ?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Paragraph Spacing around Equations

Post by localghost »

Cham wrote:The picture illustrates the problem I'm talking about. […]
A picture is something to look at but nothing to test solutions.
Cham wrote:[…] What should be the proper command to set all lengths to a constant value?
Following the link in my last reply you would have found out that the \setlength command is the way to go. This by the way is also suggested in every basic LaTeX documentation.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Paragraph Spacing around Equations

Post by Cham »

localghost wrote: Following the link in my last reply you would have found out that the \setlength command is the way to go. This by the way is also suggested in every basic LaTeX documentation.
I already tried it, and it doesn't change anything. The problem (as shown on my picture) stay the same.

EDIT : Sorry, I need some specific example how to use this command. :oops:
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Paragraph Spacing around Equations

Post by localghost »

Cham wrote:[…] Sorry, I need some specific example how to use this command. :oops:
LaTeX for complete Novices - 12. Lengths
Apprends LaTeX!
Post Reply