[Tex/LaTex] Memoir header for article

header-footermemoir

I am writing an article with memoir and the \pagestyle{ruled} is very nice but it keeps displaying CONTENTS every even (left) page (which I believe is a Chapter, but being my paper an article there are no chapters at all!).
What I would like to achieve is having the Section title (not in capitals) with its number on every page (with left/right alignment respectively), and the number centred at the bottom.
I know that the documentation is exhaustive, but the deadline is closer then ever and, unfortunately, I cannot dig into it right now. Moreover I couldn't find other questions with related purpose.

Best Answer

One possibility, with a slight variation on the ruled page style:

\documentclass[article]{memoir}
\usepackage{lipsum}

\makepagestyle{myruled}
\makeatletter
\makeheadposition{myruled}{flushright}{flushleft}{flushright}{flushleft}
\makeevenfoot{myruled}{}{\thepage}{}
\makeoddfoot{myruled}{}{\thepage}{}
\makeheadrule{myruled}{\textwidth}{\normalrulethickness}
\makepsmarks{myruled}{\@ruledmarks}
\makeevenhead{myruled}{\leftmark}{}{}
\makeoddhead{myruled}{}{}{\leftmark}
\makeatother
\pagestyle{myruled}

\begin{document}

\chapter{First section}
\lipsum[1-10]
\chapter{Second section}
\lipsum[1-9]

\end{document}
Related Question