[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] Small patch for subfiles.el
From: |
Uwe Brauer |
Subject: |
Re: [AUCTeX-devel] Small patch for subfiles.el |
Date: |
Thu, 16 Feb 2017 10:58:08 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
>>> "Arash" == Arash Esbati <address@hidden> writes:
Hi Arash
> Hi Uwe,
> what do you think about this small patch against subfiles.el:
> 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 ()
> 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).
I checked it with GNU emacs and it is nice, on the other hand I admit
that at least on my laptop, this function is quite slow, that is why I
usually use templates when creating a new document. In any case thanks,
and as far as I am concerned please commit.
> Drawback: This does not work with XEmacs.
Ok, I have in the coming month very little time to look into that, so I
stick with GNU emacs.
BTW right now I use Xemacs just when I need to display graphics via the
x-symbol package. I could use preview-latex to display those in GNU
emacs but it is not the same, and iimage mode, a minor mode, which
displays images in the buffer, does not allow to rescale images. However
it seems that not very many people are missing such a feature.......
Uwe
Re: [AUCTeX-devel] Small patch for subfiles.el, Mosè Giordano, 2017/02/18
Re: [AUCTeX-devel] Small patch for subfiles.el, Ikumi Keita, 2017/02/20