
我有一個整頁圖,我想將其顯示在整頁圖像上。
我的問題是覆蓋圖像出現在與該圖不同的頁面上。
我正在使用wallpaper
套件來產生覆蓋層。但是,我很高興切換到任何其他解決方案,這將允許我在整個頁面上覆蓋圖像(無邊距)。
有沒有可靠的方法讓它們在同一頁上?
\documentclass{article}
\usepackage{wallpaper}
\usepackage{lipsum}
\begin{document}
\lipsum[1-3]
\ThisULCornerWallPaper{1}{img/overlay}
\begin{figure}
\LARGE\lipsum[4-5]
\caption{Lipsum}
\label{fig:hello}
\end{figure}
\end{document}
答案1
像tikz
往常一樣:
\documentclass{article}
\usepackage{tikz}
\usepackage{lipsum}
\newcommand{\myback}[1]{%
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt,outer sep=0pt] at (current page.north west)
{\includegraphics[width=\paperwidth,height=\paperheight]{#1}};
\end{tikzpicture}
}
\begin{document}
\lipsum[1-10]
\begin{figure}[htb]
\myback{example-image-a}
\LARGE\lipsum[4-5]
\caption{Lipsum}
\label{fig:hello}
\end{figure}
\lipsum[11-15]
\lipsum
\end{document}