我正在为研究论文准备一份 LaTeX 文档,但在格式上遇到了两个问题:
- 我希望左侧和顶部的边距为 4 厘米,右侧和底部的边距为 2 厘米。令我惊讶的是(对我来说)页边距在各个页面之间交替变化。
- 我尝试将页码放入页脚并希望它们居中。然而它们似乎稍微向两侧偏移了一点。
这是我的示例代码:
\documentclass[report]{apa7}
\usepackage{lipsum}
\setcounter{secnumdepth}{5}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{literatur/literatur.bib}
\renewcommand{\headrulewidth}{0pt}
\usepackage[T1]{fontenc}
\usepackage{ebgaramond-maths}
\usepackage{fancyhdr}
\fancyhf{}
\cfoot{\thepage}
\pagestyle{fancy}
\usepackage{geometry}
\geometry{
a4paper,
total={170mm,257mm},
left=40mm,
right=20mm,
bottom=20mm,
top=40mm
}
\let\llncssubparagraph\subparagraph
\let\subparagraph\paragraph
\usepackage[up,bf,raggedright]{titlesec}
\let\subparagraph\llncssubparagraph
\renewcommand{\baselinestretch}{1.5}
\setlength{\parindent}{1.5cm}
\begin{document}
\pagecolor{white}
\thispagestyle{empty}
\begin{titlepage}
\newgeometry{left=2cm, right=2cm, top=2cm, bottom=2cm}
\begin{center}
\vspace{.5cm}
\begin{Large}\textbf{University}\end{Large}\\
\vspace{.5cm}
\begin{Large}Section\end{Large}\\
\vspace{2cm}
\begin{Large}\textbf{Thesis}\end{Large}\\
\vspace{.5cm}
Course
\vspace{2cm}
Course\\
\large{\textbf{Title}}\\
\vspace{2cm}
Topic\\
\vspace{0.5cm}
\large{\textbf{Title}}\\
\vspace{2cm}
von\\
\vspace{0.5cm}
\begin{Large}{Author}\end{Large}\\
\end{center}
\normalsize
\vfill
\begin{tabular}{ l l }
Betreuer: & Name\\
Matrikelnummer: & Number\\
Abgabedatum: & \today
\\
\end{tabular}
\end{titlepage}
\newpage
\addtocontents{toc}{\protect\enlargethispage{-20mm}}
\setcounter{tocdepth}{4}
\tableofcontents
\newpage
\section{Chapter 1}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\newpage
\section{Chapter 2}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\printbibliography[nottype=online,heading=bibintoc,title={Literaturverzeichnis}]
\end{document}
你们中有谁知道如何解决这两个问题吗?
提前感谢你的支持 Florian