Skip to content
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

Closed
azu opened this issue Mar 19, 2014 · 16 comments
Closed

[PDF/Epub] 出力形式について #2

azu opened this issue Mar 19, 2014 · 16 comments
Milestone

Comments

@azu
Copy link
Owner

azu commented Mar 19, 2014

どのようなフォーマットで公開するかについて。

  • HTMLはデフォルト - Promises book
  • PDF はできればあったほうがよさそう
  • epub 面倒じゃなければあったほうがいい

当初の目的だと、PDFとかは任意の値段で購入できるようにして実験していたいというのがあった。
(お金 何か面倒だから自由にダウンロードできるようにしちゃいそうだけど)

@azu
Copy link
Owner Author

azu commented Mar 19, 2014

PDF

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はダメとか使えるフォントの種類がよくわからないので、定番を教えて欲しい…

@azu
Copy link
Owner Author

azu commented Apr 19, 2014

epubはopendevise/asciidoctor-epub3という良さそうなのがでてた。

gem install specific_install
gem specific_install -l "https://github.com/opendevise/asciidoctor-epub3"

@azu azu added the meta label May 4, 2014
@azu azu added this to the 1.0.0 milestone May 19, 2014
@azu
Copy link
Owner Author

azu commented May 24, 2014

Macで指定するフォント名の調べ方

PostScript名というのが指定に使う名前

@azu
Copy link
Owner Author

azu commented May 24, 2014

うーん、PDF 文字のコピーができないっぽい。
埋め込みフォントじゃない方法できないのかな

@azu
Copy link
Owner Author

azu commented May 24, 2014

あれ?と思ったらできた。

@azu
Copy link
Owner Author

azu commented May 24, 2014

Migu 2M そこそこ見やすい気がする。

index 2014-05-25 01-13-01 2014-05-25 01-13-09

#!/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

@azu
Copy link
Owner Author

azu commented May 24, 2014

変なスペースが出来たりするのどうにかできないのかな。
justifyみたいな

@hnakamur
Copy link

./fopubの引数に-param alignment leftを追加してみたらjustifyではなく左寄せになりました。

https://github.com/asciidoctor/asciidoctor-fopub/blob/f0ba9cc1d74313a6858c99a605a3a74bafa73a3e/src/dist/docbook-xsl/fo-pdf.xsl#L105-L107
にalignmentのparameter定義がありました。

https://github.com/asciidoctor/asciidoctor-fopub のドキュメントに書いてあるわけではないのと、xslの全体の内容をきちんと理解したわけではないのでなにか副作用があるかもしれませんが、とりあえず報告まで。

@azu
Copy link
Owner Author

azu commented May 26, 2014

@hnakamur ありがとうございます。

変な間延びが無くなった気がします。

index 2014-05-26 11-45-28 2014-05-26 11-46-32

#!/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

@azu
Copy link
Owner Author

azu commented May 27, 2014

@azu
Copy link
Owner Author

azu commented Jun 6, 2014

そういえば、シンタックスハイライトができないの何でだろ?

@azu
Copy link
Owner Author

azu commented Jun 8, 2014

これ

[source,js]

だとダメで、

[source,javascript]

だとOKだった。

全部書き換えた。

25f2fd1

index 2014-06-08 22-48-27 2014-06-08 22-49-25

@azu azu mentioned this issue Jun 13, 2014
15 tasks
@azu
Copy link
Owner Author

azu commented Jun 14, 2014

CIに組み込みたいので、Ubuntuで作ったPDF

http://take.ms/0pml3

@azu
Copy link
Owner Author

azu commented Jun 14, 2014

https://github.com/azu/promises-book/blob/gh-pages/index.pdf
PDFをTravis CIで生成するようにしてみた

@azu
Copy link
Owner Author

azu commented Jun 14, 2014

READMEに現状のPDFとEpubの生成について書いた

@azu
Copy link
Owner Author

azu commented Jun 18, 2014

PDFとりあえず対応してる閉じる。

epub もっといい方法あったらissueを立て直す感じでー

@azu azu closed this as completed Jun 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants