From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95740 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: How to define section with midaligned number and midaligned text? Date: Tue, 09 Aug 2016 22:50:05 +0200 Message-ID: <57AA41FD.3020305@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0993278729067646156==" X-Trace: blaine.gmane.org 1470775851 10818 195.159.176.226 (9 Aug 2016 20:50:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 9 Aug 2016 20:50:51 +0000 (UTC) User-Agent: Postbox 4.0.8 (Macintosh/20151105) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 09 22:50:47 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXDz5-0002gN-7d for gctc-ntg-context-518@m.gmane.org; Tue, 09 Aug 2016 22:50:47 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3925E14A7D; Tue, 9 Aug 2016 22:50:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GScyF6FQtGdW; Tue, 9 Aug 2016 22:50:23 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 9265214A7B; Tue, 9 Aug 2016 22:50:23 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id EEFBD14A77 for ; Tue, 9 Aug 2016 22:50:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GHGoXgBP3mKC for ; Tue, 9 Aug 2016 22:50:20 +0200 (CEST) Original-Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 84C3F14A76 for ; Tue, 9 Aug 2016 22:50:10 +0200 (CEST) Original-Received: by mail-wm0-f53.google.com with SMTP id q128so56012365wma.1 for ; Tue, 09 Aug 2016 13:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=Mbaedxf0giEhMmdscsuc4jbbtku9niu7+7rWkh7MAio=; b=Othu9qjnRTi6i2uEReu6qiNVt9AOMcC7Hzu3i8w3yGmNscWQ/Af+XCoyMJMhH88qCA GtVtMIHob0ri9q+YE41mfIK6G1ym1Letd9JG4Zy5rZmCrBtOtv1EY6As/FF+9VC4j9yo ry0jzgiFE+2qo+eUEifBhy63R3mxTFmK0PWhn6O1B0hr5nP4+vnrjsFO1C2AYcdlOogj F7NMPMkSlH/n4zvMBgO0n5cZT7O/UXKUdOpUk2C3lkyVY/akCBQWMSndG4HWMC6Vpm3+ /JsHSuoZ5laBhX/2ks5umf1m3npbMs/V15sux0ixmG/UCdzxfgD3M5xTuvNe8G3WvzO2 5SBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=Mbaedxf0giEhMmdscsuc4jbbtku9niu7+7rWkh7MAio=; b=cYMc60BydZa7OOkFfglc3fuXbp2jzRRuEZfpgSypyVbH7ARcmbLJ+Exdsks4p+0tH5 SK0RLpUlKNQOfhioWMwPDrhizeSCFDamE5+ulGIjyopMnL0jPgeQqpjWbD187izhZ531 qyJ5oTUtaydMvUqfvG+tLq/ymK15Tsj1ZjqS+9l0+OQD2Z/wJ1+3QHQ/3BQiytX2MjtJ oQ7RQdj65mXy3nc2GQYh5LkhtQfcaqiLO/6Zfze4vbQiED6Jj11r1bwE9watV7OcvZHs 87aNeO/TFy3mlsrSowdKskrDx0qwr/6YVyJoF5efTNtKs6BdPLcti/XshXSXnekXvcIb Ty6g== X-Gm-Message-State: AEkooutkIiNOpwJqPgJUNBIvw5nlyBKJlM4fNH2Z8ubrag0rEbibzDovDonOV995tFEvlw== X-Received: by 10.28.232.149 with SMTP id f21mr888650wmi.51.1470775808530; Tue, 09 Aug 2016 13:50:08 -0700 (PDT) Original-Received: from keima.localdomain (x2f2864a.dyn.telefonica.de. [2.242.134.74]) by smtp.gmail.com with ESMTPSA id g7sm39660389wjx.10.2016.08.09.13.50.07 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Aug 2016 13:50:07 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:95740 Archived-At: This is a multi-part message in MIME format. --===============0993278729067646156== Content-Type: multipart/alternative; boundary="------------040806050102070101070703" This is a multi-part message in MIME format. --------------040806050102070101070703 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit > Lukáš Procházka > 9. August 2016 um 22:43 > Hello, > > I need to produce a \section with midaligned number and midaligned > text bellow the number, like: > > |<--------- text width ---------->| > " > > I. > Section > > Bla bla > ... > " > > I tried this: > > ---- > \define[2]\Sec{\midaligned{#1.}\midaligned{#2}} > > \setuphead[section][command=\Sec,conversion=R] > > \starttext > \section{Section} > \stoptext > ---- > > but it seems that text "Section" is shifted out somewhere... > > How to \setuphead[section] in a proper way? \setuphead[section][alternative=middle,conversion=R,sectionstopper=.] \starttext \section{Section} \stoptext Wolfgang --------------040806050102070101070703 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
9. August 2016 um 22:43
Hello,

I need to produce a \section with midaligned number and midaligned text bellow the number, like:

|<--------- text width ---------->|
"

                I.
             Section

Bla bla
...
"

I tried this:

----
\define[2]\Sec{\midaligned{#1.}\midaligned{#2}}

\setuphead[section][command=\Sec,conversion=R]

\starttext
  \section{Section}
\stoptext
----

but it seems that text "Section" is shifted out somewhere...

How to \setuphead[section] in a proper way?
\setuphead[section][alternative=middle,conversion=R,sectionstopper=.]

\starttext
  \section{Section}
\stoptext

Wolfgang
--------------040806050102070101070703-- --===============0993278729067646156== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============0993278729067646156==--