I've included a .tex file by using \input macro, but the problem comes when I use special characters (because I'm writing in Spanish, I use á, é, and characters like that).

I can use those caracters without any problem in the parent file (I have the spanish package declared), but not in the included file.

For that reason I get "Missing $ inserted" error.

  • Normally there should be no problem - if the tex-file you input use the same encoding as the parent file. – Ulrike Fischer Dec 28 '11 at 13:21
  • 3
    No. Whatever your problem is, it is related to your actual document(s). Try to make a complete example that demonstrates your problem, put the file in a zip-file and upload them somewhere. – Ulrike Fischer Dec 28 '11 at 13:31
  • 3
    Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. Check if both files are saved using the same encoding. Most likely the sub-file is in a different one. – Martin Scharrer Dec 28 '11 at 14:42
  • 2
    Try to use the package grffile. – Marco Daniel Dec 28 '11 at 15:07
  • 1
    Yes @MartinScharrer it was a file encodings issue. I included several files, and some of them had different encodings. It is working now with all file encodings set to UTF-8. Thanks for all the answers – Nahuel Garbezza Dec 28 '11 at 19:54

This is most likely be caused by different file encodings. Check if all files use the same encoding and use \usepackage[<encoding>]{inputenc}, where the <encoding> can be e.g. utf8.

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.