我有以下标题页:
\documentclass[a4paper,twoside,12pt,chapterprefix=false]{scrbook}
\begin{document}
\begin{titlepage}
\thispagestyle{empty}
\fancypagestyle{empty}{
\lhead{\includegraphics[height=1.5cm]{images/logo_black}}
\renewcommand{\headrulewidth}{0.0pt}
\rhead{\vspace*{-0.2cm}\includegraphics[height=1.4cm]{images/logo_black_blue.jpg}}
\fancyfoot{}
}
\vspace*{2cm}
\begin{center}
\Huge{\textbf{Title of Thesis}\\}
\large{Master Thesis\\[0.8cm]}
\LARGE{My Name\\}
\normalsize{Institute \\ My mail address}
\end{center}
\vfill
\begin{center}
\begin{tabular}{ll}
\Large{\textbf Supervised by:} & \Large{Name 1}\\
\Large{} & \Large{Name 2}\\
& \small{Institute}\\
\end{tabular}
\end{center}
\begin{center}
\today\\
\end{center}
\end{titlepage}
\end{document}
现在的问题是我正在使用 scrpage2 而不是 fancyhdr,这意味着 fancypagestyle、lhead、headrulewidth、rhead 和 fancyfoot 不起作用。
如何纠正这个问题?
答案1
请注意scrpage2
已经过时了。它的后继者是scrlayer-scrpage
。在那里,您可以为标题页定义自己的图层页面样式:
\documentclass[a4paper,twoside,12pt,chapterprefix=false]{scrbook}
\usepackage{graphicx}
\usepackage{scrlayer-scrpage}
\DeclareNewLayer[
background,
head,
addvoffset=\headsep,
height=1.5cm,
addheight=\dp\strutbox,
contents={%
\includegraphics[height=1.5cm]{example-image-A}%
\hfill%
\includegraphics[height=1.4cm]{example-image-B}%
}
]{titlepage.head}
\DeclareNewPageStyleByLayers{titlepage}{titlepage.head}
\usepackage{blindtext}% dummy text
\begin{document}
\begin{titlepage}
\thispagestyle{titlepage}
\vspace*{2cm}
\begin{center}
{\Huge \textbf{Title of Thesis}\par}
{\large Master Thesis\par\vspace{.8cm}}
{\LARGE My Name\par}
Institute \\ My mail address
\end{center}
\vfill
\begin{center}
\begin{tabular}{ll}
\Large\textbf Supervised by: & \Large Name 1\\
& \Large Name 2\\
& \small{Institute}\\
\end{tabular}
\end{center}
\begin{center}
\today
\end{center}
\end{titlepage}
\blinddocument
\end{document}
使用旧包scrpage2
还可以定义新的页面样式:
\documentclass[a4paper,twoside,12pt,chapterprefix=false]{scrbook}
\usepackage{graphicx}
\usepackage{scrpage2}
\pagestyle{scrheadings}
\deftripstyle{titlepage}
[0pt][0pt]
{\includegraphics[height=1.5cm]{example-image-A}}{}{\includegraphics[height=1.4cm]{example-image-B}}
{}{}{}
\usepackage{blindtext}% dummy text
\begin{document}
\begin{titlepage}
\thispagestyle{titlepage}
\vspace*{2cm}
\begin{center}
{\Huge \textbf{Title of Thesis}\par}
{\large Master Thesis\par\vspace{.8cm}}
{\LARGE My Name\par}
Institute \\ My mail address
\end{center}
\vfill
\begin{center}
\begin{tabular}{ll}
\Large\textbf Supervised by: & \Large Name 1\\
& \Large Name 2\\
& \small{Institute}\\
\end{tabular}
\end{center}
\begin{center}
\today
\end{center}
\end{titlepage}
\blinddocument
\end{document}