From 3dc7f222af799e874a55b47f8c43fb65b1716f08 Mon Sep 17 00:00:00 2001 From: Iosif Takakura Date: Tue, 14 May 2024 16:57:18 +0900 Subject: [PATCH] update --- .gitignore | 2 ++ package.json | 5 +++- sass/common/_contents.scss | 4 +++ sass/common/_fonts.scss | 2 +- sass/common/_format.scss | 33 +++++++++++++++++++++--- sass/vivliostyle-a4.scss | 52 ++++++++++++++++++++++++++++++++++++++ sass/vivliostyle-a5.scss | 18 ++++++++++--- sass/vivliostyle-a6.scss | 42 ++++++++++++++++++++++++++++++ 8 files changed, 150 insertions(+), 8 deletions(-) create mode 100644 sass/vivliostyle-a4.scss create mode 100644 sass/vivliostyle-a6.scss diff --git a/.gitignore b/.gitignore index e0d9ddd..13c1f8e 100644 --- a/.gitignore +++ b/.gitignore @@ -158,6 +158,8 @@ $RECYCLE.BIN/ sty/old/ +/vivliostyle-a4.css +/vivliostyle-a4.css.map /vivliostyle-a5.css /vivliostyle-a5.css.map /vivliostyle-a6.css diff --git a/package.json b/package.json index f731674..ce9be2b 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,10 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "lint": "textlint *.re", - "style": "sass ./sass/vivliostyle-a5.scss vivliostyle-a5.css" + "style:a5": "sass ./sass/vivliostyle-a5.scss vivliostyle-a5.css", + "style:a4": "sass ./sass/vivliostyle-a4.scss vivliostyle-a4.css", + "style:a6": "sass ./sass/vivliostyle-a6.scss vivliostyle-a6.css", + "style": "npm run style:a6" }, "repository": { "type": "git", diff --git a/sass/common/_contents.scss b/sass/common/_contents.scss index 89c4e1f..c189a77 100644 --- a/sass/common/_contents.scss +++ b/sass/common/_contents.scss @@ -124,6 +124,8 @@ pre { ul, ol { padding-inline-start: 1.5em; + margin-top: 1rem; + margin-bottom: 1rem; } /* 表組み */ @@ -163,6 +165,8 @@ table tr:last-child { blockquote { padding-inline-start: 1.5em; + margin-top: 1rem; + margin-bottom: 1rem; } .draft-author { diff --git a/sass/common/_fonts.scss b/sass/common/_fonts.scss index ccfb6c6..fc305b3 100644 --- a/sass/common/_fonts.scss +++ b/sass/common/_fonts.scss @@ -56,5 +56,5 @@ @font-face { font-family: 'Yakumono'; - src: url(./fonts/YakuCaltMincho-R.woff) format("woff"); + src: url(./fonts/YakuCalt/YakuCaltMincho-R.woff) format("woff"); } diff --git a/sass/common/_format.scss b/sass/common/_format.scss index 4759d19..a1e50a2 100644 --- a/sass/common/_format.scss +++ b/sass/common/_format.scss @@ -19,15 +19,22 @@ html { } @page { - size: 148mm 210mm; + size: $paper-width $paper-height; // 行送り * 行数 width: $content-width; // フォントサイズ * 文字数 height: $content-height; - margin: auto; + // margin: auto; + margin-top: $ten; + margin-bottom: $chi; + marks: $marks; } @page :left { + + margin-right: $nodo; + margin-left: $koguchi; + @top-left { /* 左上ノンブル、柱(タイトル文字列) */ content: counter(page) "  " env(pub-title); @@ -37,9 +44,21 @@ html { margin-top: 6mm; writing-mode: horizontal-tb; } + + @right-middle { + /* 隠しノンブル */ + font-size: 4pt; + margin-right: -3mm !important; + text-align: start !important; + content: counter(page); + } } @page :right { + + margin-left: $nodo; + margin-right: $koguchi; + @top-right { /* 右上ノンブル、柱(出版物タイトル文字列) */ content: env(doc-title) "  " counter(page); @@ -49,6 +68,14 @@ html { margin-top: 6mm; writing-mode: horizontal-tb; } + + @left-middle { + /* 隠しノンブル */ + font-size: 4pt; + margin-left: -3mm !important; + align-items: end !important; + content: counter(page); + } } /* 表紙ページ */ @@ -83,4 +110,4 @@ html { .cover { content: none; } -} \ No newline at end of file +} diff --git a/sass/vivliostyle-a4.scss b/sass/vivliostyle-a4.scss new file mode 100644 index 0000000..eefc790 --- /dev/null +++ b/sass/vivliostyle-a4.scss @@ -0,0 +1,52 @@ +@charset "UTF-8"; +@import 'common/_fonts.scss'; + +// 基本フォントサイズ +$base-font-size: 10pt; +// 基本行送り +$base-line-height: 16pt; +// 基本フォントファミリー +//$base-font-family: "EB Garamond", "Yakumono", "Nanum Myeongjo", "Noto Serif CJK jp", serif; +$base-font-family: "EB Garamond", "Yakumono", "Noto Serif CJK jp", serif; + +// 行数 +$lines: 28; +// 1行あたり文字数 +$characters-per-line: 70; +// 天 +$ten: 17mm; +// 地 +$chi: 15mm; +// 小口 +$koguchi: 12mm; +// ノド +$nodo: 18mm; + +//紙の横幅 +$paper-width: 210mm; +//紙の縦幅 +$paper-height: 297mm; +//トンボ +$marks: none; + +//コンテンツの横幅 +//$content-width: $base-line-height * $lines; +$content-width: $paper-width - $koguchi - $nodo; +//コンテンツの縦幅 +//$content-height: $base-font-size * $characters-per-line; +$content-height: $paper-height - $ten - $chi; + +/* 印刷用のみ段組にする */ +@media print { + html { + column-count: 1; + column-gap: 2em; + } +} + +// ページのスタイル定義 +@import 'common/format'; +// タイポグラフィのスタイル定義 +@import 'common/typography'; +// コンテンツのスタイル定義 +@import 'common/contents'; \ No newline at end of file diff --git a/sass/vivliostyle-a5.scss b/sass/vivliostyle-a5.scss index 5cebc55..0e6bbca 100644 --- a/sass/vivliostyle-a5.scss +++ b/sass/vivliostyle-a5.scss @@ -12,17 +12,29 @@ $base-font-family: "EB Garamond", "Yakumono", "Noto Serif CJK jp", serif; // 行数 $lines: 22; // 1行あたり文字数 -$characters-per-line: 45; +$characters-per-line: 50; +// 天 +$ten: 17mm; +// 地 +$chi: 15mm; +// 小口 +$koguchi: 12mm; +// ノド +$nodo: 18mm; //紙の横幅 $paper-width: 148mm; //紙の縦幅 $paper-height: 210mm; +//トンボ +$marks: crop; //コンテンツの横幅 -$content-width: $base-line-height * $lines; +//$content-width: $base-line-height * $lines; +$content-width: $paper-width - $koguchi - $nodo; //コンテンツの縦幅 -$content-height: $base-font-size * $characters-per-line; +//$content-height: $base-font-size * $characters-per-line; +$content-height: $paper-height - $ten - $chi; // ページのスタイル定義 @import 'common/format'; diff --git a/sass/vivliostyle-a6.scss b/sass/vivliostyle-a6.scss new file mode 100644 index 0000000..1a7f382 --- /dev/null +++ b/sass/vivliostyle-a6.scss @@ -0,0 +1,42 @@ +@charset "UTF-8"; +@import 'common/_fonts.scss'; + +// 基本フォントサイズ +$base-font-size: 8pt; +// 基本行送り +$base-line-height: 16pt; +// 基本フォントファミリー +//$base-font-family: "EB Garamond", "Yakumono", "Nanum Myeongjo", "Noto Serif CJK jp", serif; +$base-font-family: "EB Garamond", "Yakumono", "Noto Serif CJK jp", serif; + +// 行数 +$lines: 15; +// 1行あたり文字数 +$characters-per-line: 40; +// 天 +$ten: 17mm; +// 地 +$chi: 15mm; +// 小口 +$koguchi: 12mm; +// ノド +$nodo: 18mm; + +//紙の横幅 +$paper-width: 105mm; +//紙の縦幅 +$paper-height: 148mm; +//トンボ +$marks: crop; + +//コンテンツの横幅 +$content-width: $base-line-height * $lines; +//コンテンツの縦幅 +$content-height: $base-font-size * $characters-per-line; + +// ページのスタイル定義 +@import 'common/format'; +// タイポグラフィのスタイル定義 +@import 'common/typography'; +// コンテンツのスタイル定義 +@import 'common/contents';