LaTeX forum ⇒ KileForward & Reverse DVI with multiple file document

Information and discussion about Kile, an integrated LaTeX environment for Linux KDE
dj_bridges
Posts: 8
Joined: Fri Sep 21, 2007 12:59 pm

Forward & Reverse DVI with multiple file document

Postby dj_bridges » Tue Dec 09, 2008 3:32 pm

I have been searching for an answer to this, but so far have failed to find it. Sorry if it has already been answered somewhere. Tried asking in the general latex forum http://www.latex-community.org/viewtopic.php?f=5&t=3201&p=13161#p13161, but it seems to be an issue with kile so am hoping someone knows the answer here.....

Essentially I am writing a large report (similar to a PhD thesis) that is written in a number of tex files, with a master file that includes all of the daughter files. I often want to work on the layout of individual files and go between the DVI and tex file using the forward and reverse search functions. However it appears that when working with multiple file documents, the reverse DVI merely takes one to the \include{chapter} and not to the chapter tex file. Is there anyway that I can get the reverse DVI to take me to the relevant tex file and the relevant position in that tex file? In the same way can I go from the chapter file in kile direct to the point in the DVI file?

I understand that I could put all of the information in the master document in each of the chapter documents i.e. make them seperate single file documents, but I assume there must be a way to do it from the master document, as apparently this can be done with Vim?

Any help would be greatly appreciated. I am using Kile with KDVI and TeTex.

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Tue Dec 09, 2008 4:49 pm

Should normally no problem in case that source special are written to the DVI file. Perhaps a matter of settings in Kile. Check your settings and make sure that the "Modern" configuration is used for the "LaTeX" build tool. It adds the -src switch to the command line arguments. In the attachment you can see the settings of Kile on my (german) system².


Best regards
Thorsten¹
Attachments
settings-kile.png
Modern configuration for DVI build in Kile.
settings-kile.png (66.69 KiB) Viewed 8700 times
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

dj_bridges
Posts: 8
Joined: Fri Sep 21, 2007 12:59 pm

Postby dj_bridges » Wed Dec 10, 2008 9:38 am

Thanks for your reply Thorsten.

I checked my settings and they were identical, except I had -src -interaction=nonstopmode '%source' instead of -src -interaction=nonstopmode -shell-escape '%source'

Have changed it so the settings are the same as yours, but it still doesn't work. I am sure it can be made to work as in the DVI at the info bar at the bottom, moving over the text shows the line number and the file name where the text has come from (see screenshot). However the reverse DVI only takes me to the master document.

I get the following error when I try to Forward DVI from one of the daughter documents:
[ForwardDVI] The file Histamine/Histamine.dvi does not exist; did you compile the source file?

Is there some way that I can put in a bit of code to point to the master file so that the forward DVI will take me from the daughter chapter .tex file to the daughter chapter in KDVI?

Appreciate your help!
Dan
Attachments
KDVI.png
KDVI.png (136.88 KiB) Viewed 8689 times

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Thu Dec 11, 2008 8:24 pm

The switch -shell-escape is not the important one. It enables the compiler to call external programs. But the message of Kile seems familiar to me.
  1. [ForwardDVI] The file Histamine/Histamine.dvi does not exist; did you compile the source file?

All your opened files should be part of a project with your main file as master document. For me reverse as well as forward search in a DVI file are working fine inside a project.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

dj_bridges
Posts: 8
Joined: Fri Sep 21, 2007 12:59 pm

Postby dj_bridges » Fri Dec 12, 2008 7:03 am

localghost - thanks for your reply. Good to know the -shell-escape wasn't the important issue.

All of the documents on which I am trying to forrward and reverseDVI are part of a master document (as you say). The master essentially looks like this:

  1. \begin{document}
  2. \chapter{Some text}
  3. Introductory text POSITION A
  4. % The various chapters:
  5. \include{Haemostasis/Haemostasis}
  6. \include{Histamine/Histamine}
  7.  
  8. \end{document}


Is this how you structure a multi-file document?

To summarise the problem - If I forwardDVI from POSITION A or reverse DVI from KDVI at POSITION A everything works fine. However if I try to ForwardDVI from within any of the included chapters e.g. Histamine, then it doesn't work (gives the previous error message about the file not being compiled). Likewise when I try to reverseDVI in KDVI from within a chapter it just takes me back to the Kile window, but not to the correct Chapter file or correct position within that file.

To me anyway, it kind of makes sense that the ForwardDVI from Kile within a chapter doesn't work as there is nothing in the document to say where the master file is located i.e. I was expecting to put in something at the start of the chapter e.g. \master{rel_path_to_master/master} to tell kile when I latex or ForwardDVI or whatever to link it to the master. Perhaps I am missing something???

Hope that was clear.

dj_bridges
Posts: 8
Joined: Fri Sep 21, 2007 12:59 pm

Postby dj_bridges » Fri Dec 12, 2008 1:21 pm

Ok I have been a bit of a fool, and have just found out about projects properly - I wasn't adding the files to the current project. Anyway am pleased to say that the forwardDVI is now working perfectly. Unfortunately I am still having trouble with the reverseDVI so any suggestions on that front would be useful....

My settings in KDVI are set to Kile as the Editor using the default settings (kile %f --line %l) should it be something different?

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Fri Dec 12, 2008 5:47 pm

dj_bridges wrote:[...] Unfortunately I am still having trouble with the reverseDVI so any suggestions on that front would be useful [...] My settings in KDVI are set to Kile as the Editor using the default settings (kile %f --line %l) should it be something different?

The settings are OK. Reverse search should be working with a click on the middle mouse button (wheel) in KDVI.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

dj_bridges
Posts: 8
Joined: Fri Sep 21, 2007 12:59 pm

Postby dj_bridges » Mon Dec 15, 2008 7:25 am

localghost wrote:The settings are OK. Reverse search should be working with a click on the middle mouse button (wheel) in KDVI.


Glad to hear the settings are correct. However the reverseDVI still doesn't work. I have gone through every menu in kile and kdvi to see if there is something obvious, but I can't find anything.

I believe the problem is with kile as kdvi displays the correct line number and document etc wherever I hover the mouse. Unfortunately wherever I click with the middle mouse button (wheel) I just get taken back to kile, but not to the correct document or position in that document.

Not sure what else to try.....


Return to “Kile”

Who is online

Users browsing this forum: No registered users and 1 guest