Page LayoutSomething wrong with footers

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
MrFranky
Posts: 3
Joined: Mon Nov 30, 2020 10:12 am

Something wrong with footers

Post by MrFranky »

Hi all.
I confronted some problems with footers in my doc.
User_Guide.pdf - Adobe Acrobat Pro DC 2020-12-08 1.png
User_Guide.pdf - Adobe Acrobat Pro DC 2020-12-08 1.png (14.52 KiB) Viewed 3628 times
As far you can see a footer on the first page and a footer on another page, the position of the footers are different. And I have no idea how to fix this.
This is my part of code:
\documentclass[10pt]{article}
\date{}
\usepackage[utf8]{inputenc}
\usepackage[margin=1.15in]{geometry}
\geometry{
top=1.8cm,
left=1.5cm,
right=1.5cm,
bottom=1.8cm
}
\usepackage{anyfontsize}
\usepackage{fontspec}
\setmainfont{Quicksand}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage[dvipsnames]{xcolor}
\definecolor{links}{HTML}{16e5fe}
\hypersetup{
colorlinks,
linkcolor=16e5fe,
urlcolor=links
}
\usepackage{sectsty}
\sectionfont{\fontsize{28}{31}\selectfont}
\subsectionfont{\fontsize{21}{24}\selectfont}
\usepackage{titlesec}
\titleformat*{\subsubsection}{\large\bfseries}
\usepackage{ifthen}
\newif\Ifwww
\wwwtrue
\usepackage{algpseudocode}
\linespread{1.5}
\usepackage{tcolorbox}
\newtcolorbox{mybox}[3][]
{
colframe = #2!25,
colback = #2!10,
arc=0pt,auto outer arc, left=1pt, boxsep=10pt, boxrule=1pt,width=\columnwidth, right=1 pt
#1,
}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancypagestyle{plain}
\fancyhf{}
\lhead{MS Exchange User Manual} % левый верхний колонтитул
\chead{} % центральный верхний
\rhead{{\includegraphics[height=0.96cm]{www/Screenshots/WWWcompany_fin_GRB.png}}} % правый верхний
\lfoot{{www - Visit our Customer Support Hub: \href{https://www.com}{https://www.com}}} % левый нижний
\cfoot{} % центральный нижний
\rfoot{} % правый нижний
\renewcommand{\headrulewidth}{0pt} % линия под верхним к.
\renewcommand{\footrulewidth}{0pt} % линия над нижним к.

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
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Something wrong with footers

Post by Ijon Tichy »

Unfortunately the shown code is not a Infominimal working example, but only a preamble snapshot. So I cannot test it but have to gamble: See, if you have a warning message by fancyhdr in your log-file. If so, read it and respect it.

BTW: There are some other issues with the shown code, e.g., generally hyperref should be the last package, i.e., after titlesec. There are only some packages that should be loaded after hyperref, like cleveref. See the manuals of the packages for more information about loading order.

And it would be better to mark block-code not only as LaTeX but as code. You can do so using either the "Code" button or the "Select code" selector of the toolbar.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
MrFranky
Posts: 3
Joined: Mon Nov 30, 2020 10:12 am

Something wrong with footers

Post by MrFranky »

Ijon Tichy wrote:Unfortunately the shown code is not a Infominimal working example, but only a preamble snapshot. So I cannot test it but have to gamble: See, if you have a warning message by fancyhdr in your log-file. If so, read it and respect it.

BTW: There are some other issues with the shown code, e.g., generally hyperref should be the last package, i.e., after titlesec. There are only some packages that should be loaded after hyperref, like cleveref. See the manuals of the packages for more information about loading order.

And it would be better to mark block-code not only as LaTeX but as code. You can do so using either the "Code" button or the "Select code" selector of the toolbar.

Code: Select all

\documentclass[10pt]{article}
\date{}
\usepackage[utf8]{inputenc}
\usepackage[margin=1.15in]{geometry}
    \geometry{
        top=1.8cm,
        left=1.5cm,
        right=1.5cm,
        bottom=1.8cm
 }
\usepackage{anyfontsize}
\usepackage{fontspec}
\setmainfont{Quicksand}
\usepackage{graphicx}

\usepackage[dvipsnames]{xcolor}
    \definecolor{links}{HTML}{16e5fe}
    \hypersetup{
        colorlinks,
        linkcolor=16e5fe,
        urlcolor=links
}
\usepackage{sectsty}
    \sectionfont{\fontsize{28}{31}\selectfont}
    \subsectionfont{\fontsize{21}{24}\selectfont}
\usepackage{titlesec}
    \titleformat*{\subsubsection}{\large\bfseries}
\usepackage{ifthen}      
        \newif\IfWWW
        \WWWtrue
\usepackage{algpseudocode}
\linespread{1.5}
\usepackage{tcolorbox}
\newtcolorbox{mybox}[3][]
{
  colframe = #2!25,
  colback  = #2!10,
  arc=0pt,auto outer arc,left=1pt, boxsep=10pt, boxrule=1pt,width=\columnwidth,right=1 pt
  #1,
}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancypagestyle{plain}
\fancyhf{}
\lhead{MS Exchange User Manual} % левый верхний колонтитул
\chead{} % центральный верхний
\rhead{{\includegraphics[height=0.96cm]{WWW/Screenshots/WWW_company_fin_GRB.png}}} % правый верхний
\lfoot{{WWW - Visit our Customer Support Hub: \href{https://support.cloudally.com}{https://support.cloudally.com}}} % левый нижний
\cfoot{} % центральный нижний
\rfoot{} % правый нижний
\renewcommand{\headrulewidth}{0pt} % линия под верхним к.
\renewcommand{\footrulewidth}{0pt} % линия над нижним к.
\usepackage{hyperref}
\begin{document}
...
\end{document}
I'm sorry I can't show the content of the doc.
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Something wrong with footers

Post by Ijon Tichy »

Your document is still not working. There are errors even if I replace the unusual font, that is not available in my full TeX Live installation.

However: Is there a fancyhdr warning about to small head? If so, you should either make it smaller or increase the head size, e.g., using geomtry's option headheight.

And please note, that "Infominimal working example" is a link! The information of the linked page should help to make a working example.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
MrFranky
Posts: 3
Joined: Mon Nov 30, 2020 10:12 am

Something wrong with footers

Post by MrFranky »

Ijon Tichy wrote:Your document is still not working. There are errors even if I replace the unusual font, that is not available in my full TeX Live installation.

However: Is there a fancyhdr warning about to small head? If so, you should either make it smaller or increase the head size, e.g., using geomtry's option headheight.

And please note, that "Infominimal working example" is a link! The information of the linked page should help to make a working example.
Strange, I can run my doc quite nicely. However, there are 27 errors.
Maybe the reason that I run in Overleaf
Post Reply