From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/77308 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: setupcaptions Date: Wed, 11 Jul 2012 22:29:39 +0200 Message-ID: <31B68740-277B-4339-990B-8FC8B8892908@gmail.com> References: <417A1BDF-52BD-44F8-98F0-0AC2259B111A@uva.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: multipart/mixed; boundary="===============1097720703==" X-Trace: dough.gmane.org 1342038596 17524 80.91.229.3 (11 Jul 2012 20:29:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 11 Jul 2012 20:29:56 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Jul 11 22:29:56 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sp3Xi-0005gD-IZ for gctc-ntg-context-518@m.gmane.org; Wed, 11 Jul 2012 22:29:50 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7A099101E5; Wed, 11 Jul 2012 22:29:49 +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 KoC1LsvBlJe7; Wed, 11 Jul 2012 22:29:47 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 969A21020A; Wed, 11 Jul 2012 22:29:47 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BD8391020A for ; Wed, 11 Jul 2012 22:29:46 +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 bVuEVCfD0ObK for ; Wed, 11 Jul 2012 22:29:45 +0200 (CEST) Original-Received: from filter2-utr.mf.surf.net (filter2-utr.mf.surf.net [195.169.124.153]) by balder.ntg.nl (Postfix) with ESMTP id 91F29101E5 for ; Wed, 11 Jul 2012 22:29:45 +0200 (CEST) Original-Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by filter2-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q6BKTiCM006770 for ; Wed, 11 Jul 2012 22:29:44 +0200 Original-Received: by wgbdt14 with SMTP id dt14so1124944wgb.2 for ; Wed, 11 Jul 2012 13:29:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; bh=rjU77eQdOcaj/3A+my7l6LTFSbQ90YdEP828hKz3QAY=; b=DNBAn8DOVcrFUI+SjCbsFojZzMkANF1YXZCl6uBOQK9dkTBnWH3tm4dqtI36viZw8h duFxOdjYNIcfnEJ0D9zR6GNnJLtMViisZb9pt7Ps4jXJb/XDxkCryHgFyr8A1WCuWgJg dXp2MvUWsbQS5MbD739yX+5gUyq+fU5tCcgc486XtClX1axHUED1oZtbtr/ZNvp7l7tW kmxrtaB6hMY36rHy0HhQ7PiWbiGNCLm8zriF3ZeQqj6XShr8Gp1FjQPtZOJFS2B/59VU qowZ1CNhcIEYCVgmpOM8ASFn/gVlLOqEjLhwtbPlbdlAFBs9UOa+8MrRY88dl3rzHGKi mtow== Original-Received: by 10.216.138.229 with SMTP id a79mr11580083wej.197.1342038584214; Wed, 11 Jul 2012 13:29:44 -0700 (PDT) Original-Received: from [192.168.2.36] (p54BAF58F.dip.t-dialin.net. [84.186.245.143]) by mx.google.com with ESMTPS id fb20sm7567990wid.1.2012.07.11.13.29.41 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 Jul 2012 13:29:43 -0700 (PDT) In-Reply-To: <417A1BDF-52BD-44F8-98F0-0AC2259B111A@uva.nl> X-Mailer: Apple Mail (2.1278) X-Bayes-Prob: 0.9999 (Score 4.7, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.45; 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: 04Hx8tIkk - 5969309d9715 - 20120711 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:77308 Archived-At: --===============1097720703== Content-Type: multipart/alternative; boundary="Apple-Mail=_F90FB6FD-AE75-4EDC-BEF1-425579875C64" --Apple-Mail=_F90FB6FD-AE75-4EDC-BEF1-425579875C64 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Am 11.07.2012 um 17:17 schrieb Meer, H. van der: > I want to make my figure captions both slanted and small, or bold and = small,etc. > The wiki has for setupcaptions: >=20 > headstyle normal, bold, .. , small, .. > style normal, bold, .. , small, .. >=20 > I therefore expected to work the following setup: >=20 > \setupcaptions[headstyle=3D{slanted,small},style=3D{bold,small}] > \starttext > \placefigure{A dummy figure}{\externalfigure[dummy]} > Caption test. > \stoptext >=20 > But no, two seems too much. style=3D{bold} does work and style=3D{small}= but style =3D {bold,small} does not. =46rom the general principles of = ConTeXt's parameter handling I would have expected this to work.=20 > Of course I could have used style=3D{\bf\switchtobodyfont[small]}, but = I would prefer to refrain from low level font commands when possible. >=20 > I am right the setupcaptions should work with combined fontsettings, = or is it my mistake? You misunderstand how named styles work. When you have style key (can be = style, textstyle etc.) for a command you can write =93style=3D\bf=94 and use the font switch as = argument. Another way to set the font is to use a name, e.g. =93style=3Dbold=94. The argument in this = case is a identifier which is defined as \definealternativestyle [\v!bold] = [\bf] [] As you can see =93bold=94 is only a synonym for \bf (with the third = argument you can specify what should happen when a command when the identifier is used in a heading, see = below for a example. \definehead[HeadA][section][style=3Dbold] \definehead[HeadB][section][style=3Ditalic] \starttext \HeadA{normal \style[style=3Ditalic]{italic} normal = \style[style=3Dbold]{bold} normal \style[style=3D\it]{it} normal = \style[style=3D\bf]{bf} normal} normal \style[style=3Ditalic]{italic} normal \style[style=3Dbold]{bold} = normal \style[style=3D\it]{it} normal \style[style=3D\bf]{bf} normal \HeadB{normal \style[style=3Ditalic]{italic} normal = \style[style=3Dbold]{bold} normal \style[style=3D\it]{it} normal = \style[style=3D\bf]{bf} normal} normal \style[style=3Ditalic]{italic} normal \style[style=3Dbold]{bold} = normal \style[style=3D\it]{it} normal \style[style=3D\bf]{bf} normal =20 \stoptext Having a list as argument for the style key is interesting and you have = my vote for this but it would be more complex and slower than the current mechanism. Wolfgang= --Apple-Mail=_F90FB6FD-AE75-4EDC-BEF1-425579875C64 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252
I want to make my figure captions both slanted = and small, or bold and small,etc.
The wiki has for setupcaptions:

headstyle normal, bold, .. , small, ..
style     normal, bold, .. , small, ..

I therefore expected to work the following setup:

\setupcaptions[headstyle=3D{slanted,small},style=3D{bold,small}]
\starttext
\placefigure{A dummy figure}{\externalfigure[dummy]}
Caption test.
\stoptext

But no, two seems too much. style=3D{bold} does work and style=3D{small} = but style =3D {bold,small} does not. =46rom the general principles of = ConTeXt's parameter handling I would have expected this to work.
Of course I could have used style=3D{\bf\switchtobodyfont[small]}, but I = would prefer to refrain from low level font commands when possible.

I am right the setupcaptions should work with combined fontsettings, or = is it my = mistake?

Yo= u misunderstand how named styles work. When you have style key (can be = style, textstyle etc.)
for a command you can write =93style=3D\b= f=94 and use the font switch as argument. Another way to = set
the font is to use a name, e.g. =93style=3Dbold=94. The = argument in this case is a identifier which is defined = as

  \definealternativestyle = [\v!bold]                   =                 [\bf] = []

As you can see =93bold=94 is only a synonym = for \bf (with the third argument you can specify what = should
happen when a command when the identifier is used in a = heading, see below for a = example.

\definehead[HeadA][section][style=3Dbold= ]
\definehead[HeadB][section][style=3Ditalic]

\starttext

\HeadA{normal = \style[style=3Ditalic]{italic} normal \style[style=3Dbold]{bold} normal = \style[style=3D\it]{it} normal \style[style=3D\bf]{bf} = normal}

normal \style[style=3Ditalic]{italic} = normal \style[style=3Dbold]{bold} normal \style[style=3D\it]{it} normal = \style[style=3D\bf]{bf} normal

\HeadB{normal = \style[style=3Ditalic]{italic} normal \style[style=3Dbold]{bold} normal = \style[style=3D\it]{it} normal \style[style=3D\bf]{bf} = normal}

normal \style[style=3Ditalic]{italic} = normal \style[style=3Dbold]{bold} normal \style[style=3D\it]{it} normal = \style[style=3D\bf]{bf} normal
=  
\stoptext


= Having a list as argument for the style key is interesting and you have = my vote for this but it would
be more complex and slower than = the current = mechanism.

Wolfgang
= --Apple-Mail=_F90FB6FD-AE75-4EDC-BEF1-425579875C64-- --===============1097720703== 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 ___________________________________________________________________________________ --===============1097720703==--