Graphics, Figures & TablesVertical and horizontal centering of full size image

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

Vertical and horizontal centering of full size image

Post by Pintu »

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

Code: Select all

Code, edit and compile here:
\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}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Vertical and horizontal centering of full size image

Post by localghost »

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
Pintu
Posts: 4
Joined: Tue Nov 08, 2011 7:48 pm

Vertical and horizontal centering of full size image

Post by Pintu »

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
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Vertical and horizontal centering of full size image

Post by localghost »

Pintu wrote:[…] The image is a PDF […]
The pdfpages package could help here.
Pintu
Posts: 4
Joined: Tue Nov 08, 2011 7:48 pm

Re: Vertical and horizontal centering of full size image

Post by Pintu »

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.
User avatar
CDbile
Posts: 19
Joined: Mon Jan 31, 2011 6:48 pm

Vertical and horizontal centering of full size image

Post by CDbile »

Is this code:

Code: Select all

Code, edit and compile here:
\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}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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

Re: Vertical and horizontal centering of full size image

Post by Pintu »

No, that does not center the graph on the page, just within the text margins.
Post Reply