TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I develop a new package and as one functionality, I would need to get the list of all floats defined using the \newfloat command of the float package.

I could of course modify this command in mypackage.sty, but that would need mypackage loaded after float and before the usage of \newfloat, which I don't consider good. I found that there is a float@type counter that says (in a strange way) how many floats have been defined. However, there is no command \float@by@type{<number>}, that would return the name of the corresponding environment.

Any suggestions appreciated.

share|improve this question
up vote 4 down vote accepted

As far as I know there is no way to get back the float environment name from the number associated to it: the output routine operates just with the numbers. So I guess that the only way is to modify \newfloat.

However, the newfloat package should have the same functionality as float and maintains a \newfloat@list macro that contains all the defined float types.

share|improve this answer
Thanks for the idea. I will still leave the question open for a while, maybe someone suggests something useful... – yo' Jan 24 '12 at 0:41
While the float package defines styled floating environments (i.e. with a certain look+feel, with fixed caption position, and only one caption possible) the newfloat package does not. So the newfloat package does not strictly have the same functionality since they both defines floating environments but with a different aim. – Axel Sommerfeldt Jan 26 '12 at 8:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.