I need help creating a layout for a book. This is very difficult for me because I have never experienced this, so I ask if someone can help me. I read that /geometry is used to get the page margins you want, but I don't know how.

I would like to make a book a5:

Page size: height 21 cm - width 15 cm External margins with respect to the body text: left margin 2.5 cm - right margin 2.5 cm. Bottom margin of the page: 2.5 cm Top margin of the page: 2.5 cm

The space of the upper margin between the chapter number and the chapter name is 2.0 cm and the space between the chapter number and the chapter name with the actual text is 0.5 cm.

The body of the text is 16.0 cm in height, 10 cm in width.

Question: what command should I give to have these parameters in / geometry?

Thanks if you can help me.

  • 2
    Run texdoc geometry.
    – Fran
    Jan 16, 2020 at 21:49
  • And if you're allergic to the command line, you can web search ctan geometry and open the package documentation (which is the same pdf that texdoc geometry would give you).
    – Teepeemm
    Jan 17, 2020 at 21:14
  • Thanks Fran and Teepeemm for the advices and suggestions! Annie Jan 18, 2020 at 9:06

2 Answers 2


You might try the memoir class, which has built-in facilities for changing the layout, instead of book.

% layoutprob.tex SE 524558 layout for an A5 book
\documentclass[a5paper]{memoir} % sets the page size to a5

\settypeblocksize{21cm}{15cm}{*} % the body of the text
\setlrmargins{2.5cm}{*}{*}       % the left and right margins equal
\setulmargins{2.5cm}{*}{*}       % set the upper and lower margins equal
% other possible layout specifications
\checkandfixthelayout            % apply the layout specifications

%%% change the chapter layout

% ...

memoir also has a comprehensive set of utilities for changing many other aspects of your document, including the setting of \chapter s. (I'm not sure what you want there). Read the, somewhat lengthy but comprehensive, documentation (> texdoc memoir).

  • Thanks Peter for the help! I will study the memoir package. Jan 17, 2020 at 22:40

For the page layout, here it is: the preamble has to contain these lines:

\usepackage[papersize={15cm,21cm}, margin=2.5cm]{geometry}


\usepackage[a5paper, margin=2.5cm]{geometry}

The package will compute the body width and height on this basis.

The chapter headings layout is not a job for geometry, but for titlesec for instance. But what do you mean with ‘the space between the chapter number and the chapter name (title indeed!) with the actual text’? Chapter number and chapter title won't be on the same line.

  • Thanks Bernard for the reply! I'm sorry, chapter number and title be on the same line. \documentclass[a5paper,10pt]{book} \input{packages} %\usepackage[utf8]{inputenc} \usepackage[papersize={15cm,21cm}, margin=2.5cm]{geometry} \begin{document} \include{chapter1} \include{chapter2} \end{document} This is correct? Jan 16, 2020 at 22:41
  • It is correct inasmuch as the code of the included chapters is correct, but this won't set the layout of the chapter titles. This requires using the \titleformat and \titlespacing commands from titlesec. B.t.w. the spacing between chater heading and text is very small, in my opinion.
    – Bernard
    Jan 16, 2020 at 22:46
  • Ok! I will do research for this then I will write a code structure again here. Thank you again very much! Jan 16, 2020 at 22:52
  • See §3 Advanced Interface in the documentation. For a centred heading, choose the block style.
    – Bernard
    Jan 16, 2020 at 22:56
  • Thanks Bernard! where should I search for '§3 Advanced Interface'? what documentation and where? Jan 17, 2020 at 22:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .