2

I am using the following code:

\documentclass[12pt, a4paper, pdftex]{article}

\usepackage{graphicx, color}

\usepackage[utf8]{inputenc}

\usepackage{indentfirst}

\usepackage [bottom=2cm, top=3cm, left=3cm, right=2cm]{geometry}

\usepackage{pgf,tikz}

\usepackage{epstopdf}

\usepackage[justification=centering]{caption}

\pagestyle{headings}

\begin{document}

\input{./Title.tex}

\newgeometry{left=0cm, right=0cm, top=0cm, bottom=0cm}

\includegraphics[angle=-0.87]{Folha_de_rosto}

\restoregeometry

\tableofcontents

\newpage
\end{document}

When I compile the file, an empty page is created between the title and the image inserted with \includegraphics. When I don't use \newgeometry, it doesn't happen. The image that I want to use has the size of a whole page. So, when I try to include the image without changing the margins, it is displaced and a part of it is cut out, because it's out of the page. I don't know any other way to correct this displacement. Does anyone kwon why it is happening? Is there any other way to correct the displacement of the image besides changing margins?

  • Welcome to TeX.SX! Please post full documents, not documents ending halfway down to the end... and \newgeometry does the \clearpage, since the page parameters change completely. Do you really need a new page geometry after the page title? –  May 10 '15 at 17:56
  • 1
    Since the titlepage is something relatively static, you can do that as an extra document and include the page using \includepdf. – Johannes_B May 10 '15 at 17:59
  • If those are the correct parameters for the title page, issue the \newgeometry before \input{Title}. But it is hard to think of a case where this would be truly necessary. Since we don't know what is wrong with the image's displacement, the second question isn't really answerable. – cfr May 10 '15 at 18:20
  • I can't think of any reason why you'd ever need a \newgeometry/\restoregeometry around an \includegraphics – David Carlisle May 10 '15 at 18:59
  • What happens is that the image that I want to use has the size of a whole page. So, when I try to include the image without changing the margins, it is displaced and a part of it is cut out, because it's out of the page. I don't know any other way to correct this displacement, so I would be really grateful if someone would tell me one. – Willian Bicaio May 10 '15 at 19:38
  • @WillianBicaio -- include the information about the size of the image in your question. that would avoid some of the questions raised in the comments. – barbara beeton May 10 '15 at 19:49
  • @WillianBicaio: Usually, whole pages are included with \includepdf (from the pdfpages package), not with \includegraphics. In this case, I'm a bit confused by the very small rotation angle, that makes your intentions unclear. – GuM May 10 '15 at 21:29
  • See also http://tex.stackexchange.com/questions/239786/landscape-a3-page-in-portrait-a4-document-adds-a-blank-page-or-reorients-previ/239867#239867 – John Kormylo May 10 '15 at 23:02
  • There are several ways to include a picture in the background of a page, package eso-pic, tikz, texpos, scrlayer-scrpage ... – Johannes_B May 11 '15 at 09:44

0 Answers0