1

I have been working on a research paper right now. Unfortunately, I have been encountering the following problems.

1. I have a problem customizing the footer and header for each page. The first page must have different header and footer that's why I used the following code:

\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}

\usepackage{tikz-cd}
\DeclareMathOperator{\Frob}{Frob}

\usepackage{footnote}
\usepackage{footmisc}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}

\usepackage{fancyhdr}
\pagestyle{empty}
\fancyhf{}
\fancyfoot{\thepage}
\lhead{\small{\textbf{Foot Note for First Page Only}}}
\lfoot{
Copyright \copyright}

\begin{document}

\date{}
\nocite{*}
\title{Title}

\maketitle
\thispagestyle{fancy}

\end{document}

The problem is that I cannot resize the fonts of the footer and the header. It's too big.

2. I need to apply different footer and headers for the remaining pages. When I use \pagestyle{fancy}, the footer and header for the first page only is added in the whole document. I need to only headers at the center of the even and odd pages (excluding first page).

  • 1
    Welcome to TeX.SX! – moewe May 20 '18 at 8:46
  • What is you want is not very clear. What should be the contents of those centred headers? – Bernard May 20 '18 at 9:09
  • How to code? Odd pages (3, 5, and 7 only): title of the article is the header (center aligned) and page number at the footer (center aligned). Even pages (2, 4 & 6): header must be last name of author and page number at the footer. For the first page only: header (left aligned) must indicate a text (e.g. Journal number), and the copyright (left aligned) and page number (center aligned) at the footer. – user163433 May 20 '18 at 10:26
  • 1
    Please clarify by editing the question. Comments are not meant for that. – Johannes_B May 20 '18 at 11:43
1

You can use \pagestyle{fancy} to define the first page and then use a personalized style for the whole document. You can create this personalized style with \fancypagestyle{documentstyle} and swift to this style in the second page with the instruction \pagestyle{documentstyle}. The following code should solve your problem:

\documentclass[11pt, a4paper, twoside]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr} 
\usepackage{lipsum} 
\usepackage{parskip}
\usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}

\pagestyle{fancy} 

\fancyhf{}
\fancyhead[L]{\small{\textbf{Journal Nº 1234 \copyright}}}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0pt} % Default value: 0.4pt

\fancypagestyle{documentstyle}{
    \fancyhf{} % clear all header and footer fields
    \fancyhead[CO]{Title of the article}
    \fancyhead[CE]{Last name of the author}
    \fancyfoot[C]{\thepage} 
}

\begin{document}

\section{First page}
\lipsum[1-5]
\newpage \pagestyle{documentstyle} 

\section{Second page}
\lipsum[1-5]
\newpage

\section{Third page}
\lipsum[1-5]
\newpage

\section{Fourth page}
\lipsum[1-5]
\newpage

\section{Fifth page}
\lipsum[1-5]
\newpage

\section{Sixth page}
\lipsum[1-5]
\newpage

\section{Seventh page}
\lipsum[1-5]

\end{document}
  • Hi. I've tried using the codes. But it didn't work. Is there other way of doing it without the use of the lipsum package? Thank you. – user163433 May 21 '18 at 16:53
  • You don’t need the lipsum package, I used it only to put some blind text for the example. You can delete the \usepackage{lipsum} and \lipsum[1-5] instructions. You can also delete \usepackage{parskip}. – drjaramillo May 22 '18 at 8:59

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.