General ⇒ Having Problems to Number Setions in Table of Content
Having Problems to Number Setions in Table of Content
The following is my code in the file before \begin{document} which is from a website http://zoonek.free.fr/LaTeX/LaTeX_sampl ... ter/0.html :
\documentclass{sample}
\makeatletter
\def\thickhrulefill{\leavevmode \leaders \hrule height 1ex \hfill \kern \z@}
\def\@makechapterhead#1{%
{\parindent \z@ \raggedright
\reset@font
\hrule
\vspace*{10\p@}%
\par
\Large \scshape \@chapapp{} \Huge\bfseries \thechapter
\par\nobreak
\vspace*{10\p@}%
\hrule
\par
\vspace*{1\p@}%
\hrule
%\vskip 40\p@
\vspace*{20\p@}
\Huge \bfseries #1\par\nobreak
\vskip 70\p@
}}
\def\section#1{%
\par\bigskip\bigskip
\hrule\par\nobreak\noindent
\refstepcounter{section}%
\addcontentsline{toc}{chapter}{#1}%
\reset@font
{ \Large \bfseries
\strut\S \thesection \quad
#1}%
\par
\medskip
}
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Having Problems to Number Setions in Table of Content
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10