Chapter

LaTeX Chapter Style

Category

Other

License

Free to use (MIT)

File

main.tex

main.texRead-only preview
\documentclass[a4paper,12pt]{book}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{lipsum}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% title format for chapter
%
\usepackage{tikzpagenodes}
\usepackage[explicit]{titlesec}
\usepackage{xcolor}
\usepackage{microtype}
\definecolor{blueBack}{RGB}{0,82,155}

%	For Chapters
%\titleformat{command}
%[shape]
%{format}
%{label}
%{sep}
%{before-code}
%[after-code]

\titleformat{\chapter}
[display] %shape
{} %format
{}{0cm} %sep
{ %before
	\begin{tikzpicture}[background rectangle/.style={fill=olive!45} remember picture,overlay]
	\node[shape=rectangle, fill=gray!20, minimum height=12cm, minimum width=1.0\paperwidth] at (7.61, 5.5cm) {};
	\node[shape=rectangle, minimum height=4cm, minimum width=4cm, absolute]
	 at (1.54, 3.54) {
		\rotatebox[origin=c]{90}{%
			\normalfont\color{black}\Large%
			\textls[180]{\textsc{\fontsize{16}{20}\selectfont\chaptertitlename}}%
		}\hspace{0pt}
		{\setlength\fboxsep{0pt}%
			\colorbox{blueBack}{
				\parbox[c][3.5cm][c]{3.5cm}{%
					\centering\color{white}{\Huge \thechapter}}%
		}}
	};
	\node[shape=rectangle, minimum height=4cm, minimum width=11cm, text width=11cm, align=right, font=\huge]
	at (10, 3.54) {
		 \textbf{#1}
	};
	\end{tikzpicture}
}
[\enlargethispage{-\parskip}\vspace{1cm}]

\titleformat{name=\chapter,numberless}
[display] %shape
{} %format
{}{0cm} %sep
{ %before
	\begin{tikzpicture}[background rectangle/.style={fill=olive!45} remember picture,overlay]
	\node[shape=rectangle, fill=gray!20, minimum height=12cm, minimum width=1.0\paperwidth] at (7.61, 5.5cm) {};
	\node[shape=rectangle, minimum height=4cm, minimum width=11cm, text width=11cm, align=right, font=\huge]
	at (10, 3.54) {
		\textbf{#1}
	};
	\end{tikzpicture}
}
[\enlargethispage{-\parskip}\vspace{1cm}]

\begin{document}

\author{TeXstudio Team}
\title{Simple Book Example}
\date{January 2013}

%\frontmatter
%\maketitle
%\tableofcontents

\mainmatter
\chapter[Short title]{This is a demonstration text for showing how line breaking works.}
\lipsum

\backmatter
% bibliography, glossary and index would go here.

\end{document}
Preview
Chapter preview
Chapter LaTeX Template | Bibby | Bibby AI