Hi all,
by accident, I stumbled over latex-lab-sec-template.pdf
(Reimplementation of LaTeX2ε's heading commands using templates) and it
seems that the future is "key=val's in optional argument of sectioning
commands". I was wondering how AUCTeX/RefTeX can deal with this. I
needed something to play with, so I took contract.el. Before going any
further, I'd like to add this to the style which makes RefTeX recognize
the commands.
--8<---------------cut here---------------start------------->8---
diff --git a/style/contract.el b/style/contract.el
index eef780a2..a66cd786 100644
--- a/style/contract.el
+++ b/style/contract.el
@@ -118,6 +118,17 @@
(LaTeX-add-counters "par" "sentence")
+ ;; Tell RefTeX:
+ (when (and (bound-and-true-p reftex-mode)
+ (boundp 'reftex-section-levels)
+ (not (assoc "Clause" reftex-section-levels))
+ (fboundp 'reftex-compile-variables))
+ (setq-local reftex-section-levels
+ (append reftex-section-levels
+ '(("Clause" . 3)
+ ("SubClause" . 4))))
+ (reftex-compile-variables))
+
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
--8<---------------cut here---------------end--------------->8---
Any comments? I don't use the style, so I'd appreciate comments from
real users.
Best, Arash
_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex