3

How can I decrease the distance between the following two formulas?

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{vietnam}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[margin=2cm]{geometry}
\usepackage{enumerate}
\usepackage{mathrsfs}
\usepackage{afterpage}
\begin{document}
\noindent\\
Ta có: $$ \begin{array}{c}
\forall y \in \alpha + [(-\alpha+E) \cap A] \Leftrightarrow y- \alpha \in (-\alpha +E) \cap A \Leftrightarrow
\text{$
    \begin{cases}
    y-\alpha \in -\alpha +E \\
    y- \alpha \in A
    \end{cases}$}\Leftrightarrow \text{$
    \begin{cases}
    y \in E \\
    y \in \alpha+A
    \end{cases}$}
\end{array}
$$
$$ \begin{array}{c}
\forall y \in \alpha + [(-\alpha+E) \setminus A] \Leftrightarrow y- \alpha \in (-\alpha +E) \setminus A \Leftrightarrow
\text{$
    \begin{cases}
    y-\alpha \in -\alpha +E \\
    y- \alpha \notin A
    \end{cases}$}\Leftrightarrow \text{$
    \begin{cases}
    y \in E \\
    y \notin \alpha+A
    \end{cases}$}
\end{array}
$$
Ta chứng minh $x+A$, $xA$ là $L$-đo được.
\end{document}

Enter image description here

2 Answers2

6

First of all: sorry, my editor cannot deal with your accented characters, so I had to drop them. Then

  1. You should not put a cases environment in \text{$...$}, but you do not need cases here anyway. The case environment expects two columns, which is why it introduces the extra space here.
  2. Please do not use $$...$$, but \[...\] instead.
  3. You can use an array here.
  4. I had a little help from David Carlisle.

\documentclass[12pt,a4paper]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{amsmath}
\begin{document}

Ta co: \begin{gather*}
\forall y \in \alpha + [(-\alpha+E) \cap A]
 \Leftrightarrow y- \alpha \in (-\alpha +E) \cap A \Leftrightarrow
    \left\{\begin{array}{@{}l@{}}
    y-\alpha \in -\alpha +E \\ 
    y- \alpha \in A 
    \end{array}\right. \Leftrightarrow
    \left\{\begin{array}{@{}l@{}}
    y \in E \\ 
    y \in \alpha+A
    \end{array}\right.
\\
\forall y \in \alpha + [(-\alpha+E) \setminus A] \Leftrightarrow y- \alpha \in (-\alpha +E) \setminus A \Leftrightarrow
    \left\{\begin{array}{@{}l@{}} 
    y-\alpha \in -\alpha +E \\ 
    y- \alpha \notin A 
    \end{array}\right.\Leftrightarrow
    \left\{\begin{array}{@{}l@{}} 
    y \in E \\ 
    y \notin \alpha+A
    \end{array}\right.
\end{gather*}
Ta chung minh $x+A$, $xA$ la $L$-do duoc.
\end{document}

enter image description here

One may also use aligned.

\documentclass[12pt,a4paper]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{amsmath}
\begin{document}

Ta co: 
\[\begin{aligned}
\forall y \in \alpha + [(-\alpha+E) \cap A]
 \Leftrightarrow y- \alpha \in (-\alpha +E) \cap A \Leftrightarrow
    &\left\{\begin{aligned}
    &y-\alpha \in -\alpha +E \\ 
    &y- \alpha \in A 
    \end{aligned}\right. \Leftrightarrow
    \left\{\begin{aligned}
    &y \in E \\ 
    &y \in \alpha+A
    \end{aligned}\right.
\\
\forall y \in \alpha + [(-\alpha+E) \setminus A] \Leftrightarrow y- \alpha \in (-\alpha +E) \setminus A \Leftrightarrow
    &\left\{\begin{aligned} 
    &y-\alpha \in -\alpha +E \\ 
    &y- \alpha \notin A 
    \end{aligned}\right.\Leftrightarrow
    \left\{\begin{aligned} 
    &y \in E \\ 
    &y \notin \alpha+A
    \end{aligned}\right.
\end{aligned}   
\]
Ta chung minh $x+A$, $xA$ la $L$-do duoc.
\end{document}

enter image description here

  • 1
    too adjacent display math :( (gather is designed for that) – David Carlisle May 24 '20 at 08:59
  • 1
    @DavidCarlisle Thanks! Better now? (I just can't remember gather, for some reason it always becomes \begin{gopher} and then LaTeX gives me an error.) –  May 24 '20 at 09:06
  • 1
    if I was being picky I'd say that the "One may also use" could say "The above is wrong but you could instead use" but I'm not picky so +1 :-) – David Carlisle May 24 '20 at 09:09
  • 1
    @DavidCarlisle OK, my editor had the old version in the buffer. Sorry and thanks! –  May 24 '20 at 09:10
  • 1
    because tex just doesn't do anything sensible if display math is at start of a paragraph or immediately following another display math (I think I have an answer giving gory details somewhere, I'll see if I can find) – David Carlisle May 24 '20 at 09:12
  • 1
    No, I got it,. I just happened to copy the wrong version. Now there is a gopher environment. Thanks! –  May 24 '20 at 09:14
  • What editor? UltraEdit on Linux? It (auto detect) sometimes thinks it is ISO 8859-1 when it is clearly not (e.g. for UTF-8 sequence C3 96 for "Ö" - e.g. in LÖVE. – Peter Mortensen May 24 '20 at 17:32
  • 1
    @PeterMortensen No, I have an ancient one. But if you look at this comment and this answer then you may understand why some do not want to use these accented characters anyway. I know and acknowledge that I am in a minority, but I am not ready to give up the convenience of my ancient editor for for a somewhat shaky convenience of adding all these accented characters. –  May 24 '20 at 17:36
2

Hope it works as desired! Just use the setspace package and control the setstretch option. And try to use \[ ... \] instead of $$ ... $$.

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{vietnam}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[margin=2cm]{geometry}
\usepackage{enumerate}
\usepackage{mathrsfs}
\usepackage{afterpage}
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{.75}

\begin{document}
\noindent\\
Ta có: $$ \begin{array}{c}
\forall y \in \alpha + [(-\alpha+E) \cap A] \Leftrightarrow y- \alpha \in (-\alpha+E) \cap A \Leftrightarrow
\text{$
\begin{cases} 
y-\alpha \in -\alpha +E \\ 
y- \alpha \in A 
\end{cases}$}\Leftrightarrow \text{$
\begin{cases} 
y \in E \\ 
y \in \alpha+A
\end{cases}$}
\end{array}
$$
$$ \begin{array}{c}
\forall y \in \alpha + [(-\alpha+E) \setminus A] \Leftrightarrow y- \alpha \in (-\alpha +E) \setminus A \Leftrightarrow
\text{$
\begin{cases} 
y-\alpha \in -\alpha +E \\ 
y- \alpha \notin A 
\end{cases}$}\Leftrightarrow \text{$
\begin{cases} 
y \in E \\ 
y \notin \alpha+A
\end{cases}$}
\end{array}
$$
Ta chứng minh $x+A$, $xA$ là $L$-đo được.
\end{document}