7

How would one apply \nouppercaseheads only to section headers when using the memoir document class?

\documentclass[a4paper]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lipsum}
% Define a new pagestyle 'rgheadings'
\copypagestyle{rgheadings}{headings}
\makeheadrule{rgheadings}{\textwidth}{\normalrulethickness}
% remove 'chapter' of headings style
\addtopsmarks{rgheadings}{}{
  \createmark{chapter}{both}{shownumber}{}{. \space}
}

% remove number section of headings style
\addtopsmarks{headings}{}{
  %i need \nouppercaseheads only section
  \createmark{section} {right}{nonumber}{}{}
}

% define secao com letra minuscula
\def\sectionmark#1{\markright{#1}}

\begin{document}
\pagestyle{rgheadings}

\chapter{Memoir with headings style}

\section{Mysection}

\lipsum[1-30]

\end{document}

1 Answer 1

6

You can redefine \sectionmark:

\documentclass[a4paper]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lipsum}

\pagestyle{headings}
\def\sectionmark#1{\markright{#1}}

\begin{document}

\chapter{Memoir with headings style}

\section{My section}

\lipsum[1-30]

\end{document}
6
  • This time, your answer is the way to go. :-)
    – lockstep
    Dec 18, 2011 at 1:59
  • @lockstep: well, it's a tie then :-) Dec 18, 2011 at 2:01
  • Not work. See my update post. Dec 18, 2011 at 22:46
  • 1
    @RegisdaSilva: Move \pagestyle{rgheadings} before \def\sectionmark#1{\markright{#1}}, as Gonzola did with headings in his answer.
    – lockstep
    Dec 18, 2011 at 23:28
  • @Gonzalo Medina How reinsert section number, example, 1.1 My section? Dec 19, 2011 at 3:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .