Skip to main content

Right-to-left paragraphs, aligned and justified

Three paragraphs, in Arabic and Hebrew, each holding a Latin date, a Latin word and numbers.

  • Direction rtl (CSS Writing Modes 3 2.1): every line is laid from the right margin, and the last line is ragged on the left
  • Embedded runs keep their order (UAX #9): the digits are never reversed and the date's parts stay in the order written
  • Justify under rtl (CSS Text 3 6.1): every line but the last is flush on both edges, the slack sits between words and not inside them, and the last line stays start-aligned, which is right (6.3)
  • start and end against left and right (CSS Text 3 7.1): the first pair follows the direction, the second is physical and does not, which is why a right-to-left document aligns with start

What to look for. The blue paragraph is aligned right, the green one is the same text justified: both end with a line flush right and ragged left. The orange one is Hebrew with the same shape.

Features used: PDF/A-4, PDF/UA-2 conformance, Arabic, Hebrew text