2

I am using baposter to produce my posters.

I am trying to introduce a background image, I succeed, but always get an "Overfull \hbox" warning that I cannot debug.

I know what this warning means and how to overcome it, but in this particular case I just cannot.

The offending piece of code is where I define my background (note that if you specify "background=plain" below, the warning disappears cause the background is not displayed).

This is my MWE, you can get baposter.cls here

\documentclass[paperheight=36in,paperwidth=48in,fontscale=0.3]{baposter}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Beginning of Document
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

%:Background image
%%% Setting Background Image %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\background{
    \begin{tikzpicture}
        [remember picture,overlay]\node[opacity=0.05] at (current page.center) {\includegraphics[width=\paperwidth,height=\paperheight]{example-image}};
    \end{tikzpicture}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Here starts the poster
%%---------------------------------------------------------------------------
%% Format it to your taste with the options
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{poster}{
 % Show grid to help with alignment
 grid=false,
 columns=4,
 % Column spacing
 colspacing=0.7em,
 % Color style
 headerColorOne=black,
 headerColorTwo=blue,
 headerFontColor=white,
 borderColor=blue,
 boxColorOne=blue,
 % Format of textbox
 textborder=none,
 % Format of text header
 eyecatcher=true,
 headerborder=none,
 headershape=roundedright,
 headershade=shadeLR,
 headerfont=\Large\textsc,
 textfont={\setlength{\parindent}{1.5em}},
 boxshade=plain,
 background=user,
 headerheight=0.12\textheight
}
 % Eye Catcher
 {
   \includegraphics[width=.2\linewidth, trim=4.5mm 4.625mm 4.5mm 4.7mm, clip]{example-image}
 }
 % Title
 {\sc Title Of The Poster}
 % Authors
 {\bigskip John Doe$^{1}$\\
 \bigskip
 {\texttt{1 - Institution}}}
 % University logo
 {
  \includegraphics[width=.15\linewidth]{example-image}
 }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \headerbox{General aim}{name=Aim,column=0,row=0,span=2}{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

}

\end{poster}%
%
\end{document}
DaniCee
  • 2,217

1 Answers1

4

You have spurious spaces in your specification of the image. A newline is a space. Commenting the ends of the offending lines solves the problem.

Off-topic: \sc is long deprecated and ought not be used. Use \scshape or \textsc{}.

\documentclass[paperheight=36in,paperwidth=48in,fontscale=0.3]{baposter}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Beginning of Document
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

%:Background image
%%% Setting Background Image %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\background{%
    \begin{tikzpicture}
        [remember picture,overlay]\node[opacity=0.05] at (current page.center) {\includegraphics[width=\paperwidth,height=\paperheight]{example-image}};
    \end{tikzpicture}%
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Here starts the poster
%%---------------------------------------------------------------------------
%% Format it to your taste with the options
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{poster}{
 % Show grid to help with alignment
 grid=false,
 columns=4,
 % Column spacing
 colspacing=0.7em,
 % Color style
 headerColorOne=black,
 headerColorTwo=blue,
 headerFontColor=white,
 borderColor=blue,
 boxColorOne=blue,
 % Format of textbox
 textborder=none,
 % Format of text header
 eyecatcher=true,
 headerborder=none,
 headershape=roundedright,
 headershade=shadeLR,
 headerfont=\Large\scshape,
 textfont={\setlength{\parindent}{1.5em}},
 boxshade=plain,
 background=user,
 headerheight=0.12\textheight
}
 % Eye Catcher
 {
   \includegraphics[width=.2\linewidth, trim=4.5mm 4.625mm 4.5mm 4.7mm, clip]{example-image}
 }
 % Title
 {\scshape Title Of The Poster}
 % Authors
 {\bigskip John Doe$^{1}$\\
 \bigskip
 {\texttt{1 - Institution}}}
 % University logo
 {
  \includegraphics[width=.15\linewidth]{example-image}
 }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \headerbox{General aim}{name=Aim,column=0,row=0,span=2}{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

}

\end{poster}%
%
\end{document}
cfr
  • 198,882
  • I always forget about this, I'm still not clear of the function of % besides commenting text... – DaniCee Jun 23 '15 at 01:12
  • However, if I change \sc for \textsc or \scshape I get the warnings "LaTeX Font Warning: Font shape `T1/lmr/bx/sc' undefined" and "LaTeX Font Warning: Some font shapes were not available, defaults substituted" – DaniCee Jun 23 '15 at 01:49
  • I got the solution here http://tex.stackexchange.com/questions/22240/choosing-font-for-bold-small-caps-or-any-other-particular-familyseriesshape-c – DaniCee Jun 23 '15 at 06:28
  • @DaniCee The warnings are actually the font system of LaTeX 2e working as it should. With \sc (unless it is redefined somewhere), it won't even try to use bold small-caps, even if \sc is used in the scope of bold. (And there are various other oddities also.) A newline is a space. So putting % at the end of a line comments out that space. And that's what you need here. (And, yes, it is very, very easy to forget this or miss it!) – cfr Jun 23 '15 at 07:17