![我不明白为什么我的文档开头有奇怪的页码?](https://linux22.com/image/300323/%E6%88%91%E4%B8%8D%E6%98%8E%E7%99%BD%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E7%9A%84%E6%96%87%E6%A1%A3%E5%BC%80%E5%A4%B4%E6%9C%89%E5%A5%87%E6%80%AA%E7%9A%84%E9%A1%B5%E7%A0%81%EF%BC%9F.png)
我想要我的文档包含以下内容:
我将使用以下缩写:
- wRn = 带罗马页码
- wAn = 带阿拉伯文页码
- Em = 空
- 封面 (Em)
- 封底页 (Em)
- 摘要 (wRn) I
- TOC (Em) - 也不包含在 TOC 中(例如内容 3)
- LOF(wRn)II
- LOT(wRn)IV
- 缩写页 (wRn) VI
- 引言 (wAn) 1
....中间留有空白页以确保内容从正确的页面开始......
我真的找不到办法做到这一点,我目前没有摘要页的页码、目录中列出的内容以及其余部分的随机罗马页码......
我尝试删除不同地方的东西并尝试从头开始重建文档的这一部分但没有成功。这是我的代码:
\documentclass[11pt]{report}
\usepackage{graphicx}
\usepackage{geometry}
\usepackage{fixltx2e}
\usepackage{grffile}
\usepackage[font=small,labelfont=bf]{caption}
%\usepackage{floatrow}
\usepackage{amsmath}
\usepackage{longtable}
\usepackage[notlof,notlot]{tocbibind}
\usepackage{fancyhdr}
\usepackage{titlesec}
\usepackage{epstopdf}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{tabularx}
\usepackage{tabu}
\usepackage{ragged2e}
%\usepackage[justification=centering]{caption}
\usepackage[titles]{tocloft}
\usepackage{rotating}
\usepackage{adjustbox}
\usepackage{enumitem}
%\usepackage[automark,clines]{scrlayer-scrpage}
\newcolumntype{L}{>{\RaggedRight\arraybackslash}X}
\titleformat{\section}
{\normalfont\fontsize{14}{12}\bfseries}{\thesection}{1em}{}
\makeatletter
\renewcommand{\paragraph}{%
\@startsection{paragraph}{4}%
{\z@}{1.2ex \@plus 1ex \@minus .2ex}{-1em}%
{\normalfont\normalsize\bfseries}%
}
\renewcommand{\baselinestretch}{1.5}
\makeatother
\setcounter{secnumdepth}{3}
\begin{document}
\sloppy
\begin{titlepage}
\begin{center}
% Upper part of the page. The '~' is needed because \\
% only works if a paragraph has started.
\textsc{\Large text}\\[1.5cm]
% Title
\vspace{2cm}
{ \LARGE \bfseries text \\[0.4cm] }
\vspace{0.5cm}
{ \large \bfseries Topic of Thesis: text \\[0.4cm] }
\vspace{2cm}
{ \Large \bfseries text \\[0.4cm] }
\vspace{1cm}
\textsc{\Large text}\\[0.5cm]
\textsc{\Large text}\\[0.5cm]
\vspace{1cm}
\textsc{\normalsize text}\\[0.5cm]
\textsc{\normalsize text}\\[0.5cm]
\textsc{\normalsize Hamburg, \today}\\[0.5cm]
\newpage\
\thispagestyle{empty}\textsc{\large text}\\[0.5cm]
\vspace{0.5cm}
{ \large \bfseries text \\[0.4cm] }
\vspace{2cm}
\vspace{11.5cm}
\textsc{\large 1. Reviewer: text*}\\[0.5cm]
\textsc{\large 2. Reviewer: text*}\\[0.5cm]
\vspace{1cm}
\textsc{\footnotesize *text}
\end{center}
\end{titlepage}
\newpage\null\thispagestyle{empty}\newpage
\newpage\null\thispagestyle{empty}\newpage
\pagenumbering{roman}
\abstract
\newpage\null\thispagestyle{empty}\newpage
{\newgeometry{left=0.98in,right=0.98in,top=0.98in,bottom=1.5in}
%\addtocontents{toc}{~\hfill\textbf{Page}\par}
\setcounter{tocdepth}{2}
\tableofcontents\thispagestyle{empty}\null\setlength{\cftbeforechapskip}{2ex}\setlength{\cftbeforesecskip}{0.5ex}
\listoffigures\setlength{\cftbeforechapskip}{2ex}\setlength{\cftbeforesecskip}{0.5ex}
\listoftables\setlength{\cftbeforechapskip}{2ex}\setlength{\cftbeforesecskip}{0.5ex}
\addtocontents{toc}{\protect\thispagestyle{empty}}
%\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}}
\pagestyle{fancy}\fancyhead[R]{Introduction}\fancyhead[L]{Chapter 1}
%\fancyhead{}
%\fancyhead[ER]{\leftmark}
%\fancyhead[OL]{\rightmark}
%\fancyhead[OR,EL]{\thepage}
%\pagestyle{fancy}
%\renewcommand{\footrulewidth}{0.4pt}
\newpage\null\thispagestyle{empty}\newpage
\chapter*{Abbreviations}
\upshape\noindent\Large\bfseries{General}
\vspace{0.5cm}
\upshape\noindent\Large\bfseries{estimates}
\vspace{0.5cm}
\newpage\null\thispagestyle{empty}\newpage
%\KOMAoption{footsepline}{:.5\textwidth}
\pagenumbering{arabic}
\newpage\null\thispagestyle{empty}\newpage
\setcounter{page}{1}
\chapter{Introduction}
\end{document}
有人能看到我可能哪里出错了吗?
答案1
这是一个开始。tocbibind
可能负责目录中的内容条目,因为它是该软件包所宣传的功能之一。
\documentclass[11pt,twoside]{report}
% don't load epstopdf at all - graphicx will handle things automatically
\usepackage[notlof,notlot]{tocbibind}
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage{titlesec}
\usepackage{ragged2e}
\usepackage[titles]{tocloft}
\usepackage{setspace}% better than setting baselineskip manually
\onehalfspacing
\usepackage{nextpage}
\newcounter{savedpage}
\titleformat{\section}
{\normalfont\fontsize{14}{12}\bfseries}{\thesection}{1em}{}
\makeatletter
\renewcommand{\paragraph}{%
\@startsection{paragraph}{4}%
{\z@}{1.2ex \@plus 1ex \@minus .2ex}{-1em}%
{\normalfont\normalsize\bfseries}%
}
\makeatother
\setcounter{secnumdepth}{3}
\begin{document}
% \sloppy% don't do this - it will undermine the typesetting of your entire document
\begin{titlepage}
\begin{center}
% Upper part of the page. The '~' is needed because \\
% only works if a paragraph has started.
\textsc{\Large text}\\[1.5cm]
% Title
\vspace{2cm}
{ \LARGE \bfseries text \\[0.4cm] }
\vspace{0.5cm}
{ \large \bfseries Topic of Thesis: text \\[0.4cm] }
\vspace{2cm}
{ \Large \bfseries text \\[0.4cm] }
\vspace{1cm}
\textsc{\Large text}\\[0.5cm]
\textsc{\Large text}\\[0.5cm]
\vspace{1cm}
\textsc{\normalsize text}\\[0.5cm]
\textsc{\normalsize text}\\[0.5cm]
\textsc{\normalsize Hamburg, \today}\\[0.5cm]
\end{center}
\end{titlepage}
\cleartooddpage[\thispagestyle{empty}]
\begin{center}
\thispagestyle{empty}\textsc{\large text}\\[0.5cm]
\vspace{0.5cm}
{ \large \bfseries text \\[0.4cm] }
\vfill
\textsc{\large 1. Reviewer: text*}\\[0.5cm]
\textsc{\large 2. Reviewer: text*}\\[0.5cm]
\vspace{1cm}
\textsc{\footnotesize *text}
\end{center}
\cleartooddpage[\thispagestyle{empty}]
\pagenumbering{roman}
\begin{abstract}
Abstract text here.\thispagestyle{plain}
\end{abstract}
\cleartooddpage[\thispagestyle{empty}]
{\newgeometry{left=0.98in,right=0.98in,top=0.98in,bottom=1.5in}
\setcounter{tocdepth}{2}
\tableofcontents\thispagestyle{empty}\null\setlength{\cftbeforechapskip}{2ex}\setlength{\cftbeforesecskip}{0.5ex}
\listoffigures\setlength{\cftbeforechapskip}{2ex}\setlength{\cftbeforesecskip}{0.5ex}
\listoftables\setlength{\cftbeforechapskip}{2ex}\setlength{\cftbeforesecskip}{0.5ex}
\addtocontents{toc}{\protect\thispagestyle{empty}}
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}}
\pagestyle{fancy}
\fancyhf[rh]{\nouppercase\rightmark}
\fancyhf[lh]{\nouppercase\leftmark}
\clearpage
\chapter*{Abbreviations}
\noindent{\upshape\Large\bfseries General\par}% \bfseries is a switch - it doesn't take an argument
\vspace{0.5cm}
\noindent{\upshape\Large\bfseries estimates\par}
\vspace{0.5cm}
\cleartooddpage[\thispagestyle{empty}]%
\pagenumbering{arabic}%
\chapter{Introduction}
\thepage \arabic{page}
some text\clearpage some more text
\end{document}
请注意,您不应该手动更改诸如\section
和之类的内容,\paragraph
如果您正在使用titlesec
其他软件包,则加载软件包就没有什么意义了。fancyhdr
和titlesec
并不矛盾,但您最好使用titlesec
其堂兄弟提供的页面布局选项,titleps
因为这些软件包旨在很好地协同工作。或者,titlesec
如果您不使用它(似乎是这种情况),请删除它。
我假设您并不希望图表列表放在带标签的页面上,II
因为考虑到目录位于摘要和图表列表之间,这样做根本没有意义。我猜内容应该放在 iii(未标记),LoF 放在 iv(标记),LoT 放在 v(标记),缩写放在 vi(标记),但您显然可以进行调整以适应。
如果您只是使用tocbibind
将参考书目添加到目录中,那么您最好手动使用来执行此操作,\addcontentsline
而不是尝试禁用 95% 的功能tocbibind
。