From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24953 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: How to do this in ConTeXt Date: Wed, 04 Jan 2006 20:42:54 +0100 Message-ID: <43BC253E.5040106@wxs.nl> References: <43BC16BF.9030502@uqam.ca> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1136403792 23551 80.91.229.2 (4 Jan 2006 19:43:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Jan 2006 19:43:12 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Jan 04 20:43:10 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1EuEXJ-0002wR-Bd for gctc-ntg-context-518@m.gmane.org; Wed, 04 Jan 2006 20:43:05 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CDA6212871; Wed, 4 Jan 2006 20:43:04 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10791-04-4; Wed, 4 Jan 2006 20:43:01 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D7A9312851; Wed, 4 Jan 2006 20:43:01 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5772812851 for ; Wed, 4 Jan 2006 20:43:00 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10791-04-3 for ; Wed, 4 Jan 2006 20:42:59 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with SMTP id 5F641127D0 for ; Wed, 4 Jan 2006 20:42:59 +0100 (CET) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 10288 for ; Wed, 04 Jan 2006 20:51:59 +0300 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <43BC16BF.9030502@uqam.ca> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:24953 Archived-At: Fabrice Larribe wrote: > Hi, > > R S Ananda Murthy wrote: > >> Hello, >> >> I need the format shown below: >> >> ------------- >> |Example 1-1| >> ----------------------------------------- >> > \setupoutput[pdftex] > \setupcolors[state=start] > > > Here is (almost) what you want to acheive, but without any macros: > \blank > \starttext > %\def\Ex#1{ \line{\framed{\red #1}} } > \line{ > \framed[background=color,backgroundcolor=black]{ > { {\white Exemple 1.1\ }}}\hfill > } > \hrule > \blank > To have numbers, you should use ennumeration.. And a try.. but I don't > know how to adjust things... Others have to complete... > > \defineenumeration[Exemple][location=serried,headstyle=bold,width=broad, > text={\framed[background=color,backgroundcolor=black]{\red\sc > Exemple}\textrule},margin=0.5cm,before=\blank,after=\blank] > > \startExemple > This is a nice exemple. > \stopExemple > > > This is the end. > \stoptext > > F. one of you has to wikify this answer ... \setupcolors[state=start] \setupbackgrounds[text][text][background=color,backgroundcolor=red,backgroundoffset=3pt] \defineenumeration [example] [way=bychapter, separator=\compoundhyphen, chapternumber=yes, color=white, command=\exampleframed] \defineframed [exampleframed] [background=color, backgroundcolor=white, foregroundcolor=black, style=bold, frame=off] \starttext \chapter{One} \input tufte \startexample \input tufte \stopexample \input tufte \stoptext