add tag
Joseph
It should be pretty straightforward, but I couldn't figure it out so far: page numbers work for headers and in the plain style, but not in the others. Nothing I do seems to affect `\thepage`, not even `\textbf` etc.

    \documentclass[sfheadings]{mwbk}
    \usepackage{lipsum}
    
    
    %\pagestyle{headings}
    
    
    \makeatletter
    \let\ps@opening\ps@plain
    \let\ps@closing\ps@headings
    \renewcommand\heading@font{\sffamily\bfseries}
    \renewcommand\hf@plain{%
      \let\@oddhead\@empty
      \def\@oddfoot{\heading@font\hfil\thepage\hfil}% << this works
      \let\@evenhead\@empty
      \let\@evenfoot\@oddfoot
      }
    \renewcommand\hf@headings{%
      \def\@oddhead{\heading@font\rightmark\hfil\thepage}%
      \let\@oddfoot\@empty
      \def\@evenhead{\heading@font\thepage\hfil\leftmark}% <<< heading@font only affects \leftmark
      \let\@evenfoot\@empty
        }
    \makeatother
    
    
    \begin{document}
    \chapter{A chapter}
    \lipsum[1-10]
    \section{asdf}
    \lipsum[15-17]
    
    
    \end{document}
Top Answer
samcarter
You can apply the changes you make by using `\hf@headings`:

```
\documentclass[sfheadings]{mwbk}
\usepackage{lipsum}


%\pagestyle{headings}


\makeatletter
\let\ps@opening\ps@plain
\let\ps@closing\ps@headings
\renewcommand\heading@font{\sffamily\bfseries}
\renewcommand\hf@plain{%
  \let\@oddhead\@empty
  \def\@oddfoot{\heading@font\hfil\thepage\hfil}% << this works
  \let\@evenhead\@empty
  \let\@evenfoot\@oddfoot
  }
\renewcommand\hf@headings{%
  \def\@oddhead{\heading@font\rightmark\hfil\thepage}%
  \let\@oddfoot\@empty
  \def\@evenhead{\heading@font\thepage\hfil\leftmark}% <<< heading@font only affects \leftmark
  \let\@evenfoot\@empty
    }
\hf@headings
\makeatother


\begin{document}
\chapter{A chapter}
\lipsum[1-10]
\section{asdf}
\lipsum[15-17]


\end{document}
```

![Screen Shot 2020-09-25 at 17.46.07.png](/image?hash=ce2e468a4f8b65648935fecede6f48bff56aee2c23ef28bc87c3d8964c254952)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.