-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--epub-page-direction=XXX option possible? #1455
Comments
The feature is actually indispensable for supporting East-Asian languages such as Japanese, Chinese (whose publishing industries are nothing to sneeze at). If you add the feature, please add a syntax for the metadata block as well, as any book requiring it will always need it, and therefore it makes sense not enforcing having to remembering the command-line option on each run. |
There is already support for a YAML metadata block if you are converting from Markdown. I am in favour of doing this, just need to wait for John to decide what the best way is. |
My preference would be to use a |
sure, will do it tomorrow On Sun, Aug 10, 2014 at 10:13 PM, John MacFarlane [email protected]
|
Text-direction and page direction should not be confused. So the ame of --epub-page-direction or --epub-page-progression-direction I want Pandoc command line option to be able to support this, too, Regards, On Mon, Aug 11, 2014 at 6:31 AM, mpickering [email protected]
川幡 太一 (KAWABATA, Taichi) E-mail: [email protected] |
+++ kawabata [Aug 10 14 16:53 ]:
OK - I see a 'dir' element of the spine which can be rtl or ltr.
I'd rather stick with metadata. You can specify metadata from the |
Oh, I see: as you said originally, |
In EPUB, page direction should be specified to epub spine element. In Pandoc, CSS can already be specified in --epub-stylesheet, but another On Mon, Aug 11, 2014 at 10:17 AM, John MacFarlane [email protected]
川幡 太一 (KAWABATA, Taichi) E-mail: [email protected] |
Well, the options for text directionality are indeed no small deal. I recommend reading EPUB 3 and Global Language Support to better understand the options for text directionality in EPUB, specifically the sections Vertical writing and Page Progression Direction. The EPUB Samples repository has a bunch of EPUB 3 samples featuring different text directions and writing modes (although not all combinations are necessarily supported by any reading system). Chinese and Japanese can be written and read both horizontally and vertically. In some contexts one direction is more usual than the other, and vice versa. When horizontal, characters will most often flow from left to right, lines being ordered top-to-bottom just, like in Latin scripts; when vertical, characters will flow from top to bottom, and lines will be ordered right-to-left (think of it as if you had rotated the horizontal text 90° clockwise). Mongolian and Manchu are purportedly vertical, and their lines ordered left-to-right (note that I am not one bit familiar with these two, though). The EPUB 3.0.1 spec details different properties that set the direction in which the content flows, each affecting it in an independent way:
The spec is rather unspecific about what it means with "content flow" here, but taking into account the name of the attribute itself, I would assume that (and iBooks behaves this way), in practice, it determines the direction in which pagination flows (when content is paginated), but not the direction of text itself.
Japanese books with vertical layout will most often use This one does not affect the content of the EPUB, though, but rather its metadata only. For example, it could determine that the title only, but not the rest of metadata, should be displayed right-to-left. I guess the last two, though, are really only necessary for very rare exceptions, whatever the language of the book. Unicode has its own algorithm for determining the text direction of a string depending on the characters used themselves (i.e. Arab should be displayed right-to-left by default), so I would assume (but I do not know) that, in languages that do have an intrinsic right-to-left text direction, the reading engine itself should be correctly guessing the direction of text without the need of specifying any So, my take on how Pandoc should handle this:
accepting values
but, like I said, I bet that the need for such a thing will be exceptionally rare. |
jgm commented:
Note that |
See the patch I just submitted. On Mon, Aug 11, 2014 at 12:31 PM, elmimmo [email protected] wrote:
|
Thank you very much! Though text directionality issue is a bit complex, for "page progression direction", |
+++ elmimmo [Aug 11 14 04:31 ]:
True, but we can consider it part of the pandoc metadata, and the |
If possible, I hope "page-progression-direction" attribute of "spine" element
of EPUB OPF file could be specified in pandoc EPUB writer.
The specification of this attribute is as follows.
http://www.idpf.org/epub/301/spec/epub-publications.html#sec-spine-elem
I have two ideas on realizing this.
One is repeatable option --epub-spine-attribute, as
--epub-spine-attribute=page-progression-direction:ltr.
Another is --epub-page-direction=ltr. My preference is latter.
As far as I've checked, I couldn't find anyone, requesting this feature.
The text was updated successfully, but these errors were encountered: