0

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)
xkcd
  • 141
  • Welcome to TeX.SX! – Heiko Oberdiek Apr 07 '14 at 17:16
  • 3
    Does the image 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:19
  • Yes, it exists. There are two versions, .eps and .pdf. I am using MikTex 2.9 on Windows 7. It works for everyone else but I am the only one using Windows. – xkcd Apr 07 '14 at 17:22
  • I am using Latex --> PDF profile, which uses this compiler C:\Program Files\MiKTeX 2.9\miktex\bin\pdflatex.exe – xkcd Apr 07 '14 at 17:26
  • Then open a command window (cmd) and go into the directory of the TeX file. It should contain a subdirectory img with file EC.pdf inside. Try compiling on the command line with pdflatex with the TeX file name as argument. – Heiko Oberdiek Apr 07 '14 at 17:36
  • @HeikoOberdiek - Just did that, got the same error on the command line

    ! LaTeX Error: File `img/EC' not found.

    – xkcd Apr 07 '14 at 17:52
  • 2
  • You wouldn't be able to change the forward slash to a backslash even if you could edit the files as LaTeX would interpret img\EC as img followed by the command \EC. If you do dir img from the command window (after changing to the directory with the .tex file in), what do you get? – Nicola Talbot Apr 07 '14 at 19:40
  • @NicolaTalbot - I get the directory listing of the img directory with all the .eps files in it. – xkcd Apr 07 '14 at 20:53
  • @HeikoOberdiek - So I made a MWE and started working on a suspicion I had. When I added the .eps to the img/EC, I got a different error. Previously I used to get File not found, but now I get Unknown 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
  • 3
    @xkcd: Are you using \DeclareGraphicsExtensions? I assume both files img/EC.eps and img/EC.pdf exist as valid graphics files? Then \includegraphics{img/EC.pdf} should work with pdflatex and \includegraphics{img/EC.eps} should work with latex + dvips + ps2pdf. – Heiko Oberdiek Apr 07 '14 at 22:24
  • A minimal example would be \documentclass{article}\usepackage{graphicx}\begin{document}\includegraphics{img/EC}\end{document}. Does it work with pdflatex and latex? – Heiko Oberdiek Apr 07 '14 at 22:25
  • 1
    So the image is an EPS file? Then read Including pdf figures in Latex document using TexnicCenter. General information about allowed graphics extensions from Heiko: Graphics file extensions and their order of inclusion when not specified. – Speravir Apr 07 '14 at 22:51
  • @HeikoOberdiek - No, I am not using \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
  • @HeikoOberdiek - I get the same error with the MWE you posted i.e, ! LaTeX Error: File 'img/EC' not found. This is with the LaTeX --> PDF profile in MiKTeX. But it works fine with the LaTeX --> DVI --> PDF profile, 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:06
  • Just because you can view the images in an image viewer doesn't mean that the images are pdf. The reason I suggested dir was 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 mentioned dir img gave you a listing with all the .eps files, but what about the .pdf files? For each .eps there should be a corresponding .pdf. – Nicola Talbot Apr 08 '14 at 10:31
  • @NicolaTalbot - Yes, dir shows 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:15
  • That's a bit of a puzzle. I suggest you edit your question to include @HeikoOberdiek's MWE. When you run pdflatex on it, type h (followed by enter) at the prompt and then enter again and copy and paste the contents of the .log file to your question. Also add the results of dir 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:35
  • @NicolaTalbot - As I mentioned in the 4th comment upwards, the problem is fixed now but not with pdflatex. – xkcd Apr 08 '14 at 13:05
  • Which is why I said to use pdflatex. I assumed you wanted the problem fixed with pdflatex. If you're happy to just use latex, 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 with pdflatex, you need to give us more information. – Nicola Talbot Apr 08 '14 at 14:31
  • @NicolaTalbot - Yes, I want to fix it with pdflatex, what info do you need? I've added the contents of .log in the question. – xkcd Apr 08 '14 at 14:36
  • Can you also add the result from dir 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:47
  • graphics.cfg is too old, it does not load package epstopdf automatically. 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:25
  • @HeikoOberdiek - I added the epstopdf package in the MWE. Please see the new log in the question, I think its a bit different from last time. – xkcd Apr 08 '14 at 15:51
  • 3
    @xkcd: Load epstopdf after graphicx. See the warning Package epstopdf Warning: No graphics packagegraphic{s,x}' loaded.` – Heiko Oberdiek Apr 08 '14 at 15:57
  • @HeikoOberdiek - That was it, everything ship shape now. I thought that these packages were like header files in C and order didn't matter. Thanks for the help Heiko :) – xkcd Apr 08 '14 at 16:49
  • @xkcd: You could have read this already in my linked answer … – Speravir Apr 08 '14 at 22:34
  • @Speravir - Sorry dude, I lost your post in so many comments between me and Heiko. Thanks anyway, much appreciated. – xkcd Apr 09 '14 at 11:11

0 Answers0