Text Formatting ⇒ Chapter style
Chapter style
Introduction 1
-----------------------
but the number should be bigger then chapter name. The chapter name and number should be in the same line...
I found:
\documentclass{sample}
\makeatletter
\def\thickhrulefill{\leavevmode \leaders \hrule height 1ex \hfill \kern \z@}
\def\@makechapterhead#1{%
\vspace*{10\p@}%
{\parindent \z@
{\raggedleft \reset@font
\fontsize{15ex}{15ex}\selectfont %Problème avec les substitutions...
\bfseries\thechapter\par\nobreak}%
\par\nobreak
\interlinepenalty\@M
{\raggedright \Huge \bfseries #1}%
\par\nobreak
\hrulefill
\par\nobreak
\vskip 100\p@
}}
\def\@makeschapterhead#1{%
\vspace*{10\p@}%
{\parindent \z@
{\raggedleft \reset@font
\fontsize{15ex}{15ex}\selectfont %Problème avec les substitutions...
\bfseries\vphantom{\thechapter}\par\nobreak}%
\par\nobreak
\interlinepenalty\@M
{\raggedright \Huge \bfseries #1}%
\par\nobreak
\hrulefill
\par\nobreak
\vskip 100\p@
}}
\begin{document}
\chapter{Introduction}
\end{document}
It's quite ok, but the number is not at the same line as chapter name...
Please help;)
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Chapter style
Code: Select all
\documentclass{report}
\usepackage{graphicx}
\usepackage[noindentafter]{titlesec}
\titleformat{\chapter}
{\Huge\bfseries}% global formatting (number and title)
{}% number and its formatting
{0pt}% spacing between number and title
{}% optional (content between number and title)
[\hrule\vspace{-41.5pt}\filleft\scalebox{2}{\thechapter}]% text/command after title
\titlespacing{\chapter}
{0pt}% left
{2cm}% before
{1cm}% after
\begin{document}
\chapter{Introduction}
Some text\ldots
\chapter[A little bit longer chapter title]{A little bit longer\\chapter title}
Some text\ldots
\end{document}