From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/90211 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: \setupcaptions question Date: Fri, 13 Feb 2015 04:54:58 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/mixed; boundary="===============2019160705==" X-Trace: ger.gmane.org 1423799759 3765 80.91.229.3 (13 Feb 2015 03:55:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Feb 2015 03:55:59 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Feb 13 04:55:41 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 1YM7Lw-0004xW-1R for gctc-ntg-context-518@m.gmane.org; Fri, 13 Feb 2015 04:55:40 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5821210230 for ; Fri, 13 Feb 2015 04:55:39 +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 Y8vVh0UUcrXt for ; Fri, 13 Feb 2015 04:55:38 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id F08A31023A for ; Fri, 13 Feb 2015 04:55:10 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 13633101E8 for ; Fri, 13 Feb 2015 04:55:05 +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 NnNvux9EkmzU for ; Fri, 13 Feb 2015 04:55:03 +0100 (CET) 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 1B79B101E6 for ; Fri, 13 Feb 2015 04:55:03 +0100 (CET) Original-Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t1D3t2Ts032660 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 13 Feb 2015 04:55:02 +0100 Original-Received: by mail-wi0-f176.google.com with SMTP id h11so9053219wiw.3 for ; Thu, 12 Feb 2015 19:55:02 -0800 (PST) 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=KUeSyj8KoLAz1TC3yRgGdgTrTBOK9X/PB7eSPuDvIqQ=; b=tN5UgY7CPwSGXacYnjWr/qy2XE2Egssui6pdEmHoZoyjL1tlhFJiZ6Vs26lLV7MYT+ HxNM+zO6Qj8OOrOB3zF568XvskFPTycoC1vodA4Jvwf3geExNtDVeEKD924hlif2O7xY IIeSJcaktblUl/jid8DKV/Y1a+WMh0mc5soZ0Vxl2JKR47q/0lLe+VhaBvqBk0hqmhSW hPbX5TjBdNXoCeIYvadDR9A/5Pv7NRGiZ/Dj3AbdA7gkgGDRkxkkhxyLSsW6Q+Fw7gNf Pj+TA0zzaKEUFnVTeXbuXr1wwc0b1TZN5puDRuMaf9xj0zDeeBb2JHFgyaD4DVu2fblA USpA== X-Received: by 10.180.221.73 with SMTP id qc9mr2887668wic.8.1423799701925; Thu, 12 Feb 2015 19:55:01 -0800 (PST) Original-Received: from keima.localdomain (x2f296e5.dyn.telefonica.de. [2.242.150.229]) by mx.google.com with ESMTPSA id u9sm8212406wjy.37.2015.02.12.19.54.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Feb 2015 19:55:01 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.2070.6) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c05::230; 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: 07NPDT2Ko - 7964a5b25415 - 20150213 (trained as not-spam) Received-SPF: pass (filter1-utr.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c05::230 as permitted sender) receiver=filter1-utr.mf.surf.net; client-ip=2a00:1450:400c:c05::230; envelope-from=; helo=mail-wi0-x230.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:90211 Archived-At: --===============2019160705== Content-Type: multipart/alternative; boundary="Apple-Mail=_994CC2C8-6714-43A3-B62D-110C6E1283A1" --Apple-Mail=_994CC2C8-6714-43A3-B62D-110C6E1283A1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Am 12.02.2015 um 23:14 schrieb j. van den hoff = : >=20 >>> On 12 Feb 2015, at 22:31, Wolfgang Schuster = wrote: >>>=20 >>>=20 >>>> Am 12.02.2015 um 17:37 schrieb j. van den hoff = : >>>>=20 >>>>=20 >>>> I want to use `numberstopper' for figure caption customization like = so: >>>>=20 >>>> \setupcaptions[numberstopper=3D{:}] >>>>=20 >>>> this works fine for the caption itself (i.e. I get, e.g. "Figure 1: >>>> caption text") _but_ >>>> references to the figure via a defined label such as [fig:example] >>>> in the body text do include the numberstopper, too, which is highly >>>> undesirable in my view, since, e.g., >>>>=20 >>>> "... see Figure 1: for an example. ..." >>>>=20 >>>> should rather read >>>>=20 >>>> "... see Figure 1 for an example. ..." >>>>=20 >>>> i.e. the numberstopper should be omitted (at least optionally) when >>>> referencing. >>>>=20 >>>> question: how can this be achieved? >>>=20 >>>=20 >>> Can you make a example because I can=E2=80=99t reproduce the problem = you describe. >=20 > I have done that right now (problem definitely there) but then looked = at the difference between my syntax > and yours. I used something like >=20 > \setupexternalfigures [directory=3D{.}] > \setupcaption[width=3D.95\textwidth, location=3Dbottom, = numberstopper=3D{:}] >=20 > \starttext > An illustration of this process is given in Fig.~\in[fig:convosim]. > .... > \stoptext >=20 > changing the referencing to >=20 > An illustration of this process is given in Fig.~\at[fig:convosim]. >=20 > i.e. replacing `\in' by `\at' resolves the issue. I'm rather new to = context and was under the impression that `\in' is the > context equivalent of latex's \ref and was not aware of \at at all. > but this seems only partly true. can you give me a pointer where best = to look up the > differences between `\in' and `\at'? >=20 > so it seems I need to use \at for referencing figures, at least when = numberstopper is not empty? ok, so be it .... No, you=E2=80=99re right. I used the wrong command (\at is used to show = the page where to float was placed) and so far there is only a workaround for this problem. What you can do = is to use the =E2=80=9Csuffix=E2=80=9D key to set a stopper for the caption which will only appear in the caption itself. \setupexternalfigure[location=3Ddefault] \setupcaption[figure][suffix=3D:] \starttext Take a look at \in{picture}[fig:cow] below. \startplacefigure[reference=3Dfig:cow,title=3DA dutch cow] \externalfigure[cow] \stopplacefigure \stoptext This solution is far from perfect because normally the suffix key is = used for the internal counter of split floats, e.g. when a numbered table is split over several tables = and you get numbers label =E2=80=9ETable 3.a=E2=80=9D etc. Wolfgang= --Apple-Mail=_994CC2C8-6714-43A3-B62D-110C6E1283A1 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Am 12.02.2015 um 23:14 schrieb j. van den hoff <veedeehjay@googlemail.com>:

On 12 Feb 2015, at = 22:31, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:


Am = 12.02.2015 um 17:37 schrieb j. van den hoff <veedeehjay@googlemail.com>:


I want to use `numberstopper' for figure = caption customization like so:

\setupcaptions[numberstopper=3D{:}]

this works fine for the caption itself (i.e. I get, e.g. = "Figure 1:
caption text") _but_
references = to the figure via a defined label such as [fig:example]
in = the body text do include the numberstopper, too, which is highly
undesirable in my view, since, e.g.,

"... see Figure 1: for an example. ..."

should rather read

"... see = Figure 1 for an example. ..."

i.e. the = numberstopper should be omitted (at least optionally) when
referencing.

question: how can = this be achieved?


Can you make a example because I can=E2=80=99t reproduce the = problem you describe.

I have done that right now (problem definitely = there) but then looked at the difference between my syntax
and yours. I used something like

\setupexternalfigures [directory=3D{.}]
\setupcaption[width=3D.95\textwidth, = location=3Dbottom, numberstopper=3D{:}]

\starttext
An illustration of this process is given in = Fig.~\in[fig:convosim].
....
\stoptext

changing the referencing to

An illustration of this process is given in = Fig.~\at[fig:convosim].

i.e. replacing `\in' by = `\at' resolves the issue. I'm rather new to context and was under the = impression that `\in' is the
context equivalent of = latex's \ref and was not aware of \at at all.
but this seems only partly true. can you give me = a pointer where best to look up the
differences between `\in' and `\at'?

so it seems I need to use \at for referencing = figures, at least when numberstopper is not empty? ok, so be it = ....

No, = you=E2=80=99re right. I used the wrong command (\at is used to show the = page where to float was placed)
and so far there is = only a workaround for this problem. What you can do is to use the = =E2=80=9Csuffix=E2=80=9D key to set
a stopper for = the caption which will only appear in the caption itself.


\setupexternalfigure[location=3Ddefault]

\setupcaption[figure][suffix=3D:]

\starttext

Take a look at \in{picture}[fig:cow] = below.

\startplacefigure[reference=3Dfig:cow,title=3DA dutch = cow]
  \externalfigure[cow]
\stopplacefigure

\stoptext


This solution is far = from perfect because normally the suffix key is used for the internal = counter
of split floats, e.g. when a numbered table = is split over several tables and you get numbers label
=E2=80=9ETable 3.a=E2=80=9D etc.

Wolfgang
= --Apple-Mail=_994CC2C8-6714-43A3-B62D-110C6E1283A1-- --===============2019160705== 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= --===============2019160705==--