From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80386 Path: news.gmane.org!not-for-mail From: Devendra Ghate Newsgroups: gmane.comp.tex.context Subject: Re: Referencing a figure Date: Tue, 22 Jan 2013 16:18:54 +0530 Message-ID: <50FE6E96.7050802@gmail.com> References: <50FE64BC.8070308@gmail.com> <20130122101850.GA14851@phlegethon.router_intern> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0898186339==" X-Trace: ger.gmane.org 1358851750 32386 80.91.229.3 (22 Jan 2013 10:49:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jan 2013 10:49:10 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 22 11:49:29 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 1TxbPx-0006eL-0o for gctc-ntg-context-518@m.gmane.org; Tue, 22 Jan 2013 11:49:25 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 957E2101EC; Tue, 22 Jan 2013 11:49: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 ILpNcbymR7wz; Tue, 22 Jan 2013 11:49:05 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 9C728101E6; Tue, 22 Jan 2013 11:49:05 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D8C90101E6 for ; Tue, 22 Jan 2013 11:49:03 +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 1zsI6fPVH8Di for ; Tue, 22 Jan 2013 11:49:02 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 2A311101E5 for ; Tue, 22 Jan 2013 11:49:02 +0100 (CET) Original-Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r0MAmx0K020689 for ; Tue, 22 Jan 2013 11:49:00 +0100 Original-Received: by mail-pa0-f50.google.com with SMTP id hz10so3984314pad.37 for ; Tue, 22 Jan 2013 02:48:59 -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 :references:in-reply-to:content-type; bh=PnSeUvTLmzvsS0xXmB5n8L2K5oC634kAfsSDfL4q+F4=; b=QQzKvi5rJNfDUBmfxkVIR38wP3mFl3CP8tTGqF90nXD/8/DQPUhSFsste49fDdFsK+ j4sYEACah7DKodcYYq4PJAJ+s7q2gFQ2DJqLS44ruqSSuL39W4LNg9d8yL3iaYDxVrxD Lv1J1c7pM9zcgXkqYNoelp5nqgbDILBQcyr0HmIpvCzMacTSuP67YZwDLnKtx5JFpVL5 vGOwBXHiq9cpeQvAO5OjyjuidmAVNOcN5AepEdSRJnf+O1l4N0nO+TduYxBb3kVe3/HN Rs51yGUL2ifLtfyBzIPjL38PH4wV5if2Gsyh/xlUJth/Af5vvOyqoUL2N9cmv6nxg9+0 XT1Q== X-Received: by 10.68.227.33 with SMTP id rx1mr38609887pbc.67.1358851738876; Tue, 22 Jan 2013 02:48:58 -0800 (PST) Original-Received: from [61.11.102.153] ([61.11.102.153]) by mx.google.com with ESMTPS id ni8sm10523144pbc.70.2013.01.22.02.48.56 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Jan 2013 02:48:58 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 In-Reply-To: <20130122101850.GA14851@phlegethon.router_intern> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.220.50; 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: 0RIOWN04p - 72106c328253 - 20130122 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 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:80386 Archived-At: This is a multi-part message in MIME format. --===============0898186339== Content-Type: multipart/alternative; boundary="------------090609070005000904090005" This is a multi-part message in MIME format. --------------090609070005000904090005 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable On 01/22/2013 03:48 PM, Philipp Gesang wrote: > Hi! > > =B7=B7=B7=B7=B7=B7=B7=B7= =B7 > >> 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 figur= e, >> it shows ??. >> >> Surely, my macro does not define the figure label as intended by me. >> What am I doing wrong? > If you specify only one optional argument of \placefloat, then > leftmost in the list is assumed, i.e. the location. To get around > this, either specify a location or add empty brackets if you're > content with the default: > > \define[2]\dincludefigure{% > \placefigure[][fig:#1]{#2}{\externalfigure[dummy][width=3D10cm]}= % > }% > > Regards > Philipp > Thank you Philipp. Devendra >> Also, while trying to debug this problem, I tr= ied >> using *\version[temporary]* to see the labels as suggested in the Cont= ext >> manual (chapter on Cross References (page 207) of cont-ini.pdf). But i= t >> didn't show many the label of the figure. >> >> MWE: >> >> \useMPlibrary[dum] >> \unprotect >> \define[2]\dincludefigure{% >> \placefigure[fig:#1]{#2}{\externalfigure[dummy][width=3D10cm]}% >> }% >> \protect >> >> \starttext >> \dincludefigure{one}{A figure} >> I am refering to \in{Figure}[fig:one]. >> \stoptext >> >> ______________________________________________________________________= _____________ >> 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 >> ______________________________________________________________________= _____________ > > > > _______________________________________________________________________= ____________ > 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 > _______________________________________________________________________= ____________ --------------090609070005000904090005 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
On 01/22/2013 03:48 PM, Philipp Gesang wrote:
Hi!

···<date: 2013-01-22, Tuesday>···<from: Devendra Ghate>···

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?
If you specify only one optional argument of \placefloat, then
leftmost in the list is assumed, i.e. the location. To get around
this, either specify a location or add empty brackets if you’re
content with the default:

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

Regards
Philipp

Thank you Philipp.

Devendra





      
                       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


      
___________________________________________________________________________________
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
___________________________________________________________________________________



___________________________________________________________________________________
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
___________________________________________________________________________________

--------------090609070005000904090005-- --===============0898186339== 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 ___________________________________________________________________________________ --===============0898186339==--