ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* several blocks of text in the margin
@ 2019-04-27 10:04 Fabrice Couvreur
  2019-05-01 14:26 ` Henning Hraban Ramm
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Couvreur @ 2019-04-27 10:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi
How to put several blocks of text in the margin without them encroaching
each other ?
Thank.
Fabrice

\setuplayout
  [width=12cm,
  rightmargin=5cm]

\definemathmatrix [pmatrix][matrix:parentheses][simplecommand=MATRIX]

\unexpanded\def\pcent#1{#1\,\%}

\defineuserdata [margintext] [alternative=margintext]

\defineuserdataalternative [margintext] [renderingsetup=userdata:margintext]

\startsetups [userdata:margintext]
  \margindata
    [inright]
    [%style=\smallbodyfont,
     style={\switchtobodyfont[9pt]},
     width=\rightmarginwidth,
     align={flushleft,broad}]
    {{\bf Exemple — }\getinlineuserdata}
\stopsetups

\starttext
\startuserdata[margintext]
 Une population, à effectif stable, se répartit entre deux régions A et B.

      On suppose que chaque année :
      \startitemize[1]
      \item \pcent{30} des habitants de la région A déménagent pour la
région B (les autres restent dans la région A);
      \item \pcent{20} des habitants de la région B déménagent pour la
région A.
      \stopitemize
      La situation peut être représentée par le graphe probabiliste suivant
:

      Les sommets A et B représentent les régions A et B.

      \m{0,3} est la probabilité de passage de la région A vers la région B
; la probabilité de passage de la région A vers elle-même est donc égale à
\m{0,7}.

      En considérant les sommets dans l'ordre alphabétique, ,la matrice
\m{M} de transition du graphe est :
      \startformula
        M=\MATRIX{0.7,0.3;0.2,0.8}.
      \stopformula
\stopuserdata
\dorecurse{4}{\input ward} %-> playing with the number to adjust
\startuserdata[margintext]
 Une population, à effectif stable, se répartit entre deux régions A et B.

      On suppose que chaque année :
      \startitemize[1]
      \item \pcent{30} des habitants de la région A déménagent pour la
région B (les autres restent dans la région A);
      \item \pcent{20} des habitants de la région B déménagent pour la
région A.
      \stopitemize
      La situation peut être représentée par le graphe probabiliste suivant
:

      Les sommets A et B représentent les régions A et B.

      \m{0,3} est la probabilité de passage de la région A vers la région B
; la probabilité de passage de la région A vers elle-même est donc égale à
\m{0,7}.

      En considérant les sommets dans l'ordre alphabétique, ,la matrice
\m{M} de transition du graphe est :
      \startformula
        M=\MATRIX{0.7,0.3;0.2,0.8}.
      \stopformula
\stopuserdata
\input ward
\stoptext

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

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: several blocks of text in the margin
  2019-04-27 10:04 several blocks of text in the margin Fabrice Couvreur
@ 2019-05-01 14:26 ` Henning Hraban Ramm
  0 siblings, 0 replies; 2+ messages in thread
From: Henning Hraban Ramm @ 2019-05-01 14:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

\setupmargindata[inright][stack=continue]

might help, but the mechanism changed within the last few months: while it previously worked automagically in most cases, I had to shift several margin notes in my project using

\inmargin[voffset=...]{...}


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

Am 2019-04-27 um 12:04 schrieb Fabrice Couvreur <fabrice1.couvreur@gmail.com>:

> Hi
> How to put several blocks of text in the margin without them encroaching each other ?
> Thank.
> Fabrice
> 
> \setuplayout
>   [width=12cm,
>   rightmargin=5cm]
> 
> \definemathmatrix [pmatrix][matrix:parentheses][simplecommand=MATRIX]
> 
> \unexpanded\def\pcent#1{#1\,\%}  
> 
> \defineuserdata [margintext] [alternative=margintext]
> 
> \defineuserdataalternative [margintext] [renderingsetup=userdata:margintext]
> 
> \startsetups [userdata:margintext]
>   \margindata
>     [inright]
>     [%style=\smallbodyfont,
>      style={\switchtobodyfont[9pt]},
>      width=\rightmarginwidth,
>      align={flushleft,broad}]
>     {{\bf Exemple — }\getinlineuserdata}
> \stopsetups
> 
> \starttext
> \startuserdata[margintext]
>  Une population, à effectif stable, se répartit entre deux régions A et B.
> 
>       On suppose que chaque année :
>       \startitemize[1]
>       \item \pcent{30} des habitants de la région A déménagent pour la région B (les autres restent dans la région A);
>       \item \pcent{20} des habitants de la région B déménagent pour la région A.  
>       \stopitemize
>       La situation peut être représentée par le graphe probabiliste suivant :
> 
>       Les sommets A et B représentent les régions A et B.
> 
>       \m{0,3} est la probabilité de passage de la région A vers la région B ; la probabilité de passage de la région A vers elle-même est donc égale à \m{0,7}.
> 
>       En considérant les sommets dans l'ordre alphabétique, ,la matrice \m{M} de transition du graphe est :
>       \startformula
>         M=\MATRIX{0.7,0.3;0.2,0.8}.
>       \stopformula
> \stopuserdata
> \dorecurse{4}{\input ward} %-> playing with the number to adjust
> \startuserdata[margintext]
>  Une population, à effectif stable, se répartit entre deux régions A et B.
> 
>       On suppose que chaque année :
>       \startitemize[1]
>       \item \pcent{30} des habitants de la région A déménagent pour la région B (les autres restent dans la région A);
>       \item \pcent{20} des habitants de la région B déménagent pour la région A.  
>       \stopitemize
>       La situation peut être représentée par le graphe probabiliste suivant :
> 
>       Les sommets A et B représentent les régions A et B.
> 
>       \m{0,3} est la probabilité de passage de la région A vers la région B ; la probabilité de passage de la région A vers elle-même est donc égale à \m{0,7}.
> 
>       En considérant les sommets dans l'ordre alphabétique, ,la matrice \m{M} de transition du graphe est :
>       \startformula
>         M=\MATRIX{0.7,0.3;0.2,0.8}.
>       \stopformula
> \stopuserdata
> \input ward
> \stoptext
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-01 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-27 10:04 several blocks of text in the margin Fabrice Couvreur
2019-05-01 14:26 ` Henning Hraban Ramm

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