Re: [NTG-context] Windows installer updated

2008-01-08 Thread David Roderick
pop-up texlua.exe Application Error
The application failed to initialize properly (0xc022)
-- 
from 
David Roderick
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] symbols in luatex?

2008-01-08 Thread Hans Hagen
Mojca Miklavec wrote:
> On Jan 7, 2008 5:18 PM, Wolfgang Schuster wrote:
>> On Jan 6, 2008 9:26 PM, Hans Hagen wrote:
>>
>>> maybe a big fallback virtual font covering all of unicode ...
>> With Arial Unicode as fallback ;-)
> 
> I can try to get some Microsofties* to the meeting. Perhaps they'll agree :-) 
> :p

actually the typography part of ms is not that bad -) also, if i'm right 
all linux distributions permit you to download/install fonts from ms 
(someow these fonts are free); not sure about osx

> After all, if I forget about all the advantages of it (covering
> unicode symbols where typeface doesn't matter so much etc.), the
> approach would be fully compatible with Word in that respect,
> replacing all accented letters with the ones from the fallback font
> :-)

well, you may as well expect worse in the tex community ... font feature 
abuse and such

> But after all: there's LinLibertine or the (symbol) Unicode font that
> one of you has mantioned a few days ago.

yes, those fonts are very complete; i wonder if they may be distributed 
with tex ...


Hans


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] latest beta

2008-01-08 Thread Thomas A. Schmitz
Hi all, Taco, Hans,

this combination of latest betas:

This is LuaTeX, Version snapshot-0.20.2-2007121721

CtxTools | context version: 2008.01.03 16:25

gives me output without the usual TeX ligatures (fi etc.).

I'm uncertain whether it is worth reporting such things or whether,  
given the rapid change of luatex and mkiv, you think this is  
unnecessary?

All best

Thomas
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] latest beta

2008-01-08 Thread Hans Hagen
Thomas A. Schmitz wrote:
> Hi all, Taco, Hans,
> 
> this combination of latest betas:
> 
> This is LuaTeX, Version snapshot-0.20.2-2007121721
> 
> CtxTools | context version: 2008.01.03 16:25
> 
> gives me output without the usual TeX ligatures (fi etc.).
> 
> I'm uncertain whether it is worth reporting such things or whether,  
> given the rapid change of luatex and mkiv, you think this is  
> unnecessary?

well, any unexpected behaviour is worth mentioning; it helps to have 
minimal examples of the bug too -)

Hans


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] beta & math

2008-01-08 Thread Hans Hagen
Hi,

I uploaded a beta.

(1) feature inheritance, example:

\definefontfeature[default-a][tlig=yes]
\definefontfeature[default-b][liga=yes]
\definefontfeature[default-c][default-a,default-b][mode=node]

\starttext
   \definedfont[Serif*default-c at 60pt]fiets --
\stoptext

(2) unicode math

this is work in progress and i need a few volunteers for building 
definition lists; all info goes in char-def.lua and math mappings are 
generated automatically; there will still be math vectors (like 
math-tex.tex) but using lua tables; an example is in math-ini.lua; for 
math stuff not in unicode we will use private unicodes in char-def; just 
a dumb test ...

\starttext
[[[\utfchar{8194}]]][[[\utfchar{8195}]]] \par
$[[[\utfchar{8194}]]][[[\utfchar{8195}]]]$\par
$\alpha\char945 \utfchar{945} abc 123$
\startXMLdata
((( )))
\stopXMLdata
\stoptext



Hans


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] beta & math

2008-01-08 Thread Thomas A. Schmitz
Hans,

\textbraceleft and \textbraceright (which I us from time to time) are  
identified as math characters in the latest beta and give errors:

! Missing $ inserted.

 $

\omathchar
\textbraceleft ->\omathchar
 "4020066

But I want to use them as text characters (they are defined in enco- 
ans.tex, enco-ec.tex, and other encodings. Can this be fixed?

Thomas


On Jan 8, 2008, at 1:25 PM, Hans Hagen wrote:

> Hi,
>
> I uploaded a beta.
>
> (1) feature inheritance, example:
>
> \definefontfeature[default-a][tlig=yes]
> \definefontfeature[default-b][liga=yes]
> \definefontfeature[default-c][default-a,default-b][mode=node]
>
> \starttext
>   \definedfont[Serif*default-c at 60pt]fiets --
> \stoptext
>
> (2) unicode math
>
> this is work in progress and i need a few volunteers for building
> definition lists; all info goes in char-def.lua and math mappings are
> generated automatically; there will still be math vectors (like
> math-tex.tex) but using lua tables; an example is in math-ini.lua; for
> math stuff not in unicode we will use private unicodes in char-def;  
> just
> a dumb test ...
>
> \starttext
> [[[\utfchar{8194}]]][[[\utfchar{8195}]]] \par
> $[[[\utfchar{8194}]]][[[\utfchar{8195}]]]$\par
> $\alpha\char945 \utfchar{945} abc 123$
> \startXMLdata
> ((( )))
> \stopXMLdata
> \stoptext
>
>
>
> Hans
>
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>  | www.pragma-pod.nl
> -
> ___
> 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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Weird behavior about metafun

2008-01-08 Thread Zhichu Chen
Hi,

On Jan 7, 2008 11:52 PM, Aditya Mahajan <[EMAIL PROTECTED]> wrote:

>
>
> Something like this:
> http://www.fauskes.net/media/pgftikzexamples/PDF/todo-notes.pdf
>
> It will be nice to have a ConTeXt module that can do this.


I've made a test file which is somewhat like what it shows, but I
still have many problems so it's far from perfect.



>
> Aditya
>
> ___
> 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  : https://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
>



-- 
Best Regards
Chen


 Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
  | www.sinap.ac.cn



FancyMarginTest.tex
Description: TeX document
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Weird behavior about metafun

2008-01-08 Thread Arthur Reutenauer
> I've made a test file which is somewhat like what it shows, but I
> still have many problems so it's far from perfect.

  Could you still make the test file available?

Arthur
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] beta & math

2008-01-08 Thread Hans Hagen
Thomas A. Schmitz wrote:
> Hans,
> 
> \textbraceleft and \textbraceright (which I us from time to time) are  
> identified as math characters in the latest beta and give errors:
> 
> ! Missing $ inserted.
> 
>  $
> 
> \omathchar
> \textbraceleft ->\omathchar
>  "4020066
> 
> But I want to use them as text characters (they are defined in enco- 
> ans.tex, enco-ec.tex, and other encodings. Can this be fixed?

hope so, just uploaded a new zip (btw, enco-ec cum suis are past time in 
luatex)

Hans

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] symbols in luatex?

2008-01-08 Thread Wolfgang Schuster
On Jan 8, 2008 9:21 AM, Hans Hagen <[EMAIL PROTECTED]> wrote:
> Mojca Miklavec wrote:
> > On Jan 7, 2008 5:18 PM, Wolfgang Schuster wrote:
> >> On Jan 6, 2008 9:26 PM, Hans Hagen wrote:
> >>
> >>> maybe a big fallback virtual font covering all of unicode ...
> >> With Arial Unicode as fallback ;-)
> >
> > I can try to get some Microsofties* to the meeting. Perhaps they'll agree 
> > :-) :p
>
> actually the typography part of ms is not that bad -) also, if i'm right
> all linux distributions permit you to download/install fonts from ms
> (someow these fonts are free); not sure about osx

Only the normal Arial font, Arial Unicode is only AFAIK available
with MS Ofiice.

> > After all, if I forget about all the advantages of it (covering
> > unicode symbols where typeface doesn't matter so much etc.), the
> > approach would be fully compatible with Word in that respect,
> > replacing all accented letters with the ones from the fallback font
> > :-)
>
> well, you may as well expect worse in the tex community ... font feature
> abuse and such
>
> > But after all: there's LinLibertine or the (symbol) Unicode font that
> > one of you has mantioned a few days ago.
>
> yes, those fonts are very complete; i wonder if they may be distributed
> with tex ...

The unicode symbol font should be no problem. You find the following text
on the page.

"Fonts in this site are offered free for any use; they may be opened,
edited, modified, regenerated, packaged and redistributed."

It's worth to write a mail to the designer.

http://users.teilar.gr/~g1951d/index.html

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] symbols in luatex?

2008-01-08 Thread Idris Samawi Hamid
On Tue, 08 Jan 2008 01:21:11 -0700, Hans Hagen <[EMAIL PROTECTED]> wrote:

>> But after all: there's LinLibertine or the (symbol) Unicode font that
>> one of you has mantioned a few days ago.
>
> yes, those fonts are very complete; i wonder if they may be distributed
> with tex ...

There's a LaTeX package...

Anyway, thnx for mentioning LinLibertine, Wolfgang; downloding it now.  
Unfortunately they don't have a monospace font :-( For serious utf-8 work  
in an editor it's indispensable. I'm using Arial Unicode MS in the  
meantime (ugh).

SC Unipad has the best and most complete unicode editing font out there  
(both mono and var options) but it's a bitmap and tied to the application.

SIL has some pretty complete fonts as well. Doulos is pretty complete as  
far as Latin extensions are concerned, and is probably the richest font  
after Arial Unicode (which is still over an order of magnitude bigger).

But the idea of a virtual uniode font is a good idea and I'd like to help.

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Weird behavior about metafun

2008-01-08 Thread Hans Hagen
Zhichu Chen wrote:
> Hi,
> 
> On Jan 7, 2008 11:52 PM, Aditya Mahajan <[EMAIL PROTECTED]> wrote:
> 
>>
>> Something like this:
>> http://www.fauskes.net/media/pgftikzexamples/PDF/todo-notes.pdf
>>
>> It will be nice to have a ConTeXt module that can do this.
> 
> 
> I've made a test file which is somewhat like what it shows, but I
> still have many problems so it's far from perfect.

stacking is already present



\setupcolors   [state=start]
\definecolor   [marginback] [darkcyan]

\startMPpositiongraphic{mypos:underline}
   initialize_box(\MPpos{\MPvar{self}}) ;
   path p ; p := (llxy--lrxy) shifted (0,dxy) ;
   pickup pencircle scaled 1pt ;
   draw p withcolor .75red ;
   anchor_box(\MPanchor{\MPvar{self}}) ;
\stopMPpositiongraphic

\startMPpositiongraphic{mypos:ulcorner}
   initialize_box(\MPpos{\MPvar{self}}) ;
   path p ; p := llxy--ulxy--urxy ;
   pickup pencircle scaled 1pt ;
   draw p withcolor .75red ;
   anchor_box(\MPanchor{\MPvar{self}}) ;
\stopMPpositiongraphic

\startMPpositiongraphic{mypos:torightmargin}
   path pa, pb, pab ; numeric na, nb ; pair bxya, lxyb ;
   initialize_box(\MPpos{\MPvar{from}}) ;
   na := nxy ; pa := (llxy--lrxy) shifted (0,dxy) ; bxya := (center pa) 
- (0 , \the\baselineskip/4) ;
   initialize_box(\MPpos{\MPvar{to}}) ;
   nb := nxy ; lxyb := .5[llxy , ulxy] - (\the\rightmargindistance/2 , 
0) ; pb := llxy--ulxy ;
   if na=nb :
 pab := center pa -- bxya -- (xpart lxyb , ypart bxya) -- lxyb -- 
center pb;
 pickup pencircle scaled 1pt ;
 draw pab withcolor transparent(1,.5,.625yellow) ;
 anchor_box(\MPanchor{\MPvar{from}}) ;
   fi ;
\stopMPpositiongraphic

\defineoverlay [margingraphics] [\positionoverlay{margingraphics}]

\setupbackgrounds
   [page]
   [background=margingraphics]

\starttext

\setupinmargin[stack=yes]

\defineframedtext
 [marginframe]
 [background=color,
%  backgroundcolor=marginback,
  offset=.25ex,
  frame=off,
  width=\the\rightmarginwidth,
  foregroundstyle=\bfx]

\def\marginstuff#1#2%
   {\doglobal\increment\currentmarginstuff
\startpositionoverlay{margingraphics}%
   % can be drawn in one graphic which is more efficient
   \setMPpositiongraphic{mstuff:t\currentmarginstuff}{mypos:underline}%
   \setMPpositiongraphic{mstuff:m\currentmarginstuff}{mypos:ulcorner}%
 
\expanded{\setMPpositiongraphic{mstuff:t\currentmarginstuff}{mypos:torightmargin}{to=mstuff:m\currentmarginstuff}}%
\stoppositionoverlay
 
\hpos{mstuff:t\currentmarginstuff}{#1}\inright{\hpos{mstuff:m\currentmarginstuff}{\marginframe{#2

First we have defined an \marginstuff {overlay}
{Just a test in a margin that could be multiple lines.}.
This overlay can be attached to some overlay layer, like, in our
case, the page. We define four small circles. These are drawn
as soon as the page overlay is typeset. Because they are located
in the background, they don't cover the text, while the lines do.
The previous paragraph was typeset by saying:

First we have defined an \marginstuff {overlay}
{Just a test in a margin that could be multiple lines.}.
First we have defined an \marginstuff {overlay}
{Just a test in a margin that could be multiple lines.}.
This overlay can be attached to some overlay layer, like, in our
case, the page. We define four small circles. These are drawn
as soon as the page overlay is typeset. Because they are located
in the background, they don't cover the text, while the lines do.
The previous paragraph was typeset by saying:

First we have defined an \marginstuff {overlay}
{Just a test in a margin that could be multiple lines.}.
First we have defined an \marginstuff {overlay}
{Just a test in a margin that could be multiple lines.}.
This overlay can be attached to some overlay layer, like, in our
case, the page. We define four small circles. These are drawn
as soon as the page overlay is typeset. Because they are located
in the background, they don't cover the text, while the lines do.

The previous paragraph was typeset by saying:
First we have defined an \marginstuff {overlay}
{Just a test in a margin that could be multiple lines.}.
First we have defined an \marginstuff {overlay}
{Just a test in a margin that could be multiple lines.}.
This overlay can be attached to some overlay layer, like, in our
case, the page. We define four small circles. These are drawn
as soon as the page overlay is typeset. Because they are located
in the background, they don't cover the text, while the lines do.
The previous paragraph was typeset by saying:

\stoptext


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___

Re: [NTG-context] beta & math

2008-01-08 Thread Thomas A. Schmitz

On Jan 8, 2008, at 4:42 PM, Hans Hagen wrote:

> Thomas A. Schmitz wrote:
>> Hans,
>>
>> \textbraceleft and \textbraceright (which I us from time to time) are
>> identified as math characters in the latest beta and give errors:
>>
>> ! Missing $ inserted.
>> 
>> $
>> 
>>\omathchar
>> \textbraceleft ->\omathchar
>> "4020066
>>
>> But I want to use them as text characters (they are defined in enco-
>> ans.tex, enco-ec.tex, and other encodings. Can this be fixed?
>
> hope so, just uploaded a new zip (btw, enco-ec cum suis are past  
> time in
> luatex)
>
> Hans
>
Excellent, works again! Was aware that enco-XXX is dead as a doornail,  
but wanted to explain that this is not a mathcharacter (at least not  
exculively...).

Thanks, and best

Thomas
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] ConTeXt meeting: preliminary registrations open now

2008-01-08 Thread Jeff Smith
On Jan 3, 2008 5:47 PM, Mojca Miklavec <[EMAIL PROTECTED]> wrote:
> (It's really a pity that quite some people whom I was hoping to see or
> get to know will not be able to participate this year.)

Personally, I would really love to attend but Europe as a whole is not
a cheap destination for my limited, part-time employee part-time
student means (I'm in Canada). I'm in France or Swizterland once or
twice a year, but it's paid by work and I don't get to choose the time
of year...

On appearances it sometimes feels like I'm the only North American
user of ConTeXt (which is surely not true, though)!

If a meeting in North America were to be organized, I'd be there.
Hell, I'd help organize it. ;-)

Jeff
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] ConTeXt meeting: preliminary registrations open now

2008-01-08 Thread Idris Samawi Hamid
On Tue, 08 Jan 2008 14:16:47 -0700, Jeff Smith <[EMAIL PROTECTED]> wrote:

> On appearances it sometimes feels like I'm the only North American
> user of ConTeXt (which is surely not true, though)!

You're kidding, right ;-)

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Weird behavior about metafun

2008-01-08 Thread Zhichu Chen
Pretty cool! I knew ConTeXt can do it and thank you Hans
for teaching me so much.

Hi Arthur, I'm suffering a network problem so sometimes
mails may no be delivered correctly. But ignore my test
file and get Hans' one.

On Jan 9, 2008 1:04 AM, Hans Hagen <[EMAIL PROTECTED]> wrote:

> Zhichu Chen wrote:
> > Hi,
> >
> > On Jan 7, 2008 11:52 PM, Aditya Mahajan <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> Something like this:
> >> http://www.fauskes.net/media/pgftikzexamples/PDF/todo-notes.pdf
> >>
> >> It will be nice to have a ConTeXt module that can do this.
> >
> >
> > I've made a test file which is somewhat like what it shows, but I
> > still have many problems so it's far from perfect.
>
> stacking is already present
>
>
>
> \setupcolors   [state=start]
> \definecolor   [marginback] [darkcyan]
>
> \startMPpositiongraphic{mypos:underline}
>   initialize_box(\MPpos{\MPvar{self}}) ;
>   path p ; p := (llxy--lrxy) shifted (0,dxy) ;
>   pickup pencircle scaled 1pt ;
>   draw p withcolor .75red ;
>   anchor_box(\MPanchor{\MPvar{self}}) ;
> \stopMPpositiongraphic
>
> \startMPpositiongraphic{mypos:ulcorner}
>   initialize_box(\MPpos{\MPvar{self}}) ;
>   path p ; p := llxy--ulxy--urxy ;
>   pickup pencircle scaled 1pt ;
>   draw p withcolor .75red ;
>   anchor_box(\MPanchor{\MPvar{self}}) ;
> \stopMPpositiongraphic
>
> \startMPpositiongraphic{mypos:torightmargin}
>   path pa, pb, pab ; numeric na, nb ; pair bxya, lxyb ;
>   initialize_box(\MPpos{\MPvar{from}}) ;
>   na := nxy ; pa := (llxy--lrxy) shifted (0,dxy) ; bxya := (center pa)
> - (0 , \the\baselineskip/4) ;
>   initialize_box(\MPpos{\MPvar{to}}) ;
>   nb := nxy ; lxyb := .5[llxy , ulxy] - (\the\rightmargindistance/2 ,
> 0) ; pb := llxy--ulxy ;
>   if na=nb :
> pab := center pa -- bxya -- (xpart lxyb , ypart bxya) -- lxyb --
> center pb;
> pickup pencircle scaled 1pt ;
> draw pab withcolor transparent(1,.5,.625yellow) ;
> anchor_box(\MPanchor{\MPvar{from}}) ;
>   fi ;
> \stopMPpositiongraphic
>
> \defineoverlay [margingraphics] [\positionoverlay{margingraphics}]
>
> \setupbackgrounds
>   [page]
>   [background=margingraphics]
>
> \starttext
>
> \setupinmargin[stack=yes]
>
> \defineframedtext
> [marginframe]
> [background=color,
> %  backgroundcolor=marginback,
>  offset=.25ex,
>  frame=off,
>  width=\the\rightmarginwidth,
>  foregroundstyle=\bfx]
>
> \def\marginstuff#1#2%
>   {\doglobal\increment\currentmarginstuff
>\startpositionoverlay{margingraphics}%
>   % can be drawn in one graphic which is more efficient
>   \setMPpositiongraphic{mstuff:t\currentmarginstuff}{mypos:underline}%
>   \setMPpositiongraphic{mstuff:m\currentmarginstuff}{mypos:ulcorner}%
>
>
> \expanded{\setMPpositiongraphic{mstuff:t\currentmarginstuff}{mypos:torightmargin}{to=mstuff:m\currentmarginstuff}}%
>\stoppositionoverlay
>
>
> \hpos{mstuff:t\currentmarginstuff}{#1}\inright{\hpos{mstuff:m\currentmarginstuff}{\marginframe{#2
>
> First we have defined an \marginstuff {overlay}
> {Just a test in a margin that could be multiple lines.}.
> This overlay can be attached to some overlay layer, like, in our
> case, the page. We define four small circles. These are drawn
> as soon as the page overlay is typeset. Because they are located
> in the background, they don't cover the text, while the lines do.
> The previous paragraph was typeset by saying:
>
> First we have defined an \marginstuff {overlay}
> {Just a test in a margin that could be multiple lines.}.
> First we have defined an \marginstuff {overlay}
> {Just a test in a margin that could be multiple lines.}.
> This overlay can be attached to some overlay layer, like, in our
> case, the page. We define four small circles. These are drawn
> as soon as the page overlay is typeset. Because they are located
> in the background, they don't cover the text, while the lines do.
> The previous paragraph was typeset by saying:
>
> First we have defined an \marginstuff {overlay}
> {Just a test in a margin that could be multiple lines.}.
> First we have defined an \marginstuff {overlay}
> {Just a test in a margin that could be multiple lines.}.
> This overlay can be attached to some overlay layer, like, in our
> case, the page. We define four small circles. These are drawn
> as soon as the page overlay is typeset. Because they are located
> in the background, they don't cover the text, while the lines do.
>
> The previous paragraph was typeset by saying:
> First we have defined an \marginstuff {overlay}
> {Just a test in a margin that could be multiple lines.}.
> First we have defined an \marginstuff {overlay}
> {Just a test in a margin that could be multiple lines.}.
> This overlay can be attached to some overlay layer, like, in our
> case, the page. We define four small circles. These are drawn
> as soon as the page overlay is typeset. Because they are located
> in the background, they don't cover the text, while the lines do.
> The previous paragraph was typeset by saying:
>
> \stop