Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.