在我的书籍文档中间,我想添加一个类似于标题页的页面。该页面一半是白色,一半是浅蓝色,两半中有一些信息。页眉和脚注与正文的其他页面一样保留。
到目前为止,我已经能够准备类似的东西,看看其他类似的答案:
使用代码
\documentclass [11pt,a4paper,twoside,openright,dvipsnames]{book}
\usepackage{lipsum}
\usepackage[utf8]{inputenc} % Input encoding
\usepackage[english]{babel} % Language dictionary
\usepackage[T1]{fontenc} % Typefont enconding
\usepackage{lmodern} % Standard Latex fonts (but better visualization)
\usepackage{fancyhdr} % Headers and footnotes
\usepackage{pdfpages} % To add pages from other documents and more
\begin{document}
\mainmatter
% font for the header
\newcommand{\helv}{%
\color{gray}\fontfamily{phv}\slshape\fontsize{9}{11}\selectfont}
\pagestyle{fancy}
\fancyhf{} %clear previous fancy styles
\renewcommand{\chaptermark}[1]{\markboth{\helv \thechapter.\ #1}{}}
\fancyhead[LE]{\leftmark}
\fancyhead[RO]{\leftmark}
\fancyfoot[LE,RO]{\helv \thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% plain style
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers
\renewcommand{\headrulewidth}{0pt} % and the line
\fancyfoot[RO]{\helv \thepage}
}
%%% End of HEADER AND FOOTER DESCRIPTION
\chapter{Chapter 1}
\lipsum[1-5]
\chapter{Chapter 2}
\lipsum[6-10]
\cleardoublepage
% definition of colors
\definecolor{myblue}{RGB}{0,201,201}
\colorlet{mylightblue}{myblue!30}
\vspace*{10cm}
\begin{flushright}
\textbf{\Large A very nice title}\\
\textbf{\Large of a very interesting article}\\
\textbf{\Large that I will embed in this report}
\end{flushright}
\vspace*{-10pt}
\par\medskip
\noindent\makebox[\linewidth+0.7in][c]{%
\colorbox{mylightblue}{%
\parbox{\paperwidth}{%
\raisebox{3in}{%
\hspace*{\dimexpr\hoffset+\oddsidemargin+1in\relax}%
\begin{minipage}{\textwidth}
\begin{flushright}
{\large Author 1, Author 2, Author 3} \\
{\large \textit{Journal of Research Magazines}, Vol. 1, pp. 1-12, (2017).}
\end{flushright}
\vfill
\end{minipage}%
}%
}%
}%
}\par\medskip
\cleardoublepage
\chapter{Chapter 3}
\lipsum[11-20]
\end{document}
我想将浅蓝色扩展到整个页面底部,包括脚注部分。我尝试使用 raisebox,但在某些时候整个颜色框会移动到下一页。此外,我想避免使用 Tikz,此外,这只能在文档的某些页面上进行,而不是全部。
答案1
好吧,我肯定会使用 tikz 和 tikzmark,但除此之外:
\documentclass [11pt,a4paper,twoside,openright,dvipsnames]{book}
\usepackage{lipsum}
\usepackage[utf8]{inputenc} % Input encoding
\usepackage[english]{babel} % Language dictionary
\usepackage[T1]{fontenc} % Typefont enconding
\usepackage{lmodern} % Standard Latex fonts (but better visualization)
\usepackage{fancyhdr} % Headers and footnotes
\usepackage{pdfpages} % To add pages from other documents and more
\begin{document}
\mainmatter
% font for the header
\newcommand{\helv}{%
\color{gray}\fontfamily{phv}\slshape\fontsize{9}{11}\selectfont}
\pagestyle{fancy}
\fancyhf{} %clear previous fancy styles
\renewcommand{\chaptermark}[1]{\markboth{\helv \thechapter.\ #1}{}}
\fancyhead[LE]{\leftmark}
\fancyhead[RO]{\leftmark}
\fancyfoot[LE,RO]{\helv \thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% plain style
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers
\renewcommand{\headrulewidth}{0pt} % and the line
\fancyfoot[RO]{\helv \thepage}
}
%%% End of HEADER AND FOOTER DESCRIPTION
\chapter{Chapter 1}
\lipsum[1-5]
\chapter{Chapter 2}
\lipsum[6-10]
\cleardoublepage
% definition of colors
\definecolor{myblue}{RGB}{0,201,201}
\colorlet{mylightblue}{myblue!30}
\vspace*{10cm}
\begin{flushright}
\textbf{\Large A very nice title}\\
\textbf{\Large of a very interesting article}\\
\textbf{\Large that I will embed in this report}
\end{flushright}
\vspace*{-10pt}
\par\medskip
\noindent\makebox[\linewidth+0.7in][c]{%
\raisebox{0pt}[0pt][0pt]{%
\colorbox{mylightblue}{%
\parbox[t]{\paperwidth}{%
{%
\hspace*{\dimexpr\hoffset+\oddsidemargin+1in\relax}%
\begin{minipage}[t]{\textwidth}
\begin{flushright}
{\large Author 1, Author 2, Author 3} \\
{\large \textit{Journal of Research Magazines}, Vol. 1, pp. 1-12, (2017).}
\end{flushright}
\rule{0pt}{15cm}
\end{minipage}%
}%
}%
}}%
}\par\medskip
\cleardoublepage
\chapter{Chapter 3}
\lipsum[11-20]
\end{document}