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
    Commented Jun 28, 2013 at 22:41

2 Answers 2

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 ! Commented Jul 2, 2013 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .