Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
huideyeren committed May 14, 2024
1 parent a6fe6e8 commit 3dc7f22
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions sass/common/_contents.scss
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ pre {

ul, ol {
padding-inline-start: 1.5em;
margin-top: 1rem;
margin-bottom: 1rem;
}

/* 表組み */
Expand Down Expand Up @@ -163,6 +165,8 @@ table tr:last-child {

blockquote {
padding-inline-start: 1.5em;
margin-top: 1rem;
margin-bottom: 1rem;
}

.draft-author {
Expand Down
2 changes: 1 addition & 1 deletion sass/common/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
33 changes: 30 additions & 3 deletions sass/common/_format.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
}
}

/* 表紙ページ */
Expand Down Expand Up @@ -83,4 +110,4 @@ html {
.cover {
content: none;
}
}
}
52 changes: 52 additions & 0 deletions sass/vivliostyle-a4.scss
Original file line number Diff line number Diff line change
@@ -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';
18 changes: 15 additions & 3 deletions sass/vivliostyle-a5.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
42 changes: 42 additions & 0 deletions sass/vivliostyle-a6.scss
Original file line number Diff line number Diff line change
@@ -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';

0 comments on commit 3dc7f22

Please sign in to comment.