Latex Error Can Only Be Used in Preamble
I have some legacy batch file that generates a PDF with LaTeX. There is a chief.tex file which "includes" multiple *.tex files as subpages.
In the principal .tex file I already have alleged \usepackage{float}.
When executing the batch which launches the generation of the PDF I become the error:
! LaTeX Fault: Unknown bladder pick 'H'.
Adding the \usepackage{bladder} before the \begin{document} in the file where the problem comes from throws the error:
! LaTeX Error: Can be used only in preamble.
How tin I gear up this?
asked Feb 16, 2022 at x:00
John DoeJohn Doe
1,010 six argent badges 25 bronze badges
2
ane Reply one
Replacing .*}[H] with .*}[h!] fixed the problem.
answered Feb 16, 2022 at 14:58
John DoeJohn Doe
ane,010 6 silver badges 25 bronze badges
iv
-
This does not make sense given the problem description.
Feb 16, 2022 at 17:20
-
@Werner Doesn't make sense the fact that I replaced the float selection
Hwithh!?Feb 20, 2022 at 7:02
-
Yep, the trouble seems unrelated to that alter, since
Hshould be (y'all're loadingbladderalready).Feb xx, 2022 at 7:26
-
@Werner So I really accept no idea, I establish this solution on some forum and apparently it worked, and then I don't actually listen, but if you accept other solution, I'd gladly attempt it out.
Feb 20, 2022 at 7:28
Non the answer you're looking for? Scan other questions tagged latex tex or ask your ain question.
Source: https://stackoverflow.com/questions/48824212/latex-error-can-be-used-only-in-preamble
Could y'all provide more detail about the document construction? How are the "multiple
.texfiles included? Practice you lot a chief.texfile that\includes the other.texfiles? That main file should accept a preamble with thedocumentsurroundings -\documentclass...\begin{document}...\cease{document}. Do you take\usepackage{float}between\documentclassand\end{document}?Feb sixteen, 2022 at 17:21
@Werner The
.texfiles are included using\subfile{texFileName}. The maine.texfile has a\begin{document}and a\end{document}and before the\begin{document}there is a\usepackage{float}declaration.Feb 20, 2022 at 7:05