From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47006 Path: news.gmane.org!not-for-mail From: Alfredo Catalina Newsgroups: gmane.comp.tex.context Subject: Customizing chapter heads Date: Sun, 25 Jan 2009 00:49:10 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0175873320==" X-Trace: ger.gmane.org 1232841016 28091 80.91.229.12 (24 Jan 2009 23:50:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Jan 2009 23:50:16 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun Jan 25 00:51:28 2009 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 lo.gmane.org with esmtp (Exim 4.50) id 1LQsHd-0007tl-Gc for gctc-ntg-context-518@m.gmane.org; Sun, 25 Jan 2009 00:51:25 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 666F31FE05; Sun, 25 Jan 2009 00:50:05 +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 28216-05; Sun, 25 Jan 2009 00:49:24 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3CE221FDE5; Sun, 25 Jan 2009 00:49:24 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 38AA61FDE5 for ; Sun, 25 Jan 2009 00:49:22 +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 29994-02-2 for ; Sun, 25 Jan 2009 00:49:13 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by ronja.ntg.nl (Postfix) with ESMTP id E79B11FDE2 for ; Sun, 25 Jan 2009 00:49:12 +0100 (CET) Original-Received: from yx-out-1718.google.com (yx-out-1718.google.com [74.125.44.154]) by filter4-ams.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n0ONnBYo009727 for ; Sun, 25 Jan 2009 00:49:12 +0100 Original-Received: by yx-out-1718.google.com with SMTP id 3so2071732yxi.74 for ; Sat, 24 Jan 2009 15:49:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=HnzUolwMqrymSNTcSLrRRNF56UvxMoRtIbF8lFQ6IH8=; b=lDPtHtePf6VfLba61jd/7UiZY0NPcF7rZtn/T4JC6usMktKQyEWC7cuMwUrHB4RcgK Mw3pL5l4bhMCqglZ5rIMM8tYDb5Z+T0uAc75zphXlkYsL+eUxoHak+a+Qs2atzT3IGP/ m4oDOwYpyDGs0t8K860/4s9zGjp5WjWXl6fRM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=t9tYruU/UR00zV/am9QN1sX42MjmDWo9zawfUX7HMBncWIHDInFsHEjy63dV4EtDe4 4QMpRiwQedzkCeJVy5Na9l91FNNpN5IGHNfJ4eSxz/rmlIVC7vo3K6/jbjs+7sYm0s/O HB/dFMTgCs7JOSkTlzfrm+lUmU7TP2pRUpYWI= Original-Received: by 10.90.120.14 with SMTP id s14mr623544agc.20.1232840950883; Sat, 24 Jan 2009 15:49:10 -0800 (PST) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.44.154; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 170075598 - 220bc8bb319e X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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:47006 Archived-At: --===============0175873320== Content-Type: multipart/alternative; boundary=001636283794f127240461432623 --001636283794f127240461432623 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I am new to ConTeXt. I am trying to define a customized head for chapters but I am finding some problems. The sentences below are based on the chapte= r Text Elements which may be found in the ConTeXt manual. Prior to setting up the title, a new Head command is defined by \def\HeadTitle#1#2%. It takes two arguments, the chapter number and the chapter title. The Head so defined will show the word "C h a p t e r" in capitals, then the chapter number at 80pt, then a horizontal line, and finally the title. The definition works quite well except that both, the chapter number and th= e chapter title, are not show at the specified font size. \definebodyfont[10pt,11pt,12pt][rm][tff=3DRegular at 80pt] \definebodyfont[10pt,11pt,12pt][rm][tfe=3DRegular at 42pt] \def\HeadTitle#1#2% {\hbox to \hsize \bgroup {\hfill % \setupframed[height=3D7cm,offset=3D.5em,frame=3Doff] \framed[width=3D9cm,align=3Dleft] { {\tfc \sc {C~h~a~p~t~e~r}} ~~ {\tff #1}\\ \hairline {\ss \tfe #2} } } \egroup } \starttext \setuphead[chapter] [command=3D\HeadTitle] \chapter{An Insight\\Into Fred's Design} \stoptext An easy workaround for the chapter number replaces the argument #1 by \currentheadnumber \def\HeadTitle#1#2% {\hbox to \hsize \bgroup {\hfill % \setupframed[height=3D7cm,offset=3D.5em,frame=3Doff] \framed[width=3D9cm,align=3Dleft] { {\tfc \sc {C~h~a~p~t~e~r}} ~~ {\tff #1}\\ \hairline {\ss \tfe #2} } } \egroup } Now the chapter number is shown at 80pt as defined. But I have not found th= e way to solve the problem with the head title, #2. =BFAny ideas? Thanks in advance. Alfredo. --001636283794f127240461432623 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I am new to ConTeXt. I am trying to define a customized head for chapt= ers but I am finding some problems. The sentences below are based on the ch= apter Text Elements which may be found in the ConTeXt manual.
 
Prior to setting up the title, a new Head command is defined by \= def\HeadTitle#1#2%. It takes two arguments, the chapter number and the chap= ter title. The Head so defined will show the word "C h a p t e r"= in capitals, then the chapter number at 80pt, then a horizontal line, and = finally the title.
 
The definition works quite well except that both, the chapter number a= nd the chapter title, are not show at the specified font size.  
 
\definebodyfont[10pt,11pt,12pt][rm][tff=3DRegular at 80pt]
\defineb= odyfont[10pt,11pt,12pt][rm][tfe=3DRegular at 42pt]

\def\HeadTitle#1#2%
    {\hbox to \hsize \bgroup
&n= bsp;       {\hfill %
   &nb= sp;    \setupframed[height=3D7cm,offset=3D.5em,frame=3Doff]<= br>         \framed[width=3D9cm,ali= gn=3Dleft]
          &= nbsp; {
          &nbs= p;     {\tfc \sc {C~h~a~p~t~e~r}} ~~ {\tff #1}\\
            &nb= sp;   \hairline
       &nbs= p;        {\ss \tfe #2}
  &= nbsp;         }
  &nbs= p;     }
        = \egroup
    }

\starttext
\setuphead[chapter] [command=3D\HeadTitle]
\chapter{An Insight\\Into Fred's Design}
\stoptext
 
An easy workaround for the chapter number replaces the argument #= 1 by \currentheadnumber
 
\def\HeadTitle#1#2%
    {\hbox to \hsize \bgroup
=         {\hfill %
   &= nbsp;    \setupframed[height=3D7cm,offset=3D.5em,frame=3Doff= ]
         \framed[width=3D9cm,a= lign=3Dleft]
          = ;  {
          &n= bsp;     {\tfc \sc {C~h~a~p~t~e~r}} ~~ {\tff #1}\\
            &nb= sp;   \hairline
       &nbs= p;        {\ss \tfe #2}
  &= nbsp;         }
  &nbs= p;     }
        = \egroup
    }
 
Now the chapter number is shown at 80pt as defined. But I have no= t found the way to solve the problem with the head title, #2. =BFAny ideas?=
 
Thanks in advance.
Alfredo.
--001636283794f127240461432623-- --===============0175873320== 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0175873320==--