Page Layoutmargenes

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
jhmorenof
Posts: 1
Joined: Tue Feb 25, 2020 11:57 pm

margenes

Post by jhmorenof »

Alguien, me puede ayudar?
Estoy batallando con este encabezado, en footer no me termina gustando, seguro no será impreso.
Adjunto codigo

Code: Select all

\documentclass[letterpaper,12pt,twoside]{article}
\usepackage[margin= 2.5cm]{geometry}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Paquetes %%%%%%%%%%%%%%%%%%%%%
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{graphicx}
\usepackage{graphics}
\usepackage{float} 
\usepackage{flushend}
\usepackage{amsmath,amsfonts,hyperref,mdwlist,anysize,graphicx,enumitem,stmaryrd}
\usepackage{ragged2e}%justificar texto
\usepackage{wasysym}
\usepackage{subfig}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{comment}
%\usepackage{geometry}
%\usepackage[headheight=81pt]{geometry}
%\usepackage[footheight= 10pt]{geometry}
%\usepackage[margin = 2.5 cm]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{} % clear all header fields
\fancyhead[LO,RE]{\includegraphics[width=0.1\linewidth, height=0.1\textheight]{escudo}}
\fancyhead[RO,LE]{\textbf{Municipio Ciudad Bolivar\\ IE José María Herrán\\CER Paulina Puerta}}\\
\fancyfoot{} % clear all footer fields
\fancyfoot[LE,RO]{\thepage}
\fancyfoot[LO,CE]{Institución educada educadora en búsqueda permanente de la excelencia.}
\fancyfoot[CO,RE]{}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\setlength{\headheight}{65.77121pt} 
\begin{document}
			contenidos...
	\newpage
	\begin{center}
		\includegraphics{escudo}
	\end{center}
	prueba
	
\end{document}
Last edited by cgnieder on Sun Mar 01, 2020 5:05 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

margenes

Post by Johannes_B »

Welcome to the forum.
Please note that we are an English speaking community.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

margenes

Post by Ijon Tichy »

Please try so ask in English. You may use DeepL for a first translation. And please mark your example as code block. Using the "Select code" element of the toolbar you can even mark it explicitly as LaTeX code and give it at name like here:
\documentclass[letterpaper,12pt,twoside]{article}
\usepackage[margin= 2.5cm,headheight=66pt]{geometry}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Paquetes %%%%%%%%%%%%%%%%%%%%%
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{graphicx}
\usepackage{graphics}
\usepackage{float}
\usepackage{flushend}
\usepackage{amsmath,amsfonts,hyperref,mdwlist,anysize,graphicx,enumitem,stmaryrd}
\usepackage{ragged2e}%justificar texto
\usepackage{wasysym}
\usepackage{subfig}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{comment}
%\usepackage{geometry}
%\usepackage[headheight=81pt]{geometry}
%\usepackage[footheight= 10pt]{geometry}
%\usepackage[margin = 2.5 cm]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{} % clear all header fields
\fancyhead[LO,RE]{\includegraphics[width=0.1\linewidth, height=0.1\textheight]{example-image-a}}% file escudo is not available and has been
                               % replaced by one of package mwe
\fancyhead[RO,LE]{\textbf{Municipio Ciudad Bolivar\\ IE José María Herrán\\CER
    Paulina Puerta}}%\\ <-- The doublebackslash here causes errors.
\fancyfoot{} % clear all footer fields
\fancyfoot[LE,RO]{\thepage}
\fancyfoot[LO,CE]{Institución educada educadora en búsqueda permanente de la excelencia.}
\fancyfoot[CO,RE]{}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
%\setlength{\headheight}{65.77121pt}% Much too late. Set it via geomety!
\begin{document}
contenidos...
\newpage
\begin{center}
\includegraphics{example-image}% file escudo is not available and has been
                               % replaced by one of package mwe
\end{center}
prueba

\end{document}
I'm not a fancyhdr expert but I know, that if you are using geometry you should do all typing area settings and margin settings with that package and not by manipulation of lengths like \headheight. If you instead of that do a late change of \headheight geometry cannot adapt the height of the text area. So the bottom margin would also be changed and the text area moves down (or up).
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
Post Reply