Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm making a poster (a2 size) where I use an image for background. However, I need to add a logo, which has a white background, to the top left corner..

\documentclass{beamer}
\usepackage[size=a2, orientation=landscape]{beamerposter}

\setbeamercolor{separation line}{bg=black}

% ----------- Global Background -------------
\usebackgroundtemplate%
{%
    \includegraphics[width=\paperwidth,height=\paperheight]{background_image}%
}

% ----------------- Headline ------------------
\setbeamertemplate{headline}{

\begin{columns}
\begin{column}{0.2\textwidth}
% ############ This is the column I want a white background for #################
\usebackgroundtemplate{bg=white}
\begin{beamercolorbox}{headline}
    \centering \includegraphics{logo}
\end{beamercolorbox}
\end{column}
\vline
\begin{column}{0.6\textwidth}
\begin{beamercolorbox}[wd=.6\paperwidth]{headline}
                                \centering
        \vskip2ex
        \usebeamercolor{title in headline}{\color{fg}\textbf{\LARGE{\inserttitle}}\\[1ex]}
        \usebeamercolor{author in headline}{\color{fg}\large{\insertauthor}\\[1ex]}
        \usebeamercolor{institute in headline}{\color{fg}\large{\insertinstitute}\\[1ex]}
\end{beamercolorbox}
\end{column}

% This column is just to make the title column centered... Let me know if you have  a better solution
\begin{column}{0.2\textwidth}

\end{column}
\end{columns}

\begin{beamercolorbox}[wd=\paperwidth]{lower separation line head}
    \rule{0pt}{2pt}
\end{beamercolorbox}
}

\title{Title}
\author{Author}
\institute{institute}


\begin{document}
This is some text
\end{document}

I would like the upper left corner to have a white background, while the rest has background_image as background. Is there a way to do this?

If there is a better way to get the title etc. centered without the rightmost column in the header I would be thankful for advice on that as well.

Use (for example) http://en.wikipedia.org/wiki/File:Chiswick_Lion.png as "logo" and http://en.wikipedia.org/wiki/File:KA-Tapete-Beerdigung05.JPG as "background_image" to illustrate the problem.


Lame half-way solution:

Declare

\setbeamercolor{headline}{bg=white}
\setbeamercolor*{example header}{fg=black}

Change type of the first two columns to "example header" and move the image to the rightmost column (the previously empty one).

\setbeamertemplate{headline}{
\begin{columns}
\begin{column}{0.2\textwidth}
\begin{beamercolorbox}[wd=0.2\paperwidth]{example header}

\end{beamercolorbox}
\end{column}

\begin{column}{0.6\textwidth}
\begin{beamercolorbox}[wd=.6\paperwidth]{example header}
                                \centering
        \vskip2ex
        \usebeamercolor{title in headline}{\color{fg}\textbf{\LARGE{\inserttitle}}\\[1ex]}
        \usebeamercolor{author in headline}{\color{fg}\large{\insertauthor}\\[1ex]}
        \usebeamercolor{institute in headline}{\color{fg}\large{\insertinstitute}\\[1ex]}
\end{beamercolorbox}
\end{column}
\vline
\begin{column}{0.2\textwidth}
\begin{beamercolorbox}[wd=0.2\paperwidth]{headline}
    \vfill
    \centering
    \includegraphics[scale=1]{logo}
    \vfill
    \end{beamercolorbox}
\end{column}
\end{columns}

\begin{beamercolorbox}[wd=\paperwidth]{lower separation line head}
    \rule{0pt}{2pt}
\end{beamercolorbox}
}

And tadaa... logo now on the right instead, which I don't like, but with white background, which I do like.. There seems to be some space that can't be filled otherwise before a \vline.

Also note that you might have to scale the picture, depending on its size.

If someone smart figures out a nice way to do this, please let me know.


Final edit, one year and three months after (random rediscovery update for completeness' sake). I didn't actually solve my initial problem, so this is in case anyone would want to try to do the same, all the time knowing it's not going to end up looking great;

I ended up discarding my original intention and made something much nicer with the logo centered in a footer (on a solid background, so it's possible I managed to do it this way with the headline and realising how horrible it looked). The poster actually ended up looking good. The footer looked like this:

\setbeamertemplate{footline}{
    \leavevmode
        \hbox{

            \begin{beamercolorbox}[wd=.333\paperwidth,ht=2.5cm,leftskip=1cm,rightskip=1cm,center]{footline}
                \insertinstitute\hspace*{2em}
                \vspace{.8cm}
            \end{beamercolorbox}

            \begin{beamercolorbox}[wd=.333\paperwidth,ht=2.5cm,leftskip=1cm,rightskip=1cm,center]{footline}%
                \includegraphics[scale=1]{logo}
                \vskip.5ex
            \end{beamercolorbox}

            \begin{beamercolorbox}[wd=.333\paperwidth,ht=2.5cm,leftskip=1cm,rightskip=1cm,center]{footline}
                \insertfooter\hspace*{2em}
                \vspace{.8cm}
            \end{beamercolorbox}

        }
}

and was part of a custom theme I wrote (create as .sty file with declaration \ProvidesPackage{theme_name} and include in the .tex with \usetheme{theme_name}) which made it much easier to tweak and maintain, since all the design was in there (somewhat analogous of a CSS file for an HTML document).

The use of \insertinstitute on one side and \insertfooter on the other may seem strange, but just the fact that it says "institute" or "footer" doesn't mean you can't use them for something more useful (which I did)!

share|improve this question
    
Always use an image that is available to the community (either via a link, or by using images from the mwe package, available by default as example-image-X where X is a, b, or c). –  Werner Feb 3 '13 at 2:24
    
Oh, sorry! Since the logo isn't publicly available, use (for example) en.wikipedia.org/wiki/File:KA-Tapete-Beerdigung05.JPG as background and en.wikipedia.org/wiki/File:Chiswick_Lion.png as logo. This illustrates the problem with the white logo background and the global "wallpaper" background. –  Jørgen Feb 3 '13 at 2:38
    
Thanks @Werner for pointing out the mwe package. –  erik Apr 9 '13 at 6:25

1 Answer 1

up vote 2 down vote accepted

Based on your "half-way" solution, putting the logo column first moves the logo to the left side, like you wanted. Also, placing \vline inside the column environment eliminates the space before the line. It may not be elegant, but hopefully this is what you had in mind. Note that with this approach the height of the logo determines the height of the headline.

\documentclass{beamer}
\usepackage[size=a2, orientation=landscape]{beamerposter}
\usepackage{mwe}
\setbeamercolor{separation line}{bg=black}
\setbeamercolor{headline}{bg=white}
\setbeamercolor*{example header}{fg=black}

% ----------- Global Background -------------
\usebackgroundtemplate{%
    \includegraphics[width=\paperwidth,height=\paperheight]{example-image}%
}

% ----------------- Headline ------------------
\setbeamertemplate{headline}{%
\begin{columns}
\begin{column}{0.2\paperwidth}
\begin{beamercolorbox}[wd=0.99\linewidth]{headline}
    \vfill
    \centering
    \includegraphics[height=9cm]{example-image-golden-upright}
    \vfill
    \end{beamercolorbox}
\vline
\end{column}%

\begin{column}{0.6\textwidth}
\begin{beamercolorbox}[wd=.6\paperwidth]{example header}
    \centering
    \usebeamercolor{title in headline}{\color{fg}\textbf{\Huge{\inserttitle}\\[1ex]}}
    \usebeamercolor{author in headline}{\color{fg}{\huge{\insertauthor}\\[1ex]}}
    \usebeamercolor{institute in headline}{\color{fg}{\LARGE{\insertinstitute}\\[1ex]}}
\end{beamercolorbox}
\end{column}

\begin{column}{0.2\textwidth}
\begin{beamercolorbox}[wd=0.2\paperwidth]{example header}
\end{beamercolorbox}
\end{column}
\end{columns}

\begin{beamercolorbox}[wd=\paperwidth]{lower separation line head}
    \rule{0pt}{2pt}
\end{beamercolorbox}
}
\title{Title}
\author{Author}
\institute{Institute}

\begin{document}
This is some text.
\end{document}
share|improve this answer
    
As you may or may not have guessed, I finished the poster a couple of days after asking the question, never to return... until now! I suppose something along those lines was what I originally had in mind. I can't actually remember, but from what I can see here and now, it seems to be an answer, so I'll mark it as such. –  Jørgen May 5 at 8:57
    
Uhm, unintentional enter. Perfectionist me wasn't happy with whatever I managed to hack together, so I changed the layout and made a transparent background on the image, then made it white and inserted a footer which ended up looking good. I'll put that in the OP just for reference purposes, should some other unfortunate soul end up on a similarly bad design decision in the future. ;p –  Jørgen May 5 at 9:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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