Fonts & Character SetsHow to bold the Table of Contents (PDF screen shot attached)

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
Matam
Posts: 29
Joined: Thu Jun 07, 2018 12:12 pm

How to bold the Table of Contents (PDF screen shot attached)

Post by Matam »

Please, find the attached screen shot.
I have prepared the table of contents. But, all are is normal font. I want to bold them.
Could you please, provide me the code to bold the list of contents.

The present code in preamble is:
\documentclass[11pt, a4paper, oneside]{thesis}
\usepackage[body={7.0in, 9.5in},top=1.2in, left=1.69in, right=1.0in, includefoot]{geometry}
\bibliographystyle{IEEEtran}
\hyphenation{op-tical net-works semi-conduc-tor}
\usepackage{wrapfig}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{multirow}
\setcounter{secnumdepth}{3}
\usepackage{pdfpages}
\usepackage[nottoc,notlof,notlot]{tocbibind} 
%\renewcommand\bibname{References}
\usepackage{cite}
%\usepackage{natbib}
\usepackage{float}
\usepackage{color}
\usepackage{algorithm,algpseudocode}
\usepackage[graphicx]{realboxes}
\usepackage{varwidth}
\renewcommand{\baselinestretch}{1.3}
\usepackage{titlesec} % Modifica títulos


\titleformat{\chapter}[hang]
{\LARGE\normalfont\bfseries}
{\thechapter}{1em}{}
\titleformat{name=\chapter,numberless}[hang]
  {\normalfont\LARGE\bfseries\filcenter}{}{1ex}{}{}
\titleformat{\section}[hang]{\normalfont\Large\bfseries}{\thesection}{0.5em}{}


\titleformat{\chapter}[display]
{\normalfont\Huge\bfseries}{Chapter\ \thechapter}{10pt}{\Huge}


\titleformat{\subsection}[hang]{\normalfont\large\bfseries}{\thesubsection}{0.5em}{}
\titleformat{\subsubsection}[hang]{\normalfont\bfseries}{\thesubsubsection}{0.5em}{}

\titlespacing{\chapter}{0pt}{0pt}{40pt}
\titlespacing{\section}{0pt}{\baselineskip}{0.625\baselineskip}
\titlespacing{\subsection}{0pt}{\baselineskip}{0.6\baselineskip}
\titlespacing{\subsubsection}{0pt}{\baselineskip}{\baselineskip}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
            \node[shape=circle,draw,inner sep=0.5pt] (char) {#1};}}
\usetikzlibrary{calc}
\usetikzlibrary{calc,matrix}
\usepackage[skip=2pt,font=scriptsize]{caption}
\usepackage{subcaption}
\usepackage{array}
\usepackage{mdwmath}
\usepackage{mdwtab}
\usepackage{multirow}
\usepackage{siunitx}
\usepackage{soul}
\usepackage{cancel}
\usepackage{amssymb}% http://ctan.org/pkg/amssymb
\usepackage{pifont}% http://ctan.org/pkg/pifont
\newcommand{\cmark}{\ding{41}}%
\newcommand{\xmark}{\ding{55}}
%\usetikzlibrary{calc,matrix}
\usepackage{color,soul}
\usepackage{enumerate}
\usepackage{IEEEtrantools}
\usepackage{bbding}
%\bibliographystyle{ieeebib}
\usepackage{rotating}
\usepackage{listings}
\usepackage{lineno}
\usepackage{lscape}
\usepackage{adjustbox}
%\modulolinenumbers[1]
\lstdefinestyle{mystyle}{
    breakatwhitespace=false,         
    breaklines=true,                 
    captionpos=b,                    
    keepspaces=true,                 
    numbers=left,                    
    numbersep=20pt,                  
    showspaces=false,                
    showstringspaces=false,
    showtabs=false,                  
    tabsize=2
}
\lstset{style=mystyle}
% % Nomenclature commands
\usepackage[intoc]{nomencl}
\makenomenclature

\usepackage[toc,nopostdot,nonumberlist,acronym,section]{glossaries}
\newrobustcmd{\bffirst}[1]{{\let\mfirstucMakeUppercase\textbf\capitalisewords{#1}}}

\newacronymstyle{bf-long-short}{\GlsUseAcrEntryDispStyle{long-short}}{\GlsUseAcrStyleDefs{long-short}\renewcommand*{\GenericAcronymFields}{description={\bffirst{\the\glslongtok}}}}
\setacronymstyle{bf-long-short}

\newglossary[ch1]{chstyle}{ch2}{ch3}{List of Greek Symbols}
\makeglossaries
\glsdisablehyper

\newglossarystyle{csyle}{%
	\glossarystyle{list}%
	\renewcommand*{\glossaryentryfield}[5]{%
		\item[\glsentryitem{##1}\glstarget{##1}{##2}]%
		\hspace{2.5cm}##3\glspostdescription\dotfill ##5}%
}
%\renewcommand{\chaptername}[2]{\chaptername{#1} \thechapter{#2}}

% % For Bibliography support
\makeatletter
\let\@openbib@code\relax
\makeatother

% % List of Publications
\DeclareUnicodeCharacter{FB01}{fi}

\include{glossary-nomen-entries}
\begin{document}
.............


\clearpage
\newpage
\cleardoublepage
\pagenumbering{roman}
\addcontentsline{toc}{chapter}{Acknowledgement}
\thispagestyle{headings}
\markboth{Acknowledgment}{Acknowledgment}
\chapter*{\centering Acknowledgment}

My ..
 
    
\clearpage
\newpage
\cleardoublepage
\addcontentsline{toc}{chapter}{Abstract}
\thispagestyle{headings}
\markboth{Abstract}{Abstract}
\chapter*{\centering Abstract}
~~~~Solar Photovoltaic  (PV) systems installed in the rural and urban areas face different kinds of problems. A rural PV 

 
\tableofcontents

\cleardoublepage
%List of figures
\addcontentsline{toc}{chapter}{\listfigurename}
\listoffigures
\cleardoublepage
%List of tables
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables

% Print Nomenclature 
\renewcommand*{\nompreamble}{\markboth{\nomname}{\nomname}}
\printnomenclature


% List of Abbreviations 
\cleardoublepage
\renewcommand{\glossarysection}[2][]{\chapter*{#1}}
\markboth{List of Abbrevations}{List of Abbrevations}
\addcontentsline{toc}{chapter}{List of Abbrevations}
\renewcommand{\glsnamefont}[1]{\textbf{#1}}
\printglossary[title=List of Abbreviations,type=\acronymtype]
\renewcommand{\glsnamefont}[1]{\makefirstuc{#1}}


\clearpage
\pagenumbering{arabic}

\chapter{Introduction to solar PV systems and Dynamic PV arrays}
Attachments
contentsBOLD.png
contentsBOLD.png (169.56 KiB) Viewed 11599 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

How to bold the Table of Contents (PDF screen shot attached)

Post by Stefan Kottwitz »

How about this:

Code: Select all

\bfseries
\tableofcontents
\normalfont
Stefan
LaTeX.org admin
Matam
Posts: 29
Joined: Thu Jun 07, 2018 12:12 pm

How to bold the Table of Contents (PDF screen shot attached)

Post by Matam »

Thank a lot for the reply. Now, all TABLE OF CONTENTS are in bold.

One more request, I want to bold only the Chapter titles, but not the sections and subsections in TABLE OF CONTENTS. I want remaining sections and subsections to be in normal series and NOT bold.
Please, check the attachment and help me with code.
Attachments
contentsSECTIONSnotBOLD.png
contentsSECTIONSnotBOLD.png (138.99 KiB) Viewed 11502 times
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

How to bold the Table of Contents (PDF screen shot attached)

Post by Johannes_B »

I haven't addressed any of your questions so far. The problem is your class file, which is unknown. There used to be a template defining a class called Thesis.cls and it was terrible. There have been serious copyright and license issues and basically everybody using the class broke some law of some country. Luckily/Unfortunately, nobody cares about that.

For a minimal document, chapters are in bold in the table of contents. So, something in your document is changing that. Maybe the class file, maybe something in your very very long preamble. I don't know, i didn't test.

What i keep telling people, is not to use any templates. See LaTeX for scientific writing and Template confusion
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

How to bold the Table of Contents (PDF screen shot attached)

Post by Stefan Kottwitz »

Over many years, there appeared several different classes thesis.cls. That's because on different universities people developed kind of templates and classes for the students theses, and called it the same way, that's a bit careless. So we cannot know which thesis class or template you are using.

I usually based on the assumption, that it's like a report class plus some tweaking. That could be a good guess. Where did you get your thesis.cls or thesis template from? Do you have a link, where we can download it and test it?

By the way, today the Masters Doctoral template is popular. There's even a manual for it, by Johannes.

Stefan
LaTeX.org admin
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

How to bold the Table of Contents (PDF screen shot attached)

Post by Johannes_B »

Stefan Kottwitz wrote: By the way, today the Masters Doctoral template is popular. There's even a manual for it, by Johannes.
Yes, there is. But nobody needs it really.
I am against using templates.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

How to bold the Table of Contents (PDF screen shot attached)

Post by Stefan Kottwitz »

I made my peace with the existence of templates. Somehow users needs to start, also those users who want to focus on writing instead of learning some dozen packages to use them or not.

Still there are too many bad templates out in the world. I remember also good templates, with folder structure, where each line in the preamble was explained with options and alternatives.

Stefan
LaTeX.org admin
Post Reply