Document Classes ⇒ modify the word "Contents" in the toc
modify the word "Contents" in the toc
I would to replace the word "Contents" by its equivalent in "arabic". The lines
\documentclass[ 12pt,a4paper]{article}
\usepackage[ utf8 ]{inputenc}
\usepackage[ arabic ,english]{babel}
create correct lines in tableofcontents ( in arabic language), but the first word is "Contents" which I want to replace by the appropriete word in arabic.
While in french for example there is no problem I got
"Table des matières". I looked for the words "Table des matières" in all files in directories /usr/share/texmf-texlive/tex in order to compare and change, but no such words??!!
Where is processed the changes??
I tried \renewcommand\contentsname{الفهرس} too, but nothing changes, I tried directly in the
/usr/share/texmf-texlive/tex/latex/base/article.cls file , nothing is modifyed??
I am using debian .
thanks for 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
- Stefan Kottwitz
- Site Admin
- Posts: 10334
- Joined: Mon Mar 10, 2008 9:44 pm
modify the word "Contents" in the toc
use the \addto command of babel. It's described here with an example for redefining \contentsname: What is the right way to redefine macros defined by babel.
Another way would be to use
Code: Select all
\renewcommand*{\contentsname}{الفهرس}
Stefan
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
modify the word "Contents" in the toc
- View topic: babel package and \renewcommand
- View topic: References Heading
- View topic: Changing a Content Heading for its Spanish equivalent
- View topic: changing the \contentsname
- View topic: \renewcommand{\chaptername}{} does NOT work -- why?
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10