1

I would appreciate help in altering the chapter style of this document so that the grey backdrop has slightly rounded edges, and the horizontal space between the right edge of the backdrop and the words "A chapter" can be varied.

\documentclass[11pt,a4paper]{report}
\usepackage[margin=2.5cm]{geometry}
\usepackage{xcolor}
\usepackage[calcwidth]{titlesec}
\usepackage{blindtext}
\usepackage{scrextend}
\usepackage{microtype}
\usepackage[leqno]{amsmath}
\usepackage{etoolbox}
\usepackage{lipsum}
\usepackage[Bjornstrup]{fncychap} % <===================================



\colorlet{chapbgcolor}{gray!50}% shaded background color for chapters
\colorlet{chapnumcolor}{black!55}% color for numbers in chapters

\begin{document}
\sloppy
\chapter{A chapter}
Some text

\end{document}
  • Does the fact that you load titlesec mean that you are open to non-fancychap based solutions? – marmot Nov 24 '18 at 0:39
2

Here is a quick attempt to produce something along those lines.

\documentclass[11pt,a4paper]{report}
\usepackage[margin=2.5cm]{geometry}
\usepackage{xcolor}
\usepackage[calcwidth]{titlesec}
\usepackage{microtype}
%\usepackage[Bjornstrup]{fncychap} % <===================================
\usepackage{tikz}


\colorlet{chapbgcolor}{gray!50}% shaded background color for chapters
\colorlet{chapnumcolor}{black!55}% color for numbers in chapters
%from https://tex.stackexchange.com/a/233830/121799
\newcommand{\chaptitle}[1]{%
\begin{tikzpicture}
\fill[chapbgcolor!70,rounded corners=5pt] (0,2.5) rectangle (\linewidth,0);
\node[align=right,anchor=south east,inner sep=6pt,font=\Large\bfseries\sffamily] at (\linewidth,0) {#1};
\node[font=\fontsize{60}{62}\usefont{OT1}{ptm}{m}{n}\selectfont\itshape\bfseries,text=chapnumcolor] at 
(\linewidth,2.5) {\thechapter};
\end{tikzpicture}
}

\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\sffamily}{}{25pt}{\chaptitle}
\titlespacing*{\chapter} {0pt}{110pt}{20pt}


\begin{document}
\sloppy
\chapter{A chapter}


Some text

\end{document}

enter image description here

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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