From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/90947 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: caption setup Date: Thu, 9 Apr 2015 13:37:42 +0200 Message-ID: <7DE81D2C-13CC-48EE-A3E7-B6E414B73C6A@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/mixed; boundary="===============2124388669==" X-Trace: ger.gmane.org 1428579520 13175 80.91.229.3 (9 Apr 2015 11:38:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Apr 2015 11:38:40 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 09 13:38:26 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 1YgAmv-0008Uq-JJ for gctc-ntg-context-518@m.gmane.org; Thu, 09 Apr 2015 13:38:25 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 734B51026F for ; Thu, 9 Apr 2015 13:38:19 +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 EKY8PI7q6vZ9 for ; Thu, 9 Apr 2015 13:38:18 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id F30E41027A for ; Thu, 9 Apr 2015 13:37:51 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 14FB010206 for ; Thu, 9 Apr 2015 13:37:48 +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 3KBzc-d-UfBr for ; Thu, 9 Apr 2015 13:37:47 +0200 (CEST) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id E9E5B101E8 for ; Thu, 9 Apr 2015 13:37:46 +0200 (CEST) Original-Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com [IPv6:2a00:1450:400c:c00::231]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t39BbjWp007829 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 9 Apr 2015 13:37:45 +0200 Original-Received: by wgsk9 with SMTP id k9so94529416wgs.3 for ; Thu, 09 Apr 2015 04:37:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=GtaYtmtGWN34Z6HkFdufumU4UnSTKdG7uAebhwJfwrE=; b=QRuSO+kNI4spNvowK/ISkD/t5fBwr7ffufOxOa5UJ24IrbKAru+VFamO3bf+4w030S MMlOfCHbW7cCkrrp3MLjWHSFr7TPOzLZo3MnI4sDNsrERHO1F04tkmvJzS3fdY3nv+de w+D0SUokhJ7ehB3YJnlW6YB03e4z+eZEVSUW1F7Ds6zwAU/vd0XwDC9CChoTbYyCXSgb 0Qxm5CjwkD9f66AmgI31ueT7MytMKTpYxaFV8sF3PVacAkd88eRfg08l55rcp/3+x/2x DEkxIFZrCuan3ZO9r575HY42EcsG8t4KKT1MP50rXHxzj3AeUNYpStPolaSWo1qQYvwS T8HA== X-Received: by 10.180.85.9 with SMTP id d9mr5599914wiz.28.1428579465157; Thu, 09 Apr 2015 04:37:45 -0700 (PDT) Original-Received: from keima.localdomain (x2f25690.dyn.telefonica.de. [2.242.86.144]) by mx.google.com with ESMTPSA id kr5sm19735008wjc.1.2015.04.09.04.37.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 Apr 2015 04:37:44 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.2098) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c00::231; country=IE; latitude=53.3478; longitude=-6.2597; http://maps.google.com/maps?q=53.3478,-6.2597&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07OdLBJ3I - 4eab68c84c6d - 20150409 (trained as not-spam) Received-SPF: pass (filter1-utr.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c00::231 as permitted sender) receiver=filter1-utr.mf.surf.net; client-ip=2a00:1450:400c:c00::231; envelope-from=; helo=mail-wg0-x231.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:90947 Archived-At: --===============2124388669== Content-Type: multipart/alternative; boundary="Apple-Mail=_8FE00DD7-3483-4782-BDAD-8AB5BCAC022F" --Apple-Mail=_8FE00DD7-3483-4782-BDAD-8AB5BCAC022F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Am 09.04.2015 um 13:14 schrieb Csikos Bela : >=20 > Wolfgang Schuster =C3=ADrta: >>=20 >>> Am 09.04.2015 um 00:13 schrieb Csikos Bela: >>>=20 >>> Hello: >>>=20 >>> I have to setup caption formatting for Hungarian. >>> In Hungarian I have to write "#. figure." instead of "Figure #:" >>> The exact word for "figure" is "=C3=A1bra", so what I want exactly = is: >>> "# =C3=A1bra.", eg "1. =C3=A1bra". >>> How can I do it? (If I set the document language to Hungarian, the >>> word "=C3=A1bra" is shown correctly but the order is not correct; I = get ,. =C3=A1bra:#.) >>=20 >> Until the labels for hungarian are fixed you can use the = \setuplabeltext command >> to set the right labels. >>=20 >>> Another question: for caption text I want it to be justified and the = last line of the caption >>> centered. How can I do that? >>=20 >> \useMPlibrary[dum] >>=20 >> \mainlanguage[hu] >>=20 >> \setupcaption[figure][align=3Dlast,numberstopper=3D.] >>=20 >> \setuplabeltext[hu][figure=3D{, =C3=A1bra}] >>=20 >> \starttext >>=20 >> \startplacefigure[title=3D\input{ward}] >> \externalfigure[dummy] >> \stopplacefigure >>=20 >> \stoptext >>=20 >> Wolfgang >=20 > Wolfgang, Otared: >=20 > Thank you both for your suggestions. Unfortunately the caption = modification works only partially. I could not make both the caption = labels and the references look correct. >=20 > When I use Wolfgang's example, I get the following: attachment file = caption-example-2.pdf. >=20 > I also tried different settings for caption label, here is the code: >=20 > ------------------------------------------------ >=20 > \starttext >=20 > \setupcaption[figure][numberstopper=3D{. =C3=A1bra.}] > \setuplabeltext[figure=3D{}] >=20 > Code: >=20 > \verbatim{\setupcaption[figure][numberstopper=3D{. =C3=A1bra.}]} \par > \verbatim{\setuplabeltext[figure=3D{}]} >=20 > Result: >=20 > Reference to figure 1 (\in{figure}[figure-1]) >=20 > \placefigure[][figure-1]{This is the caption}{\framed{Some figure}} >=20 > \hairline >=20 > \setupcaption[figure][suffix=3D{. =C3=A1bra},numberstopper=3D{.}] > \setuplabeltext[figure=3D{}] >=20 > Code: >=20 > \verbatim{\setupcaption[figure][suffix=3D{. =C3=A1bra},numberstopper=3D{= .}]} \par > \verbatim{\setuplabeltext[figure=3D{}]} >=20 > Result: >=20 > Reference to figure 2 (\in{figure}[figure-2]) >=20 > \placefigure[][figure-2]{This is the caption}{\framed{Another figure}} >=20 > \hairline >=20 > The caption should be: ``1. =C3=A1bra. This is the caption'' >=20 > The reference should be: ``(1. =C3=A1bra)'' -- NO period after = ``=C3=A1bra'', without the word ``figure''. >=20 > \stoptext >=20 > = ------------------------------------------------------------------------ >=20 > I attach the generated pdf output: caption-example.pdf >=20 > Unfortunately none of the above code variants gives the correct = result. > Despite of the bad "wording" I don't understand why numberstopper (.) > doesn't appear after suffix (. =C3=A1bra) in figure 2. >=20 > Any way to fix these? The \setupcaption command needs a numbercommand key which can be used to = set \setupcaption[numbercommand=3D\groupedcommand{}{=E2=80=A6}] > The alignment=3Dlast option works. (This option is not mentioned among = the options at the contextgarden wiki site, = http://wiki.contextgarden.net/Command/setupcaptions.) Take a look at the \setupalign page: = http://wiki.contextgarden.net/Command/setupalign = Wolfgang= --Apple-Mail=_8FE00DD7-3483-4782-BDAD-8AB5BCAC022F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Am 09.04.2015 um 13:14 schrieb Csikos Bela <bcsikos425@freemail.hu>:

Wolfgang Schuster = =C3=ADrta:

Am 09.04.2015 um 00:13 = schrieb Csikos Bela:

Hello:
I have to setup caption formatting for Hungarian.
In Hungarian I have to write "#. figure." instead of "Figure = #:"
The exact word for "figure" is "=C3=A1bra", so what I = want exactly is:
"# =C3=A1bra.", eg "1. =C3=A1bra".
How can I do it? (If I set the document language to = Hungarian, the
word "=C3=A1bra" is shown correctly but the = order is not correct; I get ,. =C3=A1bra:#.)

Until the labels for hungarian = are fixed you can use the \setuplabeltext command
to set = the right labels.

Another question: for caption text I want it to be justified = and the last line of the caption
centered. How can I do = that?

\useMPlibrary[dum]

\mainlanguage[hu]

\setupcaption[figure][align=3Dlast,numberstopper=3D.]

\setuplabeltext[hu][figure=3D{, =C3=A1bra}]

\starttext

\startplacefigure[title=3D\input{ward}]
= \externalfigure[dummy]
\stopplacefigure

\stoptext

Wolfgang

Wolfgang, = Otared:

Thank you both for your = suggestions. Unfortunately the caption modification works only = partially. I could not make both the caption labels and the references = look correct.

When I use Wolfgang's = example, I get the following: attachment file caption-example-2.pdf.

I also tried different settings for caption = label, here is the code:

------------------------------------------------

\starttext

\setupcaption[figure][numberstopper=3D{. =C3=A1bra.}]
\setuplabeltext[figure=3D{}]

Code:

\verbatim{\setupcaption[figure][numberstopper=3D{. =C3=A1bra.}]= } \par
\verbatim{\setuplabeltext[figure=3D{}]}

Result:

Reference = to figure 1 (\in{figure}[figure-1])

\placefigure[][figure-1]{This is the caption}{\framed{Some = figure}}

\hairline

\setupcaption[figure][suffix=3D{. = =C3=A1bra},numberstopper=3D{.}]
\setuplabeltext[figure=3D{}]

Code:

\verbatim{\setupcaption[figure][suffix=3D{. = =C3=A1bra},numberstopper=3D{.}]} \par
\verbatim{\setuplabeltext[figure=3D{}]}

Result:

Reference to figure 2 = (\in{figure}[figure-2])

\placefigure[][figure-2]{This is the caption}{\framed{Another = figure}}

\hairline

The caption should be: ``1. =C3=A1bra. This is the = caption''

The reference should be: ``(1. = =C3=A1bra)'' -- NO period after ``=C3=A1bra'', without the word = ``figure''.

\stoptext

---------------------------------------------------------------= ---------

I attach the generated pdf = output: caption-example.pdf

Unfortunately = none of the above code variants gives the correct result.
Despite of the bad "wording" I don't understand why = numberstopper (.)
doesn't appear after suffix (. =C3=A1bra) = in figure 2.

Any way to fix these?

The = \setupcaption command needs a numbercommand key which can be used to = set

  =  \setupcaption[numbercommand=3D\groupedcommand{}{=E2=80=A6}]

The alignment=3Dlast option works. (This option is not = mentioned among the options at the contextgarden wiki site, http://wiki.contextgarden.net/Command/setupcaptions.)

Take = a look at the \setupalign page: http://wiki.contextgarden.net/Command/setupalign

Wolfgang
= --Apple-Mail=_8FE00DD7-3483-4782-BDAD-8AB5BCAC022F-- --===============2124388669== 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= --===============2124388669==--