CTeX-org / forum

A temporarily alternate forum of `bbs.ctex.org`
https://t.me/chinesetex
Apache License 2.0
211 stars 16 forks source link

无法编译eps格式图片 #63

Open huiliu-overleaf opened 4 years ago

huiliu-overleaf commented 4 years ago

使用pdflatex编译方式无法编译eps图片,错误显示Package pdftex.def Error: File `well-test-data-from-tang-eps-converted-to.pdf' not found: using draft set DFM based PTA for MFHW with arbitrary discretely distributed natural fractures - 副本.zip ting. ...phics[scale=.55]{well-test-data-from-tang}

OsbertWang commented 4 years ago

建议用户先用 epstopdf 命令把 eps 文件转换成 pdf 文件。 我个人也不太喜欢让图片文件名过长。

\documentclass[3p,times,authoryear,review]{elsarticle}
\begin{document}
\includegraphics[scale=.55]{fig1.pdf}
\end{document}

MWE 大致是这样,已经在我的电脑上实验过,能跑通。

muzimuzhi commented 4 years ago

在 macOS 下测试,一切正常:用 pdflatex 编译,eps 到 pdf 能自动转换、转换得到的 pdf 能成功插入。

你例子里,log 文件的相关部分是

Package epstopdf Info: Source file: <well-test-data-from-tang.eps>
(epstopdf)                    date: 2019-11-03 08:03:42
(epstopdf)                    size: 141709 bytes
(epstopdf)             Output file: <well-test-data-from-tang-eps-converted-to.
pdf>
(epstopdf)             Command: <repstopdf --outfile=well-test-data-from-tang-e
ps-converted-to.pdf well-test-data-from-tang.eps>
(epstopdf)             \includegraphics on input line 54.
runsystem(repstopdf --outfile=well-test-data-from-tang-eps-converted-to.pdf wel
l-test-data-from-tang.eps)...executed safely (allowed).

Package epstopdf Info: Result file: <well-test-data-from-tang-eps-converted-to.
pdf>.

! Package pdftex.def Error: File `well-test-data-from-tang-eps-converted-to.pdf
' not found: using draft setting.

考虑

  1. 程序 repstopdf 能否正常调用,可通过在 cmd.exe 里输入 repstopdf -h 测试。
  2. 被调用的 repstopdf 有没有当前目录的写入权限,用 pdflatex -shell-escape manuscripts.tex 编译可能能测试一部分。

建议用户先用 epstopdf 命令把 eps 文件转换成 pdf 文件。

不一定必要。用 pdflatx 编译时,graphicx 的功能设计上就是自动转换的。

huiliu-overleaf commented 4 years ago
        Yes

                            Hui Liu

                                邮箱:huiliu012@gmail.com

    Signature is customized by Netease Mail Master

        在2019年11月11日 07:42,muzimuzhi 写道: 在 macOS 下测试,一切正常:用 pdflatex 编译,eps 到 pdf 能自动转换、转换得到的 pdf 能成功插入。

你例子里,log 文件的相关部分是

Package epstopdf Info: Source file:

(epstopdf) date: 2019-11-03 08:03:42

(epstopdf) size: 141709 bytes

(epstopdf) Output file: <well-test-data-from-tang-eps-converted-to.

pdf>

(epstopdf) Command: <repstopdf --outfile=well-test-data-from-tang-e

ps-converted-to.pdf well-test-data-from-tang.eps>

(epstopdf) \includegraphics on input line 54.

runsystem(repstopdf --outfile=well-test-data-from-tang-eps-converted-to.pdf wel

l-test-data-from-tang.eps)...executed safely (allowed).

Package epstopdf Info: Result file: <well-test-data-from-tang-eps-converted-to.

pdf>.

! Package pdftex.def Error: File `well-test-data-from-tang-eps-converted-to.pdf

' not found: using draft setting.

考虑

程序 repstopdf 能否正常调用,可通过在 cmd.exe 里输入 repstopdf -h 测试。

被调用的 repstopdf 有没有当前目录的写入权限,用 pdflatex -shell-escape manuscripts.tex 编译可能能测试一部分。

建议用户先用 epstopdf 命令把 eps 文件转换成 pdf 文件。

不一定必要。用 pdflatx 编译时,graphicx 的功能设计上就是自动转换的。

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

[

{

"@context": "http://schema.org",

"@type": "EmailMessage",

"potentialAction": {

"@type": "ViewAction",

"target": "https://github.com/CTeX-org/forum/issues/63?email_source=notifications\u0026email_token=ANTI5PCKXQXW2ZPT5CGMABLQTCL55A5CNFSM4JILGKCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDVKDVI#issuecomment-552247765",

"url": "https://github.com/CTeX-org/forum/issues/63?email_source=notifications\u0026email_token=ANTI5PCKXQXW2ZPT5CGMABLQTCL55A5CNFSM4JILGKCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDVKDVI#issuecomment-552247765",

"name": "View Issue"

},

"description": "View this Issue on GitHub",

"publisher": {

"@type": "Organization",

"name": "GitHub",

"url": "https://github.com"

}

}

]

OsbertWang commented 4 years ago

建议用户先用 epstopdf 命令把 eps 文件转换成 pdf 文件。

不一定必要。用 pdflatx 编译时,graphicx 的功能设计上就是自动转换的。

是的,功能上讲的确不一定。 上面那个 MWE 在我的电脑上运行时会反应 192 行有问题,可能是 bibtexkey 那里多了空格。 昨天只注意图片问题,忘了看其他地方。