3

Hi, everyone. This is my first question here! I am working on a poster. I was trying to change the main title's color to be: background -- marine blue, text color -- white. I succeeded in changing the main title's text color to white by directly using \textbf{\color{white}{main title}}, but somehow found no way to change the background color. I have tried to change all the color options to see if anything works, but got no luck. Can anyone help me with that? Many thanks! baposter.cls

\documentclass[landscape,archE]{baposter}

\usepackage{color}
\usepackage{times}
\usepackage{helvet}
\usepackage{palatino}
\selectcolormodel{RGB}
\begin{document}
\definecolor{reddishyellow}{cmyk}{0,0.22,1.0,0.0}
\definecolor{black}{cmyk}{0,0,0.0,1.0}
\definecolor{DrexelBlue}{HTML}{07294D}
\definecolor{Gray}{HTML}{777675}
\typeout{Poster Starts}
\background{
\begin{tikzpicture}[remember picture,overlay]%
\draw (current page.north west)+(-2em,2em) node[anchor=north west] {\includegraphics[height=1.1\textheight]{silhouettes_background}};
\end{tikzpicture}%
}
\newlength{\leftimgwidth}
\begin{poster}%
% Poster Options
{
% Show grid to help with alignment
grid=false,
columns=5,
% Column spacing
colspacing=1em,
% Color style
bgColorOne=DrexelBlue,
bgColorTwo=white, 
borderColor=Gray,
headerColorOne=Gray,
headerColorTwo=reddishyellow,
headerFontColor=white, 
boxColorOne=white, 
%boxColorTwo=lighteryellow,
% Format of textbox
textborder=none,
textborder=rectangle,
% Format of text header
eyecatcher=false,
headerborder=open,
headerheight=0.15\textheight, %11
headershape=rectangle,
headershade=plain,
headerfont=\Large\textsf, %Sans Serif
boxshade=plain,
background=shadeTB,
linewidth=.5pt
}
% Eye Catcher
{% No eye catcher for this poster. (eyecatcher=no above).
}%If an eye catcher is present, the title is centered between eye-catcher and logo.
% Title
{\sf %Sans Serif
%\bf% Serif
\vspace{.25em}
\textbf{Evaluating the Model}\\}
% Authors
{\sf %Sans Serif
\vspace{.25em}John Smith$^{1}$, Harrison Frank$^{2}$\\ %.25
{\small
$^1$ Doctoral Student,USA\\
$^2$ USA}
}
{
\begin{minipage}[t]{50.0em} %28
\begin{tabular}{ll}
\end{tabular}
\vfill
\end{minipage}
} 
\tikzstyle{light shaded}=[top color=baposterBGtwo!30!white,bottom color=baposterBGone!30!white,shading=axis,shading angle=30]
\setlength{\leftimgwidth}{0.78em+8.0em}
\newcommand{\colouredcircle}[1]{%
\tikz{\useasboundingbox (-0.2em,-0.32em) rectangle(0.2em,0.32em); \draw[draw=black,fill=baposterBGone!80!black!#1!white,line width=0.03em] (0,0) circle(0.18em);}}
\small
\headerbox{Introduction}{name=data,column=0,row=0,span=2}{
\begin{minipage}[l]{1\textwidth}
\end{minipage} 
}
\headerbox{Methods}{name=model,column=0,below=data,span=2}{
\begin{minipage}[l]{1\textwidth}
\end{minipage}
}
\headerbox{Case Study}{name=trends,column=2,row=0,span=3}{
}
\headerbox{Summary}{name=summary,column=2,below=trends,span=3}{
\begin{minipage}[l]{1\textwidth}
\end{minipage}
}

\end{poster}

\end{document}
4
  • Unrelated, but don't use two letter font commands. They've been obsolete for many many years. See Will two-letter font style commands (\bf , \it , …) ever be resurrected in LaTeX?. Also I don't think you meant two write \textbf{white}{Title}. Perhaps \color{white} inside your title elements is what you had in mind.
    – Alan Munn
    Jul 21 '20 at 19:26
  • You are right. It is a typo, already fixed it! Thanks for the advice!
    – GZS
    Jul 21 '20 at 19:40
  • I have these error ! LaTeX Error: File "baposter.cls" not found. Where do you find this baposter class?
    – AndréC
    Jul 21 '20 at 19:44
  • My bad. I attached the baposter.cls file. Thanks!
    – GZS
    Jul 21 '20 at 19:58
2

Welcome to TeX.SE. There is no key for setting the background of the poster title. The process is:

  1. Define the headerheight with headerheight=0.10\textheight. This means that 10% of the height of the poster page will be used to write the poster header.
  2. Set the key background=user. This means that you are going to define how the poster background will be created using the baposter macro, \background{}.
  3. Write the code to draw and / or fill the background. In this case, you want a different colour for the header. We can do this by writing: \fill [fill=HeaderBackground] (current page.north west) rectangle ([yshift=-\headerheight] current page.north east); where HeaderBackground defines your choice of colour, and we draw a rectangle equal to the width of the poster and a height equal to headerheight (as defined above).

The complete code for drawing the background is:

\background{
    \begin{tikzpicture}[remember picture,overlay]%
    %the poster background color (the whole page)
    \fill[fill=PosterBackground] (current page.north west) rectangle 
    (current page.south east); 
    %the header (just the top of the page where the title is written)
    \fill [fill=HeaderBackground] (current page.north west) rectangle 
    ([yshift=-\headerheight] current page.north east); 
    \end{tikzpicture}
}

Doing so produces this result:

enter image description here

Some other comments. \headerbox is a macro that is deprecated and replaced with \begin{posterbox} ... \end{posterbox}. The difference is that you cannot include verbatim content in the \headerbox macro, whereas because \begin{posterbox} ... \end{posterbox} is an environment, you can include verbatim material. If you like grid layout that can be created using baposter, you might be interested in the functionality provided by the poster library in the tcolorbox package. It was modelled on baposter, but arguably has even more functionality.

The complete code is:

\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor} % <-- added
\documentclass[landscape,archE]{baposter}

\usepackage{times}
\usepackage{helvet}
\usepackage{palatino}
\selectcolormodel{RGB}
\definecolor{reddishyellow}{cmyk}{0,0.22,1.0,0.0}
\definecolor{black}{cmyk}{0,0,0.0,1.0}
\definecolor{DrexelBlue}{HTML}{07294D}
\definecolor{Gray}{HTML}{777675}
\colorlet{HeaderBackground}{NavyBlue} % <-- added
\colorlet{PosterBackground}{SkyBlue}  % <-- added
\newlength{\leftimgwidth}

\begin{document}

\typeout{Poster Starts}
\background{
    \begin{tikzpicture}[remember picture,overlay]%
    %the poster background color
    \fill[fill=PosterBackground] (current page.north west) rectangle (current page.south east); %% cover the whole poster
    %the header
    \fill [fill=HeaderBackground] (current page.north west) rectangle ([yshift=-\headerheight] current page.north east); % just for the poster header, fill with a different color.
    \end{tikzpicture}
}

\begin{poster}%
% Poster Options
{
% Show grid to help with alignment
grid=false,
columns=5,
% Column spacing
colspacing=1em,
% Color style
bgColorOne=DrexelBlue,
bgColorTwo=white,
borderColor=Gray,
headerColorOne=Gray,
headerColorTwo=reddishyellow,
headerFontColor=white,
boxColorOne=white,
%boxColorTwo=lighteryellow,
% Format of textbox
textborder=none,
textborder=rectangle,
% Format of text header
eyecatcher=false,
headerborder=open,
headershape=rectangle,
headershade=plain,
headerfont=\Large\sffamily, %Sans Serif  % <-- \sffamily
boxshade=plain,
%background=shadeTB,                    % <-- omit
background=user, %user or none or plain % <-- added
headerheight=0.10\textheight,           
linewidth=.5pt
}
% Eye Catcher
{% No eye catcher for this poster. (eyecatcher=no above).
}%If an eye catcher is present, the title is centered between eye-catcher and logo.
% Title
{\sffamily\color{white}% %Sans Serif   % <-- \sffamily\color{white}
\vspace{.5em}%
\textbf{Evaluating the Model}%
}
% Authors
{\sffamily\color{white}%              % <-- \sffamily\color{white}
\vspace{.5em}%
John Smith\textsuperscript{1}, Harrison Frank\textsuperscript{2}\par%
{\small%
\textsuperscript{1} Doctoral Student,USA\par
\textsuperscript{2} USA}}
{}% Logo
\begin{posterbox}[name=box1, column=0, span=1]{Header}   % <-- replace headerbox with posterbox
Some text
\end{posterbox}

\end{poster}

\end{document}     

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.