\end {document} is detected in an incorrect position and output stops halfway

Asked 2 years ago, Updated 2 years ago, 367 views

When I was writing a report using Overleaf, the output was cut off in the middle, and even if I recompiled it, the output was only halfway through.When I checked the error, I found the following error:

main.texline1164
LaTeXError: \begin {figure} on input line 461 ended by \end { document}.

See the LaTeX manual or LaTeX Company for expansion.
Type H<return>for immediate help.
 ...                                              
                                                  
l.1164\end {document}
                     
Your command was ignored.
Type I<command><return>to replace it with another command,
or <return> to continue without it.

If the output is correct, the report is less than 30 pages long, but the output has stopped until 15 pages.And the code near line461 mentioned in this error is as follows:

\subscription*{Results}
show the results of one's implementation
\begin {figure} [H]
    \centering
    \includegraphics [width=10cm {img/7/7-9-1.png}
    \caption {Challenge 9 Results}
    \label {791}
\end {figure}
\subsection* {consideration}
Ayeo, Kakikakeko, Sashiso

Line 461 is \begin{figure}[H].

The package and Overleaf settings are listed for your reference below.

\ documentclass [dvipdfmx, autodetect-engine] {jsarticle}
\uspackage {tikz}
\uspackage {graphicx}
\uspackage {booktabs}
\uspackage {multirow}
\uspackage {amsmath}
\uspackage {svg}
\uspackage {here}
\uspackage {siunitx}
\uspackage [T1] {fontenc}
\uspackage {textcomp}
\uspackage {lists, jlisting}
\uspackage {siunitx}
\uspackage {url}
\uspackage {threeparttable}
\uspackage {here}
\uspackage [a4paper] {geometry}
\uspackage {lists, jlisting}% for Japanese comment out
\uspackage {bxtexlogo}
\uspackage {ascmac}
\uspackage {color}
\uspackage {multirow}

Configuring Overleaf
Compiler:LaTeX
TeX Live version:2021

latexmkrc
This was previously written based on the this site

$latex='uplatex';
$bibtex='upbibtex';
$dvipdf='dvipdfmx%O-o%D%S';
$makeindex='mendex-U%O-o%D%S';
$pdf_mode=3; 
$ENV {TZ} = 'Asia/Tokyo';
$ENV {OPENTYPEFONTS} = '/usr/share/fonts//:';
$ENV {TTFONTS} = '/usr/share/fonts//:';

Additional
In addition to this error, there was an error related to \end{ document}, so I would like to add it.

You can't use `\end' in internal vertical mode.

\enddocument...current/end}\deadcycles\z@\@@end 
                                                  
l.1164\end {document}
                     
Sorry, but I'm not programmed to handle this case;
I'll just pretend that you didn't ask for it.
If you're in the wrong mode, you might be able to
return to the right one by typing `I}' or `I$' or `I\par'.
Missing} inserted.

<inserted text> 
                }
l.1164\end {document}
                     
I've inserted something that you may have forgotten.
(See the <inserted text>above.)
With luck, this will get me unwed. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current filema will both disappear.
Emergency stop.

<*>main.tex
            
*** (jobbed, no legal\end found)

 
Here is how much of TeX's memory you used:
 22090 strings out of 478997
 459884 string characters out of 5862571
 1436641 words of memory out of 5000000
 39829 Multiletter control sequences out of 15000 + 600000
 424071 words of font info for 102 fonts, out of 8000000 for 9000
 934 hyphenation exceptions out of 8191
 102i, 19n, 108p, 579b, 1745s stack positions out of 5000i, 500n, 10000p, 200000b, 80000s
Output write on output.dvi (16 pages, 40348 bytes).

latex

2022-09-30 22:01

1 Answers

Unfortunately, LaTeX errors are not always good at identifying the cause of the error, and although \begin{ document}~\end{ document} has nothing to do with it, error messages may appear as if they were the cause.

However, it is correct to point out that the cause is near line 461, and it seems that the cause is the part you posted:

\includegraphics [width=10cm{img/7/7-9-1.png}

The optional argument [width=10cm in \includegraphics

\includegraphics [width=10cm] {img/7/7-9-1.png}

If there are no other problems, this should work fine.


2022-09-30 22:01

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.