Graphics, Figures & TablesVertically center an image in landscape format

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Luftentfeuchter
Posts: 1
Joined: Tue Oct 07, 2014 6:20 pm

Vertically center an image in landscape format

Post by Luftentfeuchter »

Hello everyone!

I want to center an image vertically in landscape format.
Here's what I've got up to now:

Code: Select all

\documentclass[12pt]{scrartcl}
\usepackage{rotating}

\begin{document}
\thispagestyle{empty}

\begin{sidewaysfigure}
\centering
\includegraphics[width=\linewidth]{testimage}
\caption{caption of the image}
\label{Label1}
\end{sidewaysfigure}

\end{document}
But the distance to the top of the page is less than to the bottom margin.
Has anybody got an idea?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Vertically center an image in landscape format

Post by Stefan Kottwitz »

Hi,

welcome to the forum!

The image is vertically centered within the text body. To see it, add this line:

Code: Select all

\usepackage{showframe}
The bottom margin is just twice as big as the top margin, which is a good practice. This makes you think it is not centered. You would need to change the margins. But I assume, once your document contains more text, it looks better centered to the text body of the pages, not to the margins or the paper but shifted if seen next to the text.

Stefan

PS: I noticed your German name: you are very welcome to post on our German language partner site TeXwelt.de. We are also happy to see questions there.
LaTeX.org admin
Post Reply