[OS X TeX] Several page layouts in the same document
Alain Matthes
alain.matthes at mac.com
Wed Jun 9 02:28:53 EDT 2010
Le 9 juin 2010 à 06:49, Alan Munn a écrit :
>
> \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}
hi
You can use 0,1.75,...,21}
\documentclass[a4paper]{article}
\usepackage{lipsum}
\usepackage{geometry}
\usepackage{tikz}
\begin{document}
\newgeometry{margin=0in}
\noindent \begin{tikzpicture}[x=1cm,y=1cm]
\foreach \x in {0,1.75,...,21}
{
\draw (\x ,0) -- (\x ,29.65);
};
\foreach \y in {0,2.47,...,29.65}
{
\draw (0, \y) -- (21, \y);
};
\end{tikzpicture}
\restoregeometry
\lipsum[1-2] % just to demonstrate that it works
\end{document}
and better : \draw[xstep=1.75cm,ystep=2.47,gray!50] (0,0) grid (21,29.65);
\documentclass[a4paper]{article}
\usepackage{lipsum}
\usepackage{geometry}
\usepackage{tikz}
\begin{document}
\newgeometry{margin=0in} % use this to temporarily change the margins
\noindent \begin{tikzpicture}[x=1cm,y=1cm]
\draw[xstep=1.75cm,ystep=2.47,gray!50] (0,0) grid (21,29.65);
\end{tikzpicture}
\restoregeometry
\lipsum[1-2] % just to demonstrate that it works
\end{document}
You can use changepage.sty to modify mid-layout but geometry is perfect
To change the first page and add a grid on the first page, you can also use
eso-pic.
Best Regards
Alain Matthes
More information about the MacOSX-TeX
mailing list