以下图片展示了我的 Lyx 文档,它在转换为 PDF 时给出了第一个输出。我希望将它们大写。我使用的是 Koma documentclass
这是当前的 Latex 序言:
\date{}
\usepackage{lmodern}
\usepackage{microtype}
%this command set the paragraph indentation if you want to modify change the value 1.5cm to your preference
\setlength{\parindent}{1.5cm}
\usepackage{indentfirst}
\usepackage{hyperref}
\hypersetup{colorlinks=true,linkcolor=black}
\renewcommand{\rmdefault}{ptm}
\usepackage{fontspec}
\setmainfont{Times New Roman}
%This command will change the default Bibliography to References
\AtBeginDocument{
\renewcommand{\bibname}{References}
\renewcommand{\nomname}{List of Symbols}
}
%The following comands center the heading of chapters and chapter entries, the default is on the left
\addtokomafont{chapterentry}{\centering}
\addtokomafont{chapter}{\centering\fontsize{20.66}{20.66}\selectfont\color{black}}
% The following commands set the page numbers on the top right except in the beginning of chapters using fancyhdr package (page layout>heading style->fancy)
\lhead{}
\chead{}
\rhead{\thepage}
\lfoot{}
\cfoot{}
\rfoot{}
\renewcommand{\headrulewidth}{0pt}
% The following commands set the vertical space before and after every chapter entry
\renewcommand*{\chapterheadendvskip}{\vspace{2cm}}
\renewcommand*{\chapterheadstartvskip}{\vspace{2.5cm}}
% The following commands set the TOC, LOT, LOF and LOA: this employs tocloft package
\usepackage{tocloft}
\cftpagenumbersoff{part}
\renewcommand{\cftdot}{}
\renewcommand{\cfttoctitlefont}{\hfill\Large\bfseries\sffamily}
\renewcommand{\cftaftertoctitle}{\hfill}
\renewcommand{\cftaftertoctitleskip}{2.5cm}
\renewcommand{\cftbeforetoctitleskip}{2.5cm}
\renewcommand{\cftloftitlefont}{\hfill\Large\bfseries\sffamily}
\renewcommand{\cftafterloftitle}{\hfill \hfill
%\renewcommand{\cftafterloftitle}{\hfill \hfill \hfill
\\[3\baselineskip]{Figure No \hfill Title \hfill Page \linebreak} \vskip-50pt}
\renewcommand{\cftbeforeloftitleskip}{2.5cm}
\renewcommand{\cftlottitlefont}{\hfill\Large\bfseries\sffamily}
\renewcommand{\cftafterlottitle}{\hfill \hfill
%\renewcommand{\cftafterlottitle}{\hfill \hfill\hfill
\\[3\baselineskip]{Table No \hfill Title \hfill Page \linebreak }
\vskip-50pt}
\renewcommand{\cftbeforelottitleskip}{2.5cm}
\newlistof{appendices}{loa}{List of Appendices}
\renewcommand{\cftloatitlefont}{\hfill\Large\bfseries\sffamily}
\renewcommand{\cftafterloatitle}{\hfill \hfill
%\renewcommand{\cftafterloatitle}{\hfill \hfill\hfill
\\[3\baselineskip]{Appendix \hfill Title \hfill Page \linebreak}
\vskip-60pt}
\renewcommand{\cftbeforeloatitleskip}{2.5cm}
\cftsetindents{subsection}{1.9cm}{1.2cm}
\renewcommand{\cftchappresnum}{CHAPTER }
\renewcommand{\cftchapaftersnum}{}
\renewcommand{\cftchapaftersnumb}{\qquad\quad\,\,}
\renewcommand{\cftsecpresnum}{\qquad\quad\,\,\,\, }
\renewcommand{\cftsubsecpresnum}{\quad\,\, }
\renewcommand{\cftsecaftersnum}{}
\renewcommand{\cftsecaftersnumb}{\qquad\qquad\,}
\renewcommand{\cftsubsecaftersnumb}{\quad}
\usepackage{minitoc}
% Redefining automatic label of Figure, Table and Eq.
\usepackage{prettyref}
\newrefformat{tab}{Table\,\ref{#1}}
\newrefformat{fig}{Figure\,\ref{#1}}
\newrefformat{eq}{Eq.\,\textup{(\ref{#1})}}
%To remove extra vertical space in List of Symbols [added in V-05]
\setlength{\nomitemsep}{-\parsep}
% from koma-script scrbook.cls, then modified [added in V-05] to shift addchap in TOC to the right: \qquad\qquad\,\,
\makeatletter
\renewcommand\addchap{
\if@openright\cleardoublepage\else\clearpage
\fi
\thispagestyle{plain}
\global\@topnum\z@
\@afterindentfalse
\secdef\@addchap\@saddchap}
\def\@addchap[#1]#2{
\typeout{#2}
\addcontentsline{toc}{chapter}{\qquad\qquad\,\, #1}
\if@twoside\@mkboth{#1}{}\else\@mkboth{}{#1}
\fi
\addtocontents{lof}{\protect\addvspace{10\p@}}
\addtocontents{lot}{\protect\addvspace{10\p@}}
\if@twocolumn
\@topnewpage[\@makeschapterhead{#2}]
\else
\@makeschapterhead{#2}
\@afterheading
\fi
}
\def\@saddchap#1{\@mkboth{}{}
\if@twocolumn
\@topnewpage[\@makeschapterhead{#1}]
\else
\@makeschapterhead{#1}
\@afterheading
\fi
}
\renewcommand*\l@figure{\@dottedtocline{0}{1.5em}{4.3em}}
\renewcommand*\l@table{\@dottedtocline{0}{1.5em}{4.3em}}
\renewcommand{\@dotsep}{10000}
\makeatother
答案1
我对 ERT 了解不多。但在 latex 中,你可以将这些添加到你的序言中
\renewcommand*{\contentsname}{\MakeUppercase{Table of Contents}}
\renewcommand*{\listoflotname}{\MakeUppercase{List of Tables}}
\renewcommand*{\listoflofname}{\MakeUppercase{List of Figures}}
\setkomafont{chapter}{\MakeUppercase}
或者通过在列表之前和之后添加来按照 koma 方式进行\addtokomafont{chapter}{\normalfont}
。
\documentclass{scrbook}
\usepackage{blindtext,xcolor}
%\renewcommand*{\contentsname}{\MakeUppercase{Table of Contents}}
%\renewcommand*{\listoflotname}{\MakeUppercase{List of Tables}}
%\renewcommand*{\listoflofname}{\MakeUppercase{List of Figures}}
\newcommand*{\mychap}{\centering\fontsize{20.66}{20.66}\selectfont\color{black}}
\begin{document}
\setkomafont{chapter}{\mychap\MakeUppercase}
\tableofcontents
\listoftables
\listoffigures
\addtokomafont{chapter}{\normalfont}
\begin{table}
\caption{Some table}
\end{table}
\begin{figure}
\caption{a figure}
\end{figure}
\Blinddocument
\end{document}