[Tex/LaTex] How to put section number into the right side of section title in LaTeX

memoirsectioning

I am a novice for LaTeX, so need you guy's help.

I am wondering how to change section style in order to put the section number into the right side of section title in LaTeX, especially memoir class. So, I want it to show like [chapter number] section title [section number]

For example, let a chapter has three sections like section one, section two, and section three. Then, they should appear like

1. section one 1.
1. section two 2.
1. section three 3.

Can anybody do that for me?

Best Answer

In case you do not want the section number to the right of the section title in the table of contents (see BernS' answer), you could use the titlesec package to redefine the section header layout:

\documentclass{memoir}

\usepackage{lipsum}

\usepackage[explicit]{titlesec}
% \titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before>}[<after>]
\titleformat{\section}[hang]{\normalfont\Large\bfseries}%
    {\thechapter.}{4pt}%
    {#1 \arabic{section}.}

\begin{document}
\tableofcontents
\chapter{Chapter}
\section{Section one}
\lipsum[1]
\section{Section two}
\lipsum[2]
\section{Section three}
\lipsum[3]
\end{document}

Credits go to Raphink's answer to my question regarding a problem I had with reading documentation properly. Consider voting his answer up. ;-)

Related Question