On 01/22/2013 03:48 PM, Philipp Gesang wrote: > Hi! > > ········· > >> 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 > ___________________________________________________________________________________