If I use the command "\input{filepath}" then the file is perfectly printed in "main.tex". If I only change the command to "\include{filepath}" I get the following error:

I can't write on file `filepath.aux'.

With the AUX extension, even though is a .tex file.

Ex post: I have a Mac with MacOS Sierra


\input only needs read permission, but \include writes an aux file for each included file, so it needs write permission.

  • Thanks David. Is there a way I can use \include? That is, to give write permission? – Tecon Oct 25 '18 at 13:56
  • David, I apologize for asking basic questions. What is that allows write access? The file is in the Desktop, and I also tried to put it in a folder but it does not work. – Tecon Oct 25 '18 at 14:03
  • I see. But if I put the file in the same folder of the main text, and hence just write \include{filename}, then everything works. Mystery or not? – Tecon Oct 25 '18 at 14:09
  • 1
    @TSant that's expected. If you did not have write access to that folder you wouldn't be able to edit your main file either. – David Carlisle Oct 25 '18 at 14:25
  • If you using absolute pathes they are special security settings preventing you to write. – Ulrike Fischer Oct 25 '18 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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