\documentclass[12pt,fleqn,usenames,dvipsnames]{report}
\usepackage[a4paper,left=4cm,right=2cm,top=3cm,bottom=3cm]{geometry}
\usepackage{amsfonts,times,etoolbox,titlesec,color,fancyhdr,anyfontsize,setspace,shadowtext,lipsum}
\usepackage[Lenny]{fncychap}
\ChNameUpperCase
\ChTitleUpperCase
\fancyfoot[C]{\thepage}
\fancyhead[RO,LE]{}
\fancyhead[LO]{\leftmark}
\fancyhead[RE]{\rightmark}
\pagestyle{fancy}
\date{}
\setlength{\parskip}{0.5em}
\doublespacing
\begin{document}
\begin{titlepage}
\begin{center}
\textcolor{Sepia}{ % Red font color
\textsc{\Large XXXXXXXXXXXXXXXXX }\\[0.5\baselineskip] % Title line 1
\textsc{\Large xxxxxxxxxxxxxxxxx }\\[0.5\baselineskip] % Title line 2
\textsc{\Large xxxxxxxxxxxxxxxxxxxxxx}\\[0.5\baselineskip]
\textsc{\Large xxxxxxxxxxxxxxxxxxxxxxxx}% Title line 3
}
\rule{0.3\textwidth}{0.4pt}
\large
\textcolor{Mahogany}{
xxxxxxxxxxxx}
\textcolor{Mahogany}{\textsc{\textbf{xxxxxxxxxxxxxxx}}}
\textcolor{Mahogany}{ xxxxxxxxxxxxxxxx}
\textcolor{Sepia}{xxxxxxxxxxxxx\\
xxxxxxxxxxxxxxxx\\
xxxxxxxxxxxxxxxxxxxxxxxx\\
xxxxxxxxxxxxxxxxxxxxx}\\
% \includegraphics[width=0.4\textwidth]{university}
\large
\textcolor{Sepia}{
xxxxxxxxxxxxxxxx}
\rule{\textwidth}{0.4pt} % Thin horizontal rule
\rule{\textwidth}{1pt} % Thick horizontal rule
\end{center}
\end{titlepage}
\chapter*{}
\thispagestyle{empty}
\begin{center}
\vspace{0.05\textheight}
%\begin{minipage}{\textwidth}
\textcolor{Black}{ % Red font color
{\huge xxxxxxxxxxxxxxxxxxxxxxxxx }\\[0.5\baselineskip] % Title line 1
{\huge xxxxxxxxxxxxxxxxxxxxxxxx }\\[0.5\baselineskip] % Title line 2
{\huge xxxxxxxxxxxxxxxxxxxxxxx}\\[0.5\baselineskip]
{\huge xxxxxxxxxxxxxxxxxxxxxxxxxx}
}
\rule{0.3\textwidth}{0.4pt}
\vspace{2pt}
\Large
\textcolor{Black}{
xxxxxxxxxxxx}
\textcolor{Black}{\textsc{\textbf{xxxxxxxxxxxxxxxxxxxxxx}}}
\textcolor{Black}{xxxxxxxxxxxx}
\end{center}
\begin{tabular}[t]{c}
{\Large xxxxxxxxx}\\
\end{tabular}%
\hspace*{5.5cm}%
\begin{tabular}[t]{c}
{\Large xxxxxx}
\end{tabular}%
\hspace*{1cm}
\pagenumbering{roman}
\tableofcontents
\addcontentsline{toc}{chapter}{\listfigurename}
\listoffigures
\chapter*{Acknowledgement}
\addcontentsline{toc}{chapter}{\numberline{}Acknowledgement}
\lipsum[1]
{
\cleardoublepage% Move to first page of new chapter
\let\clearpage\relax% Don't allow page break
\begin{center}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \\
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
\end{center}
\chapter*{Abstract}
}
\addcontentsline{toc}{chapter}{\numberline{}Abstract}
\lipsum[2]
\end{document}
Q1) 在上面的例子中,我想将前两页的文本转换为字体大小 =16 和双倍行距,这与 MS Word 中的字体大小 16 和双倍行距完全相同。我不确定如何使用 \fontsize{}{} 以及如何决定在 {}{} 中使用哪些值来实现这一点。
我发现,如果将字体大小指定为 \large、\Large,则根据我们使用 \documentclass[12] 还是 \documentclass[11] 等,字体大小会有所不同,我不明白如何准确地获得字体大小 =16 和双倍行距。
Q2) 我还想澄清一下,我使用 \usepackage{times} 使用的 Times 字体和通过 \doublespacing 命令获得的双倍行距是否与 MS Word 中的完全相同?
提前致谢。
答案1
好吧——你永远不应该在 LaTeX 中使用明确的字体大小;这应该是文档类设计者的任务,选择一组连贯的字体。
但如果你愿意,你可以用绳子吊死自己。Word 中的 Times New Roman 是专有的,所以在下面的例子中,我使用了 TeXLive 中可用的克隆之一。如果你拥有 MS Word 许可证,你可以将真实字体与 LuaLaTeX 一起使用,但那是另一个故事……
这里的解决方案不会给出确切地MS Word 将呈现什么。为此,您必须使用 MS Word,抱歉。这种用法充其量只是 LaTeX 哲学的延伸……
低级大小更改命令是\fontsize{A}{B}
,它将字体设置为 A 点,并将正常基线距离设置为 B 点。通常,您希望 B 比 A 稍大,这样线条就不会相互重叠。请注意,这不会调整更改字体大小时应调整的几个距离和大小...
另外,我使用setspace
双倍行距(哇...)。所以这是最丑陋的 MWE(请注意,这个是我发布过的最少的...
\documentclass{article}
\usepackage[T1]{fontenc}
% times new roman "clone"
\usepackage{newtxmath,newtxtext}
\usepackage{setspace}
\usepackage{lipsum} % just to generate dummy text
\begin{document}
\doublespace
% This is a very bad design, but...
{\fontsize{24}{26}\selectfont This is 24 points; be sure to end the paragraph before closing the group or changing font again. Notice that this will not work nicely with a \emph{lot} of things.
}% blank line to end paragraph
{\fontsize{20}{22}\selectfont This is 20 points; be sure to end the paragraph before closing the group or changing font again. Notice that this will not work nicely with a \emph{lot} of things.
}% blank line to end paragraph
{\fontsize{16}{18}\selectfont This is 16 points; be sure to end the paragraph before closing the group or changing font again. Notice that this will not work nicely with a \emph{lot} of things.
}
\end{document}