我正在使用 Texmaker 撰写数学论文,但不知何故我的 LaTeX 代码无法生成学校要求的 PDF 布局。理想情况下,我希望实现以下结果:
请注意,这只是所需 PDF 页面的绘图。我仍在努力。事实上,我现在拥有的是:
这是我的代码:
\documentclass[12pt]{article}
\usepackage[left=3cm,right=3cm,top=3cm,bottom=2cm]{geometry}
\usepackage{CJKutf8,mathpazo,upgreek,mathrsfs}
\usepackage{amssymb,amsthm,mathtools,mathabx,physics}
\usepackage{pdfpages}
\usepackage{hyperref}
\setcounter{tocdepth}{1}
\numberwithin{equation}{section}
\newtheorem{thm}{Theorem}[section]
\newtheorem{prop}[thm]{Proposition}
\newtheorem{coro}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem*{thm*}{Theorem}
\newtheorem*{prop*}{Proposition}
\newtheorem*{coro*}{Corollary}
\newtheorem*{lem*}{Lemma}
\theoremstyle{definition}
\newtheorem{dfn}[thm]{Definition}
\newtheorem{rem}[thm]{Remark}
\newtheorem*{dfn*}{Definition}
\newtheorem*{rem*}{Remark}
\begin{document}
\includepdf{Thesis acceptance certificate.pdf}
\section*{Acknowledgements}
TBA
\newpage
\section*{Abstract in the official language}
TBA
\newpage
\section*{Abstract in English}
TBA
\newpage
\tableofcontents
\newpage
\setcounter{page}{1}
\section{Introduction}
TBA
\section{Preliminaries}
TBA
\section{Proof of the main result}
TBA
\section{Discussion}
TBA
\newpage
\section*{Appendix A. The Gauss equation}
TBA
\newpage
\section*{Appendix B. Weak solution}
TBA
\newpage
\begin{thebibliography}{99}
\bibitem{MTW} Charles W. Misner, Kip S. Thorne, and John Archibald Wheeler,
\textit{Gravitation}, Princeton University Press, Princeton and Oxford, 2017. Reprint of the 1973 original.
\bibitem{Wald84} Robert M. Wald,
\textit{General relativity}, The University of Chicago Press, Chicago and London, 1984.
\end{thebibliography}
\end{document}
我想知道是否有办法将缺失的页面包含在目录中,并使前言具有罗马数字的页码。谢谢你的帮助。
答案1
我认为最好的选择是切换到book
文档类,利用它的一些结构机制(例如\frontmatter
、\mainmatter
和\backmatter
命令),并且在需要时调整该类的某些功能book
以使它们符合您所在机构的格式要求。
以下内容可能是朝这个方向的一个良好开端。
\documentclass[12pt,openany,demo]{book} % remove 'demo' option in real doc.
\usepackage[hmargin=3cm,top=3cm,bottom=2cm]{geometry}
\usepackage{amssymb,amsthm,mathtools,mathabx,physics}
\let\widering\relax% <-- new
\usepackage{pdfpages}
\usepackage{graphicx}
\usepackage{newpxtext,newpxmath} % <-- new, instead of 'mathptmx'
\usepackage{CJKutf8,upgreek,mathrsfs}
\usepackage[colorlinks,allcolors=blue]{hyperref}
\setcounter{tocdepth}{0} % show only chapter-level entries
%\numberwithin{equation}{section} % <-- not needed
\newtheorem{thm}{Theorem}[chapter]
\newtheorem{prop}[thm]{Proposition}
\newtheorem{coro}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem*{thm*}{Theorem}
\newtheorem*{prop*}{Proposition}
\newtheorem*{coro*}{Corollary}
\newtheorem*{lem*}{Lemma}
\theoremstyle{definition}
\newtheorem{dfn}[thm]{Definition}
\newtheorem{rem}[thm]{Remark}
\newtheorem*{dfn*}{Definition}
\newtheorem*{rem*}{Remark}
% new:
\usepackage{lipsum} % filler text
\usepackage[nottoc]{tocbibind} % create a toc entry for bibliography
\usepackage{etoolbox} % for '\patchcmd' macro
\makeatletter % needed for handling of macro names that contain '@'
\renewcommand{\@chapapp}{}
\patchcmd{\@makechapterhead}{\vspace*{50\p@}}{}{}{}
\patchcmd{\@makechapterhead}{\thechapter}{\thechapter\quad}{}{}
\patchcmd{\@makechapterhead}{\par\nobreak}{}{}{}
\patchcmd{\@makechapterhead}{\vskip 20\p@}{}{}{}
\makeatletter
\begin{document}
\pagestyle{plain} % page numbers at bottom of page, no headers
\frontmatter % roman page numbers, unnumbered chapters
\includepdf[width=\textwidth]{Thesis acceptance certificate}
\chapter{Acknowledgements}
\lipsum[1-4] % filler text
\chapter{Abstract in the official language}
\lipsum[1-4]
\chapter{Abstract in English}
\lipsum[1-4]
\tableofcontents
\mainmatter % arabic page numbers, numbered chapters
\chapter{Introduction}
\begin{equation} 1+1=2 \end{equation}
\lipsum[1-14]
\chapter{Preliminaries}
\begin{equation} 1+1=2 \end{equation}
\lipsum[1-14]
\chapter{Proof of the main result}
\begin{equation} 1+1=2 \end{equation}
\lipsum[1-14]
\chapter{Discussion}
\begin{equation} 1+1=2 \end{equation}
\lipsum[1-14]
\backmatter % switch to unnumbered chapters, keep arabic page numbers
\chapter{Appendix A. The Gauss equation}
\setcounter{equation}{0}
\setcounter{section}{0}
\renewcommand\theequation{A.\arabic{equation}}
\renewcommand\thesection{A.\arabic{section}}
\begin{equation} 1+1=2 \end{equation}
\lipsum[1-14]
\chapter{Appendix B. Weak solution}
\setcounter{equation}{0}
\setcounter{section}{0}
\renewcommand\theequation{B.\arabic{equation}}
\renewcommand\thesection{B.\arabic{section}}
\begin{equation} 1+1=2 \end{equation}
\lipsum[1-14]
\begin{thebibliography}{99}
\bibitem{MTW} Charles W. Misner, Kip S. Thorne, and John Archibald Wheeler,
\textit{Gravitation}, Princeton University Press, Princeton and Oxford, 2017. Reprint of the 1973 original.
\bibitem{Wald84} Robert M. Wald,
\textit{General relativity}, The University of Chicago Press, Chicago and London, 1984.
\end{thebibliography}
\end{document}