# Customizing \maketitle output with \minipage's inside \titlehead => Alignment problems

I am trying to customize the title of my scrreprt class document.

The \titlehead looks like this (basically, three 'columns' created with three instances of \minipage):

  \titlehead{

\large

\begin{minipage}[t]{0.3\textwidth}
\includegraphics[width=0.9\textwidth]{logo}
\end{minipage}
%
\begin{minipage}[t]{0.4\textwidth}
\begin{center}
Foo \\
Bar \\
Baz
\end{center}
\end{minipage}
%
\begin{minipage}[t]{0.2\textwidth}
\begin{flushright}
Fubar
\end{flushright}
\end{minipage}
}


I have two problems:

1. I want the top of the logo, to align with the top of the text in the other two minipages. I used the [t] option of \minipage to achieve this. But while the two textual minipages line up properly, the image doesn't. It gets rendered much higher than the text. I assume this is because \includegraphics is not text and so, the [t] option is meaningless for the first minipage. So what should I be doing to set this right?

2. I expected the total widths of the minipages to add up to \textwidth. But if I set the third minipage to 0.3\textwidth (so that the total width adds up to whole), PDFLaTeX decides to push my third minipage down because apparently the three of them side-by-side are too wide. Is there some way I can cleanly fix this? e.g. like, making the third \minipage fill the available horizontal space? If so, how?

-
i won't tackle the alignment, but the width problem might be solved by placing a % immediately after the first two instances of \end{minipage}. another approach, decidedly plain, not latex, is to insert \hss in those same locations, setting \parfillskip=0pt locally, and ending the \titlehead argument with \par. –  barbara beeton Nov 28 '12 at 19:01
Thanks @barbarabeeton! I had forgotten that those newlines count for white space as well. –  ArjunShankar Nov 29 '12 at 11:11

You can use the adjustbox package:

\documentclass{report}
\usepackage[pass,showframe]{geometry}
\usepackage[demo]{graphicx}
\begin{document}

\noindent
\includegraphics[width=0.27\textwidth]{logo}}%
\begin{minipage}[t]{0.4\textwidth}
\centering
Foo \\
Bar \\
Baz
\end{minipage}%
\begin{minipage}[t]{0.3\textwidth}
\raggedleft
Fubar
\end{minipage}

\end{document}


Notice how the end of lines are masked so they don't count as a space.

The demo option to graphicx and the geometry package are just to show the example (they provide a mock image and the frame respectively).

-