如何用tikz在每个页面上设置logo?

问题描述 投票:0回答:1

我想在除首页以外的每个页面上设置我的标志。现在我可以在一页上完成以下操作:

egin{tikzpicture}[记住图片,叠加] ode[anchor=north east,inner sep=15pt] at (current page.north east){\includegraphics[scale=0.2]{Figures/logo.png}}; nd{tikzpicture}

这会将徽标设置在正确的位置,但仅在一页上。我如何为每一页重复这个?

latex overleaf
1个回答
0
投票

在半最新的 LaTeX 上,你可以使用钩子:

\documentclass{report}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{blindtext}

\title{The Title}
\author{First Last}
\date{}


\begin{document}
\maketitle

\clearpage
\AddToHook{shipout/background}{%
  \begin{tikzpicture}[remember picture,overlay]
    \node[anchor=north east,inner sep=15pt]
    at (current page.north east){\includegraphics[scale=0.2]{example-image-duck}};
  \end{tikzpicture}}
\Blinddocument
\end{document}

如果您出于某种原因保留旧版本,您可能需要使用一个 pf 包,例如esi-pic.

© www.soinside.com 2019 - 2024. All rights reserved.