I want to make a book which has the following specifications for margins for odd and even pages.
How I can do this in letter paper?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI want to make a book which has the following specifications for margins for odd and even pages.
How I can do this in letter paper?
This uses geometry
to define the paper and set the average margins of each page. Then, the horizontal margins are offset for even and odd pages to get from the average to the target margin. For the vertical margins, I used Heiko's answer at Shift Odd Page in Duplex Print to shift the margin downward on odd pages.
\documentclass[twoside]{article}
% DEFINE PAPER
\usepackage[letterpaper, portrait]{geometry}
\usepackage{lipsum}
%SET AVERAGE MARGIN
\geometry{
left={3.25cm},
right={3.25cm},
top={3.5cm},
bottom={3cm},
}
%SHIFT HORIZONTAL MARGIN ON EVEN/ODD PAGES
\addtolength\oddsidemargin {0.75cm}
\addtolength\evensidemargin {-1.25cm}
%SHIFT VERTICAL MARGIN ON ODD PAGES, BASED ON HEIKO'S ANSWER:
%https://tex.stackexchange.com/questions/79688/shift-odd-page-in-duplex-print/79708#79708
\usepackage{atbegshi}
\AtBeginShipout{%
\ifodd\value{page}%
\edef\mytemp{%
\ht\AtBeginShipoutBox=\the\ht\AtBeginShipoutBox\relax
\dp\AtBeginShipoutBox=\the\dp\AtBeginShipoutBox\relax
}%
\sbox\AtBeginShipoutBox{%
\raisebox{-0.5cm}{\usebox\AtBeginShipoutBox}%
}%
\mytemp
\fi
}
\begin{document}
\lipsum[1-20]
\end{document}
\setlength\oddsidemargin {0.03in}\setlength\evensidemargin {-0.03in}
\oddsidemargin
and\evensidemargin
allow one to do... they shift the text on the page; they do not grow both margins by the specified amount.