When I input
\documentclass{article}
\begin{document}
Hello World!
\end{document}
and compile with pdfLaTex, the output .pdf file is created and looks good. My sourcefile doesn't.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityOutput overwriting input...
In this case, it is obvious what happens because of using the output extension for the input extension. In olden times, one rather subtle but quite dreadful mistake you could commit was writing
\include{chapter1.tex}
which resulted in LaTeX writing auxiliary data on a file chapter1.tex.aux
which the DOS file system abbreviated to chapter1.tex
which was then gone.
Later versions of emTeX were smarter about what file names it would overwrite, and when it would refuse. But this trap was present in several DOS-based TeX distributions.
I'm still somewhat surprised by TeXWork's behavior: I'd have expected LaTex.pdf
(cough cough) to be compiled into LaTex.pdf.pdf
without conflict. Or at least, like emTeX in olden times learnt to do, to refuse overwriting the original file. I almost fear that this behavior could result in resuscitating the above-mentioned age-old \include
catastrophe.
test.pdf
with contents Hello, World! \bye
and run pdftex test.pdf
. It will say at the end: Output written on test.pdf (1 page, 12037 bytes).
This has nothing to do with TeXworks, this is simply pdftex
's default behaviour: it expects user to know better than mess with the extensions so badly ;)
myfile.ltx
for latex files, producing myfile.dvi
Jan 15, 2015 at 17:27
tex
extension) and the file produced (apdf
or adiv
) are two different things! Frommyfile.tex
, (pdf)latex will produce a file calledmyfile.pdf
. I find this mistake rather funny.