LaTex and GOST 2.503-90 insertion of 1a 2a pages, etc. into a ready-made document

Question:

Interested in the question of counters. Is it possible to insert pages 10a, 10b, then 18a, 18b into a ready-made document.

as described in GOST 2.503-90. Quote

When adding a new sheet of a document, it is allowed to assign it the number of the previous sheet with the addition of another lowercase letter, for example 3a, while the number of pages on the title sheet is changed

The format of sheets and the place to output non-sheet numbers are not so important at the moment

I started writing a command that creates a page and in this page overrides the counter and starts a new counter, and everything works to insert one sheet, but when you call the command a second time, it does not work out correctly.

This is what I want to get in the end Download on DropBox (done in MS Word )

Answer:

in the babel package, in the Russian and Ukrainian parts, there is a useful macro \asbuk that acts like \arabic and \roman , returning Arabic and Roman numerals matching the passed argument and returning Cyrillic letters.

reworked the code from this answer: Intervening pages that do not add to page-count?

the following example turned out:

\documentclass{article}
\usepackage[russian]{babel}
\usepackage[utf8]{inputenc}

% существенная часть:
\newcounter{mypagecount}
\setcounter{mypagecount}{0}
\newenvironment{interlude}{
  \clearpage
  \setcounter{mypagecount}{\value{page}}
  \addtocounter{mypagecount}{-1}
  \setcounter{page}{1}
  \renewcommand{\thepage}{\arabic{mypagecount}\asbuk{page}}
  }{%
  \clearpage
  \setcounter{page}{\value{mypagecount}}
  \stepcounter{page}
  }
% конец существенной части
\usepackage{lipsum}

\begin{document}
\tableofcontents
\section{section 1}
\lipsum[1-10]

\begin{interlude}
\section{section 1a}
\lipsum[5-15]
\end{interlude}

\section{section 2}
\lipsum[10-20]

\begin{interlude}
\section{section 2a}
\lipsum[5-15]
\end{interlude}

\section{section 3}
\lipsum[10-20]

\end{document}

inserts are done using the interlude environment (the name is arbitrary, taken from the example from the link).

the numbering of the resulting pages: 1, 2, 3, 3a, 3b, 3c, 4, 5, 5a, 5b, 5c, 6, 7.

this is the numbering that goes into the table of contents.

addition

the above solution works well if the inserts are placed at the page break (for example, before a new chapter).

if you want to make an insert in an arbitrary place, for example, between pages x and x+1 , so that the paragraph that “flows” from the end of page x to page x+1 continues to “flow” after we do “ insert "between pages x and x+1 , then you should" wrap "the" insert "in a call to the afterpage macro (from the package of the same name):

\afterpage{
 \begin{interlude}
 текст ваставки
 \end{interlude}
}
Scroll to Top