1

I would like make a fancy chapter like the figure.

Desired Output

However, i made this code

\documentclass[12pt,a4paper]{book}


\usepackage{lmodern}
\usepackage{titlesec}
\usepackage{microtype}
\usepackage{tikz}



\titleformat{\chapter}[display]
  {\normalfont\bfseries\color{black}}
  {%\filleft%
    \begin{tikzpicture}
    \node[
      outer sep=-10pt,
      text width=2.5cm,
      minimum height=3cm,
      fill=black,
      font=\color{white}\fontsize{80}{90}\selectfont,
      align=center
      ] (num) {\thechapter};
    \node[
      rotate=0,
      anchor=south,
      font=\color{black}\Large\normalfont
      ] at ([yshift=43pt,xshift=30]num.west)  {\textls[180]{\textsc{\chaptertitlename}}};  
    \end{tikzpicture}%
 } 
  {-90pt}
  {\titlerule[2.5pt]\vskip3pt\titlerule\vskip4pt\LARGE\sffamily \raggedright }

  \begin{document}
\chapter{The Singular Sturm-Liouville Problems in Spectral Parameter}

  \end{document}  

that produces this one

Desired Output

How can I produce the chapter like the First Figure?

  • 1
    Please do not ask questions twice! Better is to edit your first question tex.stackexchange.com/questions/501778/fancy-chapter-style with needed updates to make it as clear as possible! And please -- as usual here -- make your code snippet compilable! Then we do not have to guess what you are doing ... – Mensch Aug 6 at 16:36
  • Please provide a complete MWE, so we can provide help. I have tried to compile your code and didn't work. – Mauramz Aug 6 at 19:01
  • Now, the code is compiling, thanks for your remark. – Daniel Borin Aug 8 at 9:00
3

Is this what you want?

enter image description here

\documentclass[12pt,a4paper]{book}
\usepackage{lipsum} % dummy text

\usepackage{lmodern}
\usepackage[explicit]{titlesec}
\usepackage{microtype}
\usepackage{tikz}

\titleformat%
{\chapter}[hang]%
{\bfseries}{%
\begin{minipage}[t]{0.3\linewidth}  
\vspace{0pt}% do not remove
\begin{tikzpicture}
\node[
outer sep=0pt,
text width=2.5cm,
minimum height=2.5cm,
fill=black,
font=\color{white}\fontsize{80}{90}\selectfont,
align=center
] (num) {\thechapter};
\node[
outer sep=0pt,
inner sep=0pt,
anchor=south,
font=\color{black}\Large\normalfont
] at ([yshift=3pt]num.north) {\textls[180]{\textsc{\chaptertitlename}}};
\end{tikzpicture}  
\end{minipage}%
}
{0pt}%
{%
\begin{minipage}[t]{.7\linewidth}%
    \vspace{2pt} % do not remove
    \rule{\linewidth}{2.5pt}\\\vskip -1.75\baselineskip%
    \rule{\linewidth}{.7pt}\vskip 5pt
    {\LARGE\raggedright\textsf{#1}}
\end{minipage}%

}


\begin{document}
    \chapter{The Singular Sturm-Liouville Problems in Spectral Parameter}
    \lipsum[1]
\end{document}  
  • That is right, i compileted and works just fine, Thank you for the Help – Daniel Borin Aug 22 at 0:02

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.