2

Here's a copy of my latex. Looking for any explanation.

\documentclass[11pt]{amsart}

\usepackage{amsfonts}
\usepackage{graphics}
\usepackage{tikz}
\usepackage{booktabs}
\usepackage{etoolbox}
\makeatletter
\preto{\@tabular}{\parskip=0pt}
\makeatother

\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}

\newcommand{\abs}[1]{\left|#1\right|}


\setlength{\textheight}{9in}
\setlength{\textfloatsep}{0pt}
\setlength{\belowdisplayskip}{0pt} \setlength{\belowdisplayshortskip}{0pt}
\setlength{\abovedisplayskip}{0pt} \setlength{\abovedisplayshortskip}{0pt}
\addtolength{\oddsidemargin}{-.875in}
\addtolength{\evensidemargin}{-.625in}
\addtolength{\textwidth}{1.50in}
\addtolength{\textheight}{-.825in}

\begin{document}

\thispagestyle{empty}

\pagestyle{empty}


\noindent {\Large \textbf{Chapter 5}}

\bigskip

\begin{enumerate}\addtolength{\itemsep}{.5\baselineskip}


\medskip\item[52] \textbf{Use the Euclidean Algorithm to find $\gcd(219, 69)$.} 

\medskip

By using the Euclidean Algorithm, we get the following:

\begin{equation*}
\openup\jot 
\begin{aligned}[t]
 & a = bq_{1} + r_{1}\\
  & b = r_{1}q_{2} + r_{2}\\
  & r_{1} = r_{2}q_{3} + r_{3}\\
  & r_{2} = r_{3}q_{4} + r_{4}
\end{aligned}
\qquad\qquad 
\begin{aligned}[t]
 &219 = 69(3) + 12\\
  &69 = 12(5) + 9\\
  &12 = 9(1) + 3\\
  &9 = 3(3) + 0
\end{aligned}
\end{equation*}

The last non-zero remainder is the greatest common divisor, and so $gcd(219, 69) = 3$

\item[53] \textbf{Find integers m and n so that $\gcd(219, 69) = 219m + 69n$.}  

\medskip

\noindent We need to find the values for m and n when: 

$3=219m +69n$

\medskip

The first step to solve this is to take the Euclidean Algorithm that we solved from above and in each step of it, solve for the remainder.

\begin{equation*}
\openup\jot 
\begin{aligned}[t]
 &219 = 69(3) + 12\\
  &69 = 12(5) + 9\\
  &12 = 9(1) + 3\\
  &9 = 3(3) + 0
\end{aligned}
\qquad\qquad 
\begin{aligned}[t]
 &12 = 219 - 69(3)\\
  &9 = 69 - 12(5) \\
  &3 = 12 - 9(1) \\
  &0 = 9 - 3(3) 
\end{aligned}
\end{equation*}

\medskip

\noindent We begin the process by using the equation

\medskip

\begin{tabular}{ll}

$3 = 12 - 9(1)$ & We can also rewrite this as, \\

$3 = 12 + 9(-1)$ & We can now substitute for what 9 is equal to \\

$3 = 12 + (69-12(5))(-1)$ & We can rewrite this equation as \\

$3 = 12 + (69+12(-5))(-1)$ & We then can simplify \\

$3 = 12 + (69(-1)+12(5))$ & Which further simplifies to \\

$3 = 12(6) + 69(-1)$ & We can now substitute in for what 12 is equal to \\

$3 = (219 - 69(3)(6)) + 69(-1)$ & We can rewrite this equation as\\

$3 = (219 + 69(-3)(6)) + 69(-1)$ & We then can simplify \\

$3 = (219(6) + 69(-18)) + 69(-1)$ & Which further simplifies to \\

$3 = 219(6) + 69(-19)$ &
\end{tabular}

\medskip

\noindent By the above equation we have solved $\gcd(219, 69) = 219m + 69n$ when $m=6$ and $n=-19$.


\item[54] \textbf{Use the Euclidean Algorithm to find gcd(10245, 5357).}  

By using the Euclidean Algorithm, we get the following:

\begin{center}
\begin{tabular}{rll} 
$10245$ & $=5357(1)$ & + $4888$ \\ 
$5357$ & $=4888(1)$ & + $469$ \\
$4888$ & $=469(10)$ & + $198$ \\
$469$ & $=198(2)$ & + $73$\\
$198$ & $=73(2)$ & + $52$ \\
$73$ & $=52(1)$ & + $21$ \\
$52$ & $=21(2)$ & + $10$  \\ 
$21$ & $=10(2)$ & + $1$  \\
$10$ & $=1(10)$ & \\

\end{tabular}
\end{center}


The last non-zero remainder is the greatest common divisor, and so $\gcd(10245, 5357) = 1$

\item[55] \textbf{Find integers m and n so that $\gcd(10245, 5357) = 10245m + 5357n$.}  

\noindent We need to find the values for m and n when: 

$1=10245m + 5357n$

\medskip

\noindent The first step to solve this is to take the Euclidean Algorithm that we solved from above and in each step of it, solve for the remainder.

\begin{equation*}
\openup\jot 
\begin{aligned}[t]
& 10245   = 5357(1) + 4888 \\ 
& 5357    =4888(1)   + 469 \\
& 4888    =469(10)   + 198 \\
& 469      =198(2)    + 73\\
& 198       =73(2)      + 52 \\
& 73         =52(1)      + 21 \\
& 52         =21(2)     + 10  \\ 
& 21         =10(2)     + 1  \\
& 10        =1(10) 
\end{aligned}
\qquad\qquad 
\begin{aligned}[t]
& 4888   = 10245 +5357(-1) \\ 
& 469      =5357 +4888(-1)   \\
& 198       =4888+469(-10)  \\
& 73        =469+198(-2)   \\
& 52        =198+73(-2)    \\
& 21         =73 + 52(-1)   \\
& 10         =52+21(-2)   \\ 
& 1           =21+ 10(-2)      
\end{aligned}
\end{equation*}

\noindent We begin the process by using the equation


\begin{tabular}{ll}


$1 = 21 + 10(-2)$ & We can now substitute for what 10 is equal to \\

$1 = 21 + (52+21(-2))(-2)$ & We then can simplify \\

$1 = 21 + (52(-2)+21(4))$ & Which further simplifies to \\

$1 = 21(5) + 52(-2)$ & We can now substitute in for what 21 is equal to \\

$1 = (73 + 52(-1)(5)) + 52(-2)$ & We then can simplify \\

$1 = (73(5) + 52(-5)) + 52(-2)$ & Which further simplifies to \\

$1 = 73(5) + 52(-7)$ & We can now substitute in for what 52 is equal to\\

$1 =  73(5) + (198+73(-2))(-7)$ &  We then can simplify \\

$1 =  73(5) + 198(-7) +73(14)$ &  Which further simplifies to  \\

$1 =  73(19) + 198(-7) $ &  We can now substitute in for what 73 is equal to  \\

$1 =  (469+198(-2))(19) + 198(-7) $ &    We then can simplify \\

$1 =  469(19)+198(-38) + 198(-7) $ &  Which further simplifies to    \\

$1 =  469(19)+198(-45) $ &  We can now substitute in for what 198 is equal to   \\

$1 =  469(19)+(4888+469(-10))(-45) $ &   We then can simplify  \\

$1 =  469(19)+ 4888 (-45) +469(450) $ & Which further simplifies to    \\

$1 =  469(469)+ 4888 (-45)$  & We can now substitute in for what 469 is equal to    \\

$1 =  (5357 +4888(-1))(469)+ 4888 (-45)$  &  We then can simplify   \\

$1 =  5357(469) +4888(-469)+ 4888 (-45)$  &   Which further simplifies to   \\

$1 =  5357(469) +4888(-514)$  &  We can now substitute in for what 4888 is equal to   \\

$1 =  5357(469) +(10245 +5357(-1))(-514)$  &   We then can simplify  \\

$1 =  5357(469) +10245(-514) +5357(514)$  & Which further simplifies to     \\

$1 =  5357(983) +10245(-514) $  &     \\

\end{tabular}

\medskip

\noindent By the above equation we have solved $\gcd(10245, 5357) = 10245m + 5357n$ when $m=-514$ and $n=983$.


\end{enumerate}

\end{document}
Mensch
  • 65,388
Trever
  • 21
  • 1
    Your last table is too large to fit in the previous page, so it is pushed to the next page. While the previous page is stretched out to fill the page hence the "larger" medskip. See this for example. – Troy Oct 08 '17 at 02:11
  • Stick a \raggedbottom (funniest latex command) in the preamble and see if the problem disappears. – JPi Oct 08 '17 at 02:24
  • Or let the tables float. – Andrew Swann Nov 13 '17 at 09:12

1 Answers1

1

The reason \medskip sometimes produces unreasonably large amounts of vertical whitespace is that (a) \medskip is not a fixed length but a so-called "rubber" length and (b) you have several large tabular environments which cannot be broken across pages. In consequence, \medskip gets stretched a lot in various places.

A quick and (very) dirty solution would be to issue the directive \raggedbottom immediately after \begin{document}. This will stop the stretching of the \medskip instances. However, this method will leave very unsightly gaps at the bottom of pages 1 and 2.

A better solution to the problem is obtained by being less profligate with some of the other spacing directives. E.g., I don't think you need to "open up" the line-spacing in various aligned environments. With these adjustments, your code fits easily in ca 1.8 pages of output. The following code removes the \openup statements and performs some other code clean-up operations. I've also shortened the phrases in the second column of the final tabular environment to assure that the tabular actually fits inside the textblock.

enter image description here

\documentclass[11pt]{amsart}

\usepackage{amsfonts}
\usepackage{graphics}
\usepackage{tikz}
\usepackage{booktabs}
%\usepackage{etoolbox}
%\makeatletter
%\preto{\@tabular}{\parskip=0pt}
%\makeatother

\usepackage{array}             % <-- new
\newcolumntype{C}{>{{}}c<{{}}}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}

\newcommand{\abs}[1]{\left|#1\right|}

%\setlength{\textheight}{9in}
%\addtolength{\oddsidemargin}{-.875in}
%\addtolength{\evensidemargin}{-.625in}
%\addtolength{\textwidth}{1.50in}
%\addtolength{\textheight}{-.825in}
\usepackage[letterpaper,margin=1in]{geometry}

\setlength{\textfloatsep}{0pt}
\setlength{\belowdisplayskip}{0pt} 
\setlength{\belowdisplayshortskip}{0pt}
\setlength{\abovedisplayskip}{0pt} 
\setlength{\abovedisplayshortskip}{0pt}

\renewcommand\labelenumi{\textbf{\arabic{enumi}}}

\begin{document}
\pagestyle{empty}
\thispagestyle{empty}

{\Large\textbf{Chapter 5}}

\bigskip

\begin{enumerate}
\setcounter{enumi}{51}
\addtolength{\itemsep}{.5\baselineskip}

\item \textbf{Use the Euclidean Algorithm to find $\gcd(219, 69)$.} 

\medskip\noindent
Using the Euclidean Algorithm, we get the following:
\begin{equation*}
%\openup\jot 
\begin{aligned}[t]
a &= bq_{1} + r_{1}\\
b &= r_{1}q_{2} + r_{2}\\
r_{1} &= r_{2}q_{3} + r_{3}\\
r_{2} &= r_{3}q_{4} + r_{4}
\end{aligned}
\qquad\qquad 
\begin{aligned}[t]
 219 &= 69(3) + 12\\
  69 &= 12(5) + 9\\
  12 &= 9(1) + 3\\
  9  &= 3(3) + 0
\end{aligned}
\end{equation*}
The last non-zero remainder is the greatest common divisor, and so $\gcd(219, 69) = 3$.

\item\textbf{Find integers $m$ and $n$ so that $\gcd(219, 69) = 219m + 69n$.}  

\medskip\noindent
 We need to find the values for $m$ and $n$ when: 
\[3=219m +69n\]
The first step to solve this is to take the Euclidean Algorithm that we solved from above and in each step of it, solve for the remainder.
\begin{equation*}
%\openup\jot 
\begin{aligned}[t]
 219 &= 69(3) + 12\\
  69 &= 12(5) + 9\\
  12 &= 9(1) + 3\\
   9 &= 3(3) + 0
\end{aligned}
\qquad\qquad 
\begin{aligned}[t]
 12 &= 219 - 69(3)\\
  9 &= 69 - 12(5) \\
  3 &= 12 - 9(1) \\
  0 &= 9 - 3(3) 
\end{aligned}
\end{equation*}

\medskip\noindent
We begin the process by using the equation
\[
\begin{tabular}{@{} >{$}l<{$} l @{}}

3 = 12 - 9(1) & We can also rewrite this as, \\

3 = 12 + 9(-1) & substitute for what 9 is equal to \\

3 = 12 + (69-12(5))(-1) & We can rewrite this equation as \\

3 = 12 + (69+12(-5))(-1) & We then can simplify \\

3 = 12 + (69(-1)+12(5)) & Which further simplifies to \\

3 = 12(6) + 69(-1) & substitute in for what 12 is equal to \\

3 = (219 - 69(3)(6)) + 69(-1) & We can rewrite this equation as\\

3 = (219 + 69(-3)(6)) + 69(-1) & We then can simplify \\

3 = (219(6) + 69(-18)) + 69(-1) & Which further simplifies to \\

3 = 219(6) + 69(-19) &
\end{tabular}
\]
By the above equation, we have solved $\gcd(219, 69) = 219m + 69n$ when $m=6$ and $n=-19$.


\item\textbf{Use the Euclidean Algorithm to find $\gcd(10245, 5357)$.}  

\medskip\noindent
By using the Euclidean Algorithm, we get the following:
\[
\setlength\arraycolsep{0pt}
\begin{array}{rClCl} 
10245 &=& 5357(1) &+&  4888 \\ 
5357 &=& 4888(1) &+&  469 \\
4888 &=& 469(10) &+&  198 \\
469 &=& 198(2) &+&  73\\
198 &=& 73(2) &+&  52 \\
73 &=& 52(1) &+&  21 \\
52 &=& 21(2) &+&  10  \\ 
21 &=& 10(2) &+&  1  \\
10 &=& 1(10) & 
\end{array}
\]
The last non-zero remainder is the greatest common divisor, and so $\gcd(10245, 5357) = 1$.

\item\textbf{Find integers $m$ and $n$ so that $\gcd(10245, 5357) = 10245m + 5357n$.}  

\medskip\noindent
We need to find the values for m and n when: 
\[1=10245m + 5357n\]
The first step to solve this is to take the Euclidean Algorithm that we solved from above and in each step of it, solve for the remainder.
\begin{equation*}
\begin{aligned}[t]
10245  &= 5357(1) + 4888 \\ 
5357   &=4888(1)   + 469 \\
4888   &=469(10)   + 198 \\
469     &=198(2)    + 73\\
198      &=73(2)      + 52 \\
73        &=52(1)      + 21 \\
52        &=21(2)     + 10  \\ 
21        &=10(2)     + 1  \\
10       &=1(10) 
\end{aligned}
\qquad\qquad 
\begin{aligned}[t]
4888  &= 10245 +5357(-1) \\ 
469     &=5357 +4888(-1)   \\
198      &=4888+469(-10)  \\
73       &=469+198(-2)   \\
52       &=198+73(-2)    \\
21        &=73 + 52(-1)   \\
10        &=52+21(-2)   \\ 
1          &=21+ 10(-2)      
\end{aligned}
\end{equation*}

\noindent
We begin the process by using the equation
\[
\begin{tabular}{>{$}l<{$} l@{}}

1 = 21 + 10(-2) & Substitute for what 10 is equal to \\

1 = 21 + (52+21(-2))(-2) & We then can simplify \\

1 = 21 + (52(-2)+21(4)) & Which further simplifies to \\

1 = 21(5) + 52(-2) & Substitute in for what 21 is equal to \\

1 = (73 + 52(-1)(5)) + 52(-2) & We then can simplify \\

1 = (73(5) + 52(-5)) + 52(-2) & Which further simplifies to \\

1 = 73(5) + 52(-7) & Substitute in for what 52 is equal to\\

1 =  73(5) + (198+73(-2))(-7) &  We then can simplify \\

1 =  73(5) + 198(-7) +73(14) &  Which further simplifies to  \\

1 =  73(19) + 198(-7)  &  Substitute in for what 73 is equal to  \\

1 =  (469+198(-2))(19) + 198(-7)  &  We then can simplify \\

1 =  469(19)+198(-38) + 198(-7)  &  Which further simplifies to    \\

1 =  469(19)+198(-45)  &  Substitute in for what 198 is equal to   \\

1 =  469(19)+(4888+469(-10))(-45)  &  We then can simplify  \\

1 =  469(19)+ 4888 (-45) +469(450)  & Which further simplifies to    \\

1 =  469(469)+ 4888 (-45)  & Substitute in for what 469 is equal to    \\

1 =  (5357 +4888(-1))(469)+ 4888 (-45)  &  We then can simplify   \\

1 =  5357(469) +4888(-469)+ 4888 (-45)  &   Which further simplifies to   \\

1 =  5357(469) +4888(-514)  & Substitute in for what 4888 is equal to   \\

1 =  5357(469) +(10245 +5357(-1))(-514)  &   We then can simplify  \\

1 =  5357(469) +10245(-514) +5357(514)  & Which further simplifies to     \\

1 =  5357(983) +10245(-514)   &     
\end{tabular}
\]
By the above equation we have solved $\gcd(10245, 5357) = 10245m + 5357n$ for $m=-514$ and $n=983$.

\end{enumerate}
\end{document}
Mico
  • 506,678