使用特定间距和字体设置格式化我的基本 tex 报告

使用特定间距和字体设置格式化我的基本 tex 报告

好的,所以我在开始我的(数学)报告之前配置我的 tex 文件的设置,并查看我的基本模板并删除所有我不需要的包,并相信我有下面它的关键(如果我不需要其中一些,请告诉我!)。

无论如何,我对我的报告有严格的设置,这些是:

“使用以下边距:33 毫米上边距、38 毫米下边距、26 毫米左边距、20 毫米右边距。文本应对齐并以黑色输入,使用 TIMES ROMAN 字体(或类似字体,如果不可能),字体大小为 12 号,间距为 2 号(如果不可能使用 2 号间距,则可以使用单倍行距)。每段应缩进 5 个空格。段落之间不要留有多余的空格。”

我已经使用 geometry 包设置了边距,但我不知道如何更改字体或使其对齐(我相信默认情况下它已经对齐了,但不确定字体设置)。此外,如何使用 2 点间距和 5 个空格段落缩进?

感谢您的帮助!

\documentclass[a4paper,oneside,12pt]{report}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% PACKAGES & SETTINGS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage[english]{babel} % formatting rules for the English language
\usepackage[T1]{fontenc} % proper formatting for accented characters and non-standard characters such as pipelines
\usepackage{lmodern} % font formatting
\usepackage{float} % allow floating environments such as figures
\usepackage{amsmath} % math eqn formatting
\usepackage{amssymb} % math fonts
\usepackage[top=33mm, bottom=38mm, left=26mm, right=20mm]{geometry} % page layout

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% DOCUMENT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% TITLE PAGE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{title here}
\author{author details}
\date{\today}

\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% START OF REPORT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\end{document}

答案1

我会尝试这样的事情:

\documentclass[a4paper,oneside,12pt]{report}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% PACKAGES & SETTINGS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage[english]{babel} % formatting rules for the English language
\usepackage[T1]{fontenc} % proper formatting for accented characters and non-standard characters such as pipelines
\usepackage{mathptmx}% fot a font which looks like Times New Roman (serif/roman)
%\usepackage{tgtermes}% an altternative
\usepackage[scaled=.90]{helvet}% for a font which looks like Helvetica, scaled to match TNR (sans)
%\usepackage{tgheros}% an altternative
\usepackage{courier}% for a font which looks like Courier (typewriter/monospaced)
%\usepackage{tgcursor}% an altternative
\usepackage{float} % allow floating environments such as figures
\usepackage{amsmath} % math eqn formatting
\usepackage{amssymb} % math fonts
\usepackage[top=33mm, bottom=38mm, left=26mm, right=20mm]{geometry} % page layout
\setlength{\parindent}{5ex}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% DOCUMENT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% TITLE PAGE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{title here}
\author{author details}
\date{\today}

\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% START OF REPORT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}

这不会使用 Times New Roman 本身,因为它不包含在 TeX Live 中,是一种商业字体,但将使用标准替代字体。注释行是 TeX Gyre 系列的替代字体。看看您更喜欢哪种字体,或者哪种字体对您来说最像 TNR。

如果您有 TNR 本身,您可以随意使用它。但是,您必须使用 XeLaTeX/LuaLaTeX 而不是 (pdf)LaTeX,或者您必须为其找到或生成合适的支持文件。此外,后者只有在您拥有 type1 格式的字体或 pdfLaTeX 的 truetype 格式或许可证允许转换时才真正是一种选择。如果您想知道如何生成支持文件,请告诉我。我假设在这种情况下没有理由这样做,因为规则明确允许替换。

段落缩进比较棘手。您可能想知道,他们所说的“空格”是什么意思?这在 TeX 中并不明显。如果他们指的是单词之间的空格,那么这个空格不是固定的,而是会变化以获得良好的换行符等。将其设置为5ex似乎并不完全不合理。这相当于字母“x”标称宽度的 5 倍。在我看来,这“看起来差不多”,但看看您怎么想。

请注意,建议指定americanbritish或其他内容,babel而不是english因为不同版本默认使用不同的选项。您也可以将其传递给类,以便任何可以使用该选项的包都可以获得它。

相关内容