English paragraph in arabic document direction not left to right

when i add an English paragraph to a document writing in Arabic and the paragraph style text direction is: superordinate object settings, i think it should be from left to right. but this is not happening.

file attached:
test1.odt (15.9 KB)

LO: Version: 24.2.2.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 4; OS: Linux 6.9; UI render: default; VCL: kf6 (cairo+wayland)
Locale: ar-DZ (en_US.UTF-8); UI: en-US
24.2.2-3
Calc: threaded
OS: Manjaro

The problem is in page style configuration. The page is the “superordinate object” for the paragraph. Page has been set for right to left. This property is inherited by the paragraph.

IMHO, this is either a bug or a design shortcoming. When a paragraph is completely written in a single language, this language properties should be used for text rendering. Script detection works more or less satisfactorily in mixed paragraphs; it should work on homogeneous paragraphs (which does not seem the case).

Writing multi-lingual documents is already difficult when you work with languages belonging to the same script system. The problems grow exponentially in mixed script context (RTL+LTR).

Present fix is to create dedicated paragraph styles. Your offending text is styled Bibliography 1. I suppose that the number of paragraphs fully written in non ar_DZ is quite limited (by “number”, I mean “category” corresponding to a paragraph style). Taking the example of Bibliography 1:

  1. right-click on Bibliography 1 in the style navigator and New
    Doing so, the new style is an exact duplicate of Bibliography 1. Any modification applied to the “ancestor” will also be forwarded to the new style. This way, you only need to care for the ancestor style. You manage only the ancestor; both styles are kept in sync
  2. name this style Bibliography 1 (en) in Organizer
  3. in Alignment, change Text direction to Left-to-right (LTR)
    Do not change any other parameter in any tab, otherwise the new style could no longer be automatically updated when the ancestor is.

Apply this style to the offending paragraphs.

2 Likes

thank you. i did that.