How to force an image to be centered?

by Jan Pisl   Last Updated January 14, 2018 03:23 AM

I cannot make an image to be centered no matter what I do. I have searched through similar questions but did not find any useful answers for this case.

I get this when compiling even though the image itself is perfectly centered.

This is the command I use (I am using a template file)

    {\sffamily\centering }

I am using TeXmaker.

Answers 2

By all means, do get rid of the \stranka "wrapper" and use the following code instead:

\includegraphics[width=\linewidth, height=\textheight,

Encasing the graphic in a figure environment and using the p placement specifier ensures that it'll be placed on a page by itself. (Incidentally, absent further information, I can see no good reason for running \thispagestyle{empty}.)

January 14, 2018 02:51 AM

To centre an image that is larger than the textwidth, write

Will Robertson
Will Robertson
January 14, 2018 03:17 AM

Related Questions

Arrange multiple TikZ pictures

Updated July 31, 2015 13:10 PM

Printing A4 image in A5 document

Updated September 30, 2018 21:23 PM

Trouble with Inserting Graphic

Updated September 28, 2017 05:23 AM