two identical .tex files; one compiles, one does not

Julius Müller Julius.Muller at gmx.net
Mon Nov 21 18:06:23 CET 2022


Did you use latex (for example pdflatex or lualatex or xelatex) with
both files? If you did try tex (for example pdftex or luatex or xetex)
on File1, the message would be totally OK: \documentclass is one of the
macros defined in LaTeX but unknown to TeX.

Am 21.11.22 um 17:58 schrieb Christopher W. Ryan via texhax:
> I'm running texlive on Windows 10. I encountered the error message below
> when attempting to compile a small letter. Let's say it is in File1.tex
>
>
> ERROR: Undefined control sequence.
>
> --- TeX said ---
> l.1 \documentclass
>                    {letter}
> --- HELP ---
> TeX encountered an unknown command name. You probably misspelled the
> name. If this message occurs when a LaTeX command is being processed,
> the command is probably in the wrong place---for example, the error
> can be produced by an \item command that's not inside a list-making
> environment. The error can also be caused by a missing \documentclass
> command.
>
>
> Here is my preamble:
>
> \documentclass{letter}
> \usepackage[vmargin=0.5in, hmargin = 1in]{geometry}
>
> \address{SUNY Upstate Clinical Campus \\ PO Box 778 \\ Johnson City, NY
> 13790 \\ US}
> \signature{Christopher W. Ryan, MD, MS, MSPH}
>
>
> Oddly, when I create an identical file, let's call it File2.tex, it
> compiles just fine.  I compared the two files in Windows Total
> Commander, and it tells me they have identical content.
>
> I notice that compiling File1.tex, the problematic one, no .aux file is
> created, whereas it is when compiling File2.tex
>
> I have not seen this behavior before. Can anyone explain what is happening?
>
> Thanks.
>
> --Chris Ryan



More information about the texhax mailing list.