-
-
Notifications
You must be signed in to change notification settings - Fork 579
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
[PDF/Epub] 出力形式について #2
Comments
asciidoctor/asciidoctor-fopubを使ってちゃんとFont Families指定すれば日本語出せることがわかったので、これで何とか出来そう。 自由にダウンロードできるフォント使えば、Travis CI上でPDFを出力するのも何とかできそう。 $ asciidoctor -b docbook -d book index.adoc # xml生成
./fopub Promises-book/index.xml \
-param body.font.family IPAMincho \
-param dingbat.font.family IPAGothic \
-param monospace.font.family IPAGothic \
-param sans.font.family IPAMincho \
-param title.font.family IPAGothic ただ、IPAexはダメとか使えるフォントの種類がよくわからないので、定番を教えて欲しい… |
epubはopendevise/asciidoctor-epub3という良さそうなのがでてた。 gem install specific_install
gem specific_install -l "https://github.com/opendevise/asciidoctor-epub3" |
Macで指定するフォント名の調べ方 PostScript名というのが指定に使う名前 |
うーん、PDF 文字のコピーができないっぽい。 |
あれ?と思ったらできた。 |
Migu 2M そこそこ見やすい気がする。 #!/bin/sh
./fopub "./index.xml" \
-param body.font.family Migu-2M-Regular \
-param dingbat.font.family Migu-2M-Regular \
-param monospace.font.family Migu-2M-Regular \
-param sans.font.family Migu-2M-Regular \
-param title.font.family Migu-2M-Regular |
変なスペースが出来たりするのどうにかできないのかな。 |
./fopubの引数に https://github.com/asciidoctor/asciidoctor-fopub/blob/f0ba9cc1d74313a6858c99a605a3a74bafa73a3e/src/dist/docbook-xsl/fo-pdf.xsl#L105-L107 https://github.com/asciidoctor/asciidoctor-fopub のドキュメントに書いてあるわけではないのと、xslの全体の内容をきちんと理解したわけではないのでなにか副作用があるかもしれませんが、とりあえず報告まで。 |
@hnakamur ありがとうございます。 変な間延びが無くなった気がします。 #!/bin/sh
./fopub "./promises-book/index.xml" \
-param body.font.family Migu-2M-Regular \
-param dingbat.font.family Migu-2M-Regular \
-param monospace.font.family Migu-2M-Regular \
-param sans.font.family Migu-2M-Regular \
-param title.font.family Migu-2M-Regular \
-param alignment left |
Leanpubはあおぞら明朝フォントを使ってるらしい via 「Everyday Rails - RSpecによるRailsテスト入門」の舞台裏をお見せします - give IT a try |
そういえば、シンタックスハイライトができないの何でだろ? |
これ
だとダメで、
だとOKだった。 全部書き換えた。 |
CIに組み込みたいので、Ubuntuで作ったPDF |
https://github.com/azu/promises-book/blob/gh-pages/index.pdf |
READMEに現状のPDFとEpubの生成について書いた |
PDFとりあえず対応してる閉じる。 epub もっといい方法あったらissueを立て直す感じでー |
どのようなフォーマットで公開するかについて。
当初の目的だと、PDFとかは任意の値段で購入できるようにして実験していたいというのがあった。
(お金 何か面倒だから自由にダウンロードできるようにしちゃいそうだけど)
The text was updated successfully, but these errors were encountered: