# Align Text in Footline

I am new to LaTeX - Beamer. I am trying to create a template, and am almost done. However, there I am unable to align the text in the footline.

If i play around with the hspace vspace it increases the width of the footline which is something i do not desire. I was wondering if there was a way to vertically align the text in the footline to be in the center of the bar.

\newlength\barwidth
\setlength\barwidth{24pt} % width of bars set here
\setbeamercolor*{footline}{fg=orange,bg=black}
\setbeamertemplate{footline}{%  \begin{beamercolorbox}[sep=2pt,left]{footline}%
\includegraphics[width=\barwidth,height=\barwidth]{img/GGLogo.png}
~\hfill \fontsize{12}{14}\selectfont%
usebeamercolor[fg]{footline}\hspace{0em}\vspace{0em}\textbf\inserttitle%
\end{beamercolorbox} }

• You could use something like \parbox[c][<height>]{<width>}{\mbox{}\vfill<contents>\vfill} – Skillmon likes topanswers.xyz Oct 28 '17 at 16:55
• @Skillmon Thanks, while this does work. It does not align the text vertically to the image. – Aly Abdelaziz Oct 28 '17 at 19:54
• Do the same with the image. – Skillmon likes topanswers.xyz Oct 28 '17 at 19:55
• @Skillmon Thanks. And adding '\centering' brought it to center align in the box. If you post it as an answer. I think i can accept it due to my reputation – Aly Abdelaziz Oct 28 '17 at 20:19

Putting my comments into an answer (and shamelessly stealing the MWE from @samcarter; thanks for that)

\documentclass{beamer}

\newlength\barwidth
\setlength\barwidth{24pt} % width of bars set here
\setbeamercolor*{footline}{fg=orange,bg=black}

\setbeamertemplate{footline}{%
\begin{beamercolorbox}[wd=\paperwidth,sep=2pt]{footline}%
\parbox[c]{0pt}{\makebox[0pt][l]{% doesn't use any horizontal space
\includegraphics[height=\barwidth,width=\barwidth]{example-image}%
}}%
\hspace{0.1\textwidth}%
\parbox[c]{0.8\textwidth}{%
\centering%
}%
\hspace{0.1\textwidth}%
\end{beamercolorbox}%
}

\title{text}

\begin{document}

\begin{frame}

\end{frame}

\title{This is longer title, which might take up too much space}
\begin{frame}

\end{frame}

\end{document}


\documentclass{beamer}

\newlength\barwidth
\setlength\barwidth{24pt} % width of bars set here
\setbeamercolor*{footline}{fg=orange,bg=black}

\setbeamertemplate{footline}{%
\begin{beamercolorbox}[wd=\paperwidth,sep=2pt]{footline}%
\includegraphics[align=c, height=\barwidth]{example-image}%
\hfill%
\inserttitle\hfill\kern1em%
\end{beamercolorbox}%
}

\usepackage{graphbox}

\title{text}

\begin{document}

\begin{frame}

\end{frame}

\end{document}


• @samcater Thank you for that. However, as stated in my question, i am looking to align the text in the center of the black bar. and be center aligned with the image. – Aly Abdelaziz Oct 28 '17 at 19:53
• @AlyAbdelaziz I am not sure I understand you comment. Are you looking for horizontal alignment? Then add a \hfill after \inserttitle – samcarter_is_at_topanswers.xyz Oct 28 '17 at 20:52
• @samcarter I think he was asking for both, vertical and horizontal alignment. – Skillmon likes topanswers.xyz Oct 28 '17 at 21:01
• @Skillmon I don't see any indication of this in the question, but probably your assumption is reasonable. Thanks! – samcarter_is_at_topanswers.xyz Oct 28 '17 at 21:08
• @samcarter me neither, but his comments and the question combined indicate it. – Skillmon likes topanswers.xyz Oct 28 '17 at 21:43