4

I'm writing a book on Latex and I found a chapter heading style in a book that is interesting, but I don't find any package, or code, that gives me what I research.

The style is the following one :enter image description here

EDIT : Here is the code I tried:

\documentclass[a4paper,12pt,twoside]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel} % If you write in French
\usepackage{lipsum}
\usepackage{times}
\usepackage{xcolor}
\usepackage{amsthm}
\usepackage{amssymb,amsmath,bbm}
\usepackage{mathtools}
\usepackage[a4paper]{geometry}

\definecolor{MyGrey}{RGB}{160,160,160}

\newcommand{\HUGE}{\fontsize{40}{36}\selectfont}

%%% HEADERS and FOOTERS %%%
\renewcommand{\baselinestretch}{1.05}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyhead[LE]{\textbf{\thepage}  {\color{MyGrey}$\: \blacktriangleright \:$}  \nouppercase{\leftmark}}
\fancyhead[RO]{\nouppercase{\rightmark}  {\color{MyGrey}$\: \blacktriangleleft \:$}  \textbf{\thepage}}
\setlength{\headheight}{20pt}

\renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter.\emph{ #1}}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection \emph{ #1}}{}}

\let\headruleORIG\headrule
\renewcommand{\headrule}{\color{black} \headruleORIG}
%\renewcommand{\headrulewidth}{1pt}
\renewcommand{\footrulewidth}{0pt}

\fancypagestyle{plain}{
  \fancyhead{}
  \fancyfoot[C]{\textbf{\thepage}}
  \renewcommand{\headrulewidth}{0pt}
  \renewcommand{\footrulewidth}{0pt}
}

\makeatletter
\def\@textbottom{\vskip \z@ \@plus 1pt}
\let\@texttop\relax
\makeatother

% % Clear Header Style on the Last Empty Odd pages
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else%
\hbox{}%
\thispagestyle{empty}% % Empty header styles
\newpage%
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother

%%% CUSTOM CHAPTER FORMAT %%%
\usepackage{titlesec}
\titleformat{\chapter}[display]
    {\normalfont}
    {\filcenter\large\MakeUppercase{\chaptertitlename}\\[4ex] \HUGE\thechapter}{4ex}
    {\filcenter\Huge\uppercase}
\titlespacing*{\chapter}{0pt}{-50pt}{30pt}[0pt]

\begin{document}

\chapter[Introduction and overview of electrode processes]{Introduction\\and overview\\of electrode\\processes}
%
\section{Introduction}
Electrochemistry is the branch of chemistry concerned with the interrelation of electrical and chemical effects. A large part of this field deals with the study of chemical changes caused by the passage of an electric current and the production of electrical energy by chemical reactions. In fact, the field of electrochemistry encompasses a huge array of different phenomena (e.g., electrophoresis and corrosion), devices (electrochromic displays, electro analytical sensors, batteries, and fuel cells), and technologies (the electroplating of metals and the large-scale production of aluminum and chlorine). While the basic principles of electrochemistry discussed in this text apply to all of these, the main emphasis here is on the application of electrochemical methods to the study of chemical systems.

\lipsum[1-10]
\end{document}

I don't know how to create the grey triangle bellow the "CHAPTER" name, and to increase the spacement between the letters of the word "CHAPTER". I also would like to have the same section format...

So here is my try:

enter image description here

So, if someone can help me, it would be nice!

3
  • Welcome to Tex. Could you edit your question to include a Minimum working example of what you have tried already. I would be benefit someone in answering if they knew what document class, packages, etc that you are using.
    – gman
    Feb 20, 2020 at 10:09
  • 3
    Take a look at the documentation of the titlesec package, in particular using the display style (cf. § Advanced Interface, Format).
    – Bernard
    Feb 20, 2020 at 10:12
  • i've updated my post, with my test. hope it will be sufficient !
    – RilleyBack
    Feb 20, 2020 at 13:10

2 Answers 2

4

Here's a solution built around your example, made with titlesec. It also uses the microtype package to add space between the letters of "CHAPTER".

\documentclass[a4paper,12pt,twoside]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel} % If you write in French
\usepackage{lipsum}
\usepackage{times}
\usepackage{xcolor}
\usepackage{amsthm}
\usepackage{amssymb,amsmath,bbm}
\usepackage{mathtools}
\usepackage[a4paper]{geometry}
\usepackage[letterspace=200]{microtype}

\definecolor{MyGrey}{RGB}{160,160,160}
\definecolor{OtherGrey}{RGB}{200,200,200}
\newcommand{\greytriangleright}{{\color{MyGrey}$\blacktriangleright$}}
\newcommand{\greytriangleleft}{{\color{MyGrey}$\blacktriangleleft$}}
\newcommand{\greytriangledown}{{\color{OtherGrey}$\blacktriangledown$}}

\newcommand{\HUGE}{\fontsize{40}{36}\selectfont}

%%% HEADERS and FOOTERS %%%
\renewcommand{\baselinestretch}{1.05}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyhead[LE]{\textbf{\thepage} \:\greytriangleright\: \nouppercase{\leftmark}}
\fancyhead[RO]{\nouppercase{\rightmark} \:\greytriangleleft\: \textbf{\thepage}}
\setlength{\headheight}{20pt}

\renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter.\emph{ #1}}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection \emph{ #1}}{}}

\let\headruleORIG\headrule
\renewcommand{\headrule}{\color{black} \headruleORIG}
%\renewcommand{\headrulewidth}{1pt}
\renewcommand{\footrulewidth}{0pt}

\fancypagestyle{plain}{
  \fancyhead{}
  \fancyfoot[C]{\textbf{\thepage}}
  \renewcommand{\headrulewidth}{0pt}
  \renewcommand{\footrulewidth}{0pt}
}

%%% CUSTOM CHAPTER FORMAT %%%
\newlength{\trianglewidth}
\newlength{\triangleheight}
\settowidth{\trianglewidth}{\greytriangledown}
\settoheight{\triangleheight}{\greytriangledown}
\usepackage{titlesec}
\titleformat{\chapter}[display]
    {\normalfont}
    {\filcenter\resizebox{6\trianglewidth}{6\triangleheight}{\greytriangledown}\\[-6ex]%
     \filcenter\MakeUppercase{\lsstyle\bfseries\chaptertitlename}\\[4ex]%
     \HUGE\thechapter}
    {4ex}
    {\filcenter\Huge\scshape\uppercase}
\titlespacing*{\chapter}{0pt}{-50pt}{30pt}[0pt]
\titleformat{\section}{\large\uppercase}{\hspace{-.5em}\llap{\greytriangleright\enspace\thesection}}{.5em}{}

\begin{document}

\chapter[Introduction and overview of electrode processes]{Introduction\\and overview\\of electrode\\processes}
%
\section{Introduction}
Electrochemistry is the branch of chemistry concerned with the interrelation of electrical and chemical effects. A large part of this field deals with the study of chemical changes caused by the passage of an electric current and the production of electrical energy by chemical reactions. In fact, the field of electrochemistry encompasses a huge array of different phenomena (e.g., electrophoresis and corrosion), devices (electrochromic displays, electro analytical sensors, batteries, and fuel cells), and technologies (the electroplating of metals and the large-scale production of aluminum and chlorine). While the basic principles of electrochemistry discussed in this text apply to all of these, the main emphasis here is on the application of electrochemical methods to the study of chemical systems.

\lipsum[1-10]
\end{document}
3
  • -nice -- I missed this one -- was trying to find the xact replica of the downfacing triangle at the top centre of the title page -- has got small granules/dots -- but +1
    – js bibra
    Feb 20, 2020 at 15:14
  • well, thank you for your help!
    – RilleyBack
    Feb 20, 2020 at 15:17
  • I have one more demand: for the unnumbered chapter (e.g. Introduction, toc, ...), the top triangle does not appear.. how can i add it, like in this exemple : casimages.com/i/200220050447805014.png.html (the name "chapter ##) does not appear.
    – RilleyBack
    Feb 20, 2020 at 15:58
0

Take a look at memoir, it handles a staggering assortment of chapter styles, and you can tweak them, or build your own. Take a peek at Madsen's "Various chapter styles for the memoir class" for examples (with full code).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.