ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Philipp Gesang <Philipp.Gesang@alumni.uni-heidelberg.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Referencing a figure
Date: Tue, 22 Jan 2013 11:18:50 +0100	[thread overview]
Message-ID: <20130122101850.GA14851@phlegethon.router_intern> (raw)
In-Reply-To: <50FE64BC.8070308@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1898 bytes --]

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


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


-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

  reply	other threads:[~2013-01-22 10:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-22 10:06 Devendra Ghate
2013-01-22 10:18 ` Philipp Gesang [this message]
2013-01-22 10:48   ` Devendra Ghate
  -- strict thread matches above, loose matches on Subject: below --
2010-04-30  1:45 Referencing a Figure Troy Henderson
2010-04-30  2:08 ` Aditya Mahajan
2010-04-30  2:54   ` Troy Henderson
2010-04-30  6:47 ` Albrecht Kauffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130122101850.GA14851@phlegethon.router_intern \
    --to=philipp.gesang@alumni.uni-heidelberg.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).