[Tex/LaTex] How to get forward-search working in Kile with nested source files

forward-inverse-searchkilesource

I have a huge set of .tex files which compile into a single document. I have recently switched to Kile on Unbuntu (love it so far). However I see that forward search from source files other than the root don't work because Kile doesn't know how they fit into the document as a whole, unless they are included in a Kile project (the error message is ".pdf does not exist; did you compile the source file?").

I assume that creating a Kile project and adding the existing source files is the way to solve this. But how can I do that efficiently? It seems I have to add files in one folder at a time.

Edit: What I really want is to be able to do forward-search in Kile with nested source files. I don't particularly care if I have a Kile project file. How do I do that?

Best Answer

Kile does not know about the structure of your project. If you do not explicitly specify a master file, it assumes that the file you are currently editing is the master file and tries to open a PDF file with the same name (and produces the error you are getting).

As a solution, you can either create a Kile project that stores the relationship between your tex files or use the Settings > Define current document as 'Master Document' option.