GeneralMultiple file project via "\include" is not builing main fil

General information and discussion about TeXnicCenter
Post Reply
narthalion
Posts: 2
Joined: Tue Feb 27, 2007 1:57 pm

Multiple file project via "\include" is not builing main fil

Post by narthalion »

Hej!

I just splitted up my TeX-project into several files für each section, named sec1, sec2 etc, included in my mainfile.

While everything works as expected when I build from my mainfile. The meinfile is correctly opened via "Project->Open Mainfile" (I hope that's the english title, I'm using a german version), so I assume the settings are ok. Inverse search from YAP works perfectly and takes me to the sectionfile the text in question is defined in.

But if I build from the sec1-file (opened in editor and hitting Ctrl-F5/ F7 + F5), the building itself succeeds (checked that manually, the mainfile is compiled just fine). But YAP tells me, it failed to open sec1.dvi:

"No such file or directory: C:\SomePath\teil1.dvi"

Can you help me to tell TexnicCenter to pass the right parameters? As far as I saw, everywhere in the output.profile %bm is used, which stands for "Path to mainfile without ending", which sounds right for me.

YAP is started with: --single-instance "%bm.dvi" via commandline

Thank you!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Kris
Posts: 56
Joined: Sun Jan 14, 2007 4:04 pm

Re: Multiple file project via "\include" is not builing main fil

Post by Kris »

Hej!

That don't work ... \include just load the .tex code into the main
file and not build a dvi-file of the included section ... Sorry!

But You can build a project with Your mainfile as the "project-mainfile"
and use the "project-compile" buttons (F7 or Strg + F5)...

Regards
Kris
narthalion
Posts: 2
Joined: Tue Feb 27, 2007 1:57 pm

Re: Multiple file project via "\include" is not builing main fil

Post by narthalion »

Thanks for your answer, but I don't really understand it ;)

I think we are talking about different problems, I seem to have formulated my question unclear ;)

While everything is building perfectly into my mainfile (that means, after building I receive "mainfile.dvi" at the right place), YAP fails to open this file. I don't want dvi-files for every section-file. I just want YAP to open the created file, which fails for reasons I don't understand.

*EDIT*
Ok, Ifound the problem... It wasn't the call of YAP to open the file, it was the call for the search in the output... somewhere there was a reference to the active document (which in fact was sec1). Since there was no dvi file for it, this failded. Reverse lookup works without this part, so everything is fine :)
JoshLatex
Posts: 1
Joined: Wed Dec 29, 2010 6:56 pm

Re: Multiple file project via "\include" is not builing main

Post by JoshLatex »

Hi Guys,
I seem to have a similar problem. I am using:LatexEditor( 0.536501) with Miktex 2.8.
I have my PhD dissertation broken into Chapters 1,2 etc. Hence, the the main file has \input\chap1.tex etc. When I compile everything works fine and main.dvi is created. I can see that it is opened in my latexeditor. I can view the main.dvi and click the text it and it will find the appropriate chap1.tex file and get me to the text. However, at this point, on the right view window it will show error that it cannot fine chap1.dvi file. It seems it now wants to open the chap1.dvi. The searches I have done on the web, this would be the case that the forward dvi works, but the reverse does not work.

In this post it seem you guys have figured out the problem, but i don't see a description to correct it.

Appreciate any help.
Thanks
Josh
Post Reply