I am working on a collaborative Latex project which is hosted on a svn server. The project uses forward slash as the path separator in the tex source. e.g,
\includegraphics[width=0.15\textwidth]{img/EC}
This creates a problem for me as I get a 'File not found' Latex error on TeXnicCenter for this. I think this is because I am on Windows and TexnicCenter does not understand / as a path separator. Is there some way to fix this?
I am using Latex --> PDF profile, which uses this compiler C:\Program Files\MiKTeX 2.9\miktex\bin\pdflatex.exe.
Just to clarify, I don't have write permission on most of the core tex files, so I cannot do a replace all / with \. Plus most of the other people are using Linux, so it will be impossible for me to convince them to shift to \.
The contents of MWE .log file:-
This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2011.9.20) 8 APR 2014 16:50
entering extended mode
**MWE.tex
(E:\escudo\proposal\MWE.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, arabic, armenian, assamese, basque, bengali
, bokmal, bulgarian, catalan, coptic, croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, galic
ian, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, icelandic, indonesian, interlingua, irish, italian,
kannada, kurmanji, lao, latin, latvian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, ng
erman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese, romanian, russian, sanskrit, serbian, slovak, s
lovenian, spanish, swedish, swissgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usenglishm
ax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\epstopdf.sty"
Package: epstopdf 2010/02/09 v2.5 Conversion with epstopdf on the fly (HO)
("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\epstopdf-base.sty"
Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty"
Package: infwarerr 2010/04/08 v1.3 Providing info/warning/message (HO)
)
("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\grfext.sty"
Package: grfext 2010/08/19 v1.1 Managing graphics extensions (HO)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\kvdefinekeys.sty"
Package: kvdefinekeys 2011/04/07 v1.3 Defining keys (HO)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"
Package: ltxcmds 2011/04/18 v1.20 LaTeX kernel commands for general use (HO)
)))
("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty"
Package: kvoptions 2010/12/23 v3.10 Keyval support for LaTeX options (HO)
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty"
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks14
)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\kvsetkeys.sty"
Package: kvsetkeys 2011/04/07 v1.13 Key value parser (HO)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\etexcmds.sty"
Package: etexcmds 2011/02/16 v1.5 Prefix for e-TeX command names (HO)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty"
Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
Package etexcmds Info: Could not find \expanded.
(etexcmds) That can mean that you are not using pdfTeX 1.50 or
(etexcmds) that some package has redefined \expanded.
(etexcmds) In the latter case, load this package earlier.
)))
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\pdftexcmds.sty"
Package: pdftexcmds 2011/04/22 v0.16 Utilities of pdfTeX for LuaTeX (HO)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty"
Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
Package ifpdf Info: pdfTeX in PDF mode is detected.
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
Package epstopdf Warning: No graphics package `graphic{s,x}' loaded.
)) ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty"
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
) ("C:\Program Files\MiKTeX 2.9\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.9\tex\latex\pdftex-def\pdftex.def"
File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
\Gread@gobject=\count87
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
No file 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.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count88
\scratchdimen=\dimen105
\scratchbox=\box26
\nofMPsegments=\count89
\nofMParguments=\count90
\everyMPshowfont=\toks15
\MPscratchCnt=\count91
\MPscratchDim=\dimen106
\MPnumerator=\count92
\makeMPintoPDFobject=\count93
\everyMPtoPDFconversion=\toks16
)
! LaTeX Error: File `img/EC' not found.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.8 \includegraphics{img/EC}
I could not locate the file with any of these extensions:
.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPEG,.JBIG2,.JB2
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
(E:\escudo\proposal\MWE.aux) )
Here is how much of TeX's memory you used:
1366 strings out of 494045
19168 string characters out of 3148393
69513 words of memory out of 3000000
4671 multiletter control sequences out of 15000+200000
3640 words of font info for 14 fonts, out of 3000000 for 9000
715 hyphenation exceptions out of 8191
42i,1n,23p,318b,37s stack positions out of 5000i,500n,10000p,200000b,50000s
No pages of output.
PDF statistics:
0 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)
img/EC.???exist? What is the extension? How is the TeX file compiled (pdflatex,latex+dvips+ps2pdf, ...)? The forward slash is correct, it works both in Unix/Linux and Windows. – Heiko Oberdiek Apr 07 '14 at 17:19cmd) and go into the directory of the TeX file. It should contain a subdirectoryimgwith fileEC.pdfinside. Try compiling on the command line withpdflatexwith the TeX file name as argument. – Heiko Oberdiek Apr 07 '14 at 17:36! LaTeX Error: File `img/EC' not found.
– xkcd Apr 07 '14 at 17:52img\ECasimgfollowed by the command\EC. If you dodir imgfrom the command window (after changing to the directory with the.texfile in), what do you get? – Nicola Talbot Apr 07 '14 at 19:40.epsto theimg/EC, I got a different error. Previously I used to getFile not found, but now I getUnknown graphics extension: .eps. I am thinking your 2nd comment was correct and this is not a path separator problem. – xkcd Apr 07 '14 at 20:59\DeclareGraphicsExtensions? I assume both filesimg/EC.epsandimg/EC.pdfexist as valid graphics files? Then\includegraphics{img/EC.pdf}should work withpdflatexand\includegraphics{img/EC.eps}should work withlatex+dvips+ps2pdf. – Heiko Oberdiek Apr 07 '14 at 22:24\documentclass{article}\usepackage{graphicx}\begin{document}\includegraphics{img/EC}\end{document}. Does it work withpdflatexandlatex? – Heiko Oberdiek Apr 07 '14 at 22:25\DeclareGraphicsExtensions. And yes, both files are valid graphics files as I can open and see them in other programs. – xkcd Apr 08 '14 at 10:03! LaTeX Error: File 'img/EC' not found. This is with theLaTeX --> PDFprofile in MiKTeX. But it works fine with theLaTeX --> DVI --> PDFprofile, which is good as at least it works but I am not sure why the MWE is not working with pdflatex. – xkcd Apr 08 '14 at 10:06dirwas because some file managers hide the file extension, which can cause confusion over the actual file type (particularly if a general image icon is used for all image extensions). You mentioneddir imggave you a listing with all the.epsfiles, but what about the.pdffiles? For each.epsthere should be a corresponding.pdf. – Nicola Talbot Apr 08 '14 at 10:31dirshows everything, so .eps and .pdf and . and .. And I opened the .pdf images in Adobe Reader and .eps in GSView, so surely they are fine? – xkcd Apr 08 '14 at 11:15pdflatexon it, typeh(followed by enter) at the prompt and then enter again and copy and paste the contents of the.logfile to your question. Also add the results ofdir img\EC.*. That will focus your question on the actual problem (which I don't think has anything to do with the question title, but seems to be caused by something else). – Nicola Talbot Apr 08 '14 at 11:35pdflatex. – xkcd Apr 08 '14 at 13:05pdflatex. I assumed you wanted the problem fixed withpdflatex. If you're happy to just uselatex, then this question is likely to be closed, either as a duplicate of the one linked to by @HeikoOberdiek or as too localised because it can't be reproduced. If you want to fix the problem withpdflatex, you need to give us more information. – Nicola Talbot Apr 08 '14 at 14:31pdflatex, what info do you need? I've added the contents of .log in the question. – xkcd Apr 08 '14 at 14:36dir img\EC.*. (You should be able to copy and paste from the command prompt or you can do a screen shot of the command prompt.) – Nicola Talbot Apr 08 '14 at 14:47graphics.cfgis too old, it does not load packageepstopdfautomatically. This feature was added in 2009-03-04. Update the TeX distribution or try to add\usepackage{epstopdf}. You also might need--enable-write18(MiKTeX) for older distributions. – Heiko Oberdiek Apr 08 '14 at 15:25epstopdfaftergraphicx. See the warningPackage epstopdf Warning: No graphics packagegraphic{s,x}' loaded.` – Heiko Oberdiek Apr 08 '14 at 15:57