Text Formatting ⇒ Line Spacing
Line Spacing
I am a new user of Latex today! I have typed in some code to produce a user guide for some students but when I run it there is a line space that is too large. I have looked up a way of reducing it but can't find one despite trying several. Any help would be great! The code is below: including comments from a template ..... sorry!
Huge thanks,
Martin.
\documentclass[12pt, oneside]{article} % use "amsart" instead of "article" for AMSLaTeX format
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
\geometry{a4paper} % ... or a4paper or a5paper or ...
%\geometry{landscape} % Activate for rotated page geometry
%\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx} % Use pdf, png, jpg, or eps§ with pdflatex; use eps in DVI mode
% TeX will automatically convert eps --> pdf in pdflatex
\usepackage{amssymb}
\usepackage{amsmath}
%SetFonts
%SetFonts
\title{Brief Article}
\author{The Author}
%\date{} % Activate to display a given date or no date
\begin{document}
\begin{align*}
x + 3 &= 7 &x - 3 &= 7 &3x &= 21 &\frac{x}{3} &= 7 &\frac{2x}{3} &= 6 \\
\;-3 \;& \;\;\;-3 &\;+3 \;& \;\;\;+3 &\;\div3 \;& \;\;\;\div3 &\;\times3 \;& \;\;\;\times3 &\;\times3 \;& \;\;\;\times3 \\
x&=4 &x&=10 &x&=7 &x&=21 &2x&=18
\end{align*} %I need a smaller space after this command to align the text below with the final equation
\hspace{120mm} $\div2\;\;\;\;\div2$ \\
\hspace*{120mm} $\;\;\;\;x=9$
\maketitle
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Line Spacing
I don't understand why you don't just put those lines into the same align*-environment...
Code: Select all
\documentclass[12pt, a4paper]{article}
\usepackage{amssymb}
\usepackage{amsmath}
\begin{document}
\begin{align*}
x + 3 &= 7 &x - 3 &= 7 &3x &= 21 &\frac{x}{3} &= 7 &\frac{2x}{3} &= 6 \\
\;-3 \;& \;\;\;-3 &\;+3 \;& \;\;\;+3 &\;\div3 \;& \;\;\;\div3 &\;\times3 \;& \;\;\;\times3 &\;\times3 \;& \;\;\;\times3 \\
x&=4 &x&=10 &x&=7 &x&=21 &2x&=18\\
&&&&&&&&\div2&\mathop{\phantom{=}}\div2 \\
&&&&&&&&x&=9
\end{align*}
\end{document}
Rainer