Math & Science ⇒ centered equation with constraints at right edge
centered equation with constraints at right edge
(equation -- centered) (a>1)
That is, the equation is centered as usual, but there is
a second bit of math presented so that its right edge aligns
with the right edge of text on the page.
Any suggestions?
Thanks!
jj
[Added later: thanks for the solution! Incidentally, I had to add [-baselineskip] after the second \\ to get the desired effect.]
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
centered equation with constraints at right edge
it's a rather unusual layout, but you can try something like this:
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
text text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text text
{\setlength\multlinegap{0pt}
\begin{multline*}
\phantom{\ }\\[-\baselineskip]
a=b+c\\
\shoveright{+d+e+f.}\\
\end{multline*}}
\end{document}
-
- Posts: 351
- Joined: Sat Aug 02, 2008 8:47 am
centered equation with constraints at right edge
jj39 wrote:I would like to display a single equation in the format
(equation -- centered) (a>1)
That is, the equation is centered as usual, but there is
a second bit of math presented so that its right edge aligns
with the right edge of text on the page.
Any suggestions?
Thanks!
jj
[Added later: thanks for the solution! Incidentally, I had to add [-baselineskip] after the second \\ to get the desired effect.]
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\usepackage[T1]{fontenc}
\parindent=0pt
\begin{document}
\rule{\linewidth}{1pt}
\begin{align}
(equation & centered) \tag{a>1}
\end{align}
\end{document}
centered equation with constraints at right edge
Yes: I don't know why I assumed that the OP wanted the non-centered expression to appear on a different line.CrazyHorse wrote:HerbertCode: Select all
\documentclass{article} \usepackage{amsmath} \usepackage[T1]{fontenc} \parindent=0pt \begin{document} \rule{\linewidth}{1pt} \begin{align} (equation & centered) \tag{a>1} \end{align} \end{document}