From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96287 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: annotated text: main text in narrower text, annotations on the right Date: Fri, 30 Sep 2016 12:04:42 +0200 Message-ID: <57EE38BA.10307@gmail.com> References: <1475159028.11496.7.camel@fastwebnet.it> <57ED6153.7060108@gmail.com> <1475186956.4077.11.camel@fastwebnet.it> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3610273168204828204==" X-Trace: blaine.gmane.org 1475229971 12410 195.159.176.226 (30 Sep 2016 10:06:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 30 Sep 2016 10:06:11 +0000 (UTC) User-Agent: Postbox 5.0.2 (Macintosh/20160922) To: massifr@fastwebnet.it, mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Sep 30 12:06:04 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpuhR-0000bt-78 for gctc-ntg-context-518@m.gmane.org; Fri, 30 Sep 2016 12:05:49 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3BE6319EFD; Fri, 30 Sep 2016 12:05:38 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b-E1SKSJPlAB; Fri, 30 Sep 2016 12:05:37 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 0385E19F05; Fri, 30 Sep 2016 12:05:37 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 82B7A19EFD for ; Fri, 30 Sep 2016 12:05:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zKToujs43xqM for ; Fri, 30 Sep 2016 12:05:34 +0200 (CEST) Original-Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 6247319EFC for ; Fri, 30 Sep 2016 12:05:24 +0200 (CEST) Original-Received: by mail-wm0-f41.google.com with SMTP id p138so15183392wmb.1 for ; Fri, 30 Sep 2016 03:05:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=A9HsvFFeXWHZgCWNPGV9m7//ICwNIXFSbS2wIiyDULo=; b=iam1+ewjhJzhqzeL30ssIXhOH2VYNkZ7bIxsuJXHS8FzEM58XbxsK7ZsWxdbZxe0+V ByNPDqcDt1KHxfbwLeCFpqZTov3dRl/OAby5xSsCFctlMDdxGvfsQxU0VTZNna+ZcZyl IsyBLKlpuPlC8EXS4IWFCNgET86p1n9WpzgHmp0iWslKOUgzRm0aEP+L7XYxhDZrJDiF cNCfKgo3LBZt0nR1YMs3lJ4+z8tK8QzIstmIJJ4bMiQlGaNGG12F6OPsX1PkUGMgNiib NE/Fb7cm4WXzUEaz9KNf0igvUI4mxw6LxJBI2DWLZx8oVWi26JZsSW8co4O1YievOSIx xF0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=A9HsvFFeXWHZgCWNPGV9m7//ICwNIXFSbS2wIiyDULo=; b=BSfZRP7qNn3ouUX7y5R75VS2JICb86j24cX9qio+etXh5S9OmRDXsKLSNvvQa2I3I5 rP4tzpMbEwq/G0jTvlJDPAcNIKvp0jbmADX0Po8EXE+OU77MXnkBxJl/pOVc50L0mIIZ Nobq/xS8VdiLg3/xbS6oMxMYGuTKmOc0VZp2ArRRJOqiacMDqFgRdglYyog+oihS9J6p eGsE07lOqP4UhrDyF8OLUt+K3qRaXe3oclWYoJlN3CSv4H90Fy6ZrNZokh2xyS1KPFTC 0PCQ7IT9vYQUxENP6jqqfd9VKhNsmAb4o9E29ptlkIsIjNqBEvjG3yQI364/MZwVehuG EqIg== X-Gm-Message-State: AA6/9RkGqMNRqWnrbeDEHdMLsfcRKDBfYhUM+KUrvLt1jtjM9GOPtY7s0Qegpq+1Vh1lvg== X-Received: by 10.194.33.225 with SMTP id u1mr5732985wji.107.1475229923921; Fri, 30 Sep 2016 03:05:23 -0700 (PDT) Original-Received: from keima.home ([86.86.82.85]) by smtp.gmail.com with ESMTPSA id w138sm3529981wmd.1.2016.09.30.03.05.06 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Sep 2016 03:05:23 -0700 (PDT) In-Reply-To: <1475186956.4077.11.camel@fastwebnet.it> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:96287 Archived-At: This is a multi-part message in MIME format. --===============3610273168204828204== Content-Type: multipart/alternative; boundary="------------090806000909080401040904" This is a multi-part message in MIME format. --------------090806000909080401040904 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > mf > 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 --------------090806000909080401040904 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
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
--------------090806000909080401040904-- --===============3610273168204828204== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============3610273168204828204==--