create-asciidoc-multi-book-workspace 0.1.0
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.
- package/CHANGELOG.md +11 -0
- package/LICENSE +202 -0
- package/README.md +93 -0
- package/dist/create.js +41 -0
- package/dist/init-workspace.js +58 -0
- package/dist/runtime/adoc-books.mjs +395 -0
- package/dist/template-manifest.js +11 -0
- package/package.json +55 -0
- package/templates/default-workspace/README.md +66 -0
- package/templates/default-workspace/books/00-book-anatomy/backmatter/appendix-a.adoc +18 -0
- package/templates/default-workspace/books/00-book-anatomy/backmatter/bibliography.adoc +4 -0
- package/templates/default-workspace/books/00-book-anatomy/backmatter/glossary.adoc +10 -0
- package/templates/default-workspace/books/00-book-anatomy/backmatter/index.adoc +9 -0
- package/templates/default-workspace/books/00-book-anatomy/book.adoc +54 -0
- package/templates/default-workspace/books/00-book-anatomy/frontmatter/abstract.adoc +5 -0
- package/templates/default-workspace/books/00-book-anatomy/frontmatter/acknowledgments.adoc +3 -0
- package/templates/default-workspace/books/00-book-anatomy/frontmatter/colophon.adoc +5 -0
- package/templates/default-workspace/books/00-book-anatomy/frontmatter/dedication.adoc +3 -0
- package/templates/default-workspace/books/00-book-anatomy/frontmatter/preface.adoc +5 -0
- package/templates/default-workspace/books/00-book-anatomy/parts/01-front-structure/01-frontmatter-map.adoc +24 -0
- package/templates/default-workspace/books/00-book-anatomy/parts/01-front-structure/_partintro.adoc +1 -0
- package/templates/default-workspace/books/00-book-anatomy/parts/02-body-structure/01-body-map.adoc +13 -0
- package/templates/default-workspace/books/00-book-anatomy/parts/02-body-structure/_partintro.adoc +1 -0
- package/templates/default-workspace/books/01-starter-book/assets/images/starter-map.svg +30 -0
- package/templates/default-workspace/books/01-starter-book/backmatter/appendix-a.adoc +9 -0
- package/templates/default-workspace/books/01-starter-book/backmatter/bibliography.adoc +3 -0
- package/templates/default-workspace/books/01-starter-book/book.adoc +26 -0
- package/templates/default-workspace/books/01-starter-book/chapters/01-opening.adoc +6 -0
- package/templates/default-workspace/books/01-starter-book/chapters/02-main-flow.adoc +5 -0
- package/templates/default-workspace/books/01-starter-book/frontmatter/preface.adoc +3 -0
- package/templates/default-workspace/books/02-multipart-monograph/backmatter/appendix-a.adoc +5 -0
- package/templates/default-workspace/books/02-multipart-monograph/backmatter/bibliography.adoc +3 -0
- package/templates/default-workspace/books/02-multipart-monograph/book.adoc +37 -0
- package/templates/default-workspace/books/02-multipart-monograph/parts/01-domain/01-problem-world.adoc +6 -0
- package/templates/default-workspace/books/02-multipart-monograph/parts/01-domain/02-boundary.adoc +5 -0
- package/templates/default-workspace/books/02-multipart-monograph/parts/01-domain/_partintro.adoc +2 -0
- package/templates/default-workspace/books/02-multipart-monograph/parts/02-specification/01-book-contract.adoc +5 -0
- package/templates/default-workspace/books/02-multipart-monograph/parts/02-specification/02-verification.adoc +5 -0
- package/templates/default-workspace/books/02-multipart-monograph/parts/02-specification/_partintro.adoc +1 -0
- package/templates/default-workspace/books/03-technical-book-workflow/assets/images/technical-flow.svg +30 -0
- package/templates/default-workspace/books/03-technical-book-workflow/backmatter/bibliography.adoc +3 -0
- package/templates/default-workspace/books/03-technical-book-workflow/book.adoc +25 -0
- package/templates/default-workspace/books/03-technical-book-workflow/chapters/01-build-flow.adoc +12 -0
- package/templates/default-workspace/books/03-technical-book-workflow/chapters/02-diagrams.adoc +19 -0
- package/templates/default-workspace/books/03-technical-book-workflow/chapters/03-code-includes.adoc +8 -0
- package/templates/default-workspace/books/03-technical-book-workflow/examples/minimal-tool.mjs +5 -0
- package/templates/default-workspace/books/03-technical-book-workflow/frontmatter/preface.adoc +3 -0
- package/templates/default-workspace/books/04-reference-manual/backmatter/bibliography.adoc +4 -0
- package/templates/default-workspace/books/04-reference-manual/backmatter/glossary.adoc +8 -0
- package/templates/default-workspace/books/04-reference-manual/book.adoc +30 -0
- package/templates/default-workspace/books/04-reference-manual/chapters/01-decision-table.adoc +27 -0
- package/templates/default-workspace/books/04-reference-manual/chapters/02-path-rules.adoc +14 -0
- package/templates/default-workspace/books/04-reference-manual/chapters/03-xref-patterns.adoc +20 -0
- package/templates/default-workspace/books/04-reference-manual/chapters/04-growth-paths.adoc +8 -0
- package/templates/default-workspace/books/04-reference-manual/frontmatter/preface.adoc +3 -0
- package/templates/default-workspace/books/05-upper-volume/backmatter/bibliography.adoc +3 -0
- package/templates/default-workspace/books/05-upper-volume/book.adoc +23 -0
- package/templates/default-workspace/books/05-upper-volume/chapters/01-upper-opening.adoc +4 -0
- package/templates/default-workspace/books/05-upper-volume/chapters/02-upper-core-model.adoc +4 -0
- package/templates/default-workspace/books/05-upper-volume/frontmatter/preface.adoc +3 -0
- package/templates/default-workspace/books/06-lower-volume/backmatter/bibliography.adoc +3 -0
- package/templates/default-workspace/books/06-lower-volume/book.adoc +24 -0
- package/templates/default-workspace/books/06-lower-volume/chapters/01-lower-opening.adoc +4 -0
- package/templates/default-workspace/books/06-lower-volume/chapters/02-cross-volume-practice.adoc +11 -0
- package/templates/default-workspace/books/06-lower-volume/frontmatter/preface.adoc +3 -0
- package/templates/default-workspace/catalog.adoc +68 -0
- package/templates/default-workspace/gitignore.template +8 -0
- package/templates/default-workspace/package.json.template +19 -0
- package/templates/default-workspace/shared/attributes.adoc +2 -0
- package/templates/default-workspace/shared/images/workspace-map.svg +23 -0
package/templates/default-workspace/books/00-book-anatomy/parts/01-front-structure/_partintro.adoc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
本部展示一本书进入正文之前的结构位置。摘要、版本说明、献辞、前言和致谢都属于书籍前置内容。
|
package/templates/default-workspace/books/00-book-anatomy/parts/02-body-structure/_partintro.adoc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
本部展示正文中的 part、chapter、section 和离散标题。part 组织同一本书内部的大分部。
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="720" height="220" viewBox="0 0 720 220" role="img" aria-labelledby="title desc">
|
|
2
|
+
<title id="title">日常单书结构图</title>
|
|
3
|
+
<desc id="desc">book.adoc include 前言、章节、附录和参考资料。</desc>
|
|
4
|
+
<rect width="720" height="220" fill="#f8fafc"/>
|
|
5
|
+
<g fill="#ffffff" stroke="#334155" stroke-width="2">
|
|
6
|
+
<rect x="40" y="70" width="130" height="70" rx="6"/>
|
|
7
|
+
<rect x="220" y="30" width="130" height="55" rx="6"/>
|
|
8
|
+
<rect x="220" y="100" width="130" height="55" rx="6"/>
|
|
9
|
+
<rect x="400" y="70" width="130" height="70" rx="6"/>
|
|
10
|
+
<rect x="580" y="70" width="100" height="70" rx="6"/>
|
|
11
|
+
</g>
|
|
12
|
+
<g fill="#0f172a" font-family="sans-serif" font-size="16" text-anchor="middle">
|
|
13
|
+
<text x="105" y="112">book.adoc</text>
|
|
14
|
+
<text x="285" y="63">frontmatter</text>
|
|
15
|
+
<text x="285" y="133">chapters</text>
|
|
16
|
+
<text x="465" y="112">backmatter</text>
|
|
17
|
+
<text x="630" y="112">assets</text>
|
|
18
|
+
</g>
|
|
19
|
+
<g stroke="#0f766e" stroke-width="2" fill="none" marker-end="url(#arrow)">
|
|
20
|
+
<path d="M170 96 L220 58"/>
|
|
21
|
+
<path d="M170 116 L220 128"/>
|
|
22
|
+
<path d="M350 128 L400 112"/>
|
|
23
|
+
<path d="M530 105 L580 105"/>
|
|
24
|
+
</g>
|
|
25
|
+
<defs>
|
|
26
|
+
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto">
|
|
27
|
+
<path d="M0,0 L0,6 L9,3 z" fill="#0f766e"/>
|
|
28
|
+
</marker>
|
|
29
|
+
</defs>
|
|
30
|
+
</svg>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
= 日常独立单书
|
|
2
|
+
作者 <author@example.com>
|
|
3
|
+
v0.1, 2026-05
|
|
4
|
+
:doctype: book
|
|
5
|
+
:toc: left
|
|
6
|
+
:toclevels: 3
|
|
7
|
+
:sectnums:
|
|
8
|
+
:icons: font
|
|
9
|
+
:experimental:
|
|
10
|
+
:idprefix:
|
|
11
|
+
:idseparator: -
|
|
12
|
+
|
|
13
|
+
include::../../shared/attributes.adoc[]
|
|
14
|
+
|
|
15
|
+
[preface]
|
|
16
|
+
include::frontmatter/preface.adoc[]
|
|
17
|
+
|
|
18
|
+
include::chapters/01-opening.adoc[]
|
|
19
|
+
|
|
20
|
+
include::chapters/02-main-flow.adoc[]
|
|
21
|
+
|
|
22
|
+
[appendix]
|
|
23
|
+
include::backmatter/appendix-a.adoc[]
|
|
24
|
+
|
|
25
|
+
[bibliography]
|
|
26
|
+
include::backmatter/bibliography.adoc[]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
= 长书分部样本
|
|
2
|
+
作者 <author@example.com>
|
|
3
|
+
v0.1, 2026-05
|
|
4
|
+
:doctype: book
|
|
5
|
+
:toc: left
|
|
6
|
+
:toclevels: 3
|
|
7
|
+
:sectnums:
|
|
8
|
+
:icons: font
|
|
9
|
+
:experimental:
|
|
10
|
+
:idprefix:
|
|
11
|
+
:idseparator: -
|
|
12
|
+
|
|
13
|
+
include::../../shared/attributes.adoc[]
|
|
14
|
+
|
|
15
|
+
= 第一部:问题世界
|
|
16
|
+
|
|
17
|
+
[partintro]
|
|
18
|
+
include::parts/01-domain/_partintro.adoc[]
|
|
19
|
+
|
|
20
|
+
include::parts/01-domain/01-problem-world.adoc[]
|
|
21
|
+
|
|
22
|
+
include::parts/01-domain/02-boundary.adoc[]
|
|
23
|
+
|
|
24
|
+
= 第二部:书籍规约
|
|
25
|
+
|
|
26
|
+
[partintro]
|
|
27
|
+
include::parts/02-specification/_partintro.adoc[]
|
|
28
|
+
|
|
29
|
+
include::parts/02-specification/01-book-contract.adoc[]
|
|
30
|
+
|
|
31
|
+
include::parts/02-specification/02-verification.adoc[]
|
|
32
|
+
|
|
33
|
+
[appendix]
|
|
34
|
+
include::backmatter/appendix-a.adoc[]
|
|
35
|
+
|
|
36
|
+
[bibliography]
|
|
37
|
+
include::backmatter/bibliography.adoc[]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
本部说明 part 对 `book.adoc` 的结构要求。part、chapter 和后置章节共同组成同一本 book。
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="760" height="240" viewBox="0 0 760 240" role="img" aria-labelledby="title desc">
|
|
2
|
+
<title id="title">技术书流程图</title>
|
|
3
|
+
<desc id="desc">技术书从章节引用书内代码、书内图片和共享图片。</desc>
|
|
4
|
+
<rect width="760" height="240" fill="#f8fafc"/>
|
|
5
|
+
<g fill="#ffffff" stroke="#334155" stroke-width="2">
|
|
6
|
+
<rect x="40" y="85" width="140" height="70" rx="6"/>
|
|
7
|
+
<rect x="250" y="85" width="140" height="70" rx="6"/>
|
|
8
|
+
<rect x="470" y="30" width="140" height="55" rx="6"/>
|
|
9
|
+
<rect x="470" y="105" width="140" height="55" rx="6"/>
|
|
10
|
+
<rect x="470" y="180" width="140" height="40" rx="6"/>
|
|
11
|
+
</g>
|
|
12
|
+
<g fill="#0f172a" font-family="sans-serif" font-size="15" text-anchor="middle">
|
|
13
|
+
<text x="110" y="126">book.adoc</text>
|
|
14
|
+
<text x="320" y="126">chapters</text>
|
|
15
|
+
<text x="540" y="63">examples</text>
|
|
16
|
+
<text x="540" y="138">assets</text>
|
|
17
|
+
<text x="540" y="205">shared</text>
|
|
18
|
+
</g>
|
|
19
|
+
<g stroke="#2563eb" stroke-width="2" fill="none" marker-end="url(#arrow)">
|
|
20
|
+
<path d="M180 120 L250 120"/>
|
|
21
|
+
<path d="M390 105 L470 58"/>
|
|
22
|
+
<path d="M390 125 L470 132"/>
|
|
23
|
+
<path d="M390 145 L470 198"/>
|
|
24
|
+
</g>
|
|
25
|
+
<defs>
|
|
26
|
+
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto">
|
|
27
|
+
<path d="M0,0 L0,6 L9,3 z" fill="#2563eb"/>
|
|
28
|
+
</marker>
|
|
29
|
+
</defs>
|
|
30
|
+
</svg>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
= 技术书工作流
|
|
2
|
+
作者 <author@example.com>
|
|
3
|
+
v0.1, 2026-05
|
|
4
|
+
:doctype: book
|
|
5
|
+
:toc: left
|
|
6
|
+
:toclevels: 3
|
|
7
|
+
:sectnums:
|
|
8
|
+
:icons: font
|
|
9
|
+
:experimental:
|
|
10
|
+
:idprefix:
|
|
11
|
+
:idseparator: -
|
|
12
|
+
|
|
13
|
+
include::../../shared/attributes.adoc[]
|
|
14
|
+
|
|
15
|
+
[preface]
|
|
16
|
+
include::frontmatter/preface.adoc[]
|
|
17
|
+
|
|
18
|
+
include::chapters/01-build-flow.adoc[]
|
|
19
|
+
|
|
20
|
+
include::chapters/02-diagrams.adoc[]
|
|
21
|
+
|
|
22
|
+
include::chapters/03-code-includes.adoc[]
|
|
23
|
+
|
|
24
|
+
[bibliography]
|
|
25
|
+
include::backmatter/bibliography.adoc[]
|
package/templates/default-workspace/books/03-technical-book-workflow/chapters/02-diagrams.adoc
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
== 图表块
|
|
2
|
+
|
|
3
|
+
图表块让技术书把结构图保留为可维护文本。
|
|
4
|
+
|
|
5
|
+
.Mermaid:技术书资源边界
|
|
6
|
+
[mermaid,technical-resource-flow,svg]
|
|
7
|
+
....
|
|
8
|
+
flowchart LR
|
|
9
|
+
book["book.adoc"]
|
|
10
|
+
chapter["chapters/*.adoc"]
|
|
11
|
+
examples["examples/minimal-tool.mjs"]
|
|
12
|
+
assets["assets/images"]
|
|
13
|
+
shared["../../shared/images"]
|
|
14
|
+
|
|
15
|
+
book --> chapter
|
|
16
|
+
chapter --> examples
|
|
17
|
+
chapter --> assets
|
|
18
|
+
chapter --> shared
|
|
19
|
+
....
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
== 参考资料
|
|
2
|
+
|
|
3
|
+
* [[[asciidoctor-xref]]] Asciidoctor Docs, Document to Document Cross References, https://docs.asciidoctor.org/asciidoc/latest/macros/inter-document-xref/
|
|
4
|
+
* [[[antora-xref]]] Antora Docs, Page Xrefs and Resource IDs, https://docs.antora.org/antora/latest/page/xref/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
= 参考手册
|
|
2
|
+
作者 <author@example.com>
|
|
3
|
+
v0.1, 2026-05
|
|
4
|
+
:doctype: book
|
|
5
|
+
:toc: left
|
|
6
|
+
:toclevels: 3
|
|
7
|
+
:sectnums:
|
|
8
|
+
:icons: font
|
|
9
|
+
:experimental:
|
|
10
|
+
:idprefix:
|
|
11
|
+
:idseparator: -
|
|
12
|
+
|
|
13
|
+
include::../../shared/attributes.adoc[]
|
|
14
|
+
|
|
15
|
+
[preface]
|
|
16
|
+
include::frontmatter/preface.adoc[]
|
|
17
|
+
|
|
18
|
+
include::chapters/01-decision-table.adoc[]
|
|
19
|
+
|
|
20
|
+
include::chapters/02-path-rules.adoc[]
|
|
21
|
+
|
|
22
|
+
include::chapters/03-xref-patterns.adoc[]
|
|
23
|
+
|
|
24
|
+
include::chapters/04-growth-paths.adoc[]
|
|
25
|
+
|
|
26
|
+
[glossary]
|
|
27
|
+
include::backmatter/glossary.adoc[]
|
|
28
|
+
|
|
29
|
+
[bibliography]
|
|
30
|
+
include::backmatter/bibliography.adoc[]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[#decision-table]
|
|
2
|
+
== 结构选择表
|
|
3
|
+
|
|
4
|
+
[cols="1,2,2", options="header"]
|
|
5
|
+
|===
|
|
6
|
+
|场景 |推荐样本 |判断标准
|
|
7
|
+
|
|
8
|
+
|学习完整 book 结构
|
|
9
|
+
|`00-book-anatomy`
|
|
10
|
+
|需要看到前置、正文、分部和后置结构的位置。
|
|
11
|
+
|
|
12
|
+
|新增普通书
|
|
13
|
+
|`01-starter-book`
|
|
14
|
+
|需要低负担复制起点。
|
|
15
|
+
|
|
16
|
+
|同一本书内部有第一部、第二部
|
|
17
|
+
|`02-multipart-monograph`
|
|
18
|
+
|仍然是一个入口和一个连续 book。
|
|
19
|
+
|
|
20
|
+
|技术书包含图表和代码片段
|
|
21
|
+
|`03-technical-book-workflow`
|
|
22
|
+
|需要资源边界、图表和代码 include。
|
|
23
|
+
|
|
24
|
+
|上册下册独立发布
|
|
25
|
+
|`05-upper-volume` 与 `06-lower-volume`
|
|
26
|
+
|每册有自己的入口、前言、参考资料和构建产物。
|
|
27
|
+
|===
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[#path-rules]
|
|
2
|
+
== 路径规则
|
|
3
|
+
|
|
4
|
+
Book directory:: `books/<book-id>/`,一本独立 book 的边界。
|
|
5
|
+
Book entry:: `books/<book-id>/book.adoc`,该书唯一入口。
|
|
6
|
+
Book assets:: `books/<book-id>/assets/images/`,只属于该书的图片。
|
|
7
|
+
Shared images:: `shared/images/`,被 catalog 或多本书引用的图片。
|
|
8
|
+
Book examples:: `books/<book-id>/examples/`,只属于该书的代码片段。
|
|
9
|
+
Build output:: `build/`,由脚本生成,不作为源文件编辑。
|
|
10
|
+
|
|
11
|
+
[discrete]
|
|
12
|
+
=== 共享资源准入
|
|
13
|
+
|
|
14
|
+
资源只有在被 catalog 或多本书实际引用时才进入 `shared/`。
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[#xref-patterns]
|
|
2
|
+
== 引用模式
|
|
3
|
+
|
|
4
|
+
书内引用使用本书内 anchor:
|
|
5
|
+
|
|
6
|
+
[source,asciidoc]
|
|
7
|
+
----
|
|
8
|
+
xref:#decision-table[结构选择表]
|
|
9
|
+
----
|
|
10
|
+
|
|
11
|
+
跨书引用写向 AsciiDoc 源文件:
|
|
12
|
+
|
|
13
|
+
[source,asciidoc]
|
|
14
|
+
----
|
|
15
|
+
xref + : + ../other-book/book.adoc#stable-anchor[目标章节]
|
|
16
|
+
----
|
|
17
|
+
|
|
18
|
+
上面的写法用分段文本展示,避免默认样本之间形成真实链接依赖。实际写作时去掉空格和加号,写成一个完整的 cross reference 宏。
|
|
19
|
+
|
|
20
|
+
被跨书引用的位置应写显式 anchor。显式 anchor 是维护者可以稳定依赖的目标。
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
= 示例长书:上册
|
|
2
|
+
作者 <author@example.com>
|
|
3
|
+
v0.1, 2026-05
|
|
4
|
+
:doctype: book
|
|
5
|
+
:toc: left
|
|
6
|
+
:toclevels: 3
|
|
7
|
+
:sectnums:
|
|
8
|
+
:icons: font
|
|
9
|
+
:experimental:
|
|
10
|
+
:idprefix:
|
|
11
|
+
:idseparator: -
|
|
12
|
+
|
|
13
|
+
include::../../shared/attributes.adoc[]
|
|
14
|
+
|
|
15
|
+
[preface]
|
|
16
|
+
include::frontmatter/preface.adoc[]
|
|
17
|
+
|
|
18
|
+
include::chapters/01-upper-opening.adoc[]
|
|
19
|
+
|
|
20
|
+
include::chapters/02-upper-core-model.adoc[]
|
|
21
|
+
|
|
22
|
+
[bibliography]
|
|
23
|
+
include::backmatter/bibliography.adoc[]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
= 示例长书:下册
|
|
2
|
+
作者 <author@example.com>
|
|
3
|
+
v0.1, 2026-05
|
|
4
|
+
:doctype: book
|
|
5
|
+
:toc: left
|
|
6
|
+
:toclevels: 3
|
|
7
|
+
:sectnums:
|
|
8
|
+
:icons: font
|
|
9
|
+
:experimental:
|
|
10
|
+
:idprefix:
|
|
11
|
+
:idseparator: -
|
|
12
|
+
:upper-book: ../05-upper-volume/book.adoc
|
|
13
|
+
|
|
14
|
+
include::../../shared/attributes.adoc[]
|
|
15
|
+
|
|
16
|
+
[preface]
|
|
17
|
+
include::frontmatter/preface.adoc[]
|
|
18
|
+
|
|
19
|
+
include::chapters/01-lower-opening.adoc[]
|
|
20
|
+
|
|
21
|
+
include::chapters/02-cross-volume-practice.adoc[]
|
|
22
|
+
|
|
23
|
+
[bibliography]
|
|
24
|
+
include::backmatter/bibliography.adoc[]
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
= AsciiDoc 多书工作区
|
|
2
|
+
作者 <author@example.com>
|
|
3
|
+
v0.1, 2026-05
|
|
4
|
+
:toc: left
|
|
5
|
+
:toclevels: 2
|
|
6
|
+
:icons: font
|
|
7
|
+
:experimental:
|
|
8
|
+
:idprefix:
|
|
9
|
+
:idseparator: -
|
|
10
|
+
|
|
11
|
+
本页是样本书导航。每本书代表一种常见书籍组织场景。
|
|
12
|
+
|
|
13
|
+
== 按目标选择
|
|
14
|
+
|
|
15
|
+
[cols="1,2,3", options="header"]
|
|
16
|
+
|===
|
|
17
|
+
|如果你想... |先看 |原因
|
|
18
|
+
|
|
19
|
+
|认识一本完整 AsciiDoc book 的结构位置
|
|
20
|
+
|xref:books/00-book-anatomy/book.adoc[00 完整书籍结构标本]
|
|
21
|
+
|它集中展示前置、正文、分部和后置结构。
|
|
22
|
+
|
|
23
|
+
|复制一个普通单书起点
|
|
24
|
+
|xref:books/01-starter-book/book.adoc[01 日常独立单书]
|
|
25
|
+
|它保持最常用、最少负担的 book 结构。
|
|
26
|
+
|
|
27
|
+
|在同一本书里组织第一部、第二部
|
|
28
|
+
|xref:books/02-multipart-monograph/book.adoc[02 长书分部]
|
|
29
|
+
|它展示 book doctype 下的 part 与 partintro。
|
|
30
|
+
|
|
31
|
+
|写带代码、图表、共享资源的技术书
|
|
32
|
+
|xref:books/03-technical-book-workflow/book.adoc[03 技术书工作流]
|
|
33
|
+
|它展示资源边界、图表和构建检查。
|
|
34
|
+
|
|
35
|
+
|查结构选择、术语和写法模式
|
|
36
|
+
|xref:books/04-reference-manual/book.adoc[04 参考手册]
|
|
37
|
+
|它是查阅型书,而不是线性教程。
|
|
38
|
+
|
|
39
|
+
|组织可独立发布的上册
|
|
40
|
+
|xref:books/05-upper-volume/book.adoc[05 上册]
|
|
41
|
+
|它展示分卷上册作为独立 book 的入口。
|
|
42
|
+
|
|
43
|
+
|组织可独立发布的下册
|
|
44
|
+
|xref:books/06-lower-volume/book.adoc[06 下册]
|
|
45
|
+
|它用文本示例说明跨卷引用写法,但不真实依赖上册。
|
|
46
|
+
|===
|
|
47
|
+
|
|
48
|
+
== 样本书
|
|
49
|
+
|
|
50
|
+
* xref:books/00-book-anatomy/book.adoc[00 完整书籍结构标本]:覆盖 book 的前置、正文、分部和后置结构。
|
|
51
|
+
* xref:books/01-starter-book/book.adoc[01 日常独立单书]:新增普通 book 的复制起点。
|
|
52
|
+
* xref:books/02-multipart-monograph/book.adoc[02 长书分部]:同一本 book 内部的 part 结构。
|
|
53
|
+
* xref:books/03-technical-book-workflow/book.adoc[03 技术书工作流]:图表、代码片段和资源边界。
|
|
54
|
+
* xref:books/04-reference-manual/book.adoc[04 参考手册]:结构选择、路径规则和引用模式。
|
|
55
|
+
* xref:books/05-upper-volume/book.adoc[05 上册]:独立分卷的上册。
|
|
56
|
+
* xref:books/06-lower-volume/book.adoc[06 下册]:独立分卷的下册,并用示例说明跨卷引用写法。
|
|
57
|
+
|
|
58
|
+
== 工作区地图
|
|
59
|
+
|
|
60
|
+
image::shared/images/workspace-map.svg[多书工作区结构]
|
|
61
|
+
|
|
62
|
+
== 书籍边界速判
|
|
63
|
+
|
|
64
|
+
* 只是同一本书内部的第一部、第二部:看 xref:books/02-multipart-monograph/book.adoc[02 长书分部]。
|
|
65
|
+
* 上册需要独立入口和独立构建:看 xref:books/05-upper-volume/book.adoc[05 上册]。
|
|
66
|
+
* 下册需要说明跨卷引用写法但不制造默认依赖:看 xref:books/06-lower-volume/book.adoc[06 下册]。
|
|
67
|
+
* 新增一本普通书:从 xref:books/01-starter-book/book.adoc[01 日常独立单书] 开始。
|
|
68
|
+
* 查路径、引用和增长规则:看 xref:books/04-reference-manual/book.adoc[04 参考手册]。
|