1

I got two cases with images I wish to use within a document.

One is a logo, I would like to use it in the front page, at the top-right corner.

How do I do that?

The second are a drawings which I would like it to be (horizontally) centralized, and in between the paragraphs I have placed it. Point is at the final result, figures are positioned sometimes a paragraph or two later.

How can I enforce them to be exactly where I want them?

8
  • 2
    For the second, see for example Keeping tables/figures close to where they are mentioned Commented Mar 17, 2012 at 18:07
  • 1
    Considering the logo, it is not really a "figure", just part of the title. You can place it in the environment \begin{center} ... \end{center} to make it centered. As for the real figures, follow the Torbjørn's link.
    – yo'
    Commented Mar 17, 2012 at 19:01
  • top-right not center. Commented Mar 17, 2012 at 20:37
  • 1
    @tohecz: You shouldn't use center for images. It is intended for text only. See Should I use center or centering for figures? and When should we use \begin{center} instead of \centering?. Commented Apr 14, 2012 at 16:15
  • @MartinScharrer As far as OP does not use \begin{figure}[h]\begin{center}..., but only \begin{center}, it gives better spacing than \centering. The thing is, images shouldn't be places just "between paragraphs" so he should of course say \begin{figure}[...]\centering...
    – yo'
    Commented Apr 14, 2012 at 19:32

1 Answer 1

2

The position of float environments are discussed very often here at tex stackexchange. Some related questions are:

Whatever I think the biggest problem is the understanding of \includegraphics. The command doesn't require a floating environment. It's a simple "token" inside TeX. So to place a picture in the top right corner you can use standard methods like \raggedright, \hfill etc. Maybe you can also use scrpage2 or fancyhdr. If you want to set a figure at a special place you can also use packages like textpos or atbegshi.


The great package adjustbox can handle the positioning very easy. You can simple use:

Load the package with the option export:

\usepackage[export]{adjustbox}

Then you can use \includegraphics as follows:

\includegraphics[<other options>,right=<optional width, normally \linewidth>]{<file name>}
1
  • 1
    You can right align an image by loading \usepackage[export]{adjustbox} and then using \includegraphics[<other options>,right=<optional width, normally \linewidth>]{<image file>}. Commented Apr 14, 2012 at 16:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .