TeX - LaTeX Asked by GZS on August 23, 2021
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.1textheight]{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.15textheight, %11
headershape=rectangle,
headershade=plain,
headerfont=Largetextsf, %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]{1textwidth}
end{minipage}
}
headerbox{Methods}{name=model,column=0,below=data,span=2}{
begin{minipage}[l]{1textwidth}
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]{1textwidth}
end{minipage}
}
end{poster}
end{document}
Welcome to TeX.SE. There is no key for setting the background of the poster title. The process is:
headerheight
with headerheight=0.10textheight
. This means that 10% of the height of the poster page will be used to write the poster header.background=user
. This means that you are going to define how the poster background will be created using the baposter
macro, background{}
.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:
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=Largesffamily, %Sans Serif % <-- sffamily
boxshade=plain,
%background=shadeTB, % <-- omit
background=user, %user or none or plain % <-- added
headerheight=0.10textheight,
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
{sffamilycolor{white}% %Sans Serif % <-- sffamilycolor{white}
vspace{.5em}%
textbf{Evaluating the Model}%
}
% Authors
{sffamilycolor{white}% % <-- sffamilycolor{white}
vspace{.5em}%
John Smithtextsuperscript{1}, Harrison Franktextsuperscript{2}par%
{small%
textsuperscript{1} Doctoral Student,USApar
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}
Correct answer by Ross on August 23, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP