The height from the top of the page is currently 3.5cm to top of chapter. I want to reduce to 1.5cm. Height from bottom of chapter is currently 1.5cm and I want to reduce to 0.5cm if possible. I have tried to resolve Questions 407843 and 28195992 and 148747 without success. I've put the code in the preamble and I'm not sure if that was correct?
I have an example but etoolbox example is not correct and I do not know why.
My book has 14 chapters and I have used in this example some of the info in the preamble of it.
Btw, the bibliography that was an issue was solved, thanks to those who worked on it.
\documentclass[pdftex,11pt,a4paper]{book} % report maybe book??
\usepackage{titlesec}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{afterpage}
\usepackage{color}
\usepackage{fancyhdr}
\usepackage{float}
\usepackage{typearea}
\usepackage{titlesec}
\usepackage{graphicx}
\usepackage[all]{xy}
\usepackage{pdfpages}
\usepackage{multicol}
\usepackage{url}
\usepackage{textcomp}
\usepackage{lmodern}% http://ctan.org/pkg/lm
\usepackage{hyperref} % Needs to be last package included
\usepackage[alphabetic,initials,nobysame]{amsrefs} %must be loaded after hyperref to work properly
%\texorpdfstring{tex}{string}
\hypersetup{
unicode=false, % non-Latin characters in Acrobat’s bookmarks
pdftoolbar=true, % show Acrobat’s toolbar?
pdfmenubar=true, % show Acrobat’s menu?
pdffitwindow=false, % window fit to page when opened
pdfstartview={FitH}, % fits the width of the page to the window
pdftitle={Thermal Fluid Heating, A Practical Guide for the Thermal Fluid Practitioner}, % title
pdfauthor={Geoff Senior}, % author
pdfsubject={Thermal Fluid Heating}, % subject of the document
pdfcreator={Geoff Senior}, % creator of the document
pdfproducer={Geoff Senior}, % producer of the document
pdfkeywords={Thermal Fluid Heating, Hot Oil Heating, High Temperature Oil Heating}, % list of keywords
pdfnewwindow=true, % links in new window
colorlinks=true, % false: boxed links; true: colored links
linkcolor=black, %red, % color of internal links % black for print, red for electronic
citecolor=black, %green, % color of links to bibliography % black for print, green for electronic
filecolor=black, %magenta, % color of file links % black for print, magenta for electronic
urlcolor=black %cyan % color of external links % black for print, cyan for electronic
}
% Set margins
\usepackage[inner=20mm, outer=10mm, textwidth=150mm, paperwidth=210mm, paperheight=297mm]{geometry}
\setlength{\voffset}{-1.45in}
\setlength{\textwidth}{18cm}
\setlength{\textheight}{27cm}
\setlength{\topmargin}{1.5cm}
\setlength{\headsep}{15pt} % Optional - separation between header and top of text - default is 25pt
\setlength{\footskip}{-0.25in} % Optional - separation between footer and bottom of text - default is 30pt
% Fancyhdr commands
\setlength{\headheight}{15pt}
\pagestyle{fancy}
\fancyhf{}
\makeatletter
\renewcommand{\chaptermark}[1]{\markboth{@chapapp\ \thechapter:\ #1}{}}
\makeatother
\renewcommand{\sectionmark}[1]{\markright{\thesection:\ #1}{}}
\fancyhead[LE]{\slshape \leftmark}
\fancyhead[RO]{\slshape \rightmark}
\fancyfoot[C]{\thepage}
\setlength{\parindent}{0pt}
% setting level of subsections
\setcounter{secnumdepth}{4}
\pdfminorversion=7
\usepackage{etoolbox}
%etoolbox
\makeatletter
\patchcmd{@makeschapterhead}{50\p@}{\chapheadtopskip}{}{}
\patchcmd{@makeschapterhead}{40\p@}{\chapheadbelowskip}{}{}
\makeatother
% Set new lengths
\newlength{\chapheadtopskip}\setlength{\chapheadtopskip}{20pt}
\newlength{\chapheadsep}\setlength{\chapheadsep}{40pt}
\newlength{\chapheadbelowskip}\setlength{\chapheadbelowskip}{15pt}
\newcommand{\blanknonumber}{\newpage \thispagestyle{empty}}
\makeatletter
\renewcommand{\chaptermark}[1]{\markboth{@chapapp\ \thechapter:\ #1}{}}
\makeatother
\renewcommand{\sectionmark}[1]{\markright{\thesection:\ #1}{}}
\titleformat{\chapter}[display]
{\bfseries\Huge}
{\LARGE\filright\MakeUppercase{\chaptertitlename} \Huge\thechapter}
{2ex}
{\titlerule
\vspace{1ex}%
\filright}
[\vspace{1ex}%
\titlerule]
%\frontmatter %Set pages to roman (i, ii, ...)
\makeatletter
@openrighttrue
\makeatother
\begin{document}
\texorpdfstring{tex}{string}
\addcontentsline{toc}{chapter}{Table of Contents}
\tableofcontents
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures
\newgeometry{textwidth=150mm}
\restoregeometry
\chapter{Introduction}
\label{chapter_introduction}
\fancyhead[LE]{\slshape \leftmark}
\fancyhead[RO]{\slshape \rightmark}
\fancyfoot[C]{\thepage}
\flushbottom
The motive behind writing this book is to provide, as a guide, some practical information about thermal fluid heating systems as used in industrial heating applications. \
\chapter{Thermal Fluid Systems}
\label{chapter_Thermal Fluid Systems}
\noindent
\section{Historical}
\label{history}
There is not much that can be found regarding the history of hot oil heating, however it is believed that its inception was as a result of Oil Companies or Road Paving Organisations (circa 1940's) wanting to heat bitumen without the use of steam, particularly so in a road making environment, away from the refinery locations where high pressure equipment was paramount.
\end{document}
\documentclassand ending with\end{document}. Otherwise we cannot know why the (working) code of the answers to those question do not work in your case. Maybe you are using an incompatible class. Maybe you are using incompatible packages. Maybe there was a mistake with your integration of the code. – cabohah May 02 '23 at 06:411cmby0cm). – cabohah May 02 '23 at 06:47\chapteradds another 50pt or so. – John Kormylo May 02 '23 at 11:35titlesecyou should not patch\@makeschapterheadetc. but use the interface oftitlesec. – cabohah May 06 '23 at 08:24urlwithout options before loadinghyperrefusually does not make sense. – cabohah May 06 '23 at 08:26geometryis not recommended. You should use thegeometryuser interface instead. – cabohah May 06 '23 at 08:28\@openrighttruein the document preamble is not recommended. If available, you should always use the official user interface, e.g., class optionopenright. But because the default ofbookis alreadytwoside,openright, it is also not needed. – cabohah May 06 '23 at 08:32typeareaandgeometrythat fight each other doing similar things, but you manually set the page dimensions. It's a clear sign that you received a preamble developed by accretion without actually knowing what each part does. For instance,\voffsetand\hoffsetshould never be set unless this is needed to cope with some printing machine's idiosyncrasies. – egreg May 06 '23 at 09:58