Consider the following example:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
This is a really long line of text to show where the margins of the page are.
This is a really long line of text to show where the margins of the page are.
This is a really long line of text to show where the margins of the page are.
\begin{displaymath}
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\end{displaymath}
This is a really long line of text to show where the margins of the page are.
This is a really long line of text to show where the margins of the page are.
This is a really long line of text to show where the margins of the page are.
\begin{displaymath}
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\hspace{0pt minus 1fil}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\end{displaymath}
This is a really long line of text to show where the margins of the page are.
This is a really long line of text to show where the margins of the page are.
This is a really long line of text to show where the margins of the page are.
\begin{align*}
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\hspace{0pt minus 1fil}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\
cccccccccccccccccccccccccccccccccccccc
\hspace{0pt minus 1fil}
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
\end{align*}
This is a really long line of text to show where the margins of the page are.
This is a really long line of text to show where the margins of the page are.
This is a really long line of text to show where the margins of the page are.
\end{document}
I would like a display-style math environment that allows new lines (like align
) and responds to the addition of infinite horizontal space (like displaymath
).
Does such an environment exist?
\hspace{<length>}
seems to work. You have0pt
length so the space is there but just of zero length. Also, you can use\usepackage{showframe}
to see the page margins.\hbox to \textwidth{aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \hss xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}\\hbox to \textwidth{cccccccccccccccccccccccccccccccccccccc \hss yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy}
in the align* environment.