I'm trying to get both elements, one centered, one flushed right on the same horizontal line. I've tried
\begin{center} stuff \end{center} \hfill more stuff
But "more stuff" would appear on another line instead. Thanks.
I'm trying to get both elements, one centered, one flushed right on the same horizontal line. I've tried
\begin{center} stuff \end{center} \hfill more stuff
But "more stuff" would appear on another line instead. Thanks.
If the text elements are short, you could divide the line into several boxes:
\documentclass{article}
\begin{document}
\noindent
\makebox[.32\textwidth][l]{}%
\hfill%
\makebox[.32\textwidth][c]{centred}%
\hfill%
\makebox[.32\textwidth][r]{right}%
\end{document}
\documentclass{article}
\usepackage{lipsum}
\begin{document}
\noindent\mbox{}\hfill centered stuff\hfill\mbox{}\makebox[0pt][r]{right}
\lipsum[1]
\end{document}
A variant which saves having to guess box widths:
\documentclass{article}
\usepackage[showframe]{geometry}
\begin{document}
\noindent
\makebox[\linewidth]{\hfill \fbox{this one is centred}\hfill \llap{and that flushright}}
\end{document}
Also,
\documentclass{article}
\usepackage{showframe} % for the frames, can be deleted
\begin{document}
\noindent \rule{.5\linewidth}{0pt}\makebox[0pt]{Center} \hfill Right
\end{document}