I used to use this

\documentclass[a4paper, 12pt, oneside, openany]{book}
   paperwidth=210mm, paperheight=297mm,
   left=35mm, right=35mm, top=25mm, bottom=25mm
  \monthname[\THEMONTH], \THEYEAR}
\UseTblrLibrary{booktabs, siunitx}
\usepackage{ makecell}

\DefTblrTemplate{contfoot-text}{normal}{} \SetTblrTemplate{contfoot-text}{normal} 
%%%%%%%%%%%% CAPTION %%%%%%%%%%%%%%%%%
\RequirePackage[labelfont=bf, labelsep=space]{caption}

\NewTblrTheme{captionof}%   % <---
     \captionof{table}{\InsertTblrText{caption} "continue..."}








\renewcommand*\contentsname{\null\hfill {TABLE OF CONTENTS}} 

\let\cleardoublepage=\clearpage %remove blank page

\usepackage{nomencl}%%%% LIST OF SYMBOLS


\section{section one} the text starts from here. 
\section{section tow} the text starts from here.
\section{section three} the text starts from here.
\section{section one} the text starts from here. 
\section{section tow} the text starts from here.
\section{section three} the text starts from here.

to adjust the margins of my thesis, unfortunately, the margins I got are as shown

enter image description here

How can I adjust the margins of my document as shown in the code above? By the way, I tried to use this one too \usepackage[hmargin=3.5cm,vmargin=2.5cm]{geometry}

  • 1
    Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for the users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. Nov 27, 2023 at 17:06
  • Actually, it is not tedious but it is long code this is what can I share with you I edited the above code
    – b.als
    Nov 27, 2023 at 17:14
  • I get 35 mm horizontal margins with your code. How do you measure the margins? Nov 27, 2023 at 17:24
  • 1
    Maybe what you mean are the printer's settings which, however, have nothing to do with the margins of the text as set by (La)TeX. Nov 27, 2023 at 18:56
  • 1
    Tell them to take a ruler and measure! Nov 27, 2023 at 19:04

1 Answer 1


To long for the comment ...

I can't test your document example since it contain some errors, but, if I use your page layout settings, and add showframe package that I can see your page layout, I get expected correct result:

enter image description here

MWE which produce above image is:

\documentclass[a4paper, 12pt, oneside, openany]{book}
\usepackage[hmargin=35mm, vmargin=25mm]{geometry}
%--------------- show page layout. don't use in a real document!
\usepackage{lipsum}                              % for dummy text


How do you measure showed borders data? Showed data apparently are wrong (if they are from Shoed page layout settings).

Try extend above MWE width some part of your document and at this use only necessary packages.

More help is possible to give when from your document example will be removed errors in code.

Regarding your comments and claims, that page borders are independent to settings in geometry package always the same ...

Please check the following MWE with a bit elementary/rude check about size of text block on A$ page:

\documentclass[a4paper, 12pt, oneside, openany]{book}
\usepackage[hmargin=35mm, vmargin=25mm]{geometry}


1 Point, 1/72.27 inch. The (approximate) conversion to metric units is 1point = .35146mm = .035146cm.

\textbf{width and height of text area on A4 page are:}

\verb+\textwidth+ = \the\textwidth (points) is approx. 140mm (210mm - 2*35mm)

\verb+\textheight+ = \the\textheight (points) is approx. 247mm (297mm - 2*25mm)

Result is:

enter image description here

So, settings in geometry package works as is advertised. In the above document are left and right borders equal to 35mm, top and bottom are equal to 25mm.

Sorry, it is unclear, how you measure text border sizes and what is actually your problem. Your claims for my MWE doesn't holds.

What is going on in your document I can't say, since provided example is not compilable and hence can't be tested. On the first sight is not seems, that in it you change page layout, but I'm not sure about this.

  • I will try yours and let you know
    – b.als
    Nov 27, 2023 at 17:40
  • It's the same, there are no differences.
    – b.als
    Nov 27, 2023 at 18:11
  • 1
    No, it is not. See image in my answer! left/right borders are 35mm wide, and top/bottom 25mm. It is not clear how you measures their length. Show us a proof for your claims!
    – Zarko
    Nov 27, 2023 at 18:15
  • When I downloaded my PDF file, I looked at the page setup properties. The borders as shown in the figure I posted in my question. Was what I did wrong?
    – b.als
    Nov 27, 2023 at 18:21
  • 1
    I doubt about your method, Just print the page generated by my MWE and than measure borders by rule.
    – Zarko
    Nov 27, 2023 at 19:31

You must log in to answer this question.

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