ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Referencing a figure
@ 2013-01-22 10:06 Devendra Ghate
  2013-01-22 10:18 ` Philipp Gesang
  0 siblings, 1 reply; 7+ messages in thread
From: Devendra Ghate @ 2013-01-22 10:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

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


[-- Attachment #1.2: Type: text/html, Size: 1138 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Referencing a Figure
@ 2010-04-30  1:45 Troy Henderson
  2010-04-30  2:08 ` Aditya Mahajan
  2010-04-30  6:47 ` Albrecht Kauffmann
  0 siblings, 2 replies; 7+ messages in thread
From: Troy Henderson @ 2010-04-30  1:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I am trying to reference a figure, and the results are not as
expected.  Here is my snippet.

\placefigure[fig:myfigure]{A beautiful circle}{
   \startMPcode
      draw fullcircle scaled 72;
   \stopMPcode
}
Isn't Figure \in[fig:myfigure] beautiful?


When this code renders, the text says "Isn't Figure ?? beautiful?"
How can I get the correct figure number?

Thanks,

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-01-22 10:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-22 10:06 Referencing a figure Devendra Ghate
2013-01-22 10:18 ` Philipp Gesang
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

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).