In response to my earlier question the following working code has been provided:
\documentclass{article}
\usepackage{showframe}
\begin{document}
\hfill
\begin{tabular}{l@{}}
some text\\
some other text
\end{tabular}
\end{document}
My initial attempt was similar, but used the flushleft
environment instead of tabular
.
\documentclass{article}
\usepackage{showframe}
\begin{document}
\hfill
\begin{flushleft}
some text\\
some other text
\end{flushleft}
\end{document}
The difference between the two approaches is that in the former one \hfill
before the environment causes the text to stick to the right side of the page. In the latter one the text is still on the left side.
So, I wonder what fundamental difference between tabular
and flushleft
(I guess, between their implementations) causes this difference in behaviour.