ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: massifr@fastwebnet.it,
	mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: annotated text: main text in narrower text, annotations on the right
Date: Fri, 30 Sep 2016 12:04:42 +0200	[thread overview]
Message-ID: <57EE38BA.10307@gmail.com> (raw)
In-Reply-To: <1475186956.4077.11.camel@fastwebnet.it>


[-- Attachment #1.1: Type: text/plain, Size: 1777 bytes --]

> 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

[-- Attachment #1.2: Type: text/html, Size: 3256 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2016-09-30 10:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-29 14:23 MF
2016-09-29 18:45 ` Wolfgang Schuster
2016-09-29 22:09   ` mf
2016-09-30 10:04     ` Wolfgang Schuster [this message]
2016-10-02  8:29       ` MF
2016-10-02 12:21         ` Footnotes inside and outside a framed text Jean-Pierre Delange
2016-10-02 22:47           ` mf
2016-10-04 15:36             ` Jean-Pierre Delange
2016-10-04 18:44               ` Pablo Rodriguez
2016-10-05  9:48                 ` Jean-Pierre Delange
2016-09-30 16:43     ` annotated text: main text in narrower text, annotations on the right Jean-Pierre Delange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57EE38BA.10307@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --cc=massifr@fastwebnet.it \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).