Re: [NTG-context] columnsetspan extra line

2016-12-29 Thread Mikael P. Sundqvist
On Thu, Dec 29, 2016 at 1:43 PM, Hans Hagen  wrote:
> On 12/29/2016 1:10 PM, Mikael P. Sundqvist wrote:
>
>> 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?
>
>
> 5\lineheight
>
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

Thanks, that worked indeed (I had to skip the style of the chapter,
and put the \definedfont and \setupinterlinespace inside the macro).

For 2) I noted that a grid=no as option to \startframedtext results in
the frame starting from the top. Maybe there is a cleaner solution?
grid=?

1) was actually my main concern. Any idea?

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

Re: [NTG-context] columnsetspan extra line

2016-12-29 Thread Hans Hagen

On 12/29/2016 1:10 PM, Mikael P. Sundqvist wrote:


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?


5\lineheight


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] columnsetspan extra line

2016-12-29 Thread Mikael P. Sundqvist
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


ctx-listexample21.pdf
Description: Adobe PDF 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___