$ sudo apt-get install ruby
$ sudo gem install asciidoctor
$ sudo gem install coderay pygments.rb
$ sudo gem install --pre asciidoctor-pdf
asciidoctor-pdf 만 이용해서 PDF를 만들면 한글이 제대로 출력되지 않는다. asciidoctor-pdf 에서 사용할 폰트 gem 을 추가로 설치해야 한다.
$ sudo gem install asciidoctor-pdf-cjk-kai_gen_gothic
$ sudo asciidoctor-pdf-cjk-kai_gen_gothic-install
[1/20] Downloading KaiGenGothicCN-Bold-Italic.ttf
[2/20] Downloading KaiGenGothicCN-Bold.ttf
[3/20] Downloading KaiGenGothicCN-Regular-Italic.ttf
[4/20] Downloading KaiGenGothicCN-Regular.ttf
[5/20] Downloading KaiGenGothicJP-Bold-Italic.ttf
[6/20] Downloading KaiGenGothicJP-Bold.ttf
[7/20] Downloading KaiGenGothicJP-Regular-Italic.ttf
[8/20] Downloading KaiGenGothicJP-Regular.ttf
[9/20] Downloading KaiGenGothicKR-Bold-Italic.ttf
[10/20] Downloading KaiGenGothicKR-Bold.ttf
[11/20] Downloading KaiGenGothicKR-Regular-Italic.ttf
[12/20] Downloading KaiGenGothicKR-Regular.ttf
[13/20] Downloading KaiGenGothicTW-Bold-Italic.ttf
[14/20] Downloading KaiGenGothicTW-Bold.ttf
[15/20] Downloading KaiGenGothicTW-Regular-Italic.ttf
[16/20] Downloading KaiGenGothicTW-Regular.ttf
[17/20] Downloading RobotoMono-Bold.ttf
[18/20] Downloading RobotoMono-BoldItalic.ttf
[19/20] Downloading RobotoMono-Italic.ttf
[20/20] Downloading RobotoMono-Regular.ttf
asciidoctor-pdf -r asciidoctor-pdf-cjk-kai_gen_gothic -a pdf-style=KaiGenGothicKR example.adoc