1

How do I place a boxed equation on the same line as other equations?

For example, I have a few equations on the left side of my page but then I want the boxed answer on the same line to the right.

3

One way would be to use \hfill.

Code...

\documentclass{amsart}
\begin{document}
$y=mx+b$\hfill$\boxed{a+b=c}$
\end{document}

Yields...

enter image description here

2

You can use the flalign* environment:

\documentclass{article}
\usepackage{showframe} 
\renewcommand\ShowFrameLinethickness{0.3pt}
\usepackage{amsmath}

\begin{document}

      \begin{flalign*}
         & ax^2 + bx + c = 0 & & \boxed{x = \frac{-b\pm\sqrt{b^2-4ac}}{2a}}
      \end{flalign*}

\end{document} 

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.