TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to know what are the margins (top, right,bottom and left; in meters) that are by default assigned for thebook class. Is there a command or a way to know them?

share|improve this question
2  
LaTeX model is different: it doesn't specify the four margins, but rather many more dimensions and deduces the bottom and right (outer) margins from them. With the layout package suggested by Gonzalo Medina you'll see those dimensions. The unit is "printer points": 72.27pt = 1in = 2.54cm – egreg Mar 31 '12 at 21:34
1  
The answer depends importantly on the text font size (10pt (default), 11pt, and 12pt) and on whether the output is set in single-column or two-column format. To find LaTeX's default values of the margins for each combination of these main options, either use the layout package (as is explained in @GonzaloMedina's answer) or open the files bk10.clo, bk11.clo, and bk12.clo files (.clo is short for "class option") manually and search for the relevant parameters. I recommend using the layout package... – Mico Mar 31 '12 at 21:45
up vote 28 down vote accepted

To produce an overview of the layout of the current document, you can use the \layout command from the layout package:

\documentclass{book}
\usepackage{layout}
\begin{document}
\layout
\end{document}

The ouput is a two page document showing this:

enter image description here

enter image description here

Another option would be to use the layouts package:

\documentclass{book}
\usepackage{layouts}

\newcommand\DocLength[1]{%
  The value for \texttt{#1} is \printinunitsof{mm}\prntlen{\csname#1\endcsname}\par}
\begin{document}

\DocLength{evensidemargin}
\DocLength{oddsidemargin}

\end{document}

enter image description here

Using the \pagevalues command you will obtain a table of the values of the current document’s page layout parameters; this, together with the showframe option for the geometry package, can be useful when designing a new page layout. A little example with some "extreme" values just for illustration:

\documentclass{article}
\usepackage[paperheight=12cm,paperwidth=18cm,includehead,includefoot,showframe]{geometry}
\usepackage{layouts}
\printinunitsof{cm}

\begin{document}
\pagevalues
\end{document}

enter image description here

share|improve this answer
    
But If I'm not satisfied of margins of my document how can I set them to myself using cm as unit of measure? – Mazzy Mar 31 '12 at 21:57
1  
@Mazzy: if you are talking about changing the predefined layout, then use the geometry package. For example, \usepackage[margin=3cm]{geometry} will give you 3cm margins. – Gonzalo Medina Mar 31 '12 at 21:59
    
Suppose I would change the margin in this way: odd pages=margin top,bottom,left=3cm and right=3.5cm.even pages=margin top,right,bottom=3cm and left=3.5cm. – Mazzy Mar 31 '12 at 22:01
    
@Mazzy Then you could use something like \usepackage[vmargin=3cm,rmargin=3.5cm,lmargin=3cm]{geometry} and probably you'll need some other options depending on whether the header/footer are to be included or not in the margins. Read the package documentation to learn all the options it offers. – Gonzalo Medina Mar 31 '12 at 22:10
4  
@Mazzy I think you are leaving that 3.5cm margin for binding. If so use \usepackage[bindingoffset=0.5cm,margin=3cm]{geometry} – Harish Kumar Mar 31 '12 at 23:15

It depends on whether you want to include the header/footer and possibly even if you use twoside document. Perhaps the following minimal working example can be a start:

\documentclass{book}
\usepackage{layouts}% http://ctan.org/pkg/layouts
\begin{document}
\pagevalues
\end{document}

uses the layouts package to produce

enter image description here

All units are printed in points by default, and there are 0.0351459 points per cm. Note that LaTeX does not use metres as a valid length.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
http://tex.stackexchange.com/questions/50258/margins-of-book-class
tex.stackexchange.com
crawl=CC-MAIN-2016-30
85760
application/http; msgtype=response
sha1:GYQO32ITCGZONTCUMPOP2TNANNEO7FUG
<urn:uuid:075b6f93-b2f6-46ed-aec4-acedd718f768>
2016-07-24T22:30:15Z
151.101.129.69
sha1:IRGFOGH2TB7ILNJ3O4EHDKFJZXENN7WR
<urn:uuid:9ff545d5-39e8-4a57-a316-2f7c2b303577>
http://tex.stackexchange.com/questions/50258/margins-of-book-class
response
<urn:uuid:843b2711-cf2b-4165-9526-c2c4ad38e676>
robots: classic
hostname: ip-10-185-27-174.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2016-30
operator: CommonCrawl Admin
description: Wide crawl of the web for July 2016
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf