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?

lockstep
  • 250,273
  • You don't need \pagestyle{headings} as you have already used \pagestyle{fancy} after \begin{document}. just remove \fancyfoot{} –  Dec 07 '12 at 02: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. – Richard Larsson Dec 07 '12 at 02: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 classesreportandbook, but not available inarticle`, so you're not actually using them currently. – doncherry Dec 07 '12 at 04: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. – Richard Larsson Dec 07 '12 at 04:08
  • Thanks doncherry. I was using front matter as a term for the part with Roman numbers, but that was wrong of me. – Richard Larsson Dec 07 '12 at 04:10
  • @RichardLarsson: Well, it wasn't wrong, I just wanted to make you aware that using this terminology in the non-technical way might be confusing. Based on what you've learned from the comments, could you try again and reformulate your question? It's not entirely clear to me what your goal is, but you might be able to get there yourself. For fancyhdr see http://en.wikibooks.org/wiki/LaTeX/Page_Layout. Also, switching to a KOMA-Script document class isn't necessary just for headers, but it's not a bad idea either. However, the standard LaTeX classes certainly also have "built-in typography". – doncherry Dec 07 '12 at 04:34
  • @doncherry, done that now. – Richard Larsson Dec 07 '12 at 04:45
  • @RichardLarsson Thanks! I hope you don't mind my approach of "letting you find out yourself" a bit, I prefer that over just giving people full solutions. If you need more reading material, there are some Swedish resources listed here, and there's always The Not So Short Introduction to LaTeX2ε, an all-time favorite. I hope you'll recuperate quickly and get some good distraction through LaTeX! Feel invited to check out our [chat]! I'm not there too often, but the atmosphere there is very friendly and open. – doncherry Dec 07 '12 at 04:56
  • @doncherry, no problems. I have been teaching mathematics and I have the same approach to not give the answer, only give directions. – Richard Larsson Dec 07 '12 at 05:12

1 Answers1

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.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036