0

I'm new in LaTeX and I have a problem creating my header at using fancyhdr package. When I include it, the text overlaps in the upper part of the header, and I've tried to fix with the command \setlength\headheight{3cm}. But the text of the rest of the pages comes out lower than on this page and the format of the document is ruined. Sorry for my english, I am not an english speaker and I hope to you understand me. I also include my code and the result.

Thanks in advance.

\documentclass[10pt]{article}
\usepackage[spanish,es-noindentfirst]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{etex}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{titlesec}
\usepackage{setspace}
\usepackage[font={small},labelfont={bf,small},
   justification=centerlast]{caption}
\usepackage[paperwidth=195mm,paperheight=265mm,twoside,
inner=2.2cm,outer=2.2cm,top=2.25cm,bottom=2.25cm]{geometry}
\usepackage[colorlinks,linkcolor=black,urlcolor=black,
   citecolor=black,bookmarks=true]{hyperref}
\usepackage{fancyhdr}
\usepackage{blindtext}
\setlength\headheight{3cm}
\begin{document}
\thispagestyle{fancy}
\fancyhead[L]{\includegraphics[width=0.075\textwidth]{logos/Logo_EPN} \\ \normalsize Year 2019}
\fancyhead[C]{\textbf{\Large\textbf{\textsc{Escuela Politécnica Nacional}}\\ \large \textbf{\textsc{Math 1 $\star$ Summary}}\\ \large\textsc{Functions}}}
\fancyhead[R]{\includegraphics[width=0.075\textwidth]{logos/Buho_EPN} \\ \normalsize Autor's Name}  


\section{Section One}
\blindtext
\medskip
\blindtext
\medskip
\blindtext
\medskip
\section{two}
\blindtext
\medskip
\blindtext
\medskip
\blindtext
\medskip
\blindtext
\end{document} 

fig1

fig2

1

I agree with @Johannes_B that you should consider other forms of Title Creation. However, you could modify the headheight only for the style you are using for the first page.

Snippet

\fancypagestyle{mypagestyle}{%
%   \renewcommand{\headrulewidth}{1pt}%
    \fancyhf{}%
    \fancyhead[L]{\includegraphics[width=0.075\textwidth]{logos/Logo_EPN} \\ \normalsize Year 2019}
    \fancyhead[C]{\textbf{\Large\textbf{\textsc{Escuela Politécnica Nacional}}\\ \large \textbf{\textsc{Math 1 $\star$ Summary}}\\ \large\textsc{Functions}}}
    \fancyhead[R]{\includegraphics[width=0.075\textwidth]{logos/Buho_EPN} \\ \normalsize Autor's Name}  
    \setlength\headheight{3cm}
}


\begin{document}
\thispagestyle{mypagestyle}

Example

\documentclass[10pt]{article}
\usepackage[spanish,es-noindentfirst]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{etex}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{titlesec}
\usepackage{setspace}
\usepackage[font={small},labelfont={bf,small},
   justification=centerlast]{caption}
\usepackage[paperwidth=195mm,paperheight=265mm,twoside,
inner=2.2cm,outer=2.2cm,top=2.25cm,bottom=2.25cm]{geometry}
\usepackage[colorlinks,linkcolor=black,urlcolor=black,
   citecolor=black,bookmarks=true]{hyperref}
\usepackage{fancyhdr}
\usepackage{blindtext}


\fancypagestyle{mypagestyle}{%
%   \renewcommand{\headrulewidth}{1pt}%
    \fancyhf{}%
    \fancyhead[L]{\includegraphics[width=0.075\textwidth]{logos/Logo_EPN} \\ \normalsize Year 2019}
    \fancyhead[C]{\textbf{\Large\textbf{\textsc{Escuela Politécnica Nacional}}\\ \large \textbf{\textsc{Math 1 $\star$ Summary}}\\ \large\textsc{Functions}}}
    \fancyhead[R]{\includegraphics[width=0.075\textwidth]{logos/Buho_EPN} \\ \normalsize Autor's Name}  
    \setlength\headheight{3cm}
}


\begin{document}
\thispagestyle{mypagestyle}

\section{Section One}
\Blindtext
\section{two}
\Blindtext

\end{document} 

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.