[Tex/LaTex] LaTeX Error: File `scrpage2.sty’ not found

errors

Can someone explain how to solve this problem: LaTeX Error: File `scrpage2.sty' not found? I read all the answers but didn't understand what to do. Today I install miktex 2.9 and winedt 10.3.

Best Answer

The author has declared the package scrpage2 obsolete. It is no longer included in TeX live and MikTeX. The package is still available on CTAN (https://ctan.org/pkg/scrpage2, https://ctan.org/pkg/koma-script-obsolete), but it would have to be installed manually from the .dtx source. See also https://komascript.de/faq_scrpage2_en.

Users are advised to switch to the successor package scrlayer-scrpage. If you have

\usepackage[<options>]{scrpage2}

in your preamble, replace it with

\usepackage[<options>]{scrlayer-scrpage}

Apparently all commands and options of scrpage2 are also recognised by scrlayer-scrpage, so a switch should be possible. But users are strongly encouraged to double check the results and consult the .log file as well as the manual for hints about deprecated, obsolete or otherwise outdated commands.

(Just to be clear, scrlayer-scrpage is part of the regular KOMA-Script bundle and can be installed as the package koma-script in both MiKTeX and TeX live if it isn't installed already.)

If some code/package beyond your control loads scrpage2, contact the author and look into alternatives (scrpage2 has been up for deprecation for quite a while [about six years; it has thrown warnings for at least two years according to https://komascript.de/faq_scrpage2_en], so if the code author hasn't reacted until now, that suggests they might not follow the development of their code that closely any more). If you must use external code that uses scrpage2, you can try the workaround suggested at https://komascript.de/faq_scrpage2_en:

Add

\RequirePackage{scrlfile}
\ReplacePackage{scrpage2}{scrlayer-scrpage}

to your preamble before the \documentclass line. That will load scrlayer-scrpage when any code requests scrpage2.

Related Question