Baposter:创建覆盖整个海报的图像

Baposter:创建覆盖整个海报的图像

目前,我的海报背景中有一张图像,但是,我不想让这张图片成为背景,而是希望它覆盖整个海报;也就是在所有图片和标题的前面。任何帮助都将不胜感激,我提供了我目前拥有的 MWE。

\documentclass[landscape,a0paper,fontscale=0.285]{baposter}

\usepackage{graphicx}

\usepackage{amsmath} 
\usepackage{amssymb} 
\usepackage{breqn}
\usepackage{booktabs} 
\usepackage{enumitem} 
\usepackage{palatino}
\usepackage[font=small,labelfont=bf]{caption}
\setlength{\columnsep}{1.5em}
\setlength{\columnseprule}{0mm}

\usepackage{tikz} 
\usetikzlibrary{shapes,arrows}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}

\definecolor{lightblue}{rgb}{0.145,0.6666,1}
\makeatletter 
\renewcommand{\baposter@box@drawbackground@plain}[2]{\tikzset{box colors/.style={fill=#1,fill opacity=0}} \fill[box colors] \baposterBoxGetShape;}
\makeatother

\begin{document}

\background{%
    \begin{tikzpicture}
        [remember picture, overlay]\node[opacity=0.8] at (current page.center) {\includegraphics[width=\paperwidth,height=\paperheight]{example-background}};
    \end{tikzpicture}%
}

\begin{poster}
{
headerborder=closed,
colspacing=1em, 
background = user,
borderColor=purple,
headerColorOne=purple,
headerColorTwo=lightblue,
headerFontColor=white, 
boxColorOne=white, 
textborder=roundedleft,
eyecatcher=true,
headerheight=0.1\textheight,
headershape=roundedright,
headerfont=\Large\bf\textsc, 
textfont={\setlength{\parindent}{1.5em}}, 
linewidth=2pt % Width of the border lines around content boxes
}

{\includegraphics[height=5em]{example}} 
{\bf\textsc{Title}\vspace{0.2em}} 
{\textsc{Name \\ Supervisor } }
{\phantom{\includegraphics[height=5em]{example}}} 


\end{poster}

\end{document}

答案1

欢迎使用 TeX.SE!有了eso-pic它,你可以将内容添加到(几乎)每个文档类的前台。我所做的就是添加

\usepackage{eso-pic}
\AddToShipoutPictureFG{%
\begin{tikzpicture}[remember picture, overlay]
 \node[opacity=0.8] at (current page.center) {\includegraphics[width=\paperwidth,height=\paperheight]{example-image-duck}};
\end{tikzpicture}
}

如果将不透明度设为 1,那么除了这张图片之外什么都没有。

\documentclass[landscape,a0paper,fontscale=0.285]{baposter}

\usepackage{graphicx}

\usepackage{amsmath} 
\usepackage{amssymb} 
\usepackage{breqn}
\usepackage{booktabs} 
\usepackage{enumitem} 
\usepackage{palatino}
\usepackage[font=small,labelfont=bf]{caption}
\setlength{\columnsep}{1.5em}
\setlength{\columnseprule}{0mm}

\usepackage{tikz} 
\usetikzlibrary{shapes,arrows}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}

\definecolor{lightblue}{rgb}{0.145,0.6666,1}
\makeatletter 
\renewcommand{\baposter@box@drawbackground@plain}[2]{\tikzset{box colors/.style={fill=#1,fill opacity=0}} \fill[box colors] \baposterBoxGetShape;}
\makeatother

\usepackage{eso-pic}
\AddToShipoutPictureFG{%
\begin{tikzpicture}[remember picture, overlay]
 \node[opacity=0.8] at (current page.center) {\includegraphics[width=\paperwidth,height=\paperheight]{example-image-duck}};
\end{tikzpicture}
}
\begin{document}

\background{%
    \begin{tikzpicture}
        [remember picture, overlay]\node[opacity=0.8] at (current page.center) {\includegraphics[width=\paperwidth,height=\paperheight]{example-image-duck}};
    \end{tikzpicture}%
}

\begin{poster}
{
headerborder=closed,
colspacing=1em, 
background = user,
borderColor=purple,
headerColorOne=purple,
headerColorTwo=lightblue,
headerFontColor=white, 
boxColorOne=white, 
textborder=roundedleft,
eyecatcher=true,
headerheight=0.1\textheight,
headershape=roundedright,
headerfont=\Large\bf\textsc, 
textfont={\setlength{\parindent}{1.5em}}, 
linewidth=2pt % Width of the border lines around content boxes
}

{\includegraphics[height=5em]{example-image-a}} 
{\bf\textsc{Title}\vspace{0.2em}} 
{\textsc{Name \\ Supervisor } }
{\phantom{\includegraphics[height=5em]{example-image-a}}}

\end{poster}

\end{document}

在此处输入图片描述

相关内容