0

I need to bring different header & footer contents in first page. what package can i use for this process.

\documentclass[twocolumn, 9pt, a4paper]{extarticle}
\usepackage{titlesec}
\titlelabel{\thetitle.\quad}
\usepackage{pbox}
\usepackage{hyperref}
\usepackage[includefoot, footskip=0.4in]{geometry}
\geometry{a4paper, left=0.6in, right=0.4in, top=0.8in, bottom=0.5in}
\usepackage{array, booktabs}
\usepackage{threeparttable}[caption]
\usepackage[utf8x]{inputenc}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage[format=plain, justification=justified, singlelinecheck=true, font={small}, labelfont=bf,labelsep=period]{caption}
\usepackage[figurename=Fig.]{caption}
\setlength\captionmargin{15pt}
\usepackage{etoolbox}
\newlength\newtop
\setlength{\newtop}{0.4in}
\makeatletter
\patchcmd\@outputpage{\global \@colht \textheight}{%
\global\textheight=\dimexpr\textheight+\newtop\relax%
\global\topmargin=\dimexpr\topmargin-\newtop\relax%
\global\@colht\textheight%
\global\newtop\z@}{}{\err}
\makeatother
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage[most]{tcolorbox}
\usepackage{setspace}
\usepackage{anyfontsize}
\usepackage{siunitx} 
\usepackage{afterpage, fancyhdr, xpatch}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{widetext}
\usepackage{ragged2e}
\setlength{\belowcaptionskip}{-0.5pt}
\setlist[itemize]{noitemsep}
\setlength{\intextsep}{5pt plus 1.0pt minus 2.0pt}
\setlength{\headheight}{15.6pt}
  \setlength{\headsep}{6pt}
\renewcommand{\footrulewidth}{0.5pt}

\begin{document}
\pagestyle{fancy}
\thispagestyle{plain}
\fancypagestyle{plain}{
\fancyhead[L]{\hspace{-0.1cm}\vspace{-0.4cm}\includegraphics[height=50pt]{Header1}}
\fancyhead[R]{\hspace{0cm}\vspace{0.1cm}\includegraphics[height=0.35in]{Image1}\\\includegraphics[width=9.5cm]{Image}}
}

\pagestyle{fancy}
\afterpage{\fancyhead[R]{\includegraphics[width=2.5cm]{Header2}}}
{\fancyhead[L]{xxxxx.,}}
{\fancyfoot{}
\fancyfoot[L]{ \includegraphics[width=0.5in]{Image1}}
\fancyfoot[C]{\hspace{0.5cm} \textbf{\textit{\small xxxxxx}}}
\fancyfoot[R]{\thepage}}

\section{Introduction}
A basic paragraph structure usually consists of five sentences: the topic sentence, three supporting sentences, and a concluding sentence. But the secrets to paragraph writing lay in four essential elements, which when used correctly, can make a okay paragraph into a great paragraph.

\end{document}
0

First of all your MWE has many things which are probably not needed. Try to make it more command specific. About your question- You need not go this long. There are simpler ways for doing this. fancyhdr package includes commands such as -

lhead, chead, lhead rfoot, cfoot, lfoot

The convention is to write these commands in the preamble, but you can write them in between the document also.

I've prepared an example for different headers and footers for different pages.

\documentclass{article}
\usepackage{fancyhdr}
\usepackage{lipsum}
\parindent=0pt

\begin{document}
\thispagestyle{fancy}
\pagenumbering{gobble} %This command will disable pagecounting.
\cfoot{First page}
\lipsum
\pagenumbering{arabic} %From this pagecounting will start.
\cfoot{\thepage} %This will disable the effect of your first \cfoot command.
\lipsum
\end{document}

This code will generate this output -

User decided footer for first page.

Start of the pagenumbering

Continued numbering

|improve this answer|||||
0

Instead of fancyhdr you can use Titleps

\documentclass{article}
 \usepackage{titleps}
 \usepackage{lipsum}
  % syntax
  \newpagestyle{myfirstpage}[]{  %between [] after the pagestyle name you can insert \scshape for example {as long as you have a font that supports small caps!}
  \sethead[〈even-left〉][〈even-center〉][〈even-right〉]
  {〈odd-left〉}{〈odd-center〉}{〈odd-right〉}

 \setfoot[〈even-left〉][〈even-center〉][〈even-right〉]
 {〈odd-left〉}{〈odd-center〉} {〈odd-right〉}
  }
% then you create a 2th pagestyle with the same syntax code above but with  different name and your personal options!

  \begin{document}
  \pagestytle{myfirstpage}
    Bla Bla bla
  \newpage

  \pagestyle{different name}

   Bla Bla
   \end{document}
|improve this answer|||||

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.