0

Am using the Overleaf online editor, and in order to use the polyglossia for Arabic fonts support package, I changed the compiler to XeLaTex. everything worked as expected, except for the titlesec package.

I was using \renewcommand{\thesection}{\arabic{section}} to remove the chapter number from the section numbering, but after the change, it didn't work.

I faced the same issue with \renewcommand{\thetable}{\arabic{table}} and \renewcommand{\thefigure}{\arabic{figure}}.

is there a way to fix this while still using XeLatex? because I need the Arabic support provided by it.

3
  • Welcome to TeX SX! Maybe try adding \counterwithin*{section}{chapter}
    – Bernard
    Commented Jun 20, 2021 at 22:17
  • It is better to add a minimal working example (MWE) which shows us the issue.
    – Salim Bou
    Commented Jun 21, 2021 at 6:55
  • @SalimBou I am new to this, thanks for the tip though, I'll make sure to do so the next time
    – AKRAM ABOU
    Commented Jun 21, 2021 at 7:19

1 Answer 1

0

The problem is bidi.sty which is loaded by polyglossia if you use any R-L languages. In the name of trying to properly format various structures in the document for R-L typesetting, it has a large amount of hardcoded overrides of different document class settings. You don't specify your document class, but it does things to most of the common document classes (I encountered this issue when I wanted to add a short example of some Hebrew text in my LaTeX book and had bidi overwrite the formatting that I had set up for figure and table captions).

It should be enough to put your \renewcommand statements after \usepackage{polyglossia} and its associated language declarations. I did a quick test to verify this, but I don't know what else you have in your document so I can't guarantee it.

1
  • Thank you! it worked perfectly, i placed the \renewcomman after \usepackage{polyglossia} and it worked for both sections and figures.
    – AKRAM ABOU
    Commented Jun 21, 2021 at 7:22

You must log in to answer this question.

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