11-11-2019, 08:06 PM | #16 |
creator of calibre
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
calibre is not going to add css by default. But you can tell it to do so if you want via the Extra CSS setting in the conversion diaog or in Preferences->Common Options->Look & feel
|
11-11-2019, 08:14 PM | #17 |
Member
Posts: 15
Karma: 10
Join Date: Jul 2013
Location: Kumamoto, Japan
Device: Kindle, MacOS, Win7
|
Reasonable answer, thank you.
Would you consider adding a prebaked script somewhere so people who want to do this can do it easily, without having to search for this thread? |
03-23-2020, 01:37 PM | #18 |
Connoisseur
Posts: 54
Karma: 12
Join Date: Jan 2011
Device: Kindle
|
Vertical Japanese text with "Fetch news"
Hi,
I like reading short simple news stories on my Kindle, for example from NHK News Easy (feed: rsshub.app/nhk/news_web_easy). I can download the latest articles with Calibre of course, but for the Kindle dictionary to work properly, I need to have vertical text. Do you know, perhaps based on the discussion above about converting from epub to mobi, how I can convert the mobi book (news) so that the horizontal text gets vertical? Thank you! |
03-23-2020, 08:42 PM | #19 |
Member
Posts: 15
Karma: 10
Join Date: Jul 2013
Location: Kumamoto, Japan
Device: Kindle, MacOS, Win7
|
See my post of Sept. 12, above.
There are some characters that will probably not display properly, however, such as dashes... I haven't checked, but based on past experience, I'd expect dashes and similar punctuation to rotate incorrectly, or not at all. |
07-31-2020, 08:04 AM | #20 |
Connoisseur
Posts: 54
Karma: 12
Join Date: Jan 2011
Device: Kindle
|
BBC日本語
I tried what you suggested on September 12, but for amateurs like me it's still quit a puzzle. Since these Japanese BBC stories have English equivalents, I'd like to use them as study material, but due to the horizontal text the dictionary lookup doesn't work as it should. I changed the ebook language to JP in Calibre (under Metadata), but that makes no difference.
If someone understands the steps and has time to elaborate them for simpletons like me, that would be great! E.g.: CONTENT.OPF In metadata: <meta name="primary-writing-mode" content="vertical-rl" /> Does this mean I should add this line or delete the existing one? The others steps are even more mysterious to me... |
07-04-2021, 02:20 PM | #21 |
Junior Member
Posts: 5
Karma: 108
Join Date: Sep 2011
Device: SONY PRS-350
|
Hi, I know this is an old thread but I had the same issues with converting to vertical text for kindle. I have a little bash script that works in two stages to produce a AZW3 file that works on my kindle paper white. It's for converting the XHTML files you can get from aozora.gr.jp, but it could easily be adapted for other sources by adjusting the two lines that call ebook-convert. Here it is:
Code:
name=${1%%.html} ebook-convert "$name".html "$name" echo -en "\n\ body {\n\ \t writing-mode: vertical-rl;\n\ \t line-break: normal;\n\ \t -epub-writing-mode: vertical-rl;\n\ \t -webkit-writing-mode: vertical-rl;\n\ \t -epub-line-break: normal;\n\ \t -webkit-line-break: normal;\n\ \t line-height: 150%;\n\ \t padding: 1em 1em;\n\ \t font-family: serif, sans-serif\n\ }\n"\ >>"$name"/page_styles.css sed -i -e 's:</metadata>:<meta\ name="primary-writing-mode"\ content="vertical-rl"/>\n</metadata>:' "$name"/content.opf sed -i -e 's:<spine.*:<spine\ toc="ncx"\ page-progression-direction="rtl">:' "$name"/content.opf sed -i -e 's/<dc:language>.*/<dc:language>jpn<\/dc:language>/' "$name"/content.opf zip "$name".zip add -j "$name"/* ebook-convert "$name".zip "$name".azw3 rm -Rf "$name" rm -f "$name".zip |
07-04-2021, 09:32 PM | #22 |
Member
Posts: 15
Karma: 10
Join Date: Jul 2013
Location: Kumamoto, Japan
Device: Kindle, MacOS, Win7
|
Excellent addition to my collection of useful scripts!
Many thanks. |
09-02-2021, 04:00 AM | #23 |
Connoisseur
Posts: 54
Karma: 12
Join Date: Jan 2011
Device: Kindle
|
For those, like me, who aren't familiar with bash scripts, could you give a few instructions as to how I should use this script? Does this run within Calibre of elsewhere? My apologies for these basic questions.
|
09-03-2021, 08:07 PM | #24 |
Junior Member
Posts: 5
Karma: 108
Join Date: Sep 2011
Device: SONY PRS-350
|
Save the file to somewhere on your computer and name it html2azw3.sh (or whatever). You then have to open a terminal window and run the script from there. Like this:
User$ html2azw3.sh name_of_file The script will use Calibre to generate an azw3 file that should display vertically on the kindle. You probably want to read up a bit on how to use bash scripts, though. It's not difficult once you get the hang of it. There are lots of tutorials online. Here's an example: https://ryanstutorials.net/bash-scri...ash-script.php I noticed something in the old scripts that I fixed (the old one should work fine but probably throws up some annoying messages). Here is the cleaned-up version: Code:
#!/bin/bash name=${1%%.html} ebook-convert "$name".html "$name" echo -en "\n\ body {\n\ \t writing-mode: vertical-rl;\n\ \t line-break: normal;\n\ \t -epub-writing-mode: vertical-rl;\n\ \t -webkit-writing-mode: vertical-rl;\n\ \t -epub-line-break: normal;\n\ \t -webkit-line-break: normal;\n\ \t line-height: 150%;\n\ \t padding: 1em 1em;\n\ \t font-family: serif, sans-serif\n\ }\n"\ >>"$name"/page_styles.css sed -i -e 's:</metadata>:<meta\ name="primary-writing-mode"\ content="vertical-rl"/>\n</metadata>:' "$name"/content.opf sed -i -e 's:<spine.*:<spine\ toc="ncx"\ page-progression-direction="rtl">:' "$name"/content.opf sed -i -e 's/<dc:language>.*/<dc:language>jpn<\/dc:language>/' "$name"/content.opf zip "$name".zip -j "$name"/* ebook-convert "$name".zip "$name".azw3 rm -Rf "$name" rm -f "$name".zip |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre Japanese Vertical Text Viewer Problem | fobos3 | Calibre | 10 | 06-12-2020 12:32 PM |
Vertical Text | Hopkins | Sigil | 3 | 08-11-2016 08:16 PM |
Looking for Japanese EPUB3 with vertical writing | Micah | General Discussions | 4 | 06-15-2013 05:28 PM |
How to specifiy vertical text layout (e.g. Japanese) | totsubo | Sigil | 7 | 04-13-2013 02:01 AM |
E-paper reader that displays vertical Japanese in non-proprietary format | angus77 | Which one should I buy? | 9 | 03-11-2012 03:16 AM |