目录定制

目录定制

我需要帮助

  1. 页面中心的目录标题。代码

    \renewcommand{\contentsname}{\centering 目录}

    对我没用。

  2. 我需要将章节名称后面的点以粗体显示。

  3. 目录中还出现了词汇表和符号列表。我也需要将它们从目录中删除。

我的代码如下;

\documentclass[12pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\hyphenation{signifi-cant im-proved tele-communication}

\usepackage[hidelinks]{hyperref}
\hypersetup{colorlinks=true,allcolors=black}

\usepackage{fancyhdr}
\fancypagestyle{fancyhf}{
    \fancyhead[L]{\nouppercase{\textbf{\leftmark}}}
    \fancyhead[R]{}
    \fancyfoot[C]{\thepage} 
    \renewcommand{\headrulewidth}{0.1pt}
}
\fancypagestyle{plain}{
    \fancyhead{}
    \fancyfoot[C]{\thepage}
    \renewcommand{\headrulewidth}{0pt}
}

\usepackage{tocloft}
%\renewcommand{\cftpartleader}{\cftdotfill{\cftdotsep}} % for parts
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} % for chapters

\renewcommand{\contentsname}{\hfill\bfseries\Large Table of Contents\hfill}   
%\renewcommand{\cftaftertoctitle}{\hfill}


%\renewcommand{\contentsname}{Table of Contents}

\usepackage{datetime}
\usepackage{enumitem}
\usepackage[printonlyused]{acronym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{amsfonts}

\usepackage[ruled,vlined]{algorithm2e}
\newcommand\mycommfont[1]{\footnotesize\ttfamily\textcolor{blue}{#1}}
\SetCommentSty{mycommfont}

\usepackage{caption}
\usepackage{graphicx}
\graphicspath{{fig/}{graphs/}}

\usepackage[backend=bibtex,style=ieee,sorting=none,minnames=1]{biblatex}

\usepackage{array}
\usepackage[table]{xcolor}

\usepackage[automake,style=long,symbols,nonumberlist]{glossaries-extra}
\makeglossaries
\loadglsentries{symbols}

\usepackage[left=1.5in,right=1in,top=1in,bottom=1in]{geometry}
\renewcommand{\baselinestretch}{1.5}

\addbibresource{references.bib}


%custom commands
\renewcommand{\vec}[1]{\boldsymbol{\mathit{#1}}}


% Title Page
\title{MS Thesis}
\author{Imdad Ul Haq}
\date{\today --- \currenttime}

\begin{document}
%\maketitle

\pagenumbering{roman}
\pagestyle{plain}
\setcounter{page}{9}

%\include{front_page}

%\include{thesis_title}

%\include{supurvisor_consent}

%\include{final_approval}

%\include{declaration}

%\include{certificate}

%\include{dedication}

%\include{acknowledgments}

\include{abstract}

\begin{normalsize}
    \tableofcontents

%   \ifx\totalfigures
    \listoffigures
%   \fi

\end{normalsize}

%\listoftables
\ifx\totaltables
    \listoftables
\fi

\include{abbreviations}

\printglossaries[symbols,style=long,title={List of Symbols}]

\pagenumbering{arabic}
\pagestyle{fancyhf}
\begin{normalsize}
\chapter{Introduction}\label{chap_1}
\include{chap_1}

\chapter{Background Theory and Literature Review}\label{chap_2}
\include{chap_2}

\chapter{System Model for NOMA in Sparse Multipath Propagation Environments}\label{chap_3}
\include{chap_3}

\chapter{Channel Estimation Techniques based on SiT coupled with CS Theory}\label{chap_4}
\include{chap_4}

\chapter{Performance Evaluation of Proposed Channel Estimation Techniques}\label{chap_5}
\include{chap_5}

\chapter{Conclusion}\label{chap_6}
\include{chap_6}

\renewcommand*{\UrlFont}{\rmfamily}
\printbibliography

\chapter*{sample symbols}
\include{sym_rough}
\end{normalsize}
\end{document}

答案1

以下最小示例解决了您的前两个请求:

在此处输入图片描述

\documentclass{report}

\usepackage{tocloft,lipsum}

% Center ToC heading
\renewcommand{\cfttoctitlefont}{\hfill\bfseries\Large}
\renewcommand{\cftaftertoctitle}{\hfill\mbox{}}
\renewcommand{\contentsname}{Table of Contents}

\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} % for chapters
% Make \chapter leaders bold
\let\oldcftchapleader\cftchapleader
\renewcommand{\cftchapleader}{\bfseries\oldcftchapleader}

\begin{document}

\tableofcontents

\listoffigures

\listoftables

\sloppy % Just for this example
\chapter{First chapter}\lipsum[1-50]
\chapter{Second chapter}\lipsum[1-50]
\chapter{Third chapter}\lipsum[1-50]
\chapter{Last chapter}\lipsum[1-50]

\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}

\end{document}

如果你想避免将某个章节包含在目录中,你可以尝试使用

{\renewcommand{\addcontentsline}[3]{}% Remove capability to write to ToC
\chapter{<title>}}

其中\chapter{<title>}代表您的\printglossaries命令。

相关内容