We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
vivliostyle.config.js の toc: true により目次のHTMLファイル toc.html が生成されて、それが manifest.json の readingOrder の先頭項目になります。 これにより、組版される文書の先頭に目次がつきます。
toc: true
現状(CLI 3.0.0-pre.2 で確認)の目次HTMLファイル生成には次の問題があるため、あまり有用ではありません:
<link rel="stylesheet"...>
@page { size: }
以下、改善案:
<link href="テーマの.css" rel="stylesheet">
例:
<html lang="ja"> <head> <title>本のタイトル</title> <link href="manifest.json" rel="manifest" type="application/webpub+json"> <link href="theme.css" rel="stylesheet"> </head> <body> <h1>本のタイトル</h1> <nav id="toc" role="doc-toc"> <h2>目次</h2> <ul> <li><a href="chapter1.html">第1章</a></li> <li><a href="chapter2.html">第2章</a></li> </ul> </nav> </body> </html>
The text was updated successfully, but these errors were encountered:
<link href="テーマの.css" rel="stylesheet"> を出力する
👍 良いですね!こちらは比較的小さなバグです。
もう一つの問題についてですが、現状のtoc: trueではオーダーが強制的に最初になってしまい、例えば表紙やprefaceの後に目次を置きたいなどのコントロールが出来ないので修正が必要です。 アイディアとして、例えばvivliostyle.config.jsのentryにToC用のidentifierを定義し、その位置にtoc.htmlを差し込めるようにすると自由度が上がります。その場合はタイトルは不要ですが、<h2>目次</h2>はあったほうが良いでしょう(言語はlanguageによって変わるようにする)。もしそのような仕様にする場合は、tocオプションを廃止して、目次identifierがentryに存在した時点で自動で目次を生成した方が自然ですね。
vivliostyle.config.js
entry
<h2>目次</h2>
language
toc
Sorry, something went wrong.
No branches or pull requests
vivliostyle.config.js の
toc: true
により目次のHTMLファイル toc.html が生成されて、それが manifest.json の readingOrder の先頭項目になります。これにより、組版される文書の先頭に目次がつきます。
現状(CLI 3.0.0-pre.2 で確認)の目次HTMLファイル生成には次の問題があるため、あまり有用ではありません:
<link rel="stylesheet"...>
がない)。@page { size: }
で指定されている場合、目次ページに適用されない。以下、改善案:
<link href="テーマの.css" rel="stylesheet">
を出力する例:
The text was updated successfully, but these errors were encountered: