[OS X TeX] Several page layouts in the same document

Alan Munn amunn at gmx.com
Wed Jun 9 00:49:44 EDT 2010


On Jun 9, 2010, at 12:40 AM, Ewan Delanoy wrote:

> Victor Ivrii said :
> >So you need define matching page style
>
>
> To be more specific :
>
>   if I write
>
> \documentclass[a4paper]{article}
> \usepackage[margin=0in]{geometry}
> \usepackage{tikz}
>
> \begin{document}
> \noindent   \begin{tikzpicture}[x=1cm,y=1cm]
> \foreach \x in  
> {0,1.75,3.5,5.25,7,8.75,10.5,12.25,14,15.75,17.5,19.25,21}
>   {
>     \draw (\x ,0) -- (\x ,29.65);
>   };
> \foreach \y in  
> {0,2.47,4.94,7.41,9.88,12.35,14.83,17.3,19.77,22.24,24.71,27.18,29.65}
>   {
>     \draw (0, \y) -- (21, \y);
>   };
> \end{tikzpicture}
> \end{document}
>
>  I get a nice paving of the first page.
>
>  Now I want to do this without invoking \usepackage[margin=0in] 
> {geometry}

Did you actually try the solution I suggested?  You don't need  
pagestyles to do this, but you do need to *use* the geometry package:

\documentclass[a4paper]{article}
\usepackage{lipsum}
\usepackage{geometry} % set whatever regular margins you want as the  
geometry options
\usepackage{tikz}

\begin{document}
\newgeometry{margin=0in} % use this to temporarily change the margins
\noindent   \begin{tikzpicture}[x=1cm,y=1cm]
\foreach \x in  
{0,1.75,3.5,5.25,7,8.75,10.5,12.25,14,15.75,17.5,19.25,21}
   {
     \draw (\x ,0) -- (\x ,29.65);
   };
\foreach \y in  
{0,2.47,4.94,7.41,9.88,12.35,14.83,17.3,19.77,22.24,24.71,27.18,29.65}
   {
     \draw (0, \y) -- (21, \y);
   };
\end{tikzpicture}
\restoregeometry % use this to go back to the regular margins
\lipsum[1-2] % just to demonstrate that it works
\end{document}

Alan

-- 
Alan Munn
amunn at gmx.com







More information about the MacOSX-TeX mailing list