5

I am trying to create a formula sheet so I only have section titles and equations in my documents. I am having trouble with the spacing between my section header and the equations that I want as the body of the text. LaTeX is putting an empty line between the section header and the equations which leaves an awkward-looking gap.

I have tried using \titlespacing, \titleformat, as well as \abovedisplayskip, \abovedisplayshortskip, \belowdisplayskip, and \belowdisplayshortskip. However, I don't think these worked because the problem is not that there's too much space between the text and the equation, but rather that there's a blank line above the equation and below the section title.

The code I have is:

\documentclass[leqno, fleqn,12pt]{article}
\usepackage{mathtools}
\usepackage{xfrac}
\usepackage{multicol}

\begin{document}

\section*{List of Common Derivatives}
\subsection*{POLYNOMIAL FUNCTIONS}

\begin{multicols}{3}

\begin{equation*}
\frac{d}{dx} \left(c\right) = 0 %,where c is a constant 
\end{equation*}

\begin{equation*}
\frac{d}{dx} \left(cx\right) = c
\end{equation*}

\begin{equation*}
\frac{d}{du} \left(u^n\right) = nu^{n-1}du
\end{equation*}

\end{multicols} 

\end{document}

Compiled PDF

I'm trying to eliminate the space between "Polynomial Functions" and the equations below. Any ideas? Thanks!

1
  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Mar 6, 2015 at 7:32

2 Answers 2

4

The awkward spacing here is most likely as a result of the equation and the multicols. The following looks a little better, and doesn't require spreading out separate non-numbered equations into columns:

enter image description here

\documentclass{article}
\usepackage{amsmath}

% \deriv[<var>]{<func>}    
\newcommand{\deriv}[2][x]{\frac{\mathrm{d}}{\mathrm{d}#1}\bigl(#2\bigr)}

\begin{document}

\section*{List of Common Derivatives}
\subsection*{POLYNOMIAL FUNCTIONS}

\begin{align*}
  \deriv{c}      &= 0 &%,where c is a constant 
  \deriv{cx}     &= c &
  \deriv[u]{u^n} &= nu^{n-1}
\end{align*}

\end{document}

See the mathmode document for displays of how align and friends works (or How to write a mathematical formula in 2 lines?).

2
  • Akh! I was just about to post almost the same, but I used the align* environment instead of xalignat*. I believe the PDF results are the same (from what I can see). The mathmode document says that xalignat is obsolete. Is align* the replacement?
    – Bill N
    Mar 6, 2015 at 4:18
  • @BillN: Prolly... I'll update to use align* instead.
    – Werner
    Mar 6, 2015 at 4:22
5

You don't need multicols for this. Just add some spacing between equations (I've added a double \qquad

\documentclass{article}
\usepackage{amsmath}

% taken from Werner's answer
\newcommand{\deriv}[2][x]{\frac{\mathrm{d}}{\mathrm{d}#1}\bigl(#2\bigr)}

\begin{document}

\section*{List of Common Derivatives}
\subsection*{POLYNOMIAL FUNCTIONS}

\begin{equation*}
  \deriv{c}      = 0 \qquad\qquad  %,where c is a constant
  \deriv{cx}     = c \qquad\qquad
  \deriv[u]{u^n} = nu^{n-1}
\end{equation*}

\section*{Another section}
\subsection*{Another subsection}

Some text

\end{document} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .