[Tex/LaTex] Image (figure) positioning

floatspositioning

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?

Best Answer

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>}
Related Question