I'm preparing a poster with baposter package, and I have a long header in the headerbox so it exceeds the limit. Is there any way to write the header in the headerbox in multi-line?
[Tex/LaTex] baposter multi-line headerbox
baposter
Related Solutions
The environment table
is a floating object. Floating objects aren't allowed inside boxes. So simple remove the environment table
.
The explanation is given in the questions:
The baposter
class is useful for producing grid-based poster layouts. It is flexible with respect to page sizes (up to A0), for content in up to 6 columns. baposter
is not on CTAN but is available from here: http://www.brian-amberg.de/uni/poster/. A short, but adequate, 5 page manual is available and several examples have been posted for the guidance of users.
Setting the page margin is a class option for the baposter
package (see page 3 of the manual). Therefore, the usage syntax is \documentclass[margin=<length>]{baposter}
, where <length>=
a typical value passed to geometry
such as 25mm.
The default page margin is 15mm.
The following two examples illustrate the usage of the margin option. The example on the left sets the margin at 25mm, while one on the right sets it at 125mm. The resulting output is displayed against a background grid produced using the eso-pic
package. baposter's
showframe option (which presumably is also passed to geometry) is used to show the poster borders against the background grid. The margins (125mm) for the poster on the right are clearly larger than the margins (25mm) of the poster on the left. I cannot explain why the measurements generated by eso-pic
do not correspond the the margins set for baposter
, therefore this just serves to illustrate that the margins are indeed variables that can be set using the margin=<length>
class option.
This is the code used to produce the poster with 125mm margins. Note that the poster background is set to none so as to show the grid generated by eso-pic
. The colored background can be restored by commenting out eso-pic
, removing the verbatim around the \background
code and changing background=none
to background=user
in the poster options.
\documentclass[a0paper,portrait,showframe,margin=125mm]{baposter}
%a0 paper = 84.1 x 118.9 cm
%baposter is not on CTAN. Get it from here: http://www.brian-amberg.de/uni/poster/
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{helvet} %choose a sans serif font
\renewcommand{\familydefault}{\sfdefault} % replace the default font
\usepackage[T1]{fontenc}
\usepackage{lipsum}
\usepackage{verbatim}
\usepackage[pscoord=true,grid,gridunit=mm,gridBG,gridcolor=green!50, subgridcolor=gray!25]{eso-pic}
\begin{document}
\begin{comment} %to turn on the background change the background option to ``user'' and comment out begin{comment} end{comment}
\background{
\begin{tikzpicture}[remember picture,overlay]%
%the poster background color
\fill[fill=green!50] (current page.north west) rectangle (current page.south east);
%the header
\fill [fill=orange!50] (current page.north west) rectangle ([yshift=-\headerheight] current page.north east);
\end{tikzpicture}
}
\end{comment}
\begin{poster}{
%general options for the poster
grid=false,
columns=3,
colspacing=4.2mm,
headerheight=0.08\textheight,
background=none, %user or none or plain
eyecatcher=true,
%posterbox options
headerborder=closed,
borderColor=blue,
headershape=rectangle,
headershade=plain,
headerColorOne=blue,
% headerColortwo=yellow!42, %is used when the header background is shaded
textborder=rectangle,
boxshade=plain,
boxColorOne=white,
% boxColorTwo=cyan!42,%is used when the text background is shaded
headerFontColor=white,
headerfont=\Large\sf\bf,
linewidth=1pt
}
%Do not change the layout of the following items, although title and author can span multiple lines
%The logo on the left = eyecatcher
{
\includegraphics[height=0.75\headerheight]{example-image-a}
}
%the poster title
{Title}
% the author(s)
{Author}
%The logo on the right
{
\includegraphics[height=0.75\headerheight]{example-image-b}
}
%Poster content
\begin{posterbox}[name=box1,span=1,column=0,row=0]{Box1}
\lipsum[1]
\end{posterbox}
\begin{posterbox}[name=box2,span=1,column=0,below=box1]{Box2}
\lipsum[1]
\end{posterbox}
\begin{posterbox}[name=box3,span=2,column=1,bottomaligned=box2]{Box3}
\lipsum[1]
\end{posterbox}
\end{poster}
\end{document}
Best Answer
If I'm not mistaken, this is where the title is defined in
baposter.cls
Obviously, the fontsize used are
Huge
andLarge
, while the tikz node where they are ''hosted'' has no specific font size defined, which will cause bad line spacing. I'd recommend doing it slightly differently and modifying this portion of code such asThis would mean some code like this (for the if part, to be adapted for the else part):
Note that the
positioning
library of tikz might be requested if not already defined in the class header.