0

What is the right way to solve this package clash? After I updated memoir from the 2021 texlive install I started getting this LaTeX Error: Command \newfloat already defined. This is because I load the float package. I do this because I need the [H] option that float provides (even though egreg says don't). Similarly I solve the conflict with the strategy mentioned in the other answer \let\newfloat\undefined. It does what I need, but I am unsure of the consequences of my action, I imagine this might cause some problems either trying to use the newfloat features of the package or class. Although for now I havnt tried to use that feature from either.

Bob
  • 1,270
  • 9
  • 14
  • No, you do not need the H "nuclear" option. Please replace all instances of [H] with [ht] and recompile your document. – Mico Apr 03 '22 at 17:33
  • Do not use the H option --- it destroys the purpose of the float environments. If you want a float there, put it there and if you need a caption for it then use the caption package. Using H then requires you to ensure that the typeset result is as good as it might be and there is often great difficulty in doing that. Why not let LaTeX do the best for you? – Peter Wilson Apr 03 '22 at 17:59
  • You realize that H almost (but not quite) turns figure and table into minipages with \def\@captype{figure} or \def\@captype{table} for the captions. – John Kormylo Apr 03 '22 at 18:31
  • @PeterWilson It is easier to change an [h] to an [H] (and go back and forth while I fiddle) than it is to unwrap the contents of the float. @Mico i tried your suggestion and while it was an improvement of [h] it still doesnt produce exactly the same results as [H]. Namely in this case it is inappropriate for the following paragraph to come anywhere but at the very and of a bunch of consecutive tables. – Bob Apr 03 '22 at 19:30
  • @Bob Following your comment I think that you asked the wrong question, which should have been along the lines "How do I print a series of tables with no intervening text, but text after the end without necessarily starting the text on a new page". Again, DO NOT USE THE [H] OPTION. See John Kormylo's \flushqueue answer to https://tex.stackexchange.com/questions/639781. – Peter Wilson Apr 06 '22 at 17:45
  • @PeterWilson, that was meant to be an example, not my only use case. Sometimes I just need to be able to tell a float not to float, but I still want it to do all the other things e.g. have a caption and proper numbering. Lots of times The [H] option seems to be exactly what I need. I could unpack all the contents and use workarounds (such as the caption package) but that is way more work. Is there a reason why that would be better than simply using the [H] option? – Bob Apr 07 '22 at 19:34
  • @Bob How you work is up to you. Have you tried the [!ht] option? Semantically [H] says that this is not a float. – Peter Wilson Apr 10 '22 at 17:51

0 Answers0