4

Why is it that MikTeX's XeTeX cannot find my file?

enter image description here

Dude, you're right there in the same directory as the file, why can't you see it?!

morbusg
  • 25,490
  • 4
  • 81
  • 162
  • Just for the fun of it, what does kpsewhich pikakoe.tex say? – daleif Aug 21 '12 at 10:39
  • 3
    Your document is inside the miktex tree. miktex will not search it there. Documents don't belong in application folders (and the miktex tree is an application folder). Put it in a documentation folder. (Addition: miktex will perhaps find the document if you update the FNDB, but then the next problem will be that it doesn't find the aux or the toc). – Ulrike Fischer Aug 21 '12 at 10:40
  • @Ulrike: A-ha, thanks! Although I'd appreciate if I could be in charge where my documents can and cannot be. ;-) I mean, why does it need to "search" it anywhere? I am in the directory where it is; it is of no MiKTeX's concern to search my documents from anywhere. Does not compute. – morbusg Aug 21 '12 at 10:47
  • 3
    See it as a security feature: Imagine that you try to compile inside the bin-folder a document which generates a file called MiKTeX209-xetex.dll. You can easily do a lot damage with a compilation inside a texmf tree as a compilation has to be able to overwrite files like e.g. toc or pdf. Beside this: even if the document is nearby it must be found, if the current directory is not in the search path then files there are not found. – Ulrike Fischer Aug 21 '12 at 11:01
  • @Ulrike: Well, I can think of a gazillion other ways to do damage , none of which MiKTeX is protecting against (say, pressing delete on the whole folder structure). But anyway, I digress, your comment answered my question, mind converting that to an answer so I could accept it? :-) – morbusg Aug 21 '12 at 13:46
  • @Ulrike: "if the current directory is not in the search path then files there are not found.". Eh? I'm assuming you meant the binaries, not the documents need to be in the SEARCH PATH (PATH env var). Because that would make no sense whatsoever. – morbusg Aug 21 '12 at 13:51
  • 1
    I meant documents. And I didn't meant the PATH-variable but the (in texlive speak) kpse search path. xetex searches for files along the pathes set up in miktex\config\xetex.ini. This ini contains beside others the declaration path=.. That's why xetex searches also the current directory. If you would remove this line it would no longer work. – Ulrike Fischer Aug 21 '12 at 14:13

1 Answers1

5

Your document is inside the miktex tree. miktex will not search it there. Documents don't belong in application folders (and the miktex tree is an application folder). Put it in a documentation folder. (Addition: Depending on the concrete location of the document in the texmf tree miktex will perhaps find it if you update the FNDB, but then the next problem will be that it doesn't find the aux or the toc). –

See it as a security feature: Imagine that you try to compile inside the bin-folder a document which generates a file called MiKTeX209-xetex.dll. You can easily do a lot damage with a compilation inside a texmf tree as a compilation has to be able to overwrite files like e.g. toc or pdf.

Ulrike Fischer
  • 327,261