[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Preview Latex with multiple input files



On 19 Oct 2002 21:44:22 +0200, Neilen <nmarais@hertz.ee.sun.ac.za> wrote:
> Hi.
> 
> I'm using preview-latex, and xemacs from sid, and I just recently split
> the document I'm using into multiple files.  I'm using \include to pull
> al the file together from my master document.
> 
> Preview-latex does, however, not seem to be quite aware of the multiple
> files.  If I to a preview-document command in one of the non-master
> files, it re-does the previews for the master file, but not the others. 
> If I do a preview-buffer command in a non-master file, it generates
> previews, but the section numbers, etc. is wrong.
> 
> Is there any way I can get this to work correctly?  Its not really too
> serious, since I like preview-latex mostly for equations, but it would
> be nice to have the section numbers correct...

Well, preview-latex uses auctex (which you must be running) to figure
out such things. Do you have something like 

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "thesis"
%%% End: 

at the bottom of your files? If not, you need to add it, to tell
auctex what the master file for a given file is. Note that you should
not add the .tex prefix. My master file here is thesis.tex.

For further details see the auctex documentation. Incidentally, I
would expect you to have the same problem with latexing in this
case. Ie. if you are viewing a latex file which is not the master
file, then if you do C-c C-c, it will look to what the master file is
to figure out what to compile, and will not work unless the above
lines are there.

Incidentally, I run

`C-c C-p C-d' `preview-document' LaTeX/Preview/Document
Run preview on the present document.

to get sections right. It needs to scan the entire document. I'm not
sure if preview-buffer would work, because I don't use it.

If you have things set up in this way but it is still not working for
you, then I don't know what the problem is, because a similar setup
works fine for me here, tracking Sarge, and running GNU emacs 21.2
with preview-latex 0.7.3-2 and auctex 11.11-2.

For expert help you should contact the preview-latex developers at
preview-latex-devel@lists.sourceforge.net. But hopefully the above
will solve your immediate problem.

                                                    Faheem.




Reply to: