From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/55901 Path: news.gmane.org!not-for-mail From: Andreas Harder Newsgroups: gmane.comp.tex.context Subject: Re: First page of chapter Date: Tue, 2 Feb 2010 23:03:31 +0100 Message-ID: <140B9618-4A13-467C-8C6B-98FDE154BD32@rz-online.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: multipart/mixed; boundary="===============0645064157==" X-Trace: ger.gmane.org 1265148268 20599 80.91.229.12 (2 Feb 2010 22:04:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Feb 2010 22:04:28 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Feb 02 23:04:24 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NcQr9-0007BT-DP for gctc-ntg-context-518@m.gmane.org; Tue, 02 Feb 2010 23:04:23 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9DEC4C9CD9; Tue, 2 Feb 2010 23:05:20 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Cj1-GyXQcfTr; Tue, 2 Feb 2010 23:05:10 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 737EBC9CD3; Tue, 2 Feb 2010 23:05:07 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A027EC9CD3 for ; Tue, 2 Feb 2010 23:04:57 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nOSCdWIPur+g for ; Tue, 2 Feb 2010 23:04:35 +0100 (CET) Original-Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15]) by balder.ntg.nl (Postfix) with ESMTP id 98B72C9CCE for ; Tue, 2 Feb 2010 23:04:32 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id C59F078A33C8 for ; Tue, 2 Feb 2010 23:03:32 +0100 (CET) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09132-09 for ; Tue, 2 Feb 2010 23:03:32 +0100 (CET) X-CHKRCPT: Envelopesender noch andreas.harder@rz-online.de Original-Received: from [192.168.1.112] (77-23-29-238-dynip.superkabel.de [77.23.29.238]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTP id E95E778A319B for ; Tue, 2 Feb 2010 23:03:31 +0100 (CET) X-Mailer: Apple Mail (2.1077) X-Virus-Scanned: amavisd-new at uni-koblenz.de X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:55901 Archived-At: --===============0645064157== Content-Type: multipart/alternative; boundary=Apple-Mail-1--921797390 --Apple-Mail-1--921797390 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > I am struggling with getting the first pages of my chapters laid out = as > desired. What I want on the top third of the page is a roughly 2 inch = square > graphic on the left with the chapter number and chapter title on the = right > in large print. The following chunk errors out as shown but works when > hard-coded. Am I headed off in the wrong direction by trying to use = columns > in this way? Previously, I tried treating the chapter number and title = as > text with startfiguretext. It works but I can't format the chapter = titles to > fit properly. Any suggestions for a ConTeXt beginner? > =20 > =20 > \def\ChapterTop#1#2{ > \startcolumns[n=3D2] > \placefigure[left]{none}{\externalfigure[chief]} > \column > \switchtobodyfont[26pt] {\ss\bf\sl #1} > \blank[large]\blank[large]=20 > {\ss\bf #2} > \stopcolumns} > =20 > \setuphead[chapter] > [command=3D\ChapterTop, header=3Dhigh,footer=3Dpagenumber,page=3Dcenter= ]=20 > =20 > \input c:. %chapter used to test the code Hi! I think you search for something like this: \def\ChapterTop#1#2% bottom-aligned {\framed[width=3Dbroad,offset=3Doverlay] {\framed[width=3D2in,height=3D2in]{GRAPHIC}\hfill \framed[align=3Dright]{#1\blank[2*big]#2}}} \definetext[ChapterFoot][footer][pagenumber] \setuphead [chapter] [command=3D\ChapterTop, header=3Dhigh, footer=3DChapterFoot, numberstyle=3D\ssbid, textstyle=3D\ssbfd] \starttext \showframe \dorecurse{3}{\chapter{First Chapter}\dorecurse{5}{\input tufte}} \stoptext Greetings Andreas= --Apple-Mail-1--921797390 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
I am struggling with getting the first pages of my = chapters laid out as
desired. What I want on the top third of the page is a = roughly 2 inch square
graphic on the left with the chapter number and = chapter title on the right
in large print. The = following chunk errors out as shown but works = when
hard-coded.  Am I headed off in the wrong = direction by trying to use columns
in this way? Previously, I = tried treating the chapter number and title as
text with startfiguretext. = It works but I can't format the chapter titles to
fit properly. Any = suggestions for a ConTeXt beginner?
 
 
\def\ChapterTop#1#2{
   =  \startcolumns[n=3D2]
       =  \placefigure[left]{none}{\externalfigure[chief]}
   =  \column
         = \switchtobodyfont[26pt] {\ss\bf\sl #1}
       =   \blank[large]\blank[large] 
       =    {\ss\bf #2}
     = \stopcolumns}
 
\setuphead[chapter]
 [command=3D\ChapterTop,= header=3Dhigh,footer=3Dpagenumber,page=3Dcenter] 
<= font class=3D"Apple-style-span" = color=3D"#000000"> 
\input c:. %chapter used to test the = code

Hi!

I = think you search for something like = this:

\def\ChapterTop#1#2% = bottom-aligned
  {\framed[width=3Dbroad,offset=3Doverl= ay]
   =  {\framed[width=3D2in,height=3D2in]{GRAPHIC}\hfill
 &n= bsp;   = \framed[align=3Dright]{#1\blank[2*big]#2}}}

\defi= netext[ChapterFoot][footer][pagenumber]

\setuphea= d
  [chapter]
  [command=3D\Chapte= rTop,
   header=3Dhigh,
   = footer=3DChapterFoot,
   = numberstyle=3D\ssbid,
   = textstyle=3D\ssbfd]

\starttext =  \showframe
\dorecurse{3}{\chapter{First = Chapter}\dorecurse{5}{\input = tufte}}
\stoptext

Greetings
<= span class=3D"Apple-tab-span" style=3D"white-space:pre"> = Andreas
= --Apple-Mail-1--921797390-- --===============0645064157== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0645064157==--