From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/65891 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Headers another way Date: Tue, 8 Feb 2011 18:37:43 +0100 Message-ID: <85D0A519-15A1-4480-8E67-64E4A37EBF97@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: multipart/mixed; boundary="===============0114440896==" X-Trace: dough.gmane.org 1297186688 15437 80.91.229.12 (8 Feb 2011 17:38:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 8 Feb 2011 17:38:08 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Feb 08 18:38:04 2011 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 1PmrVr-0003Tk-H6 for gctc-ntg-context-518@m.gmane.org; Tue, 08 Feb 2011 18:38:03 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EBE00CA9FE; Tue, 8 Feb 2011 18:38:01 +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 wXFf5kc5gBaz; Tue, 8 Feb 2011 18:37:59 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2C598CAA06; Tue, 8 Feb 2011 18:37:59 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A1921CAA06 for ; Tue, 8 Feb 2011 18:37: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 49+Q5SoMBAiE for ; Tue, 8 Feb 2011 18:37:55 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id B9157CA9FE for ; Tue, 8 Feb 2011 18:37:55 +0100 (CET) Original-Received: from mail-bw0-f41.google.com (mail-bw0-f41.google.com [209.85.214.41]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p18HbsZD003353 for ; Tue, 8 Feb 2011 18:37:55 +0100 Original-Received: by bwz16 with SMTP id 16so22565bwz.14 for ; Tue, 08 Feb 2011 09:37:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:from:mime-version:content-type:subject:date :in-reply-to:to:references:message-id:x-mailer; bh=O7+GN3y10JeIJ2yQMIMrMRuXf2oUo3jSr79if8jGT6A=; b=BmbL4OUD9vafeRiHnP7vtf6iR2VR57HxZ6kZaeMjzsqZrFYob004QkQ6KpBg2wD3MF qF22DFWqP7RTnC0ScBDaPu3rm1FFRv2dwXVXR7UOYieo0vpTRZ1NkllELi1EJiZ72ggW b2GZeEOg2L81/Xig7utDcmuCi/0ZneJVYK0/k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; b=pC4QI96jfcZ0mtWDpZBDj463A4VnZ+2r4YB3958EvdCvh4C3JeaRDr4ZZQvTxHgrki /rFMPQ4qXW748VhNJDj1ZSL2vRaukGlz5WzI+6r8jY3AvwGDbbVZ9V/ZhaP7qvIYOx7/ 6TVuRLHeYGdpjsKMvpLQx5DkKFEbQfSPHPP/c= Original-Received: by 10.204.138.130 with SMTP id a2mr5838894bku.211.1297186674385; Tue, 08 Feb 2011 09:37:54 -0800 (PST) Original-Received: from [192.168.2.23] (p5B293FF7.dip.t-dialin.net [91.41.63.247]) by mx.google.com with ESMTPS id v1sm2893791bkt.17.2011.02.08.09.37.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 08 Feb 2011 09:37:53 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1082) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.41; 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: 03E5tBTRM - c4da60d308fe - 20110208 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 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:65891 Archived-At: --===============0114440896== Content-Type: multipart/alternative; boundary=Apple-Mail-1-1051883688 --Apple-Mail-1-1051883688 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Am 08.02.2011 um 18:32 schrieb Proch=E1zka Luk=E1=9A: > Hello, >=20 > I'm trying to solve an interesting problem. >=20 > (The document should be generated by Lua actually, but probably this = is not of importance.) >=20 > I'd need create various headers, but it's not known which command to = be used a priori; only their "relative position" is known. >=20 > The head creating command should be the same (=3D \HEAD) and the level = should be determined by \PUSHHEAD + \POPHEAD commands. >=20 > I'd need to solve something like this: >=20 > --- > \starttext > \HEAD{...} % Should expand to \chapter > \PUSHHEAD > \HEAD{...} % Should expand to \section > \PUSHHEAD > \HEAD{...} % Should expand to \subsection > \PUSHHEAD > \HEAD{...} % Should expand to \subsubsection > \PUSHHEAD > \HEAD{...} % Should expand to \subsubsubsection > \POPHEAD >=20 > \HEAD{...} % Should expand to \subsubsection again > \POPHEAD > \POPHEAD > \POPHEAD > \stoptext > --- >=20 > Any idea how to solve this? http://www.ntg.nl/pipermail/ntg-context/2010/052754.html Wolfgang --Apple-Mail-1-1051883688 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252
Hello,

I'm trying to solve an interesting = problem.

(The document should be generated by Lua actually, but = probably this is not of importance.)

I'd need create various = headers, but it's not known which command to be used a priori; only = their "relative position" is known.

The head creating command = should be the same (=3D \HEAD) and the level should be determined by = \PUSHHEAD + \POPHEAD commands.

I'd need to solve something like = this:

---
\starttext
 \HEAD{...} % Should expand to = \chapter
 \PUSHHEAD
   \HEAD{...} % Should = expand to \section
   \PUSHHEAD
=      \HEAD{...} % Should expand to = \subsection
     \PUSHHEAD
=        \HEAD{...} % Should expand to = \subsubsection
=        \PUSHHEAD
=          \HEAD{...} % = Should expand to \subsubsubsection
=        \POPHEAD

=        \HEAD{...} % Should expand to = \subsubsection again
     \POPHEAD
=    \POPHEAD
=  \POPHEAD
\stoptext
---

Any idea how to solve = this?


<= div>Wolfgang

= --Apple-Mail-1-1051883688-- --===============0114440896== 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 ___________________________________________________________________________________ --===============0114440896==--