[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#750446: LaTeX Error: Unknown float option `H'



ons 2014-06-04 klockan 10:11 +0900 skrev Norbert Preining:
> Hi Mattias,
> 
> > \begin{figure}[H] fails with:
> > LaTeX Error: Unknown float option `H'
> 
> Yes, which is correct, the document is simply wrong. H is not
> a proper float option.

This is incorrect. The default float command does bot provide an H
placement specifier. However, if the "float" package is loaded the
default float command is overridden with a float command that does have
such a specifier.

As can be seen from the log, this document uses the float package:

(/usr/share/texlive/texmf-dist/tex/latex/float/float.sty)

http://ctan.uib.no/macros/latex/contrib/float/README says:

>>>
  The float package
  =================

This package improves the interface for defining floating objects such
as figures and tables in LaTeX.  It adds the notion of a `float style'
that governs appearance of floats.  New kinds of floats may be defined
using a \newfloat command analogous to \newtheorem.  This style option
also incorporates the functionality of David Carlisle's style option
`here', giving floating environments a [H] option which means `PUT IT
HERE' (as opposed to the standard [h] option which means `You may put
it here if you like').
<<<

> > This is a regression from earlier versions.
> 
> No and yes.
> 
> No, because if you just use LaTeX2e as is, then unknown specifiers
> are still ignored.
> 
> But the document under discussion used
> 	fixltx2e.sty
> as seen from this line
> (/usr/share/texlive/texmf-dist/tex/latex/base/fixltx2e.sty)
> 
> And that means that *bugs* in the latex code will be fixed.
> 
> That also means, that with LaTeX from 2014/05/01 you get errors:
> 
> See ltnews.pdf, available in 
> 	/usr/share/doc/texlive-doc/latex/base/ltnews.pdf
> 
> Which states:
> ------
> There are a number of bugs and faulty design decisions
> in LaTeX2e that should have been corrected long ago in
> the kernel code. However, such corrections cannot be
> done as this would break backwards compatibility in
>              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> the following sense. A large number of documents exist
> by now that have worked around the bug or have even
> made use of a particular misfeature. Thus changing the
> kernel code would break too many existing documents.
> The corrections for these types of bug have therefore
> been collected together in a package that can be loaded
> only when needed; its name is fixltx2e. For this release
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> we made the following changes to this package:
> • Misspelled float placement specifiers such as
> \begin{figure}[tv] instead of tb are silently
> ignored by the kernel code. Now we test for such
> letters and issue an error message.
> ...

Adding syntax checks is all well and good. But if you add syntax checks
for a command and still apply them when the command is overridden and
no longer has the same syntax as the original command, then your syntax
checks are causing the breakage.

When a command is overridden you must either modify your check
accordingly, or not apply the check.

> Enjoy. I am closing this bug. This has to be fixed in the
> original documents.

As explained above the original documents are not wrong, they just use a
different version of the float command than the one you are checking the
syntax for. In my experience the use of the "H" placement options for
floats is very widespread.

PS. You failed to close the bug by misspelling the email address. If you
had closed it I would have reopened it due to the reasons stated above.

> Norbert

	Mattias

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Reply to: