forked from nju-lug/modern-nju-thesis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove anti-matter dependency, fix cjk line breaks
Signed-off-by: Juntong Chen <[email protected]>
- Loading branch information
Showing
18 changed files
with
159 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
#import "@preview/anti-matter:0.1.1": anti-matter, core | ||
#import "../utils/style.typ": 字号 | ||
|
||
// 前言,重置页面计数器 | ||
#let preface( | ||
doctype: "master", | ||
// documentclass 传入的参数 | ||
twoside: false, | ||
// 其他参数 | ||
numbering: ("I", "1", "I"), | ||
..args, | ||
it, | ||
) = { | ||
counter(page).update(0) | ||
set page(footer: context { | ||
set text(size: 字号.五号) | ||
let p = core.outer-counter().get().at(0) | ||
let p = counter(page).get().at(0) | ||
let pagealign = center | ||
if doctype == "bachelor" { | ||
align(center)[ | ||
#core.outer-counter().display("I") | ||
] | ||
pagealign = center | ||
} else if twoside == true { | ||
align(right)[ | ||
#core.outer-counter().display("I") | ||
] | ||
let preal = here().position().page | ||
if calc.rem(preal, 2) == 1 { | ||
pagealign = right | ||
} else { | ||
pagealign = left | ||
} | ||
} else { | ||
if calc.rem(p, 2) == 1 { | ||
h(1fr) | ||
core.outer-counter().display("I") | ||
pagealign = right | ||
} else { | ||
core.outer-counter().display("I") | ||
h(1fr) | ||
pagealign = left | ||
} | ||
} | ||
align(pagealign, counter(page).display("I")) | ||
}) | ||
anti-matter(numbering: numbering, ..args, it) | ||
set par(linebreaks: "optimized") | ||
it | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* @project: modern-ecnu-thesis | ||
* @author: OrangeX4, Juntong Chen ([email protected]) | ||
* @created: 2025-01-06 22:37:34 | ||
* @modified: 2025-01-11 16:46:35 | ||
* @modified: 2025-01-12 14:38:55 | ||
* | ||
* 华东师范大学学位论文模板 | ||
* Repo: https://github.com/jtchen2k/modern-ecnu-thesis | ||
|
@@ -13,7 +13,6 @@ | |
* Copyright (c) 2025 Juntong Chen. All rights reserved. | ||
*/ | ||
|
||
#import "@preview/anti-matter:0.1.1": fence as mainmatter-end | ||
#import "layouts/doc.typ": doc | ||
#import "layouts/preface.typ": preface | ||
#import "layouts/mainmatter.typ": mainmatter | ||
|
@@ -123,7 +122,7 @@ | |
heading-below: (1.8em, 1.5em), | ||
..args, fonts: fonts + args.named().at("fonts", default: (:))) | ||
} else { | ||
mainmatter(doctype: doctype, twoside: twoside, display-header: true, ..args, fonts: fonts + args.named().at("fonts", default: (:))) | ||
mainmatter(doctype: doctype, twoside: twoside, display-header: true, ..args, fonts: fonts + args.named().at("fonts", default: (:))) | ||
} | ||
}, | ||
mainmatter-end: (..args) => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.