From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/5923 Path: main.gmane.org!not-for-mail From: Jose Luis Diaz Newsgroups: gmane.comp.tex.context Subject: Q: Keeping blocks together Date: Thu, 25 Oct 2001 10:45:30 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <12163019177.20011025104530@telecable.es> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT X-Trace: main.gmane.org 1035396484 5755 80.91.224.250 (23 Oct 2002 18:08:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:08:04 +0000 (UTC) Original-To: ConTeXt Mailing List Xref: main.gmane.org gmane.comp.tex.context:5923 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:5923 Hello ConTeXt users, I want to have two kind of blocks typeset with different format, but disallowing a page break inbetween. For example, assume that I have pairs Question/Answer, and I never want a page break after the Question, but a page break after the answer is desirable. To be precise, I'm working in a multicolumn environment (3 columns) and what I want to allow/disallow are the column breaks. I tried the following: \defineblock[Question,Answer] \setupblock[Question] [before={\startitemize[2]\item}, after={\stopitemize\page[no]}, ] \setupblock[Answer] [before={\startframedtext[width=\textwidth]\startcolor[red]}, after={\stopcolor\stopframedtext\page[preference]}, ] (BTW, I need to put a comma at the end of the "after" line, why?) This code doesn't work. I keep getting column breaks between the question and the answer (surprisingly, it appears that a column break is indeed *prefered* in that position, since I get a lot of them) What I'm doing wrong? I even tried resorting to the TeX primitive \penalty, instead of using \page. Are penalties ignored when typesetting in columns? Anothe question. While testing the above code, I tried the following main text: \starttext \dorecurse{10}{ \beginQuestion \input tufte \endQuestion \beginAnswer I don't know the answer. \endAnswer } \stoptext But I get no text in the output. And a last question. It is "philosophically" correct to use text blocks for the stated purpose? As far as I understand, text blocks are provided for "hidding" the text until an adecuate place in the output, but in my case I need no hidding. There is another way for defining start/stop pairs? (something like the LaTeX \newenvironment) Thanks in advance, and excuse the extension of the message. I'm new to ConTeXt, and I have yet a lot to learn. -- Jose Luis Diaz