From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/57148 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: blank line and signals Date: Tue, 16 Mar 2010 01:32:37 +0100 Message-ID: <4B9ED1A5.8050809@googlemail.com> References: <496BC989-3F1C-42F8-9CB9-D10A612E6D9E@uni-koblenz.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1268699576 7428 80.91.229.12 (16 Mar 2010 00:32:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 16 Mar 2010 00:32:56 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Mar 16 01:32:52 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 1NrKiJ-0005sX-Gc for gctc-ntg-context-518@m.gmane.org; Tue, 16 Mar 2010 01:32:51 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7E5D3C9CF5; Tue, 16 Mar 2010 01:32:50 +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 ksbnYq4xPsNB; Tue, 16 Mar 2010 01:32:45 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B833CC9CDB; Tue, 16 Mar 2010 01:32:45 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3E0A2C9CDB for ; Tue, 16 Mar 2010 01:32:43 +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 VRIb-SKlDyWM for ; Tue, 16 Mar 2010 01:32:40 +0100 (CET) Original-Received: from mail-fx0-f222.google.com (mail-fx0-f222.google.com [209.85.220.222]) by balder.ntg.nl (Postfix) with ESMTP id CC223C9CDA for ; Tue, 16 Mar 2010 01:32:40 +0100 (CET) Original-Received: by fxm22 with SMTP id 22so500165fxm.34 for ; Mon, 15 Mar 2010 17:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=Jm9HuWJK0QpvEJP6r2dHG/u/QQCLRVHNGmMzA913mYY=; b=UYFF4SDPBsKYCZgCYfZvExbuR1JHgK2Fqih3gyqQKdc6q2Qhi81OV2Pqp0GISdaca8 Ul8l+YHTlKmypHo63wVMPOQCvnogCQuQbe93DVPkFqWxxNjv4+CbDbC5zgXPt/IGmOKe 2bNEYkHRqODiXgYjD43N+oZ3a9TxhcHouomoY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=GT4JNuHiOLWci7issBF77l/Nl2e8Dxmdcm+O+1sDY9DsKLaCEHtOFCwbCHBbEn3ZGF szLdfK+gE1TlRCwzXmakqPMsqDPh4EN+9tTYDaZ19mTy2znd0dMr2NWI8iN0s3B39WlX 75OZglPWsCp2xPwX+n7JVMZL1fM1uTAM+oOQ0= Original-Received: by 10.223.64.141 with SMTP id e13mr3859809fai.101.1268699560521; Mon, 15 Mar 2010 17:32:40 -0700 (PDT) Original-Received: from [192.168.2.23] (p5B2954BA.dip.t-dialin.net [91.41.84.186]) by mx.google.com with ESMTPS id 31sm7921262fkt.17.2010.03.15.17.32.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Mar 2010 17:32:39 -0700 (PDT) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 In-Reply-To: <496BC989-3F1C-42F8-9CB9-D10A612E6D9E@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:57148 Archived-At: Am 14.03.10 15:07, schrieb Andreas Harder: > If one removes the blank line after \section{Section} the output is corre= ct, otherwise \TestSpace is ignored =85 > = \def\DefineSectionBlank {\dotripleempty\doDefineSectionBlank} \def\doDefineSectionBlank[#1][#2][#3]#4% {\edef\CurrentSection{#1}% \setvalue{#1:#2:\ifthirdargument\the\dimexpr#3\relax\fi}{#4}} \def\SectionBlank#1#2% {\edef\CurrentSection{#1}% = \executeifdefined{#1:#2:\LastSectionBlankSignal}{\executeifdefined{#1:#2:\t= he\dimexpr\zeropoint\relax}{\getvalue{#1:#2:}}}% \doif{#2}{after}{\SectionBlankSignal}} \let\LastSectionBlankSignal\zeropoint \EveryPar{\let\LastSectionBlankSignal\zeropoint} \def\SectionBlankSignal = {\setevalue{LastSectionBlankSignal}{\the\dimexpr\csname\CurrentSection = Signal\endcsname\relax}} % chapter \DefineSectionBlank [Chapter] [before] {\blank[force,48pt]} \DefineSectionBlank [Chapter] [after] {\blank[20pt]} \newsignal\ChapterSignal \setuphead [chapter] [before=3D\SectionBlank{Chapter}{before}, after=3D\SectionBlank{Chapter}{after}] % section \newsignal\SectionSignal \DefineSectionBlank [Section] [before] [\ChapterSignal] {\blank[18pt]} \DefineSectionBlank [Section] [before] {\blank[24pt]} \DefineSectionBlank [Section] [after] {\blank[18pt]} \setuphead [section] [before=3D\SectionBlank{Section}{before}, after=3D\SectionBlank{Section}{after}] \showgrid \starttext \chapter{Chapter} \section{Section} \chapter{Chapter}\edef\CurrentSection{Section}\SectionBlankSignal % tell = \section the last header was \section too! \section{Section} \chapter{Chapter} text \section{Section} \stoptext Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________