我正在尝试为我的演示文稿设计一个背景,背景应该有徽标和一些与图片类似的文字。
我使用了此代码,但文本太宽,无法容纳在徽标下
\documentclass[10pt]{exam}
\usepackage{background}
\newsavebox\mybox
\savebox\mybox{\tikz[opacity=0.1]\node{\includegraphics[width=1cm]{logo}
\underline{\textbf{xxxx}}};
}
\backgroundsetup{angle=0,contents={\usebox\mybox}
\begin{document}
My document
\end{document}
答案1
我不确定我是否明白您的问题,但是:您的意思是这个吗?
我必须修复几个问题(见评论)。
我把所有背景图片都放在了 Ti钾Z 节点(但你可以使用它)并使节点将多条线居中对齐)
\documentclass[10pt]{exam}
\usepackage{background}
\newsavebox\mybox
\savebox\mybox{%
\tikz[opacity=0.1]\node[align=center]{%
\includegraphics[width=1cm]{example-image-a}\\[-8pt]
{\tiny\textbf{xxxx}}};
}
\backgroundsetup{angle=0,contents={\usebox\mybox}}
\begin{document}
My document
\end{document}
但请注意,该软件包在 TeXLive 2020 版本中给出了警告:
Package everypage Warning: Functionality similar to this package has recently
(everypage) been implemented in LaTeX. This package is now in
(everypage) legacy status.
(everypage) Please, don't use it in new documents and packages.
Package everypage Warning: You appear to be running a version of LaTeX
(everypage) providing the new functionality.
(everypage) Doing the best to deliver the original `everypage`
(everypage) interface on top of it. Strict equivalence is
(everypage) not possible, breakage may occur.
(everypage) If truly needed, Use `everypage-1x` to force the
(everypage) loading of an older code base.