我无法更改 baposter 中框的背景颜色:
\documentclass[a0paper, portrait, margin = 2.2em]{baposter}
\usepackage{url} % For \url
\usepackage{booktabs}
\usepackage{amsmath, amsfonts, amsthm}
\usepackage{multirow}
\usepackage{etoolbox}
\graphicspath{{pix/}} % Root directory of the pictures
\definecolor{bordercol}{RGB}{255, 255, 250}
\definecolor{headercol1}{RGB}{230, 184, 0}
\definecolor{headerfontcol}{RGB}{0,0,0}
\definecolor{boxcolor}{RGB}{255, 255, 250}
\definecolor{backgroundcol}{RGB}{255, 255, 250}
\definecolor{higlightcol}{RGB}{255, 110, 0}
\newcommand{\rowgroup}[1]{\hspace{1.5em}#1}
\begin{document}
\bgroup
%\patchcmd{<command>}{<code to replace>}{<code>}{<success>}{<failure>}
\makeatletter
\patchcmd{\baposter@box@headerdrawtext@rectangle}{0em}{0.5\boxwidth}{}{}
\patchcmd{\baposter@box@headerdrawtext@rectangle}{west}{center}{}{}
\makeatother
\begin{poster}{
borderColor=bordercol,
headerColorOne=headercol1,
headerColorTwo=headercol1,
headerFontColor=headerfontcol,
boxColorOne=boxcolor,
boxColorTwo=boxcolor,
headershape=rectangle,
headerborder=closed,
headerfont=\Large\scshape,
textborder=faded,
headerheight=0.09\textheight,
colspacing=0.35em, % Column spacing
bgColorOne=backgroundcol,
bgColorTwo=backgroundcol
}
%%% Eye Cacther %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{
Eye Catcher, empty if option eyecatcher=false - unused
}
%%% Title %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{\sf\scshape
Changing background of boxes in baposter
}
%%% Authors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{
Box Expert
}
\headerbox{Standard box}{name = box1, column = 0, row = 0}{
This is standard box.
}
\headerbox{Highlighted box}{name = box2, column = 0, below = box1,
boxColorOne = purple!40, headerColorOne = purple, headerColorTwo = purple}{
This should be highlighted box.
}
\end{poster}
\end{document}
无论我怎么尝试,盒子的背景都与海报的背景相同(我知道,在示例中它们的定义相同)。这甚至在本地都不可能实现,即在\headerbox
box2 中更改设置。
我也尝试\headerbox
用 来替换\posterbox
,但情况是一样的。
热烈欢迎任何有关错误的建议!
答案1
嗯,原因很简单——这是因为
textborder=faded,
一切
textborder=rectangle,
都进行得顺利。
希望这对其他人有所帮助。