TeX - LaTeX Asked by Mike van Dyke on June 19, 2021
How can I use multiple tags or right-justified text elements in an equation environment with many lines while keeping all equations centered? Unfortunately, I can only use packages accepted by the ACM TAPS system. It would be great if you could provide answers for the aforementioned package list. But also general answers are very welcome!
So far I have the following:
begin{gather*}
begin{split}
d(x) + e(x) + f(x) < a(x) * b(x) * c(x)
* d(x) * e(x) * f(x) hfilltext{Explained here}
end{split}
begin{split}
b(x) + c(x) + d(x) + e(x) + f(x) < a(x) * b(x) * c(x)
* d(x) * e(x) * f(x) hfilltext{And explained further here}
end{split}
end{gather*}
This keeps the equations centered, however, the text is not right justified but aligned to the right of the equation:
Also if I use the align
environment, the equations are right-justified even without using an &
:
begin{align*}
d(x) + e(x) + f(x) < a(x) * b(x) * c(x) * d(x)
* e(x) * f(x) tag*{Explained here}
a(x) + b(x) + c(x) + d(x) + e(x) + f(x) < a(x) * b(x) * c(x)
* d(x) * e(x) * f(x) tag*{And explained further here}
end{align*}
Note: I don’t want to use the &
because the equations have different lengths on the left side.
Is this what you want? I used shortintertext
from mathtools
:
documentclass{article}
usepackage{mathtools}
begin{document}
begin{gather*}
begin{split}
d(x) + e(x) + f(x) < a(x) * b(x) * c(x)
{} * d(x) * e(x) * f(x)
end{split}
shortintertext{raggedleft Explained here}
begin{split}
b(x) + c(x) + d(x) + e(x) + f(x) < a(x) * b(x) * c(x)
{} * d(x) * e(x) * f(x)
end{split}
shortintertext{raggedleft And explained further here}
end{gather*}
end{document}
Edit: another possible code, with only amsmath
:
begin{gather*}
begin{split}
d(x) + e(x) + f(x) < a(x) * b(x) * c(x)
{} * d(x) * e(x) * f(x)
end{split}
makebox[textwidth][r]{Explained here}
begin{split}
b(x) + c(x) + d(x) + e(x) + f(x) < a(x) * b(x) * c(x)
{} * d(x) * e(x) * f(x)
end{split}
makebox[textwidth][r]{And explained further here}
end{gather*}
Correct answer by Bernard on June 19, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP