Re: [NTG-context] Subfigures, referencing and resetting counter

2020-11-23 Thread Marco Patzer
On Wed, 18 Nov 2020 20:22:24 +0100
Marco Patzer  wrote:

> I struggle with referencing subfigures.
>
> […]

Any ideas?

Marco
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Subfigures, referencing and resetting counter

2020-11-18 Thread Marco Patzer
Hi!

I struggle with referencing subfigures. Combinations can't be
referenced to my knowledge, that's why I went with another float for
the inner subfigure. Example:


\useMPlibrary[dum]

\definefloat
  [subfigure]
  [subfigures]
  [figure]

\setupcaptions
  [subfigure]
  [numberconversion=characters,
   numberstopper=)]

\setuplabeltext
  [subfigure=]

\definecounter
  [subfigure]
  [way=bytext]

\starttext

\startplacefigure [title=First, reference=first]
  \startfloatcombination [nx=2, ny=1]
\startplacesubfigure
  \externalfigure
\stopplacesubfigure
\startplacesubfigure [reference=fig:firstsub]
  \externalfigure
\stopplacesubfigure
  \stopfloatcombination
\stopplacefigure

\startplacefigure [title=Second, reference=second]
  \startfloatcombination [nx=2, ny=1]
\startplacesubfigure
  \externalfigure
\stopplacesubfigure
\startplacesubfigure [title=beta, reference=fig:secondsub]
  \externalfigure
\stopplacesubfigure
  \stopfloatcombination
\stopplacefigure

See \in{figure}[first],
\in{figure}[fig:firstsub] and
\in{figure}[fig:secondsub].

\stoptext


How to reset the counter for the subfigure to start anew for each
new figure?

The second issue is the referencing of subfigures. The MWE shows
“figure b)” and “figure d)” rather than “figure 1b)” and “figure
2b)”. How to include the outer float counter in the reference?

Marco
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___