TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Maybe I'm just not searching for the right thing, because this seems to be something that TeX would just 'have something' for.

Is there any way to simply return to the left margin (or originating margin, in the case of bidi documents)? I want functionality similar to how \llap behaves when you use it on the start of a line. (This might be a bit of a red herring though, since interfacing with TeX's computed linebreaks is, in my experience, very messy.)



    Should be placed on left margin: \llap{#1}}

Hello. This is some text to push this out to the side: \mystery{test}

I'd like to be able to put any hbox into \mystery, if possible.

share|improve this question
You're wrong in believing that \llap would print its argument in the left margin. – egreg Jun 21 '14 at 18:21
I'm not sure what you are asking for but it sounds like \marginpar? – David Carlisle Jun 21 '14 at 18:22
@egreg I know that; \llap and friends are pretty particular commands. I believe they're mostly equivalent to \makebox[r]{#1} (with [r], [l], and [c] as appropriate) – Sean Allred Jun 21 '14 at 18:23
@DavidCarlisle Much more like \marginpar, yes, but… I dunno. \marginpar I know is a 'floating' thing (sort of) and I think that is the kind of behavior I'm asking for. TeX doesn't know where to put it until it has computed the linebreaks. Is tex.stackexchange.com/q/101553 the answer I'm looking for? It just seems… needlessly complicated. – Sean Allred Jun 21 '14 at 18:25
you've tagged this "plain-tex", but all comments and answer so far have referred to latex commands. do you really mean non-latex? eplain implements index terms in the (right-hand) margin; you might be able to get some ideas there. – barbara beeton Jun 21 '14 at 19:11

sounds like marginpar, but if you want something that never floats (and will over-print if you put two on a line, then the second form)

\newcommand\mystery[1]{\marginpar{\raggedleft #1}}


\noindent Hello. This is some text to push this out to the side: \mystery{test}

\noindent Hello. This is some text to push this out to the side: \mysteryb{test}

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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