0

My objective is to add a footer only in the first page of my document, but the problem is that the page numbering is missing. How can i please fix this issue and have the footer only in the first page without missing the page numbering for all pages? Here is the code I'm using:

before \begin{document}:

\usepackage{lipsum}
\usepackage{fancyhdr}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyfoot[L]{my sentence}
\pagestyle{empty}

and after \maketitle:

\thispagestyle{fancy}

Here is the full code:

\documentclass[journal]{IEEEtran} 
\usepackage[cmex10]{amsmath} 
\usepackage[english]{babel} 
\usepackage{graphicx} 
\usepackage[utf8]{inputenc} 
\usepackage{lipsum} 
\usepackage{fancyhdr} %\fancyhf{} 
\renewcommand{\headrulewidth}{0pt} 
\renewcommand{\footrulewidth}{0pt} 
\fancyfoot[L]{..footer sentence..} 

\begin{document} 
  \title{..the tiltle..} 
  \maketitle 
  \thispagestyle{fancy} 
  \begin{abstract} ..the abstract.. \end {abstract} 

  ..\\ ..the body.. \newpage ... \newpage ... 

\end{document} 
9
  • Welcome to TeX.SE. Where on the first page is the page number supposed to be displayed?
    – Mico
    Commented Dec 5, 2017 at 16:49
  • 4
    Welcome to TeX.SX! Please provide compilable document, not just a fragment.
    – Bobyandbob
    Commented Dec 5, 2017 at 16:50
  • on the right side of the footer..
    – stitou
    Commented Dec 5, 2017 at 16:50
  • \fancyhf{} remmoves everything. Remmove that line.
    – Johannes_B
    Commented Dec 5, 2017 at 16:56
  • 1
    Please add information needed to answer the question into the question (see the links in Bobyandbob's comment). Questions should be self-explaining without the need to read several additional comments. Comments can be removed or moved to chat. Commented Dec 5, 2017 at 17:32

1 Answer 1

1

For something like this on a single page, I like to use tikzpagenodes. (Don't forget to run it twice.)

\documentclass[journal]{IEEEtran} 
\usepackage[cmex10]{amsmath} 
\usepackage[english]{babel} 
\usepackage{graphicx} 
\usepackage[utf8]{inputenc} 
\usepackage{lipsum} 

\usepackage{tikzpagenodes}

\begin{document} 
  \title{..the tiltle..}%
  \maketitle 
  \begin{tikzpicture}[remember picture,overlay]
    \node[anchor=base west] at (current page footer area.south west) {my sentence};
  \end{tikzpicture}
  \begin{abstract} ..the abstract.. \end {abstract} 

  ..\\ ..the body.. \newpage ... \newpage ... 

\end{document} 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .