# Change the template used by the function LaTeX-section (C-c C-s)

In a document using LaTeX-mode (i.e., AUCTeX), the command LaTeX-section (C-c C-s) inserts a small template corresponding to a LaTeX sectioning element. How can these inserted templates be modified?

The original function inserts something like this:

\section{A Section}
\label{a-label}


And let's say that, instead, I'd like the command to insert something different, like:

\section{\color{red}A Section}\label{a-label}


This is not the idea behind LaTeX. If you want your titles to be red, use a package like titlesec and change the color on a global level. Adding the color command inside the \section macro is a bad idea.
• You seem to have misinterpreted my question. The questions is not about changing the color of the section heading, it's about controlling what the command LaTeX-section inserts into the buffer. Changing the color was just an arbitrary example. Sep 17 '18 at 8:40