我该如何扩充 LoF 和 LoT 以在数字上添加标题?最好不要添加软件包,因为我已经努力获得了这样的样式,而且我没有时间以其他方式学习。我使用的唯一软件包如下:
\usepackage{titlesec}
\usepackage{listings}
\usepackage{setspace}
\usepackage{changepage}
\usepackage{indentfirst}
编辑:
@Christian - 请原谅我。我有点不知所措,压力不大,但要走到这一步已经付出了很多努力。我正在使用 LyX,并将与 tocloft 或 titletoc 等软件包不兼容的内容放在我的 preamble.tex 中,其中包含以下内容
\usepackage{titlesec}
\usepackage{listings}
\usepackage{setspace}
\usepackage{changepage}
\usepackage{indentfirst}
\def\degreeprogram#1{\gdef\@degreeprogram{#1}}
\def\degree#1{\gdef\@degree{#1}}
%% Conform headers to school styling for headers -- turabian
\titleformat{\chapter}[display]
{\normalfont\fontsize{12pt}{16pt}\mdseries\singlespace\centering}
{\MakeUppercase{\chaptertitlename\ \thechapter}}{12pt}{\MakeUppercase}
%First level; centered, boldface or italic type, headline-style capitalization
\titleformat{\section}[block]
{\normalfont\fontsize{12pt}{16pt}\selectfont\bfseries\singlespace\centering}
{\thesection}{1em}{}
%Second level; centered, regular type, headline-style capitalization
\titleformat{\subsection}[block]
{\normalfont\fontsize{12pt}{16pt}\selectfont\mdseries\singlespace\centering}
{\thesubsection}{1em}{}
%Third level: flush left, boldface or italic type, headline-style capitalization
\titleformat{\subsubsection}[block]
{\normalfont\fontsize{12pt}{16pt}\selectfont\bfseries\bf\singlespace}
{\thesubsection}{1em}{}
%Fourth level: flush left, roman type, sentence-style capitalization
\titleformat{\subsubsection}[block]
{\normalfont\fontsize{12pt}{16pt}\selectfont\mdseries\bf\singlespace}
{\thesubsection}{1em}{}
%Fifth level: run in at beginning of paragraph (no blank line after, boldface or
% italic type, sentence-style capitalization, terminal period
\titleformat{\subsubsection}[block]
{\normalfont\fontsize{12pt}{16pt}\selectfont\mdseries\bf\singlespace}
{\thesubsection}{1em}{}
% fixup TOC indentation and add . . . separator on Chapter lines
\renewcommand*\l@chapter{\@dottedtocline{0}{1em}{1.5em}}
\renewcommand*\l@section{\@dottedtocline{1}{4em}{2em}}
\renewcommand*\l@subsection{\@dottedtocline{2}{7em}{3em}}
\renewcommand*\l@subsubsection{\@dottedtocline{3}{10em}{4em}}
% Fixup chapter lines in TOC for all caps
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{\protect\numberline{\thechapter .}\MakeUppercase{#1}}%
\else
\addcontentsline{toc}{chapter}{\MakeUppercase{#1}}%
\fi
\else
\addcontentsline{toc}{chapter}{\MakeUppercase{#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}
我的学校要求我的论文写成这样。我觉得这也是不言而喻的,但不是我能决定的。
答案1
解决了。我翻遍了 tocloft 才找到答案。秘诀是
\@starttoc{lof}
我曾经像这样
\renewcommand{\listoffigures}{%
\pagebreak\centering\MakeUppercase{\listfigurename}\par%
\addcontentsline{toc}{chapter}{\MakeUppercase{\listfigurename}}%
\mdseries{Figure\hfill{Page}}\par%
\@starttoc{lof}%
}