Skip to content

Commit

Permalink
update: 章の番号が使えるようになった
Browse files Browse the repository at this point in the history
  • Loading branch information
yas-ako committed Jan 15, 2024
1 parent 0653ee9 commit 04ffa62
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
12 changes: 7 additions & 5 deletions css/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
:root {
--main-font-family: "Noto Serif JP", serif;
--heading-gothic-font-family: "Noto Sans JP", sans-serif;
counter-reset: chapter;
// counter-reset: chapter;
}

html {
Expand All @@ -33,10 +33,10 @@ html {
// 章番号セット
@page :first {
/* 全原稿ファイルの中で1枚目のページ */
// counter-reset: chapter;
counter-reset: chapter -1;
}

@page :nth(2) {
@page :nth(1) {
/* 各原稿ファイルの中で2枚目のページ */
counter-increment: chapter;
}
Expand Down Expand Up @@ -147,6 +147,7 @@ html {

// 章(chapter)
h1 {
break-before: verso;
font-family: var(--main-font-family);
font-weight: 600;

Expand All @@ -155,10 +156,11 @@ h1 {
padding-left: 21mm;
margin-top: -1mm;

counter-increment: chapter;
string-set: chapter content(), chapter-number countent(before);
// string-set: chapter-text content(), chapter-number countent(before);
color: white;

&::before {
// counter-increment: chapter;
font-size: 7.3mm;
position: absolute;
left: -6mm;
Expand Down
7 changes: 3 additions & 4 deletions css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/style.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion manuscripts/2_second.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

aoisduo

## あいうえお
## あいうえお
7 changes: 7 additions & 0 deletions manuscripts/3_third.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# おお三章


---
## あいうえお

ああああ
2 changes: 1 addition & 1 deletion vivliostyle.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
language: "ja",
author: "第75期記念祭幹部",
entryContext: "./manuscripts",
entry: ["0_cover.md", "1_first.md", "2_second.md"],
entry: ["0_cover.md", "1_first.md", "2_second.md", "3_third.md"],
output: ".vivliostyle/output.pdf",
workspaceDir: ".vivliostyle/",
};

0 comments on commit 04ffa62

Please # to comment.