I have some legacy batch file that generates a PDF with LaTeX. There is a main.tex file which "includes" multiple *.tex files as subpages.
In the chief .tex file I already take declared \usepackage{float}.
When executing the batch which launches the generation of the PDF I become the error:
! LaTeX Error: Unknown float option 'H'.

Adding the \usepackage{bladder} before the \begin{document} in the file where the problem comes from throws the error:
! LaTeX Error: Can exist used only in preamble.

How tin can I fix this?

asked Feb 16 2022 at 10:00

two

  • Could yous provide more detail about the document structure? How are the "multiple .tex files included? Do y'all a main .tex file that \includes the other .tex files? That main file should take a preamble with the document surroundings - \documentclass ... \begin{certificate} ... \end{document}. Do you accept \usepackage{float} between \documentclass and \stop{document}?

    Feb xvi 2022 at 17:21

  • @Werner The .tex files are included using \subfile{texFileName}. The maine .tex file has a \begin{document} and a \end{certificate} and before the \begin{document} there is a \usepackage{float} annunciation.

    Feb xx 2022 at seven:05

ane Answer 1

Replacing .*}[H] with .*}[h!] fixed the problem.

answered Feb 16 2022 at 14:58

4

  • This does not make sense given the problem clarification.

    Feb sixteen 2022 at 17:20

  • @Werner Doesn't make sense the fact that I replaced the float option H with h!?

    Feb xx 2022 at 7:02

  • Yes, the problem seems unrelated to that modify, since H should be (you're loading float already).

    Feb 20 2022 at 7:26

  • @Werner So I really accept no idea, I found this solution on some forum and plain information technology worked, so I don't really listen, but if yous accept other solution, I'd gladly try it out.

    Feb 20 2022 at 7:28

Not the respond you're looking for? Browse other questions tagged latex tex or enquire your own question.