-1

I have found a good looking fancy chapter style and would like to implement it to my book. Could anyone help me with the code? The Chapter looks something like the one below. Thanks in advance! enter image description here

  • 1
    What have you tried? This is not a "do it all for me" site but instead "I have tried this but it didn't work so can you help me?" site. Please show what you have tried. --- GOM – Peter Wilson May 29 '21 at 19:43

1 Answers1

3

Starting from your previous question Fancy Chapter Style - Custom, I've done a layout similar to your image.

\documentclass[12pt]{book}
\usepackage{geometry}
\usepackage{miama}
\usepackage[T1]{fontenc}
\usepackage{fmtcount}
\usepackage{lipsum}% for dummy text
\usepackage[inline]{showlabels}% to show the labels
\renewcommand{\showlabelfont}{\small\ttfamily\color{red}}

\usepackage{tikz} \usetikzlibrary{fadings} \usetikzlibrary{positioning} \usetikzlibrary{backgrounds,scopes} \usepackage{tabularray} \usepackage{xcolor}

\usepackage[explicit]{titlesec} \titleformat{\chapter} {} {} {0pt} {\makebox[0pt][l]{\hspace{-2pt}\begin{tikzpicture} \node[text width=18cm, inner sep=0pt, outer sep=0pt] (A) {\color{brown!70!black}\fmmfamily\Huge\bfseries\chaptername~\Numberstringnum{\thechapter}}; \begin{scope}[on background layer] \draw[brown, line width=4pt, path fading=east] ([yshift=-3pt]A.base west) -- ([yshift=-3pt, xshift=-30pt]A.base); \draw[brown, line width=4pt, path fading=west] ([yshift=-3pt, xshift=-30pt]A.base) -- ([yshift=-3pt]A.base east); \end{scope} \node[text width=18cm, anchor=north west, inner sep=0pt, orange, outer sep=0pt] (B) at (A.south west) {\begin{tblr}{leftsep=0pt,rightsep=0pt,colspec={X[l,b]Q[r,t]}} \Huge\sffamily\bfseries\fontfamily{phv}\selectfont #1&\raisebox{0pt}[0pt][0pt]{\sffamily\bfseries\fontsize{70}{60}\fontfamily{phv}\selectfont\thechapter}\ \end{tblr}}; \draw[brown, line width=4pt, path fading=east] ([yshift=2mm]B.south west) -- ([yshift=2mm]B.south); \draw[brown, line width=4pt, path fading=west] ([yshift=2mm]B.south) -- ([yshift=2mm]B.south east); \end{tikzpicture}}} []

\titleformat{\section} {\sffamily\large} {} {0pt} {\textcolor{orange}{\bfseries\thesection\quad\raggedright #1}} []

\raggedbottom

\begin{document} \chapter{Introduction}\label{chs:introduction} \lipsum[1] \section{Repetition of High Shool Mechanics}\label{chs:repetition_of_highshool_mechanics} \lipsum[2] \section{Repetition of Vector Analysis}\label{chs:repetition_of_vector_analysis} \lipsum[3]

\chapter[Another]{Another chapter with a long long long title} \lipsum[1] \section{A section with a long long long long title} \lipsum[2] \section{Another section with a long long long long title} \lipsum[3]

\chapter[Another chapter]{Another chapter with a long long long long long long long long long long long long title} \lipsum[1] \section{A section with a long long long long title} \lipsum[2] \section{Another section with a long long long long title} \lipsum[3] \end{document}

enter image description here

Anyway, I would add that this style is anything but good-looking, in my opinion.

CarLaTeX
  • 62,716