Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when including .eps figure in pdfLaTeX #42

Closed
hbghlyj opened this issue Jun 27, 2024 · 5 comments
Closed

Error when including .eps figure in pdfLaTeX #42

hbghlyj opened this issue Jun 27, 2024 · 5 comments

Comments

@hbghlyj
Copy link

hbghlyj commented Jun 27, 2024

For example, the LaTeX document:

\documentclass{article}
\begin{filecontents}{1.eps}
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 269 359 342 432
%%HiResBoundingBox: 269.5 359.5 341.5 431.5
%%Creator: Asymptote 2.852.85
%%CreationDate: 2024.06.27 12:49:20
%%Pages: 1
%%Page: 1 1
/Setlinewidth {0 exch dtransform dup abs 1 lt {pop 0}{round} ifelse
idtransform setlinewidth pop} bind def
gsave
 305.5 395.5 translate
newpath 35.75 0 moveto
 35.75 19.7441798 19.7441798 35.75 0 35.75 curveto
 -19.7441798 35.75 -35.75 19.7441798 -35.75 0 curveto
 -35.75 -19.7441798 -19.7441798 -35.75 0 -35.75 curveto
 19.7441798 -35.75 35.75 -19.7441798 35.75 0 curveto
closepath
/Compatible .setblendmode
1 1 0 setrgbcolor
0.5 Setlinewidth
1 setlinecap
1 setlinejoin
10 setmiterlimit
fill
newpath 35.75 0 moveto
 35.75 19.7441798 19.7441798 35.75 0 35.75 curveto
 -19.7441798 35.75 -35.75 19.7441798 -35.75 0 curveto
 -35.75 -19.7441798 -19.7441798 -35.75 0 -35.75 curveto
 19.7441798 -35.75 35.75 -19.7441798 35.75 0 curveto
closepath
0 setgray
stroke
newpath -7.15 14.3 moveto
 -7.15 16.274418 -8.75058202 17.875 -10.725 17.875 curveto
 -12.699418 17.875 -14.3 16.274418 -14.3 14.3 curveto
 -14.3 12.325582 -12.699418 10.725 -10.725 10.725 curveto
 -8.75058202 10.725 -7.15 12.325582 -7.15 14.3 curveto
closepath
fill
newpath 14.3 14.3 moveto
 14.3 16.274418 12.699418 17.875 10.725 17.875 curveto
 8.75058202 17.875 7.15 16.274418 7.15 14.3 curveto
 7.15 12.325582 8.75058202 10.725 10.725 10.725 curveto
 12.699418 10.725 14.3 12.325582 14.3 14.3 curveto
closepath
fill
newpath -13.6933614 -11.4900945 moveto
 -10.4143918 -15.3937228 -5.49696256 -17.875 0 -17.875 curveto
 5.49696256 -17.875 10.4143918 -15.3937228 13.6933614 -11.4900945 curveto
stroke
grestore
showpage
%%EOF
\end{filecontents}
\usepackage[pdftex]{graphicx}
\begin{document}
\begin{center}
  \includegraphics{1}
\end{center}
\end{document}

can be compiled on texlive.net, but cannot be compiled at latex.ytotech.com, the error message is:

/app/latex-on-http/tmp/loh_workspaces/6ea7e4d3-02dc-4304-8f3b-ddffe46db9b0/__main_document__.tex:60: error: [pdftex.def] File `1-eps-converted-to.pdf' not found: using draft setting
      at   \includegraphics{1}
There were errors; /app/latex-on-http/tmp/loh_workspaces/6ea7e4d3-02dc-4304-8f3b-ddffe46db9b0/output.pdf not updated
@MonsieurV
Copy link
Member

Hi @hbghlyj,

Can you give me the exact command / request you're using to try to compile this example?

Regards,
Yoan

@hbghlyj
Copy link
Author

hbghlyj commented Jun 27, 2024

@MonsieurV The command is pdflatex document.tex. It successfully compiled on my local machine. The .log file is:

This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./document.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-01-21>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))

LaTeX Info: Writing file `./1.eps'.


(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def)))
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
No file document.aux.
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
(/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty)
(/usr/share/texlive/texmf-dist/tex/latex/grfext/grfext.sty
(/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty))
(/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty
(/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty)
(/usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty))
(/usr/share/texlive/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty))
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map} <./1-eps-converted-to.pdf>] (./document.aux) )</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on document.pdf (1 page, 9676 bytes).
Transcript written on document.log.

The result is

document.pdf

But it fails to compile by the command pdflatex --no-shell-escape document.tex

@hbghlyj
Copy link
Author

hbghlyj commented Jun 27, 2024

About the line restricted \write18 enabled. in .log file:

From

TEX Live 2010 news
A related important change is that execution of a very few external commands, via the \write18 feature, is now enabled by default— for example, epstopdf, makeindex, and bibtex.

From pdftex user manual:

  • [-no]-shell-escape disable/enable \write18{SHELL COMMAND}
  • -shell-restricted enable restricted \write18 which is enabled by default.
    A set of "allowed, safe" commands (epstopdf, makeindex, and bibtex) are allowed to run in restricted mode.

I guess that texlive.net compiles in the (default) restricted mode, while latex.ytotech.com compiles in the no-shell-escape mode.

MonsieurV added a commit that referenced this issue Jun 28, 2024
@MonsieurV
Copy link
Member

Hi @hbghlyj,

I found the issue. I will deploy it with the TeXLive 2024 update (it takes some time to build the image).

0c1447b

@MonsieurV
Copy link
Member

MonsieurV commented Jun 28, 2024

The service has been bumped to 2024-06-28-2

https://latex.ytotech.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants