Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question

1 Answer 1

up vote 5 down vote accepted

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}
share|improve this answer
    
This time, your answer is the way to go. :-) –  lockstep Dec 18 '11 at 1:59
    
@lockstep: well, it's a tie then :-) –  Gonzalo Medina Dec 18 '11 at 2:01
    
Not work. See my update post. –  Regis da Silva Dec 18 '11 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 '11 at 23:28
    
Thanks!!!!!!!!!!! –  Regis da Silva Dec 19 '11 at 1:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.