asciidoctor-nabetani 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2035cd5fd1f7e71f56ea56f9e78836f32f843c7b09d05478b42bf5756b88c3d6
4
- data.tar.gz: 8144173c30a41e27a2f19c7082ded879f35dae9bc0bcd5b4e5164573efab0a10
3
+ metadata.gz: 5c73b2f53cac72e8c52660ec031ea745b1b9121a0b288274b9a1ca61fc897cc0
4
+ data.tar.gz: cb772294699e79d60f50b6c22fb89a58149426fa4a2b070503d8c509b3a3e821
5
5
  SHA512:
6
- metadata.gz: d3dcf58f5fa99bc79fc9541039db00c25ee5b6e6df0acd3caac11e890283f7e498afe53461a541cbabb16d8b822e7b2739766dfa9eebc6fc9318cec2795d7abd
7
- data.tar.gz: e855226020e9d206a1b11864ee5b83fca83994411282d64f36ca96ca5e374acada231234238f44a7ff70fd53dca902b6a33067a42c0e06380bee0207ce1065a0
6
+ metadata.gz: 32241346c57551fa2a5cd5521ee55c2b0257d617b7e5b236525837960ceb6c1edff8d870f5d6616928d55e1d96246ff4d6651084649c56d5680eafd9d6d79a61
7
+ data.tar.gz: a7aabb02953cfc71eaf1de3cda78f1145fc4facde06ce6094458ce4beb018a8aba87e5714630a956ca508c770ba6adb8679a1a59a73302023283b8660dd46ed7
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- asciidoctor-nabetani (0.1.0)
4
+ asciidoctor-nabetani (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -43,3 +43,96 @@ The gem is available as open source under the terms of the [MIT License](https:/
43
43
 
44
44
  Everyone interacting in the Asciidoctor::Nabetani project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/asciidoctor-nabetani/blob/master/CODE_OF_CONDUCT.md).
45
45
 
46
+ ## What is this
47
+
48
+ 突然日本語ですいません。
49
+
50
+ AsciiDoctor で PDF を作るときに困っていたことをなんとかしたライブラリ。
51
+
52
+ ### 禁則処理の改善
53
+
54
+ `asciidoctor/nabetani/prawn-linewrap-ja` を require すると有効になる。
55
+
56
+ prawn の禁則処理を本ライブラリの処理で差し替えることで、禁則処理を改善する。
57
+
58
+ ### クロスリファレンス
59
+
60
+ `asciidoctor/nabetani/abstractblock-xreftext` を require すると有効になる。
61
+
62
+ AsciiDoc のクロスリファレンスで
63
+
64
+ 従来は
65
+ |形式名|PDF上の出力例|
66
+ |:--|:--|
67
+ |full|`Section 2.1, “セクション名”`|
68
+ |short|`Section 2.1`|
69
+ |basic|`セクション名`|
70
+ の三択だった。
71
+
72
+ これを
73
+
74
+ ```
75
+ :xrefstyle: custom
76
+ :xrefcustomformat: [$SECT_NUMS$]. [$TITLE$]
77
+ ```
78
+ などと指定することで、PDF上で
79
+ ```
80
+ 2.1. セクション名
81
+ ```
82
+ とすることができるようにする。
83
+
84
+ |記号|意味|
85
+ |:--|:--|
86
+ |[$SECT_NUMS$]|セクション番号をピリオドでつないだもの。`2.1` など|
87
+ |[$TITLE$]|セクション名|
88
+
89
+ ※ 上記以外はそのまま出力される。
90
+
91
+ ### horizontal な定義リスト
92
+
93
+ `asciidoctor/nabetani/horz-dlist` を require すると有効になる。
94
+
95
+ horizontal な定義リストで
96
+ ```
97
+ [horizontal, margin-left=20, margin-bottom=10]
98
+ Foo:: bar
99
+ Baz Qux:: quux corge
100
+ ```
101
+ のように指定することで、左マージンと下マージンを指定することができる。
102
+ 指定する数字の単位は PDF point だと思う。
103
+
104
+ ### PDF のプロパティ
105
+
106
+ `asciidoctor/nabetani/pdf-custom-property` を require すると有効になる。
107
+
108
+ PDF のファイル情報の「概要」欄の項目を adoc ファイル内に
109
+
110
+ ```
111
+ // タイトルを「PDF Title」にする
112
+ :pdf_title: PDF Title
113
+ ```
114
+
115
+ のように書くことで、個別に指定できる。
116
+
117
+ 指定可能な項目は下表の通り:
118
+ |アトリビュート名|Acrobat Reader の「概要」欄の日本語名|例|
119
+ |:--|:--|:--|
120
+ |pdf_title|タイトル|Starfish Wars|
121
+ |pdf_author|作成者|鍋谷武典|
122
+ |pdf_subject|サブタイトル|ビピンナリアの復讐|
123
+ |pdf_keywords|キーワード|ヒトデ 棘皮動物 Starfish|
124
+ |pdf_producer|PDF変換|Acrobat Distiller|
125
+ |pdf_creator|アプリケーション|FrameMaker 6.0|
126
+
127
+ ### PDF のしおり(outline)
128
+
129
+ `asciidoctor/nabetani/pdf-outline` を require することで有効になる。
130
+
131
+ 通常の asciidoctor-pdf でビルドした場合、PDF のしおり欄の先頭は 表紙になるが、この機能を有効にすると、表紙はしおりにふくまれないようになる。
132
+
133
+
134
+
135
+
136
+
137
+
138
+
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "asciidoctor-pdf"
4
+ require_relative "nabehelper"
4
5
 
5
6
  module Prawn
6
7
  class Outline
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module Nabetani
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-nabetani
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nabetani