From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80384 Path: news.gmane.org!not-for-mail From: Devendra Ghate Newsgroups: gmane.comp.tex.context Subject: Referencing a figure Date: Tue, 22 Jan 2013 15:36:52 +0530 Message-ID: <50FE64BC.8070308@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0486220473==" X-Trace: ger.gmane.org 1358849233 8277 80.91.229.3 (22 Jan 2013 10:07:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jan 2013 10:07:13 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 22 11:07:32 2013 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 1TxalN-0003am-4O for gctc-ntg-context-518@m.gmane.org; Tue, 22 Jan 2013 11:07:29 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A288E101F2; Tue, 22 Jan 2013 11:07:11 +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 k+HAXaJv2uJN; Tue, 22 Jan 2013 11:07:10 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id DCE3E101E6; Tue, 22 Jan 2013 11:07:09 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EDAD1101E6 for ; Tue, 22 Jan 2013 11:07:07 +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 Yh67ed30HYa0 for ; Tue, 22 Jan 2013 11:07:06 +0100 (CET) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id 7AC11101E5 for ; Tue, 22 Jan 2013 11:07:06 +0100 (CET) Original-Received: from mail-da0-f54.google.com (mail-da0-f54.google.com [209.85.210.54]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r0MA73pl022133 for ; Tue, 22 Jan 2013 11:07:04 +0100 Original-Received: by mail-da0-f54.google.com with SMTP id n2so3187357dad.41 for ; Tue, 22 Jan 2013 02:07:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :content-type; bh=7O1rKRrk8TfaEHmvFW0GbzJRbXjxNPKGAeuf1bVHKDw=; b=N5iq6STivjQRDh1wk6sFR/dajWydQYbQVAcQBgQcM3PxwkXw2eUOrwxkddd0EZAdun TWgMRQ+AI1RgcbdVDbaVZwnb39ypQpPJDt1Ur2NgPvLCgCS4Msd9GgVih+OQKjwwnPYD TJ/U9Y53SFkVb8ddmP+y4pnSpC/sDfMV11J+w9G/x80zjLFm3s2uBJLlAyM4FfWFQcfa 5Zzl5dYoc0+PTuvoZT81rhQhmllm4WABUBWx4ZhdA8wDAynXEpjuCgl6S8nk/Y2kVg2U AZr8fBu0b0XVoaCrr7j+xsgXvNe74FPXeRW25lJ1VkbPPTUyOiIZ/YJqzMMbL2BKO3Pt NBtQ== X-Received: by 10.68.242.41 with SMTP id wn9mr57377101pbc.142.1358849222974; Tue, 22 Jan 2013 02:07:02 -0800 (PST) Original-Received: from [61.11.102.153] ([61.11.102.153]) by mx.google.com with ESMTPS id oi3sm10485311pbb.1.2013.01.22.02.07.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Jan 2013 02:07:02 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.210.54; 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: 0NIOW749r - 37856599a25d - 20130122 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 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:80384 Archived-At: This is a multi-part message in MIME format. --===============0486220473== Content-Type: multipart/alternative; boundary="------------030303070300050200070505" This is a multi-part message in MIME format. --------------030303070300050200070505 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I have written a macro to include figures. I pass the label name and the caption as the two arguments. But when I try to refer to the figure, it shows ??. Surely, my macro does not define the figure label as intended by me. What am I doing wrong? Also, while trying to debug this problem, I tried using *\version[temporary]* to see the labels as suggested in the Context manual (chapter on Cross References (page 207) of cont-ini.pdf). But it didn't show many the label of the figure. MWE: \useMPlibrary[dum] \unprotect \define[2]\dincludefigure{% \placefigure[fig:#1]{#2}{\externalfigure[dummy][width=10cm]}% }% \protect \starttext \dincludefigure{one}{A figure} I am refering to \in{Figure}[fig:one]. \stoptext --------------030303070300050200070505 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I have written a macro to include figures. I pass the label name and
the caption as the two arguments. But when I try to refer to the figure,
it shows ??.

Surely, my macro does not define the figure label as intended by me.
What am I doing wrong? Also, while trying to debug this problem, I tried
using \version[temporary] to see the labels as suggested in the Context
manual (chapter on Cross References (page 207) of cont-ini.pdf). But it
didn't show many the label of the figure.

MWE:

\useMPlibrary[dum]
\unprotect
\define[2]\dincludefigure{%
   \placefigure[fig:#1]{#2}{\externalfigure[dummy][width=10cm]}%
 }%
\protect

\starttext
  \dincludefigure{one}{A figure}
  I am refering to \in{Figure}[fig:one].
\stoptext

--------------030303070300050200070505-- --===============0486220473== 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 ___________________________________________________________________________________ --===============0486220473==--