Bernard Hurley wrote:

I am preparing LyX document and I want to insert a graphics file that
takes up precisely one page. Whatever I do I always seem to be left with
a small margin on the left hand side.  What can I do about this?

This isn't trivial, because you have to set the margins not for all pages. To get an overview of LaTeX's lengths, use the LateX-package "layout" as I did on the first page of the attached example file.


I added some code to the preamble to save the document wide lengths to be able to use them later in the document again. I defined two commands \fullimage and \resetimage for an easy switching between normal and fullpage margins.
These commands work always, if you use custom margins or not.


regards Uwe

p.s. I'll send you the image file in a separate email, because the list accepts only attachments <= 60 kB.
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass article
\begin_preamble
%define new lengths
\newlength{\myhoffset}
\newlength{\myvoffset}
\newlength{\myoddsidemargin}
\newlength{\myevensidemargin}
\newlength{\myheadsep}
\newlength{\myheadheight}
\newlength{\mytopmargin}

\newcommand{\fullimage}{

 % save the current margins
 \setlength{\myhoffset}{\hoffset}
 \setlength{\myvoffset}{\voffset}
 \setlength{\myoddsidemargin}{\oddsidemargin}
 \setlength{\myevensidemargin}{\evensidemargin}
 \setlength{\myheadsep}{\headsep}
 \setlength{\myheadheight}{\headheight}
 \setlength{\mytopmargin}{\topmargin}

 % outer margins are always \hoffset (\voffset) + 1 inch
 \setlength{\hoffset}{-1in}
 \setlength{\voffset}{-1in}
 % set margins of documentclasses to zero
 \setlength{\oddsidemargin}{0in}
 \setlength{\evensidemargin}{0in}
 \setlength{\headsep}{0in}
 \setlength{\headheight}{0in}
 \setlength{\topmargin}{0in}
}

\newcommand{\resetimage}{
 \setlength{\hoffset}{\myhoffset}
 \setlength{\voffset}{\myvoffset}
 \setlength{\oddsidemargin}{\myoddsidemargin}
 \setlength{\evensidemargin}{\myevensidemargin}
 \setlength{\headsep}{\myheadsep}
 \setlength{\headheight}{\myheadheight}
 \setlength{\topmargin}{\mytopmargin}
}

\usepackage{layout}
\end_preamble
\language ngerman
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize 12
\spacing single 
\papersize a4paper
\paperpackage a4
\use_geometry 1
\use_amsmath 1
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\leftmargin 2cm
\topmargin 5cm
\rightmargin 1cm
\bottommargin 3cm
\headheight 1cm
\headsep 1cm
\footskip 1cm
\secnumdepth 4
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language german
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle empty
\bullet 1
        1
        34
        -1
\end_bullet
\bullet 2
        2
        35
        -1
\end_bullet
\bullet 3
        2
        7
        -1
\end_bullet

\layout Standard
\pagebreak_bottom 

\begin_inset ERT
status Collapsed

\layout Standard

\backslash 
layout 
\end_inset 


\layout Standard
\pagebreak_bottom 

\begin_inset ERT
status Collapsed

\layout Standard

\backslash 
fullimage 
\end_inset 


\begin_inset Graphics
        filename Aralsee-Triptychon.jpg
        lyxscale 50
        width 100page%

\end_inset 


\layout Standard


\begin_inset ERT
status Collapsed

\layout Standard

\backslash 
resetimage 
\end_inset 


\layout Standard

hello
\the_end

Reply via email to