I'm trying to make a Memoir chapter style based on veelo, using this custom definition:
\documentclass[a5paper]{memoir}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage[showframe]{geometry}
\newlength{\numberheight}
\setlength{\numberheight}{15mm}
\makechapterstyle{myveelo}{%
\setlength{\afterchapskip}{30pt}
\renewcommand*{\chapterheadstart}{\vspace*{10pt}}
\renewcommand*{\afterchapternum}{\par\nobreak\vskip 10pt}
\renewcommand*{\chapnumfont}{\normalfont\Huge\bfseries}
\renewcommand*{\chaptitlefont}{\normalfont\Huge\bfseries}
\renewcommand*{\printchaptername}{}
\renewcommand*{\chapternamenum}{}
\renewcommand*{\printchapternum}{%
\makebox[0pt][l]{%
\resizebox{!}{\numberheight}{\chapnumfont\thechapter}%
}%
\makebox[0pt][l]{%
\hspace{\textwidth}%
\hspace{1.5cm}%
\rule{2cm}{\numberheight}%
}
}%
\makeoddfoot{plain}{}{}{\thepage}
}
\chapterstyle{myveelo}
\begin{document}
\chapter{Introduction}
\lipsum[1]
\end{document}
An example chapter made with this (with showframe from the geometry package):
The problem is that the number is not aligned, and that the offset depends on the chapter number (1 is quite large, 4 is much smaller, etc.). Is there a way to left-align the number automatically for all chapter numbers?
\documentclass
and ending with\end{document}
. Another comment, in your snippet you don't need\makeatletter
and\makeatother
since you are not using internal commands (containing @)