%% Header style

\makepagestyle{loveheadings}
\makeevenhead{loveheadings}{\normalfont{\thepage}}{}{\normalfont\slshape\leftmark}
\makeoddhead{loveheadings}{\normalfont\slshape\rightmark}{}{\normalfont{\thepage}}
\makerunningwidth{loveheadings}{\textwidth}
\makeheadrule{loveheadings}{\textwidth}{0pt} % \normalrulethickness
\makeatletter
    \makepsmarks{loveheadings}{%
      \let\@mkboth\markboth
      \def\chaptermark##1{%
        \markboth{{%
          \ifnum \c@secnumdepth >\m@ne
            \if@mainmatter
              \strut\@chapapp\ \thechapter. \thinspace
            \fi
          \fi
          ##1}}{}}%
      \def\tocmark{\markboth{{\contentsname}}{}}%
      \def\lofmark{\markboth{{\listfigurename}}{}}%
      \def\lotmark{\markboth{{\listtablename}}{}}%
      \def\bibmark{\markboth{{\bibname}}{}}%
      \def\indexmark{\markboth{{\indexname}}{}}%
      \def\sectionmark##1{%
        \markright{{%
          \ifnum \c@secnumdepth > \z@
            \strut\thesection. \thinspace
          \fi
          ##1}}}%
    }
\makeatother
\pagestyle{loveheadings}
