3

I am trying to get a simple on every page but excluding title page. Now I only get footer in front matter and excluding title page. The main matter do not get footer.

Edit: I want a simple footer (same footer) on every page except the title page. Abstract and table of contents, etc shall have roman numbers, the rest Arabic numbers. And I want to use headings to get chapter in top and subchapter when it is a subchapter. I shall look at KOMA-script and if I have to read The LaTeX Companion again. So right now you can wait with answers to I have tried some time. I am coming back with a solution in the weekend. Thanks everybody for the directions I got and for the editing of the code.

Sorry for the confusing first post. I have some postoperative pain and health problem now. But I am feeling better for every day now.

\documentclass{article}
\usepackage{fancyhdr}
\fancyhead{}
\fancyfoot{}
\fancyfoot[LE, LO]{Footer}
\title{My awesome title}
\author{Myself}
\begin{document}
\pagestyle{fancy}
\maketitle
\thispagestyle{empty}
\newpage
\pagenumbering{roman}
\begin{abstract}
Hello world.
\end{abstract}
\newpage
\tableofcontents
\listoffigures
\newpage
\pagestyle{headings}
\fancyfoot{}
\newpage
\pagenumbering{arabic}
Foo bar baz.
\end{document}

output

I think I shall use renew command after \pagestyle{headings} or something to get the footer in the main matter. But how?

9
  • You don't need \pagestyle{headings} as you have already used \pagestyle{fancy} after \begin{document}. just remove \fancyfoot{}
    – user11232
    Dec 7, 2012 at 2:23
  • Thanks. I have The LaTeX Companion, but it is four years since I read it, so I have forget some things. And if you translate the title from Swedish you see that I am not feeling so good. I am to tired to read it now so I was lazy and asked here. Dec 7, 2012 at 2:59
  • I reduced your code to somewhat of a minimal working example (MWE) and added a picture. Please make sure to do that when asking questions here. I left a warning in there that you might want to take care of: Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 5. Besides, you're talking about "front matter" and "main matter", which are technical terms for content units in the "bigger" document classes report and book, but not available in article, so you're not actually using them currently.
    – doncherry
    Dec 7, 2012 at 4:06
  • Thanks, I shall look at it. Now I have page number on top right. But now I see that the page numbering in front matter is missing. Maybe it is KOMA-script that is best. Dec 7, 2012 at 4:08
  • Thanks doncherry. I was using front matter as a term for the part with Roman numbers, but that was wrong of me. Dec 7, 2012 at 4:10

1 Answer 1

3

It's not entirely clear to me from the question (I'd use a report- or book-like class for this type of thing), but perhaps

\documentclass[]{article}
\usepackage{fancyhdr}
\fancypagestyle{plain}{%
  \fancyfoot{}%
  \fancyhead{}%
}
\fancyhead{}
\fancyhead[L]{\leftmark}
\fancyfoot{}
\fancyfoot[L]{Footer}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\title{My awesome title}
\renewcommand*{\sectionmark}[1]{\markboth{\MakeUppercase{#1}}{}}
\author{Myself}
\begin{document}
\pagestyle{empty}
\maketitle
\newpage
\pagestyle{fancy}
\pagenumbering{roman}
\begin{abstract}
Hello world.
\end{abstract}
\newpage
\tableofcontents
\listoffigures
\clearpage
\section{A demo}
\pagenumbering{arabic}
Foo bar baz.
\end{document}

is about what you are after.

You must log in to answer this question.

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