1

I am trying to align my equation number to be vertically centre to the equation. How can I go about doing this? I have attached a screenshot of my output.

I am using pdfLaTex+MakeIndex+BibTeX as me Latex processor if that could possibly make a difference.

Here is my code,

\documentclass[a4paper, 11pt, leqno]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{indentfirst}
\usepackage{hyperref}
\usepackage{bigints}

\setlength{\parindent}{0em}
\setlength{\parskip}{1em}

\begin{document}

\par
This is some text.
\begin{equation} \label{cyclicFourierTransform}
\begin{split}
\centerline{$F(s) = \bigints_{-\infty}^{\infty} f(x)e^{-i2{\pi}xs}\;\mathrm{d}x$} \\
\centerline{$f(x) = \bigints_{-\infty}^{\infty} F(s)e^{-i2{\pi}xs}\;\mathrm{d}s$}
\end{split}
\end{equation}

\par
This is some more text.

\end{document}

And here is my output, output

Thank you in advance!

  • Welcome to TeX-SE! Where did you get the idea to use \centerline here from? – user121799 Apr 26 '19 at 21:35
  • 1
    \centerline should not be used in latex at all and certainly never in a math display. Apart from being full width and so forcing the equation number to move, they force the use of inline text style math rather than display math. Also you should not have \par (they do nothing in that context). – David Carlisle Apr 26 '19 at 21:42
  • I am pretty new to Latex as a whole and I must have seen the use of \centerline somewhere and thought it was right. My mistake, thank you for the help! – Jacob_Ferrier Apr 29 '19 at 16:37
3

I'd use aligned instead of split and normal \ints instead of \bigints. Also, as others pointed out, remove \centerline and consider not using it in LaTeX at all.

\documentclass[a4paper, 11pt, leqno]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{indentfirst}
\usepackage{hyperref}
\usepackage{bigints}

\setlength{\parindent}{0em}
\setlength{\parskip}{1em}

\begin{document}

This is some text.
\begin{equation} \label{cyclicFourierTransform}
\begin{aligned}
F(s) &= \int_{-\infty}^{\infty} f(x)e^{-i2{\pi}xs}\;\mathrm{d}x \\
f(x) &= \int_{-\infty}^{\infty} F(s)e^{-i2{\pi}xs}\;\mathrm{d}s
\end{aligned}
\end{equation}

This is some more text.

\end{document}

enter image description here

2

If you remove \centerline you get

\documentclass[a4paper, 11pt, leqno]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{indentfirst}
\usepackage{hyperref}
\usepackage{bigints}

\setlength{\parindent}{0em}
\setlength{\parskip}{1em}

\begin{document}

\par
This is some text.
\begin{equation} \label{cyclicFourierTransform}
\begin{split}
F(s) = \bigints_{-\infty}^{\infty} f(x)e^{-i2{\pi}xs}\;\mathrm{d}x \\
f(x) = \bigints_{-\infty}^{\infty} F(s)e^{-i2{\pi}xs}\;\mathrm{d}s
\end{split}
\end{equation}

\par
This is some more text.

\end{document}

enter image description here

Or an arguably cleaner version with inputs from David Carlisle.

\documentclass[a4paper, 11pt, leqno]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{indentfirst}
\usepackage{hyperref}
\usepackage{bigints}

\setlength{\parindent}{0em}
\setlength{\parskip}{1em}

\begin{document}

This is some text.
\begin{equation} \label{cyclicFourierTransform}
\begin{split}
F(s) = \int\limits_{-\infty}^{\infty} f(x)\,\mathrm{e}^{-\mathrm{i}2{\pi}xs}\,\mathrm{d}x \\
f(x) = \int\limits_{-\infty}^{\infty} F(s)\,\mathrm{e}^{-\mathrm{i}2{\pi}xs}\,\mathrm{d}s
\end{split}
\end{equation}

This is some more text.

\end{document}

enter image description here

  • the bigints seem er a bit big (as you have fixed the display to use display style) – David Carlisle Apr 26 '19 at 21:43
2

Not sure why you're complicating things.

\documentclass[a4paper, 11pt, leqno]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{indentfirst}
\usepackage[skip=1em]{parskip}
\usepackage{hyperref}

\newcommand{\diff}{\mathop{}\!\mathrm{d}}

\begin{document}

\par
This is some text.
\begin{equation} \label{cyclicFourierTransform}
\begin{split}
F(s) &= \int_{-\infty}^{\infty} f(x)e^{-i2{\pi}xs}\diff x \\
f(x) &= \int_{-\infty}^{\infty} F(s)e^{-i2{\pi}xs}\diff s
\end{split}
\end{equation}
This is some more text.

\end{document}

Note the better definition for the differential operator (I'd prefer an italic d, though; with this setup, you can change it just once for the whole document).

The parskip package is better if you really want to use vertical space between paragraphs. Again, just commenting out the call to the package allows for switching to traditional typesetting. The package makes also some other fixes that manual setting doesn't perform. I left 1em, but it's not really a good unit to use here.

enter image description here

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.