页码不起作用

页码不起作用

亲爱的 LaTeX 社区,大家好,我在页码方面遇到了问题。也就是说,“致谢”一章的页码无法显示。罗马数字只能从“摘要”开始。有人能帮我解决这个问题吗?

\documentclass[ egregdoesnotlikesansseriftitles,
                a4paper,
                final,
                12pt, 
                %twosides %For printing
                oneside
                ]{scrbook}

%Insert your personal data to update the whole document
\newcommand{\myName}{LA}
\newcommand{\myStudentID}{XXXXXX}
\newcommand{\myPlace}{DO}
\newcommand{\myThesis}{Thesis}
\newcommand{\myHochschule}{University}
%\newcommand{\myCompany}{-}
\newcommand{\myUniversitySupervisor}{MK}
%\newcommand{\myTechnicalSupervisor}{-}



\input{auxfiles/doc_config}

%----------------------------------------Preamble------------------------------------
\begin{document}

%Title page
\input{auxfiles/cover}

%----------------------------------------Formatter------------------------------------
\pagenumbering{Roman}                   %Roman page numbering for Formatter

%\setcounter{page}{2}
%\input{auxfiles/sperrvermerk}

\input{auxfiles/acknowledgements}

\input{chapters/0_abstract}

\newpage
%\phantomsection
\renewcommand{\contentsname}{Table of Contents}
%\addcontentsline{toc}{chapter}{\contentsname}
\tableofcontents\thispagestyle{plain}%\fancyhead[L]{CONTENTS}

\phantomsection
%\setcounter{page}{10}
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures\thispagestyle{plain}

\newpage
\phantomsection
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables\thispagestyle{plain}

%\newpage
%\phantomsection
%\addcontentsline{toc}{chapter}{Listings}
%\lstlistoflistings.

%Import acronyms
\input{auxfiles/acronyms}

\printglossary[type=\acronymtype]\thispagestyle{plain}

%----------------------------------------Mainmatter------------------------------------
\newpage
\pagenumbering{arabic}                  %Arabic numbering for mainmatter
%Content

\input{chapters/1_introduction}
\input{chapters/2_background}
\input{chapters/3_setup}
\input{chapters/4_methods}
\input{chapters/5_results}
\input{chapters/6_conclusions}
\input{chapters/7_outlook}

%----------------------------------------Endmatter------------------------------------
\newpage

%\pagenumbering{Roman}                   %Roman page numbering for Endmatter

\appendix

\input{chapters/99_appendix}

%Bibliography
\newpage
\phantomsection
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{plain}
\bibliography{refs}

%Confirmation of honesty
\input{auxfiles/honor}


\end{document} 

文档配置


%-------------------------------------Packages-------------------------------------
% Language setting
\usepackage[german,english]{babel}

% Set page size and margins
\usepackage[a4paper,
            top = 2cm, 
            bottom = 2cm, 
            left = 4cm, 
            includehead, 
            includefoot, 
            right = 2cm]{geometry}

%Set headers and footers
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}                                  %Clear all footers and headers
%\fancyhead[L]{\leftmark}                    %Gives the chapter name

%\fancyfoot[C]{\includegraphics[width = 0.15\textwidth]{Siemens-logo.png}}
\renewcommand{\headrulewidth}{0.4pt}
%\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\chaptermark}[1]{%
\markboth{\ \thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}


\setlength{\headheight}{15pt}

% Useful packages
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{lipsum}                         %Create dummy text
\usepackage{setspace}                       %Give bigger spacing in between the lines of the title
%\usepackage{tocbibind}                      %Add list of figures and list of tables to the toc
\usepackage[hidelinks]{hyperref}            %Enable hyperlinks to jump to different sections
\usepackage[utf8]{inputenc}
\usepackage[toc, acronym, nonumberlist, style = super]{glossaries}       %Use acronyms and create a section that shows the acronym and its meaning
\usepackage{chngcntr}                       %Change how figures are numbered
\usepackage{multirow}
\usepackage{url}
\usepackage{booktabs}                       %Prettier tables
\usepackage{caption}                        
\usepackage{subcaption}                     %Allows subfigures
\usepackage{listings}                       %Create blocks of code
\usepackage{xcolor}
\usepackage [autostyle, english = american]{csquotes}

\MakeOuterQuote{"}


\newboolean{draftBool}
\setboolean{draftBool}{false}
%Draft Watermark
\ifdraftBool
    \usepackage{background}
    \backgroundsetup{contents={DRAFT},color={red},opacity = {0.1}}
\fi

\newboolean{dS}
\setboolean{dS}{false}
\ifdS
    \fancyhead[RE,LO]{\textit{\rightmark}}                   %Gives the section name
    %\fancyhead[LE,RO]{\myName{}}
    \fancyfoot[LE,RO]{\thepage}
\else
    \fancyhead[L]{\textit{\rightmark}}                   %Gives the section name
    %\fancyhead[R]{\myName{}}
    \fancyfoot[C]{\thepage}
\fi



\input{auxfiles/code_listings}             %Defining SCL as a programming language for use in listing


\setlength{\parindent}{0pt}                 %No indentation in new paragraphs
\setlength{\parskip}{6pt}                   %Distance between paragraphs = 6pt
\renewcommand{\baselinestretch}{1.3}        %Line spacing = 1.3

%\counterwithout{figure}{chapter}            %Change figure numbering to sequential order (1,2,...,n)
%\counterwithout{table}{chapter}

\makeglossaries

\graphicspath{{figures/}}

\def\code#1{\textit{\texttt{#1}}}                    %Define a command to write monospace text in form of a code

%Define Pagestyles
\fancypagestyle{plain}{
    \fancyhf{}
    %\fancyhead[R]{\myName{}}
    \fancyfoot[C]{\thepage}
    \renewcommand{\headrulewidth}{0.4pt}
    %\renewcommand{\footrulewidth}{0.4pt}
}

相关内容