Skip to content
Open
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
2f0b115
feat: add scaffolding for the New Features section
ogwata May 5, 2026
ac7ee06
docs: add Footnotes guide (Vivliostyle.js v2.41.0+)
ogwata May 5, 2026
9c80707
docs: add CMYK Conversion guide (Vivliostyle.js v2.40.0+)
ogwata May 5, 2026
1b7d79e
docs: add Page Groups guide (Vivliostyle.js v2.39.0+)
ogwata May 5, 2026
25157d5
feat: integrate New Features section into top page and breadcrumbs
ogwata May 5, 2026
7fcace8
feat: add New Features to global nav and unify nav link font size
ogwata May 5, 2026
e18f495
fix(nav): move New Features to the leftmost position in the global nav
ogwata May 5, 2026
32a4328
style(nav): visually match FAQ size to CJK on Japanese pages
ogwata May 5, 2026
bf2dbe0
feat(home): mirror global nav structure in the home-page sidebar
ogwata May 5, 2026
486056b
style(home): tune visual hierarchy of the home sidebar
ogwata May 5, 2026
8878a2c
fix(home): broaden the New Features section description
ogwata May 5, 2026
6f42c43
fix(footnotes): name the product up front, fix dead JLReq link
ogwata May 5, 2026
f452d48
chore(screenshots): add capture environment for the Footnotes guide
ogwata May 5, 2026
125d60e
fix(screenshots): drop leading digits from ja footnote bodies
ogwata May 5, 2026
ba84dd3
fix: ignore vivliostyle preview vite cache
ogwata May 5, 2026
7219375
chore: bump @vivliostyle/cli to 10.5 and @vivliostyle/vfm to 2.6
ogwata May 5, 2026
b9aa55d
fix(screenshots): give DPUB-ARIA sample a visible footnote marker
ogwata May 5, 2026
7b88fc7
docs(footnotes): document the list-style-position: outside requirement
ogwata May 5, 2026
bf242d4
fix(screenshots): make 03 and 04 fixtures actually render correctly
ogwata May 5, 2026
4015b5f
docs(investigation): footnote-display: inline does not flow visually
ogwata May 5, 2026
7e805b1
docs(investigation): translate footnote-display issue draft to Japanese
ogwata May 5, 2026
fecdcd4
docs(investigation): add footnote-display: inline screenshots
ogwata May 5, 2026
b5fc3f2
chore: override @vivliostyle/viewer to ^2.42.0
ogwata May 6, 2026
0e999b8
fix(screenshots): rebuild 06 / 07 fixtures for Viewer 2.42.0
ogwata May 6, 2026
dd0d060
docs(footnotes): embed 14 screenshots and clarify v2.41.0 vs v2.42.0
ogwata May 6, 2026
cb48b5d
fix(screenshots): shrink 05 / 06 / 07 page size to match the rest
ogwata May 6, 2026
d4237db
fix(page-groups): replace em dash in §6 heading with double em dash
ogwata May 6, 2026
4f1453b
fix(cmyk): correct misleading "magenta?" comment in basic syntax
ogwata May 6, 2026
f7fe220
fix(page-groups): drop device-cmyk() from cover example
ogwata May 6, 2026
21f8a4d
a11y(home): improve home-sidebar accordion accessibility
ogwata May 6, 2026
2918e6f
refactor(footnotes): rebuild samples from VFM Markdown sources
ogwata May 7, 2026
a0cf783
feat(new-features): show H2/H3 of current page in sidebar
ogwata May 7, 2026
21bc92b
refactor(sidebar): unify H2/H3 sidebar across product sections
ogwata May 7, 2026
6476ab4
chore: archive handwritten footnote fixtures to _archive/
ogwata May 7, 2026
167814f
a11y(sidebar): address Copilot review on TOC headings component
ogwata May 7, 2026
4e7dd78
style(ja): strip 和欧 boundary half-width spaces in vfm-loader output
ogwata May 7, 2026
f11c675
fix(vfm-loader): replace embedded U+0000 in SENTINEL with text escape
ogwata May 8, 2026
113b175
Merge branch 'main' into feat/issue-15-new-features-section
ogwata May 8, 2026
096f5e2
chore(deps): sync package-lock.json with merged package.json
ogwata May 8, 2026
29fa309
fix(nav): restore intermediate-size scale-down breakpoint dropped by …
ogwata May 8, 2026
5a9186c
fix: address Copilot review comments on PR #17
ogwata May 8, 2026
ad14943
refactor(cookbook): rename "New Features" section to "Cookbook" / "活用…
ogwata May 8, 2026
097c667
docs(cookbook/footnotes): rephrase "番号を再開" to "番号を新規に採番"
ogwata May 8, 2026
8edd101
fix: address Copilot review on rename commit ad14943
ogwata May 8, 2026
9406cfb
docs(home): drop "Vivliostyle.js and CLI" framing from Cookbook intro
ogwata May 8, 2026
056eb3d
fix(nav): move Product to leftmost, Cookbook to its right
ogwata May 8, 2026
0f975a6
feat(cookbook): wire Cookbook section into PDF/EPUB/WebPub pipeline
ogwata May 8, 2026
30da0ec
docs(home): add a Downloads section listing every product's PDF / EPUB
ogwata May 8, 2026
62c0f0d
fix(layout): build the page title in frontmatter to stop body-leak
ogwata May 8, 2026
5153a59
fix(css): outline article images with a 1px border for light-mode vis…
ogwata May 8, 2026
7d1643e
feat: トップページにプロダクト群イラストを追加、VFM機能デモを拡充
ogwata May 9, 2026
cc729e5
docs: ダウンロードセクションの説明文を修正
ogwata May 9, 2026
4c81ec1
docs: ダウンロードセクションの説明文を再修正
ogwata May 9, 2026
812b58c
docs: Vivliostyle CLIの説明にEPUB生成を追加
ogwata May 10, 2026
c25e3ae
docs: 「はじめに」セクションを削除
ogwata May 10, 2026
f5a39aa
docs: 英語版トップページをja版と同期(CLI説明、Getting Started削除、ダウンロード説明修正)
ogwata May 10, 2026
95999a2
docs: 英語版の引用符をカーリークォートに統一
ogwata May 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ pnpm-debug.log*

# Vivliostyle temporary files
.vivliostyle/

# Vivliostyle preview (vite) cache
.vite/
216 changes: 216 additions & 0 deletions _investigation/footnote-display-inline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
# `footnote-display: inline` が author CSS から効かない件

Vivliostyle.js のドキュメントサイトで脚注ガイド記事のスクリーンショットを
撮影中に発見した問題のメモ。

## 環境

- `@vivliostyle/cli` **10.5.0**
- `@vivliostyle/viewer` **2.41.0**
- `@vivliostyle/core` **2.42.0**(CLI が依存)
- macOS / Chrome 経由 `vivliostyle preview`

## 期待する挙動(CSS GCPM 3)

```css
.footnote {
footnote-display: inline;
}
```

を指定すると、複数の DPUB-ARIA 脚注(`<aside role="doc-footnote">`)が
**脚注エリア内で 1 行(または最小限の行数)にインラインで流し込まれる**。

参考: [CSS GCPM 3 §2.4 footnote-display](https://www.w3.org/TR/css-gcpm-3/#footnote-display)

## 実際の挙動

`@vivliostyle/cli@10.5.0` 環境で `vivliostyle preview` を実行すると、
**`footnote-display: inline` を author CSS で指定しても、脚注エリアでは
各注がブロックレベルで縦積みされる**(block 表示と区別がつかない)。

## 試したパターン(すべて未動作)

### 1. 最小構成

```html
<style>
.footnote { footnote-display: inline; }
</style>
<aside class="footnote" role="doc-footnote">注1</aside>
<aside class="footnote" role="doc-footnote">注2</aside>
<aside class="footnote" role="doc-footnote">注3</aside>
```

### 2. テストファイル `dpub-footnote-display.html` と同じセクションラップ

```html
<style>
.footnote-display-inline .footnote { footnote-display: inline; }
</style>
<section class="footnote-display-inline">
<p>...<a role="doc-noteref" href="#fn1">1</a>...</p>
<aside id="fn1" class="footnote" role="doc-footnote">注1</aside>
</section>
```

### 3. テストファイル完全一致パターン(footnote-ref class、backlink つき)

```html
<a id="ref1" href="#fn1" class="footnote-ref" role="doc-noteref"><sup>1</sup></a>
...
<aside id="fn1" class="footnote" role="doc-footnote">
<a href="#ref1" class="footnote-back" role="doc-backlink"><sup>1</sup></a>
注1
</aside>
```

### 4. 属性セレクタ

```css
aside[role="doc-footnote"] { footnote-display: inline; }
```

### 5. `display: inline` フォールバック

```css
.footnote { footnote-display: inline; display: inline; }
```

→ `display: inline` 自体は反映され、aside が **本文中に** インライン表示
されてしまった(UA の `display: none` を上書き)。脚注エリアの方は依然
として block 表示のまま。

### 6. ページサイズ拡大

180×110mm でも 148×210mm(A5)でも、結果は同じ。

## 観察

### テストファイル自体の挙動

`submodules/vivliostyle.js/packages/core/test/files/footnotes/dpub-footnote-display.html`
を `vivliostyle preview` で開くと、「footnote-display: inline」セクション
の脚注エリアでも 3 件の注が**別々の行**に表示される(block と視覚的に
区別がつかない)。

つまり**テストが通っている挙動 = 視覚的にインラインに見える**ではない
可能性がある(テストはピクセル比較かもしれず、内部状態のみ正しければ
通るのかも)。

### 関連ソース

`packages/core/src/vivliostyle/semantic-footnote.ts` の
`getFootnoteDisplayOverride`:

```typescript
const footnoteDisplay = styleAccess.getProp(style, "footnote-display");
if (footnoteDisplay) {
return footnoteDisplay;
}
const display = styleAccess.getProp(style, "display");
if (display?.value === Css.ident.inline) {
return styleAccess.createCascadeValue(Css.ident.inline, display.priority);
}
return null;
```

`footnote-display` プロパティは元の脚注要素のスタイルから読まれる
仕様。読まれているのに視覚効果に出ない、ということは、後続のレイアウト
処理側で適用が落ちている可能性が高い。

## 切り分けに必要そうな情報

- v2.41.0 で `footnote-display: inline` が視覚的にインライン流し込みする
サンプルが存在するか(テスト以外で)
- もし「内部状態のみ」のサポートだとしたら、それは仕様?それともバグ?
- `supported-css-features.md` には `footnote-display` の `block` /
`inline` / `compact` がサポート済と記載あり

## Issue 草案

タイトル候補:
> v2.41.0 で `footnote-display: inline` が DPUB-ARIA 脚注の本文を視覚的に
> 1 行に流し込まない

本文(日本語、起票時に確認・調整):

```
### 概要

`<aside role="doc-footnote">`(または `.footnote` クラス)に対して
`footnote-display: inline` を指定しても、脚注エリアでは各脚注本文が
それぞれ別の行にブロック積みされ、デフォルトの
`footnote-display: block` と視覚的に区別がつきません。

同じ現象がリポジトリ内蔵のテストファイル
`packages/core/test/files/footnotes/dpub-footnote-display.html` でも
観察され、「footnote-display: inline」セクションは
「footnote-display: block」セクションと同じ見た目になります。

### 環境

- `@vivliostyle/cli` 10.5.0
- `@vivliostyle/viewer` 2.41.0
- `@vivliostyle/core` 2.42.0
- macOS、`vivliostyle preview` 経由(Chromium 系ブラウザ)

### 再現方法

最小再現の HTML を以下に置いています(参照リンク参照):
`docs2.vivliostyle.org/_screenshots/footnotes/{en,ja}/05-footnote-display-inline.html`

簡略な再現コード:

(ja/05 を縮めたインライン HTML を貼る)

### 期待される挙動

CSS GCPM 3 §2.4 footnote-display およびドキュメントサイトの
[脚注ガイド](https://docs.vivliostyle.org/ja/new-features/footnotes/)
(対象バージョン Vivliostyle.js v2.41.0+)に従えば、3 件の短い脚注本文は
脚注エリアで 1 行(または 1 つの inline run として折り返しを含むひとつの
連続)に流れるはずです。

### 実際の挙動

3 件の脚注が縦積みされ、`footnote-display: block` と区別がつきません。
スクリーンショット添付。

### 試したパターン

- `.footnote { footnote-display: inline }`
- `.footnote-display-inline .footnote { footnote-display: inline }`
(`dpub-footnote-display.html` テストと同じ書き方)
- `aside[role="doc-footnote"] { footnote-display: inline }`
- フォールバックとして `display: inline` を併記
→ `display: inline` 自体は反映され aside が本文中にもインライン表示
されてしまった(UA の `display: none` を上書き)。脚注エリア側は
依然として block 表示のまま。
- ページサイズの拡大(148×210 / 180×110)

### 補足

- `semantic-footnote.ts` の `getFootnoteDisplayOverride` は
`footnote-display: inline` をソースから読み取るコードになっており、
cascade の段階では正しく拾われています。にもかかわらず最終的な
レイアウトに変化が見えないため、後段のレイアウト処理側で適用が
落ちている可能性があります。
- この問題は、Vivliostyle ドキュメントサイト v2.41.0 向け脚注ガイドの
スクリーンショット撮影中に発見しました。

### 関連リンク

- docs2.vivliostyle.org Issue #15
- docs2.vivliostyle.org ブランチ `feat/issue-15-new-features-section`
- 再現用 HTML: `_screenshots/footnotes/{en,ja}/05-footnote-display-inline.html`
```

## 次のステップ

1. **本ファイルをコミット**して投稿前のメモとして残す
2. ユーザの確認のうえ、`gh issue create` で Vivliostyle.js リポジトリに
起票(または手動投稿)
3. 起票後、記事 `content/{en,ja}/new-features/footnotes.md` の §8
`footnote-display` 節に「v2.41.0 で視覚的に確認できない([Issue
#XXXX](URL))」と注記を入れる
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
124 changes: 124 additions & 0 deletions _screenshots/footnotes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# 脚注ガイド スクリーンショット撮影環境

`content/{en,ja}/new-features/footnotes.md` に埋め込むスクリーンショットを
撮影するためのソース HTML を置く作業ディレクトリです。

## 設計方針

- **ページサイズを意図的に小さく設定**(140mm × 90mm 程度の短冊型)して、
「本文の参照位置 + 脚注エリア」だけが 1 ページに収まるようにしてある。
撮影時は **ページ全体** を撮るだけで OK。トリミング作業が不要になり、
ファイルサイズも自然に抑えられる。
- 各 HTML は完全自己完結(CSS は `<style>` 内にインライン)。Vivliostyle.js
v2.41.0+ で開けば、ガイド記事に対応する見え方を確認できる。

## ディレクトリ構成

```
_screenshots/footnotes/
├── README.md ← このファイル
├── en/ ← 英語サンプル本文の HTML
│ ├── 01-html-class-themebase.html
│ ├── 02-vfm-pandoc-endnotes.html
│ ├── 03-dpub-aria-default.html
│ ├── 04-page-footnote-styled.html
│ ├── 05-footnote-display-inline.html
│ ├── 06-footnote-display-compact.html
│ └── 07-footnote-marker-outside.html
└── ja/ ← 日本語サンプル本文の HTML
└── (same 7 files)
```

## 撮影手順

### 1. ローカルで開く

#### a) Vivliostyle CLI で個別プレビュー(推奨)

```sh
# 例: 日本語版の例 1 を開く
npx vivliostyle preview _screenshots/footnotes/ja/01-html-class-themebase.html
```

ブラウザが自動で開く。プレビュー画面で「単ページ」表示にする。

#### b) HTTP サーバ + Vivliostyle Viewer

```sh
npx http-server _screenshots/footnotes -p 8080
```

そのうえで Vivliostyle Viewer を以下の URL で開く:

```
https://vivliostyle.org/viewer/?src=http://localhost:8080/ja/01-html-class-themebase.html
```

### 2. 撮影

- 短冊型のページ全体(本文 + 脚注エリア)を 1 枚に収める
- 推奨フォーマット: **PNG**
- 解像度: Retina 相当(DPR 2x)程度

### 3. 保存先

```
public/new-features/footnotes/
├── en/
│ ├── 01-html-class-themebase.png
│ ├── …
└── ja/
├── 01-html-class-themebase.png
└── …
```

`public/` 以下に置くことで Astro のデプロイに含まれる。

### 4. 記事への組み込み

`content/{en,ja}/new-features/footnotes.md` の該当セクションに以下のように
追記:

```markdown
![Footnote rendered with theme-base CSS](/new-features/footnotes/en/01-html-class-themebase.png)
```

```markdown
![theme-base で描画された脚注](/new-features/footnotes/ja/01-html-class-themebase.png)
```

Markdown への画像挿入作業は別ステップとして依頼してください。

## サンプル一覧

| # | ファイル | デモする内容 | 対応する記事節 |
|----|---------|-----------|--------------|
| 01 | `01-html-class-themebase.html` | `<span class="footnote">` + GCPM クラス方式 | Part 2 §2 |
| 02 | `02-vfm-pandoc-endnotes.html` | VFM Pandoc 形式の後注 | Part 2 §3 |
| 03 | `03-dpub-aria-default.html` | DPUB-ARIA `<aside role="doc-footnote">`、テーマ CSS なし | Part 3 §5 |
| 04 | `04-page-footnote-styled.html` | `@page { @footnote { … } }` と `::before` | Part 3 §7 |
| 05 | `05-footnote-display-inline.html` | `footnote-display: inline` | Part 3 §8 |
| 06 | `06-footnote-display-compact.html` | `footnote-display: compact` | Part 3 §8 |
| 07 | `07-footnote-marker-outside.html` | `::footnote-marker` の `list-style-position: outside` | Part 3 §9 |

## ページ寸法について

各サンプルは以下で統一:

```css
@page {
size: 140mm 90mm;
margin: 12mm 14mm;
}
```

A5 などより明らかに小さいので、撮影された画像も自然と小さく仕上がる。
記事内に並べたときに本文を圧迫しないサイズを目指している。

## 注意

- これらの HTML は **記事内の文言と完全一致しません**。短冊サイズに収まる
量の本文に絞ってあります。
- フォントは `Noto Serif JP` 系(日本語)/ `Source Serif Pro` 系(英語)を
指定。インストールされていない場合は OS 既定の serif にフォールバック
します。
40 changes: 40 additions & 0 deletions _screenshots/footnotes/en/01-html-class-themebase.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example 1: HTML class footnote (theme-base style)</title>
<style>
@page { size: 140mm 90mm; margin: 12mm 14mm; }
body {
font-family: "Source Serif Pro", "Georgia", serif;
font-size: 10pt;
line-height: 1.55;
text-align: justify;
}
p { margin: 0 0 0.5em; }
code { font-size: 0.92em; }

/* GCPM class style (equivalent to what theme-base provides) */
.footnote { float: footnote; }
::footnote-call {
content: counter(footnote);
font-size: 0.7em;
vertical-align: super;
line-height: 0;
}
::footnote-marker { content: counter(footnote) ". "; }
@page {
@footnote {
border-top: 0.4pt solid currentColor;
padding-top: 4pt;
font-size: 8.5pt;
line-height: 1.5;
}
}
</style>
</head>
<body>
<p>A footnote written directly in HTML as <code>&lt;span class="footnote"&gt;</code><span class="footnote">The footnote body. <code>float: footnote</code> moves it to the page-bottom area at layout time.</span> is moved to the page-bottom footnote area at layout time, thanks to a theme (theme-base / theme-techbook) that defines <code>.footnote { float: footnote }</code>.</p>
<p>Multiple references in the same paragraph<span class="footnote">A second note. Numbering is automatic.</span> share an auto-incrementing counter, generated by the <code>::footnote-call</code> and <code>::footnote-marker</code> pseudo-elements.</p>
</body>
</html>
Loading
Loading