auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Problems with path?


From: Markus Jäntti
Subject: Re: [AUCTeX] Problems with path?
Date: Sat, 25 Mar 2006 14:38:21 +0200

Hi -- I have now written a little documentation on this topic, included
below here. Note that for some reason, the variable TeX-master does not
get properly set from the %%% Local Variables in the foo.Rnw noweb file,
but if set manually to the correct value, things work as they should.

I am quite happy to modify the below text so that it is better suited
for the RefTeX documentation structure.

Regards,

Markus
====SNIP==============
address@hidden/2006-03-25

Using RefTeX and AUCTeX with noweb files (in my example, those for the
Sweave package in the statistical program R) in emacs generally works
(see the Sweave FAQ,
http://www.ci.tuwien.ac.at/~leisch/Sweave/FAQ.html). However, a
multifile document with pieces consisting of noweb files may give you
some problems. In particular, RefTeX used to be unable to parse such
multifile documents correctly before the the included files were
created as .tex files, as opposed to the .nw or .Rnw files that are
actually edited.

Thus, suppose you have a document, master.tex, 

\documentsstyle{article}

\begin{document}

\include{foo}
\include{bar}

\end{document}

foo.Rnw and bar.Rnw are the Sweave files. Parsing master.tex *before*
the foo.tex and bar.tex files have been generated is going to lead to
problems, as is parsing the whole document from within the buffer in
which you are editing foo.Rnw.
  
With the newest version of RefTeX, available at
http://staff.science.uva.nl/~dominik/Tools/reftex/, it is possible to
do this properly. This is what you should do:

- download the latest version of RefTeX from 
  http://staff.science.uva.nl/~dominik/Tools/reftex/
- install it in a directory where emacs will find it (the default
  works for me; verify the correct RefTeX gets loaded by issuing from
  within emacs M-x locate-library RET reftex)
- set the following variables (if you are using pure noweb, .nw
   instead of .Rnw below should do the trick).


;; for RefTeX
.(setq reftex-file-extensions  '(("tex" . (".Rnw" ".tex" ".ltx"))
                                                    ("bib" . (".bib"))))

(setq reftex-try-all-extensions t)
;; for AUCTeX

(setq TeX-file-extensions 
      '("Rnw" "tex" "ltx" "sty" "cls" "ltx" "texi" "texinfo"))

- now: while the above AUCTeX setting should work, it does not. You
  need to explicitly set TeX-master to whatever value you want it to
  be, in my example "master" bvy issuing the command

  M-x set-variable RET TeX-master RET "master"

  This *regardless* of what the "Local variables" say, such as:

  %%% Local Variables:
  %%% TeX-master: "master"
  %%% End: 

  I have been unable to get this to work otherwise, but with this
  addition it works as it should:

These instructions have been tested with 

- GNU Emacs 21.4.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2005-10-03 on trouble, modified by Debian

- RefTeX: 4.31 (latest off the web site)

- AUCTeX: 11.82

====SNIP==============

On Fri, 2006-03-24 at 09:01 +0100, Carsten Dominik wrote:
> >
> 
> This might be a problem with RefTeX.  I have recently worked with 
> Markus Jantti to make RefTeX swallow noweb files and extensions.  In 
> the end we got it to work with some modifications to RefTeX.
> 
> I believe you need to use the latest reftex from my webpage and the 
> following configuration:
> 
> > (setq reftex-file-extensions  '(("tex" . (".Rnw" ".tex" ".ltx"))
> >                                                     ("bib" . (".bib")))
> >
> > (setq reftex-try-all-extensions t)
> 
> Markus wanted to write up some documentation about this, I am sending a 
> CC to him, maybe he wants to comment?
> 
> - Carsten
> 
> On Mar 24, 2006, at 8:36, Fredrik Karlsson wrote:
> 
> > Hi,
> >
> > I use AUCTeX for editing mixed TeX and Noweb (which are converted to
> > TeX-files by an external make file)  files.  Using this, I find that I
> >  have two problems with the Multifile-capability of AUCTeX:
> >
> > 1) Everytime I cross a \ref for the first time, I get prompted for a
> > master file, even though I got
> >
> > %% Local Variables:
> > %% mode: latex
> > %% TeX-master: "thesismain"
> > %% End:
> >
> > at the bottom of the file being edited and
> >
> > %%% Local Variables:
> > %%% mode: latex
> > %%% TeX-master: t
> > %%% End:
> >
> > at the end of thesismain.tex
> >
> > 2) When trying to generate a TOC from reftex, I get a minimal TOC:
> >
> >
> >  File thesismain.tex starts here
> >  File childspeech was not found
> >  File background was not found
> >  File method was not found
> >  Part I Voicing contrast in production
> >  File voicing was not found
> >  File aspforce was not found
> >  File aspvotinteraction was not found
> >  File individualdiff was not found
> >  Part II Acquisition of place and manner of articulation
> >  File place was not found
> >  File manner was not found
> >  File plavemannervoice was not found
> >  File clusterCompl was not found
> >      * \Large Author Index
> >  File thesismain.tex ends here
> >
> > even though the files are in the same direcory. AUCTeX cannot even
> > find the file I generated the TOC from, but LaTeX has no problem
> > finding any of the files. This is the input:
> >
> > %----------------------------------------------
> > \include{childspeech}
> > %Covers the method used and why.
> > \include{background}
> > %Covers the execution of the method
> > \include{method}
> > \part{Voicing contrast in production}
> > \label{PART:voic-contr-prod}
> >
> > \include{voicing}
> > \include{aspforce}
> > \include{aspvotinteraction}
> > \include{individualdiff}
> >
> > \part{Acquisition of place and manner of articulation}
> > \label{PART:acuis-place-mann}
> >
> > \include{place}
> > \include{manner}
> > \include{plavemannervoice}
> > \include{clusterCompl}
> > %----------------------------------------------
> >
> > These two issues may have something to do with an incorrect path being
> > set in AUCTeX/RefTeX that is correct for LaTeX. I have checked the
> > TeX-check-path
> >
> > #--------------------------------------------------------------------
> > `TeX-check-path' is a variable declared in Lisp.
> >   -- loaded from "tex"
> >
> > Value: ("./" "/home/fredrik/.texmf/bibtex/bib/" 
> > "/usr/local/lib/texmf/tex/")
> >
> > Documentation:
> > Directory path to search for dependencies.
> >
> > If nil, just check the current file.
> > Used when checking if any files have changed.
> > #--------------------------------------------------------------------
> >
> >
> > Are there other paths I should check? Any other ideas?
> >
> > I am running XEmacs 21.4 (patch 12), AUCTeX 1.33 and RefTeX 1.28.
> >
> > /Fredrik
> >
> >
> > --
> > My Gentoo + PVR-350 + IVTV + MythTV blog is on
> > http://gentoomythtv.blogspot.com/
> >
> >
> > _______________________________________________
> > auctex mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/auctex
> >
> >
> 
> --
> Carsten Dominik
> Sterrenkundig Instituut "Anton Pannekoek"
> Universiteit van Amsterdam
> Kruislaan 403
> NL-1098SJ Amsterdam
> phone: +31 20 525 7477
> 

-- 
Markus Jantti
Abo Akademi University
address@hidden
http://www.iki.fi/~mjantti





reply via email to

[Prev in Thread] Current Thread [Next in Thread]