请帮助我如何以特定格式准备
无论我尝试什么,我的解决方案都是这样的
\documentclass[12pt,a4paper]{report}
\usepackage{cite}
%\usepackage[square,comma,numbers,sort&compress]{natbib}
\usepackage{pgfplots}
\usepackage[cmex10]{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{url}
\usepackage{array}
%\usepackage{natbib}
% \usepackage{geometry}
% \geometry{
% a4paper,
% total={210mm,297mm},
% left=1 in,
% right=1.5 in,
% top=1 in,
% bottom=1 in,
% }
\setlength{\textwidth}{6.0in}
\setlength{\textheight}{9.3in}
\setlength{\topmargin}{0pt}
\setlength{\headsep}{0pt}
\setlength{\headheight}{0pt}
\setlength{\oddsidemargin}{0pt}
%\def\baselinestretch{1.5}
\begin{document}
\title{My Thesis title}
\author{Kamlesh}
\maketitle
\thispagestyle{empty}
\input{Cover}
\newpage
\pagenumbering{roman}
\input{Dedication}
\newpage
\input{Certificate}
\newpage
\addcontentsline{toc}{chapter}{ABSTRACT}
\input{abstract}
\newpage
\addcontentsline{toc}{chapter}{ACKNOWLEDGEMENTS}
\input{Acknowledgements}
\newpage
\addcontentsline{toc}{chapter}{TABLE OF CONTENTS}
\tableofcontents
\newpage
\addcontentsline{toc}{chapter}{LIST OF FIGURES}
\listoffigures
\newpage
\addcontentsline{toc}{chapter}{ACKNOWLEDGEMENTS}
\listoftables
\newpage
\pagenumbering{arabic}
%\setcounter{page}{1}
\include{Introduction}
\include{Existing_Work}
\include{Motivation}
\include{Work1}
\include{Work2}
\include{Conclussion_Fut}
\include{Future}
\addcontentsline{toc}{chapter}{Reference}
\include{refernce}
\end{document}
此解决方案不显示上述目录样式
答案1
我只是给你一个起点。
我使用包mwe
作为示例图像并使用包blindtext
插入虚拟文本文档。
我使用 KOMA-Script 作为此示例(documentclass scrartcl
)。
在第 19 行,您可以\tableofcontents
在文档的此处插入目录。在第 20 行,您可以\listoffigures
在此处插入文档的图表目录。
完整的 MWE(请在下一个问题中写下自己的 MWE!):
\documentclass[%
toc=flat, % No intention in toc
toc=listof, % figures and tables in toc
headsepline, % line between head and text
]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{scrlayer-scrpage}
\lohead{John Doe}
\rohead{Example for tex-stackexchange.com}
\pagestyle{scrheadings}
\usepackage[math]{blindtext}% dummy text with formulas
\begin{document}
\tableofcontents% Table of content
\listoffigures% List of figures
\Blinddocument% includes dummy document
\begin{figure}%
\includegraphics[width=\columnwidth]{example-image-a}%
\caption{Test image from package mwe}% install package mwe!
\label{fig:ex-a}%
\end{figure}
\blindtext
\begin{figure}%
\includegraphics[width=\columnwidth]{example-image-b}%
\caption{Test image from package mwe}%
\label{fig:ex-b}%
\end{figure}
\blindtext
\end{document}
编辑:
您给出的代码无法编译,因为我们没有您使用命令的文件\input
。因此,我使用包blindtext
创建了一个虚拟文档并注释了您的\input
代码。
以下是 MWE 更改后的代码:
\documentclass[12pt,a4paper]{report}
\usepackage{blindtext}
\setlength{\textwidth}{6.0in}
\setlength{\textheight}{9.3in}
\setlength{\topmargin}{0pt}
\setlength{\headsep}{0pt}
\setlength{\headheight}{0pt}
\setlength{\oddsidemargin}{0pt}
%\def\baselinestretch{1.5}
\begin{document}
\title{My Thesis title}
\author{Kamlesh}
\maketitle
\thispagestyle{empty}
Cover %\input{Cover}
\newpage
\pagenumbering{roman}
Dedication %\input{Dedication}
\newpage
Certificate %\input{Certificate}
\newpage
\addcontentsline{toc}{chapter}{ABSTRACT}
abstract %\input{abstract}
\newpage
\addcontentsline{toc}{chapter}{ACKNOWLEDGEMENTS}
Acknowledgements% \input{Acknowledgements}
\newpage
\addcontentsline{toc}{chapter}{TABLE OF CONTENTS}
\tableofcontents
\newpage
\addcontentsline{toc}{chapter}{LIST OF FIGURES}
\listoffigures
\newpage
\addcontentsline{toc}{chapter}{ACKNOWLEDGEMENTS}
\listoftables
\newpage
\pagenumbering{arabic}
\Blinddocument
\end{document}
以及由此产生的目录:
答案2
你是指这样的吗?
\documentclass{book}
\makeatletter
\def\@chapter[#1]#2{% from report.cls
\ifnum \c@secnumdepth >\m@ne
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addtocontents{toc}{\protect\contentsline{chapter}{\thechapter\quad#1}{}}%
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
\makeatother
\renewcommand\contentsname{Table of Contents}
\begin{document}
\addtocontents{toc}{\protect\contentsline{chapter}{Title}{Page}}
\frontmatter
\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}
\tableofcontents
\mainmatter
\chapter{a chapter}
\section{a section}
\subsection{a subsection}
\section{another section}
\chapter{another chapter}
\section{yet another section}
\end{document}