LaTeX forum ⇒ Text FormattingLine Spacing

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Matin6562
Posts: 1
Joined: Fri Feb 22, 2019 8:46 pm

Line Spacing

Postby Matin6562 » Fri Feb 22, 2019 9:52 pm

Hi,

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}

rais
Posts: 190
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Sat Feb 23, 2019 6:11 am

Welcome to the LaTeX community;-)

I don't understand why you don't just put those lines into the same align*-environment...
  1. \documentclass[12pt, a4paper]{article}
  2. \usepackage{amssymb}
  3. \usepackage{amsmath}
  4. \begin{document}
  5. \begin{align*}
  6. x + 3 &= 7 &x - 3 &= 7 &3x &= 21 &\frac{x}{3} &= 7 &\frac{2x}{3} &= 6 \\
  7. \;-3 \;& \;\;\;-3 &\;+3 \;& \;\;\;+3 &\;\div3 \;& \;\;\;\div3 &\;\times3 \;& \;\;\;\times3 &\;\times3 \;& \;\;\;\times3 \\
  8. x&=4 &x&=10 &x&=7 &x&=21 &2x&=18\\
  9. &&&&&&&&\div2&\mathop{\phantom{=}}\div2 \\
  10. &&&&&&&&x&=9
  11. \end{align*}
  12. \end{document}

KR
Rainer


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 3 guests