0

How to change the thickness of the frame using titlesec?

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}

\usepackage{titlesec}


\begin{document}
\titleformat{\section}[frame]
{\normalfont}{\filleft\Huge\bfseries\ Chapter 7\ }
{30pt}{\Huge\bfseries\filcenter}\section{this section}
\end{document}
0

Just add something like \setlength{\fboxrule}{5pt}:

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}

\usepackage{titlesec}


\begin{document}
\titleformat{\section}[frame]
{\normalfont\setlength{\fboxrule}{5pt}}{\filleft\Huge\bfseries\ Chapter 7\ }
{30pt}{\Huge\bfseries\filcenter}\section{this section}
\end{document}
1
  • Thanks a lot! that was very helpful!
    – rexa
    Mar 31 '20 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.