From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96299 Path: news.gmane.org!.POSTED!not-for-mail From: MF Newsgroups: gmane.comp.tex.context Subject: Re: annotated text: main text in narrower text, annotations on the right Date: Sun, 02 Oct 2016 10:29:36 +0200 Message-ID: <1475396976.2896.1.camel@fastwebnet.it> References: <1475159028.11496.7.camel@fastwebnet.it> <57ED6153.7060108@gmail.com> <1475186956.4077.11.camel@fastwebnet.it> <57EE38BA.10307@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5213524268566312246==" X-Trace: blaine.gmane.org 1475397047 23694 195.159.176.226 (2 Oct 2016 08:30:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 2 Oct 2016 08:30:47 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Oct 02 10:30:39 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 1bqcA4-0002Lf-9A for gctc-ntg-context-518@m.gmane.org; Sun, 02 Oct 2016 10:30:16 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A60061A22E; Sun, 2 Oct 2016 10:29:50 +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 DBrIWN-QeVbg; Sun, 2 Oct 2016 10:29:48 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id E6A1F1A230; Sun, 2 Oct 2016 10:29:48 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 0818E1A22E for ; Sun, 2 Oct 2016 10:29:48 +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 zIwK3bDDmHOx for ; Sun, 2 Oct 2016 10:29:47 +0200 (CEST) Original-Received: from mr004msr.fastwebnet.it (mr004msr.fastwebnet.it [85.18.95.67]) by zapf.ntg.nl (Postfix) with ESMTP id 32F691A22D for ; Sun, 2 Oct 2016 10:29:37 +0200 (CEST) Original-Received: from max.cspsib.org (2.225.185.111) by mr004msr.fastwebnet.it (8.5.140.05) (authenticated as massifr) id 57EBDF6C003199EB for ntg-context@ntg.nl; Sun, 2 Oct 2016 10:29:36 +0200 In-Reply-To: <57EE38BA.10307@gmail.com> X-Mailer: Evolution 3.20.5-1 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:96299 Archived-At: --===============5213524268566312246== Content-Type: multipart/alternative; boundary="=-mk6xmqZTNHg6SHq0LDI3" --=-mk6xmqZTNHg6SHq0LDI3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Thank you, Wolfgang and Jean-Pierre! I've modified your example and now it resembles what I was looking for. Now I can use \inright to get annotations on the right of the main text, but inside the width of the normal text. The annotations are aligned to the line they occur in the main text. It's somewhat tricky, because I need to leave the second paragraph empty. Is there a way to obtain that effect without setupparagraphs? Anyway it works as I wanted, so now I have a solution. Thank you very much! Best regards, Massi %% begin example \setuplayout[rightmargin=7cm] \definenarrower   [SidenotesMargin]   [before=\blank,    after=\blank,    right=-1cm,    %right=\rightmarginwidth,    default=-right] \defineparagraphs[Sidenotes] \setupparagraphs [Sidenotes]  [n=2,before={\startnarrow[SidenotesMargin]},after=\stopnar row] \setupparagraphs [Sidenotes:1][width=.55\localhsize,distance=.1\localhsize] \setupparagraphs [Sidenotes:2][width=.35\localhsize] \starttext \input knuth \startparagraphs[Sidenotes]   \startparagraphscell     A paragraph spanning some lines of text      with sidenotes that should stay aligned\inright{aligned}     with the text they annotate;     \input ward     Some more words\inright{more words,        spanning more than one line on the margin}      to control whether the sidenotes are     aligned with the text they annotate.   \stopparagraphscell   \startparagraphscell\stopparagraphscell \stopparagraphs \input knuth \stoptext %% end example > > 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 > > --=-mk6xmqZTNHg6SHq0LDI3 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
Thank you, Wolfgang and Jean-Pierre!

=
I've modified your example and now it resembles what I was looking for= .
Now I can use \inright to get annotations on the right of the m= ain text,
but inside the width of the normal text.

=
The annotations are aligned to the line they occur in the main t= ext.

It's somewhat tricky, because I need to leave= the second paragraph empty.
Is there a way to obtain that effect= without setupparagraphs?

Anyway it works as I wan= ted, so now I have a solution.
Thank you very much!
Best regards,
Massi

%% begin example
\setuplayout[rightmargin=3D7cm]
\definenarrower
  [SidenotesMargin]
&n= bsp; [before=3D\blank,
   after=3D\blank,
   right=3D-1cm,
   %right=3D\rig= htmarginwidth,
   default=3D-right]

=
\defineparagraphs[Sidenotes]
\setupparagraphs [Sidenot= es]  [n=3D2,before=3D{\startnarrow[SidenotesMargin]},after=3D\sto= pnarrow]
\setupparagraphs [Sidenotes:1][width=3D.55\localhsize,di= stance=3D.1\localhsize]
\setupparagraphs [Sidenotes:2][width=3D.3= 5\localhsize]

\starttext

= \input knuth

\startparagraphs[Sidenotes]
  \startparagraphscell
    A paragraph = spanning some lines of text 
    with si= denotes that should stay aligned\inright{aligned}
  &nb= sp; with the text they annotate;
    \in= put ward
    Some more words\inright{more wor= ds, 
      spanning more than = one line on the margin} 
    to control = whether the sidenotes are
    aligned with th= e text they annotate.
  \stopparagraphscell
 = \startparagraphscell\stopparagraphscell
\stopparagraphs

\input knuth

\stoptext
= %% end example

30.= =20 September 2016 um 00:09

Thanks for the answer, Wolfgang.

That's not style and color, it's a=20 sort of two-column layout with the
main text in the left column and=20 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=20 the main text\sidenote{annotation} flowing in the left
column...

= \stoptext

resulting in

|This is the main text flowing   | annotation    =           |
|in the left column...           |     &nbs= p;                    |
You=20 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=20 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=3D\blank,
   after=3D\blank,
   right=3D\rightmarginwidth,
   default=3D-right]

\defineparagraphs[Sidenotes]
\setupparagraphs [Sidenotes] =20 [n=3D2,before=3D{\startnarrow[SidenotesMargin]},after=3D\stopnarrow]
\setupparagraphs=20 [Sidenotes:1][width=3D.6\localhsize,distance=3D.1\localhsize]
\setupparagraphs [Sidenotes:2][width=3D.3\localhsize]

\starttext

\input knuth

\startparagraphs[Sidenotes]
    \startparagraphscell
        \input knuth
    \stopparagraphscell
    \startparagraphscell
        \input ward
    \stopparagraphscell
\stopparagraphs

\input knuth

\stoptext
%% end example

Wolfgang
--=-mk6xmqZTNHg6SHq0LDI3-- --===============5213524268566312246== 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= --===============5213524268566312246==--