ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Subfigures, referencing and resetting counter
@ 2020-11-18 19:22 Marco Patzer
  2020-11-23 18:14 ` Marco Patzer
  0 siblings, 1 reply; 2+ messages in thread
From: Marco Patzer @ 2020-11-18 19:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

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

* Re: Subfigures, referencing and resetting counter
  2020-11-18 19:22 Subfigures, referencing and resetting counter Marco Patzer
@ 2020-11-23 18:14 ` Marco Patzer
  0 siblings, 0 replies; 2+ messages in thread
From: Marco Patzer @ 2020-11-23 18:14 UTC (permalink / raw)
  To: ntg-context

On Wed, 18 Nov 2020 20:22:24 +0100
Marco Patzer <lists@homerow.info> 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
___________________________________________________________________________________

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

end of thread, other threads:[~2020-11-23 18:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 19:22 Subfigures, referencing and resetting counter Marco Patzer
2020-11-23 18:14 ` Marco Patzer

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