Quantcast
Channel: Pushing \qed to the right within a displayed formula - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 9

Answer by Werner for Pushing \qed to the right within a displayed formula

$
0
0

You can insert the display equation in text mode with a forced \displaystyle:

enter image description here

\documentclass{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\newcommand{\qed}{\hfill\rule{1ex}{1ex}}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}
\lipsum*[1] \qed
\end{theorem}
\begin{theorem}
\lipsum*[1]
\[
  f(x)=ax^2+bx+c \qed
\]
\end{theorem}
\begin{theorem}
\lipsum*[1]\par
\vspace{\abovedisplayshortskip}
\hfill $\displaystyle f(x)=ax^2+bx+c$ \qed
\end{theorem}
\end{document}

Since the last line of the preceding paragraph and "short", I've inserted a skip of \abovedisplayshortskip. A "long" paragraph ending should use \abovedisplayskip.


Viewing all articles
Browse latest Browse all 9

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>