From 43bd140f1e5fca15201bda4d52d72fd4580be97a Mon Sep 17 00:00:00 2001 From: satooru65536 Date: Sat, 30 Nov 2024 21:24:13 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20title=20=E3=81=8C1=E6=96=87=E3=81=AE?= =?UTF-8?q?=E5=A0=B4=E5=90=88=E3=81=AE=E5=AF=BE=E5=87=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/head.typ | 36 +++++++++++++++++----------- template/template.typ | 55 ++++++++++++++++++++++++++----------------- 2 files changed, 55 insertions(+), 36 deletions(-) diff --git a/template/head.typ b/template/head.typ index 79cc15d..a3f4f16 100644 --- a/template/head.typ +++ b/template/head.typ @@ -15,24 +15,32 @@ title: (), names: (), affiliations: (), - footnotes: (:) + footnotes: (:), ) = { set align(center) mixed( fonts.sans-ja, fonts.serif-ja, - grid( - rows: title.len(), - row-gutter: 8pt, - ..title.map(title => { - text( - 16pt, - weight: 500, - [#title \ ], - ) - }), - ), + if type(title) == "array" { + grid( + rows: title.len(), + row-gutter: 8pt, + ..title.map(title => { + text( + 16pt, + weight: 500, + [#title \ ], + ) + }), + ) + } else { + text( + 16pt, + weight: 500, + [#title \ ], + ) + }, ) spacer() @@ -41,7 +49,7 @@ gutter: 1em, columns: calc.min(names.len(), 5), ..names.map(author => { - let footnote = footnotes.at(str(author.group)); + let footnote = footnotes.at(str(author.group)) [#author.ja#super(numbering("*", footnote.index))] }), @@ -50,7 +58,7 @@ gutter: 1em, columns: calc.min(affiliations.len(), 5), ..affiliations.map(author => { - let footnote = footnotes.at(str(author.group)); + let footnote = footnotes.at(str(author.group)) [#author.ja#super(numbering("*", footnote.index))] }), diff --git a/template/template.typ b/template/template.typ index 1318463..e3c225b 100644 --- a/template/template.typ +++ b/template/template.typ @@ -14,10 +14,17 @@ body, ) = { // ドキュメントの設定 - set document( - title: title.join(""), - author: names.map(a => a.ja) - ) + if type(title) == "array" { + set document( + title: title.join(""), + author: names.map(a => a.ja), + ) + } else { + set document( + title: title, + author: names.map(a => a.ja), + ) + } // ページの設定 set par( @@ -28,7 +35,7 @@ set page( columns: 2, paper: paper-size, - footer: align(center)[#context(counter(page).display("1"))] + footer: align(center)[#context (counter(page).display("1"))], ) set figure( @@ -41,9 +48,7 @@ } // 段落の設定 - set heading( - numbering: "1.1.1", - ) + set heading(numbering: "1.1.1") // 図の設定 set figure(supplement: "図") @@ -59,27 +64,33 @@ text( font: fonts.sans-ja, weight: "medium", - it + it, ) spacer() } - let footnotes = (:); + let footnotes = (:) for author in names + affiliations { - let is_exist = footnotes.keys().contains(str(author.group)); + let is_exist = footnotes.keys().contains(str(author.group)) let index = 0 if not is_exist { - footnotes.insert(str(author.group), ( - index: footnotes.len() + 1, - text: author.en, - )); + footnotes.insert( + str(author.group), + ( + index: footnotes.len() + 1, + text: author.en, + ), + ) } else { - let text = footnotes.at(str(author.group)).text; - footnotes.insert(str(author.group), ( - index: footnotes.at(str(author.group)).index, - text: text + ", " + author.en, - )); + let text = footnotes.at(str(author.group)).text + footnotes.insert( + str(author.group), + ( + index: footnotes.at(str(author.group)).index, + text: text + ", " + author.en, + ), + ) } } @@ -93,11 +104,11 @@ names: names, affiliations: affiliations, footnotes: footnotes, - ) + ), ) set footnote(numbering: "*") - show footnote: it => text(size:0pt, it) + show footnote: it => text(size: 0pt, it) for f in footnotes { footnote(str(f.at(1).text)) } From f50b9543b0ae9bbce5b8392673db6c3784bcfff0 Mon Sep 17 00:00:00 2001 From: satooru65536 Date: Sat, 30 Nov 2024 21:50:28 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20LSP=E3=81=8C=E3=82=AF=E3=83=A9?= =?UTF-8?q?=E3=83=83=E3=82=B7=E3=83=A5=E3=81=97=E3=81=AA=E3=81=84=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/head.typ | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/template/head.typ b/template/head.typ index a3f4f16..fce2aba 100644 --- a/template/head.typ +++ b/template/head.typ @@ -19,6 +19,10 @@ ) = { set align(center) + set text( + 16pt, + weight: 500, + ) mixed( fonts.sans-ja, fonts.serif-ja, @@ -26,22 +30,20 @@ grid( rows: title.len(), row-gutter: 8pt, - ..title.map(title => { - text( - 16pt, - weight: 500, - [#title \ ], - ) - }), + ..title, ) } else { - text( - 16pt, - weight: 500, - [#title \ ], + grid( + rows: 1, + row-gutter: 8pt, + title, ) }, ) + set text( + 8.8pt, + weight: 100, + ) spacer() From 24cbc8b31b149d1dca4b979cfcbb3687ce6fd339 Mon Sep 17 00:00:00 2001 From: satooru65536 Date: Sun, 1 Dec 2024 02:28:01 +0900 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E8=91=97=E8=80=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/head.typ | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/head.typ b/template/head.typ index fce2aba..90fca06 100644 --- a/template/head.typ +++ b/template/head.typ @@ -21,7 +21,7 @@ set text( 16pt, - weight: 500, + weight: 900, ) mixed( fonts.sans-ja, @@ -42,7 +42,7 @@ ) set text( 8.8pt, - weight: 100, + weight: 400, ) spacer()