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
}
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- 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