2

I'm have some text and beneath that two align blocks in two columns. But the space between the equations and the text is way to large and i wan't to have that minimized somehow.

MWE:

\documentclass[a4paper,12pt]{article} 
\linespread{1.5}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\usepackage{fancyhdr}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{amssymb}
%\usepackage{fullpage}
\usepackage{graphicx}
\usepackage[makeroom]{cancel}
\usepackage{hyperref}
\usepackage{multicol}
\usepackage{pdfpages}


\usepackage{lastpage}

\pagestyle{fancy}
\fancyhf{} % tom header
\renewcommand{\headrulewidth}{0pt} % Fjerner horizontale bar i toppen af dokumentet
\rfoot{Side \thepage \hspace{1pt} af \pageref{LastPage}} % Viser x ud af x sider, højre centreret
\usepackage[margin=1in,headheight=13.6pt]{geometry}

Tex code snippet:

For at kunne finde frem til en ligning eller rettere sagt en løsningsformel for den såkaldte kubisk ligning bliver vi nød til at lave en "depressed equation" $x^3+px*q$ hvor:
\begin{multicols}{2}
  \begin{align*}
    p&=\frac{3ac-b^2}{3ac^2}
  \end{align*}\break
  \begin{align*}
    q&=\frac{2b^3-9abc+27da^3}{27a}
  \end{align*}
\end{multicols}

The compiled code looks like this:

enter image description here

  • Please add a full MWE including your configuration of line-spacing and parksip. – TeXnician Feb 9 '17 at 14:24
  • 2
    Why do you go through the hassle with multicols? Does something like this does want you want? \begin{align*} p &=\frac{3ac-b^2}{3ac^2} & q & =\frac{2b^3-9abc+27da^3}{27a} \end{align*} – Arash Esbati Feb 9 '17 at 14:30
  • It should be $x^3+px+q$, not $x^3+px*q$ – egreg Feb 9 '17 at 14:51
  • No $x^3+px+q$ is the right anwser here ;) it was my original code there was faulty! – Daniel Guldberg Aaes Feb 9 '17 at 15:26
2

You can use align* to achieve what you want; simply add a & between the parts of your equations:

\documentclass[10pt]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}

\usepackage[danish]{babel}
\usepackage{amsmath}

\begin{document}

For at kunne finde frem til en ligning eller rettere sagt en
løsningsformel for den såkaldte kubisk ligning bliver vi nød til at
lave en ``depressed equation'' $x^3+px*q$ hvor:
\begin{align*}
  p &=\frac{3ac-b^2}{3ac^2} & 
    q &=\frac{2b^3-9abc+27da^3}{27a}
\end{align*}
formlen for en tredjedradsligning er som følge:

\end{document}

enter image description here

Further, if you want double quotes, you should not use "; see code above. Also, consider using \times instead of *: $x^3+px\times q$ looks much better, IMHO.

  • It should be +, of course, not * or \times. – egreg Feb 9 '17 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.