Which file does includegraphics select if there are multiple files with different extensions? [duplicate]
This question already has an answer here:
Graphics file extensions and their order of inclusion when not specified
2 answers
We usually write something like
includegraphics{image}
instead of:
includegraphics{image.png}
That is, includegraphics
does not usually require a file extension such as .png
.pdf
.jpg
, etc... That is,
Suppose that I have all of the following files in the same directory. Which file will includegraphics
embed?
my_pic.jpg
my_pic.psd
my_pic.png
my_pic.pdf
my_pic.jpeg
my_pic.gif
Document:
documentclass{minimal}
begin{document}
begin{figure}[htpb]
centering
includegraphics[width=linewidth]{my_pic}
caption{Sunshine and Rainbows}
Description{summertime}
end{figure}
end{document}
includegraphics
marked as duplicate by Werner, Kurt, Troy, marmot, Stefan Pinnow Jan 12 at 6:55
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Graphics file extensions and their order of inclusion when not specified
2 answers
We usually write something like
includegraphics{image}
instead of:
includegraphics{image.png}
That is, includegraphics
does not usually require a file extension such as .png
.pdf
.jpg
, etc... That is,
Suppose that I have all of the following files in the same directory. Which file will includegraphics
embed?
my_pic.jpg
my_pic.psd
my_pic.png
my_pic.pdf
my_pic.jpeg
my_pic.gif
Document:
documentclass{minimal}
begin{document}
begin{figure}[htpb]
centering
includegraphics[width=linewidth]{my_pic}
caption{Sunshine and Rainbows}
Description{summertime}
end{figure}
end{document}
includegraphics
marked as duplicate by Werner, Kurt, Troy, marmot, Stefan Pinnow Jan 12 at 6:55
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
! LaTeX Error: Environment figure undefined
– David Carlisle
Jan 11 at 20:49
add a comment |
This question already has an answer here:
Graphics file extensions and their order of inclusion when not specified
2 answers
We usually write something like
includegraphics{image}
instead of:
includegraphics{image.png}
That is, includegraphics
does not usually require a file extension such as .png
.pdf
.jpg
, etc... That is,
Suppose that I have all of the following files in the same directory. Which file will includegraphics
embed?
my_pic.jpg
my_pic.psd
my_pic.png
my_pic.pdf
my_pic.jpeg
my_pic.gif
Document:
documentclass{minimal}
begin{document}
begin{figure}[htpb]
centering
includegraphics[width=linewidth]{my_pic}
caption{Sunshine and Rainbows}
Description{summertime}
end{figure}
end{document}
includegraphics
This question already has an answer here:
Graphics file extensions and their order of inclusion when not specified
2 answers
We usually write something like
includegraphics{image}
instead of:
includegraphics{image.png}
That is, includegraphics
does not usually require a file extension such as .png
.pdf
.jpg
, etc... That is,
Suppose that I have all of the following files in the same directory. Which file will includegraphics
embed?
my_pic.jpg
my_pic.psd
my_pic.png
my_pic.pdf
my_pic.jpeg
my_pic.gif
Document:
documentclass{minimal}
begin{document}
begin{figure}[htpb]
centering
includegraphics[width=linewidth]{my_pic}
caption{Sunshine and Rainbows}
Description{summertime}
end{figure}
end{document}
This question already has an answer here:
Graphics file extensions and their order of inclusion when not specified
2 answers
includegraphics
includegraphics
edited Jan 11 at 17:02
Sigur
24.6k355138
24.6k355138
asked Jan 11 at 16:56
IdleCustardIdleCustard
3176
3176
marked as duplicate by Werner, Kurt, Troy, marmot, Stefan Pinnow Jan 12 at 6:55
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Werner, Kurt, Troy, marmot, Stefan Pinnow Jan 12 at 6:55
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
! LaTeX Error: Environment figure undefined
– David Carlisle
Jan 11 at 20:49
add a comment |
! LaTeX Error: Environment figure undefined
– David Carlisle
Jan 11 at 20:49
! LaTeX Error: Environment figure undefined
– David Carlisle
Jan 11 at 20:49
! LaTeX Error: Environment figure undefined
– David Carlisle
Jan 11 at 20:49
add a comment |
2 Answers
2
active
oldest
votes
It depends on the engine. With pdftex the current list (which you can find in pdftex.def) is:
defGin@extensions{%
.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,%
.PDF,.PNG,.JPG,.JPEG,.JBIG2,.JB2%
}
That means that e.g. pdf will be prefered, then png etc.
1
Very useful. It could be ingraphicx
documentation.
– Sigur
Jan 11 at 17:08
I always wondered: what's the point of this? Why doesn't it simply accept the full name of the file?
– Bakuriu
Jan 11 at 18:50
@Bakuriu it does accept the full name of the file.example-image.pdf
works fine.
– Ulrike Fischer
Jan 11 at 18:51
1
@Sigur the user documentation tells you how to set the listtexdoc graphics
section 4.5DeclareGraphicsExtensions
the default is driver specific and initially there were dozens of different drivers they are not documented in the core documentation.
– David Carlisle
Jan 11 at 20:40
add a comment |
As documented in the graphics guide (section 4.5), this is user settable.
If you have
DeclareGraphicsExtensions{.pdf,.png}
in your document then it will just try .pdf
then .png
in that order, and ignore the rest.
The default value as shown in Ulrike's answer is set in the driver file for the option you are using. (Using a lower level def
syntax rather than DeclareGraphicsExtensions
because the driver files might be loaded by the color
package, before DeclareGraphicsExtensions
is defined.)
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
It depends on the engine. With pdftex the current list (which you can find in pdftex.def) is:
defGin@extensions{%
.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,%
.PDF,.PNG,.JPG,.JPEG,.JBIG2,.JB2%
}
That means that e.g. pdf will be prefered, then png etc.
1
Very useful. It could be ingraphicx
documentation.
– Sigur
Jan 11 at 17:08
I always wondered: what's the point of this? Why doesn't it simply accept the full name of the file?
– Bakuriu
Jan 11 at 18:50
@Bakuriu it does accept the full name of the file.example-image.pdf
works fine.
– Ulrike Fischer
Jan 11 at 18:51
1
@Sigur the user documentation tells you how to set the listtexdoc graphics
section 4.5DeclareGraphicsExtensions
the default is driver specific and initially there were dozens of different drivers they are not documented in the core documentation.
– David Carlisle
Jan 11 at 20:40
add a comment |
It depends on the engine. With pdftex the current list (which you can find in pdftex.def) is:
defGin@extensions{%
.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,%
.PDF,.PNG,.JPG,.JPEG,.JBIG2,.JB2%
}
That means that e.g. pdf will be prefered, then png etc.
1
Very useful. It could be ingraphicx
documentation.
– Sigur
Jan 11 at 17:08
I always wondered: what's the point of this? Why doesn't it simply accept the full name of the file?
– Bakuriu
Jan 11 at 18:50
@Bakuriu it does accept the full name of the file.example-image.pdf
works fine.
– Ulrike Fischer
Jan 11 at 18:51
1
@Sigur the user documentation tells you how to set the listtexdoc graphics
section 4.5DeclareGraphicsExtensions
the default is driver specific and initially there were dozens of different drivers they are not documented in the core documentation.
– David Carlisle
Jan 11 at 20:40
add a comment |
It depends on the engine. With pdftex the current list (which you can find in pdftex.def) is:
defGin@extensions{%
.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,%
.PDF,.PNG,.JPG,.JPEG,.JBIG2,.JB2%
}
That means that e.g. pdf will be prefered, then png etc.
It depends on the engine. With pdftex the current list (which you can find in pdftex.def) is:
defGin@extensions{%
.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,%
.PDF,.PNG,.JPG,.JPEG,.JBIG2,.JB2%
}
That means that e.g. pdf will be prefered, then png etc.
answered Jan 11 at 17:06
Ulrike FischerUlrike Fischer
190k8297678
190k8297678
1
Very useful. It could be ingraphicx
documentation.
– Sigur
Jan 11 at 17:08
I always wondered: what's the point of this? Why doesn't it simply accept the full name of the file?
– Bakuriu
Jan 11 at 18:50
@Bakuriu it does accept the full name of the file.example-image.pdf
works fine.
– Ulrike Fischer
Jan 11 at 18:51
1
@Sigur the user documentation tells you how to set the listtexdoc graphics
section 4.5DeclareGraphicsExtensions
the default is driver specific and initially there were dozens of different drivers they are not documented in the core documentation.
– David Carlisle
Jan 11 at 20:40
add a comment |
1
Very useful. It could be ingraphicx
documentation.
– Sigur
Jan 11 at 17:08
I always wondered: what's the point of this? Why doesn't it simply accept the full name of the file?
– Bakuriu
Jan 11 at 18:50
@Bakuriu it does accept the full name of the file.example-image.pdf
works fine.
– Ulrike Fischer
Jan 11 at 18:51
1
@Sigur the user documentation tells you how to set the listtexdoc graphics
section 4.5DeclareGraphicsExtensions
the default is driver specific and initially there were dozens of different drivers they are not documented in the core documentation.
– David Carlisle
Jan 11 at 20:40
1
1
Very useful. It could be in
graphicx
documentation.– Sigur
Jan 11 at 17:08
Very useful. It could be in
graphicx
documentation.– Sigur
Jan 11 at 17:08
I always wondered: what's the point of this? Why doesn't it simply accept the full name of the file?
– Bakuriu
Jan 11 at 18:50
I always wondered: what's the point of this? Why doesn't it simply accept the full name of the file?
– Bakuriu
Jan 11 at 18:50
@Bakuriu it does accept the full name of the file.
example-image.pdf
works fine.– Ulrike Fischer
Jan 11 at 18:51
@Bakuriu it does accept the full name of the file.
example-image.pdf
works fine.– Ulrike Fischer
Jan 11 at 18:51
1
1
@Sigur the user documentation tells you how to set the list
texdoc graphics
section 4.5 DeclareGraphicsExtensions
the default is driver specific and initially there were dozens of different drivers they are not documented in the core documentation.– David Carlisle
Jan 11 at 20:40
@Sigur the user documentation tells you how to set the list
texdoc graphics
section 4.5 DeclareGraphicsExtensions
the default is driver specific and initially there were dozens of different drivers they are not documented in the core documentation.– David Carlisle
Jan 11 at 20:40
add a comment |
As documented in the graphics guide (section 4.5), this is user settable.
If you have
DeclareGraphicsExtensions{.pdf,.png}
in your document then it will just try .pdf
then .png
in that order, and ignore the rest.
The default value as shown in Ulrike's answer is set in the driver file for the option you are using. (Using a lower level def
syntax rather than DeclareGraphicsExtensions
because the driver files might be loaded by the color
package, before DeclareGraphicsExtensions
is defined.)
add a comment |
As documented in the graphics guide (section 4.5), this is user settable.
If you have
DeclareGraphicsExtensions{.pdf,.png}
in your document then it will just try .pdf
then .png
in that order, and ignore the rest.
The default value as shown in Ulrike's answer is set in the driver file for the option you are using. (Using a lower level def
syntax rather than DeclareGraphicsExtensions
because the driver files might be loaded by the color
package, before DeclareGraphicsExtensions
is defined.)
add a comment |
As documented in the graphics guide (section 4.5), this is user settable.
If you have
DeclareGraphicsExtensions{.pdf,.png}
in your document then it will just try .pdf
then .png
in that order, and ignore the rest.
The default value as shown in Ulrike's answer is set in the driver file for the option you are using. (Using a lower level def
syntax rather than DeclareGraphicsExtensions
because the driver files might be loaded by the color
package, before DeclareGraphicsExtensions
is defined.)
As documented in the graphics guide (section 4.5), this is user settable.
If you have
DeclareGraphicsExtensions{.pdf,.png}
in your document then it will just try .pdf
then .png
in that order, and ignore the rest.
The default value as shown in Ulrike's answer is set in the driver file for the option you are using. (Using a lower level def
syntax rather than DeclareGraphicsExtensions
because the driver files might be loaded by the color
package, before DeclareGraphicsExtensions
is defined.)
answered Jan 11 at 20:48
David CarlisleDavid Carlisle
487k4111271872
487k4111271872
add a comment |
add a comment |
! LaTeX Error: Environment figure undefined
– David Carlisle
Jan 11 at 20:49