Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I need to use an absolute path for my package. One of the folder I use contains a space. I cannot change the name of this folder.

So, how can I use paths containing the space character in usepackage ?


EDIT

I tried to put my path between double quotes (") but then, Latex tries to open the "<my path>".sty !!

I am using pdftex (I don't know if this info is relevant).

share|improve this question
1  
Did you try to use quotes? {"foo/other foo/foo"} –  Sigur Jun 10 '13 at 14:19
    
You might find your answers here: link –  papabravo Jun 10 '13 at 14:20
    
Yes I tried, see the edit –  Colas Jun 10 '13 at 14:23
    
It doesn't work. The error :! LaTeX Error: `File "<my path>".sty' not found. –  Colas Jun 10 '13 at 14:28
1  
@Colas The proper place for local packages in MacTeX is in ~/Library/texmf/ with the proper internal structure. Anything you put there will be found automatically. See How do I add a .sty file to my MacTeX/TeXShop installation? Do you have some reason for not putting local packages there? –  Alan Munn Jun 10 '13 at 15:05

2 Answers 2

up vote 8 down vote accepted

The initial statement is false:

I need to use an absolute path for my package.

\usepackage does not take a path at all --- it takes a package name.

Set TEXINPUTS to include the folder in which you have placed mdframed.sty and then just use

\usepackage{mdframed}

For TeX Live and other web2c based systems you can set TEXINPUTS either as an environment variable or (better) in your texmf.cnf file.

share|improve this answer

If you're an expert with the terminal, you can add a symbolic link to the directory with a space in its name:

mkdir -p ~/Library/texmf/tex/latex
ln -s "/path/to/the/folder/with/space in name" ~/Library/texmf/tex/latex/spaceinname

Then simply doing \usepackage{mypackage} will find the file mypackage.sty in the folder with a space in its name. You can use whatever name you prefer instead of spaceinname, so long as it doesn't contain spaces (but it could).

On GNU/Linux systems, the Library/ part should be omitted, it's specific for MacTeX on Mac OS X.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.