auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Auctex/Reftex: Sectioning-levels in "jurabook"


From: Ralf Angeli
Subject: Re: [AUCTeX] Auctex/Reftex: Sectioning-levels in "jurabook"
Date: Fri, 14 Nov 2008 22:51:18 +0100

* Hans-Christian Mick (2008-11-13) writes:

> (TeX-add-style-hook "jurabook"
>     (lambda ()
>           (LaTeX-section-list-add-locally  '(("subthreesection" 5)
[...]
>           (if (fboundp 'reftex-section-levels)
>                (reftex-section-levels (quote (("part" . 0)
[...]
> The problem is: This doesn't replace the regular sectioning levels, it only 
> adds the new ones. In the menu-bar, there are still paragraph and 
> subparagraph.

`LaTeX-section-list-add-locally' accepts two arguments.  If the second
is non-nil, the original entries will be removed.  See `C-h f
LaTeX-section-list-add-locally <RET>'.

> So I don't get syntax-highlighting or outline-mode (for the new sectioning 
> levels). Even preview-latex gets confused and doesn't work any more.

You have to take extra provisions for syntax highlighting.  See
e.g. what style/scrbase.el does for \addsec.  And the problem with
Outline mode you could probably fix by updating `outline-regexp' with
something like `(setq outline-regexp (LaTeX-outline-regexp t))'.  I'm
not sure if the current behavior of not recognizing the new section
levels would count as a bug.

> In addition to that, the customization of the reftex-section-levels doesn't 
> work at all (I had already managed to change them via custom but it gets 
> rather annoying having to re-change them everytime I'm writing in another 
> document class...).

Try `reftex-add-section-levels' instead of `reftex-section-levels'.  The
former is a function while the latter is a variable.

-- 
Ralf




reply via email to

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