Skip to content

Commit

Permalink
Merge pull request #136 from vivliostyle/update-epub3j
Browse files Browse the repository at this point in the history
Update theme-epub3j
  • Loading branch information
spring-raining authored Oct 27, 2024
2 parents d3c9c5b + 9b68755 commit b670735
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
8 changes: 8 additions & 0 deletions .changeset/violet-bobcats-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@vivliostyle/theme-epub3j": minor
---

Update EPUB3-Japanese Theme

- EPUB TOC requires ordered list
- text-spacing-trim and hanging-punctuation setting
10 changes: 5 additions & 5 deletions packages/@vivliostyle/theme-epub3j/example/p-toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ class: vrtl p-toc

<nav id="toc" role="doc-toc">

# 目次
# 目次 #

- [電書協 EPUB 3 制作ガイド 作品サンプル](p-001.html#toc-001){.gfont .font-1em10}
- [<ruby>蜘<rt>く</rt>蛛<rt>も</rt></ruby>の<ruby>糸<rt>いと</rt></ruby>](p-002.html#toc-002)
- [注釈](p-cyushaku.html#toc-003){.font-0em90}
- [奥付](p-colophon.html)
1. [電書協 EPUB 3 制作ガイド 作品サンプル](p-001.html#toc-001){.gfont .font-1em10}
1. [<ruby>蜘<rt>く</rt>蛛<rt>も</rt></ruby>の<ruby>糸<rt>いと</rt></ruby>](p-002.html#toc-002)
1. [注釈](p-cyushaku.html#toc-003){.font-0em90}
1. [奥付](p-colophon.html)

</nav>
7 changes: 7 additions & 0 deletions packages/@vivliostyle/theme-epub3j/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ nav ul, nav ol {
list-style: none;
}

/* 約物の処理
---------------------------------------------------------------- */
body {
text-spacing-trim: space-first; /* 折り返し行頭の約物を詰める */
hanging-punctuation: allow-end; /* 行末の句読点のぶら下げあり */
}

/* 簡易印刷スタイル(Vivliostyle用。通常のEPUBリーダーでは無視される)
---------------------------------------------------------------- */

Expand Down
7 changes: 5 additions & 2 deletions packages/@vivliostyle/theme-epub3j/vivliostyle.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ module.exports = {
'example/p-colophon.md',
],
cover: 'example/assets/cover.jpg',
// toc: true,
// tocTitle: '目次',
// toc: {
// htmlPath: 'example/toc.html',
// title: '目次',
// sectionDepth: 2,
// },
workspaceDir: '.vivliostyle',
output: [
'book.pdf',
Expand Down

0 comments on commit b670735

Please sign in to comment.