We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

Changing back and forth, RTL and LTR

asked 2020-05-14 18:36:07 +0200

briggschaney gravatar image

I am inserting Arabic words into an English language document. How can I switch the direction of text back and forth? When I type an Arabic word, Libreoffice types the word correctly (RTL), but it gets stuck in RTL and begins inserting the English words on the wrong side of the Arabic word, and I can't switch it back.

Note that CTRL+ SHIFT (right or left shift) and CTRL + A and CTRL + D, do not do anything at all.

edit retag flag offensive close merge delete


There is no problem for me. When I enter an English word at the start of a blank document with default settings, it's LTR. Switching to an Arabic keyboard (I used Arabic 101 Basic in Keyman) and typing a character causes LibreOffice to start a RTL word to the right of the first word. Then switching back to an English keyboard starts a LTR word to the right of the other two words. It works smoothly. Is this the behavior you want?

Perhaps your font or encoding has a problem. Make sure that Tools -> Options -> Language Settings -> Languages -> Complex text layout is checked. Are you using a Unicode font? What is the name of the font? Also, please edit the question to mention your operating system and version of LibreOffice.

Jim K gravatar imageJim K ( 2020-05-15 20:04:28 +0200 )edit

4 Answers

Sort by » oldest newest most voted

answered 2020-05-22 09:11:17 +0200

gabix gravatar image

You can try to force a specific direction by Insert → Formatting mark → Left-to-right mark/Right-to-left mark.

edit flag offensive delete link more


It is very limited, they should add at least RLM, LRM, RLE, LRE, PDF to be able to cover most of the case (I translate softwares from English to Arabic, so those character control covers all my needs).

libre officer gravatar imagelibre officer ( 2020-06-13 19:05:22 +0200 )edit

answered 2020-06-13 18:56:44 +0200

libre officer gravatar image

updated 2020-06-13 20:34:48 +0200

‪The problem with mixing RTL and LTR is that symbols (spaces included) are neutral to text direction, so they automatically follow the previous text direction, which also changes according to the character of the language used.‬

Imagine you want to write this single line :‎

‪The استقامة‎ : (‫فعل : استقام [past] - يستقيم [present] - استقم [imperative]‬)

You get,‎ this, if you have LTR as default :‎

‪The استقامة : (فعل : استقام [past] - يستقيم [present] - استقم [imperative])‬

Or that, if you have RTL as default :‎

‫The استقامة : (فعل : استقام [past] - يستقيم [present] - استقم [imperative])‬

To correct the problem I will use Windows Notepad.‎‬

you can use any text editor that support unicode bidirection characters.‎‬

‪First, we know that the example is an LTR paragraph, so we insert LRE unicode character, then type The then استقامة,‬

LREThe استقامة‬

‪Type space, colon and the open parenthesis,‎‬

LREThe استقامة : (‬

‪Problems are going to happen here : If you type a letter after the parenthesis this will changes its direction according the letter, if you type in Arabic, the text and parenthesis will continue to the left of استقامة .If you type Latin letters then the text and parenthesis will continue to the right of استقامة.‬

‪To avoid this problem we want the Arabic word to behave as if it was a Latin word, so we insert LRM unicode character after it to force this behaviour,‎‬

LREThe استقامةLRM : (‬

‪Now, we want to type inside the parenthesis, but wait ! There is a mixed LTR and RTL text and symbols and spaces!‎‬

‪The solution is that we notice that the sentence between parenthesis follows a RTL direction, in that case, we insert RLE unicode character,‎‬

LREThe استقامةLRM : (RLE

‪then continue typing all remaining things except the closing parenthesis (type the begin and closing brackets as if you normally type Latin text),‎‬

‪‪RLEThe استقامة ‎LRM: (RLE‫فعل : استقام [past] - يستقيم [present] - استقم [imperative]‬‬

‪then insert the unicode character PDF Pop Directional Format which closes the RTL block and type the closing parenthesis,‎‬

RLEThe استقامة ‎LRM: (RLE‫فعل : استقام [past] - يستقيم [present] - استقم [imperative]‬PDF)‬

‪And then, you close the LTR paragraph with the PDF unicode character,‎‬

RLEThe استقامة ‎LRM: (RLE‫فعل : استقام [past] - يستقيم [present] - استقم [imperative]‬PDF)PDF

‪Now the paragraph will keep the same order even if you change the global text direction.‎‬

‪Finally🥴, you select all (prefer CTRL+A to be sure that you will copy all invisible control characters), then paste it in your Writer document.‎‬

‪This is a summary in notepad and how to access the unicode control characters :‬ image description

‪More info : https://en.wikipedia.org/wiki/Bidirec...

edit flag offensive delete link more

answered 2021-04-04 20:46:18 +0200

image description

edit flag offensive delete link more

answered 2020-05-22 04:20:46 +0200

Thoriq gravatar image

Click right in any icon below toolbar, select customize toolbar, rechecklist rtl and ltr tool

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-05-14 18:36:07 +0200

Seen: 657 times

Last updated: Apr 04