Graphics, Figures & TablesTexnicCenter not accept my.image.with.3.dots.jpg

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
steinchen
Posts: 21
Joined: Thu Oct 29, 2009 12:18 pm

TexnicCenter not accept my.image.with.3.dots.jpg

Post by steinchen »

I have my pictures named with more dots in it, e.g.

Code: Select all

\includegraphics{my.imagew.with.3.dots.jpg}
Then TexnicCenter (stable version) will not recognize it and compile with error. I have to change the name to :

Code: Select all

\includegraphics{my_imagew_with_3_dots.jpg}
Does anyone also have the same problem? would prefer anyone to give me a hint...

or it is a bug?


thanks and regards

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

TexnicCenter not accept my.image.with.3.dots.jpg

Post by localghost »

I'm sure that TeXnicCenter (TXC) accepts this kind of filename. It's usually the compiler that complains. I wonder that a filename with underscores doesn't cause any trouble. Please prepare a minimal working example (MWE) together with the according log file. The exact error message is very important.


Best regards
Thorsten
steinchen
Posts: 21
Joined: Thu Oct 29, 2009 12:18 pm

TexnicCenter not accept my.image.with.3.dots.jpg

Post by steinchen »

Thanks for your reply!
I found just now, the problem is only with LaTeX => PDF, if with LaTeX=>PS=>PDF then is OK!
Here is my MWE:
------------

Code: Select all

\documentclass[a4paper,12pt]{book}%
\usepackage{graphicx}
\usepackage[latin2]{inputenc}
\begin{document}
This a test!
\includegraphics{logo.contest.png}
\end{document}
and the log file(I have the this picture:Image:
---------------

Code: Select all

This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) (preloaded format=pdflatex 2009.11.25)  2 DEC 2009 18:24
entering extended mode
**C:/Documents*and*Settings/steinchen/My*Documents/LaTex/MWE/MWE.tex
("C:/Documents and Settings/steinchen/My Documents/LaTex/MWE/MWE.tex"
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded.
("C:\Program Files\MiKTeX 2.8\tex\latex\base\book.cls"
Document Class: book 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.8\tex\latex\base\bk12.clo"
File: bk12.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@chapter=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Program Files\MiKTeX 2.8\tex\latex\graphics\graphicx.sty"
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)

("C:\Program Files\MiKTeX 2.8\tex\latex\graphics\keyval.sty"
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks14
)
("C:\Program Files\MiKTeX 2.8\tex\latex\graphics\graphics.sty"
Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)

("C:\Program Files\MiKTeX 2.8\tex\latex\graphics\trig.sty"
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
)
("C:\Program Files\MiKTeX 2.8\tex\latex\00miktex\graphics.cfg"
File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
)
Package graphics Info: Driver file: pdftex.def on input line 91.

("C:\Program Files\MiKTeX 2.8\tex\latex\pdftex-def\pdftex.def"
File: pdftex.def 2009/08/25 v0.04m Graphics/color for pdfTeX
\Gread@gobject=\count88
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
("C:\Program Files\MiKTeX 2.8\tex\latex\base\inputenc.sty"
Package: inputenc 2008/03/30 v1.1d Input encoding file
\inpenc@prehook=\toks15
\inpenc@posthook=\toks16

("C:\Program Files\MiKTeX 2.8\tex\latex\base\latin2.def"
File: latin2.def 2008/03/30 v1.1d Input encoding file
))
("C:\Documents and Settings\Steinchen\My Documents\LaTex\MWE\MWE.aux")
LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.

("C:\Program Files\MiKTeX 2.8\tex\context\base\supp-pdf.tex"
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count89
\scratchdimen=\dimen105
\scratchbox=\box26
\nofMPsegments=\count90
\nofMParguments=\count91
\everyMPshowfont=\toks17
\MPscratchCnt=\count92
\MPscratchDim=\dimen106
\MPnumerator=\count93
\everyMPtoPDFconversion=\toks18
)

! LaTeX Error: Unknown graphics extension: .contest.png.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.10 \includegraphics{logo.contest.png}
                                       
Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

[1{C:/Documents and Settings/Steinchen/Local Settings/Application Data/MiKTeX/2.8/pdft
ex/config/pdftex.map}

]
("C:\Documents and Settings\Steinchen\My Documents\LaTex\MWE\MWE.aux") ) 
Here is how much of TeX's memory you used:
 933 strings out of 495285
 12064 string characters out of 3180348
 59509 words of memory out of 3000000
 4183 multiletter control sequences out of 15000+200000
 4290 words of font info for 16 fonts, out of 3000000 for 9000
 14 hyphenation exceptions out of 8191
 25i,4n,19p,261b,141s stack positions out of 5000i,500n,10000p,200000b,50000s
<C:/Program Fi
les/MiKTeX 2.8/fonts/type1/public/amsfonts/cm/cmr12.pfb>
Output written on MWE.pdf (1 page, 10221 bytes).
PDF statistics:
 10 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)

The Error messege is "! LaTeX Error: Unknown graphics extension: .contest.png."
Thanks for your advices.

Regards
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

TexnicCenter not accept my.image.with.3.dots.jpg

Post by localghost »

The compiler interprets everything that comes after the first dot in the filename as the suffix. Therefore it is not recommendable to use dots in the filename. Other special characters like blank spaces and underscores should also be avoided. Even more astonishing is the fact that it seems to work with the latex compiler engine. Generally I would advice to choose clear filenames. Even a suffix is not needed since the graphicx package detects on its own which compiler engine is running and chooses the right file format. If you need this system of naming files I suggest to use dashes instead of dots.
Post Reply