I'm trying to compile a paper, using elsarticle
. I need to include some images, however, I have them only in *.png
or *.pdf
(converted from *.png using convert file.png file.pdf
), not in *.eps format.
I think I tried almost everything, but none of these things seemed to work properly.
1) Using natwidth
and natheight
with *.png
file, gives empty image (I can't see the image, huh):
\documentclass[review]{elsarticle}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
% FOR TEST ONLY
\usepackage[english]{babel}
\usepackage{blindtext}
\journal{Journal of \LaTeX\ Templates}
\bibliographystyle{elsarticle-num}
\begin{document}
\begin{frontmatter}
\title{Test}
\author{Test Test \corref{mycorrespondingauthor}}
\address{Institute of Computer Science}
\cortext[mycorrespondingauthor]{Corresponding author}
\ead{test@gmail.com}
\begin{abstract}
\blindtext
\end{abstract}
\begin{keyword}
\blinddescription
\end{keyword}
\end{frontmatter}
\section{Introduction}
\blindmathpaper
\begin{figure}
\centering
\includegraphics [natwidth=515,natheight=377]{image.png}
\caption{test}
\label{img:fig1}
\label{tvdmd}
\end{figure}
\end{document}
2) Using natwidth
and natheight
AND scale
with *.png
file, the same as above:
\documentclass[review]{elsarticle}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
% FOR TEST ONLY
\usepackage[english]{babel}
\usepackage{blindtext}
\journal{Journal of \LaTeX\ Templates}
\bibliographystyle{elsarticle-num}
\begin{document}
\begin{frontmatter}
\title{Test}
\author{Test Test \corref{mycorrespondingauthor}}
\address{Institute of Computer Science}
\cortext[mycorrespondingauthor]{Corresponding author}
\ead{test@gmail.com}
\begin{abstract}
\blindtext
\end{abstract}
\begin{keyword}
\blinddescription
\end{keyword}
\end{frontmatter}
\section{Introduction}
\blindmathpaper
\begin{figure}
\centering
\includegraphics [scale=0.5, natwidth=515,natheight=377]{image.png}
\caption{test}
\label{img:fig1}
\label{tvdmd}
\end{figure}
\end{document}
3) Using *.pdf
instead of *.png
(can't see the image):
\documentclass[review]{elsarticle}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
% FOR TEST ONLY
\usepackage[english]{babel}
\usepackage{blindtext}
\journal{Journal of \LaTeX\ Templates}
\bibliographystyle{elsarticle-num}
\begin{document}
\begin{frontmatter}
\title{Test}
\author{Test Test \corref{mycorrespondingauthor}}
\address{Institute of Computer Science}
\cortext[mycorrespondingauthor]{Corresponding author}
\ead{test@gmail.com}
\begin{abstract}
\blindtext
\end{abstract}
\begin{keyword}
\blinddescription
\end{keyword}
\end{frontmatter}
\section{Introduction}
\blindmathpaper
\begin{figure}
\centering
\includegraphics [scale=0.5, natwidth=515,natheight=377]{image.pdf}
\caption{test}
\label{img:fig1}
\label{tvdmd}
\end{figure}
\end{document}
4) Using *.pdf
WITHOUT natwidth
and natheight
gives: LaTeX Error: Cannot determine size of graphic in tvdmd.pdf (no BoundingBox).
\documentclass[review]{elsarticle}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
% FOR TEST ONLY
\usepackage[english]{babel}
\usepackage{blindtext}
\journal{Journal of \LaTeX\ Templates}
\bibliographystyle{elsarticle-num}
\begin{document}
\begin{frontmatter}
\title{Test}
\author{Test Test \corref{mycorrespondingauthor}}
\address{Institute of Computer Science}
\cortext[mycorrespondingauthor]{Corresponding author}
\ead{test@gmail.com}
\begin{abstract}
\blindtext
\end{abstract}
\begin{keyword}
\blinddescription
\end{keyword}
\end{frontmatter}
\section{Introduction}
\blindmathpaper
\begin{figure}
\centering
\includegraphics [scale=0.5]{tvdmd.pdf}
\caption{test}
\label{img:fig1}
\label{tvdmd}
\end{figure}
\end{document}
Moreover, in each of the above situations, I got some extra additional errors, every time (1)-4)):
elsarticle-template.dvi -> elsarticle-template.pdf
[1
** WARNING ** Unparsed material at end of special ignored.
Current input buffer is -->! systemdict /pdfmark known{userdict /?pdfmark sys...<--
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(72, 720)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin [/Producer (dvips + Distiller)/Title ()/Subje..."
** WARNING ** >> Reading special command stopped around >>begin [/Producer (dvips + Distiller)/Title ()/Subject ()/Cre...<<
** WARNING ** Unparsed material at end of special ignored.
Current input buffer is -->! /DvipsToPDF{72.27 mul Resolution div} def/PDFToD...<--
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(72, 720)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin /product where{pop product(Distiller)search{p..."
** WARNING ** >> Reading special command stopped around >>begin /product where{pop product(Distiller)search{pop pop po...<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(132.768, 705.06)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin H.S end"
** WARNING ** >> Reading special command stopped around >>begin H.S end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(132.768, 705.06)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin H.R end"
** WARNING ** >> Reading special command stopped around >>begin H.R end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(132.768, 705.06)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin [/View [/XYZ H.V]/Dest (page.1) cvn /DEST pdf..."
** WARNING ** >> Reading special command stopped around >>begin [/View [/XYZ H.V]/Dest (page.1) cvn /DEST pdfmark end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(133.768, 667.198)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin [/Count -0/Dest (section.1) cvn/Title (Introd..."
** WARNING ** >> Reading special command stopped around >>begin [/Count -0/Dest (section.1) cvn/Title (Introduction) /...<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(133.768, 667.198)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin [/PageMode /UseOutlines/Page 1/View [/Fit] /D..."
** WARNING ** >> Reading special command stopped around >>begin [/PageMode /UseOutlines/Page 1/View [/Fit] /DOCVIEW pd...<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(133.768, 667.198)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin [ {Catalog}<<>> /PUT pdfmark end"
** WARNING ** >> Reading special command stopped around >>begin [ {Catalog}<<>> /PUT pdfmark end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(133.768, 667.198)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin H.S end"
** WARNING ** >> Reading special command stopped around >>begin H.S end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(133.768, 667.198)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin 18 H.A end"
** WARNING ** >> Reading special command stopped around >>begin 18 H.A end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(133.768, 667.198)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin [/View [/XYZ H.V]/Dest (Doc-Start) cvn /DEST ..."
** WARNING ** >> Reading special command stopped around >>begin [/View [/XYZ H.V]/Dest (Doc-Start) cvn /DEST pdfmark e..<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(133.768, 667.198)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin H.S end"
** WARNING ** >> Reading special command stopped around >>begin H.S end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(133.768, 667.198)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin 18 H.A end"
** WARNING ** >> Reading special command stopped around >>begin 18 H.A end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(133.768, 667.198)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin [/View [/XYZ H.V]/Dest (cnote.1) cvn /DEST pd..."
** WARNING ** >> Reading special command stopped around >>begin [/View [/XYZ H.V]/Dest (cnote.1) cvn /DEST pdfmark end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(133.768, 212.725)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin H.S end"
** WARNING ** >> Reading special command stopped around >>begin H.S end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(133.768, 212.725)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin 18 H.A end"
** WARNING ** >> Reading special command stopped around >>begin 18 H.A end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(133.768, 212.725)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin [/View [/XYZ H.V]/Dest (section.1) cvn /DEST ..."
** WARNING ** >> Reading special command stopped around >>begin [/View [/XYZ H.V]/Dest (section.1) cvn /DEST pdfmark e..<<
][2
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="2" position="(72, 720)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin /product where{pop product(Distiller)search{p..."
** WARNING ** >> Reading special command stopped around >>begin /product where{pop product(Distiller)search{pop pop po...<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="2" position="(132.768, 705.06)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin H.S end"
** WARNING ** >> Reading special command stopped around >>begin H.S end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="2" position="(132.768, 705.06)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin H.R end"
** WARNING ** >> Reading special command stopped around >>begin H.R end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="2" position="(132.768, 705.06)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin [/View [/XYZ H.V]/Dest (page.2) cvn /DEST pdf..."
** WARNING ** >> Reading special command stopped around >>begin [/View [/XYZ H.V]/Dest (page.2) cvn /DEST pdfmark end<<
][3
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="3" position="(72, 720)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin /product where{pop product(Distiller)search{p..."
** WARNING ** >> Reading special command stopped around >>begin /product where{pop product(Distiller)search{pop pop po...<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="3" position="(132.768, 705.06)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin H.S end"
** WARNING ** >> Reading special command stopped around >>begin H.S end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="3" position="(132.768, 705.06)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin H.R end"
** WARNING ** >> Reading special command stopped around >>begin H.R end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="3" position="(132.768, 705.06)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin [/View [/XYZ H.V]/Dest (page.3) cvn /DEST pdf..."
** WARNING ** >> Reading special command stopped around >>begin [/View [/XYZ H.V]/Dest (page.3) cvn /DEST pdfmark end<<
][4
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="4" position="(72, 720)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin /product where{pop product(Distiller)search{p..."
** WARNING ** >> Reading special command stopped around >>begin /product where{pop product(Distiller)search{pop pop po...<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="4" position="(132.768, 705.06)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin H.S end"
** WARNING ** >> Reading special command stopped around >>begin H.S end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="4" position="(132.768, 705.06)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin H.R end"
** WARNING ** >> Reading special command stopped around >>begin H.R end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="4" position="(132.768, 705.06)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin [/View [/XYZ H.V]/Dest (page.4) cvn /DEST pdf..."
** WARNING ** >> Reading special command stopped around >>begin [/View [/XYZ H.V]/Dest (page.4) cvn /DEST pdfmark end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="4" position="(317.305, 287.671)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin H.S end"
** WARNING ** >> Reading special command stopped around >>begin H.S end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="4" position="(317.305, 287.671)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin H.R end"
** WARNING ** >> Reading special command stopped around >>begin H.R end<<
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="4" position="(317.305, 287.671)" (in PDF)
** WARNING ** >> xxx "ps:SDict begin [/View [/XYZ H.V]/Dest (figure.1) cvn /DEST p..."
** WARNING ** >> Reading special command stopped around >>begin [/View [/XYZ H.V]/Dest (figure.1) cvn /DEST pdfmark en.<<
]
39247 bytes written
I know these are just warnings, not errors, but it results in corrupted pdf file. I compile it like this:
latex elsarticle-template.tex
dvipdfm elsarticle-template.dvi
And of course, I know that using pdflatex
everything works like a charm, but I NEED to compile it that way (since the journal I want to submit to uses this). Any ideas?
*.pdf
to*.ps
? – Werner Jun 27 '16 at 20:17pdflatex
? – Bernard Jun 27 '16 at 20:18Interpreting PS code failed!!! Output might be broken!!!
– yak Jun 27 '16 at 20:20\includegraphics
command. You need to letgraphicx
decide on the file to include depending on the compilation technique/driver (latex, or pdflatex). Alternatively, force TeX to use the.ps
or.eps
graphic file by using those extensions exclusively. – Werner Jun 27 '16 at 20:29