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ビルド手順の改訂 #56

Open
kkimurak opened this issue May 7, 2022 · 4 comments
Open

日本語版PDFビルド手順の改訂 #56

kkimurak opened this issue May 7, 2022 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@kkimurak
Copy link
Owner

kkimurak commented May 7, 2022

これまでasciidoctor-pdfで日本語版PDFを作成しようとすると日本語部分が正しく表示されず(いわゆる「豆腐」状態)、asciidoctor-pdf-cjk-kai_gen_gothicを使用してきました。
しばらく放っておいた間にasciidoctor-pdfのほうで対応が進んだようで、むしろkai_gen_gothicはメンテナンス終了となっていました。
よって公式の手順として紹介されているものに移行したいと思います:

$ asciidoctor-pdf -a scripts=cjk -a pdf-theme=default-with-fallback-font document.adoc
@kkimurak
Copy link
Owner Author

kkimurak commented May 7, 2022

ためしに手元のmsys2-mingw64でasciidoctor-pdfを入れてデフォルトテーマでビルドしたものが添付図右、いま公開されているものが左です。フォントや行間が変わっているほか、表紙ページが無くなっているようです。テーマファイルを弄れば解決するものと思われます。
またSVGまわりで警告が出ています。<flowRoot>は文字の流し込みタグの筈ですが、エラーが出ているファイルを確認すると表示内容を保持する<flowPara>には文字が記載されていません。よって表示に支障はないものと思われます。

$ asciidoctor-pdf --version
Asciidoctor PDF 1.6.2 using Asciidoctor 2.0.17 [https://asciidoctor.org]
Runtime Environment (ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x64-mingw32]) (lc:Windows-31J fs:UTF-8 in:UTF-8 ex:UTF-8)

$ asciidoctor-pdf -a allow-uri-read -a script=cjk -a pdf-theme=default-with-fallback-font sslrules.adoc 
asciidoctor: WARNING: problem encountered in image: {filtered}/quad-size-field.svg; Unknown tag 'flowRoot'; ignoring

sslrules PDF built by asciidoctor-pdf. Left: current setting that uses htakeuchi/docker-asciidoctor-jp , Right: asciidoctor-pdf on msys2-mingw64 on windows10

@kkimurak
Copy link
Owner Author

kkimurak commented May 7, 2022

2019年5月末時点の本家ルールで既に表紙が無かったり最終更新日が表示されなかったりする現状のスタイルに切り替わっていました: RoboCup-SSL/ssl-rules@f42bf0b (PDFファイル: https://github.com/RoboCup-SSL/ssl-rules/blob/f42bf0b6995b0e730de699efbdd8f1e72eed3145/sslrules.pdf)

@kkimurak
Copy link
Owner Author

ためしに #60#61 のビルドではscript=cjkの方を使ってみました。これで反応を見ようと思います。

@kkimurak
Copy link
Owner Author

反応を見るも何も、参照されているかどうかすら怪しいリポジトリでそんな心配をする必要はありませんでした。
念のため、asciidoctor-pdfの豆腐文字バグがどのバージョンで修正されたかだけ確認してから更新します。

@kkimurak kkimurak added the documentation Improvements or additions to documentation label Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant