# Replicating a particular chapter style

I would like to replicate the following chapter style in LaTeX, so that a title page looks like the mock-up image below. How could I go about achieving this?

Here's a good point to start. I wouldn't like to have the upper box containing "Chapter …" on the contents page, so just the lower line with the text "More about LaTeX" replaced with "Contents", much like in the reference document below,

\documentclass[11pt]{book}
\usepackage[pass,paperwidth=6.85in,paperheight=9.3in]{geometry}
\usepackage[nottoc]{tocbibind}
\usepackage{titlesec}
\usepackage[titles]{tocloft}

\renewcommand\cftchapfont{\normalfont}
\renewcommand\cftchappagefont{\normalfont}

\titleformat{\chapter}[display]
{}{\hfill\rule{.7\textwidth}{3pt}}{0pt}
\titleformat{name=\chapter,numberless}[display]
{}{\hfill\rule{.7\textwidth}{3pt}}{0pt}

\begin{document}

\frontmatter
\tableofcontents
\listoftables
\listoffigures

\mainmatter
\chapter{Test Chapter}
\section{Test Subsection}

\end{document}


that gives:

I have added below a mock-up of what I would like to achieve.

• – John Kormylo Sep 13 '18 at 22:16
• This doesn't really give the desired effect... – wrb98 Sep 14 '18 at 13:03
• It was meant to inspire and show different approaches. – John Kormylo Sep 14 '18 at 14:38

Here is a simpleminded proposal based on this answer, as well as this answer and this answer.

\documentclass[11pt]{book}
\usepackage[pass,paperwidth=6.85in,paperheight=9.3in]{geometry}
\usepackage[nottoc]{tocbibind}
\usepackage[explicit]{titlesec}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage[titles]{tocloft}
\usepackage{lipsum}

\renewcommand\cftchapfont{\normalfont}
\renewcommand\cftchappagefont{\normalfont}

% based on https://tex.stackexchange.com/a/335945/121799
\newcommand\CustomChapterTitle[2][]{%
\begin{tikzpicture}
\path(0,0) coordinate (O);
\node (A) [right=0.3\textwidth of O,
rectangle,minimum width=0.7\textwidth, minimum height=1cm,
text=green!40!black, text width=0.7\textwidth-3mm,align=left,
path picture={\draw[line width=1mm,orange] (path picture bounding box.south west) |-
(path picture bounding box.north east);},
#1]
{#2};
\end{tikzpicture}
}
\newcommand\CustomSectionTitle[2][]{%
\begin{tikzpicture}
\path(0,0) coordinate (O);
\node (A) [right=0.45\textwidth of O,
rectangle,minimum width=0.55\textwidth, minimum height=1cm,
text=green!40!black, text width=0.55\textwidth-3mm,align=left,
path picture={\draw[line width=1mm,orange] (path picture bounding box.north west) --
(path picture bounding box.north east);},
#1]
{#2};
\end{tikzpicture}
}
\titleformat{\chapter}[display]
{}{}{0em}
{\CustomChapterTitle[font=\huge\bfseries]{#1}}
\titleformat{name=\chapter,numberless}[display]
{}{}{0em}
{\CustomChapterTitle[font=\huge\bfseries]{#1}}
\titleformat{\section}[display]
{}{}{0em}
{\CustomSectionTitle[font=\large\bfseries]{#1}}
\titleformat{name=\section,numberless}[display]
{}{}{0em}
{\CustomSectionTitle[font=\large\bfseries]{#1}}

% Redefinition of ToC command to get centered heading
\makeatletter% from https://tex.stackexchange.com/a/157411/121799
\renewcommand\tableofcontents{%
\section*{\contentsname
\@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
\@starttoc{toc}%
}% from https://tex.stackexchange.com/a/173180/121799
\renewcommand\listoffigures{%
\section*{\listfigurename
\@mkboth{%
\MakeUppercase\listfigurename}{\MakeUppercase\listfigurename}}
\@starttoc{lof}%
}%
\renewcommand\listoftables{%
\section*{\listtablename
\@mkboth{%
\MakeUppercase\listtablename}{\MakeUppercase\listtablename}}
\@starttoc{lot}%
}%
\makeatother

\begin{document}

\frontmatter
\tableofcontents
\listoftables
\listoffigures

\mainmatter
\chapter{Test Chapter}
\section{Test Section}

\end{document}


• It's not too far away, but see the mock-up image for a clearer picture of what I asked for. – wrb98 Sep 19 '18 at 16:16
• @wrb98 I'm sorry, I misinterpreted your question. Better now? – user121799 Sep 19 '18 at 17:19