I have a set of different types to include figure-like items in a document. These include a float (created by \SetupFloatingEnvironment
), a non-float and full-page environments/commands.
While the non-float environment easily can share the counter and list of the basic float type through the \captionsetup
, I had to go to some length with the full-page type: This doesn't have a real \caption
but rather a text that is formatted like the caption. I then manually update the counter, write a) that 'caption' in the page header and b) manually create a toc entry.
Basically that works quite well, but when I'm in a context where the floating environments are numbered with the chapter number included I don't know how to mimick that in my manual caption.
So the question is: How can I determine the actual numbering options for floats (that the end user of my package may have changed individually)? And how can I reproduce that formatting for a custom caption and 'contentsline'?
myfloat
, then\themyfloat
prints the float counter in whichever way it was defined. If it includes the chapter, it would typically be something like\arabic{chapter}.\arabic{myfloat}
. Are you using\themyfloat
to set the counter in your full-page environments or are you using\arabic{myfloat}
?\thechapter.\arabic{myfloat}
instead, as I've noted.myfloat
and a non-floating commandmycommand
that shares themyfloat
counter. What I now do is to manually incrementmyfloat
from withinmycommand
(with\refstepcounter{myfloat}
and then usethemyfloat
to display the counter. Should I update your answer? Or just upvote it and write my own answer? What would be the desired behaviour for this situation?\the<counter>
) is identical. In that respect, you can edit my answer.