[pretest] Metapost graphics file not found
Uwe Siart
usenet at siart.de
Thu Mar 4 13:36:30 CET 2021
Phelype Oleinik <phe.h.o1 at gmail.com> writes:
> Are you sure it depends on the encoding? It's really weird if it does,
> then I'd appreciate it if you could send me the file.
Hi Phelype,
With your explanations said I tried again and now I understand what
happened. It has nothing to do with the encoding, indeed.
>> - The file is latin-1 encoded. It works with latex but not with
>> pdflatex.
>
> Ah, that is not a problem with the file encoding. The out-of-the-box
> available graphics rules depend on the backend you are using. If you're
> running |pdflatex| then there is no default graphics rule (as declared
> with |\DeclareGraphicsRule{*}...|), so an unknown extension will result
> in an error. If you are running in DVI mode, with |latex|, then the
> default rule tries to include unknown file extensions as an eps file.
Yes, that makes sense. And now I understand that this is what I acutally
observed. With LaTeX in DVI mode \includegraphics{file.1} works
out-of-the-box.
>> - When I tell Emacs/AUCTeX to recode the file to utf-8-dos (by setting a
>> the local variable "coding" to utf-8-dos and typing C-c C-n) it does
>> not work anymore.
>
> *That* is strange, at first glance...
>
> If you could send the file, I can take a look, but the difference
> between |latex| and |pdflatex| is expected (look for |\Gin at extensions|
> in |dvips.def| and |pdftex.def| to compare).
Here, Emacs+AUCTeX played me a prank. During the change of the encoding
(by setting a local variable and pressing C-c C-n) it also changed
TeX-PDF-mode from nil to t (because it is the default in AUCTeX and I
did not override by a local variable). So it switched to PDF mode and
that was the actual reason why I got the error. But this made me believe
that the encoding is the culprit.
So, problem solved. Thanks for your help, Phelype.
--
Uwe
More information about the tex-live
mailing list.