4

I have changed the section numbering from numerals to letters with the command

\renewcommand{\thesection}{\alph{section})}

in the preamble. For example, the first \section{} would be printed like this in the pdf:

a)

I am interested in skipping a couple of sections in the document. For example, lets say sections b) and c) such that the section numbering after a) would be d). Thus the result of another \section{} command in the preceeding example would render the following output in the pdf:

a)

d)

How can this be done in LaTeX?

Best regards,

Gus

5
  • Hi and welcome, you could simply issue two \stepcounter{section} or set the counter with \setcounter{section}{4}. But i guess there is logic behind this, so there might be a different (and better approach). Can you explain why you want to skip?
    – Johannes_B
    Commented Jan 18, 2015 at 13:13
  • 1
    \addtocounter{section}{2} after the first section does the same effectively as using \setcounter{section}{4} and is independent of the current section number (which is not the case for \setcounter{section}{4})
    – user31729
    Commented Jan 18, 2015 at 13:18
  • Note the internal counter is still a number so you can set it add to it, etc, it is just the final printing of the number that is alphabetic Commented Jan 18, 2015 at 13:43
  • Johannes_B. I am writting solutions to a textbook that does not have solutions to all questions.
    – Gus
    Commented Jan 18, 2015 at 14:27
  • @Christian. It was exactly what I was looking for. Thanks!
    – Gus
    Commented Jan 22, 2015 at 11:14

1 Answer 1

3
\documentclass{article}

\renewcommand{\thesection}{\alph{section})}


\begin{document}

\section{First}

\addtocounter{section}{2}

\section{Second, but counted as fourth}

\end{document}

Another approach uses more 'configurability':

\documentclass{article}

\renewcommand{\thesection}{\alph{section})}

\newcounter{sectionstoskip}
\setcounter{sectionstoskip}{2}

\begin{document}
    \section{First}
    \addtocounter{section}{\value{sectionstoskip}}
    \section{Second, but counted as fourth}
    \addtocounter{section}{\value{sectionstoskip}}
    \section{Third, but counted even otherwise}
 \end{document}

If the sections should not be skipped any more, just use \setcounter{sectionstoskip}{0} in the beginning.

enter image description here

You must log in to answer this question.

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