2

I cannot seem to figure out how to get one header on the first page and another header on all the rest of the pages. In particular I want to have a picture in the header on the first page, and some text in the header for the rest of the pages.

Here is a pretty scaled down template (from http://www.latextemplates.com/)

https://www.writelatex.com/1626273ymtvpf#/4051907/

If I set e.g. \rhead{MY HEADER} I get this header on all pages including the first page. Any help is much appreciated!

Here is a Minimum Working Example of my problem

\documentclass[DIV=calc, paper=a4, fontsize=11pt, twocolumn]{scrartcl}

\usepackage{lipsum}
\usepackage{fancyhdr}
\pagestyle{fancy}

% Headers - these apply for every page right now
\lhead{}
\chead{}
\rhead{TEST}

\title{Article Title}

\begin{document}

\maketitle
\thispagestyle{fancy}
\lipsum[1-8]
\end{document}

Thanks in advance

  • 1
    Please add a Minimum Working Example here and ensure that the question you ask here is self-sufficient. It should make sense and be of help to future users even if the websites you link to disappear. – cfr Oct 14 '14 at 22:48
  • 1
    A few hints: Do not use fancyhdr along with KOMA. It has it's own package called scrlayer-scrpage. If you want to create a titlepage, use the global option titlepage. – Johannes_B Oct 15 '14 at 6:40
  • There are many things in this template that aren't recommendable with KOMA-script. This makes the template one on my list (of many many) templates that i would never recommend. On the contrary, i would recommend not to use that template. – Johannes_B Oct 15 '14 at 14:20
  • Would you please be so kind as to mention a few things, so I know what to look out for? Or what to read more about! Thank you very much – DoubleTrouble Oct 16 '14 at 5:38
3

The first page in an article document is set with the pagestyle plain. That means no header, but a page number by default. The same applies for your posted minimal example.
Since an article document only has the first page using pagestyle plain you can use the optional argument.

You shouldn't use fancyhdr with KOMA-script. KOMA comes along with an own very very powerful package called scrlayer-scrpage. The syntax is a bit different tough, but you can do much more things.

\documentclass[
%DIV=calc,
%paper=a4, fontsize=11pt,%default
twocolumn,
]{scrartcl}

\usepackage{lipsum}
\usepackage{mwe}
\usepackage{scrlayer-scrpage}
\pagestyle{scrheadings}

\clearpairofpagestyles
\ohead[{\includegraphics[width=3em]{example-grid-100x100pt}}]{TEST}

\title{Article Title}

\begin{document}

\maketitle
\lipsum[1-8]
\end{document}
  • Hi Johannes and thanks for the answer and advice regarding fancyhdr. However, in your code the first page does not get a header. In particular, I want the first page to have a header that is different from the rest of the pages. Let me update the first post to clarify this – DoubleTrouble Oct 15 '14 at 7:54
  • updated the answer – Johannes_B Oct 15 '14 at 7:59
  • 1
    Thanks a lot! I wish the KOMA documentation was better, or at least easier to grasp for beginners. For fancyhdr there are so many excellent guides and tutorials. – DoubleTrouble Oct 15 '14 at 8:19
  • The authors english isn't the best. Even the original german documentation is hard to read at times. Little hint: he explains the basics and internal, and then comes a pretty simple example. So hang in there ;-) – Johannes_B Oct 15 '14 at 8:26
  • @Johannes_B Neither should secsty be used together with KOMAscript, because it may interfere with the very advance internal commands to format headings. – Sveinung Oct 15 '14 at 10:32

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.