# [Tex/LaTex] How to replace fancyhdr to a right scrbook way

fancyhdrkoma-script

I've seen it is not right to use fancyhdr with scrbook, I've got a code with fancyhdr and I want to replace it to scrbook. This is my code:

\usepackage{fancyhdr}

\pagestyle{fancy}
\rfoot{Oposiciones}
\renewcommand{\footrulewidth}{0.4pt}


I guess your document is oneside? Then you can use

\documentclass[oneside]{scrbook}

\clearpairofpagestyles
\ofoot{Oposiciones}
\cfoot[\pagemark]{}

\usepackage{blindtext}% dummy text
\begin{document}
\blinddocument
\end{document}


If your document is twoside there are two cases:

1. TEMA 13 should be on the left hand side on even pages and on the right hand side on odd pages? Then you can use the same code as for the oneside option because the i in \ohead means "inner".

2. TEMA 13 should be on the right hand side on both the even and the odd pages? Then you have to use \lehead and \lohead (le means left even, lo left odd).

Code for the second case:

\documentclass{scrbook}

\clearpairofpagestyles
\lefoot{Oposiciones}\lofoot{Oposiciones}
\cfoot[\pagemark]{}

\usepackage{blindtext}% dummy text
\begin{document}
\blinddocument
\end{document}