GeneralWhite spaces in path and BibTeX

General information and discussion about TeXnicCenter
Post Reply
Soroush
Posts: 21
Joined: Thu Feb 01, 2007 5:33 pm

White spaces in path and BibTeX

Post by Soroush »

I'm using TeXnicCenter. My BibTeX database is in a "My Documents" folder, and this creates error when the bibliography is parsed.
I get this error:

Code: Select all

"White space in argument---line 44 of file C:\My Documents\report.aux
  : \bbidata{C:/My
  :                 Documents/BibTex_DB/db}
...
I'm skipping whatever remains of this command..."
The obvious solution would be to place the .bib file somewhere where the path has no whitespaces. But, is there a way to leave the .bib file in its current place and not get errors?

Thank you! :)
Last edited by Soroush on Mon Feb 12, 2007 6:30 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
tramir
Posts: 12
Joined: Fri Jan 26, 2007 12:58 am

White spaces in path and BibTeX

Post by tramir »

If I remember it right, what worked for me was to put the path to the file in quotations. Not "LaTeX fancy quotes", but regular ones:

Code: Select all

\bibliography{"C:/My Documents/mybib.bib"}
Try that, if it works. TC automatically converts quotations to LaTeX fancy ones, but you can just copy-paste the character.

Hope it works,
Mircea
Last edited by tramir on Mon Feb 12, 2007 8:53 pm, edited 1 time in total.
csmallw
Posts: 1
Joined: Wed Sep 26, 2012 8:06 pm

White spaces in path and BibTeX

Post by csmallw »

I just downloaded TexLive onto a computer running Windows XP (version 2002, service pack 3) and had the same problem. Tramir's solution did not work for me, but this did work:

Originally I wanted this:

Code: Select all

\bibliography{E:/Program Files/JabRef/clsbib}
So I typed this:

Code: Select all

\bibliography{E:/Progra\string~1/JabRef/clsbib}
The idea is to replace the problematic folder name with its DOS 8.3 filename. The rules for this are to take the first 6 characters of the long filename with no spaces, and follow it with "~1" if there are no other filenames with the same name in the same directory. Thus "Program Files" becomes "Progra~1". I believe that "My Documents" would become "MyDocu~1". The only further complication is that my version of LaTex/BibTex interprets "~" as a space so you have to explicitly specify it as "\string~".

You might also try simply replacing the spaces with asterisks. This worked for me with a previously downloaded version of LaTex (MiKTeX 2.8).
Last edited by cgnieder on Wed Sep 26, 2012 10:10 pm, edited 1 time in total.
Post Reply