Latex Error Can Be Used Only in Preamble
I have some legacy batch file that generates a PDF with LaTeX. There is a master.tex file which "includes" multiple *.tex files as subpages.
In the principal .tex file I already have 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{float} before the \brainstorm{certificate} in the file where the trouble comes from throws the error:
! LaTeX Error: Tin can be used but in preamble.
How can I set up this?
asked February 16 2022 at 10:00
John DoeJohn Doe
1,000 5 silvery badges 25 statuary badges
ii
one Respond one
Replacing .*}[H] with .*}[h!] fixed the problem.
answered Feb xvi 2022 at fourteen:58
John DoeJohn Doe
ane,000 5 silver badges 25 statuary badges
4
-
This does not make sense given the problem description.
February 16 2022 at 17:20
-
@Werner Doesn't make sense the fact that I replaced the float option
Hwithh!?Feb 20 2022 at 7:02
-
Yes, the trouble seems unrelated to that modify, since
Hshould exist (you're loadingfloatalready).Feb xx 2022 at 7:26
-
@Werner And so I really have no idea, I found this solution on some forum and apparently information technology worked, so I don't really mind, but if you have other solution, I'd gladly try it out.
Feb 20 2022 at 7:28
Not the answer you're looking for? Browse other questions tagged latex tex or ask your own question.
Source: https://stackoverflow.com/questions/48824212/latex-error-can-be-used-only-in-preamble
Could you provide more than detail about the document construction? How are the "multiple
.texfiles included? Exercise you a principal.texfile that\includes the other.texfiles? That main file should accept a preamble with thedocumentenvironment -\documentclass...\brainstorm{certificate}...\end{certificate}. Do you have\usepackage{float}between\documentclassand\end{document}?February 16 2022 at 17:21
@Werner The
.texfiles are included using\subfile{texFileName}. The maine.texfile has a\brainstorm{document}and a\end{document}and before the\begin{certificate}there is a\usepackage{float}declaration.Feb xx 2022 at vii:05