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.
1 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}
-
Almost! Instead of the
Chapter
I wanted to display the currentSection
(since I am writing an article there are not chapters but only sections in my paper).– AtcoldAug 10, 2013 at 21:07 -
1@Atcold using
memoir
with thearticle
option,\chapter
acts as\section
in the standardarticle
class. Aug 10, 2013 at 21:13 -
Ok, in my situation I've been using
\section
anywhere (and 'fixed the numbering'), so how could I overcome this and point to my sections?– AtcoldAug 10, 2013 at 21:15 -
1@Atcold but what you are doing produces inconsistencies; the ToC, LoF, LoT, references will have different headings (titles) than your sections, and there might be additional issues. In any case, change
\leftmark
to\rightmark
in both places in my code above and see if it helps. I would suggest you, instead, to keep the intended structure for the sectional units. Aug 10, 2013 at 21:19 -
1Yes, sorry; I meant an inconsistency in the entries in the ToC; if you use
\section
, entries will be typeset as section entries in a book, which is different from using\chapter
. Aug 10, 2013 at 23:51