我想尝试在 baposter 中的标题框或框背景中使用图案填充。使用我使用的模板,您只能输入 headerColorOne,而不能指定图案或填充。我该怎么做?谢谢。
答案1
该答案将标题设置为node
,用单一颜色填充标题并叠加图案。
可以在 的文本框部分使用相同的方法\posterbox
。
这是输出。
这是 MWE:
\documentclass[a0paper]{baposter}
\usetikzlibrary{patterns,calc}
\begin{document}
\begin{poster}{
grid=false,
columns=6, % how many columns 1-6
colspacing=5.0mm, % spacing between the columns
headerheight=0cm, % the height of the header for the title
background=none, %user or none or plain
eyecatcher=false, %turn left logo on/off
%posterbox options
headerborder=closed, % see the baposter manual for the rest
borderColor=darkgray,
headershape=rectangle,
headershade=plain,
headerColorOne=white,
textborder=rectangle,
boxshade=plain,
boxColorOne=white,
headerFontColor=black,
textfont=\tiny,
headerfont=\normalsize\bfseries,
linewidth=1pt,
}
{}{\textcolor{white}{dummy}}{}{} % Eyecatcher, title, author, right logo. There must be at least one entry.
\begin{posterbox}[name=box1, column=0, span=1]{%
\tikz{\node[
preaction={%
fill, % fill the header with red!50!white
red!50!white
},
text width=\boxwidth-4ex, % specify the text width to set the width of the fill
pattern=north east lines, % overlay a pattern of north east lines
pattern color=white
]
{Header};
}
}
Some text
\end{posterbox}
\end{poster}
\end{document}