\documentclass[10pt,danish,a4paper,oneside,fleqn]{report}
\usepackage[english]{babel}
\usepackage{amsmath,lipsum}
\begin{document}
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\setlength{\abovedisplayshortskip}{0pt}
\setlength{\belowdisplayshortskip}{0pt}
\lipsum*[2]
\begin{align*}
A\cap B & = \{b,d,e\} \cap \{a,b,f,g\} \\
& = \{b\}
\end{align*}
\lipsum[3]
\end{document}
Note, however, that this is very poor typography. (lipsum
is just to generate dummy text.)
The four parameters state how much vertical space is inserted between text and a math display. The "short" version is used for equation
, when the last line of text is short.
You should also check the way you're inputting math. You're using too much redundant braces (that in some cases give very bad results). It's quite rare to use explicit spacing commands in math.
Here's the result of typesetting the test file
This is the principle. In case you use font size changing commands, you have to tell LaTeX that you want this zero spacing in all sizes by putting this in the preamble
\usepackage{etoolbox}
\newcommand{\zerodisplayskips}{%
\setlength{\abovedisplayskip}{0pt}%
\setlength{\belowdisplayskip}{0pt}%
\setlength{\abovedisplayshortskip}{0pt}%
\setlength{\belowdisplayshortskip}{0pt}}
\appto{\normalsize}{\zerodisplayskips}
\appto{\small}{\zerodisplayskips}
\appto{\footnotesize}{\zerodisplayskips}
so that the example becomes
\documentclass[10pt,danish,a4paper,oneside,fleqn]{report}
\usepackage[english]{babel}
\usepackage{amsmath,lipsum}
\usepackage{etoolbox}
\newcommand{\zerodisplayskips}{%
\setlength{\abovedisplayskip}{0pt}%
\setlength{\belowdisplayskip}{0pt}%
\setlength{\abovedisplayshortskip}{0pt}%
\setlength{\belowdisplayshortskip}{0pt}}
\appto{\normalsize}{\zerodisplayskips}
\appto{\small}{\zerodisplayskips}
\appto{\footnotesize}{\zerodisplayskips}
\begin{document}
\lipsum*[2]
\begin{align*}
A\cap B & = \{b,d,e\} \cap \{a,b,f,g\} \\
& = \{b\}
\end{align*}
\lipsum[3]
\end{document}
Firstly, below skip should be positive, negative values are ignored. You can clear the spacing provided as standard by writing
\makeatletter
\def\thm@space@setup{\thm@preskip=0pt
\thm@postskip=0pt}
\makeatother
before your \newtheoremstyle
. You can adjust this by changing the values 0pt
or using the parameters in the \newtheoremstyle
.
Try
\newenvironment{pf}{\noindent\textit{Proof.}\begin{mdseries}}{\end{mdseries}}
for your proof environment. If this is too simplistic, e.g. if you wish to have the \qed
features of the AMS environment, then you can use the following adaption of the AMS proof code
\makeatletter
\newenvironment{pf}[1][\proofname]{\par
\pushQED{\qed}%
\normalfont \topsep0\p@\relax
\trivlist
\item[\hskip\labelsep\itshape
#1\@addpunct{.}]\ignorespaces
}{%
\popQED\endtrivlist\@endpefalse
}
\makeatother
The important point is setting the value of \topsep
to zero.
Lastly, the proposition number is wrong because you have asked it to be numbered within thm
s! You should write
\newtheorem{prop}[thm]{Proposition}
with [thm]
placed between the other arugments not at the end.
Here is this all put in to one sample document.
\documentclass{article}
\usepackage{amsthm}
\makeatletter
\def\thm@space@setup{\thm@preskip=0pt
\thm@postskip=0pt}
\makeatother
\newtheoremstyle{newstyle}
{} %Aboveskip
{} %Below skip
{\mdseries} %Body font e.g.\mdseries,\bfseries,\scshape,\itshape
{} %Indent
{\bfseries} %Head font e.g.\bfseries,\scshape,\itshape
{.} %Punctuation afer theorem header
{ } %Space after theorem header
{} %Heading
\theoremstyle{newstyle}
\newtheorem{thm}{Theorem}[section]
\newtheorem{prop}[thm]{Proposition}
\newtheorem{lem}{Lemma}
\newtheorem{cor}{Corollary}
\makeatletter
\newenvironment{pf}[1][\proofname]{\par
\pushQED{\qed}%
\normalfont \topsep0\p@\relax
\trivlist
\item[\hskip\labelsep\itshape
#1\@addpunct{.}]\ignorespaces
}{%
\popQED\endtrivlist\@endpefalse
}
\makeatother
\begin{document}
Some text to indicate the spacing.
\begin{thm}
First theorem, with sufficiently long text so that it spills on to a
second line.
\end{thm}
Some text to indicate the spacing. Fill-up text make this spill on to
an extra line. Fill-up text make this spill on to an extra line.
More text.
\begin{prop}
A proposition, with sufficiently long text so that it spills on to a
second line.
\end{prop}
\begin{pf}
Proof of the proposition with \verb+pf+ environment and sufficiently
long text so that it spills on to a second line.
\end{pf}
\begin{prop}
Another proposition, with sufficiently long text so that it spills
on to a second line.
\end{prop}
\begin{proof}
The original proof environment and sufficiently long text so that it
spills on to a second line.
\end{proof}
\end{document}
Best Answer
If you're using one of the AMS document classes (amsart or amsbook) or saying
\usepackage{amsthm}
, you can define a new theoremstyle, two parameters of which are the skip above the theorem and the skip below the theorem. For example, I like my theorems to use slanted type in the body instead of italics, and so I use the following:Almost all of the parameters I used for that
\newtheoremstyle
command are exactly the ones used for the plain theoremstyle in amsart, except that I changed the body font from\itshape
to\slshape
.As noted in the comments, the second and third parameters to the
\newtheoremstyle
command are the space above and the space below. You can change those to whatever you like (and even change the\slshape
that I use back to\itshape
if that's what you prefer).