0

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} 

1 Answer 1

1

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.

2
  • 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. Commented Sep 17, 2018 at 8:40
  • @UndeadKernel - I simply read your question and tried to interprete as little as possible. Maybe you edit your question and show a real life showcase as a MWE. Commented Sep 17, 2018 at 10:01

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.