Question still unanswered
I am trying to set up margins equal to 2.5cm all around the document. With use of geometry (and fancyhdr) package which is:
\usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.50cm]{geometry}
However i have noticed that by default top and bottom margins are slightly bigger than the left and right. Why is it like that and how to fix it?
Thus how to make those margins (all of them) identical and equal to 2.5cm?
My entire code is:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\newcommand*{\savedfootnotes}{}
\newcommand*{\resetsavedfootnotes}{\global\let\savedfootnotes\empty}
\newcommand{\tablefootnote}[1]%
{%
\footnotemark
\xdef\savedfootnotes%
{\unexpanded\expandafter{\savedfootnotes}\noexpand\footnotetext{#1}}%
}
\edef\endtable%
{%
\aftergroup\noexpand\savedfootnotes
\aftergroup\noexpand\resetsavedfootnotes
\unexpanded\expandafter{\endtable}%
}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{lastpage}
\usepackage{titling}
\usepackage{array}
\usepackage{titlesec}
\usepackage{bibentry}
\nobibliography*
\usepackage{tocloft}
\usepackage{titling}
\newcommand{\subtitle}[1]{%
\posttitle{%
\par\end{center}
\begin{center}\large#1\end{center}
\vskip0.5em}%
}
\renewcommand\cftsecfont{\normalfont}
\renewcommand\cftsecpagefont{\normalfont}
\renewcommand{\cftsecleader}{\cftdotfill{\cftsecdotsep}}
\renewcommand\cftsecdotsep{\cftdot}
\renewcommand\cftsubsecdotsep{\cftdot}
\usepackage{cite}
\usepackage{fancyhdr}
\usepackage[pdftex,
pdfauthor={},
pdftitle={}]{hyperref}
%
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=black
}
\linespread{1.5}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.50cm]{geometry}
\pagestyle{fancy}
\cfoot{ \thepage}
\setlength{\droptitle}{5cm}
\setlength\parindent{1cm}
\makeatletter
\renewcommand\thesection{}
\renewcommand\thesubsection{\@arabic\c@section.\@arabic\c@subsection}
\makeatother
\titlespacing*{\section}
{2.5cm}{0 pt}{1.5 pt}
\titlespacing*{\subsection}
{2.5cm}{1.5 pt}{1.5 pt}
\setcounter{section}{-1}
\begin{document}
\pagenumbering{gobble}
\pagenumbering{arabic}
\setcounter{page}{0}
\thispagestyle{empty}
\clearpage
title page
\newpage
\tableofcontents
\newpage
\section{\hfil 0 \hfil}
\newpage
\section{\hfil 1 \hfil}
\section{\hfil Bib \hfil}
\nocite{*}
\begingroup
\renewcommand{\section}[2]{}
\bibliographystyle{plain}
\bibliography{bibl2}
\endgroup
\newpage
\end{document}
At the top of it i have 0.1 inches more that on the left hand side. I want to have 1inch everywhere
Edit by touhami
Following comments it seems that the question is how to remove the gap between the frame and section title (this is related to titlesec
)
\documentclass[12pt,a4paper]{article}
\usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.50cm,showframe]{geometry}
\usepackage{titlesec}
\usepackage{mwe}% just for the example
\linespread{1.5}
\begin{document}
\blinddocument
\end{document}
includefoot
,includehead
and so on in the documentation of the geometry package.\linespread{1.5}
? Which is probably not what you want, in fact. Use the facilities ofsetspace
instead. Off-topic:hyperref
should be loaded last.\newpage
in a document. Almost certainly, you are using the wrong class.