[NTG-context] columnsetspan extra line

Mikael P. Sundqvist mickep at gmail.com
Thu Dec 29 13:10:32 CET 2016


Dear all,

I'm struggling with the column environments these days. The code below
runs fine, but there are some problems with the result.

1) There is an extra blank line at the top of the left column. I can
get rid of it with a \vskip-\baselineksip (commented out in the
example) but that feels like a hack. Does anyone see why it is there
from the beginning?

2) Why is the frame something like 3 lines down from the top of the
page? Can I force it to be on top?

3) Is there a simple way to define the height of the frame (that is
now set to 0.3\textheight) to be a certain number of lines?

%%% Start of example
\usemodule[newcolumnsets]

\setuplayout[
grid=yes,
]

\showgrid

\definecolumnset[example][n=2]
\definecolumnsetspan[intro][n=2,after=,before=,]


\define[1]\mychapnum{%
\startuseMPgraphic{chapnum}
label(btex {\bf #1} etex scaled 12,
(0.5*OverlayWidth,0.5*OverlayHeight)) withcolor darkred;
setbounds currentpicture to unitsquare xyscaled (OverlayWidth,OverlayHeight);
\stopuseMPgraphic
}
\defineoverlay[chapnum][\useMPgraphic{chapnum}]

\define[1]\mychaptext{%
\startcolumnsetspan[intro]
\startframedtext[align={middle,lohi},background=chapnum,frame=on,framecolor=darkyellow,rulethickness=2pt,width=\makeupwidth,height=0.3\textheight,after=,before=]
\setupinterlinespace[line=60pt] #1
\stopframedtext
\stopcolumnsetspan
}


\setuphead[chapter][
style={\definedfont[Serif at 48pt]},
numbercommand=\mychapnum,
textcommand=\mychaptext,
after=,
before=,
page=no,
]


\starttext

\startcolumnset[example]
\chapter{A chapter}

%\vskip-\baselineskip
\dorecurse{2}{\input knuth \par}
\stopcolumnset


\stoptext
%%% end of example
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctx-listexample21.pdf
Type: application/pdf
Size: 28783 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20161229/f607740b/attachment-0001.pdf>


More information about the ntg-context mailing list