# How to push part of a line outside the margin?

I want one particular line to exceed the margin like this...

    My text
My text
My special Text.
My text.
My special text.


How can I achieve this?

I have tried to use

\reversemarginpar
\marginpar{My} special text


But it adds the 'My' on the left edge of the page. Thanks.

-
Are each of the lines a paragraph in your example? Or do they form part of the same (single) paragraph? –  Werner Jan 11 '12 at 21:32

As a start-of-a-paragraph "undent", this is easily achieved using a \makebox[0pt][r]{..} alignment:

\documentclass{article}
\begin{document}
\setlength{\parindent}{0pt}
My text. \par
My text. \par
\makebox[0pt][r]{My }special Text. \par
My text. \par
\noindent\llap{My }special text.
\end{document}


This sets the text in a box of width 0pt (avoiding overfull \hboxes) and right-aligned, pushing it into the left margin. You could also use \llap, which does the same, but you need to "start" the paragraph first before this takes effect.

It would also be possible to allow this "undent" mid-paragraph.

-
It worked as I expected. Thank you. May ask, what does setlength do? I tried without it, that also worked.. My text is like this <\textbf{\emph{\makebox[0pt][r]{MY}1: example text> –  Droid-Bird Jan 11 '12 at 21:46
A paragraph is typically indented with \parindent (default is 15pt). Using \setlength{\parindent}{0pt} kills this indent so all paragraphs start flush with the left margin. I used this merely to illustrate the "undentation". In you code, I would probably use \makebox[0pt][r]{\textbf{\emph{My }}}. In other words, set the box last (on the outside). –  Werner Jan 11 '12 at 21:49