The third subsection in the second subsection of the first section should be numbered 1.2.3. This holds also for RTL languages, since numbers, including Dewey numbering is still LTR even in an RTL language. Babel seems to have this right, but polyglossia is confused. How do you fix that?

Here is an example:

\newfontfamily\hebrewfont[Script=Hebrew]{Ezra SIL}% or{SBL Hebrew}

\section{1st Sect. Should be \#1}
\subsection{1st Subsect. Should be \#1.1}
\subsubsection{1st Subsubsect. Should be \#1.1.1}
\subsubsection{2nd Subsubsect. Should be \#1.1.2}
\subsection{2nd Subsect. Should be Numbered 1.2}
\section{2nd Sect. Should be \#2}
\subsection{1st Subsect. Should be \#2.1}
\subsubsection{1st Subsubsect. Should be \#2.1.1}
\subsubsection{2nd Subsubsect. Should be \#2.1.2}
\subsubsection{3rd Subsubsect. Should be \#2.1.3}
\subsection{2nd Subsect. Should be \#2.2}
\subsubsection{1st Subsubsect. Should be \#2.2.1}
\subsubsection{2nd Subsubsect. Should be \#2.2.2}
  • No, babel is confused. This is the correct format. It is true that in RTL, numbers should be typeset LTR but not in this case. because when it is 3.2.1, 1 stands for section, 2 stands for subsection and 3 stands for subsubsection. This is not a number that should be typeset LTR anymore.
    – IRAN
    Feb 8, 2011 at 14:11
  • I second Vafa on this, I find that a feature not a bug. Feb 8, 2011 at 14:49
  • 1
    Do not know about Farsi or Arabic, but I am 100% certain that Hebrew does not work this way at all. Take a look at e.g., official government regulations: molsa.gov.il/MisradHarevacha/HomePageMenu/Regulations/… . (Use Google translate if you cannot read Hebrew(
    – Yossi Gil
    Feb 8, 2011 at 19:06
  • Yossi Gil: See my answer however as I mentioned this is incorrect.
    – IRAN
    Feb 9, 2011 at 3:51
  • Vafa: I respect your judgment, but, alas, Hebrew simply does not abide by it. Section 1, subsection 2, must be written LTR in Hebrew, which is "1.2".
    – Yossi Gil
    Feb 9, 2011 at 5:01

2 Answers 2


Put this in the preamble of your document and it will give your desired results, however I do not think this is the right thing to do:

  • Neat solution. Should be added to Hebrew options.
    – Yossi Gil
    Feb 9, 2011 at 5:13
  • 1
    Ok, then you should contact the author of polyglossia with good documentation about why it should be done this way for Hebrew.
    – IRAN
    Feb 9, 2011 at 6:02
  • I just did. I hope he will make the change.
    – Yossi Gil
    Feb 11, 2011 at 8:50
  • 1
    It seems that this solution no longer works. I'm using bidi package version 35.10
    – Moshe
    Nov 16, 2019 at 9:19
  • 1
    A solution that does appear to work is to replace the period inside \SepMark by Unicode LRO (U202D) followed by a period. Also, it appears that there is no need to redefine \SepMark anymore
    – Moshe
    Nov 16, 2019 at 10:12

I don't know if all RTL languages respect this convention. But you can easily change the numbers in your preamble:

\renewcommand{\thesection}{\LR{\thechapter\@SepMark\arabic{section}}} % if using book class
  • Thanks. Great help here. IMHO, this should go in the hebrew.ldf file. There needs to be a way for adapting this to a book rather than an article class. One perhaps could use \let to save the previous definition and redefine it wrapping it with \LR.
    – Yossi Gil
    Feb 8, 2011 at 19:08
  • @Yossi all of the section counters are basically the same, so it's not hard to redefine them too in the same way. I've added code to the example for the book class to redefine \thesection in the same way.
    – Alan Munn
    Feb 9, 2011 at 2:53
  • This does not work as expected in the upcoming version of bidi. Get bidi from bitbucket and test if this actually works.
    – IRAN
    Feb 9, 2011 at 3:36
  • @Vafa Surely I can only be expected to test code with existing versions of a package, unless I'm supposed to be clairvoyant :-). It works with the current version, which is all I have. But your solution is certainly simpler, and seems to work with both the existing and (I assume) upcoming version.
    – Alan Munn
    Feb 9, 2011 at 4:13
  • @Alan Munn: My apologies. What I meant was that it would not work with the new version of bidi since bidi changes some of its old definitions.
    – IRAN
    Feb 9, 2011 at 6:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.