# How to change subsection heading (e.g. center it)

I'd like to change the styling of \subsection in the memoir class.

The example is:

\documentclass[oneside, 12pt]{memoir}

\begin{document}
\subsection{A subsection - center me!}
\end{document}


This is easy enough with sections, eg

\setsecnumformat{Section \arabic{section}. \space}


However I wasn't able to find an equivalent for subsections. Is there one, or some alternative?

-

Using \setsubsecheadstyle{\bfseries\large\centering} seems to do the job:

The geometry package was included only to show the frame of the page for the image capture.

\documentclass[oneside, 12pt]{memoir}
\usepackage[showframe]{geometry}

\begin{document}
\subsection{A subsection - center me!}

\subsection{B subsection - center me!}
\end{document}

-

For the centering part see Peters solution

The \setsecnumformat is not a good name in this context, because in this case the sec part is not changeable (it is a name that has been used in LaTeX). Here is one way to extend it

\setsecnumformat{\csname my#1secformat\endcsname}
\newcommand\mysectionsecformat{Section \thesection. \space}
\newcommand\mysubsectionsecformat{Subsection \thesubsection. \space}
\newcommand\mysubsubsectionsecformat{Subsubsection \thesubsubsection. \space}

-