# Conflict between babel magyar and scrlayer-scrpage

My [magyar]{babel} and scrlayer-scrpage packages seem not to be working together… This is a minimum example:

\documentclass{article}

\usepackage[magyar]{babel}
\usepackage{scrlayer-scrpage}

\begin{document}

\section{Test document}

This is a test document.

\end{document}


The error I get here is:

E: .../Tester.tex:6 Illegal parameter number in definition of \reserved@b \begin{document}

Can someone help me figuring out what it means? Thank you in advance!

• Welcome to TEX.SE! I know that magyar can cause problems. The solution described here seems to work also in your case. Apr 29 '16 at 11:49
• @campa might actually be a duplicate Apr 29 '16 at 11:58

It seems that

\makeatletter
\makeatother


after loading babel solves the problem.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[markcase=noupper,automark]{scrlayer-scrpage}
\usepackage[magyar]{babel}
\makeatletter

Note that I have used option automark for scrlayer-scrpage to get the section title in header.