I don't know why i'm getting the current layout

This is my whole preamble

\documentclass[spanish,mexico,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{babel}
\usepackage{amsthm, amssymb, amsmath, amsfonts, bbm, mathtools}
\usepackage{csquotes}
\usepackage{enumerate, enumitem}
\usepackage{titling}
\usepackage{lmodern} %optimiza algunas fuentes
\usepackage{float}
\usepackage{mathrsfs}

%\usepackage[pass,showframe]{geometry}
\usepackage{fullpage}
\usepackage{layout}

%Ref
\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}
\usepackage[capitalise]{cleveref}
\usepackage{biblatex}

\Crefname{section}{Sección}{Secciones}

%Imagenes
\usepackage{caption} %para usar caption con *
\usepackage{svg} %inserta imagenes svg
\svgpath{{./imgs/}} %el path de svg

\usepackage{chngcntr}
\counterwithin{figure}{section}
\renewcommand{\figurename}{Figura}

\numberwithin{equation}{section}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
% \setlength{\headheight}{26pt} %set to avoid warnings
%\renewcommand{\sectionmark}[1]{ \markright{#1}{} }
\rfoot{\thepage}
\allowdisplaybreaks

%redefine @maketitle
\makeatletter
\def\@maketitle{%
\newpage
%   \null
%   \vskip 2em%
\begin{center}%
\let \footnote \thanks
{\LARGE \@title{} \par}%
{\large\itshape \subtitle{} \par}%
{\Large \course{} \par}%
\vskip 1.5em%
{\large
\lineskip .5em%
\begin{tabular}[t]{cc}%
\begin{tabular}{c}%
\@author \\\ifdefined\email \email{}\fi%
\end{tabular}%
&
\begin{tabular}{c}%
\university{}\\ \@date%
\end{tabular}%
\end{tabular}\par}%
\vskip 1em%
\hrule
\end{center}%
\par
\vskip 1.5em}
\makeatother

%== definiciones de mate ==%
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\F}{\mathbb{F}}
\newcommand{\C}{\mathbb{C}}

\newtheorem{proposition}{Proposición}[section]
\newtheorem{theorem}{Teorema}[section]
\newtheorem{lemma}[theorem]{Lema}
\newtheorem{corollary}[theorem]{Corolario}
\newtheorem{conjecture}[theorem]{Conjetura}
\newtheorem{problem}{Problema}[section]

\theoremstyle{definition}
\newtheorem{definition}{Definición}[section]
\newtheorem*{example}{Ejemplo}

\theoremstyle{remark}
\newtheorem*{observation}{Observación}
\newtheorem*{note}{Nota}

\newenvironment{solution}{\begin{proof}[Solución]}{\end{proof}}
\renewcommand{\qedsymbol}{$\blacksquare$}

%% declare useful commands ---remember to use \command* to insert implicit \left #\right
\DeclarePairedDelimiter{\set}{\{}{\}}
\DeclarePairedDelimiter{\floor}\lfloor\rfloor
\DeclarePairedDelimiter{\ceil}\lceil\rceil
\DeclarePairedDelimiter{\abs}\lvert\rvert

%editar%
\newcommand\course{-}
\newcommand\university{-}
\title{-}
\newcommand\subtitle{-}
\author{-}
\newcommand\email{\url{-}}
\date{\today}

\begin{document}


I really can't figure out the reason what is loading includehead somewhere and setting the headheight to zero. Thanks for your help.

EDIT: I actually found the solution thanks to the help of @David Carlisle for identifying the problematic package and doing some searching. Don't use the fullpage package, ironicaly, to achieve a fullpage layout. Instead use the geometry package like this:

\usepackage[margin=1in]{geometry}


The answer was found on this question.

• the obvious package candidate to affect the page geometry is fullpage. Jan 10, 2020 at 0:31
• I tried commenting but it stays the same. Jan 10, 2020 at 0:39
• posting just the preamble makes it harder for people to debug, please post a complete document that produces the layout image that you show so people can reproduce the problem and test changes. Is it enough just to add \layout \end{document} as a test file? Jan 10, 2020 at 1:21

If you modify your preamble adding \showthe commands around fullpage so that it looks like

\showthe\headheight
\usepackage{fullpage}


then the terminal and log will show

> 12.0pt.

?
(/usr/local/texlive/2019/texmf-dist/tex/latex/preprint/fullpage.sty)
> 0.0pt.

after the \documentclass (to see it is 12pt) and at \begin{document} (to see it is 0pt) and then simply move the debugging \showthe after each package to see which one changes the value)