Consider a catalog line containing the Arabic word كتاب (kitāb, pronounced roughly kee-TAAB, meaning “book”), the number 2026, the abbreviation PDF, and a price in parentheses. The Arabic letters form a right-to-left run. The digits and Latin abbreviation retain left-to-right internal order. Parentheses and other neutral marks take their placement from the directional context around them. Put the line inside a left-to-right interface without declaring its relationships and punctuation can appear to wander.

Aligning the line to the right changes its position. It does not supply those relationships.

Right-to-left publishing is often described as mirroring. The metaphor is attractive because an interface may appear to reverse: a book can open from the other side, the next page may lie to the left, and navigation controls may trade positions. Text is not a picture that can be flipped. It contains several directional systems, some of which reverse, some retain their order, and some need explicit context.

The practical way through is to separate four layers: character order, paragraph direction, layout flow, and publication progression.

Characters are stored for meaning

Unicode generally stores text in logical order, the sequence in which content is interpreted, rather than the order marks happen to occupy from the left edge of a screen. The Unicode Bidirectional Algorithm resolves how characters with different directional properties should display together.

Strong right-to-left characters establish one kind of direction. Strong left-to-right characters establish another. Numbers have defined behavior. Spaces and punctuation are often weak or neutral and take cues from context. Explicit markup or controls can establish embeddings, overrides, and isolates where default inference is insufficient.

Manually reversing source text is destructive because the stored sequence becomes a screenshot of one arrangement rather than a representation of language. It may look correct in a crude field and fail when edited, searched, copied, wrapped, or inserted elsewhere.

The algorithm also explains why punctuation failures are patterned. A parenthesis can attach to the wrong directional run. A dash between phrases can inherit an unexpected context. A product code or URL can draw adjacent marks toward its left-to-right sequence. The renderer is applying rules to information that may be incomplete.

Direction is not alignment

Paragraph base direction establishes a context in which bidirectional text is resolved. A right-to-left paragraph can be left-aligned for a deliberate design reason and remain right-to-left. A left-to-right paragraph can be right-aligned and remain left-to-right. Alignment positions a line within a box; direction affects its content order and the treatment of neutral marks.

In HTML, the `dir` attribute expresses direction semantically. `rtl` establishes a right-to-left context and `ltr` a left-to-right one. `auto` can help with unknown user-generated strings by deriving direction from content, though known publication language should normally be declared deliberately.

An opposite-direction phrase inside a paragraph often needs isolation. Suppose a right-to-left sentence includes an English book title followed by punctuation. If the title is dropped into the line without a boundary, its internal characters can influence marks outside it. Bidirectional isolation tells the algorithm to treat the phrase as a unit whose internal direction should not leak into its surroundings. W3C guidance recommends semantic markup such as `bdi` or an appropriately directed span for these cases.

Titles, names, quotations, citations, equations, model numbers, and URLs may require language and direction at a finer level than the paragraph. A publication that strips those distinctions during import asks the display engine to guess.

Layout has a start before it has a left

Page designs contain margins, padding, borders, floats, icons, and controls. Hard-code all of them to left and right and the layout treats one direction as the original and another as its reflected exception.

CSS logical properties offer another vocabulary. Inline-start and inline-end refer to the beginning and end of a line according to writing direction. Block-start and block-end refer to progression between lines or blocks according to writing mode. A margin at inline-start can be physically left in an English horizontal layout and physically right in an Arabic one. The design intention survives because it was expressed as a relationship rather than a coordinate.

Some physical properties remain meaningful. A photograph has a real left side. A map may use geographic orientation. Directional arrows and progress indicators may need reversal; logos, clocks, and media controls may not. An icon should be reviewed for what it represents rather than processed through a bulk mirror.

Page conventions also differ among Arabic, Hebrew, Persian, Urdu, and other right-to-left language communities. They do not form one typographic culture. A standards-conforming layout can remain culturally inept. The technical layers make language-expert review more productive; they do not replace it.

A book can progress right-to-left while a line does something else

EPUB packages can declare right-to-left page progression. A reading system can then stage the next page or spread in the expected direction. This property belongs to publication sequence. It does not reorder characters in the content documents.

Imagine an Arabic-language EPUB whose spine lists chapter files in logical reading sequence: chapter one, then two, then three. The package declares right-to-left progression, so a paginated reader can place the next page to the left and interpret a leftward gesture as forward. Inside chapter two, an English URL remains left-to-right. The navigation document still lists chapters in reading order rather than storing them backward.

An edition can therefore have right-to-left progression, right-to-left paragraphs, left-to-right identifiers, and tables whose numeric columns require separate alignment decisions. A translated quotation may add another base direction. Each layer needs the information appropriate to it.

Print makes progression less configurable but no less distinct. Binding direction coordinates page turns. Paragraph direction coordinates text. The orientation of a chart, the order of numerals, and the placement of fore-edge tabs are additional decisions. A book opening from the right does not turn every object on every page into its mirror image.

A diagnostic order

When a bidirectional line fails, visual nudging should be the last resort. Start with the source. Is text stored in logical order? Are the intended Unicode characters present? Has a symbol font or image been used in place of text?

Then inspect language and base direction. Does the paragraph establish the right context? Are opposite-direction phrases marked and isolated? Are imported titles, contributor names, and product data retaining language and direction metadata?

Next inspect layout. Do margins and positions use logical properties where they represent start and end? Have icons been reviewed by meaning? Does wrapping at narrow widths preserve relationships visible on a wide screen?

Finally inspect the publication. Is page progression declared correctly? Do navigation, landmarks, and reading order remain coherent? Does the reading system support the required CSS and EPUB behavior? Test mixed content on several systems and with readers of the language. A title followed by a year, a footnote containing a URL, a table with currencies, and a parenthetical translation expose far more than a page of uninterrupted prose.

What the mirror hides

Mirroring transforms appearance. Bidirectional publishing organizes meaning. Logical start and end name the designer's intention before language and writing mode decide where that intention appears. Isolation respects a phrase's internal order while allowing it to live inside another. Page progression controls the book without pretending to control every line.

A good right-to-left edition may feel like a coherent reversal to someone who cannot read it. That coherence is the result of many decisions that were never reversals at all.

SOURCES

- Unicode Consortium. UAX #9, “Unicode Bidirectional Algorithm.” https://www.unicode.org/reports/tr9/ - W3C Internationalization. “Inline Markup and Bidirectional Text in HTML.” https://www.w3.org/International/articles/inline-bidi-markup/index.en - W3C Internationalization. “Creating HTML Pages in Arabic, Hebrew and Other Right-to-Left Scripts.” https://www.w3.org/International/tutorials/bidi-xhtml/Overview - W3C. CSS Writing Modes Level 3. https://www.w3.org/TR/css-writing-modes-3/ - W3C. CSS Logical Properties and Values Level 1. https://www.w3.org/TR/css-logical-1/ - W3C. EPUB 3.3. https://www.w3.org/TR/epub-33/