LaTeX Table of Contents Customization: Everything You Need to Know
📅 12 April 2024 👁️ المشاهدات: 315
📄 ماذا ستجد في هذه الصفحة؟
• ملف الدرس بصيغة PDF يمكنك معاينته هنا مباشرةً دون تنزيله.
• يمكنك تنزيل الملف من زر التحميل أسفل الصفحة والاحتفاظ به على جهازك.
• ستجد أيضًا دروسًا وامتحانات وتمارين ذات صلة تساعدك على المراجعة وتعميق الفهم.
• أُدرج مصدر LaTeX الكامل أسفل الصفحة لتتمكن من الاطلاع عليه أو تعديله والاستفادة منه.
• هل تحتاج تنسيقًا احترافيًا لموادك الخاصة؟ أقدم خدمة كتابة LaTeX — أرسل المحتوى المطلوب لتحصل على ملف PDF منسق وملف المصدر.
\documentclass{article}
% Required packages
\usepackage{lipsum} % For generating dummy text
\usepackage{titletoc} % For customizing TOC
\usepackage{etoc} % For advanced control over TOC
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=black
}
% Change depth of sections
\setcounter{tocdepth}{3} % Include subsubsections
% Customize formatting
\titlecontents{section}[0pt]{\bfseries}{\thecontentslabel\quad}{}{\hfill\bfseries\contentspage}
\begin{document}
% Change TOC title
\renewcommand{\contentsname}{My Table of Contents with dots}
\tableofcontents
% Change dots to spaces in TOC
\makeatletter
\renewcommand{\@dotsep}{10000} % Set dot separation to a large negative value
\makeatother
\renewcommand{\contentsname}{My Table of Contents with spaces}
\tableofcontents
\hypersetup{
linkcolor=red
}
\renewcommand{\contentsname}{Change toc colors with hyperref}
\tableofcontents
\clearpage
\section{Section 1}
\lipsum[1]
\subsection{Subsection 1.1}
\lipsum[2]
\subsubsection{Subsubsection 1.1.1}
\lipsum[3]
\subsubsection{Subsubsection 1.1.2}
\lipsum[4]
\subsection{Subsection 1.2}
\lipsum[5]
\section{Section 2}
\lipsum[6]
\subsection{Subsection 2.1}
\lipsum[7]
\subsubsection{Subsubsection 2.1.1}
\lipsum[8]
\subsubsection{Subsubsection 2.1.2}
\lipsum[9]
\subsection{Subsection 2.2}
\lipsum[10]
\end{document}
موارد ذات صلة: دروس وامتحانات وتمارين
تنزيل الدرس بصيغة PDF
📥 تنزيل LaTeX Table of Contents Customization: Everything You Need to Know بصيغة PDF📄 هل تحتاج تنسيقًا بـ LaTeX؟
أرسل لي واجبك أو امتحانك أو تمارينك وسأحوّلها إلى ملف PDF احترافي.
اعرف المزيد ←أحدث الدروس
Solution — Devoir 01, S01, artihmétiques et calcul vectoriel , 2026 A
02 Nov 2026 • 1 views
حل • Maths • Tronc Commun Sciences
Devoir 01, S01, artihmétiques et calcul vectoriel , 2026 A
02 Nov 2026 • 1 views
امتحان • Maths • Tronc Commun Sciences
Solution — Devoir 01, S01 en arithmétiques et calcul vectoriel, 2026-2027 - ab
02 Nov 2026 • 1 views
حل • Maths • Tronc Commun Sciences
Devoir 01, S01 en arithmétiques et calcul vectoriel, 2026-2027 - ab
02 Nov 2026 • 1 views
امتحان • Maths • Tronc Commun Sciences
Solution — DM 1 - Arithmetiques, Calcul vectoriel et projection
27 Oct 2026 • 1 views
حل • Maths • Tronc Commun Sciences
BACCALAURÉAT INTERNATIONAL SCIENCES MATHÉMATIQUES, OPTION FRANÇAIS
28 Sep 2026 • 149 views
درس • Maths • 2 Bac Science Maths
الأكثر مشاهدة
Tous les sujets des suites numériques des examens nationaux 2008 - 2022
views: 3.15K
امتحان • Maths • 2 Bac Science
Control 01 S01 En arithmétiques et Calcul vectoriel - A 2025-2026
views: 2.15K
امتحان • Maths • Tronc Commun Sciences
DM 1 - Arithmetiques, Calcul vectoriel et projection
views: 1.99K
امتحان • Maths • Tronc Commun Sciences
MATHEMATIQUES Examens nationaux 2003-2021 2 Bac.Sciences expérimentales
views: 1.98K
امتحان • Maths • 2 Bac Science
Most Viewed Articles
The Ultimate Vim Setup (My 2024 vimrc ) : Essential Commands, Configurations, and Plugin Tips
Views: 1.49K
12 Apr 2024
Complete Tutorial: Creating Categories and Subcategories Using Pages in Pelican
Views: 1.14K
24 Jun 2025
اترك تعليقًا