auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Problem with latex2e style hook --- LaTeX/Texinfo collision


From: Mosè Giordano
Subject: Re: [AUCTeX] Problem with latex2e style hook --- LaTeX/Texinfo collision
Date: Mon, 11 Jan 2016 11:37:15 +0100

Hi Vincent,

2016-01-08 12:27 GMT+01:00 Vincent Belaïche <address@hidden>:
> Hello Mosè,
>
> Ok, so the way we go is to have multi-dialect hooks, and you are asking
> "Do you think is it easy to implement specification of multiple dialects
> in AUCTeX style files?".
>
> So the good news is that in the contribution which I did multi-dialect
> style files were supported from the beginning --- because at the time
> when I did it, I had already in mind the fact that some packages are
> multidialects. Please, look at the TeX-add-style-hook docstring. Assume
> that you would have the two new dialects :context and :plaintex, then
> for pgf hook you would declare the following in place of the
> DIALECT-EXPR argument :
>
> (or :latex :context :plaintex)

Oh, right, I already read it!  And it seems I forgot it as well ;-)

>   Vincent.
>
> PS-1: If you add new dialects, I think that the only thing to do is
>
> 1) To change the docstring of TeX-style-hook-dialect variable to update
>    the full list of supported dialects
>
> 2) To change the corresponding major-more definition, so that the
>   initialisation of the TeX-style-hook-dialect variable be done
>   accordingly.
>
>
> PS-2: I don't know whether the DocTeX mode is used only for LaTeX, or is
>      there something similar for ConTeXt. In the later case, you should
>      update also the DocTeX mode definition so that the
>      TeX-style-hook-dialect variable be initialized either to :latex or
>      to :context, accordingly, or maybe we need some :doctex-latex and
>      :doctex-context dialects (I don't think so, the style hook should
>      be written in a way that they you only primitive of the AUCTeX
>      kernel, and these primitives should react accordingly whether you
>      are in DocTeX mode or not, I DocTeX is not really a dialect, but
>      rather some file polyglotting method (ie making two dialects
>      co-exist in the same file).

Please, take a look at the attached patch.  In particular, I'm not
sure about the value of `TeX-style-hook-dialect-weight-alist' and the
order of the dialects, but probably it isn't really important.

Bye,
Mosè

Attachment: new-dialects.patch
Description: Text Data


reply via email to

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