2

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

3

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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.