Skip to content

Instantly share code, notes, and snippets.

@umjammer
Last active October 20, 2023 20:09
Show Gist options
  • Save umjammer/a3034783c33d139633e6092812c45f0a to your computer and use it in GitHub Desktop.
Save umjammer/a3034783c33d139633e6092812c45f0a to your computer and use it in GitHub Desktop.
[epub] convert horizontal to vertical

[epub] convert horizontal to vertical

edit .opf file

e.g. javanese novels

<spine page-progression-direction="rtl">

e.g. japanese tech books

<spine page-progression-direction="ltr">

edit .css file

html {
  -webkit-writing-mode: vertical-rl;
  -webkit-text-orientation: mixed;
  -epub-writing-mode: vertical-rl;
  -epub-text-orientation: mixed;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

remain numbers virtical

foo {
    text-combine-upright: all;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment