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 try add a figure in the titlepage

\begin{titlepage}
    \begin{center}
        \begin{figure}[h]
                \includegraphics[scale=0.15]{images/logo.jpg}
        \end{figure}                                                                                                                        
        Univ...\\
        fac ... 
    \end{center}
    \begin{center}
        {\large Title}\\
    \end{center}
\end{titlepage}

but text [univ...] is down of figure

the idea is get some similar to this

[figure][univ ...]

[title]
share|improve this question
    
Have a look at How to align picture top left in a table?. –  Martin Scharrer Nov 7 '11 at 15:36
add comment

2 Answers 2

up vote 4 down vote accepted

Don't use a figure but only \includegraphics:

\begin{titlepage}
  \raisebox{\dimexpr\ht\strutbox-\height\relax}{\includegraphics[width=.2\linewidth]{images/logo}}\hfill
  \begin{minipage}[t]{.79\linewidth}
    Univers\dots
  \end{minipage}
  \vskip 2\baselineskip
  {\Large Titel\par}
\end{titlepage}

Here, if top aligned the text and the image, because using multi line text this is common and mostly asked. If you want the text beside the image be vertical centered to the image, you may use one more minipage and adjustes vertical alignment options:

\documentclass{article}
\usepackage[demo]{graphicx}% remove option demo if you have images/logo

\begin{document}
\begin{titlepage}
  \begin{minipage}[c]{.2\linewidth}
    \includegraphics[width=\linewidth]{images/logo}
  \end{minipage}\hfill
  \begin{minipage}[c]{.7\linewidth}
    Univers\dots\\
    at somewhere\\
    under controll of someone
  \end{minipage}

  \vspace{2\baselineskip}
  \begin{center}
    \Large Titel
  \end{center}
\end{titlepage}

\end{document}

Here I've used a horizontal centered title, to show more alternatives.

Alternative you may simply change vertikal alignment of images changing the first argument of \raisebox and the alignment option of the minipage with the text.

Another solution would be to use package adjustbox to add the vertical alignment option valign to the \includegraphics options. See the excellent manual of package adjustbox for more information. Some lines below you may even find an example of using the package.

One more alternative: If you are using a KOMA-Script class like scrartcl, it's very easy to do it, using \titlehead:

\documentclass{scrartcl}
\usepackage[demo]{graphicx}% remove option demo if you have images/logo
\begin{document}
\titlehead{%
  \raisebox{\dimexpr\ht\strutbox-\height\relax}{\includegraphics[width=.2\linewidth]{images/logo}}\hfill
  \begin{minipage}[t]{.78\linewidth}\raggedright
    Univers\dots\\
    at here\\
    with there
  \end{minipage}
}
\title{Title}
\author{Author}
\maketitle
\end{document}

And if you don't use a KOMA-Script class but like that title, you may install package titlepage (link destination in German!).

The \raisebox in these examples is used to move the baseline of the graphics from the bottom to almost the top of the graphics. An alternative solution for this would be using package adjustbox and add option valign=t to \includegraphics, if your adjustbox is up to date:

\documentclass{scrartcl}
\usepackage[demo]{graphicx}% remove option demo if you have images/logo
\usepackage[export]{adjustbox}
\begin{document}
\titlehead{%
  \includegraphics[width=.2\linewidth,valign=t]{images/logo}\hfill
  \begin{minipage}[t]{.78\linewidth}\raggedright
    Univers\dots\\
    at here\\
    with there
  \end{minipage}
}
\title{Title}
\author{Author}
\maketitle
\end{document}

If you want the titles of the KOMA-Script classes with, e.g., a standard class and installation of package titlepage is to difficult, you may try package scrextend. This package is part of KOMA-Script, which may be installed via package manager of almost every TeX distribution and often is already installed.

Here's the example above with standard class article but KOMA-Script title:

\documentclass{article}
\usepackage[extendedfeature=title]{scrextend}
\usepackage[demo]{graphicx}% remove option demo if you have images/logo

\begin{document}
\titlehead{%
  \begin{minipage}[c]{.2\linewidth}
    \includegraphics[width=\linewidth]{images/logo}
  \end{minipage}\hfill
  \begin{minipage}[c]{.7\linewidth}
    Univers\dots\\
    at somewhere\\
    under controll of someone
  \end{minipage}
}
\title{Title}
\author{Author}
\maketitle

\end{document}

To show one more alternative, I've changed the vertical alignment of image text beside the image:

Visualization of the example of Standard class with KOMA-Script title

share|improve this answer
2  
You can do it simpler: \usepackage[export]{adjustbox} and then \includegraphics[width=.2\linewidth,valign=t]{images/logo}. –  Martin Scharrer Nov 7 '11 at 15:35
    
Simpler? Other. –  Schweinebacke Nov 7 '11 at 15:55
    
Well, you save yourself a \raisebox and a calculation. valign=t does basically the exact same thing as the \raisebox you have it. –  Martin Scharrer Nov 7 '11 at 16:32
    
Yes, but what's simpler? To install the newest release of a package and remember it with all it's options or to use a well known LaTeX kernel macro? Never the less: I've voted for your comment, added your suggestion already to my answer and updated TeX Live at my (very old and slow) notebook. –  Schweinebacke Nov 7 '11 at 17:02
1  
It's simpler when you already have it installed and know about it :-) I wasn't saying your original code is bad or anything, or that you had to edit it. I just wanted to point out that there is a simpler solution for it now. Many beginners won't know about \raisebox or how to exactly calculate the correct shift. Using a package which provides a simple key for that is in fact simpler. That's all. –  Martin Scharrer Nov 7 '11 at 17:24
show 7 more comments

I solved with \vspace

\begin{titlepage}
    \includegraphics[scale=0.15]{images/logo.jpg}    
    \vspace{-2cm}
    \begin{center}
        Univer...\\
        fac ...
    \end{center}
    \vspace{4cm}                                                                                                                            
    \begin{center}
        {\large Title}\\
    \end{center}
\end{titlepage}
share|improve this answer
    
That's not a real solution but a very ugly hack, because figures may float. But you don't need a float and you should not use it at this place. –  Schweinebacke Nov 7 '11 at 15:54
1  
You don't need to and should not use figure here. You can use \includegraphics directly. –  Martin Scharrer Nov 7 '11 at 16:33
    
@MartinScharrer if I don't use figure the image is centered –  JuanPablo Nov 7 '11 at 17:01
    
If you don't want it to be centered, why do you use the center environment here? –  Axel Sommerfeldt Nov 7 '11 at 17:10
    
@AxelSommerfeldt ok, I deleted center –  JuanPablo Nov 7 '11 at 17:16
show 1 more comment

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.