Jelle Huisman wrote:
Wolfgang Schuster wrote:
\startuseMPgraphic{columnrule}
path p ; p := unitsquare xyscaled (OverlayWidth+5mm,OverlayHeight) ;
draw (xpart(urcorner p),ypart(urcorner
p)-\the\dimexpr\noflines\lineheight\relax) -- urcorner p ;
setbounds currentpicture to p ;
\stopuseMPgraphic
Thanks Wolfgang!, this is precisely what I need. I'll wikify it. (Think
it's time to learn some MP...)
Oeps, I have found one problem: if there is text before the columnset,
like a chapter header, the text in the columnset moves down but the
{columnrule} stays at the top of the page... How can I modify the code
the make sure that this doesn't happen? See sample:
%sample%
\definecolumnset[example][n=3,distance=5mm]
\startuseMPgraphic{columnrule}
path p ; p := unitsquare xyscaled (OverlayWidth+5mm,OverlayHeight) ;
draw (xpart(urcorner p),ypart(urcorner
p)-\the\dimexpr\noflines\lineheight\relax) -- urcorner p ;
setbounds currentpicture to p ;
\stopuseMPgraphic
\defineoverlay[columnrule][\useMPgraphic{columnrule}]
\setupcolumnset[example][1,2][balance=yes,background=columnrule]
\setupcolumnsetlines[example][1][1][-35]
\setupcolumnsetlines[example][1][2][-35]
\setupcolumnsetlines[example][1][3][-35]
\starttext
%\input knuth % <- uncomment this to see problem
\startcolumnset[example]
\dorecurse{2}{\input knuth}
\stopcolumnset
\stoptext
%/sample%
Thanks again,
Jelle (MkII/XeTeX)
___________________________________________________________________________________
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
___________________________________________________________________________________