# \llap (or \rlap) at the beginning of an indented paragraph

If I use a \llap{text} command at the beginning of an indented paragraph, the text is not indented and is put on the line above the paragraph.

\documentclass{article}
\begin{document}

\parindent=2cm

\llap{x}Hello

H\llap{x}ello

\end{document}


Using the code above, I get the x above and far too the left, relative to the H in the first case, but I get the correct result in the second case (the x is just to the left of the e).

How can I get the x just to the left of the H?

I tried putting a vphantom{X} just before the \llap to force the paragraph to start, but that didn't change the result at all.

• you need \leavevmode as \llap is \hbox not \mbox The supported LaTeX syntax is \makebox[0pt][l]{...} which does not have this surprise. – David Carlisle Nov 20 '13 at 22:12
• You can also do \hspace*{0pt}\llap{x}Hello. – user11232 Nov 20 '13 at 22:23
• @DavidCarlisle: Except \makebox[0pt][l]{...} is \rlap, while \makebox[0pt][r]{...} is \llap. – Dan Nov 21 '13 at 22:07

\llap is not a LaTeX box command and does not start a paragraph.

\documentclass{article}
\begin{document}

\parindent=2cm

\makebox[0pt][r]{x}Hello

H\makebox[0pt][r]{x}ello

\end{document}


You can also use

\indent\llap{x}Hello