我试图在LaTeX文档的每一页中设置不同的背景。我已经尝试过tikz,background和我发现的许多其他程序包,但我做不到。
I.E。
第一页:\maketitle
有一个背景
第二页:\tableofcontents
背景不同
第三页及以下:具有其他背景的内容
[编辑1]
[我有些解释不好。您的代码对我有很大帮助,但我尝试对其进行修改,但遇到了一些问题。
\documentclass[a4paper, 12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{eso-pic}
\usepackage[spanish]{babel}
\usepackage[absolute,overlay]{textpos}
\usepackage{xcolor} \definecolor{letras_portada}{RGB}{229,238,245}
\begin{document}
\AddToShipoutPictureBG*{\includegraphics[width=\paperwidth,height=\paperheight]{First_page.png}}
\begin{textblock*}{15cm}(6.35cm,23cm)
\huge{\textcolor{letras_portada}{\textbf{Report}}}
\end{textblock*}
\cleardoublepage
\AddToShipoutPictureBG*{\includegraphics[width=\paperwidth,height=\paperheight]{Index.png}}
\paragraph{}
\clearpage
\AddToShipoutPictureBG{\includegraphics[width=\paperwidth,height=\paperheight]{Content.png}}
\tableofcontents
\clearpage
\section{section 1}
text example 1text example 1text example 1text example 1text example 1text example 1text example 1text example 1text example 1text example
\subsection{2}
text example 1text example 1text example 1text example 1text example 1text example 1
\subsubsection{3}
text example 1text example 1text example 1text example 1text example 1text example 1
\end{document}
我假装是第一页带有标题(而不是maketitle,而是文本),第二页具有特定背景,但是没有文本,在第三页中,我想要目录。但是第二页消失了。
一种可能是eso-pic
软件包。使用\AddToShipoutPictureBG*{}
,可以更改当前页面的背景,以及当前页面和所有后续页面的\AddToShipoutPictureBG{}
。
\documentclass{book}
\usepackage{graphicx}
\usepackage{eso-pic}
\author{names}
\title{title}
\begin{document}
\AddToShipoutPictureBG*{\includegraphics[width=\paperwidth,height=\paperheight]{example-image-duck}}
\maketitle
\cleardoublepage
\AddToShipoutPictureBG*{\includegraphics[width=\paperwidth,height=\paperheight]{example-image-a}}
\tableofcontents
\clearpage
\AddToShipoutPictureBG{\includegraphics[width=\paperwidth,height=\paperheight]{example-grid-100x100bp}}
\chapter{title}
text
\end{document}