4

I want to place my name at the bottom of an article, a few cm-s from the right margin. I thought that this might work, but the \hspace is pretty much ignored, unless I put a space after it, which seems like a total hack. How would this be done a bit more nice?

\documentclass{article}
\begin{document}

\begin{flushright}
{My name \hspace{10cm} }
\end{flushright}

\begin{flushright}
{My name \hspace{10cm}}
\end{flushright}

\begin{flushright}
{My name \hspace{2cm}}
\end{flushright}

\begin{flushright}
{My name }
\end{flushright}

\end{document}

enter image description here

1 Answer 1

5

Use the starred version of \hspace.

enter image description here

\documentclass{article}
\begin{document}

\begin{flushright}
{My name \hspace*{10cm} }
\end{flushright}

\begin{flushright}
{My name \hspace*{10cm}}
\end{flushright}

\begin{flushright}
{My name \hspace*{2cm}}
\end{flushright}

\begin{flushright}
{My name }
\end{flushright}

\end{document}
1
  • For more background information: see here.
    – Karlo
    Mar 28, 2020 at 22:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .