LoginSignup
2
3

More than 5 years have passed since last update.

WindowsでAsciidocからPDFを作成する(Asciidoctor PDF v1.5.0 alpha 13)

Last updated at Posted at 2016-12-27

エディタはAtomを導入してみます。

Atom(https://atom.io

インストール後、以下のPackageをインストールする。

  • asciidoc-preview
  • language-asciidoc

これで、Asciidocのプレビューはできちゃいます。Crtl + Shift + a でプレビューペインが開きます。

GitHub Desktop(https://desktop.github.com

ドキュメントはGitリポジトリにある想定なのでGit環境を最も手軽に設定できるGitHub Desktopを導入します。

Ruby

RubyInstaller(http://rubyinstaller.org/ )を導入してみました。

Ruby 2.3.1 (x64)もしくはRuby 2.3.1をダウンロードしてインストール。

Ruby gemsのアップデート

を参考にRuby gemsをアップデートしてSSL証明書の問題を解消しておきます。

Asciidoctor PDF(https://github.com/asciidoctor/asciidoctor-pdf )

https://github.com/asciidoctor/asciidoctor-pdf#getting-started の通りにセットアップしましょう。

PDF生成上の制約

和英混合文の文字揃えがおかしい

和英混合文だと半角スペースの箇所で文字揃えがおかしくなってしまい実用に値しない。最初の段落は両端揃えで間延び、1章の段落は左揃えでGLOVIAとOMの間の半角スペースで改行されてしまう。

スクリーンショット 2017-01-18 15.33.56.png

https://github.com/asciidoctor/asciidoctor-pdf/issues/82 を参考に、https://github.com/chloerei/asciidoctor-pdf-cjk を導入して解決する。

スクリーンショット 2017-01-18 16.57.06.png

両端揃えは、まだ不完全だが、左揃えは期待する行揃えになっているので、両端揃えを使わない前提であれば、使えそう。

文字の装飾はまだ未完全

alpha13で実装されてないもの

  • 下線
  • 赤字などの色付け

日本語フォントの問題で反映されないもの

  • 日本語の斜体
  • 日本語の太字

斜体と太字のTrueTypeフォントを指定していれば、出力されるはず...

所感

安易に人に勧めるのはまだ早い感じ。

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3