4

is it possible to have for example sections numbered in row above ? kind of like chapters work

instead of having:

1 Section alpha

2 Section beta

i'd like to have

Section 1

Alpha

Section 2

Beta

is it possible to achieve with generic heading style?

1
  • 3
    What \documentclass are you using? Perhaps you can update your post to include a minimal working example (MWE). This should start with \documentclass and end with \end{document}. It just speeds up getting answers your way.
    – Werner
    Jun 28 '13 at 22:41
5

You can do it with the package titlesec.

\documentclass{article}

\usepackage{titlesec}

\titleformat{name=\section}[display]
 {\large\bfseries}
 {Section \thesection}
 {.5ex}
 {\Large\bfseries}

\begin{document}

Some text before.

\section{A section}

\subsection{A subsection}

Text.

\section*{A numberless section}

Other text.

\end{document}

Adjust at will; the size of "Section 1" should be less than the title's size, in my opinion.

enter image description here

1
  • great! this is exactly what i was looking for, thanks a lot ! Jul 2 '13 at 19:51
1

With the following code I am able to produce this:

Result obtained

Is it what you want?

\addtocounter{section}{1}
\section*{Section \thesection \\ Alpha}

\addtocounter{section}{1}
\section*{Section \thesection \\ Beta}

If you want to automate it you can define a new command before the \begin{document} command:

\newcommand{\mysection}[1]{\addtocounter{section}{1}%
\section*{Section \thesection \\ #1}}

And use this new command instead of the usual \section command

\mysection{Alpha}

\mysection{Beta}

NOTE: This has been obtained using the article class.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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