is it possible to swap the numbering of the section block with it's title.
\section{Section}
like
Section 1
instead of
1 Section
I use
\documentclass[fleqn,12pt]{article}
is it possible to swap the numbering of the section block with it's title.
\section{Section}
like
Section 1
instead of
1 Section
I use
\documentclass[fleqn,12pt]{article}
By using the titlesec package with the explicit package option should give you what you want. You need to add #1 to the <before code> part of the \titleformat command:
\documentclass[fleqn,12pt]{article}
\usepackage[explicit]{titlesec}
\titleformat{\section}[hang]{\Huge\bfseries}{}{0pt}{#1\quad\thesection}[]
\begin{document}
\section{My First Section}
\section{My Second Section}
\end{document}
#1 represents the words of the title and does not work when explicit is not used, \thesection is the number of the section, and \quad is spacing.
A simpler version would be:
\documentclass[fleqn,12pt]{article}
\usepackage[explicit]{titlesec}
\titleformat{\section}[hang]{}{}{0pt}{#1\quad\thesection}[]
\begin{document}
\section{My First Section}
\section{My Second Section}
\end{document}
The form of titlesec formatting is as so:
\titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before-code>}[<after-code>]
This is similar to the question asked here:
Adding section number after section title with titlesec package
Edit, I'll try and break it down a little. The documentation is a bit vague regarding the label section.
\titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before-code>}[<after-code>]
\titleformat{<command>} is the part were you override an existing title command, such as \section or \chapter
[<shape>] defines the shape of the title, hang is the same as a normal title using display for example would yield a result similar to the standard chapter title format.
{<format>} defines the format of the title text and takes most standard latex values such as \Huge or \bfseries.
{<label>} defines the label of the section title but is no longer needed with the explicit package option and will be defined with #1 later.
{<sep>} is the separation between the title and the first paragraph and takes any standard latex length such as 1em or 12pt.
{<before-code>} this is where we define the position of the title text with #1 and then the number with \thesection giving a spacing between them with \quad (though you could use \hspace{<len>}).
[<after-code>] could be used to define underlines or such but isn't necessary in this example.
titlesec. – Bernard Oct 12 '16 at 14:31\sectionstatement to issueProblem Nºyou can put the word 'Problem' before the\thesectionand then issue\section{}. Or if a Problem has a name then\section{Name}and change the separator1emto something like--or whatever pleases you the most. – Guilherme Zanotelli Oct 12 '16 at 14:58\section{Euler's Theorem}normally produces "1. Euler's Theorem". You could rearrange things to have "Section 1. Euler's Theorem". But having "Euler's Theorem 1." would be wrong. If you want "Problem 1", et.c., I think you'd be better served by itemizing and using enumitem or a related package. – Teepeemm Oct 13 '16 at 15:30