I have a document (witch is an update of an old one) with a sectioning numbering system like this:

\chapter       1
\section       1.1
\subsection    1.1.1

But, in an old version of this document, the numbering was the following one:

\chapter       A
\section       A.1
\subsection    A.1.i
\subsubsection A.1.ii.1
\paragraph     A.1.iii.1.a

The goal then is to use the new numbering but remain the old numbering refference in the margin.

Then I put in the preamble the following commands:

\usepackage{titlesec} % Usefull to change the sectioning style
\usepackage{marginnote} % To put the old numbering in the marging

\setcounter{secnumdepth}{4} % activating \paragraph numbering


For the moment, I could put “someting” in the margin next each section. But how to translate the arabic numbers (1, 2, 3… 9…) into letter numbering (A, B, C… I…) in section margin? Same question for \subsection how to translate arabic numbers into lowcase roman (i, ii, iii… ix…) and print the full subsection number like this “A.1.i”.

Same question with \paragraph, etc.

As example, near the paragraph, should appear the old sectioning number style B.1.v.1.g.

  • 3
    As usual: A minimal working example instead of code snippets would be helpful to do testing of your code an our suggestions quickly … Without, I would just say: Use, e.g. \Alph{section}.\arabic{section}.\roman{subsection}.
    – cabohah
    Nov 25, 2023 at 9:41
  • 1
    This is usually done by redefining \thesection etc. \def\thesection{\Alph{section}} \def\thesubsection{\thesection.\arabic{subsection}} \def\thesubsubsection{\thesubsection.\roman{subsection}} No titlesec needed. Nov 25, 2023 at 15:46
  • Please clarify whether the old style numbering matches the new style or doesn't need to.
    – egreg
    Nov 25, 2023 at 18:02

1 Answer 1


Define "old-style counters" and add them to the output of the sectioning commands. The parameters for \titlefomat come from §8.2 of the titlesec documentation.



% helper macro
\newcommand*{\llapinheading}[1]{\makebox[0pt][r]{\csname oldthe#1\endcsname\kern15pt}\csname the#1\endcsname}

   {\makebox[0pt][r]{\oldthechapter\kern15pt}\chaptertitlename\ \thechapter}{20pt}{\Huge}


You must log in to answer this question.

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