mf mailto:massifr@fastwebnet.it 30. September 2016 um 00:09
Thanks for the answer, Wolfgang.
That's not style and color, it's a sort of two-column layout with the main text in the left column and annotations (comments) in the right one. This is not a real multcolumn text because in verbatim text each space in the input appear also in the output and in the examples spaces where used to align the code comments on the same position. Example (it does not work):
\starttext
This is the main text\sidenote{annotation} flowing in the left column...
\stoptext
resulting in
|This is the main text flowing | annotation | |in the left column... | |
You can do it with setuplayout and a wider right margin, using \inright for annotations, but it's for the whole document or a whole page. Is that possibile only for a section of text inside a page? You can use the narrower environment to change the margins for a certain text area and use the paragraphs environment to create two columns with different widths in this area.
%% begin example \definenarrower [SidenotesMargin] [before=\blank, after=\blank, right=\rightmarginwidth, default=-right] \defineparagraphs[Sidenotes] \setupparagraphs [Sidenotes] [n=2,before={\startnarrow[SidenotesMargin]},after=\stopnarrow] \setupparagraphs [Sidenotes:1][width=.6\localhsize,distance=.1\localhsize] \setupparagraphs [Sidenotes:2][width=.3\localhsize] \starttext \input knuth \startparagraphs[Sidenotes] \startparagraphscell \input knuth \stopparagraphscell \startparagraphscell \input ward \stopparagraphscell \stopparagraphs \input knuth \stoptext %% end example Wolfgang