0

I have question because I can't find anywhere answer. Is it possible in latex to number sections like this:

14 First (here I now `\addtocounter{section}{21}`)
          But how can i do it with subsections?
14.4 First Subsection
14.5 Second Subsection
6
  • What exactly is the question?
    – Mico
    Commented Jun 9, 2015 at 14:59
  • \addtocounter{subsection}{3}
    – JPi
    Commented Jun 9, 2015 at 14:59
  • 1
    Do you mean \documentclass{article} \begin{document} \setcounter{section}{13} \section{First} \setcounter{subsection}{3} \subsection{First} \subsection{Second} \end{document}?
    – LaRiFaRi
    Commented Jun 9, 2015 at 15:00
  • Probably yes, but i have couple more question : 1) How can i set up counter of equation(or something other similar) from like 14.5 14.8 14.9 2) How can i heading of page which look like on the left name, in the middle title on the right number page (starting from 145, how set it ?) and under everything line.
    – Hadson
    Commented Jun 9, 2015 at 15:16
  • 4
    since the question hasn't been answered yet, in this case, you should add in the questions about setting numbers; the answers are related. you should be able to edit your own question. Commented Jun 9, 2015 at 16:10

1 Answer 1

1

A call to \section steps the section counter before setting the actual title. So, using something like

\setcounter{section}{5}
\section{A section}% 6

will print the section as 6 A section, rather than perhaps a more intuitive 5 A section. The same goes for a subsection. So, if you want a specific sectional unit to have a number X, you can set it before that sectional unit to X-1:

enter image description here

\documentclass{article}

\begin{document}

\section{First}% 1

\addtocounter{section}{7}
\section{Second}% 8

\setcounter{section}{13}
\section{Third}% 14

\setcounter{subsection}{3}
\subsection{First subsection}% 14.4
\subsection{Second subsection}% 14.5

\end{document}

The only counter that doesn't work like this is the page counter, as it starts at 1 and is stepped after the page is constructed.

You must log in to answer this question.

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