MikTex error for PNG images when trying to produce DVIHow can I fix this problem: “Cannot determine size of...
Could be quantum mechanics necessary to analyze some biology scenarios?
How would an AI self awareness kill switch work?
Do any poskim exempt 13-20-year-olds from Mussaf?
Is 45 min enough time to catch my next flight in Copenhagen?
Where is this triangular-shaped space station from?
How can I improve my fireworks photography?
Dilemma of explaining to interviewer that he is the reason for declining second interview
Can a person refuse a presidential pardon?
Finding ratio of the area of triangles
Do authors have to be politically correct in article-writing?
c++ How can I make an algorithm for finding variations of a set without repetition (i.e. n elements, choose k)?
Eww, those bytes are gross
What's a good word to describe a public place that looks like it wouldn't be rough?
Table enclosed in curly brackets
Do my Windows system binaries contain sensitive information?
How to push a box with physics engine by another object?
Why is commutativity optional in multiplication for rings?
Using AWS Fargate as web server
Inventor that creates machine that grabs man from future
Connecting top and bottom of adjacent circles
Where was Karl Mordo in Infinity War?
raspberry pi change directory (cd) command not working with USB drive
Do commercial flights continue with an engine out?
"Sheng" as a male given name
MikTex error for PNG images when trying to produce DVI
How can I fix this problem: “Cannot determine size of graphic”Cannot determine size of graphicIs there any reason to compile to DVI rather than PDF these days?Including graphics for both DVI and PNGError including a .png: Cannot determine size of graphicCannot determine size of graphicHow can I fix this problem: “Cannot determine size of graphic”Including graphics for both DVI and PNGHow do I put a bounding box around a poorly saved .SVG image?problem to insert inkscape pdf into latexLaTeX Error: Option clash for package graphicxError: LaTeX Error: Cannot determine size of graphic in PRV_internal_structure.jpg (no BoundingBox)pdfLatex vs Latex>DVI>PS>PDF for EPS, PDF, PNG images (Texstudio)Updated MiKTeX won't produce JPG or PNG files! LaTeX Error: Cannot determine size of graphic in…pdf or png (no BoundingBox)
I have a tex
file with includegraphic
elements for some PNG images.
I use MikTeX on Windows and the PDF is fine.
Now, I need a DVI so I tried using: pdfoutput=0
This creates a DVI, but only after I remove all the PNG images…
Otherwise I get errors like:
! LaTeX Error: Cannot determine size of graphic in math-box-plot.png (no BoundingBox).
graphics errors miktex png dvi
add a comment |
I have a tex
file with includegraphic
elements for some PNG images.
I use MikTeX on Windows and the PDF is fine.
Now, I need a DVI so I tried using: pdfoutput=0
This creates a DVI, but only after I remove all the PNG images…
Otherwise I get errors like:
! LaTeX Error: Cannot determine size of graphic in math-box-plot.png (no BoundingBox).
graphics errors miktex png dvi
You should also consider compiling to PDF rather than DVI.
– Juan A. Navarro
Feb 16 '11 at 10:06
I converted the PNG files to EPS and used those in includegraphics and it works.
– Hagai Cibulski
Feb 18 '11 at 9:17
add a comment |
I have a tex
file with includegraphic
elements for some PNG images.
I use MikTeX on Windows and the PDF is fine.
Now, I need a DVI so I tried using: pdfoutput=0
This creates a DVI, but only after I remove all the PNG images…
Otherwise I get errors like:
! LaTeX Error: Cannot determine size of graphic in math-box-plot.png (no BoundingBox).
graphics errors miktex png dvi
I have a tex
file with includegraphic
elements for some PNG images.
I use MikTeX on Windows and the PDF is fine.
Now, I need a DVI so I tried using: pdfoutput=0
This creates a DVI, but only after I remove all the PNG images…
Otherwise I get errors like:
! LaTeX Error: Cannot determine size of graphic in math-box-plot.png (no BoundingBox).
graphics errors miktex png dvi
graphics errors miktex png dvi
edited Jan 22 '13 at 15:55
Martin Schröder
12.9k640125
12.9k640125
asked Feb 16 '11 at 8:14
Hagai CibulskiHagai Cibulski
410268
410268
You should also consider compiling to PDF rather than DVI.
– Juan A. Navarro
Feb 16 '11 at 10:06
I converted the PNG files to EPS and used those in includegraphics and it works.
– Hagai Cibulski
Feb 18 '11 at 9:17
add a comment |
You should also consider compiling to PDF rather than DVI.
– Juan A. Navarro
Feb 16 '11 at 10:06
I converted the PNG files to EPS and used those in includegraphics and it works.
– Hagai Cibulski
Feb 18 '11 at 9:17
You should also consider compiling to PDF rather than DVI.
– Juan A. Navarro
Feb 16 '11 at 10:06
You should also consider compiling to PDF rather than DVI.
– Juan A. Navarro
Feb 16 '11 at 10:06
I converted the PNG files to EPS and used those in includegraphics and it works.
– Hagai Cibulski
Feb 18 '11 at 9:17
I converted the PNG files to EPS and used those in includegraphics and it works.
– Hagai Cibulski
Feb 18 '11 at 9:17
add a comment |
3 Answers
3
active
oldest
votes
TeX is text based, it cannot determine the size of PNG image itself by default.
A quick solution:
usepackage{bmpsize}
And use
usepackage[dvipdfmx]{graphicx}
It is better to use extractbb
(also named ebb
, xbb
) program to produce .bb
or .xbb
file for LaTeX. Use this command in 'Command Prompt':
for %i in (*.png) do xbb %i
(or for %i in (*.png) do extractbb -x %i
, I'm not sure about MiKTeX.)
And use
usepackage[dvipdfmx]{graphicx}
(I use TeX Live, only dvipdfmx supports png images. But MiKTeX seems different, I can't remember well.)
1
Leo, you better use<code> ... </code>
blocks for the command line and similar text to avoid the TeX syntax highlighter.
– Martin Scharrer♦
Feb 16 '11 at 8:41
@Martin: I did not realise that the two were handled differently
– Joseph Wright♦
Feb 16 '11 at 9:28
@Joseph: The syntax highlighting is done in<pre class="prettyprint lang-tex">
tags around<code>
. Therefore single<code>
tags on their own are not highlighted.
– Martin Scharrer♦
Feb 16 '11 at 9:36
add a comment |
Install the program ImageMagick, then you can do it on the fly:
documentclass{article}
usepackage[dvips]{graphicx}
DeclareGraphicsRule{.png}{eps}{.bb}{`convert #1 eps:-}
DeclareGraphicsRule{.gif}{eps}{.bb}{`convert #1 eps:-}
usepackage{grfext}
AppendGraphicsExtensions*{.png,.gif}
usepackage{bmpsize}
makeatletter
newcommand*{IncludeGraphics}[2][]{%
begingroup
let@found@empty
@for@type:=bmpsize@typesdo{%
ifx@found@empty
@nameuse{bmpsize@read@@type}{#2.@type}%
ifbmpsize@ok
let@found=@type
fi
fi
}%
ifx@found@empty
includegraphics[{#1}]{#2}%
else
includegraphics[{natwidth=bmpsize@width,natheight=bmpsize@height,#1}]{#2}%
fi
endgroup
}
makeatother
begin{document}
IncludeGraphics{lion}qquad % a png image
IncludeGraphics{knuth-tex} % a gif image
end{document}
btw: you do not need the pdfoutput=0
simply run latex
instead of pdflatex
It may be too tricky for new TeXers, with no actual advantage. BTW, ImageMagick may be overkill,bmeps
is enough.
– Leo Liu
Feb 16 '11 at 11:34
1
no, it isn't, and ImagaMagick can be used for any other conversion, hence it is no overkill.
– Herbert
Feb 16 '11 at 12:07
add a comment |
I always make portable latex source equally suitable for compiling both with latex and pdflatex. My remedy is rather simple.
Put usepackage{graphicx}
into preample (without any driver specified).
Import eps
or pdf
graphics with includegraphics{filename}
; latex compiler then loads filename.eps
whereas pdflatex takes filename.pdf
. MikTeX automatically converts eps
into pdf
on fly if the epstopdf
package is loaded.
Import png
graphics with includegraphics[nathwith=<XX>bp, natheight=<YY>bp, width=<width>]{filename.png}
with .png
extension explicitly shown; in that case you dont need to invent DeclareGraphicsRule
. Natural height and width of bitmap graphics can be determined from file properties in Windows Explorer or any graphics editor, e.g. Windows Paint.
Does this work with plain DVI-producing latex, not just pdflatex?
– einpoklum
Jul 6 '14 at 15:52
@Igor Kotelnikov: I can't do "two-character swaped edits"; maybe fixnathwith
– U. Windl
2 mins ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f11193%2fmiktex-error-for-png-images-when-trying-to-produce-dvi%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
TeX is text based, it cannot determine the size of PNG image itself by default.
A quick solution:
usepackage{bmpsize}
And use
usepackage[dvipdfmx]{graphicx}
It is better to use extractbb
(also named ebb
, xbb
) program to produce .bb
or .xbb
file for LaTeX. Use this command in 'Command Prompt':
for %i in (*.png) do xbb %i
(or for %i in (*.png) do extractbb -x %i
, I'm not sure about MiKTeX.)
And use
usepackage[dvipdfmx]{graphicx}
(I use TeX Live, only dvipdfmx supports png images. But MiKTeX seems different, I can't remember well.)
1
Leo, you better use<code> ... </code>
blocks for the command line and similar text to avoid the TeX syntax highlighter.
– Martin Scharrer♦
Feb 16 '11 at 8:41
@Martin: I did not realise that the two were handled differently
– Joseph Wright♦
Feb 16 '11 at 9:28
@Joseph: The syntax highlighting is done in<pre class="prettyprint lang-tex">
tags around<code>
. Therefore single<code>
tags on their own are not highlighted.
– Martin Scharrer♦
Feb 16 '11 at 9:36
add a comment |
TeX is text based, it cannot determine the size of PNG image itself by default.
A quick solution:
usepackage{bmpsize}
And use
usepackage[dvipdfmx]{graphicx}
It is better to use extractbb
(also named ebb
, xbb
) program to produce .bb
or .xbb
file for LaTeX. Use this command in 'Command Prompt':
for %i in (*.png) do xbb %i
(or for %i in (*.png) do extractbb -x %i
, I'm not sure about MiKTeX.)
And use
usepackage[dvipdfmx]{graphicx}
(I use TeX Live, only dvipdfmx supports png images. But MiKTeX seems different, I can't remember well.)
1
Leo, you better use<code> ... </code>
blocks for the command line and similar text to avoid the TeX syntax highlighter.
– Martin Scharrer♦
Feb 16 '11 at 8:41
@Martin: I did not realise that the two were handled differently
– Joseph Wright♦
Feb 16 '11 at 9:28
@Joseph: The syntax highlighting is done in<pre class="prettyprint lang-tex">
tags around<code>
. Therefore single<code>
tags on their own are not highlighted.
– Martin Scharrer♦
Feb 16 '11 at 9:36
add a comment |
TeX is text based, it cannot determine the size of PNG image itself by default.
A quick solution:
usepackage{bmpsize}
And use
usepackage[dvipdfmx]{graphicx}
It is better to use extractbb
(also named ebb
, xbb
) program to produce .bb
or .xbb
file for LaTeX. Use this command in 'Command Prompt':
for %i in (*.png) do xbb %i
(or for %i in (*.png) do extractbb -x %i
, I'm not sure about MiKTeX.)
And use
usepackage[dvipdfmx]{graphicx}
(I use TeX Live, only dvipdfmx supports png images. But MiKTeX seems different, I can't remember well.)
TeX is text based, it cannot determine the size of PNG image itself by default.
A quick solution:
usepackage{bmpsize}
And use
usepackage[dvipdfmx]{graphicx}
It is better to use extractbb
(also named ebb
, xbb
) program to produce .bb
or .xbb
file for LaTeX. Use this command in 'Command Prompt':
for %i in (*.png) do xbb %i
(or for %i in (*.png) do extractbb -x %i
, I'm not sure about MiKTeX.)
And use
usepackage[dvipdfmx]{graphicx}
(I use TeX Live, only dvipdfmx supports png images. But MiKTeX seems different, I can't remember well.)
edited Feb 16 '11 at 8:48
answered Feb 16 '11 at 8:29
Leo LiuLeo Liu
63.5k7185262
63.5k7185262
1
Leo, you better use<code> ... </code>
blocks for the command line and similar text to avoid the TeX syntax highlighter.
– Martin Scharrer♦
Feb 16 '11 at 8:41
@Martin: I did not realise that the two were handled differently
– Joseph Wright♦
Feb 16 '11 at 9:28
@Joseph: The syntax highlighting is done in<pre class="prettyprint lang-tex">
tags around<code>
. Therefore single<code>
tags on their own are not highlighted.
– Martin Scharrer♦
Feb 16 '11 at 9:36
add a comment |
1
Leo, you better use<code> ... </code>
blocks for the command line and similar text to avoid the TeX syntax highlighter.
– Martin Scharrer♦
Feb 16 '11 at 8:41
@Martin: I did not realise that the two were handled differently
– Joseph Wright♦
Feb 16 '11 at 9:28
@Joseph: The syntax highlighting is done in<pre class="prettyprint lang-tex">
tags around<code>
. Therefore single<code>
tags on their own are not highlighted.
– Martin Scharrer♦
Feb 16 '11 at 9:36
1
1
Leo, you better use
<code> ... </code>
blocks for the command line and similar text to avoid the TeX syntax highlighter.– Martin Scharrer♦
Feb 16 '11 at 8:41
Leo, you better use
<code> ... </code>
blocks for the command line and similar text to avoid the TeX syntax highlighter.– Martin Scharrer♦
Feb 16 '11 at 8:41
@Martin: I did not realise that the two were handled differently
– Joseph Wright♦
Feb 16 '11 at 9:28
@Martin: I did not realise that the two were handled differently
– Joseph Wright♦
Feb 16 '11 at 9:28
@Joseph: The syntax highlighting is done in
<pre class="prettyprint lang-tex">
tags around <code>
. Therefore single <code>
tags on their own are not highlighted.– Martin Scharrer♦
Feb 16 '11 at 9:36
@Joseph: The syntax highlighting is done in
<pre class="prettyprint lang-tex">
tags around <code>
. Therefore single <code>
tags on their own are not highlighted.– Martin Scharrer♦
Feb 16 '11 at 9:36
add a comment |
Install the program ImageMagick, then you can do it on the fly:
documentclass{article}
usepackage[dvips]{graphicx}
DeclareGraphicsRule{.png}{eps}{.bb}{`convert #1 eps:-}
DeclareGraphicsRule{.gif}{eps}{.bb}{`convert #1 eps:-}
usepackage{grfext}
AppendGraphicsExtensions*{.png,.gif}
usepackage{bmpsize}
makeatletter
newcommand*{IncludeGraphics}[2][]{%
begingroup
let@found@empty
@for@type:=bmpsize@typesdo{%
ifx@found@empty
@nameuse{bmpsize@read@@type}{#2.@type}%
ifbmpsize@ok
let@found=@type
fi
fi
}%
ifx@found@empty
includegraphics[{#1}]{#2}%
else
includegraphics[{natwidth=bmpsize@width,natheight=bmpsize@height,#1}]{#2}%
fi
endgroup
}
makeatother
begin{document}
IncludeGraphics{lion}qquad % a png image
IncludeGraphics{knuth-tex} % a gif image
end{document}
btw: you do not need the pdfoutput=0
simply run latex
instead of pdflatex
It may be too tricky for new TeXers, with no actual advantage. BTW, ImageMagick may be overkill,bmeps
is enough.
– Leo Liu
Feb 16 '11 at 11:34
1
no, it isn't, and ImagaMagick can be used for any other conversion, hence it is no overkill.
– Herbert
Feb 16 '11 at 12:07
add a comment |
Install the program ImageMagick, then you can do it on the fly:
documentclass{article}
usepackage[dvips]{graphicx}
DeclareGraphicsRule{.png}{eps}{.bb}{`convert #1 eps:-}
DeclareGraphicsRule{.gif}{eps}{.bb}{`convert #1 eps:-}
usepackage{grfext}
AppendGraphicsExtensions*{.png,.gif}
usepackage{bmpsize}
makeatletter
newcommand*{IncludeGraphics}[2][]{%
begingroup
let@found@empty
@for@type:=bmpsize@typesdo{%
ifx@found@empty
@nameuse{bmpsize@read@@type}{#2.@type}%
ifbmpsize@ok
let@found=@type
fi
fi
}%
ifx@found@empty
includegraphics[{#1}]{#2}%
else
includegraphics[{natwidth=bmpsize@width,natheight=bmpsize@height,#1}]{#2}%
fi
endgroup
}
makeatother
begin{document}
IncludeGraphics{lion}qquad % a png image
IncludeGraphics{knuth-tex} % a gif image
end{document}
btw: you do not need the pdfoutput=0
simply run latex
instead of pdflatex
It may be too tricky for new TeXers, with no actual advantage. BTW, ImageMagick may be overkill,bmeps
is enough.
– Leo Liu
Feb 16 '11 at 11:34
1
no, it isn't, and ImagaMagick can be used for any other conversion, hence it is no overkill.
– Herbert
Feb 16 '11 at 12:07
add a comment |
Install the program ImageMagick, then you can do it on the fly:
documentclass{article}
usepackage[dvips]{graphicx}
DeclareGraphicsRule{.png}{eps}{.bb}{`convert #1 eps:-}
DeclareGraphicsRule{.gif}{eps}{.bb}{`convert #1 eps:-}
usepackage{grfext}
AppendGraphicsExtensions*{.png,.gif}
usepackage{bmpsize}
makeatletter
newcommand*{IncludeGraphics}[2][]{%
begingroup
let@found@empty
@for@type:=bmpsize@typesdo{%
ifx@found@empty
@nameuse{bmpsize@read@@type}{#2.@type}%
ifbmpsize@ok
let@found=@type
fi
fi
}%
ifx@found@empty
includegraphics[{#1}]{#2}%
else
includegraphics[{natwidth=bmpsize@width,natheight=bmpsize@height,#1}]{#2}%
fi
endgroup
}
makeatother
begin{document}
IncludeGraphics{lion}qquad % a png image
IncludeGraphics{knuth-tex} % a gif image
end{document}
btw: you do not need the pdfoutput=0
simply run latex
instead of pdflatex
Install the program ImageMagick, then you can do it on the fly:
documentclass{article}
usepackage[dvips]{graphicx}
DeclareGraphicsRule{.png}{eps}{.bb}{`convert #1 eps:-}
DeclareGraphicsRule{.gif}{eps}{.bb}{`convert #1 eps:-}
usepackage{grfext}
AppendGraphicsExtensions*{.png,.gif}
usepackage{bmpsize}
makeatletter
newcommand*{IncludeGraphics}[2][]{%
begingroup
let@found@empty
@for@type:=bmpsize@typesdo{%
ifx@found@empty
@nameuse{bmpsize@read@@type}{#2.@type}%
ifbmpsize@ok
let@found=@type
fi
fi
}%
ifx@found@empty
includegraphics[{#1}]{#2}%
else
includegraphics[{natwidth=bmpsize@width,natheight=bmpsize@height,#1}]{#2}%
fi
endgroup
}
makeatother
begin{document}
IncludeGraphics{lion}qquad % a png image
IncludeGraphics{knuth-tex} % a gif image
end{document}
btw: you do not need the pdfoutput=0
simply run latex
instead of pdflatex
answered Feb 16 '11 at 10:24
HerbertHerbert
275k24418730
275k24418730
It may be too tricky for new TeXers, with no actual advantage. BTW, ImageMagick may be overkill,bmeps
is enough.
– Leo Liu
Feb 16 '11 at 11:34
1
no, it isn't, and ImagaMagick can be used for any other conversion, hence it is no overkill.
– Herbert
Feb 16 '11 at 12:07
add a comment |
It may be too tricky for new TeXers, with no actual advantage. BTW, ImageMagick may be overkill,bmeps
is enough.
– Leo Liu
Feb 16 '11 at 11:34
1
no, it isn't, and ImagaMagick can be used for any other conversion, hence it is no overkill.
– Herbert
Feb 16 '11 at 12:07
It may be too tricky for new TeXers, with no actual advantage. BTW, ImageMagick may be overkill,
bmeps
is enough.– Leo Liu
Feb 16 '11 at 11:34
It may be too tricky for new TeXers, with no actual advantage. BTW, ImageMagick may be overkill,
bmeps
is enough.– Leo Liu
Feb 16 '11 at 11:34
1
1
no, it isn't, and ImagaMagick can be used for any other conversion, hence it is no overkill.
– Herbert
Feb 16 '11 at 12:07
no, it isn't, and ImagaMagick can be used for any other conversion, hence it is no overkill.
– Herbert
Feb 16 '11 at 12:07
add a comment |
I always make portable latex source equally suitable for compiling both with latex and pdflatex. My remedy is rather simple.
Put usepackage{graphicx}
into preample (without any driver specified).
Import eps
or pdf
graphics with includegraphics{filename}
; latex compiler then loads filename.eps
whereas pdflatex takes filename.pdf
. MikTeX automatically converts eps
into pdf
on fly if the epstopdf
package is loaded.
Import png
graphics with includegraphics[nathwith=<XX>bp, natheight=<YY>bp, width=<width>]{filename.png}
with .png
extension explicitly shown; in that case you dont need to invent DeclareGraphicsRule
. Natural height and width of bitmap graphics can be determined from file properties in Windows Explorer or any graphics editor, e.g. Windows Paint.
Does this work with plain DVI-producing latex, not just pdflatex?
– einpoklum
Jul 6 '14 at 15:52
@Igor Kotelnikov: I can't do "two-character swaped edits"; maybe fixnathwith
– U. Windl
2 mins ago
add a comment |
I always make portable latex source equally suitable for compiling both with latex and pdflatex. My remedy is rather simple.
Put usepackage{graphicx}
into preample (without any driver specified).
Import eps
or pdf
graphics with includegraphics{filename}
; latex compiler then loads filename.eps
whereas pdflatex takes filename.pdf
. MikTeX automatically converts eps
into pdf
on fly if the epstopdf
package is loaded.
Import png
graphics with includegraphics[nathwith=<XX>bp, natheight=<YY>bp, width=<width>]{filename.png}
with .png
extension explicitly shown; in that case you dont need to invent DeclareGraphicsRule
. Natural height and width of bitmap graphics can be determined from file properties in Windows Explorer or any graphics editor, e.g. Windows Paint.
Does this work with plain DVI-producing latex, not just pdflatex?
– einpoklum
Jul 6 '14 at 15:52
@Igor Kotelnikov: I can't do "two-character swaped edits"; maybe fixnathwith
– U. Windl
2 mins ago
add a comment |
I always make portable latex source equally suitable for compiling both with latex and pdflatex. My remedy is rather simple.
Put usepackage{graphicx}
into preample (without any driver specified).
Import eps
or pdf
graphics with includegraphics{filename}
; latex compiler then loads filename.eps
whereas pdflatex takes filename.pdf
. MikTeX automatically converts eps
into pdf
on fly if the epstopdf
package is loaded.
Import png
graphics with includegraphics[nathwith=<XX>bp, natheight=<YY>bp, width=<width>]{filename.png}
with .png
extension explicitly shown; in that case you dont need to invent DeclareGraphicsRule
. Natural height and width of bitmap graphics can be determined from file properties in Windows Explorer or any graphics editor, e.g. Windows Paint.
I always make portable latex source equally suitable for compiling both with latex and pdflatex. My remedy is rather simple.
Put usepackage{graphicx}
into preample (without any driver specified).
Import eps
or pdf
graphics with includegraphics{filename}
; latex compiler then loads filename.eps
whereas pdflatex takes filename.pdf
. MikTeX automatically converts eps
into pdf
on fly if the epstopdf
package is loaded.
Import png
graphics with includegraphics[nathwith=<XX>bp, natheight=<YY>bp, width=<width>]{filename.png}
with .png
extension explicitly shown; in that case you dont need to invent DeclareGraphicsRule
. Natural height and width of bitmap graphics can be determined from file properties in Windows Explorer or any graphics editor, e.g. Windows Paint.
edited 9 mins ago
U. Windl
1031
1031
answered Feb 26 '11 at 14:07
Igor KotelnikovIgor Kotelnikov
7,13964282
7,13964282
Does this work with plain DVI-producing latex, not just pdflatex?
– einpoklum
Jul 6 '14 at 15:52
@Igor Kotelnikov: I can't do "two-character swaped edits"; maybe fixnathwith
– U. Windl
2 mins ago
add a comment |
Does this work with plain DVI-producing latex, not just pdflatex?
– einpoklum
Jul 6 '14 at 15:52
@Igor Kotelnikov: I can't do "two-character swaped edits"; maybe fixnathwith
– U. Windl
2 mins ago
Does this work with plain DVI-producing latex, not just pdflatex?
– einpoklum
Jul 6 '14 at 15:52
Does this work with plain DVI-producing latex, not just pdflatex?
– einpoklum
Jul 6 '14 at 15:52
@Igor Kotelnikov: I can't do "two-character swaped edits"; maybe fix
nathwith
– U. Windl
2 mins ago
@Igor Kotelnikov: I can't do "two-character swaped edits"; maybe fix
nathwith
– U. Windl
2 mins ago
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f11193%2fmiktex-error-for-png-images-when-trying-to-produce-dvi%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You should also consider compiling to PDF rather than DVI.
– Juan A. Navarro
Feb 16 '11 at 10:06
I converted the PNG files to EPS and used those in includegraphics and it works.
– Hagai Cibulski
Feb 18 '11 at 9:17