From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/91765 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: \setuphead[part] - special look Date: Tue, 23 Jun 2015 16:28:46 +0200 Message-ID: <55896D1E.8070809@gmail.com> References: <5587CCA2.9010806@gmail.com> <55883973.1010502@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0666531377==" X-Trace: ger.gmane.org 1435069824 19105 80.91.229.3 (23 Jun 2015 14:30:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Jun 2015 14:30:24 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jun 23 16:30:09 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z7PCe-0002q4-DY for gctc-ntg-context-518@m.gmane.org; Tue, 23 Jun 2015 16:29:32 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5EBA61021E for ; Tue, 23 Jun 2015 16:29:31 +0200 (CEST) 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 z3OsjwSXrYW2 for ; Tue, 23 Jun 2015 16:29:30 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 903EE10233 for ; Tue, 23 Jun 2015 16:28:55 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6AB8F101FB for ; Tue, 23 Jun 2015 16:28:52 +0200 (CEST) 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 3uFropW1G46M for ; Tue, 23 Jun 2015 16:28:51 +0200 (CEST) Original-Received: from filter3-utr.mf.surf.net (filter3-utr.mf.surf.net [195.169.124.154]) by balder.ntg.nl (Postfix) with ESMTP id 67DAC101E6 for ; Tue, 23 Jun 2015 16:28:51 +0200 (CEST) Original-Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) by filter3-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t5NESmN3015938 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Tue, 23 Jun 2015 16:28:49 +0200 Original-Received: by wicnd19 with SMTP id nd19so107713281wic.1 for ; Tue, 23 Jun 2015 07:28:48 -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:content-type; bh=qJ75waphUjShlqM11CpmUP9d3/CeQBPuWlMdp/0/xQU=; b=klLx0bv63I7j0TQsYifASco11t7jtTXu48GBH7DIsMA6upSPd9+uUPlVI90p+40jlN 7ShO+6Rs62VF+MdKVCMNalsWFlZx4wvYovQWGf5HiyGyf0rqOHyHP1/bd6VE3Pldwdxg zQsZDxaamOal0hQffbZQL1KzaUtzOLu1YgIHbBCKRj0Kx7N5SEwNO42mFe99oHKOWWCe 4iC9cq+IVNEOxnO2pjqA1RdcKOJZpmrStHInQU4jYPrLRXFZBQwAi7/wF2AHWaE9OKQK wmfNSMT0JoQC4tXthjLb2nrMK+c3oVMbGtoufF6D+3W4acG4qFc67NRbHLVp1J2tMKqe K6cw== X-Received: by 10.181.11.137 with SMTP id ei9mr3947048wid.48.1435069728797; Tue, 23 Jun 2015 07:28:48 -0700 (PDT) Original-Received: from keima.localdomain (x2f3405c.dyn.telefonica.de. [2.243.64.92]) by mx.google.com with ESMTPSA id ei8sm35997480wjd.32.2015.06.23.07.28.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Jun 2015 07:28:48 -0700 (PDT) User-Agent: Postbox 4.0.1 (Macintosh/20150514) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c05::234; country=BE; region=Brussels Capital; city=Brussels; latitude=50.8466; longitude=4.3528; http://maps.google.com/maps?q=50.8466,4.3528&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08OHOsNNT - 48eef20cb267 - 20150623 (trained as not-spam) Received-SPF: pass (filter3-utr.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c05::234 as permitted sender) receiver=filter3-utr.mf.surf.net; client-ip=2a00:1450:400c:c05::234; envelope-from=; helo=mail-wi0-x234.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) 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:91765 Archived-At: This is a multi-part message in MIME format. --===============0666531377== Content-Type: multipart/alternative; boundary="------------030306010400010803020205" This is a multi-part message in MIME format. --------------030306010400010803020205 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: quoted-printable > Proch=E1zka Luk=E1=B9 Ing. - Pontex s. r. o. > 23. Juni 2015 09:45 > Hello, > > I'm really satisfied with the way you coded the part page layout. > > I've modified a bit your code - just to highlight the dependencies=20 > (rendering setup, makeup and so on; if anyone interested, see the=20 > attachment). You can drop the \definebodyfontenvironment line when you use=20 \definefont to set the part fonts, e.g. \definefont[PartText][SerifBold sa 5] \setuphead[part][textstyle=3DPartText] > On Mon, 22 Jun 2015 18:36:03 +0200, Wolfgang Schuster=20 > wrote: > >> This method to set your own layout is also used by other command (e.g. >> the list mechanism used for the table of contents) and the >> \defineheadplacement has also a alternative key which is needed when y= ou >> want an inline heading (e.g. \setuphead[...][alternative=3Dtext]). > > ... > >> The necessary key would be endless with each new layout and with the >> \defineheadplacement command to create your own without adding >> additional keys but you can also use the command key instead of >> \defineheadplacement. The advantage of \defineheadplacement is that yo= u >> can better structure the code in the setups environment because you >> don't have to worry about spaces. >> >> Wolfgang > > As "\defineheadplacement" is concerned: > > You mentioned this command in your response, but=20 > "\defineheadplacement" is used nowhere in your code and there is no=20 > info about on wiki. > > Could you provide a MWE how \defineheadplacement is supposed to be used= ? You shouldn't use it because Hans kept it only for backwards=20 compatibility and \defineheadplacement is the better alternative. You=20 can also use the same rendering (the content of the setups environment)=20 for different head alternatives where you set the differences with the=20 \defineheadalternative command. % HeadA \defineheadplacement[HeadA][vertical]#1#2% {\startframedtext #1\quad #2% \stopframedtext} \definehead[HeadA][section][alternative=3DHeadA] % HeadB \defineheadalternative[HeadB][renderingsetup=3DHeadB] % alternative=3Dver= tical \startsetups[HeadB] \startframedtext \headnumbercontent \qquad \headtextcontent \stopframedtext \stopsetups \definehead[HeadB][section][alternative=3DHeadB] \starttext \HeadA{Knuth} \input knuth \HeadB{Tufte} \input tufte \stoptext Wolfgang --------------030306010400010803020205 Content-Type: text/html; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable
= =20 23. Juni 2015=20 09:45
Hello,

I'm really satisfied with the way you coded the part page layout.

I've modified a bit your code - just to highlight the dependencies=20 (rendering setup, makeup and so on; if anyone interested, see the=20 attachment).
You can drop the \definebodyfontenvironment line when you use=20 \definefont to set the part fonts, e.g.

\definefont[PartText][SerifBold sa 5]
\setuphead[part][textstyle=3DPartText]

On Mon, 22 Jun 2015 18:36:03= =20 +0200, Wolfgang Schuster <schuster.wolfgang@gmail.com> wr= ote:

This method to set your own layout is also=20 used by other command (e.g.
the list mechanism used for the table of contents) and the
\defineheadplacement has also a alternative key which is needed when you
want an inline heading (e.g. \setuphead[...][alternative=3Dtext]).

...

The necessary key would be endless with eac= h new layout and with the
\defineheadplacement command to create your own without adding
additional keys but you can also use the command key instead of
\defineheadplacement. The advantage of \defineheadplacement is that=20 you
can better structure the code in the setups environment because you
don't have to worry about spaces.

Wolfgang

As "\defineheadplacement" is concerned:

You mentioned this command in your response, but=20 "\defineheadplacement" is used nowhere in your code and there is no info about on wiki.

Could you provide a MWE how \defineheadplacement is supposed to be=20 used?
You shouldn’t use it because Hans kept it only for backwards=20 compatibility and \defineheadplacement is the better alternative. You=20 can also use the same rendering (the content of the setups environment)=20 for different head alternatives where you set the differences with the=20 \defineheadalternative command.

% HeadA

\defineheadplacement[HeadA][vertical]#1#2%
=A0 {\startframedtext
=A0=A0=A0=A0 #1\quad #2%
=A0=A0 \stopframedtext}

\definehead[HeadA][section][alternative=3DHeadA]

% HeadB

\defineheadalternative[HeadB][renderingsetup=3DHeadB] %=20 alternative=3Dvertical

\startsetups[HeadB]
=A0 \startframedtext
=A0=A0=A0 \headnumbercontent \qquad \headtextcontent
=A0 \stopframedtext
\stopsetups

\definehead[HeadB][section][alternative=3DHeadB]

\starttext

\HeadA{Knuth}

\input knuth

\HeadB{Tufte}

\input tufte

\stoptext

Wolfgang
--------------030306010400010803020205-- --===============0666531377== 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= --===============0666531377==--