# The default value of the oddsidemargin

When I use the grid behind the text I see on my first page the distance between the left side of the page and the left margin of the text is around 1.5 inch.

When I use the layout package and the \layout command I see the distance between the left side of the page and the left margin of the text is \oddsidemargin+ one inch+ \hoffset=35pt+1 inch which is around the same measured value 1.5 inch.

So far everything looks fine. But I am surprised why the default value of the oddsidemargin is 18.06749pt on the page 13 of the Layout package instead of 35pt we see as a result of \layout command below.

The other surprising point is in the \LaTeXe: An Unofficial Reference Manual, page 26, the oddsidemargin is 40% of the difference between the paper width (8.5 inch) and the textwidth (around 4.5 inch) which is 1.6 inch and not 35 pt in the layout package. Below is my code:

\documentclass{book}
\usepackage[grid,
gridcolor=red!50,
subgridcolor=green!50,
gridunit=in]{eso-pic}
\usepackage{layout}

\begin{document}

\chapter{Oddsidemargin}
When I use the grid behind the text I see on my first page the distance between the left side of the
page and the left margin of the text is around 1.5 inch.

When I use the layout package and the \textbackslash layout command I see the distance between the
left side of the page and the left margin of the text is \textbackslash oddsidemargin+ one inch+
\textbackslash hoffset=35pt+1 inch which is around the same measured value 1.5 inch.

So far everything looks fine. But I am surprised why the default value of the oddsidemargin is
18.06749pt on the page 13 of the Layout package instead of 35pt we see as a result of  \textbackslash
layout command below.

The other surprising point is in the \LaTeXe: An Unofficial Reference Manual, page 26, the
oddsidemargin is 40\% of the difference between the paper width (8.5 inch) and the textwidth (around
4.5 inch) which is 1.6 inch and not 35 pt in the layout package.

\layout

\end{document}


• So you want to know what the default is? Is that your question? – Werner Jan 3 at 5:28
• Yes what the default is and why we see many contradictions in reporting the default in the references I explained. – Aria Jan 3 at 5:36

You can ask LaTeX to show you the values.


\typeout{  start: \the\oddsidemargin}
\documentclass{book}

\typeout{preamble: \the\oddsidemargin}

\begin{document}

\typeout{  page 1: \the\oddsidemargin}

z
\end{document}


produces

   start: 0.0pt
preamble: 35.0pt
page 1: 35.0pt


So the default value in the format is 0pt, but as you are using book class with the default usletter, 10pt, onecolumn and twoside options it gets set to 35pt

You can see the setting in size10.clo

It gets set to .4(\paperwidth-\textwidth)-1in = 0.4(614.295pt-345pt)-72.27pt ~ 35.4pt

    \setlength\@tempdima        {\paperwidth}
\setlength\oddsidemargin    {.4\@tempdima}


Then rounded to a whole number of pt = 35pt

  \@settopoint\oddsidemargin


The actual margin is \oddsidemargin+1in so 1+35/72.27 in ~ 1.48in

All of the above is at the default US Letter paper size, if you add [a4paper] then \paperwidth is different and the final value ends up being 28pt rather than 35pt.

• thank you. Do you know why in the layout package and in the unofficial latex2e manuals they reported different default values I put the page numbers of their reports in my question above. – Aria Jan 3 at 19:34
• @Aria layout package documentation is set in ltxdoc class not book and has a wider left margin (as command names are placed in the margin) – David Carlisle Jan 3 at 20:11
• @Aria I did not understand your page numbers, the diagram in layout.pdf is on page 2 mirror.ox.ac.uk/sites/ctan.org/macros/latex/required/tools/… – David Carlisle Jan 3 at 20:12
• @Aria the formula used in book is, as I show above just as you quote 40% of the difference between pagewidth and textwidth minus 1in so that seems right. – David Carlisle Jan 3 at 20:16
• the layout package is part of the core distribution, with manual at the link I gave. The layouts package (with an s) is a completely different alternative contributed package. Note that the source file of its manual, layman.tex sets the margin \setlength{\oddsidemargin}{0.25in} so it will show that, not the default set by the format. – David Carlisle Jan 3 at 22:03