Can ebooks show vertical Japanese text?
Open a Japanese novel in Apple Books and the characters run down the page in columns, the first column sits at the right edge, and the next page is to the left. Ebooks can do this because EPUB 3 supports it, and two things in the file switch it on. The publisher's stylesheet sets writing-mode: vertical-rl on the text, and the package file puts page-progression-direction="rtl" on its spine so that the pages turn the Japanese way. If a Japanese book shows ordinary horizontal lines, the stylesheet doesn't set the writing mode, or the app ignores it. If the columns are vertical but the pages turn the wrong way, the spine lacks the direction.
The page direction is a property of the whole book. EPUB 3.3 gives the spine three choices, ltr, rtl and default, and with default the reading app decides. A single chapter can still go its own way through writing-mode, a CSS property that became a W3C Recommendation in December 2019. vertical-rl puts each new line to the left of the last, as in a printed Japanese book; vertical-lr stacks them the other way, which Mongolian uses. EPUB keeps a prefixed twin, -epub-writing-mode, with the same values and behaviour.
Apple's Books Asset Guide adds its own rules. The writing mode has to be set on the html or body element, and each content file can have only one, so a vertical novel with a horizontal appendix needs the two in separate files. Apple asks for Hiragino Mincho ProN or Hiragino Kaku ProN because they're already on the reader's device; YuMincho has to be downloaded from the Font menu first. Switch to the Scroll theme and a vertical book scrolls sideways, which Apple does by default for Japanese and Chinese books unless the file sets ibooks:scroll-axis.
Latin letters and numbers lie on their side by default (text-orientation: mixed), turned 90 degrees clockwise, while the Japanese characters stay upright. Dates and other short numbers often get tate-chu-yoko instead: two digits set side by side in the space of one character. The CSS specification shows it with the date 平成20年4月16日, where text-combine-upright: all squeezes "20" and "16" into single cells. Apple's guide wants the WebKit form, -webkit-text-combine: horizontal, and EPUB has its own -epub-text-combine-horizontal.
Then there's ruby, the small kana printed beside a hard kanji to give its reading. In vertical text it goes to the right of the column, and in horizontal text above the line; the W3C's Requirements for Japanese Text Layout calls the other sides very rare. A 2010 draft from the Japan Electronic Publishing Association, Minimal Requirements on EPUB for Japanese Text Layout, set the ruby at about half the size of the base characters and wanted a fallback: the reading in parentheses after the word, for apps that couldn't draw ruby. The same draft asked for page numbers and running heads to stay horizontal in a vertical book, and for readers to be able to show a vertical book horizontally, which it said many Japanese viewers already allowed. The current EPUB 3.3 specification tells publishers not to use the rp element that held those parentheses, because EPUB 3 reading systems already handle ruby. When Rakuten opened Kobo in Japan in July 2012, its announcement named vertical text and ruby among what the Kobo Touch's EPUB 3 support covered.
Amazon has a switch of its own. The Kindle Publishing Guidelines (version 2026.3) describe a <meta name="primary-writing-mode"> tag in the package file, and its value vertical-rl gives right-to-left page turns for Chinese, Japanese and Korean books. The same tag is required for Virtual Panels in a manga that reads right to left.
In a fixed-layout manga made of page images, the writing mode doesn't matter, only the page direction. A manga in a CBZ archive has no spine at all; if the archive has a ComicInfo.xml, its Manga field set to YesAndRightToLeft gives the direction, as the post on reading manga right to left explains.