tags:

views:

54

answers:

1

I have been trying to insert a letter-size figure, but either this is cut because of the margins definition of the document style (book), or its size is limited to the specified margins.

Below is the code with which I have managed to obtain the size of the figure:

...
\newenvironment{pagportada}{
\begin{list}{}{
\setlength{\hoffset}{-1in}
\setlength{\oddsidemargin}{0cm}
\setlength{\evensidemargin}{0cm}
\setlength{\leftmargin}{-1in}
\setlength{\rightmargin}{-1in}
\setlength{\textwidth}{14.3cm}
\setlength{\voffset}{-1in}
\setlength{\topmargin}{0.5cm}
\setlength{\headheight}{0pt}
\setlength{\topsep}{0pt}
\setlength{\headsep}{0pt}
\setlength{\topskip}{0pt}
\setlength{\footskip}{0pt}
\setlength{\textheight}{19.2cm}
%\setlength{\listparindent}{\parindent}
%\setlength{\itemindent}{\parindent}
%\setlength{\parsep}{\parskip}
}\item[]}
{\end{list}}

... and then call the environment to insert the figure as:

\begin{pagportada}
\includegraphics[width=\textwidth]{Portada}
\end{pagportada}
\newpage
A: 

If you are using LaTeX:

\usepackage{eso-pic}

The eso-pic package will help you put objects on the background of pages. This will not respect margins: which is your need.

To put an image, include the following code on your page:

% First page
...

\newpage
% Second page
\AddToShipoutPicture{
    \put(0,0){
        \parbox[b][\paperheight]{\paperwidth}{
            \vfill
            \centering
            \includegraphics[width=\paperwidth,height=\paperheight,
             keepaspectratio]{Portada}
            \vfill
         }
    }
}
\newpage

And the image is put at (0,0) page-coordinates and stretched (maintaining aspect ratio) onto the whole page, middle centred.

(not tested)

Pindatjuh
The code did work, thank you! However, it failed in exporting the corresponding PDF file when using the dvi2pdf command. Do you have any suggestion?
Eric ROSAS
Correfct; this method only works with pdftex directly for creating PDFs.
Pindatjuh