Hi Uwe, what do you think about this small patch against subfiles.el:
--8<---------------cut here---------------start------------->8--- diff --git a/style/subfiles.el b/style/subfiles.el index 40993157..52bc7c31 100644 --- a/style/subfiles.el +++ b/style/subfiles.el @@ -36,6 +36,15 @@ (defvar LaTeX-subfiles-package-options nil "Package options for the subfiles package.") +(defun LaTeX-subfiles-class-options () + "Return name of the main file relative to current subfile." + (file-relative-name + (read-file-name + "Main file: " nil nil nil nil + (lambda (texfiles) + (string-match "\\.tex$" texfiles))) + (TeX-master-directory))) + (TeX-add-style-hook "subfiles" (lambda () --8<---------------cut here---------------end--------------->8--- With this, Emacs will ask with completion for the main file to be included in the optional argument of \documentclass in a subfile and returns it relative to master file (usually the subfile itself). Drawback: This does not work with XEmacs. Best, Arash _______________________________________________ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel