
答え1
titlesec
と を使用しますtcolorbox
。次のソリューションを見てください。tcolorbox を使用した章スタイル?異なるボックス レイアウトを使用しますが、tcolorbox
オプションを調整して希望のレイアウトを取得できます。
番号付き章に対するこのソリューションの初期適応は次のとおりです。色、寸法などを調整して調整する必要があります。
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}
{}
{20pt}
{%
\begin{tcolorbox}[
enhanced,
rounded corners,
shadow={1mm}{-1mm}{-2.2mm}{black!20!white},
colback=white,
boxrule=0mm,
arc=3mm,
leftrule=0pt,
rightrule=0pt,
fontupper=\color{blueish}\sffamily\bfseries\huge,
width=\textwidth-3.2mm, % account for shadow width.
top=0.6cm,
bottom=0.6cm,
overlay={
\node[
fill=blueish,
line width=0cm,
inner sep=0pt,
text width=13mm,
minimum height=16mm,
align=center,
anchor=south east,
xshift=2.2mm, yshift=9mm,
font=\color{white}\sffamily\bfseries\fontsize{30}{36}\selectfont
]
(chapname) at (frame.north east) {\thechapter};
\node[color=gray,font=\large,anchor=base east,inner sep=1mm] at (chapname.base west)
{\chaptertitlename};
}
]
\MakeUppercase{#1}
\end{tcolorbox}%
}
これは与える