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

Christopher W. Ryan cryan at
Mon Nov 21 17:58:22 CET 2022

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
--- 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

Here is my preamble:

\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?


--Chris Ryan

More information about the texhax mailing list.