I am trying to get the following geometry. I have geometry set like this: \usepackage[a4paper, top=4cm,bottom=2.5cm,right=2.5cm,left=4cm, headheight=15pt]{geometry} and I am using the book document class. I have been looking for some ideas on how to set a specific number of lines before and after the chapter's name (see figure 1), but without success. I am also required to have the page number 1.5cm above the first line of the text (see figure 2), but I do not know how to control it. Chapter page does not require page number, but others page do. Any help will be very much appreciated.



enter image description here

EDIT: Some more details, all I have been specified is to have a 4cm top and left margin, and a 2.5cm bottom and right margin. That is why I used the geometry package as indicated above. The pagenumber has to be at the top right of the page. Also, I am using a 12pt font size and Times New Roman and XeLatex. For the chapter name I am using the \large size.

  • please can you add a complete example? and what does mean top margin ? – touhami Jun 29 '16 at 18:22
  • @touhami Sorry for messing things up. I hope it is clear now. My understanding is that top margin is where the text starts, if no header is present, but I am not completely sure. – Kevin Bello Jun 29 '16 at 18:40
  • A priori, this can be done with titlesec, but we need more details. – Bernard Jun 29 '16 at 18:44
  • @Bernard What kind of details? so I can add them. – Kevin Bello Jun 29 '16 at 18:47
  • The value for top margin (and also inner margin, outer margin, text height, text width, paper format). Where you want the page number exactly is not clear . Font size for chapter title and for chapter label. – Bernard Jun 29 '16 at 18:51

Here is what I understood of your requirements:

\documentclass[12pt, a4paper, oneside]{book}%
\usepackage[top=4cm,bottom=2.5cm,right=2.5cm,left=4cm, headheight=15pt, showframe]{geometry}
\usepackage{lipsum,setspace }
\usepackage[pagestyles, clearempty]{titlesec}


\titlespacing*{name=\chapter, numberless}{0pt}{54pt}{28pt}%


\chapter{A first chapter}


\chapter*{Test chapter}



enter image description here

  • Thanks for the reply. Could you please explain how you came up with those number in the titlespacing? Also, is there a way to get rid of the header in the first page of chapters? – Kevin Bello Jun 29 '16 at 21:26
  • My pdfviewer has a measurement tool, so I measured the actual value of interline spacing on the basis of the distance between the first and the 10th line of normal text. This gave with a good precision, a value of 13pt. Then I found the values in \titlespacing by trial and errors. Of course, if you change the font size, you have to do it all again, but you have an order of magnitude. For your second question, you don't have a header on the first page of chapters: it is the showframe option of geometry, for checking. Delete it for the final version, of course. – Bernard Jun 29 '16 at 21:37
  • May I know what that pdfviewer is? – Kevin Bello Jun 29 '16 at 21:40
  • SumatraPDF (under Windows). But GSview also has this possibility. – Bernard Jun 29 '16 at 21:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.