Page Layoutfancyhdr | Footrule that covers complete Text Width

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
fabioled
Posts: 14
Joined: Sat Sep 15, 2012 2:51 am

fancyhdr | Footrule that covers complete Text Width

Post by fabioled »

How do I get the \footrulewidth fills the space without indentation and go to the final margin. I'm using it like below in the document class article.

Code: Select all

\fancyhf{}
\rhead[\footnotesize{\por}]{\footnotesize{\monog}} 
\setlength\parindent{0pt}
\renewcommand{\footrulewidth}{1.5pt}  
\rfoot [\footnotesize{\editorial}]{\thepage}
\lfoot [\thepage]{\footnotesize{\editorial}}
However the line generated does not occupy any space to set up the bank, in addition to page number \thepage is at the end of the line, also not reaching the margin.

Thank you!

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

fabioled
Posts: 14
Joined: Sat Sep 15, 2012 2:51 am

fancyhdr | Footrule that covers complete Text Width

Post by fabioled »

Preambule file:

Code: Select all

 \NeedsTeXFormat{LaTeX2e}
\input{cvs-id.def}
\CVSExtract$Id: abakos.sty,v 0.1 2012/29/08 15:08:25 gweber Exp $
\CVSPackage{abakos}{} %substitui \ProvidesPackage (replaces \ProvidesPackage)

% Pacotes de codificação das fontes para português
\usepackage[T1]{fontenc}
\usepackage{times}

% \usepackage{memhfixc}  % Para mudança de tamanho de fontes 
% Merge em duas células (linhas diferentes)
\usepackage{multirow}
%desenhar cabeçalho e rodapé
\usepackage{fancyhdr}
\pagestyle{fancy}
% Pacote para divisão silábica do portugues
\usepackage[english, brazil]{babel}

  \usepackage{selinput}
 
   \SelectInputMappings{     % Semi-automatic input selection
     atilde={ã},             % by a list of selected glyphs
     aacute={á},             % see: http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt
     ccedilla={ç}
   }
\usepackage{babel}
% \usepackage{txfonts}      % Font in Times New Roman style
\usepackage[onehalfspacing]{setspace}
\usepackage{lipsum}       % Only for dummy text, to be dropped in actual document

% Pacote de adequação do formato ABNT para normas da PUCMinas
%\usepackage{abnt-PPGInf-PUCMG}

% Pacote para citação e referências seguindo ABNT no sistema (AUTOR, Data)
\usepackage[alf]{abntcite}
\usepackage{cite}
\usepackage{abnt-alf}
\usepackage{setspace}
%\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\citeoption{abnt-full-initials=yes}
\usepackage[portugues, linesnumbered, ruled, vlined]{algorithm2e}
\usepackage{algorithmic} %algorithm
\usepackage{listings}

\usepackage{leading}  
% \usepackage[inner=30mm,outer=20mm,top=30mm,bottom=20mm]{geometry}
 \usepackage{geometry}
 \geometry{tmargin=20mm,bmargin=20mm,lmargin=30mm,rmargin=20mm}

% % % Citação direta 
\newenvironment{citacaodireta}{%
  \begin{list}{}{%
    \small
    \setlength{\leftmargin}{4cm}
    \singlespacing
  }
  \item\relax
}{\end{list}}

\newcommand{\secao}[1]{\section{#1}}
\renewcommand{\section}{\@startsection
{section} %Nome
{0} %Nivel
{0mm} %Indentacao
{1.5\baselineskip} % Antes do paragrafo
{1.5\baselineskip} % Depois do paragrafo
{\noindent\bfseries\textsc}} % Estilo - negrito e maiusculo

% Titulo de subsecao ---

\newcommand{\subsecao}[1]{\subsection{#1}}
\renewcommand{\subsection}{\@startsection
{subsection} %Nome
{1} %Nivel
{0mm} %Indentacao
{1.5\baselineskip} % Antes do paragrafo
{1.5\baselineskip} % Depois do paragrafo
{\noindent\bfseries}} % Estilo

% Titulo de subsubsecao ---
\newcommand{\subsubsecao}[1]{\subsubsection{#1}}
\renewcommand{\subsubsection}{\@startsection
{subsubsection}% %Nome
{2} %Nivel
{0mm} %Indentacao
{1.5\baselineskip} % Antes do paragrafo
{1.5\baselineskip} % Depois do paragrafo
{\noindent\bfseries\itshape}} % Estilo
%% Comando para citação individual de Autor e Ano
\newcommand{\citeAutorAno}[1]{\citeauthoronline{#1} (\citeyear{#1})}
\newcommand{\citeCitacao}[1]{\citeauthoronline{#1}, \citeyear{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength{\parindent}{1.25cm}
\usepackage{indentfirst}
%Desenhar figuras geometricas
\usepackage{tikz}

\fancyhf{}
\rhead[\footnotesize{\por}]{\footnotesize{\monog}} 
 \renewcommand{\footrulewidth}{1.5pt}
\rfoot [\footnotesize{\editorial}]{\thepage}
\lfoot [\thepage]{\footnotesize{\autor}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Altera o tamanho das fontes dos capítulos e dos apêndices
% \renewcommand{\ABNTchapterfont}{\bfseries}

It happens that aa line \renewcommand{\footrulewidth}{1.5pt} is generated a
line ending before finishing the space bounded by the total margin.
To adapt to that need, it is necessary that she go to the bank and that the page number is on the right corner at the end of the line.

Example :

Code: Select all

\documentclass[a4paper,12pt,Times]{article}
\usepackage{abakos}  % package created by me
\begin{document}
\thispagestyle{empty}

\section{Introdução}

Texto texto texto texto ....
\newpage
\bibliography{bibliografia}
\end{document}

I need just the header and footer commands to create line, using all the space to the bank.
Currently he is finishing a 4 cm before the end of the margin.
fabioled
Posts: 14
Joined: Sat Sep 15, 2012 2:51 am

fancyhdr | Footrule that covers complete Text Width

Post by fabioled »

I would like to acknowledge the help and say that is no longer necessary, as already found the solution for this problem.

Simply insert the command by and pass zero as the size parameter:

Code: Select all

\fancyheadoffset{0cm}
Thank you!
Post Reply