
I would like to add a colored box around the chapter number and section number, I want to get the same style as the photo attached but I don't know how to do this. I appreciate if someone can help me.
I'm using texshop.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
\chapterformat
, e.g., using \renewcommand*{\chapterformat}{\colorbox{red}{\textcolor{white}{\thechapter}}\enskip}
. There are also commands for other section levels and \chapterlinesformat
and \sectionlinesformat
for advanced changes. See the manual and several examples in the internet for more information. memoir also has its own commands so configure the chapter title. See the manual for more information. Other classes may also have similar features (again, see the manual) or allow to use titlesec. Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis