14

Given the directory structure:

B-Galactosidase Report\LaTeX\Min ex\

My .tex file is inside "Min ex" directory.

My .bib file is inside the "B-Galactosidase Report" directory two levels above that.

Then what is the path I should specify for bib.bib in my .tex file? I think the syntax is tripping me up here...

I have tried

\bibliography{"../../B-Galactosidase Report/bib"}{}

which triggers the error

 Non-existent destination files:
      'citing with manual.bbl'
Latexmk: I WON'T RUN 'bibtex citing with manual' because I don't find the following files:
  'bib.bib'
  • 3
    Don't use spaces in any of your directory or file names. Other than that, specifying ../../mybib should work. – Alan Munn Sep 5 '11 at 7:05
  • I thought spaces should be ok as long as you wrap inverted commas around the pathname? "../../mybib" didn't work in any case... :( – ptrcao Sep 5 '11 at 7:07
  • No. That is the case with working in Windows' command prompt. Then folders/directories require quotes if they include any special characters, including spaces. – Werner Sep 5 '11 at 7:10
  • 1
    ...I have to ask: Did you try ../../bib? I'm pretty sure it does not matter whether you use / or `` under Windows. – Werner Sep 5 '11 at 7:18
  • I just tried \bibliography{../../bib}{} and got the same error... What could be wrong? – ptrcao Sep 5 '11 at 7:32
13

\bibliography{../../bib}{} is correct and works for me, after I correct an unrelated error. The .aux files needed to be cleared and I needed to ammend the bibliography style, then the above works. Thanks a lot guys for your help!

4

One option is to use the short DOS pathname. Go to the directory above "/B-Galactosidase Report" and open a DOS command window. Run the command:

dir /X *.*

On my computer it gives the short path name of "B-Galactosidase Report" as "B-GALA~1". Now you can use:

\bibliography{\detokenize{../../../B-GALA~1/bib}}

If this works then \bibliography{../../bib} should also work.

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