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 tried to solve this with tables, but the alignment didn't turn out good. And because I am very confused, if I should even use a table aproach or a minipage or a tabspace, I wondered, if someone could enlighten me, based on a specific demo.

This should be a regular task for anybody who has to create corporate or other official documents - creating a headline with logos and text, like here:

enter image description here

But how to accomplish this in Latex - the best way possible?

There are some requirements, like:

  • has to span over entire page
  • individual vertical and horizontal alignment is possible

These are some of my attemps, which did not work out:

With tables:

\documentclass[
    pdftex,
    a4paper,
    11pt,
    DIV15,
    BCOR20mm,
    parskip,
    numbers=noenddot]{scrbook}
    \usepackage{graphics} 
    \usepackage[pdftex]{graphicx}

\begin{document}
    \noindent\begin{tabular*}{\columnwidth}{@{\extracolsep{\stretch{1}}}*{2}{l}@{}}
        \includegraphics[scale=0.5]{left_demo.png} & \includegraphics[height=45px]{right_demo.png} \\
    \end{tabular*}
\end{document}

With minipage:

\documentclass[
pdftex,
a4paper,
11pt,
DIV15,
BCOR20mm,
parskip,
numbers=noenddot]{scrbook}
\usepackage{graphics} 
\usepackage[pdftex]{graphicx}

\begin{document}
    \begin{figure}[h]
        \begin{minipage}[b]{25mm}
            \includegraphics[width=25mm,clip]{left_demo.png}
        \end{minipage}
        \begin{minipage}[b]{12 cm}
            {\sffamily              
                somedemo txt abcdefghij,\\
                texttextte txt texttexttextetscter\\
                demodemode demodemode\\
            }
        \end{minipage}
    \end{figure}
\end{document}

These are the demo-pictures I used:

enter image description here enter image description here enter image description here

share|improve this question

2 Answers 2

Thanks @DavidCarlisle. Based on your post and after I read some other about raisebox and parbox, I camed up with this solution, which fits my need quite good for now.

\documentclass[
    pdftex,
    a4paper,
    11pt,
    DIV15,
    BCOR20mm,
    parskip,
    numbers=noenddot]{scrbook}
    \usepackage{graphics} 
    \usepackage[pdftex]{graphicx}

\begin{document}
    \noindent
    \textsf{
    \begin{singlespace}
        \raisebox{-0.5\height}{\rlap{\includegraphics[scale=0.5]{images/left_demo.png}}}
        \hfill
        %\includegraphics[height=60px]{center_demo.png}
        %\hfill
        \raisebox{-0.15\height}{\llap{
        \scriptsize %
        \begin{tabular}[c]{@{}r@{}}
              somedemo txt abcdefghij,\\
              texttextte txt texttexttextetscter\\
              demodemode demodemode
        \end{tabular}}}
        \raisebox{-0.525\height}{\includegraphics[height=45px]{right_demo.png}}
    \end{singlespace}}
\end{document}
share|improve this answer

enter image description here

I scaled to make them all the same height, also the centre one is centred in the text area not centred between the two images (remove the \rlap and \llap if you want the latter).:

\documentclass{article}

\usepackage{graphicx}

\begin{document}

\noindent
\rlap{\includegraphics[height=1cm]{left_demo.png}}
\hfill
\includegraphics[height=1cm]{center_demo.png}
\hfill
\llap{%
\scriptsize
\begin{tabular}[b]{@{}l@{}}             
                somedemo txt abcdefghij,\\
                texttextte txt texttexttextetscter\\
                demodemode demodemode
\end{tabular}%
\includegraphics[height=1cm]{right_demo.png}}

\noindent X=\dotfill text \dotfill X

\noindent X=\dotfill text \dotfill X


\end{document}
share|improve this answer
    
ok that is very much nicer, then what I had until now, but would you please explain some parts? Why use tabular only for the text? would it be possible to adjust the images vertically, without scaling to the same heigth? As you can see, the actual logo in the left image is sourrounded by white(grey)space, I cannot change that, due to corporate instructions, so I would have to use eighter replicate this space to all the images or I would have to adjust their vertical position - the latter is what interests me. Any ideas?! –  Jook Oct 4 '12 at 12:43
    
sorry I didn't see this comment, must have missed the alert for some reason. But I see you have found raisebox now. Feel free to accept your own answer which will mark this question as done. –  David Carlisle Oct 5 '12 at 8:57

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.