From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47084 Path: news.gmane.org!not-for-mail From: Alan Stone Newsgroups: gmane.comp.tex.context Subject: setuphead question Date: Thu, 29 Jan 2009 11:50:45 +0100 Message-ID: <326847810901290250i5e9b492dmca2815647b3493e4@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0661587589==" X-Trace: ger.gmane.org 1233226409 1821 80.91.229.12 (29 Jan 2009 10:53:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Jan 2009 10:53:29 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 29 11:54:43 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 1LSUXj-0007de-HT for gctc-ntg-context-518@m.gmane.org; Thu, 29 Jan 2009 11:54:43 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 94CF31FCBD; Thu, 29 Jan 2009 11:53:11 +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 18099-05; Thu, 29 Jan 2009 11:51:53 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1DBFE1FC93; Thu, 29 Jan 2009 11:51:50 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 285EA1FC93 for ; Thu, 29 Jan 2009 11:51:38 +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 23758-02 for ; Thu, 29 Jan 2009 11:50:50 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by ronja.ntg.nl (Postfix) with ESMTP id 40C641FC83 for ; Thu, 29 Jan 2009 11:50:47 +0100 (CET) Original-Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) by filter3-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n0TAojgL013165 for ; Thu, 29 Jan 2009 11:50:46 +0100 Original-Received: by nf-out-0910.google.com with SMTP id c10so1224459nfd.44 for ; Thu, 29 Jan 2009 02:50:45 -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=O9/2B1oFwCsHLZHnvPZ6INXlG2e5BAVWi9fdffmK65Q=; b=Xe1Z9uBsjl/LVsaJTxi/R8GDeQ5xqJWXBNRk5soWHdn8z53HrEOurQSNE4Zoih1jgH 3LHn9W4mSrBA2hznbtvDiq2AJJ3LQN8t3vX44dYCSu2VRN2l2xQUEB1I6EQwROFprxqC Wi62eeBFM3NW0KM8/SEMrHUxryinbIJtjM4Io= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=NAqtvnYuLFi0677UNPP83BU2JivUhl5k/Szoj0A8bFu0f2Hr2/Os4cd9xYLx3QOAg5 wcdbr8HS5NvUzaxFSG0tlcGk5hJhpMXw8YiBVzi2FvOsoh7etUo0uqGd8KqzsoZy1qus t1+cYLq6FEgXl4Wfu8p7V+JHGr1TyzWBzPAv0= Original-Received: by 10.210.89.4 with SMTP id m4mr6186615ebb.160.1233226245354; Thu, 29 Jan 2009 02:50:45 -0800 (PST) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=64.233.182.184; 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: 172166617 - 3d956b073534 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:47084 Archived-At: --===============0661587589== Content-Type: multipart/alternative; boundary=0015174bde844833ce04619cdc44 --0015174bde844833ce04619cdc44 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello, In the example below... ---------------------------------------------------- %\def\myCommand#1#2{} \def\myCommand#1#2{#1 #2} %\def\myCommand{} \setuphead[chapter] [number=yes, align=middle, % anyotherparameter=whatever, command=\myCommand] % command=] \starttext \startfrontmatter %\placecontent \completecontent \stopfrontmatter \startbodymatter \chapter{chapter one} \dorecurse{5}{\input tufte\par} \chapter{chapter two} \dorecurse{5}{\input douglas\par} \stopbodymatter \stoptext ---------------------------------------------------- ... how do you define myCommand so \setuphead[chapter] [(any other parameter settings), command=\myCommand, (any other parameter settings)] is equal to \setuphead[chapter] [(any other parameter settings), command=, (any other parameter settings)] i.e. with any other parameter settings remaining active. In the example above, with align=middle and - \def\myCommand#1#2{} the ToC and chapter heads are blank - \def\myCommand#1#2{#1 #2} the ToC and chapter head alignment is lost - \def\myCommand{} the ToC and chapter head alignment is lost Thanks, Alan --0015174bde844833ce04619cdc44 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello,

In the example below...

----------------------------------------------------

%\def\myCommand#1#2{}
\def\myCommand#1#2{#1 #2}
%\def\myCommand{}

\setuphead[chapter]
    [number=yes,
     align=middle,
%  anyotherparameter=whatever,
    command=\myCommand]
%    command=]
     
\starttext

\startfrontmatter
    %\placecontent
    \completecontent
\stopfrontmatter

\startbodymatter   
    \chapter{chapter one}

    \dorecurse{5}{\input tufte\par}

    \chapter{chapter two}

    \dorecurse{5}{\input douglas\par}
\stopbodymatter

\stoptext

----------------------------------------------------

... how do you define myCommand so

\setuphead[chapter]
    [(any other parameter settings),
    command=\myCommand,
    (any other parameter settings)]

is equal to

\setuphead[chapter]
    [(any other parameter settings),
    command=,
    (any other parameter settings)]

i.e. with any other parameter settings remaining active.

In the example above, with align=middle and

- \def\myCommand#1#2{} the ToC and chapter heads are blank
- \def\myCommand#1#2{#1 #2} the ToC and chapter head alignment is lost
- \def\myCommand{} the ToC and chapter head alignment is lost


Thanks,
Alan
--0015174bde844833ce04619cdc44-- --===============0661587589== 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 ___________________________________________________________________________________ --===============0661587589==--