# [NTG-context] Position margin text block near previous paragraph

Eugene Toporov eugene.toporov at gmail.com
Tue Jul 26 19:17:54 CEST 2005

Hello!

This time I have a task like this:

I have margin text blocks (like Note, Tip) that follow some paragraph in my
document flow.
In the produced document I get them in margin, but vertically they are just
below the paragraph (as in text flow)
I really need then to start exactly where the previous paragraph starts
(vertically). I.e. I need to move them several (unknown number) lines
higher.

My realization:

\setupinmargin[style=\sl\tx\setupinterlinespace,location=left,align=right]
\def\Note#1{
\strut
\inmargin{
\em{#1}
}
\strut}
\starttext

This is the para with unknown length that can be any number of lines high.
And I have a note below it that should be located to the left of this
paragraph and not just below it. That's the case. \par

\Note{ And here is the note that should be in margin.}

\stoptext

The easiest would to put it above the target paragraph, but that's not the
solution for me as the same text is rendered to HTML where no margins exist.

Can I do it plainly in tex code?

Thanks a lot. I appreciate your help

--
Regards.
Eugene Toporov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ntg.nl/pipermail/ntg-context/attachments/20050726/d82fc5e7/attachment-0001.html