Re: [NTG-context] annotated text: main text in narrower text, annotations on the right

2016-10-02 Thread MF
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
> 
> 
___
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
___

Re: [NTG-context] annotated text: main text in narrower text, annotations on the right

2016-09-30 Thread Jean-Pierre Delange
Hi Massi,

Why don't you try this kind of parallel paragraphs ?

% \setuppapersize[A5]
\defineparagraphs[TwoThird][n=2]
% The second paragraph width is automatically calculated, if not specified.
\setupparagraphs[TwoThird][1][width=.66\textwidth]
\starttext
\startTwoThird
quotation{...{\it pourquoi y a-t-il quelque chose plutôt que rien ?}
Parce que rien n’est plus simple et facile que quelque chose.
Plus loin, sachant que les choses existent,
on doit être en mesure d’expliquer
{\it pourquoi elles existent ainsi,}
et pas autrement.}
\nextTwoThird
G. W. Leibniz, {\it\fr Principes de la nature et de la grâce fondés en raison,} 
1714.
\stopTwoThird
\stoptext

Another solution is :

\defineparagraphs[TwoColumns][n=2,align=verytolerant]
\startsetups[TwoColumns]
\setupinterlinespace[line=5ex]
\stopsetups
\setupparagraphs[TwoColumns:2][inner=\directsetup{TwoColumns}]

\starttext
\input tufte

% here start the twocolumns
\startTwoColumns

\startlines
{\bf ontact information}
Adeimantos
3 Achaion Street
Attica
Gr - 11852 Athens
adeiman...@uc.cy

{\bf Edition}
Essays § Novels

{\bf Development}
Prototype

{\bf Year}
2016

{\bf Private funding}
\$0

\stoplines

% Starting second column
\TwoColumns
\input ward
 \blank
\input ward

\stopTwoColumns

\stoptext

- Mail original -
De: "mf" <mass...@fastwebnet.it>
À: ntg-context@ntg.nl
Envoyé: Vendredi 30 Septembre 2016 00:09:16
Objet: Re: [NTG-context] annotated text: main text in narrower text, 
annotations on the right


>  Which feature from verbatim annotations do you need because style
> and color
> changes can be applied in normal text without problems.
> 
> Wolfgang

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.
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?

Best regards,
Massi
___
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
___
___
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
___

Re: [NTG-context] annotated text: main text in narrower text, annotations on the right

2016-09-30 Thread Wolfgang Schuster

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
___
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
___

Re: [NTG-context] annotated text: main text in narrower text, annotations on the right

2016-09-29 Thread mf

>  Which feature from verbatim annotations do you need because style
> and color
> changes can be applied in normal text without problems.
> 
> Wolfgang

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.
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?

Best regards,
Massi
___
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
___

Re: [NTG-context] annotated text: main text in narrower text, annotations on the right

2016-09-29 Thread Wolfgang Schuster

MF 
29. September 2016 um 16:23
Hello list,
I need a feature like the one described in http://www.pragma-ade.nl/gen
eral/magazines/mag-1102-mkiv.pdf for annotated verbatim,
but for normal text.

Which feature from verbatim annotations do you need because style and color
changes can be applied in normal text without problems.

Wolfgang
___
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
___

[NTG-context] annotated text: main text in narrower text, annotations on the right

2016-09-29 Thread MF
Hello list,
I need a feature like the one described in http://www.pragma-ade.nl/gen
eral/magazines/mag-1102-mkiv.pdf for annotated verbatim,
but for normal text.

Think about the main text flowing in a narrower text, with the
annotations (like unnumbered sidenotes) in a widened right margin.

Or think about a right margin moved left locally, as long as you need
annotated text.

Thanks,
Massi
___
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
___