diff --git a/css/scss/style.scss b/css/scss/style.scss index 6c4fe12..e67ab60 100644 --- a/css/scss/style.scss +++ b/css/scss/style.scss @@ -9,6 +9,7 @@ :root { --main-font-family: "Noto Serif JP", serif; --heading-gothic-font-family: "Noto Sans JP", sans-serif; + counter-reset: chapter; } html { @@ -26,10 +27,57 @@ html { } ////////////////////////// -/// 背景の画像 +/// 背景の画像,ページ番号 ////////////////////////// -/// 1枚目 青いやつ +// 章番号セット +@page :first { + /* 全原稿ファイルの中で1枚目のページ */ + // counter-reset: chapter; +} + +@page :nth(2) { + /* 各原稿ファイルの中で2枚目のページ */ + counter-increment: chapter; +} + +@page :left { + margin-right: 20mm; + @top-left-corner { + content: counter(page); + text-align: center; + font-family: "Noto Sans JP"; + font-weight: 500; + font-size: 3.4mm; + } + @top-left { + content: "第" counter(chapter) "章 │ " env(doc-title); + font-family: "Noto Serif JP"; + font-weight: 500; + font-size: 3mm; + } +} + +// 右ページ 右上に表示 +@page :right { + margin-right: 20mm; + @top-right-corner { + content: counter(page); + text-align: center; + font-family: "Noto Sans JP"; + font-weight: 500; + font-size: 3.4mm; + } + + @top-right { + content: string(seciton-number, first) "│ " string(section, first); + font-family: "Noto Serif JP"; + font-weight: 500; + font-size: 3mm; + } +} + +// 青い背景 一枚目 @page: nth(1) { background-image: url("../img/chapter_page_left.png"); background-size: contain; @@ -46,6 +94,7 @@ html { } } +// 青い背景 二枚目 @page: nth(2) { background-image: url("../img/chapter_page_right.png"); background-size: contain; @@ -58,9 +107,38 @@ html { @top-left-corner { content: none; } + + @top-left { + content: none; + } + + @top-right-corner { + content: none; + } + + @top-right { + content: none; + } +} + +// 表紙 +@page: first { + background-image: none; + @top-left-corner { + content: none; + } + @top-left { content: none; } + + @top-right-corner { + content: none; + } + + @top-right { + content: none; + } } ////////////////////////// @@ -72,7 +150,7 @@ h1 { font-family: var(--main-font-family); font-weight: 600; - counter-increment: chapter; + counter-reset: section; font-size: 8.2mm; padding-left: 21mm; margin-top: -1mm; @@ -84,18 +162,23 @@ h1 { left: -6mm; top: 0.25mm; content: "第" counter(chapter) "章"; + counter-increment: chapter; } } // 節(section) h2 { + break-before: verso; color: #017dc5; counter-increment: section; + counter-reset: item; font-size: 6.3mm; // letter-spacing: 1.4mm; padding-left: 24mm; margin-bottom: 1.3mm; position: relative; + string-set: section content(), seciton-number content(before); + &::before { content: "第" counter(section) "節 "; position: absolute; @@ -116,8 +199,8 @@ h2 { // 項(item) h3 { - counter-increment: subheading; - counter-reset: heading; + counter-increment: item; + counter-reset: paragraph; background-color: #e0eaf6; background: linear-gradient(to right, #fff 5%, #e0eaf6 5%); // margin: 1.3mm 0 0 0; @@ -131,7 +214,7 @@ h3 { // 数字の書かれている,青い枠 &::before { - content: counter(subheading); + content: counter(item); text-align: center; width: 10mm; position: absolute; diff --git a/css/style.css b/css/style.css index 1156876..e1e8097 100644 --- a/css/style.css +++ b/css/style.css @@ -9,6 +9,7 @@ :root { --main-font-family: "Noto Serif JP", serif; --heading-gothic-font-family: "Noto Sans JP", sans-serif; + counter-reset: chapter; } html { @@ -24,6 +25,45 @@ html { size: 148mm 210mm; /* A5サイズ */ margin: 18mm 16mm 16mm 16mm; } +@page :first { + /* 全原稿ファイルの中で1枚目のページ */ +} +@page :nth(2) { + /* 各原稿ファイルの中で2枚目のページ */ + counter-increment: chapter; +} +@page :left { + margin-right: 20mm; + @top-left-corner { + content: counter(page); + text-align: center; + font-family: "Noto Sans JP"; + font-weight: 500; + font-size: 3.4mm; + } + @top-left { + content: "第" counter(chapter) "章 │ " env(doc-title); + font-family: "Noto Serif JP"; + font-weight: 500; + font-size: 3mm; + } +} +@page :right { + margin-right: 20mm; + @top-right-corner { + content: counter(page); + text-align: center; + font-family: "Noto Sans JP"; + font-weight: 500; + font-size: 3.4mm; + } + @top-right { + content: string(seciton-number, first) "│ " string(section, first); + font-family: "Noto Serif JP"; + font-weight: 500; + font-size: 3mm; + } +} @page : nth(1) { background-image: url("../img/chapter_page_left.png"); background-size: contain; @@ -50,11 +90,32 @@ html { @top-left { content: none; } + @top-right-corner { + content: none; + } + @top-right { + content: none; + } +} +@page : first { + background-image: none; + @top-left-corner { + content: none; + } + @top-left { + content: none; + } + @top-right-corner { + content: none; + } + @top-right { + content: none; + } } h1 { font-family: var(--main-font-family); font-weight: 600; - counter-increment: chapter; + counter-reset: section; font-size: 8.2mm; padding-left: 21mm; margin-top: -1mm; @@ -66,15 +127,19 @@ h1::before { left: -6mm; top: 0.25mm; content: "第" counter(chapter) "章"; + counter-increment: chapter; } h2 { + break-before: verso; color: #017dc5; counter-increment: section; + counter-reset: item; font-size: 6.3mm; padding-left: 24mm; margin-bottom: 1.3mm; position: relative; + string-set: section content(), seciton-number content(before); } h2::before { content: "第" counter(section) "節 "; @@ -93,8 +158,8 @@ h2::after { } h3 { - counter-increment: subheading; - counter-reset: heading; + counter-increment: item; + counter-reset: paragraph; background-color: #e0eaf6; background: linear-gradient(to right, #fff 5%, #e0eaf6 5%); margin-bottom: 2mm; @@ -106,7 +171,7 @@ h3 { font-size: 4mm; } h3::before { - content: counter(subheading); + content: counter(item); text-align: center; width: 10mm; position: absolute; diff --git a/css/style.css.map b/css/style.css.map index 5991199..5537524 100644 --- a/css/style.css.map +++ b/css/style.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["scss/style.scss"],"names":[],"mappings":";AAAQ;AAER;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;AAQF;EACE;EACA;EACA;EACA;EACA;EAGA;IACE;;EAEF;IACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EAGA;IACE;;EAEF;IACE;;;AASJ;EACE;EACA;EAEA;EACA;EACA;EACA;EAEA;;AACA;EACE;EACA;EACA;EACA;EACA;;;AAKJ;EACE;EACA;EACA;EAEA;EACA;EACA;;AACA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKJ;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;;;AAcJ;EACE;EACA;EACA;EACA;EACA;EAEA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAOJ;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EAEA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;AACA;EACE;EACA;EACA;;AACA;EACE;EACA","file":"style.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["scss/style.scss"],"names":[],"mappings":";AAAQ;AAER;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;AAQF;AACE;;AAIF;AACE;EACA;;AAGF;EACE;EACA;IACE;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;;;AAKJ;EACE;EACA;IACE;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;;;AAKJ;EACE;EACA;EACA;EACA;EACA;EAGA;IACE;;EAEF;IACE;;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA;EAGA;IACE;;EAGF;IACE;;EAGF;IACE;;EAGF;IACE;;;AAKJ;EACE;EACA;IACE;;EAGF;IACE;;EAGF;IACE;;EAGF;IACE;;;AASJ;EACE;EACA;EAEA;EACA;EACA;EACA;EAEA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;;;AAKJ;EACE;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKJ;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;;;AAcJ;EACE;EACA;EACA;EACA;EACA;EAEA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAOJ;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EAEA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;AACA;EACE;EACA;EACA;;AACA;EACE;EACA","file":"style.css"} \ No newline at end of file diff --git a/manuscripts/0_cover.md b/manuscripts/0_cover.md new file mode 100644 index 0000000..20eb88e --- /dev/null +++ b/manuscripts/0_cover.md @@ -0,0 +1 @@ +# 数学1 \ No newline at end of file diff --git a/manuscripts/0_frontmatter.md b/manuscripts/0_frontmatter.md deleted file mode 100644 index ad04550..0000000 --- a/manuscripts/0_frontmatter.md +++ /dev/null @@ -1,29 +0,0 @@ -# あいうえお - ---- - -章の最初の右がわ - ---- - -## おおいうえあ - -### 項 あああああああ確率変数 - -

-あああ -

- -#### 段落 -ぽいおss - -
- -**aa** -あああ -インフォ
-aaaaa - -
- -あああ \ No newline at end of file diff --git a/manuscripts/1_first.md b/manuscripts/1_first.md new file mode 100644 index 0000000..81d4dae --- /dev/null +++ b/manuscripts/1_first.md @@ -0,0 +1,49 @@ +# あいうえお + +--- + +章の最初の右がわ + +--- + +## おおいうえあ + +### 項 あああああああ確率変数 + +

+あああ +

+ +#### 段落 + +ぽいおss + +
+ +**aa** +あああ +インフォ
+aaaaa + +
+ +あああ aaa +あああ + +ああ +ああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ + +あああああああああああああああああああああああああああああ + +ああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ + +あ +あ + +## あおあおあおaa + +### こう +asasasあああああああpppppppppっぽおお + +--- +aaaas \ No newline at end of file diff --git a/manuscripts/2_second.md b/manuscripts/2_second.md new file mode 100644 index 0000000..4ad54ef --- /dev/null +++ b/manuscripts/2_second.md @@ -0,0 +1,7 @@ +# ああ第二章 + +--- + +aoisduo + +## あいうえお \ No newline at end of file diff --git a/vivliostyle.config.js b/vivliostyle.config.js index 3afc45b..2bf0fff 100644 --- a/vivliostyle.config.js +++ b/vivliostyle.config.js @@ -6,12 +6,7 @@ module.exports = { language: "ja", author: "第75期記念祭幹部", entryContext: "./manuscripts", - entry: [ - { - path: "0_frontmatter.md", - rel: "contents", - }, - ], + entry: ["0_cover.md", "1_first.md", "2_second.md"], output: ".vivliostyle/output.pdf", workspaceDir: ".vivliostyle/", };