Template:Rlm/doc

This template simply inserts a Unicode right-to-left mark (HTML, Unicode  ).

Example
Suppose a writer wishes to inject a run of Arabic or Hebrew (i.e. right-to-left) text into an English paragraph, with an exclamation point at the end of the run on the left hand side. "I enjoyed staying -- really! -- at his house." With the "really!" in Hebrew, the sentence renders as follows: I enjoyed staying -- באמת! -- at his house. produces

I enjoyed staying -- באמת! -- at his house.

(Note that in a computer's memory, the order of the Hebrew characters is &lrm;ב&lrm;,&lrm;א&lrm;,&lrm;מ&lrm;,&lrm;ת&lrm;.)

With an RLM added after the exclamation mark, it renders as follows: I enjoyed staying -- באמת! -- at his house. produces

I enjoyed staying -- באמת! -- at his house.

(Standards-compliant browsers will render the exclamation mark on the right in the first example, and on the left in the second.)

This happens because the browser recognizes that the paragraph is in a LTR script (Latin), and applies punctuation, which is neutral as to its direction, in coordination with the surrounding (left-to-right) text. The RLM causes the punctuation to be surrounded by only RTL text&mdash;the Hebrew and the RLM&mdash;and hence be positioned as if it were in right-to-left text, i.e., to the left of the preceding text.