I'm trying to put all the section names of my book in a tcolorbox.
I have this code:
Code: Select all
\titleformat{\section}[hang]{\LARGE\bfseries\color{red}}{}{0pt}{\LARGE\bfseries\color{red}}Thank you in advance.
Code: Select all
\titleformat{\section}[hang]{\LARGE\bfseries\color{red}}{}{0pt}{\LARGE\bfseries\color{red}}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
tcolorbox instead of colorbox but it could be the same. In the other topic it was made by redefining LaTeX' internal macro, not titlesec as it's mentioned here.\@ssect. It's default LaTeX, independent of the template, so you can use it in a similar way here. Just if a package redefines such internal stuff (titlesec may do) it can make a difference, but just test it with the \@ssect patch.\@ssect is from kind of 25 old base LaTeX internals, that's why it doesn't look so user friendly like having a macro for the section name that could be redefined easily.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