From: "Mikael P. Sundqvist" <mickep@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: columnsetspan extra line
Date: Thu, 29 Dec 2016 13:10:32 +0100 [thread overview]
Message-ID: <CAHy-LL_t9KOik_9BmUWc-GFiaK-M6ujaLXOp-BZ_Pf3npAOZ3A@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1639 bytes --]
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
[-- Attachment #2: ctx-listexample21.pdf --]
[-- Type: application/pdf, Size: 28783 bytes --]
[-- Attachment #3: Type: text/plain, Size: 492 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
___________________________________________________________________________________
next reply other threads:[~2016-12-29 12:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-29 12:10 Mikael P. Sundqvist [this message]
2016-12-29 12:43 ` Hans Hagen
2016-12-29 12:53 ` Mikael P. Sundqvist
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHy-LL_t9KOik_9BmUWc-GFiaK-M6ujaLXOp-BZ_Pf3npAOZ3A@mail.gmail.com \
--to=mickep@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).