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
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
marked as duplicate by Werner, Kurt, Troy, marmot, Stefan Pinnow 10 mins ago
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
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
marked as duplicate by Werner, Kurt, Troy, marmot, Stefan Pinnow 10 mins ago
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
10 hours ago
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
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 14 hours ago
Sigur
24.4k355138
24.4k355138
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 14 hours ago
IdleCustardIdleCustard
1456
1456
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
IdleCustard is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
marked as duplicate by Werner, Kurt, Troy, marmot, Stefan Pinnow 10 mins ago
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 10 mins ago
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
10 hours ago
add a comment |
! LaTeX Error: Environment figure undefined
– David Carlisle
10 hours ago
! LaTeX Error: Environment figure undefined– David Carlisle
10 hours ago
! LaTeX Error: Environment figure undefined– David Carlisle
10 hours ago
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 ingraphicxdocumentation.
– Sigur
13 hours ago
I always wondered: what's the point of this? Why doesn't it simply accept the full name of the file?
– Bakuriu
12 hours ago
@Bakuriu it does accept the full name of the file.example-image.pdfworks fine.
– Ulrike Fischer
12 hours ago
1
@Sigur the user documentation tells you how to set the listtexdoc graphicssection 4.5DeclareGraphicsExtensionsthe default is driver specific and initially there were dozens of different drivers they are not documented in the core documentation.
– David Carlisle
10 hours ago
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 ingraphicxdocumentation.
– Sigur
13 hours ago
I always wondered: what's the point of this? Why doesn't it simply accept the full name of the file?
– Bakuriu
12 hours ago
@Bakuriu it does accept the full name of the file.example-image.pdfworks fine.
– Ulrike Fischer
12 hours ago
1
@Sigur the user documentation tells you how to set the listtexdoc graphicssection 4.5DeclareGraphicsExtensionsthe default is driver specific and initially there were dozens of different drivers they are not documented in the core documentation.
– David Carlisle
10 hours ago
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 ingraphicxdocumentation.
– Sigur
13 hours ago
I always wondered: what's the point of this? Why doesn't it simply accept the full name of the file?
– Bakuriu
12 hours ago
@Bakuriu it does accept the full name of the file.example-image.pdfworks fine.
– Ulrike Fischer
12 hours ago
1
@Sigur the user documentation tells you how to set the listtexdoc graphicssection 4.5DeclareGraphicsExtensionsthe default is driver specific and initially there were dozens of different drivers they are not documented in the core documentation.
– David Carlisle
10 hours ago
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 13 hours ago
Ulrike FischerUlrike Fischer
188k7292673
188k7292673
1
Very useful. It could be ingraphicxdocumentation.
– Sigur
13 hours ago
I always wondered: what's the point of this? Why doesn't it simply accept the full name of the file?
– Bakuriu
12 hours ago
@Bakuriu it does accept the full name of the file.example-image.pdfworks fine.
– Ulrike Fischer
12 hours ago
1
@Sigur the user documentation tells you how to set the listtexdoc graphicssection 4.5DeclareGraphicsExtensionsthe default is driver specific and initially there were dozens of different drivers they are not documented in the core documentation.
– David Carlisle
10 hours ago
add a comment |
1
Very useful. It could be ingraphicxdocumentation.
– Sigur
13 hours ago
I always wondered: what's the point of this? Why doesn't it simply accept the full name of the file?
– Bakuriu
12 hours ago
@Bakuriu it does accept the full name of the file.example-image.pdfworks fine.
– Ulrike Fischer
12 hours ago
1
@Sigur the user documentation tells you how to set the listtexdoc graphicssection 4.5DeclareGraphicsExtensionsthe default is driver specific and initially there were dozens of different drivers they are not documented in the core documentation.
– David Carlisle
10 hours ago
1
1
Very useful. It could be in
graphicx documentation.– Sigur
13 hours ago
Very useful. It could be in
graphicx documentation.– Sigur
13 hours ago
I always wondered: what's the point of this? Why doesn't it simply accept the full name of the file?
– Bakuriu
12 hours ago
I always wondered: what's the point of this? Why doesn't it simply accept the full name of the file?
– Bakuriu
12 hours ago
@Bakuriu it does accept the full name of the file.
example-image.pdf works fine.– Ulrike Fischer
12 hours ago
@Bakuriu it does accept the full name of the file.
example-image.pdf works fine.– Ulrike Fischer
12 hours ago
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
10 hours ago
@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
10 hours ago
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 10 hours ago
David CarlisleDavid Carlisle
484k4111171859
484k4111171859
add a comment |
add a comment |
! LaTeX Error: Environment figure undefined– David Carlisle
10 hours ago