## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Vertical and horizontal centering of full size image

Information and discussion about graphics, figures & tables in LaTeX documents.
Pintu
Posts: 4
Joined: Tue Nov 08, 2011 7:48 pm

### Vertical and horizontal centering of full size image

Hi,

Thanks to this Forum I have solved a whole bunch of problems, but I am unable to do one thing: I need to place a large figure on a page, nothing else. Because the Figure is larger then the text area I want to center it horizontally and vertically.

Here is an example how I've trying to achieve this. It is quite ugly and I don't think that the figure vertical center is perfect. Because I am using this command very often I am looking for something easier.

Thanks,
Pintu

\documentclass[final,11pt,paper=a4]{scrartcl} \usepackage[utf8]{inputenc}\usepackage[T1]{fontenc}\usepackage{lmodern}\usepackage{mathtools}\usepackage{floatpag} % for figures allowing to overlap page numbers	\floatpagestyle{plain}	\rotfloatpagestyle{plain} \usepackage[labelfont=bf,hang,singlelinecheck=false]{caption}	\setlength{\captionmargin}{20pt}	\captionsetup{justification=justified} \usepackage{geometry}  	\geometry{  		centering,		footskip=35pt,  		textheight=670pt,   		footnotesep=24pt plus 2pt minus 12pt,  		} \begin{document} 	\begin{table}[c]		\begin{minipage}[c][\textheight]{\textwidth}		\thisfloatpagestyle{empty}			\caption{Full Size Table} 			\centerline{				\includegraphics[angle=90]{table}}				\label{table}		\end{minipage}	\end{table} \end{document}

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
I have two questions.

• Which file format has the image file?
• Is the table so complex that you can't do it in LaTeX?

Best regards and welcome to the board
Thorsten
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

Pintu
Posts: 4
Joined: Tue Nov 08, 2011 7:48 pm
Hi,

The image is a PDF

I have dozens of tables as vector graphics, converting them to tex would be a lot of work. But anyway, I require this for figures as well.

Thanks,
Pintu

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
Pintu wrote:[…] The image is a PDF […]

The pdfpages package could help here.
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

Pintu
Posts: 4
Joined: Tue Nov 08, 2011 7:48 pm
pdfpages is not really an option, as I need page numbers on some pages where the figure does not overlap, but I require the figure to be vertically and horizontally centered.

CDbile
Posts: 19
Joined: Mon Jan 31, 2011 6:48 pm
Is this code:

\documentclass{article}\usepackage{graphicx}\usepackage{lipsum} \begin{document} \lipsum[1-2] \begin{figure}[p]\centering\vfill\caption{Full Size Table}\includegraphics[angle=90]{img}\vfill\end{figure} \lipsum[1-2] \end{document}

the code that you are looking for?
(note that the package lipsum is only used to produce dummy text and is not part of the solution)
CDbile

Pintu
Posts: 4
Joined: Tue Nov 08, 2011 7:48 pm
No, that does not center the graph on the page, just within the text margins.