2

I'm using titlesec package to have a good style of the chapters and sections title. But now, 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 prepared an example of what I'm using.

I'm using texshop.

enter image description here

\documentclass[a4paper,11pt,twoside,english]{book}
\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=3cm,right=2.5cm]{geometry} 
\linespread{1.3}

\usepackage{titlesec} \usepackage[Glenn]{fncychap}

\begin{document} \chapter{The standard Model and beyond} \section{The Standard Model of Particle physics} \end{document}

CarLaTeX
  • 62,716
Re Aly
  • 21
  • Related (basically, exactly what you want for \section, but not for \chapter): https://tex.stackexchange.com/questions/429441/beautiful-section-styles/429453#429453 – Skillmon Nov 29 '20 at 10:18
  • Why do you use fncychap? – Skillmon Nov 29 '20 at 10:23
  • Also, take a look at https://tex.stackexchange.com/questions/476173/title-formatting-the-section-makes-the-bibliography-header-disappear?noredirect=1#comment1201961_476173 (the solutions suggested have their limitations). – Skillmon Nov 29 '20 at 10:24
  • If you're using LuaLaTeX one could also use lua-ul which should be more robust than soul and ulem. – Skillmon Nov 29 '20 at 10:24

0 Answers0