I am including chapters in my latex file one by one by using the \include{}
statement, up till now I've had no problem with that. But I've recently written a chapter which I've saved under a name including spaces...because you can.
Now the include{}
statement apparently doesn't like spaces, and prints just the filename in my document in stead of the chapter.
It is probably a pretty easy fix (apart from removing the spaces in the filename, ;-) ), but I can't find it.
UPDATE
It doesn't bode well for this question according to this wiki. It says that you can't unless you use a recent distribution like teTeX 3 or MikTeX 2.4.
However one smidge of hope left, the page is dated 2005 (a lot can happen in 5 years) and I am using pdflatex included in ubuntu which I assume is a fairly recent distribution.
Try
\include{"file\space name"}
(I.e., use quotes and \space
.) You may need to remove old .aux
files and/or run Latex twice.
Well I'm closing this question by giving the (quite unsatisfying) answer, I've found (on this wiki).
At the moment the answer unfortunately is: you can't, unless you use a recent version which happens to handle this problem more gracefully. Examples: teTeX 3 and MikTeX 2.4.
It seems that unusual filenames are still a problem within latex, so your best bet is to abstain or, if you have to, find a version that has solved the problem.
It works. What you need to do is if your chapter file is File Of Mine.tex
then in the main .tex file put
\include{"File\space Of\space Mine"}
but inside File Of Mine.tex
you just need to have \chapter{File Of Mine}
. Try this and see if it works for you. It does for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With