\documentclass{amsart}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{tikz}
\begin{document}
\title{Title 1}
\maketitle
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north east,inner sep=25pt] at (current page.north east)
{\includegraphics[scale=0.5]{example-image-a}};
\end{tikzpicture}
\lipsum
\newpage
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north east,inner sep=25pt] at (current page.north east)
{\includegraphics[scale=0.5]{example-image-a}};
\end{tikzpicture}
\lipsum
\end{document}
这里我放置了两次 tikzpicture 代码,但它只显示在文档的第一页。我怎样才能让它显示在文档的每一页上?
答案1
记得运行两次。
\documentclass{amsart}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{tikz}
\usepackage{everypage}
\AddEverypageHook{%
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north east,inner sep=25pt] at (current page.north east)
{\includegraphics[scale=0.5]{example-image-a}};
\end{tikzpicture}}
\begin{document}
\title{Title 1}
\maketitle
\lipsum
\newpage
\lipsum
\end{document}