如何删除标题页中的页眉并将声明放入带有罗马数字的目录中?

如何删除标题页中的页眉并将声明放入带有罗马数字的目录中?

我正在用 LaTeX 撰写论文,我没有找到以下问题的正确解决方案,也许有人可以帮助我:

  1. 不知何故,我在标题页之前有一个空白页,我该如何删除它?我发现,如果我删除标题页中包含的图表,这个空白页和页眉都会消失,但我的标题页中需要这个图表。

  2. 如何删除标题页的页眉?

  3. 在目录中,我如何将带有罗马数字的声明和缩写表包含在目录中?我尝试过\frontmatter,但它说! Undefined control sequence. \frontmatter. 在目录中,它不包含声明或缩写,而只是以“内容........v”开头,我希望声明和缩写也列在目录中。

以下是我在 TexMaker 中编写的脚本。
感谢您的帮助!!!
(抱歉这是我第一次在这里发帖,也许您也可以告诉我如何以更好的方式展示我的脚本 :) )

\documentclass[a4paper, 12pt, english,headsepline, DIV=12,twoside]{report}
\usepackage{lmodern}
\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\setlength{\parskip}{\smallskipamount}
\setlength{\parindent}{0pt}
\usepackage{color}
\usepackage{array}
\usepackage{float}
\usepackage{textcomp}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\graphicspath{{figure/}}
\usepackage{esint}
\usepackage{booktabs}
\usepackage{csquotes}
\usepackage{microtype}
\usepackage[backend=bibtex,
            style=authoryear,
            natbib=true, 
            style=numeric-comp
            ]{biblatex}
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth

\newcommand{\lyxmathsym}[1]{\ifmmode\begingroup\def\b@ld{bold}
    \text{\ifx\math@version\b@ld\bfseries\fi#1}\endgroup\else#1\fi}

\providecommand{\tabularnewline}{\\}
\floatstyle{ruled}
\newfloat{algorithm}{tbp}{loa}[chapter]
\providecommand{\algorithmname}{Algorithm}
\floatname{algorithm}{\protect\algorithmname}

% \usepackage{ae,aecompl}
\usepackage {marvosym}
\usepackage{rotating}
\usepackage[nottoc]{tocbibind}
% \pagenumbering{roman}
\usepackage{parskip}
% \usepackage{a4wide}
\usepackage{makeidx}
\usepackage{url}
\usepackage[english]{babel}

\usepackage{scrpage2}     
\pagestyle{scrheadings}   
\clearscrheadfoot         
\automark[section]{chapter}   
\ohead{\pagemark}              
\ihead{\headmark}      
\usepackage[BCOR1cm]{typearea}        
\usepackage[normalem]{ulem}
\usepackage{blindtext}

\usepackage{atbegshi}% http://ctan.org/pkg/atbegshi
\AtBeginDocument{\AtBeginShipoutNext{\AtBeginShipoutDiscard}}

\title{
\thispagestyle{plain}
 \centering
 \includegraphics[width=0.5\textwidth]{logo_cropped}\\
   \rule{0pt}{20mm}
   \text{Master Thesis}\\
   \vspace{10mm}
   \textbf{blablabla}
}
\author{Vivian}
\vspace{5mm}
\date{
    \vspace{25mm}
    \begin{tabular}{rl}
        \vspace{2mm}      
        \textbf{Faculty:}            &{blabla}\\
        \vspace{0.5mm}      
        \textbf{Studies:}            &{blabla}\\
        \vspace{0.5mm}
        \textbf{First Examiner:}     & Prof. \\
        \vspace{0.5mm}
        \textbf{Second Examiner}     & Prof. \\
        \vspace{0.5mm}
        \textbf{Supervisor:}         & Prof.\\
        \vspace{0.5mm}
        \textbf{Issued on:}          & June 30, 2016 \\
        \vspace{0.5mm}
        \textbf{Submitted on:}       & January 9, 2017\\
    \end{tabular} 
    }

    \addbibresource{Bib.bib}

\usepackage{lipsum}

\begin{document}
\setcounter{secnumdepth}{-1}
\pagestyle{empty}

\maketitle  
\pagestyle{scrheadings} 
\pagenumbering{roman}       

    \include{Declaration}

    \include{Abstract}

    \lipsum[1-5]

    \setcounter{secnumdepth}{3} 
    \tableofcontents
    \clearpage
    \pagenumbering{arabic}  

    \include{Chapter1}

    \include{Chapter2}

    \listoffigures

\begin{table}
\caption{Human Body Models and Applications}
\label{tab:HBM}
\centering
\begin{tabular}{*{3}{c}}
\toprule
\multicolumn{1}{c}
{Human model} & {Impact simulation} & {Comfort Simulation} \\
\midrule
here is some text without a meaning this text should show what a printed & text will look like at this place & If you read this text you will get no information\\
here is some text without a meaning this text should show what a printed & text will look like at this place & If you read this text you will get no information\\
here is some text without a meaning this text should show what a printed & text will look like at this place & If you read this text you will get no information\\
\bottomrule\\
\end{tabular}
\end{table}


    \printbibliography

\end{document}

答案1

这是一个解决方案。请注意, report类未定义\frontmatter\mainmatter也未定义\backmatter。只需在相关位置使用\pagenumbering{roman},然后使用 。\pagenumbering{arabic}

我认为“声明”和“摘要”必须是未编号的章节,但仍出现在目录中。获得此结果的一个简单方法是secnumdepth首先将其设置为 -1,然后在主要内容开始时将其设置为 3。最后,由于目录不应是其自身的成员(如集合……),我添加了选项[nottoc]tocbibind此外,typearea应该加载 scrpage2

最后一件事:我删除了一些过时的软件包(主要是ae, aecompl——对 没用——根据lmoderna4wide这是致命的错误之一l2tabu——因为你加载了typearea,和times:如果你想使用类似 times 的字体,那么不要加载,并用+lmodern替换 times )。newtxtextnewtxmath

\documentclass[a4paper, 12pt, english,headsepline, DIV=12, twoside]{report}
\usepackage{lmodern}
%\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\setlength{\parskip}{\smallskipamount}
\setlength{\parindent}{0pt}
\usepackage{color}
\usepackage{array}
\usepackage{float}
\usepackage{textcomp}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[demo]{graphicx}
\graphicspath{{figure/}}
\usepackage{esint}
\usepackage{booktabs}
\usepackage{csquotes}
\usepackage{microtype}
\usepackage[backend=bibtex,
            style=authoryear,
            natbib=true,
            style=numeric-comp
            ]{biblatex}
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth

\newcommand{\lyxmathsym}[1]{\ifmmode\begingroup\def\b@ld{bold}
    \text{\ifx\math@version\b@ld\bfseries\fi#1}\endgroup\else#1\fi}

\providecommand{\tabularnewline}{\\}
\floatstyle{ruled}
\newfloat{algorithm}{tbp}{loa}[chapter]
\providecommand{\algorithmname}{Algorithm}
\floatname{algorithm}{\protect\algorithmname}

\usepackage {marvosym}
\usepackage{rotating}
\usepackage[nottoc]{tocbibind}
\usepackage{parskip}
\usepackage{makeidx}
\usepackage{url}
\usepackage[english]{babel}

\usepackage{scrpage2}
\pagestyle{scrheadings}
\clearscrheadfoot
\automark[section]{chapter}
\ohead{\pagemark}
\ihead{\headmark}
\usepackage[BCOR1cm]{typearea}
\usepackage[normalem]{ulem}
\usepackage{blindtext}


\title{
 \centering
 \includegraphics[width=0.5\textwidth]{logo_cropped}\\
 \rule{0pt}{25mm}%\\
  {Master Thesis} \\
   \vspace{10mm}
   \textbf{blablabla}
}
\author{Vivian}
\vspace{5mm}
\date{
    \vspace{25mm}\setlength{\extrarowheight}{2pt}
    \begin{tabular}{rl}
        \textbf{Faculty:} &{blabla}\\[2mm]
        \textbf{Studies:} &{blabla}\\
        \textbf{First Examiner:} & Prof. \\
        \textbf{Second Examiner} & Prof. \\
        \textbf{Supervisor:} & Prof.\\
        \textbf{Issued on:} & June 30, 2016 \\
        \textbf{Submitted on:} & January 9, 2017\\
    \end{tabular}
    }

    \addbibresource{Bib.bib}
\usepackage{lipsum}

 \begin{document}
\setcounter{secnumdepth}{-1}
\pagestyle{empty}
    \maketitle
\pagestyle{scrheadings}
\pagenumbering{roman}
    \chapter{Declaration}
\blindtext
    \chapter{Abstract}
\lipsum[1-5]

\setcounter{secnumdepth}{3}
\tableofcontents
\clearpage
\pagenumbering{arabic}

    \chapter{Chapter the First}
\lipsum[1-10]

    \chapter{Chapter the Second}
\lipsum[11-20]

\appendix

    \chapter{An Appendix}
\lipsum[21-25]

    \listoffigures

    \printbibliography

\end{document}

在此处输入图片描述 在此处输入图片描述 在此处输入图片描述

答案2

我已将以下两行添加到您的代码中:

\usepackage{atbegshi}% http://ctan.org/pkg/atbegshi
\AtBeginDocument{\AtBeginShipoutNext{\AtBeginShipoutDiscard}}

找到解决方案这里

您的工作代码现在如下:

\documentclass[a4paper, 12pt, english,headsepline, DIV=12,twoside]{report}
\usepackage{lmodern}
\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\setlength{\parskip}{\smallskipamount}
\setlength{\parindent}{0pt}
\usepackage{color}
\usepackage{array}
\usepackage{float}
\usepackage{textcomp}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\graphicspath{{figure/}}
\usepackage{esint}
\usepackage{booktabs}
\usepackage{csquotes}
\usepackage{microtype}
\usepackage[backend=bibtex,
            style=authoryear,
            natbib=true, 
            style=numeric-comp
            ]{biblatex}
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth

\newcommand{\lyxmathsym}[1]{\ifmmode\begingroup\def\b@ld{bold}
    \text{\ifx\math@version\b@ld\bfseries\fi#1}\endgroup\else#1\fi}

\providecommand{\tabularnewline}{\\}
\floatstyle{ruled}
\newfloat{algorithm}{tbp}{loa}[chapter]
\providecommand{\algorithmname}{Algorithm}
\floatname{algorithm}{\protect\algorithmname}

\usepackage{ae,aecompl}
\usepackage {marvosym}
\pagenumbering{roman}
\usepackage[BCOR1cm]{typearea}
\usepackage{rotating}
\usepackage{tocbibind}
\usepackage{parskip}
\usepackage{a4wide}
\usepackage{makeidx}
\usepackage{url}
\usepackage[english]{babel}

\usepackage{scrpage2}     
\pagestyle{scrheadings}   
\clearscrheadfoot         
\automark[section]{chapter}   
\ohead{\pagemark}              
\ihead{\headmark}              
\usepackage[normalem]{ulem}
\usepackage{blindtext}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{atbegshi}% http://ctan.org/pkg/atbegshi
\AtBeginDocument{\AtBeginShipoutNext{\AtBeginShipoutDiscard}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{
\thispagestyle{plain}
 \centering
 \includegraphics[width=0.5\textwidth]{logo_cropped}\\
   \vspace{20mm}
   \text{Master Thesis}\\
   \vspace{10mm}
   \textbf{blablabla}
}
\author{Vivian}
\vspace{5mm}
\date{
    \vspace{25mm}
    \begin{tabular}{rl}
        \vspace{2mm}      
        \textbf{Faculty:}            &{blabla}\\
        \vspace{0.5mm}      
        \textbf{Studies:}            &{blabla}\\
        \vspace{0.5mm}
        \textbf{First Examiner:}     & Prof. \\
        \vspace{0.5mm}
        \textbf{Second Examiner}     & Prof. \\
        \vspace{0.5mm}
        \textbf{Supervisor:}         & Prof.\\
        \vspace{0.5mm}
        \textbf{Issued on:}          & June 30, 2016 \\
        \vspace{0.5mm}
        \textbf{Submitted on:}       & January 9, 2017\\
    \end{tabular} 
    }

    \addbibresource{Bib.bib}


\begin{document}
\thispagestyle{headings} 

    \maketitle
        %\titlepage
    \include{Declaration}

    \include{Abstract}

    \tableofcontents

    \include{Chapter1}

    \include{Chapter2}

    \include{Appendix}

    \listoffigures

    \printbibliography

\end{document}

相关内容