ESA 2009: Introduction to LateX

Navigation

No children

ESA 2009: Introduction to LateX

Login

Search


Version 0.4
iugo-cafe home

Problems with file referencing?

Often you need to tell LateX where to find find files, for example in your \include, \usepackage,\bibliography, \bibliographystyle commands. LateX is quirky about referencing folders outside your working directory. Here are some hints for MikTeX users if you run into "Cannot open file" errors.

I want my bibfiles in a separate folder
use {myfolder/myfile} no quotes and I'm showing {} just to show you where the file name begins and ends. Here's how it looks in a LateX command
\usepackage{myfolder/myfile}
\bibliographystyle{myfolder/myfile}
etc,etc
Note the slash is going the "wrong" way. This is what MikTeX wants.
but I have spaces in my file name
use {myfolder/my\space file}
but my folder name has spaces in it
use {"my\space folder/myfile"}
I want to reference a folder just above my working directory
use {../myfolder/myfile}
but I want to use an absolute address not a relative address like above
use {C:/ProgramFiles/R/R-2.8/share/texmf/Sweave}
for example
but my folder is "Program Files" not "ProgramFiles"
use {"C:/Program\space Files/R/R-2.8/share/texmf/Sweave"}

Hopefully, this will give you enough ideas to solve your own referencing problems.

Created on Aug 2, 2009 at 04:56:59 PM by eli

No comments