I have main.tex file with:


Let say filename.tex have the following content:


Everything works, by TeXstudio IDE don't recognize any commands in filename.tex, because it doesn't have declaration of the document class. And so, it becomes inconvenient to work with this file.

Is there any better way to include files one into another?

1 Answer 1


In texstudio, there's an menu Options->Define Current Document as Master Document. It makes life much easier for multiple file projects.

  • Here, thanks are in the form of upvotes and (if correct), accepting the answer. :)
    – recluze
    Commented Nov 27, 2012 at 5:09
  • In TeXstudio 2.12.22 that option doesn't exist; however Options / Root Document has Detect Automatically and Set Current Document As Explicit Root choices. Commented Jun 16, 2021 at 20:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .