I have attempted the following code to achieve this:
Code: Select all
\documentclass[a4paper,openany]{amsbook}
\usepackage{color}
\usepackage{array}
\usepackage{colortbl}
\usepackage{rotating}
\definecolor{Dark}{gray}{.20}
\definecolor{Light}{gray}{.40}
\makeatletter
\renewcommand{\@makechapterhead}[1]{%
\vspace*{50 pt}%
{\setlength{\parindent}{0pt} \raggedright \normalfont
\bfseries\Large
\begin{tabular}{|>{\color{white}\columncolor[gray]{.2}}r|>{\color{white}%
\columncolor[gray]{.6}}p{11cm}}
\thechapter & #1
\end{tabular}
\begin{sideways}\colorbox{Dark}{\color{white}\thechapter}\ \colorbox{Light}{\color{white}#1}\end{sideways}
\par\nobreak\vspace{40 pt}}}
\makeatother
\begin{document}
\chapter{XYZ}
\section{Introduction}
Body text here
\end{document}
1) The vertical bar does not span the whole page.
2) The main text does not start to the right of the vertical bar.
How can I achieve the desired layout?
Thanks