Text Formatting ⇒ tocbibind | Capitalized Heading of LoF in ToC
tocbibind | Capitalized Heading of LoF in ToC
I have to put \usepackage[nottoc]{tocbibind} in the preamble of my thesis to get the correct page numbers for the lof and bib in the toc. Now the lof appears as "List of Figures" in the toc, but I want it to be "LIST OF FIGURES."
Is there an option to do that?
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
Re: tocbibind | Capitalized Heading of LoF in ToC
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: tocbibind | Capitalized Heading of LoF in ToC
I am using \documentclass[12pt]{report}. I want both the heading of lof and its entry in ToC to be uppercase. I don't have any tables, but the same would apply to that.
I have noticed that the bibliography was changed to "REFERENCES" in the ToC using this command in the style file:
\renewcommand{\bibname}{REFERENCES}
When I comment this line out, both the heading and the entry in the ToC reverts to "Bibliography. "
Perhaps some similar command would work for lof?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
tocbibind | Capitalized Heading of LoF in ToC
Then do it correspondingly for the LoF (and LoT if needed).Ile wrote:[…] I have noticed that the bibliography was changed to "REFERENCES" in the ToC using this command in the style file:
\renewcommand{\bibname}{REFERENCES}
When I comment this line out, both the heading and the entry in the ToC reverts to "Bibliography. " […]
Code: Select all
\renewcommand{\listfigurename}{LIST OF FIGURES}
\renewcommand{\listtablename}{LIST OF TABLES}
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
tocbibind | Capitalized Heading of LoF in ToC
Thank you. That solved the uppercase problem. I had tried something similar, but didn't have the correct wording.
I just discovered that using tocbibind has given me another problem to solve.
If I use
Code: Select all
\usepackage{MYthesis}
\usepackage[nottoc]{tocbibind}
LIST OF FIGURES
1. Figure 1............................1
2. Figure 2............................2
If I use the packages in this order
Code: Select all
\usepackage[nottoc]{tocbibind}
\usepackage{MYthesis}
Code: Select all
\def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
\fi\chapter*{LIST OF FIGURES}%\@mkboth{LIST OF FIGURES}{LIST OF FIGURES}}
% {\large{\bf Number}\hfill{\bf Page}}%\newline
\@starttoc{lof}\if@restonecol
\twocolumn\fi
\addtocontents{lof}{{\vspace{12pt}}\hspace{12pt} Figure\hfill Page{\vspace{12pt}}\par}}
LIST OF FIGURES
Figure-------------------------------Page
1. Figure 1............................1
2. Figure 2............................2
How can I add the "Figure-------------------Page" line to work with the first example?
Ile
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
tocbibind | Capitalized Heading of LoF in ToC
I don't understand why this redefinition of \listoffigures happens at all. Compared to the original stuff from the class code it does nothing substantially different. At the moment you redefine \listfigurename and \bibname to capitalize the headings and ToC entries. So I suggest to replace this code block with the following.Ile wrote:[…] thenthe code in MYthesis above gives me the following list of figures format, […]Code: Select all
\def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn \fi\chapter*{LIST OF FIGURES}%\@mkboth{LIST OF FIGURES}{LIST OF FIGURES}} % {\large{\bf Number}\hfill{\bf Page}}%\newline \@starttoc{lof}\if@restonecol \twocolumn\fi \addtocontents{lof}{{\vspace{12pt}}\hspace{12pt} Figure\hfill Page{\vspace{12pt}}\par}}
Code: Select all
\AtBeginDocument{%
\addtocontents{lof}{\vspace{12pt}\hspace{12pt} Figure\hfill Page\vspace{12pt}\par}
}
Since I have this package not present, there is no guarantee for success and side effects cannot be ruled out.
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: tocbibind | Capitalized Heading of LoF in ToC
Many thanks. Your solution works perfectly and without side effects.
Ile