I'm having some problems modifying the veelo chapter style. Due to my smaller margins (I need A5 paper size), the regular veelo didn't work correctly. So instead of having the chapter number in the margin, I want it to be right aligned to the text block (see figure). I am doing that now by hard-coding it, but due to the different width of the various number characters it doesn't consistently work for all chapters. Also, the black box that extends outside of the trim marks is left-aligned to the number, causing the box to have different sizes for different chapter numbers.
My question: could you check out my code below and tell me what I'm supposed to change to 1) right-align the number to the text block, and 2) make the black box have the same size regardless of the number width?
Thanks so much!
\makeatletter
\newlength{\numberheight}
\setlength{\numberheight}{\beforechapskip}
\newlength{\barlength}
\makechapterstyle{myveelo}{%
\setlength{\afterchapskip}{40pt}
\renewcommand*{\chapterheadstart}{\vspace*{40pt}}
\renewcommand*{\afterchapternum}{\par\nobreak\vskip 25pt}
\renewcommand*{\chapnamefont}{\normalfont\LARGE\flushright}
\renewcommand*{\chapnumfont}{\normalfont\HUGE}
\renewcommand*{\chaptitlefont}{\normalfont\HUGE\bfseries\flushright}
\renewcommand*{\printchaptername}{%
\chapnamefont\MakeUppercase{\@chapapp}\hspace*{\midchapskip}}
\renewcommand*{\chapternamenum}{}
\setlength{\beforechapskip}{18mm}
\setlength{\midchapskip}{\paperwidth}
\addtolength{\midchapskip}{-\textwidth}
\addtolength{\midchapskip}{-\spinemargin}
\addtolength{\midchapskip}{-11.5em}
\renewcommand*{\printchapternum}{%
\makebox[0pt][l]{\hspace{-1.5cm}%
\resizebox{!}{\numberheight}{\chapnumfont \thechapter}%
\hspace{1.8em}%
\rule{\midchapskip}{\beforechapskip}%
}}%
\makeoddfoot{plain}{}{}{\thepage}}
\makeatother
Best Answer
Your redefinition of
\printchapternum
has to be changed to something likechange the
1cm
I used to separate the number and the filled square to the desired value.The complete code:
An image of the output: