2

The following code leads to an error

! LaTeX Error: File `scrlayer-scrpage.sty' not found.

Here is my code:

\documentclass[fontsize=10,a4paper,twoside]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[automark,headsepline,footsepline]{scrlayer-scrpage}
\usepackage[utf8]{inputenc}
\usepackage[frenchb]{babel}
\usepackage{a4}

\usepackage{scrpage2}
\KOMAoptions{BCOR=2mm,DIV=15}

\pagestyle{scrheadings}
\cfoot{Le pied de page}
\lehead{En haut à gauche pair}
\lohead{En haut à gauche impair}
\cehead{centre pair}
\cohead{centre impair}

\begin{document}
My first latex document

Hello world !
\end{document}

I don't understand why since KOMA-script is installed (if I remove the scrlayer-scrpage line, it works). I run pdftex under Mac OSX 10.9.1 (pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)).

What should I do to use scrlayer-scrpage package ?

EDIT: THE SOLUTION

As indicated in comments, the problem came from an incomplete update of the packages. So contacting the responsible for scrlayer-scrpage package was the solution, and then update your installation.

lauhub
  • 766
  • You should update to the latest KOMA-Script version 3.12. – Speravir Feb 12 '14 at 23:58
  • 1
    Welcome to TeX SE. You can update KOMA-Script, as @Speravir, suggests by updating your installation of TeX using tlmgr (or a GUI wrapper if MacTeX provides one - I'm assuming you're using MacTeX). In Terminal, you would write sudo tlmgr update --all and give your password. – cfr Feb 12 '14 at 23:59
  • I forgot it totally, cfr forgot the link, so: Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Speravir Feb 13 '14 at 00:02
  • And since scrlayer-scrpage is the successor of scrpage2 you do not need at all to load the latter. – Speravir Feb 13 '14 at 00:34
  • 4
    This question appears to be off-topic because the underlying issue is caused by an outdated version of KOMA-Script. – Speravir Feb 13 '14 at 04:51
  • Thanks for the very fast replies ! @Speravir: Yes I agree, because KOMA-script was not up-to-date when I asked it. So what should I do ? Shall I remove the question ? – lauhub Feb 13 '14 at 07:55
  • I now have the following error: LaTeX Error: Command \scr@fnt@headtopline already defined. Or name \end... illegal, see p.192 of the manual. – lauhub Feb 13 '14 at 07:58
  • Solved: one should remove the scrpage2 package declaration – lauhub Feb 13 '14 at 08:04
  • @lauhub: It’s your choice, whether you want to delete the question. But I want to advice you not to do this. It could be useful for others, despite it is marked as off-topic. – Speravir Feb 13 '14 at 19:01
  • @Speravir, can you pls have a look at this post http://tex.stackexchange.com/questions/199167/how-to-fix-the-compilation-failure-in-this-mwe-in-koma-script – doctorate Sep 03 '14 at 15:42

0 Answers0