我有这个编辑版的BlueBox
,但我希望框中的数字居中并与章节名称对齐。我还希望框顶部的文本(丹麦语章节)消失。
\usepackage{fourier} % or what ever
\usepackage[scaled=1]{helvet}%. Sans serif - Helvetica
\usepackage{color,calc}
\newsavebox{\ChpNumBox}
\definecolor{Skyblaa}{RGB}{0,153,255}
\makeatletter
\newcommand
*
{\thickhrulefill}{%
\leavevmode\leaders\hrule height 1\p@ \hfill \kern \z@}
\newcommand
*
\BuildChpNum[2]{%
\llap{\begin{tabular}[t]{@{}c@{}}
\makebox[0pt][c]{#1\strut} \\[0.5ex]
\colorbox{Skyblaa}{%
\rule[-4em]{0pt}{0pt}%
\rule{1.5ex}{0pt}\color{black}#2\strut
\rule{1.5ex}{0pt}}%
\end{tabular}\hspace{0cm}%
}}
\makechapterstyle{BlueBox}{%
\renewcommand{\chapnamefont}{\large\scshape}
\renewcommand{\chapnumfont}{\Huge\bfseries}
\renewcommand{\chaptitlefont}{\raggedright\Huge\bfseries}
\setlength{\beforechapskip}{15pt}
\setlength{\midchapskip}{6pt}
\setlength{\afterchapskip}{20pt}
\renewcommand{\printchaptername}{}
\renewcommand{\chapternamenum}{}
\renewcommand{\printchapternum}{%
\sbox{\ChpNumBox}{%
\BuildChpNum{\chapnamefont\@chapapp}%
{\chapnumfont\thechapter}}}
\renewcommand{\printchapternonum}{%
\sbox{\ChpNumBox}{%
\BuildChpNum{\chapnamefont\vphantom{\@chapapp}}%
{\chapnumfont\hphantom{\thechapter}}}}
\renewcommand{\afterchapternum}{}
\renewcommand{\printchaptertitle}[1]{%
\usebox{\ChpNumBox}\hfill
\parbox[t]{\hsize-\wd\ChpNumBox-1em}{%
\vspace{\midchapskip}%
\thickhrulefill\par
\chaptitlefont ##1\par}}%
}
\chapterstyle{BlueBox}