[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] Problem with latex2e style hook --- LaTeX/Texinfo collision
From: |
Vincent Belaïche |
Subject: |
Re: [AUCTeX] Problem with latex2e style hook --- LaTeX/Texinfo collision |
Date: |
Tue, 5 Jan 2016 10:25:22 +0100 |
Hello Mosè,
HAPPY NEW YEAR 2016 !
Concerning the dialect information, to my recollection my problem was just that
when editing latex2e.texi of the latexrefman project (on GNA!), AUCTeX was
loading a LaTeX specific automatic style, and this was forcing the TeX-font
command to work with LaTeX alist rather than Texinfo alist. So my primary
intent was to solve this issue. Since only Texinfo was suffering, and the rest
of the world seemed to be happy, I was just meaning :texinfo on the one side,
and :other-than-texinfo but I just used :latex instead of :other-than-texinfo
(LaTeX is anyway the dominant TeX extension, isn't it).
To speak the truth:
- I don't even know what ConTeXt is (is that another TeX extension package like
plain-TeX, LaTeX, or Texinfo) or is that another engine (like xelatex or
luatex) … ?
- I never write TeX documents (I use TeX only as a programming language for
maintaining a few LaTeX packages like lettre or fmtcount).
So, I don't mind at all if TeX-style-hook-dialect would be set to :tex instead
of :latex for plainTeX files, the only potential issue I can see is if some
Elisp style file would be used both for plainTeX and for LaTeX (as there are
generic packages like babel, pgf or pstricks that can run both in plainTeX and
in LaTeX, so there may be some need to declare Elisp style file in a
multi-dialect way, and possibly to use the dialect information to fine-tune the
behaviour).
Concerning your idea to use the major mode, well, I am not sure about that for
the sake of futureproofness, because you could have files where there are
several dialects together and some major mode that switches the current dialect
dynamically so that which style hook applies could be tuned. This is not the
case currently, but what I am meaning is that dialect and major mode are not
the same information, and that in the future AUCTeX may evolve to use the
dialect information more dynamically. For instance in DocTeX typically you have
plain-TeX within the \begin{macrocode}...\end{macrocode} and LaTeX outside of
them.
BR,
Vincent.
----------------------------------------
> From: address@hidden
> Date: Sat, 2 Jan 2016 19:11:03 +0100
> Subject: Re: [AUCTeX] Problem with latex2e style hook --- LaTeX/Texinfo
> collision
> To: address@hidden
> CC: address@hidden
>
> Hi Vincent,
>
> I am looking into adding the dialect to the data written by
> `TeX-auto-store', it's very simple to implement it (5 lines in total),
> but I have only one concern: why is there :latex but not :tex? Is it
> because they're essentially the same or do you think it would be
> better to have a different dialect for TeX files? I'm asking this
> question because with my simple implementation I use the value of
> `TeX-style-hook-dialect' in the buffer, but its value is :latex also
> for TeX files and it's no clear to me whether it may cause problems.
> I can also select the value of the dialect to be written looking to the
> `major-mode' variable, but the problem with TeX files is still there:
> what to do in that case? The same question may be raised also for
> ConTeXt files: is :latex fine in that case?
>
> Bye,
> Mosè
>
>
> 2014-08-18 9:02 GMT+02:00 Tassilo Horn <address@hidden>:
>> Vincent Belaïche <address@hidden> writes:
>>
>> Hi Vincent,
>>
>>> Now if you have some foo.tex in some directory sd/ containing some
>>> \usepackage{foo} you will have an AUCTeX style "foo" that will load two
>>> hooks:
>>> * one from auctex/styles/foo.el, and
>>> * one from sd/auto/foo.el
>>
>> Just to complete, it'll also load
>>
>> ~/.emacs.d/auctex/style/foo.el (TeX-style-private)
>> sd/style/foo.el (TeX-style-local)
>>
>> Bye,
>> Tassilo
>>