Hi Arash,
Thanks for your help. On Sun, Mar 1, 2020 at 4:37 AM Arash Esbati <ar...@gnu.org> wrote: > Hi Shiyao, > > Shiyao MA <i...@introo.me> 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 > -- Best, Shiyao