Latex Error: Can Be Used Only in Preamble.
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
John DoeJohn Doe
i,000 5 argent badges 25 statuary badges
two
ane Answer 1
Replacing .*}[H] with .*}[h!] fixed the problem.
answered Feb 16 2022 at 14:58
John DoeJohn Doe
1,000 five silvery badges 25 statuary badges
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
Hwithh!?Feb xx 2022 at 7:02
-
Yes, the problem seems unrelated to that modify, since
Hshould be (you're loadingfloatalready).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.
mackerrasjustantrind.blogspot.com
Source: https://stackoverflow.com/questions/48824212/latex-error-can-be-used-only-in-preamble
Could yous provide more detail about the document structure? How are the "multiple
.texfiles included? Do y'all a main.texfile that\includes the other.texfiles? That main file should take a preamble with thedocumentsurroundings -\documentclass...\begin{certificate}...\end{document}. Do you accept\usepackage{float}between\documentclassand\stop{document}?Feb xvi 2022 at 17:21
@Werner The
.texfiles are included using\subfile{texFileName}. The maine.texfile 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