[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Weird behavior of LaTeX-section-label for chapter
From: |
Arash Esbati |
Subject: |
Re: Weird behavior of LaTeX-section-label for chapter |
Date: |
Sat, 29 Feb 2020 21:36:48 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 |
Hi Shiyao,
Shiyao MA <address@hidden> writes:
> The default value of *LaTeX-section-label is:*
>
> (("part" . "part:")
> ("chapter" . "chap:")
> ("section" . "sec:")
> ("subsection" . "sec:")
> ("subsubsection" . "sec:"))
>
> However, *for chapter*, when typing C-c C-s, we get cha instead of chap:.
>
> \chapter{asdf}
> \label{cha:asdf}
I presume you're also using RefTeX which is plugged into AUCTeX. In
this case, AUCTeX transfers the job of inserting labels to RefTeX which
in return uses the values in `reftex-section-prefixes':
,----[ C-h v reftex-section-prefixes RET ]
| reftex-section-prefixes is a variable defined in ‘reftex-vars.el’.
| Its value is ((0 . "part:") (1 . "cha:") (t . "sec:"))
|
| You can customize this variable.
|
| Documentation:
| Prefixes for section labels.
| When the label prefix given in an entry in ‘reftex-label-alist’ contains ‘%S’,
| this list is used to determine the correct prefix string depending on the
| current section level.
| The list is an alist, with each entry of the form (KEY . PREFIX)
| Possible keys are sectioning macro names like ‘chapter’, section levels
| (as given in ‘reftex-section-levels’), and t for the default.
`----
Customize this variable acc. to your needs and you should be set.
Best, Arash