簡體   English   中英

AUCTeX中的自動標簽環境

[英]Auto labeling environments in AUCTeX

如果我通過Cc Ce在AUCTeX中插入一些環境(例如equationfigure ),那么AUCTeX會要求帶有自動插入文本的標簽eq:fig: .

我想在AUCTeX中為LaTeX環境添加theorem環境。 我這樣做了

(add-hook 'LaTeX-mode-hook
        (lambda ()
          (LaTeX-add-environments
            '("theorem" LaTeX-env-label)
)))

而且我還有類似的東西

(setq reftex-label-alist
      '(
        ("theorem" ?t "thm:" "~\\ref{%s}" t  ("theorem" "th."))
        ))

然后,當我使用Cc Ce添加theorem環境時,它會要求一個定理的標簽,但沒有自動thm: text。 我需要手動添加它。

是否有可能使AUCTeX添加theorem環境的行為與將自動thm: text添加到標簽的equationfigure相同?

為了澄清,如果我添加沒有標簽的theorem環境然后使用Cc (使用RefTeX添加標簽,那么它要求形式thm:的標簽thm:

終於明白了。

添加類似的東西之后我才意識到

(setq reftex-label-alist
      '(
        ("theorem" ?t "thm:" "~\\ref{%s}" t  ("theorem" "th."))
        ))

對我的.emacs我應該這樣做

reftex-reset-mode

如果我在我的RefTeX選項之后把它放到.emacs ,那么一切都很好。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM