On 8/13/2018 03:01, Hans Hagen wrote:
On
8/13/2018 5:18 AM, Rik Kabel wrote:
\startparagraph
% \dontleavehmode\llap{\Mark}\inlinebuffer[TestBuffer]
% \ (first: \First, arg: \Arg)
\margintext{\Mark}
\setupparagraphintro[first][(first: \First, arg: \Arg)]
%\setupparagraphintro[next][(first: \First, arg: \Arg)]
\getbuffer[TestBuffer]
\stopparagraph
Hans,
That works for the over-simplified case here, but fails in
practice. For a \startnarrower[left] paragraph, the mark is still
in the main margin, not the 'margin' of the narrowed paragraph.
Also, the placement of the text in the margin is wrong and not
easily controlled as with \llap and \rlap. The code started out
more like:
\define\Mark{\color[middlegray]{\hskip.6cm\itb¿\
}}
\setwidthof{\Mark}\to\MarkWidth
...
\starttexdefinition stopBufTest
\startluacode
buffers.prepend("TestBuffer","\\dontleavehmode\\llap{\\Mark}")
\stopluacode
\setupnarrower[left=\MarkWidth]
\startnarrower[left,right]
\startparagraph
\inlinebuffer[TestBuffer]
\stopparagraph
\stopnarrower
\egroup
\stoptexdefinition
So I am still looking for a way to do this. Meanwhile I am trying
to understand Aditya's examples.