repo
stringlengths 26
115
| file
stringlengths 54
212
| language
stringclasses 2
values | license
stringclasses 16
values | content
stringlengths 19
1.07M
|
---|---|---|---|---|
https://github.com/Toniolo-Marco/git-for-dummies | https://raw.githubusercontent.com/Toniolo-Marco/git-for-dummies/main/slides/theory/fork.typ | typst | #import "@preview/touying:0.5.2": *
#import themes.university: *
#import "@preview/numbly:0.1.0": numbly
#import "@preview/fletcher:0.5.1" as fletcher: node, edge
#let fletcher-diagram = touying-reducer.with(reduce: fletcher.diagram, cover: fletcher.hide)
#import "../components/gh-button.typ": gh_button
#import "../components/git-graph.typ": branch_indicator, commit_node, connect_nodes, branch
#let stroke_color = "#9198A1"
#let fill_color = "#262C36"
#let text_color = "#B0B7BE"
#let fork_svg = read("../img/fork.svg")
#let white_fork = fork_svg.replace("#323232", stroke_color)
#let pr_svg = read("../img/pr.svg")
#let white_pr = pr_svg.replace("#000000", stroke_color)
As some of you may have noticed in the *example image* of the _pull request_, *the repository of the pull request differs from the one in which we want to merge*. This is because the repository from which the pr comes is a _fork_ of the original repository.
A fork is a copy of a remote repository, usually on GitHub, that can be modified independently of the original repository. Forks are used to contribute to open source projects or to work on a copy of a project without affecting the original repository.
#footnote([
On GitHub, repositories inherit the visibility of the original repository, but not the issues, pull requests. Also, if the original repository is deleted, the fork remains, with no link to the original repo.
])
---
Forking a repo is easy! In the #link("https://github.com/trending")[trending] section of GitHub, we can see the most popular projects of the moment.
Take for example the project #link("https://github.com/rustdesk/rustdesk")[RustDesk]: _“An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer”_. To fork the project, just press the _Fork_ button in the upper right corner.
#gh_button(white_fork, "Fork", fill_color, text_color, stroke_color, true)
The repository will be copied to your GitHub account. Similarly, you can propose changes made on one of your branches by clicking on the _Contribute_ button and then _Open pull request_ (find both on the main page of your fork).
#gh_button(white_pr, "Contribute", fill_color, text_color, stroke_color, false)
|
|
https://github.com/kdog3682/2024-typst | https://raw.githubusercontent.com/kdog3682/2024-typst/main/src/style-attrs.typ | typst | let table-attrs = (
align: auto,
column-gutter: auto,
row-gutter: auto,
columns: 2,
fill: auto,
stroke: (
top: none,
left: none,
right: none,
bottom: none,
),
rows: auto,
)
let box-attrs = (
inset: 3pt,
outset: 0pt,
fill: none,
radius: 0pt,
stroke: black,
)
|
|
https://github.com/Daillusorisch/HYSeminarAssignment | https://raw.githubusercontent.com/Daillusorisch/HYSeminarAssignment/main/template/components/declaration.typ | typst | #import "../utils/style.typ": *
#let declaration(
author_signature_path: "",
mentor_signature_path: ""
) = {
let signature_block() = {
let text_block(margin_top, content) = {
text(
font: 字体.宋体,
size: 字号.小四,
)[
#v(margin_top)
#content
]
}
align(right)[
#grid(
columns: (60pt, 72pt, 84pt, 72pt),
rows: (20pt),
text_block(8pt, "作者签名:"),
image(author_signature_path, fit: "contain"),
text_block(8pt, "指导老师签名:"),
image(mentor_signature_path, fit: "contain"),
)
#grid(
columns: (60pt, 228pt),
text_block(0pt, "日 期:"),
grid.cell(
text_block(0pt, " 年 月 日"),
align: left
)
)
]
}
align(center)[
#text(
font: 字体.黑体,
size: 字号.小二
)[原创性声明]
]
v(30pt)
text(
font: 字体.宋体,
size: 字号.小四
)[
#set par(leading: 1.25em, first-line-indent: 2em)
本人郑重声明:所呈交的论文(设计),是本人在指导教师的指导下,严格按照学校和学院有关规定完成的。除文中已经标明引用的内容外,本论文(设计)不包含任何其他个人或集体已发表及撰写的研究成果。对本论文(设计)做出贡献的个人和集体,均已在文中以明确方式标明。本人承诺在论文(设计)工作过程中没有伪造数据等行为。若在本论文(设计)中有侵犯任何方面知识产权的行为,由本人承担相应的法律责任。
]
v(38pt)
signature_block()
v(66pt)
align(center)[
#text(
font: 字体.黑体,
size: 字号.小二
)[版权使用授权书]
]
v(35pt)
text(
font: 字体.宋体,
size: 字号.小四
)[
#set par(leading: 1.25em, first-line-indent: 2em)
本人完全了解武汉大学有权保留并向有关部门或机构送交本论文(设计)的复印件和电子版,允许本论文(设计)被查阅和借阅。本人授权武汉大学将本论文的全部或部分内容编入有关数据进行检索和传播,可以采用影印、缩印或扫描等复制手段保存和汇编本论文(设计)。
]
v(38pt)
signature_block()
}
|
|
https://github.com/sicheng1806/typst-book-for-sicheng | https://raw.githubusercontent.com/sicheng1806/typst-book-for-sicheng/main/scr/basic_pkg/note_CN.typ | typst | /*
1. 笔记标题 : 居中 + 黑体 + 18pt
2. 目录 :
3. 章节编号 :
4. 正文:
5. 提供点击标题回到目录的功能
6. 提供添加术语表的函数 term-list
*/
#import "numbering.typ": notenumbering
#let weboutline() = {
show outline : set par(leading: 1em)
show outline : set text(blue)
[#outline(title: text(black,strong[目录]),indent: 1em)]
}
#let conf(
title:[标题],
author: [],
_numbering:false,
doc
) = {
//设置页面为a4,页眉为标题,编号数字编号
set page(
paper: "a4",
header: align(right)[#text(8pt)[#title]#line(length: 100%)],
)
//设置字体为英文自由字体,中文宋体。字号14pt
set text(
font: ("Linux Libertine","SimSun"),
size: 14pt,
)
// 设置1级标题为中文大写数字,其余为编号
set heading(numbering: notenumbering) if _numbering
// 书写标题,作者
{
set align(center)
par(strong(text(18pt,title)))
text(10pt,author)
}
// 设置段落标题字号为蓝色,为每个段落标题添加到目录的链接
show heading : set text(blue)
show heading : it => link(<content>,it)
// 给术语的每个项目添加标签用于查询
show terms.item : it => {
[#it <term_item>]
}
// 设置目录的样式,添加目录
[#weboutline()<content>]
// 正文
set align(left)
set par(first-line-indent: 2em)
doc
}
#let show-settings = (
"笔记标题" : [居中+黑体+18pt],
"作者" : [10pt+居中],
"页眉" : [8pt+right+展示title],
"正文" : [14pt+Simsun+Linux Libertine],
"段落标号" : [1级标题为中文大写数字,其余为编号],
)
#let term-list() = {
//设置术语表样式
set par(first-line-indent: 0em)
show terms.item : it => [#grid(columns: (1fr,1fr),it.term,it.description)]
//呈现术语表
block(fill:luma(80%),inset:2pt,block(fill:white,inset:2em,locate(loc => {
for q in query(<term_item>,loc) {
link(q.location())[#q]
}
})))
}
|
|
https://github.com/0x6e66/hbrs-typst | https://raw.githubusercontent.com/0x6e66/hbrs-typst/main/template/template.typ | typst | #import "@preview/fontawesome:0.1.0": *
#import "../ads/meta.typ": *
#import "utils.typ": *
#import "titlepage.typ": titlepage
#import "declaration.typ": declaration
#import "../ads/acronyms.typ": acronyms
#import "../ads/abstract.typ": abstract
#let thesis(doc) = {
set text(
font: "New Computer Modern",
weight: "regular",
size: 11pt,
lang: language
)
set align(left)
let ht-first = state("page-first-section", [])
let ht-last = state("page-last-section", [])
set page(
paper: "a4",
margin: (
left: 4cm,
right: 2cm,
top: 2.5cm,
bottom: 1.5cm,
),
background: none,
// https://stackoverflow.com/questions/76363935/typst-header-that-changes-from-page-to-page-based-on-state
header: locate(
loc => [
#let first-heading = query(
heading.where(level: 1).or(heading.where(level: 2)).or(heading.where(level: 3)), loc
).find(
h => h.location().page() == loc.page()
)
#let last-heading = query(
heading.where(level: 1).or(heading.where(level: 2)).or(heading.where(level: 3)), loc
).rev().find(h => h.location().page() == loc.page())
#{
if not first-heading == none {
ht-first.update([ #first-heading.body ])
ht-last.update([ #last-heading.body ])
align(right, text(style: "italic")[ #ht-first.display() ])
} else {
align(right, text(style: "italic")[ #ht-last.display() ])
}
}
]
)
)
set heading(numbering: "1.1")
show heading.where(
level:1,
): it => [
#set align(left)
#set text(20pt, weight: "bold")
#block(it)
]
show heading.where(
level:2,
): it => [
#set align(left)
#set text(17pt, weight: "regular")
#block(it)
]
show heading.where(
level:3,
): it => [
#set align(left)
#set text(14pt, weight: "regular")
#block(it)
]
show heading.where(
level:4,
): it => [
#set align(left)
#set text(11pt, weight: "regular")
#block(it)
]
set par(justify: true)
titlepage
declaration
abstract
table_of_contents
// Start page numbering when actual content starts
set page(footer: [
#set align(center)
#counter(page).display(
"-- 1 --",
)
])
counter(page).update(1)
doc
table_of_figures
table_of_tables
table_of_listings
table_of_acronyms
bib
}
|
|
https://github.com/elinscott/psi-slides-template | https://raw.githubusercontent.com/elinscott/psi-slides-template/main/README.md | markdown | # Typst template for PSI slides
Created by <NAME> based on the [university theme](https://touying-typ.github.io/touying/docs/themes/university)
For use by PSI researchers only
For an example see [slides.pdf](./slides.pdf)
## Installing fonts
To install the Arial font in Ubuntu, run
```
sudo apt install ttf-mscorefonts-installer
sudo fc-cache -vr
```
## To do
- [ ] remove duplication of the headers and footers code
- [ ] replace `png`s with `svg`s once `typst` handles `svg`s more robustly
|
|
https://github.com/TypstApp-team/typst | https://raw.githubusercontent.com/TypstApp-team/typst/master/tests/typ/layout/page-style.typ | typst | Apache License 2.0 | // Test setting page styles.
---
// Empty with styles
// Should result in one conifer-colored A11 page.
#set page("a11", flipped: true, fill: conifer)
---
// Empty with styles and then pagebreak
// Should result in two forest-colored pages.
#set page(fill: forest)
#pagebreak()
---
// Empty with multiple page styles.
// Should result in a small white page.
#set page("a4")
#set page("a5")
#set page(width: 1cm, height: 1cm)
---
// Empty with multiple page styles.
// Should result in one eastern-colored A11 page.
#set page("a4")
#set page("a5")
#set page("a11", flipped: true, fill: eastern)
#set text(font: "Roboto", white)
#smallcaps[Typst]
|
https://github.com/maxgraw/bachelor | https://raw.githubusercontent.com/maxgraw/bachelor/main/apps/document/src/4-concept/shop-interface.typ | typst | Im @architecture-chapter der Anwendung wurde bereits das Import/Export-Modul beschrieben. Im folgenden Kapitel wird eine Schnittstelle konzipiert, welche die Verbindung zu einem Shop-System ermöglicht. Hierfür wurde im Rahmen der Bachelorarbeit von <NAME> mit dem Titel "Entwicklung eines Onlineshops mit AR-Integration für den Möbelvertrieb eines Inklusionsbetriebs auf Basis von Open-Source-Technologien" die Anwendung mit dem entwickelten Online-Shop dieser Arbeit verbunden.
Das Shopsystem, das in der Arbeit von <NAME> entwickelt wurde, verwendet WordPress in Kombination mit dem Shop-System WooCommerce als Plugin. Das Shopsystem bietet verschiedene Stack Cube Modelle im Sortiment, welche grundsätzlich in einem standardmäßigen Shop Interface bestellt werden können @woocommerce-shop. Das System soll nun um die Möglichkeit erweitert werden, dass Möbel über die Anwendung dieser Arbeit bestellt werden können.
Es bieten sich verschiedene Möglichkeiten an, die Schnittstelle zwischen Shop-System und der AR-Anwendung umzusetzen. Wie in @architecture-chapter erläutert soll die Anwendung verschiedene Möglichkeiten des Datenexportes unterstützen. Im Rahmen der Interaktion mit dem Shop-System von <NAME> wird die Schnittstelle als internes Event implementiert. Um eine größtmögliche Abkapselung zwischen den Arbeiten zu gewährleisten, ist die Implementierung als internes Event sinnvoll. Dies ermöglicht eine unabhängige Entwicklung beider Systeme. |
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/embiggen/0.0.1/src/lib.typ | typst | Apache License 2.0 | // This is an implementation of some basic LaTeX primitives as Typst functions
// See https://github.com/typst/typst/issues/4048 for this package's motivation
// Functional exponential growth and decay scale factor calculation
#let _embiggen_size_mult = 125%
#let _embiggen_inv_size_mult = 80%
#let _embiggen_comp_size(n, mult) = {
if n == 1 {
mult
} else {
mult * _embiggen_comp_size(n - 1, mult)
}
}
#let _embiggen_enlarge(n) = _embiggen_comp_size(n, _embiggen_size_mult)
#let _embiggen_shrink(n) = _embiggen_comp_size(n, _embiggen_inv_size_mult)
// Your standard LaTeX modifiers, but they act on the output of #lr(...)
#let big(it) = {
math.lr(it, size: _embiggen_enlarge(1))
}
#let Big(it) = {
math.lr(it, size: _embiggen_enlarge(2))
}
#let bigg(it) = {
math.lr(it, size: _embiggen_enlarge(3))
}
#let Bigg(it) = {
math.lr(it, size: _embiggen_enlarge(4))
}
// Like big, Big, etc. but smaller
#let small(it) = {
math.lr(it, size: _embiggen_shrink(1))
}
#let Small(it) = {
math.lr(it, size: _embiggen_shrink(2))
}
#let smalll(it) = {
math.lr(it, size: _embiggen_shrink(3))
}
#let Smalll(it) = {
math.lr(it, size: _embiggen_shrink(4))
}
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/unichar/0.1.0/ucd/block-0000.typ | typst | Apache License 2.0 | #let data = (
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("<control>", "Cc", 0),
("SPACE", "Zs", 0),
("EXCLAMATION MARK", "Po", 0),
("QUOTATION MARK", "Po", 0),
("NUMBER SIGN", "Po", 0),
("DOLLAR SIGN", "Sc", 0),
("PERCENT SIGN", "Po", 0),
("AMPERSAND", "Po", 0),
("APOSTROPHE", "Po", 0),
("LEFT PARENTHESIS", "Ps", 0),
("RIGHT PARENTHESIS", "Pe", 0),
("ASTERISK", "Po", 0),
("PLUS SIGN", "Sm", 0),
("COMMA", "Po", 0),
("HYPHEN-MINUS", "Pd", 0),
("FULL STOP", "Po", 0),
("SOLIDUS", "Po", 0),
("DIGIT ZERO", "Nd", 0),
("DIGIT ONE", "Nd", 0),
("DIGIT TWO", "Nd", 0),
("DIGIT THREE", "Nd", 0),
("DIGIT FOUR", "Nd", 0),
("DIGIT FIVE", "Nd", 0),
("DIGIT SIX", "Nd", 0),
("DIGIT SEVEN", "Nd", 0),
("DIGIT EIGHT", "Nd", 0),
("DIGIT NINE", "Nd", 0),
("COLON", "Po", 0),
("SEMICOLON", "Po", 0),
("LESS-THAN SIGN", "Sm", 0),
("EQUALS SIGN", "Sm", 0),
("GREATER-THAN SIGN", "Sm", 0),
("QUESTION MARK", "Po", 0),
("COMMERCIAL AT", "Po", 0),
("LATIN CAPITAL LETTER A", "Lu", 0),
("LATIN CAPITAL LETTER B", "Lu", 0),
("LATIN CAPITAL LETTER C", "Lu", 0),
("LATIN CAPITAL LETTER D", "Lu", 0),
("LATIN CAPITAL LETTER E", "Lu", 0),
("LATIN CAPITAL LETTER F", "Lu", 0),
("LATIN CAPITAL LETTER G", "Lu", 0),
("LATIN CAPITAL LETTER H", "Lu", 0),
("LATIN CAPITAL LETTER I", "Lu", 0),
("LATIN CAPITAL LETTER J", "Lu", 0),
("LATIN CAPITAL LETTER K", "Lu", 0),
("LATIN CAPITAL LETTER L", "Lu", 0),
("LATIN CAPITAL LETTER M", "Lu", 0),
("LATIN CAPITAL LETTER N", "Lu", 0),
("LATIN CAPITAL LETTER O", "Lu", 0),
("LATIN CAPITAL LETTER P", "Lu", 0),
("LATIN CAPITAL LETTER Q", "Lu", 0),
("LATIN CAPITAL LETTER R", "Lu", 0),
("LATIN CAPITAL LETTER S", "Lu", 0),
("LATIN CAPITAL LETTER T", "Lu", 0),
("LATIN CAPITAL LETTER U", "Lu", 0),
("LATIN CAPITAL LETTER V", "Lu", 0),
("LATIN CAPITAL LETTER W", "Lu", 0),
("LATIN CAPITAL LETTER X", "Lu", 0),
("LATIN CAPITAL LETTER Y", "Lu", 0),
("LATIN CAPITAL LETTER Z", "Lu", 0),
("LEFT SQUARE BRACKET", "Ps", 0),
("REVERSE SOLIDUS", "Po", 0),
("RIGHT SQUARE BRACKET", "Pe", 0),
("CIRCUMFLEX ACCENT", "Sk", 0),
("LOW LINE", "Pc", 0),
("GRAVE ACCENT", "Sk", 0),
("LATIN SMALL LETTER A", "Ll", 0),
("LATIN SMALL LETTER B", "Ll", 0),
("LATIN SMALL LETTER C", "Ll", 0),
("LATIN SMALL LETTER D", "Ll", 0),
("LATIN SMALL LETTER E", "Ll", 0),
("LATIN SMALL LETTER F", "Ll", 0),
("LATIN SMALL LETTER G", "Ll", 0),
("LATIN SMALL LETTER H", "Ll", 0),
("LATIN SMALL LETTER I", "Ll", 0),
("LATIN SMALL LETTER J", "Ll", 0),
("LATIN SMALL LETTER K", "Ll", 0),
("LATIN SMALL LETTER L", "Ll", 0),
("LATIN SMALL LETTER M", "Ll", 0),
("LATIN SMALL LETTER N", "Ll", 0),
("LATIN SMALL LETTER O", "Ll", 0),
("LATIN SMALL LETTER P", "Ll", 0),
("LATIN SMALL LETTER Q", "Ll", 0),
("LATIN SMALL LETTER R", "Ll", 0),
("LATIN SMALL LETTER S", "Ll", 0),
("LATIN SMALL LETTER T", "Ll", 0),
("LATIN SMALL LETTER U", "Ll", 0),
("LATIN SMALL LETTER V", "Ll", 0),
("LATIN SMALL LETTER W", "Ll", 0),
("LATIN SMALL LETTER X", "Ll", 0),
("LATIN SMALL LETTER Y", "Ll", 0),
("LATIN SMALL LETTER Z", "Ll", 0),
("LEFT CURLY BRACKET", "Ps", 0),
("VERTICAL LINE", "Sm", 0),
("RIGHT CURLY BRACKET", "Pe", 0),
("TILDE", "Sm", 0),
("<control>", "Cc", 0),
)
|
https://github.com/HULKs/rust-introduction | https://raw.githubusercontent.com/HULKs/rust-introduction/main/slides/theme.typ | typst | #import "@preview/polylux:0.3.1": *
#let slide-footer = state("slide-footer", [])
#let slide-cell = block.with(
width: 100%,
height: 100%,
above: 0pt,
below: 0pt,
breakable: false,
)
#let slide-progress-bar = utils.polylux-progress( ratio => {
grid(
columns: (ratio * 100%, 1fr),
slide-cell(fill: black.lighten(20%)),
slide-cell(fill: white.darken(20%)),
)
})
#let workshop-theme(aspect-ratio: "16-9", footer: [], body) = {
set page(
paper: "presentation-" + aspect-ratio,
margin: 0em,
header: none,
footer: none,
header-ascent: 0em,
footer-descent: 0em,
)
set text(
fill: black,
size: 23pt,
font: "Hanken Grotesk",
)
show raw: set text(
font: "JetBrains Mono",
)
show link: underline
slide-footer.update(footer)
body
}
#let title-slide(
title: [],
subtitle: none,
author: none,
date: none,
extra: none,
) = {
let content = {
set align(horizon)
block(width: 100%, inset: 2em, {
text(size: 1.3em, strong(title))
if subtitle != none {
linebreak()
text(size: 0.9em, subtitle)
}
line(length: 100%, stroke: .05em + rgb("#eb811b"))
set text(size: .8em)
if author != none {
block(spacing: 1em, author)
}
if date != none {
block(spacing: 1em, date)
}
set text(size: .8em)
if extra != none {
block(spacing: 1em, extra)
}
})
}
polylux-slide(content)
}
#let slide(
title: none,
body
) = {
let header = {
if title != none {
set align(horizon)
set text(size: 1.2em)
slide-cell(inset: 1em, strong(title))
} else {
[]
}
}
let footer = {
set text(size: 0.8em, fill: gray)
set align(bottom)
slide-cell(
inset: (left: 1em, right: 1em),
{
slide-footer.display()
h(1fr)
logic.logical-slide.display()
}
)
v(0.5em)
slide-cell(height: 2pt, slide-progress-bar)
}
set page(
header: header,
footer: footer,
margin: (top: 3em, bottom: 2em),
)
let content = {
set align(horizon)
show: pad.with(left: 2em, right: 2em)
body
}
logic.polylux-slide(content)
}
#let new-section-slide(name) = {
let content = {
utils.register-section(name)
set align(horizon)
show: pad.with(20%)
set text(size: 1.5em)
name
block(height: 2pt, width: 100%, spacing: 0pt, slide-progress-bar)
}
logic.polylux-slide(content)
}
|
|
https://github.com/zenor0/FZU-report-typst-template | https://raw.githubusercontent.com/zenor0/FZU-report-typst-template/main/fzu-report/utils/figure-and-ref.typ | typst | MIT License | // 原本想改用 i-figure ,但是我发现各种要求挺烦的,最后还是用自己造的轮子了
#import "states.typ": part-state
#import "fonts.typ": 字体, 字号
// 用法:
// #show figure: show-figure
// #show ref: show-ref
// #show
#let tb-numbering(
it,
loc: none,
baseloc: none,
main-body-table-numbering: "1.1",
main-body-image-numbering: "1-1", // 其他也会视为 image
appendix-table-numbering: "A.1",
appendix-image-numbering: "A-1", // 其他也会视为 image
) = {
if part-state.at(loc) != "附录" {
numbering(
if it.kind == table {main-body-table-numbering} else {main-body-image-numbering},
counter(heading.where(level: 1)).at(loc).first(), // 章节号
(
counter(figure.where(kind: it.kind))
.at(loc)
.first() -
counter(figure.where(kind: it.kind))
.at(baseloc)
.first()
) // 图序号,使用总序号减章节开始时序号实现
)
} else if part-state.at(loc) == "附录" {
numbering(
if it.kind == table {appendix-table-numbering} else {appendix-image-numbering},
counter(heading.where(level: 1)).at(loc).first(), // 章节号
(
counter(figure.where(kind: it.kind))
.at(loc)
.first() -
counter(figure.where(kind: it.kind))
.at(baseloc)
.first()
) // 图序号,使用总序号减章节开始时序号实现
)
}
}
#let show-figure(
it,
main-body-table-numbering: "1.1",
main-body-image-numbering: "1-1", // 其他也会视为 image
appendix-table-numbering: "A.1",
appendix-image-numbering: "A-1", // 其他也会视为 image
) = {
show figure.where(
kind: table
): set figure.caption(position: top)
show figure.caption: it => {
if it.kind != table {
v(0.5em)
} // 图和图序号行间隔 0.5em
set text(font: 字体.宋体, size: 字号.五号, weight: "regular")
locate(loc => {
let baseloc = query(
selector(
heading.where(level: 1)
).before(loc),
loc
).last().location()
// 使用此一级章节的开始处作为基准点
it.supplement // "图 1-1" "表 1-2" 里的 "图" "表" 字符
tb-numbering(
it,
loc: loc,
baseloc: baseloc,
main-body-table-numbering: main-body-table-numbering,
main-body-image-numbering: main-body-image-numbering,
appendix-table-numbering: appendix-table-numbering,
appendix-image-numbering: appendix-image-numbering,
)
})
h(0.5em) // numbering 和 body 之间隔1个空格
it.body
// if it.kind == table {
// v(0.5em)
// } // 表格序号行和表格间隔 0.5em
}
show figure: it => {
if it.kind == table {
align(center, block(it.caption))
align(center, block(it.body))
v(0.5em)
} else if it.kind == image {
v(0.5em)
it
}
}
it
}
#let show-ref(
it,
main-body-table-numbering: "1.1",
main-body-image-numbering: "1-1", // 其他也会视为 image
appendix-table-numbering: "A.1",
appendix-image-numbering: "A-1", // 其他也会视为 image
) = {
let el = it.element
if el != none and el.func() == figure {
let loc = el.location()
let baseloc = query(
selector(
heading.where(level: 1)
).before(loc),
loc
).last().location()
el.supplement
tb-numbering(
el,
loc: loc,
baseloc: baseloc,
main-body-table-numbering: main-body-table-numbering,
main-body-image-numbering: main-body-image-numbering,
appendix-table-numbering: appendix-table-numbering,
appendix-image-numbering: appendix-image-numbering,
)
} else if el != none and el.func() == math.equation {
let loc = el.location()
el.supplement
" "
if part-state.at(loc) == "附录" {
numbering("(A.1)", counter(heading.where(level:1)).at(loc).first(), counter(math.equation).at(loc).first())
} else {
numbering("(1.1)", counter(heading.where(level:1)).at(loc).first(), counter(math.equation).at(loc).first())
}
} else {
it
}
}
#let set-math-numbering(
it,
main-body-numbering: "(1.1)",
appendix-numbering: "(A.1)",
) = {
locate(loc => {
if part-state.at(loc) == "附录" {
numbering(appendix-numbering, counter(heading.where(level: 1)).at(loc).first(), counter(math.equation).at(loc).first())
} else {
numbering(main-body-numbering, counter(heading.where(level: 1)).at(loc).first(), counter(math.equation).at(loc).first())
}
})
}
// 公式序号显示:右侧最下一行
// 参考 https://github.com/typst/typst/discussions/3106
// #show math.equation: show-math-equation-degree
#let show-math-equation-degree(eq) = {
// apply custom style only to block equations with numbering enabled
if eq.block and eq.numbering != none {
// default numbering of the equation
let eqCounter = counter(math.equation).at(eq.location())
let eqNumbering = numbering(eq.numbering, ..eqCounter)
set align(left)
grid(
// change "0pt" to "auto" to give the numbering its own space on the line
columns: (4em, 100% - 4em, 0pt),
// note that "numbering: none" avoids infinite recursion
h(4em),
block(math.equation(eq.body, block: true, numbering: none)),
align(right + bottom)[#eqNumbering],
)
} else {
eq
}
}
|
https://github.com/Shuenhoy/modern-zju-thesis | https://raw.githubusercontent.com/Shuenhoy/modern-zju-thesis/master/utils/near-chapter.typ | typst | MIT License | #let near-chapter = context {
let headings_after = query(selector(heading.where(level: 1)).after(here()))
let headings_before = query(selector(heading.where(level: 1)).before(here()))
if headings_after.len() == 0 {
return
}
let heading = headings_after.first()
if heading.location().page() > here().page() {
if headings_before.len() == 0 {
return
}
headings_before.last().body
} else {
heading.body
}
} |
https://github.com/swaits/typst-collection | https://raw.githubusercontent.com/swaits/typst-collection/main/pro-letter/0.1.0/template/main.typ | typst | MIT License | #import "@preview/pro-letter:0.1.0": pro-letter
#show: pro-letter.with(
sender: (
name: "<NAME>",
street: "123 Blueberry Lane",
city: "Wonderland",
state: "NA",
zip: "56789",
phone: "+1-555-987-6543",
email: "<EMAIL>",
),
recipient: (
company: "Fantasy Finance Faucets",
attention: "Treasury Team",
street: "456 Dreamscape Ave",
city: "Fabletown",
state: "IM",
zip: "12345",
),
date: "January 15, 2025",
subject: "Account Closure Request",
signer: "<NAME>",
attachments: "Fae Council Closure Order.",
notary-page: true,
)
I am writing to formally request the closure of the enchanted vault at Fantasy
Finance Faucets held in my name, <NAME>.
Attached is the official Fae Council Closure Order for your verification and
records.
The account is identified by the vault number: *12345FAE*.
As the rightful owner, I _authorize the closure of the aforementioned vault_ and
_request that all enchanted funds be redirected to the Fae Council Reserve_.
Please find the necessary details for the transfer enclosed.
Thank you for your prompt attention to this magical matter.
|
https://github.com/donghoony/KUPC-2023 | https://raw.githubusercontent.com/donghoony/KUPC-2023/master/colors.typ | typst | #let AC_BRONZE = rgb("9d4900")
#let AC_SILVER = rgb("38546e")
#let AC_GOLD = rgb("d28500")
#let AC_PLATINUM = rgb("00c78b")
#let AC_DIAMOND = rgb("009ee5")
#let AC_RUBY = rgb("e0004c")
#let KUPC_GREEN = rgb("036b3f")
#let PALE_RED = rgb("e74c3c") |
|
https://github.com/duskmoon314/THU_AMA | https://raw.githubusercontent.com/duskmoon314/THU_AMA/main/docs/ch3/2-环的内部结构.typ | typst | Creative Commons Attribution 4.0 International | #import "/book.typ": *
#show: thmrules
#show: book-page.with(title: "环的内部结构")
= 环的内部结构
== 子环、理想与商环
#definition()[
设$lr((R , + , dot.op))$为环,$nothing eq.not S subset.eq R$,若$S$对于$+$和$dot.op$也构成一个环,则称$S$为$R$的#strong[子环\(subring)]。反之,称$R$为$S$的#strong[扩环]。
]
#property()[
+ 平凡子环:${ 0 } , R$
+ 子环判则:$nothing eq.not S subset.eq R , S$为$R$的子环$arrow.l.r.double a - b in S , a b in S , lr((forall a , b i n S))$
+ 子环运算律:设$S_1 , S_2$为$R$的子环,则$S_1 sect S_2$为子环, $S_1 union S_2 , S_1 + S_2 , S_1 S_2$不一定为子环
其中,$S_1 + S_2 = { a + b | a in S_1 , b in S_2 },
med S_1 S_2 = { sum_(i = 1)^n a_i b_i| a_i in S_1,
b_i in S_2,
n in bb(Z)^(+) }$
#example()[
设$R = bb(Z) , S_1 = { 4 k \| k in bb(Z) } = 4 bb(Z) , S_2 = 6 bb(Z)$
$S_1 sect S_2 = 12 bb(Z)$,
$S_1 union S_2 = {n in bb(Z) lr(|4|) n upright("或") 6 \| n}$
$S_1 + S_2 = { 4 k + 6 t \| k , t in bb(Z) } = 2 bb(Z)$,
$S_1 S_2 = {sum_(i = 1)^n 24 k_i t_i \| k_i , t_i in bb(Z) , n in bb(Z)^(+)} = 24 bb(Z)$
]
]
子环构造陪集(加法):设 $S$ 为 $R$ 的子环,$a + S eq.delta overline(a) , b + S eq.delta overline(b)$
#definition()[
设$R$为环,$I$为其一个子环,$forall a in I , forall r in R$
+ 若$r a in I$,则称$I$是$R$的#strong[左理想]$arrow.l.r.double r I subset.eq I$(左吸收律)
+ 若$a r in I$,则称$I$是$R$的#strong[右理想]$arrow.l.r.double I r subset.eq I$(右吸收律)
+ 若$I$既是左理想又是右理想,则称$I$为$R$的#strong[理想(Ideal)]
]
#property()[
+ 平凡理想:${ 0 } , R$,且$0$属于任何理想
只有平凡理想的环称为#strong[单环]
+ 若$R$交换,则左理想\=右理想\=理想
+ 理想判则:$nothing eq.not I subset.eq R$为理想$arrow.l.r.double forall a , b in I , forall r in R$有$r a , a r , a - b in I$
+ 若$R$为含幺环,$I$为理想,则$I = R arrow.l.r.double 1 in I arrow.l.r.double u in I lr((forall u in U lr((R))))$
+ 若$I , J$为$R$的环中理想,则$I sect J , I + J , I J$均为理想
]
#example("单环")[
证明$M_n lr((F))$为单环,其中$F$为域
]
#proof()[
设${ 0 } eq.not cal(I) subset.eq M_n lr((F))$为一个理想,只须证$cal(I) = R arrow.l.r.double E in cal(I)$(其中$E$为单位阵)
设$0 eq.not A in cal(I) , A = lr((a_(i j)))_(n times n) , exists a_(k l) eq.not 0$,令$E_(i j) = mat(
delim: "(",
0, dots.h.c, 0, dots.h.c, 0;dots.v, dots.down, dots.v, , dots.v;0, dots.h.c, 1, dots.h.c, 0;dots.v, , dots.v, dots.down, dots.v;0, dots.h.c, 0, dots.h.c, 0,
)$,其中$1$在第$i$行第$j$列
考虑$E_(i k) A E_(l i) = a_(k l) E_(i i) in cal(I) lr((forall i)) , lr((a_(k l)^(- 1) E)) lr((a_(k l) E_11 + dots.h.c a_(k l) E_n n)) = E in cal(I) arrow.r.double cal(I) = R = M_n lr((F))$
]
=== 生成子环与生成理想
#definition()[
设$R$为环,$nothing eq.not S subset.eq R$,则$R$的包含$S$的最小的子环称为#strong[由$S$生成的子环],记作$lr([S])$,它是所有包含$S$的子环的交
]
#definition()[
设$R$为环,$nothing eq.not S subset.eq R$,则$R$的包含$S$的最小的理想称为#strong[由$S$生成的理想],记作$lr((S))$,它是所有包含$S$的理想的交
]
由一个元素生成的理想:主理想
=== 商环
#definition()[
设$R$为环,$I$为其一个理想,$R$作为加法群关于$I$的商群$R \/ I$对模$I$对加法与乘法所构成的环称为#strong[$R$关于$I$的商环(quotient ring)],记作$R \/ I$
]
#definition()[
设$M$是环$R$的非平凡理想,若有理想$H$使$M subset.neq H subset.eq R$则有$H = R$,则称$M$是$R$的一个#strong[极大理想\(maximal ideal)]
]
#theorem()[
设$R$为含幺交换环,则$M$是$R$的极大理想$arrow.l.r.double R \/ M$为域
]
#proof()[
- $R \/ M = { a + M |a in R } = { a^(‾)| a in R }$只须证含不同零元、幺元、可逆元
$0^(‾) = 0 + M = M , 0^(‾) in R \/ M , 1^(‾) = 1 + M in R \/ M$
由$1 in M arrow.r.double M = R$平凡理想,与非平凡矛盾,故$0^(‾) eq.not 1^(‾)$
$forall a^(‾) = a + M lr((a in.not M))$,令$H eq.delta lr((a + M)) R = a R + M = lr((a)) + M$为理想之和$arrow.r.double H$为理想,且$M subset.eq H$(取$0 in lr((a)) , 0 + M = M subset.eq lr((a)) + M = H$),$M eq.not H$($a in.not M$但$a = a + 0 in lr((a)) + M = H$)
极大性知$H = R arrow.r.double 1 in H = R , exists b in R , exists m in M$使得$a b + m = 1 arrow.r.double a^(‾) b^(‾) = 1^(‾) arrow.r.double b^(‾)$就是$a^(‾)$在$R \/ M$中的逆元
- $forall 0^(‾) eq.not a^(‾) in R \/ M , a^(‾)$有逆元,即$exists b^(‾)$使得$a^(‾) b^(‾) = 1^(‾)$
设$M subset.neq H subset.eq R , H$为理想$arrow.r.double exists a in H$但$a in.not M arrow.r.double a^(‾) eq.not 0^(‾) arrow.r.double a^(‾) b^(‾) = 1^(‾) arrow.r.double 1 - a b in M arrow.r.double 1 in a b + M arrow.r.double 1 in H arrow.r.double H = R arrow.r.double M$为极大理想
]
|
https://github.com/MasiarNovine/typst_resume_template | https://raw.githubusercontent.com/MasiarNovine/typst_resume_template/main/README.md | markdown | MIT License | # A resume template in typst
This is a template for a resume in typst. It can be simply
imported at the start of a `typ` file:
```rust
#import "template": *
//...
```
Currently, the functions `headerblock()`, `cventry` and `cvitem` are used to compose the resume. For usage and the arguments, see the `example.typ` file.
## Acknowledgements
This template was inspired by the `modern-cv` and `vercanard` templates from the typst community.
## License
The project is licensed under the terms of the MIT license.
|
https://github.com/jimipj/kamk-typst-templates | https://raw.githubusercontent.com/jimipj/kamk-typst-templates/main/project-plan.typ | typst | MIT License | #let project-plan(
author: (),
course: "Opintojakso",
cover: "",
date: none,
degree: "Tutkinto",
keywords: (),
monospace: "Monospace",
title: none,
doc,
) = {
set document(
author: author,
date: date,
keywords: keywords,
title: title,
)
set heading(
numbering: "1.1" + sym.space.quad + sym.space.third,
)
set list(
body-indent: 2em,
spacing: 2.25em,
)
set outline(
depth: 2,
indent: auto,
)
set page(
header-ascent: 1.75em,
margin: (
bottom: 2.5cm,
left: 4.3cm,
right: 1.5cm,
top: 2cm + 0.5cm,
),
number-align: top + right,
numbering: (..nums) => calc.max(0, nums.pos().first() - 2),
)
set par(
justify: true,
leading: 1.2em,
spacing: 2.25em,
)
set raw(
tab-size: 8,
theme: "comments.tmTheme",
)
set text(
font: ("Calibri", "Carlito"),
hyphenate: false,
lang: "fi",
size: 11pt,
)
show heading.where(outlined: false): it => {
set block(
spacing: 2.25em,
)
set text(
size: 11pt,
weight: "regular",
)
it
}
show heading.where(outlined: true): it => {
set block(
spacing: calc.max(2.25em, (5.25 - it.level) * 1em),
)
set text(
size: 11pt,
weight: "regular",
)
it
}
show link: it => {
set text(
fill: blue,
)
underline(it)
}
show raw.where(block: false): it => {
set text(
features: (calt: 0),
font: monospace,
)
box(
fill: rgb("#eaeaea"),
inset: (x: 0.5em),
outset: (y: 0.5em),
radius: 2pt,
it,
)
}
show raw.where(block: true): it => {
// line spacing
let s = 0.8em
// line column width
let w = str(it.lines.len()).len() * 1em
set par(
justify: false,
leading: s,
)
set text(
features: (calt: 0),
font: monospace,
)
block(
fill: rgb("#eaeaea"),
inset: (
left: -w - 1em,
rest: 1em,
),
outset: (
left: w + 1em,
),
radius: 2pt,
grid(
align: (right, start),
column-gutter: 1em,
columns: (w, 1fr),
row-gutter: s,
..it.lines.enumerate().map(((i, line)) => (
text(
fill: gray,
str(i + 1),
),
line,
)).flatten()
)
)
}
show outline.entry.where(level: 1): it => {
parbreak()
it
}
page(
margin: 0cm,
numbering: none,
grid(
columns: (1fr, 6.1cm),
{
v(1fr)
pad(
left: 2cm,
{
text(
fill: rgb("009aa6"),
weight: "bold",
if type(author) == "string" {
author
} else if (author.len() == 0) {
"Tekijä / Tekijät"
} else {
author.join(
", ",
last: " & ",
)
},
)
v(-2.5em)
text(
fill: rgb("009aa6"),
size: 18pt,
weight: "bold",
if type(title) == "none" {
"Projektisuunnitelman nimi"
} else {
title
},
)
},
)
v(5.25cm)
if cover == "" {
v(13.25cm)
} else {
image(
cover,
height: 13.25cm,
width: 100%,
)
}
},
rect(
fill: rgb("009ab2"),
height: 100%,
inset: 0pt,
width: 100%,
{
v(1fr)
block(
height: 13.25cm,
inset: (
bottom: 0.75cm,
x: 0.75cm,
),
width: 100%,
{
v(1fr)
pad(
right: 0.75cm,
align(
right,
text(
fill: white,
size: 10pt,
{
par(
justify: false,
leading: 0.70em,
course
)
v(-1em)
par(
justify: false,
leading: 0.70em,
degree
)
v(-1em)
par(
justify: false,
leading: 0.70em,
if type(date) == "none" {
"Päivämäärä"
} else if type(date) == "auto" {
datetime.today().display("[day padding:none].[month padding:none].[year padding:none]")
} else {
date.display("[day padding:none].[month padding:none].[year padding:none]")
}
)
},
)
)
)
// golden ratio
v((1 + calc.sqrt(5)) / 2 * 1fr)
image(
"kamk-logo.png",
fit: "contain",
)
}
)
}
)
)
)
page(
numbering: none,
{
v(2.25em)
outline()
}
)
doc
}
|
https://github.com/k4zuy/Typst-Template-HTW | https://raw.githubusercontent.com/k4zuy/Typst-Template-HTW/main/common/titlepage.typ | typst | #let titlepage(
title: "",
titleGerman: "",
degree: "",
program: "",
supervisor: "",
advisors: (),
author: "",
studentNumber: "",
startDate: none,
submissionDate: none,
) = {
set document(title: title, author: author)
set page(
margin: (left: 25mm, right: 25mm, top: 30mm, bottom: 40mm),
numbering: none,
number-align: center,
)
let body-font = "Times New Roman"
let sans-font = "Times New Roman" //"New Computer Modern Sans"
set text(
font: body-font,
size: 12pt,
lang: "de"
)
set par(leading: 1em)
// --- Title Page ---
//v(1cm)
align(center, image("../images/HTWD_logo_RGB_vertical_color.svg", width: 50%))
//align(center, image("../images/HTWD_logo_RGB_vertical_color.svg", width: 50%)) //26%
v(5mm)
align(center, text(font: sans-font, 2em, weight: 700, "Abschlussarbeit"))
/*
v(5mm)
align(center, text(font: sans-font, 1.5em, weight: 100, "School of Computation, Information and Technology \n -- Informatics --"))
v(15mm)
align(center, text(font: sans-font, 1.3em, weight: 100, degree + "’s Thesis in " + program))
v(8mm)
*/
//english title
//align(center, text(font: sans-font, 2em, weight: 700, title))
align(center, text(font: sans-font, 2em, weight: 500, titleGerman))
pad(
top: 3em,
right: 10%,
left: 25%,
grid(
columns: 2,
//gutter: 1em,
row-gutter: 1em,
column-gutter: 6em,
strong("Autor: "), author,
strong("Matrikelnummer: "), studentNumber,
strong("Studiengang: "), program,
strong("Gutachter: "), supervisor,
strong("Zweitgutachter: "), advisors.join(", "),
strong("Ausgabedatum: "), startDate,
strong("Abgabedatum: "), submissionDate,
)
)
pagebreak()
} |
|
https://github.com/tweaselORG/ReportHAR | https://raw.githubusercontent.com/tweaselORG/ReportHAR/main/templates/en/complaint.typ | typst | MIT License | #import "style.typ": tweaselStyle
#show: tweaselStyle
// Title page
#align(center)[
#v(120pt)
#block(text(weight: 700, 2.5em, [
{% if type === 'complaint' %}
Complaint under the GDPR{% if complaintOptions.nationalEPrivacyLaw %} and {{ complaintOptions.nationalEPrivacyLaw }}{% endif %}
{% else %}
Informal suggestion for investigation
{% endif %}
]))
#v(30pt)
_filed by_ \
{{ complaintOptions.complainantAddress }} \
(complainant, hereinafter: "I")
_against_ \
the controller for the {{ analysis.app.platform }} app "{{ analysis.app.name }}", assumed to be \
{{ complaintOptions.controllerAddress }} \
(respondent, hereinafter: "the controller")
_on_ \
{{ complaintOptions.date | dateFormat(false) }}
_regarding_ \
Art.~6(1) GDPR (lawfulness of processing), Art.~25 GDPR (data protection by design and by default), Art.~5(1)(c) GDPR (data minimisation)
{%- if complaintOptions.nationalEPrivacyLaw -%}
,
{% if complaintOptions.nationalEPrivacyLaw === 'TDDDG' -%}
§~25 TDDDG (privacy protection for terminal equipment)
{% endif %}
{% endif %}
_under the reference_ \
{{ complaintOptions.reference }} \
(please mention when replying)
]
#pagebreak()
// Main content
= Introduction
{% if type === 'complaint' %}
I am hereby filing a complaint under Art. 77(1) GDPR regarding the {{ analysis.app.platform }} app "{{ analysis.app.name }}" (hereinafter: "the app").
As far as I can tell, the app is operated by {{ complaintOptions.controllerAddress }}.#footnote[{{ complaintOptions.controllerAddressSourceUrl | safe }}] I am thus assuming them to be the app's controller. Should this assumption be incorrect, my complaint is directed against the actual controller of the app.
I am a user of the app on my personal {{ analysis.app.platform }} device. The {{ analysis.app.platform }} device is only used by me personally.{% if complaintOptions.userDeviceAppStore and complaintOptions.loggedIntoAppStore %} I have installed the app through the {{ complaintOptions.userDeviceAppStore }}. I am logged into the {{ complaintOptions.userDeviceAppStore }} with my personal account.{% endif %}
{% if complaintOptions.deviceHasRegisteredSimCard %}My {{ analysis.app.platform }} device has a SIM card installed that is registered to my name.{% endif %}
{% else %}
I am hereby asking you to investigate the {{ analysis.app.platform }} app "{{ analysis.app.name }}" (hereinafter: "the app").
As far as I can tell, the app is operated by {{ complaintOptions.controllerAddress }}.#footnote[{{ complaintOptions.controllerAddressSourceUrl | safe }}] I am thus assuming them to be the app's controller. Should this assumption be incorrect, my request is directed against the actual controller of the app.
{% endif %}
= Facts
== Preliminary remarks
To understand how the app is processing my data, I used the tools of the tweasel project#footnote[https://docs.tweasel.org/], operated by Datenanfragen.de e.~V., to perform an automated analysis of the app's network traffic. The analysis was performed on {{ initialAnalysis.date | dateFormat }} on version {{ initialAnalysis.app.version }} of the app, {% if analysis.app.store %}downloaded from the {{ analysis.app.store }}, {% endif %}running on {{ initialAnalysis.app.platform }} {{ initialAnalysis.platformVersion }}.
During this analysis, the app was run _without any user input_ (i.e. there was no interaction with the app at all) and its network traffic was recorded. The recorded traffic was then analyzed for tracking and similar data transmissions. Based on that, the tweasel tools produced a technical report.
Both this technical report and the traffic recording are attached as evidence as part of my communication with the controller. The report also contains a detailed description of the methodology used for the analysis and its basis in mobile privacy research.
Through the analysis, I unfortunately had to find out that the app performs tracking (as explained in @tracking) which I believe to be in violation of the GDPR {% if complaintOptions.nationalEPrivacyLaw %} and {{ complaintOptions.nationalEPrivacyLaw }}{% endif %} (as explained in @legal-grounds).
On {{ complaintOptions.noticeDate | dateFormat(false) }}, I sent a notice to the controller making them aware of the violations I discovered and giving them the opportunity to remedy them.
In the interest of avoiding unnecessary work for the data protection authorities, the controller, and myself, I gave the controller a voluntary grace period of 60 days to bring their app in line with applicable data protection law. I also informed them that I planned on filing a complaint otherwise.
{% if complaintOptions.controllerResponse === "none" %}
I have not received any response from the controller.
{% elif complaintOptions.controllerResponse === "denial" %}
I have received a response from the controller in which they deny there being any violations in their app. I am providing an in-depth technical and legal argument as to why I do believe the controller is violating the GDPR {% if complaintOptions.nationalEPrivacyLaw %} and {{ complaintOptions.nationalEPrivacyLaw }}{% endif %} below.
{% elif complaintOptions.controllerResponse === "broken-promise" %}
I have received a response from the controller in which they agreed to remedy the violations I discovered. However, as I will explain below, they have not actually done so.
{% endif %}
I am attaching my notice to the controller{% if complaintOptions.controllerResponse !== "none" %} as well as any communication I have received from them in this matter{% endif %}.
On {{ analysis.date | dateFormat }}, {% if complaintOptions.controllerResponse === "none" %}and thus after the expiration of the voluntary grace period{% else %}after the controller had responded{% endif %}, I retested the app using the tweasel tools. The analysis was performed on version {{ analysis.app.version }} of the app, {% if analysis.app.store %}downloaded from the {{ analysis.app.store }}, {% endif %}running on {{ analysis.app.platform }} {{ analysis.platformVersion }}. Unfortunately, I had to find that the app still performs tracking in violation of the GDPR {% if complaintOptions.nationalEPrivacyLaw %} and {{ complaintOptions.nationalEPrivacyLaw }}{% endif %}. Both this second technical report and the traffic recording are also attached.
{% if type === 'complaint' %}
To verify that the tracking also affects me, I used {% if analysis.app.platform === 'Android' %}the "TrackerControl" app#footnote[https://trackercontrol.org/#network-traffic-analysis]{% elif analysis.app.platform === 'iOS' %}the "App Privacy Report" feature#footnote[https://support.apple.com/en-gb/HT212958]{% endif %} on my personal {{ analysis.app.platform }} device. This confirmed that the app also contacts those tracking servers on my own device.#footnote[Recording a phone's network traffic requires rooting the device and making severe configuration changes. Doing this is not feasible or advised for devices that are in actual day-to-day use. That is why the tweasel project provides public infrastructure for doing such testing on devices/emulators that are only used for this purpose. However, logging a list of DNS hostnames contacted by an app is possible without such severe procedures {% if analysis.app.platform === 'Android' %}by installing the "TrackerControl" app{% elif analysis.app.platform === 'iOS' %}using the "App Privacy Report" feature integrated directly into iOS{% endif %}.\
\
While the results from this log don't allow for inspecting the actual data that was transmitted, they do prove that the app contacted the same tracking servers. In combination with the technical report by the tweasel project, for which the request content was actually analysed, this provides a very strong indication that I am affected by the same tracking. As I will elaborate on in @legal-grounds-burden-of-proof, the controller has the burden of proving that their processing is in line with the GDPR. It would thus be on them to produce evidence for disproving the conclusion I am drawing here.] I have attached the evidence for this in @personal-hostnames[Appendix]
{% endif %}
== Tracking without interaction <tracking>
In this section, I am detailing the tracking data transmissions that the app performed. I am only including transmissions from the second technical report from the tweasel project from {{ analysis.date | dateFormat(false) }}. All these transmissions thus occurred {% if complaintOptions.controllerResponse === "none" %}*at least 60 days after* I informed the controller of the violations I had initially discovered and gave them the opportunity to remedy them{% else %}after the controller had responded to my notice{% endif %}.
{% if type === 'complaint' %}
Additionally, I am only including transmissions to servers for which the log of {% if analysis.app.platform === 'Android' %}the "TrackerControl" app{% elif analysis.app.platform === 'iOS' %}the "App Privacy Report"{% endif %} confirmed that the app also contacts them on my personal device, as explained above. It is thus safe to assume that all these transmissions also affect me personally.
{% endif %}
It further bears repeating that, as guaranteed by the analysis methodology, the tracking transmissions described here all occurred *without any interaction* with the app or any potential consent dialog.
{% for adapterSlug, adapterResult in findings %}
== {{ adapterResult.adapter.name }}
The app sent {{ adapterResult.requests.length }} request(s) to the tracker "{{ adapterResult.adapter.name }}", operated by "{{ adapterResult.adapter.tracker.name }}".
{% if adapterResult.adapter.tracker.description %}
{{ t("tracker-descriptions", adapterResult.adapter.tracker.description) | trackharMl | safe }}
{% endif %}
{% if adapterResult.adapter.description %}
{{ t("tracker-descriptions", adapterResult.adapter.description) | trackharMl | safe }}
{% endif %}
Through these requests, at least the following information was transmitted:
#table(
columns: (33.3333%, 66.6666%),
[*Data type*], [*Transmitted value(s)*],
{% for property, value in adapterResult.receivedData -%}
[{{ t("properties", property) }}], [{{ value | join(', ') | code }}],
{% endfor %}
)
The full content of this request and the method used for decoding the request and extracting this information is documented in the attached technical report.
{% endfor %}
= Context: Online tracking <context-online-tracking>
The tracking practices employed in the app by the controller are part of a broader ecosystem of online tracking that has become pervasive across the web and mobile apps. Extensive research has again and again revealed ubiquitous violations of and a prevalent disregard for data protection law in this context. The vast amounts of personal data collected through such tracking activities are fed into an opaque and shadowy system consisting of thousands of companies, posing very real dangers to users.
== Habitual violations of data protection law
Studies looking into tracking that happens without consent have proven how common tracking is, even before there was any user interaction at all.
On the web, research found between 49~% and 75~% of websites using tracking before the user interacted with a consent prompt or even after explicitly rejecting it.#footnote[Trevisan/Traverso/Bassi/Mellia, 4 Years of EU Cookie Law: Results and Lessons Learned, 2019, https://petsymposium.org/popets/2019/popets-2019-0023.pdf; Papadogiannakis/Papadopoulos/Kourtellis/Markatos, User Tracking in the Post-cookie Era: How Websites Bypass GDPR Consent to Track Users, 2021, https://dl.acm.org/doi/10.1145/3442381.3450056]
Studies analyzing apps on Android and iOS found similar results, reporting around 75~% of apps contacting trackers without consent and between 55~% and 72~% of apps sharing unique device identifiers like the device ID.#footnote[Kollnig/Shuba/Binns/Van Kleek/Shadbolt, Are iPhones Really Better for Privacy? A Comparative Study of iOS and Android Apps, 2022, https://petsymposium.org/popets/2022/popets-2022-0033.pdf; Altpeter, Informed Consent? A Study of "Consent Dialogs" on Android and iOS, 2022, https://benjamin-altpeter.de/doc/thesis-consent-dialogs.pdf] In fact, apps transfer more personal data to trackers before obtaining consent than afterwards.#footnote[Koch/Altpeter/Johns, The OK Is Not Enough: A Large Scale Study of Consent Dialogs in Smartphone Applications, 2023, https://www.usenix.org/system/files/usenixsecurity23-koch.pdf; Altpeter, Informed Consent? A Study of "Consent Dialogs" on Android and iOS, 2022, https://benjamin-altpeter.de/doc/thesis-consent-dialogs.pdf] Developers are frequently not aware of their obligations under data protection law or misunderstand them.#footnote[T<NAME>yen/Backes/Marnau/Stock, Share First, Ask Later (or Never?) Studying Violations of GDPR’s Explicit Consent in Android Apps, 2021, https://www.usenix.org/system/files/sec21-nguyen.pdf]
Websites and apps that do try to acquire users' consent, typically employ dark patterns and nudging to trick users into giving consent even if they don't actually want to do so. Multiple studies across the web and mobile found that around 90~% of consent dialogs employed at least one dark pattern that is explicitly explained to be infringing the GDPR's conditions for consent in publications by data protection authorities.#footnote[Koch/Altpeter/Johns, The OK Is Not Enough: A Large Scale Study of Consent Dialogs in Smartphone Applications, 2023, https://www.usenix.org/system/files/usenixsecurity23-koch.pdf; Altpeter, Informed Consent? A Study of "Consent Dialogs" on Android and iOS, 2022, https://benjamin-altpeter.de/doc/thesis-consent-dialogs.pdf; Nouwens/Liccardi/Veale/Karger/Kagal, Dark Patterns after the GDPR: Scraping Consent Pop-ups and Demonstrating their Influence, 2020, https://dl.acm.org/doi/10.1145/3313831.3376321] These dark patterns include making refusing consent harder than giving it, and overly highlighting the "accept" button compared to the "reject" button by color and/or size. It is important to note that all cited studies only observed a limited set of minimal conditions that are easy to evaluate automatically, meaning that the actual percentage of consent dialogs with violations is in all likelihood even higher.
The dangers of such dark patterns and nudging are well established in relevant literature. Consent dialogs already do not work as a medium for conveying privacy-critical information to users, even when those users are concerned about their privacy and no dark patterns are used.#footnote[Bauer/Bravo-Lillo/Fragkaki/Melicher, A comparison of users' perceptions of and willingness to use Google, Facebook, and Google+ single-sign-on functionality, 2013, https://dl.acm.org/doi/10.1145/2517881.2517886] Experiments investigating the effect of various design variables in consent dialogs on user choices found that nudging, even in the form of seemingly small details, heavily increases consent rates.#footnote[Utz/Degeling/Fahl/Schaub/Holz, (Un)informed Consent: Studying GDPR Consent Notices in the Field, 2019, https://dl.acm.org/doi/10.1145/3319535.3354212; Nouwens/Liccardi/Veale/Karger/Kagal, Dark Patterns after the GDPR: Scraping Consent Pop-ups and Demonstrating their Influence, 2020, https://dl.acm.org/doi/10.1145/3313831.3376321] For example, a highlighted "accept all" button results in significantly higher consent rates but at the same time users are not aware of its effects and regret their choice after being informed of those effects.#footnote[Machuletz/Böhme, Multiple Purposes, Multiple Problems: A User Study of Consent Dialogs after GDPR, 2020, https://petsymposium.org/popets/2020/popets-2020-0037.pdf]
Other research found websites registering supposed consent without user interaction or even after an explicit opt-out, as well as preselected options in half of consent dialogs.#footnote[Matte/Bielova/Santos, Do Cookie Banners Respect my Choice?: Measuring Legal Compliance of Banners from IAB Europe's Transparency and Consent Framework, 2020, https://ieeexplore.ieee.org/document/9152617]
== Real risks for data subjects
At the same time, these practices pose significant and very real risks to data subjects. Thousands of tracking companies worldwide constantly collect vast amounts of data on users on the web and on mobile and analyze intimate details about their lives. An analysis of self-declared privacy labels on Android found often downloaded apps, including apps explicitly aimed at children, admitting to collecting and sharing highly sensitive data like the user’s sexual orientation or health information for tracking and advertising purposes.#footnote[Altpeter, Worrying confessions: A look at data safety labels on Android, 2022, https://www.datarequests.org/blog/android-data-safety-labels-analysis/] Based on such data, they try to predict users' behaviours for example to target and influence users with ads and decide which products to display and at what price. They also claim to be able to assess companies' risks to protect against spam, compute credit scores, or prevent fraud.#footnote[Sieben in Altpeter/Sieben, Tracking und Datenschutzrechte, 2023, https://static.dacdn.de/talks/slides/2023-09-08-topio.pdf, slide 75]
Additionally, trackers build profiles on users, categorizing them into segments, sometimes based on highly sensitive inferences like health conditions, religious beliefs, sexual orientation, income level, and more. To give just a few examples, reporting has found segments such as _heavy alcohol consumers_, _desire to lose weight_, _planning to adopt a child_, _diagnosis for leukemia_, _low income without perspective_, _conservative values_, and even _visits to sexual abuse treatment centers_. Trackers also score users on criteria like _often influenced by ads_, _inexperienced credit card users_, _lone wolves_, and _getting a raw deal out of life_ to identify vulnerabilities.#footnote[Keegan/Eastwood, From "Heavy Purchasers" of Pregnancy Tests to the Depression-Prone: We Found 650,000 Ways Advertisers Label You, 2023, https://themarkup.org/privacy/2023/06/08/from-heavy-purchasers-of-pregnancy-tests-to-the-depression-prone-we-found-650000-ways-advertisers-label-you; Gille/Meineck/Dachwitz, Wie eng uns Datenhändler auf die Pelle rücken, 2023, https://netzpolitik.org/2023/europa-vergleich-wie-eng-uns-datenhaendler-auf-die-pelle-ruecken/] Trackers conduct large-scale experiments, systematically optimizing how to persuade, manipulate, and trigger users.#footnote[Christl, Corporate Surveillance in Everyday Life, 2017, https://crackedlabs.org/en/corporate-surveillance]
Crucially, trackers don't need to know users' legal identities for any of this profiling. They collect and assign unique identifiers to track users, and share and link IDs among each other in order to more precisely follow users across websites and apps.#footnote[Urban/Tatang/Degeling/Holz/Pohlmann, The Unwanted Sharing Economy: An Analysis of Cookie Syncing and User Transparency under GDPR, 2018, https://arxiv.org/pdf/1811.08660.pdf; Englehardt/Narayanan, Online Tracking: A 1-million-site Measurement and Analysis, 2016, https://dl.acm.org/doi/pdf/10.1145/2976749.2978313; Cyphers/Gebhart, Behind the One-Way Mirror: A Deep Dive Into the Technology of Corporate Surveillance, 2019, https://www.eff.org/files/2019/12/11/behind_the_one-way_mirror-a_deep_dive_into_the_technology_of_corporate_surveillance.pdf] For trackers, these IDs are often even more useful than legal names. After all, names are not unique whereas IDs are specifically designed to precisely identify a single user, device, or session. As <NAME> points out, "Many companies are not interested in tying a name to data they process for behavioural targeting, even though they could easily do so."#footnote[<NAME>, Singling out people without knowing their names – Behavioural targeting, pseudonymous data, and the new Data Protection Regulation, 2016, p. 268]
Supposedly anonymized datasets are rarely safe against re-identification. In many cases, even a handful of seemingly benign data points are enough to uniquely identify a person.#footnote[cf. e.g. Rocher/Hendrickx/de Montjoye, Estimating the success of re-identifications in incomplete datasets using generative models, Nature Communications, 2019, https://www.nature.com/articles/s41467-019-10933-3] Similarly, fingerprinting can often uniquely identify a device using its settings.#footnote[lschatzkin/Budington/maximillianh/Antaki, About Cover Your Tracks, 2021, https://coveryourtracks.eff.org/about]
Given the above, it is crucial that data protection law protects data subjects against these dangers. Its very purpose is to safeguard individuals from the misuse of their personal data, which is a fundamental right. Tracking practices, as outlined, not only infringe upon this right but also pose a significant threat to the autonomy and dignity of individuals. The covert accumulation and exploitation of personal data through tracking mechanisms enable manipulation and discrimination, undermining the essence of individual freedom and self-determination.
= {{ 'Grounds for the complaint' if type === 'complaint' else 'Legal grounds' }} <legal-grounds>
Based on the facts presented above, I am of the opinion that the controller has violated data protection law, as I will explain in the following.
== Violation of Art. 6(1) GDPR: Lawfulness of processing
The tracking data transmissions listed in @tracking fall within the scope of the GDPR but the controller had no legal basis for this processing.
=== Transmission of tracking data falls under the GDPR
Through the tracking data transmissions, the controller processed my personal data by automated means. Accordingly, they fall within the scope of the GDPR (Art. 2(1) GDPR).
The European Court of Justice has repeatedly and consistently stressed that the concept of personal data is to be interpreted broadly#footnote[cf. e.g. European Court of Justice, Judgment of 20 December 2017, Case C-434/16, https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:62016CJ0434; European Court of Justice, Judgment of 4 May 2023, Case C-487/21, https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:62021CJ0487; European Court of Justice, Judgment of 7 March 2024, Case C-479/22 P, https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:62022CJ0479], including in the context of online advertising and tracking#footnote[European Court of Justice, Judgment of 7 March 2024, Case C-604/22, https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:62022CJ0604]. The definition of "personal data" in Article 4(1) of the GDPR explicitly lists online identifiers as a possible means of identification. Recital 26 of the GDPR further confirms: "To determine whether a natural person is identifiable, all means should be considered that could likely be used by the controller or any other person, according to general estimates, to directly or indirectly identify the natural person, such as singling out." It was specifically the legilature's intention to make it clear that the GDPR applies in the context of online tracking#footnote[Albrecht/Jotzo, Das neue Datenschutzrecht der EU, 1. edition, 2017, Part 3, mn. 3 (translated)]: #quote[Data subjects can be indirectly inferred for example through 'singling out' as mentioned in Recital 26 GDPR. The _European Parliament_ had pushed for this clarification, since in the online world, for example with the help of cookies, IP addresses, browser fingerprints and other techniques, personality profiles are generated for many users by which they receive individual advertising without the operators of such advertising networks needing their civil names.]
Therefore, the mere possibility of individualizing or recognizing an individual based on a piece of data suffices for the presence of personal data.#footnote[in agreement: Farinho in Spiecker gen. Döhmann/Papakonstantinou/Hornung/De Hert, General Data Protection Regulation, Art. 4(1) Personal data, 2023, mn. 21, 24; <NAME>, Singling out people without knowing their names – Behavioural targeting, pseudonymous data, and the new Data Protection Regulation, Computer Law & Security Review 2016, 256; Article 29 Data Protection Working Party, WP 136: Opinion 4/2007 on the concept of personal data, https://ec.europa.eu/justice/article-29/documentation/opinion-recommendation/files/2007/wp136_en.pdf, p. 14; Albrecht/Jotzo, Das neue Datenschutzrecht der EU, 1. edition, 2017, Part 3, mn. 3; Karg in Simitis/Hornung/Spiecker gen. Döhmann, Datenschutzrecht, 1. edition, 2019, Art. 4 Nr. 1 DSGVO, mn. 49–50; Schantz in Schantz/Wolff, Das neue Datenschutzrecht, 1. edition, 2017, chapter C.II, mn. 292–293; Schild in BeckOK Datenschutzrecht, 45. edition, 2023, Art. 4 Nr. 1, mn. 17, 19]
The tracking services integrated by the controller have all read and/or set IDs that are used to identify me and my device. These IDs are specifically designed to be unique and avoid collisions, ensuring that they will only ever be assigned once and thus precisely identify me. For example, one common ID format that trackers often use are UUIDs/GUIDs. Those are explicitly specified to "guarantee uniqueness across space and time."#footnote[Leach/Mealling/Salz, RFC 4122: A Universally Unique IDentifier (UUID) URN Namespace, 2005, https://datatracker.ietf.org/doc/html/rfc4122] One would have to generate 1 billion UUIDv4s per second for about 86 years to have even just a 50~% probability of a collision.#footnote[Wikipedia contributors, Universally unique identifier, 2024, https://en.wikipedia.org/w/index.php?title=Universally_unique_identifier&oldid=1212321712]
Additionally, trackers commonly share IDs among each other (a process referred to as "cookie syncing" on the web).#footnote[Urban/Tatang/Degeling/Holz/Pohlmann, The Unwanted Sharing Economy: An Analysis of Cookie Syncing and User Transparency under GDPR, 2018, https://arxiv.org/pdf/1811.08660.pdf; Englehardt/Narayanan, Online Tracking: A 1-million-site Measurement and Analysis, 2016, https://dl.acm.org/doi/pdf/10.1145/2976749.2978313; Cyphers/Gebhart, Behind the One-Way Mirror: A Deep Dive Into the Technology of Corporate Surveillance, 2019, https://www.eff.org/files/2019/12/11/behind_the_one-way_mirror-a_deep_dive_into_the_technology_of_corporate_surveillance.pdf] This process allows different tracking services to share and match IDs with each other, thereby combining data from various sources to create an even more comprehensive profile of an individual.
These IDs are then used not only to collect data about individuals and track their behaviour, but for example also to deliver targeted advertisements.
As such, it is apparent that the IDs' very purpose is to single out users as referred to in Recital 26 GDPR and identify them.
Even if the IDs themselves were not personal data on their own, the transmitted tracking data as whole unequivocally constitutes personal data. A controller does not need to be able to immediately infer a data subject's name from some information for that information to be personal data.#footnote[Farinho in Spiecker gen. Döhmann/Papakonstantinou/Hornung/De Hert, General Data Protection Regulation, Art. 4(1) Personal data, 2023, mn. 20; Purtova, From knowing by name to targeting: the meaning of identification under the GDPR, 2022, https://academic.oup.com/idpl/article/12/3/163/6612144; EU FRA, Handbook on European data protection law, 2018 edition, section 2.1, https://fra.europa.eu/sites/default/files/fra_uploads/fra-coe-edps-2018-handbook-data-protection_en.pdf; Albrecht/Jotzo, Das neue Datenschutzrecht der EU, 1. edition, 2017, Part 3, mn. 3; Arning/Rothkegel in Taeger/Gabel, DSGVO - BDSG - TTDSG, 4. edition, 2022, Art. 4 DSGVO, mn. 24, 30; Ernst in Paal/Pauly, DS-GVO BDSG, 3. edition, 2021, Art. 4 Nr. 1 DSGVO, mn. 8; Karg in Simitis/Hornung/Spiecker gen. Döhmann, Datenschutzrecht, 1. edition, 2019, Art. 4 Nr. 1 DSGVO, mn. 48–49; Klabunde in Ehmann/Selmayr/Klabunde, DS-GVO, 2. edition, 2018, Art. 4 DSGVO Nr. 1, mn. 18; Schantz in Schantz/Wolff, Das neue Datenschutzrecht, 1. edition, 2017, chapter C.II, mn. 291–292; Schild in BeckOK Datenschutzrecht, 45. edition, 2023, Art. 4 Nr. 1, mn. 17; Ziebarth in Sydow/Marsch, DS-GVO/BDSG, 3. edition, 2022, Art. 4 Nr. 1 DSGVO, mn. 14; Karg/Kühn, Datenschutzrechtlicher Rahmen für "Device Fingerprinting" - Das klammheimliche Ende der Anonymität im Internet, ZD 2014, 285, p. 288; Wenhold, Nutzerprofilbildung durch Webtracking, 1. edition, 2018, chapter E.I.2, p. 130]
In the context of online tracking and advertising, IDs are never processed on their own. Instead, they are combined with other information, such as interaction data, browsing history, location data, device parameters, behavioral patterns, and IP addresses, to create detailed fingerprints and profiles of users and target them with personalized ads. As shown in @tracking, the very purpose of the trackers that the controller embedded into the app is to target and/or recognize individual users. In this larger context, there is an overwhelming consensus among legal scholars that such data processing falls under the scope of the GDPR and constitutes personal data.#footnote[Gola in Gola/Heckmann, Datenschutz-Grundverordnung - Bundesdatenschutzgesetz, 3. edition, 2022, Art. 4 Nr. 1 DSGVO, mn. 23; Klar/Kühling in Kühling/Buchner, DS-GVO/BDSG, 3. edition, 2020, Art. 4 Nr. 1 DSGVO, mn. 36; Schild in BeckOK Datenschutzrecht, 45. edition, 2023, Art. 4 Nr. 1, mn. 20] This is in line with Recital 30 GDPR.
This position is further supported by a large corpus of guidelines and decisions by various data protection authorities. These are outlined in the Appendix in @dpa-guidelines-id and @dpa-decisions-id, respectively.
Finally, it bears mention that in all of the requests detailed in @tracking, the tracking company has the option to associate the transmitted tracking data with the user's IP address. As the European Court of Justice has repeatedly ruled, that information may make it possible to create a profile of that user and actually identify the person specifically concerned by such information.#footnote[cf. e.g. European Court of Justice, Judgment of 7 March 2024, Case C-604/22, https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:62022CJ0604; European Court of Justice, Judgment of 17 June 2021, Case C-597/19, https://eur-lex.europa.eu/legal-content/en/TXT/?uri=CELEX:62019CJ0597; European Court of Justice, Judgment of 19 October 2016, Case C-582/14, https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:62014CJ0582]
As a result, the information in the described tracking data transmissions is evidently personal data. Clearly, it was also processed by automated means and thus falls under the scope of the GDPR.
=== No legal basis is applicable for the transmissions <no-legal-basis>
As per Art. 6(1) GDPR, the processing of personal data is only lawful if one of six possible legal bases is applicable. However, there is no possible valid legal basis for the processing carried out by the controller:
+ Consent (Art. 6(1)(a) GDPR): Consent can only be given by a statement or by a clear affirmative action (Art. 4(11) GDPR). Recital 32 GDPR clarifies that silence, pre-ticked boxes or inactivity do not constitute consent.
As already explained, the transmissions detailed above happened without any interaction whatsoever. Thus, consent cannot possibly have been given for them. In any case, the burden of proving that consent has been given would be on the controller according to Art. 7(1) GDPR.
+ Necessity for performance of a contract (Art. 6(1)(b) GDPR): The described data transmissions were for the purposes of online tracking. Such processing is not necessary for the performance of a contract.
In its _Guidelines 2/2019 on the processing of personal data under Article 6(1)(b) GDPR in the context of the provision of online services to data subjects_, the EDPB explicitly confirms that Art. 6(1)(b) GDPR cannot be used as a legal basis for tracking and profiling users#footnote[EDPB, Guidelines 2/2019 on the processing of personal data under Article 6(1)(b) GDPR in the context of the provision of online services to data subjects, Version 2.0, 2019, https://edpb.europa.eu/sites/default/files/files/file1/edpb_guidelines-art_6-1-b-adopted_after_public_consultation_en.pdf, mn. 56], online behavioural advertising#footnote[ibid., mn. 51 et seq.], or collecting metrics for "service improvement"#footnote[ibid., mn. 48 et seq.].
+ Legal obligation (Art. 6(1)(c) GDPR): obviously not applicable.
+ Necessity for protection of natural person's vital interests (Art. 6(1)(d) GDPR): obviously not applicable.
+ Necessity for performance of a task carried out in the public interest (Art. 6(1)(e) GDPR): obviously not applicable.
+ Necessity for purposes of legitimate interests (Art. 6(1)(f) GDPR): The controller also cannot claim a legitimate interest in the processing. Legitimate interests are typically not a suitable legal basis for tracking.#footnote[cf. e.g. Datenschutzkonferenz, Orientierungshilfe der Aufsichtsbehörden für Anbieter:innen von Telemedien ab dem 1. Dezember 2021 (OH Telemedien 2021), Version 1.1, 2022, https://www.datenschutzkonferenz-online.de/media/oh/20221130_OH_Telemedien_2021_Version_1_1.pdf, Section IV. 5; Der Landesbeauftragte für Datenschutz und Informationsfreiheit Baden-Württemberg, FAQ: Cookies und Tracking durch Betreiber von Webseiten und Hersteller von Smartphone-Apps, Version 2.0.1, 2022, https://www.baden-wuerttemberg.datenschutz.de/wp-content/uploads/2022/03/FAQ-Tracking-online.pdf, Section A.3.1; Article 29 Data Protection Working Party, WP 217, Opinion 06/2014 on the notion of legitimate interests of the data controller under Article 7 of Directive 95/46/EC, https://ec.europa.eu/justice/article-29/documentation/opinion-recommendation/files/2014/wp217_en.pdf, p. 32; Article 29 Data Protection Working Party, WP 203, Opinion 03/2013 on purpose limitation, https://ec.europa.eu/justice/article-29/documentation/opinion-recommendation/files/2013/wp203_en.pdf, p. 46] It is not apparent why the controller's interest in tracking would outweigh my interests or fundamental rights and freedoms.
== Violation of Art. 25 GDPR and Art. 5(1)(c) GDPR: Data protection by design and by default, data minimisation
The controller has failed to implement appropriate technical and organisational measures to ensure data protection by design and by default as required by Art. 25 GDPR.
Art. 25(1) GDPR requires the controller to implement appropriate measures at the time of determining the means of processing as well as during the processing itself. This includes measures to effectively implement the data minimisation principle as per Art. 5(1)(c) GDPR.#footnote[EDPB, Guidelines 4/2019 on Article 25 Data Protection by Design and by Default, Version 2.0, 2020, https://edpb.europa.eu/sites/default/files/files/file1/edpb_guidelines_201904_dataprotection_by_design_and_by_default_v2.0_en.pdf, mn. 61] The EDPB has confirmed that this obligation applies to all controllers, regardless of their size or the complexity of their processing operations.#footnote[ibid., mn. 6]
@tracking details the tracking that the app has performed. As explained in @context-online-tracking, the online tracking ecosystem presents severe risks to the rights and freedoms of data subjects, even if only seemingly benign data is being processed. It is the controller's obligation to take the current 'state of the art' into account in their risk analysis and have knowledge of how technology can present data protection risks. #footnote[ibid., mn. 19, 30] They should have been aware of these risks as they are widely documented and discussed in literature, media, and public debate.
However, they have failed to mitigate these risks, instead enabling unnecessary collection and transmission of data by default. The controller has included the above mentioned third-party tracking SDKs into their app and configured them to send tracking payloads without any user interaction.
The controller cannot argue that the SDKs themselves configured the tracking to be enabled by default, either. It is the controller's responsiblity to make sure that functions that do not have a legal basis or are not compatible with the intended purposes of processing are switched off when including third-party software in their app. #footnote[ibid., mn. 44]
As explained in @no-legal-basis, the data collected through the tracking goes beyond what is adequate and necessary for the app's functionality. If the controller should argue that they need certain statistics for example to monitor the performance of their app, less granular, aggregated, or anonymized data would have sufficed for this purpose instead of combining the data with unique identifiers that allow the controller and third-parties to identify me.#footnote[ibid., mn. 49, 75] They have thus collected more data than is necessary, violating the principle of data minimisation as prescribed by Art. 5(1)(c) GDPR.
Finally, users cannot reasonably expect that apps transmit such detailed identifiable data about them without any interaction.#footnote[ibid., mn. 70]
== Burden of proof <legal-grounds-burden-of-proof>
As a data subject, I have no insights into the internal processes and data processing practices of either the controller or the tracking companies the controller has integrated into their app. Through this complaint, I have materially substantiated why I believe that the controller has violated my data protection rights on a technical and legal basis.
The burden of proof that their processing is in line with the GDPR falls on the controller as per Art. 5(2) GDPR.#footnote[with additional references: Schantz in BeckOK Datenschutzrecht, 45. edition, 2023, Art. 5, mn. 39] It was further explicitly confirmed by the European Court of Justice.#footnote[European Court of Justice, Judgment of 24 February 2022, Case C-175/20, https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:62020CJ0175]
{% if complaintOptions.nationalEPrivacyLaw === 'TDDDG' %}
== §~25 TDDDG: Privacy protection for terminal equipment
In addition to the GDPR, I believe that the controller has also violated §~25 TDDDG as the transposition of Art. 5(3) ePrivacy Directive into German law.
As shown in @tracking, the app has sent various information relating to the used device to tracking companies. In order to do so, the app inevitably had to read the information from the terminal equipment#footnote[Schürmann/Guttmann in Auernhammer, DSGVO/BDSG, 8. edition, 2023, §~25 TTDSG, mn. 27, 31, 37; EDPB, Guidelines 2/2023 on Technical Scope of Art. 5(3) of ePrivacy Directive, 2023, https://www.edpb.europa.eu/system/files/2023-11/edpb_guidelines_202302_technical_scope_art_53_eprivacydirective_en.pdf, mn. 29, 31, 35, 39], thus opening the scope of §~25 TDDDG. Unlike the GDPR, the TDDDG doesn't just cover personal data but any data that is read from or stored on an end user's terminal equipment.#footnote[EDPB, Guidelines 2/2023 on Technical Scope of Art. 5(3) of ePrivacy Directive, 2023, https://www.edpb.europa.eu/system/files/2023-11/edpb_guidelines_202302_technical_scope_art_53_eprivacydirective_en.pdf, mn. 7–12; Schneider in Assion, TTDSG, 2022, §~25 TTDSG, mn. 23] The TDDDG does not include any significance threshold on the types of data concerned, either—any information can fall within its scope, including purely technical information.#footnote[Schürmann/Guttmann in Auernhammer, DSGVO/BDSG, 8. edition, 2023, §~25 TTDSG, mn. 20–23; Burkhardt/Reif/Schwartmann in Schwartmann/Jaspers/Eckhardt, TTDSG, 1. edition, 2022, §~25 TTDSG, mn. 29]
The storing of information, or the gaining of access to information already stored in the terminal equipment of a user requires the user's consent on the basis of clear and comprehensive information according to §~25(1) TDDDG.
While the TDDDG does list two exceptions to that rule in §~25(2) TDDDG, neither of them is applicable in this case:
+ As set out above, the information was sent to tracking and/or advertising companies. As such, the purpose of accessing this information was expressly _not_ the transmission of a message over a public telecommunications network. The exception in §~25(2)(1) TDDDG only applies where the transmission of a message over a public telecommunications network would not be possible at all without the storing of or the access to the concerned information#footnote[Schürmann/Guttmann in Auernhammer, DSGVO/BDSG, 8. edition, 2023, §~25 TTDSG, mn. 123; Schmitz in Geppert/Schütz, Beck'scher TKG-Kommentar, 5. edition, 2023, §~25 TTDSG, mn. 66; Hanloser in Gierschmann/Baumgartner, TTDSG, 1. edition, 2023, §~25 TTDSG, mn. 94; Nolte in Säcker/Körber, TKG – TTDSG, 4. edition, 2023, §~25 TTDSG, mn. 33], and is thus not applicable here.
+ Likewise, the controller cannot claim that the access was absolutely necessary to provide a digital service expressly requested by me. The exception has to be interpreted narrowly, with tracking and advertising not being strictly necessary.#footnote[Article 29 Data Protection Working Party, WP 194, Opinion 04/2012 on Cookie Consent Exemption, https://ec.europa.eu/justice/article-29/documentation/opinion-recommendation/files/2012/wp194_en.pdf; Datenschutzkonferenz, Orientierungshilfe der Aufsichtsbehörden für Anbieter:innen von Telemedien ab dem 1. Dezember 2021 (OH Telemedien 2021), Version 1.1, 2022, https://www.datenschutzkonferenz-online.de/media/oh/20221130_OH_Telemedien_2021_Version_1_1.pdf, Section III. 3. c); Der Landesbeauftragte für Datenschutz und Informationsfreiheit Baden-Württemberg, FAQ: Cookies und Tracking durch Betreiber von Webseiten und Hersteller von Smartphone-Apps, Version 2.0.1, 2022, https://www.baden-wuerttemberg.datenschutz.de/wp-content/uploads/2022/03/FAQ-Tracking-online.pdf, Section A.1.4; Schneider in Assion, TTDSG, 2022, § 25 TTDSG, mn. 36, 44; Nolte in Säcker/Körber, TKG – TTDSG, 4. edition, 2023, §~25 TTDSG, mn. 37; Burkhardt/Reif/Schwartmann in Schwartmann/Jaspers/Eckhardt, TTDSG, 1. edition, 2022, §~25 TTDSG, mn. 127, 140; Ettig in Taeger/Gabel, DSGVO - BDSG - TTDSG, 4. edition, 2022, § 25 TTDSG, mn. 56] Thus, §~25(2)(2) TDDDG is not applicable either.
However, the controller has not obtained consent as there was no interaction with the app at all. §~25(1) TDDDG defers to the GDPR for conditions on consent. As such, the same reasoning as in @no-legal-basis applies here as well.
{% endif %}
= Requests and suggestions
{% if type === 'complaint' %}
In the previous sections, I have explained why I believe that the controller has violated my data protection rights. Therefore, I am now addressing this complaint to you.
I ask you to investigate my complaint and to examine the described issues by means of your investigative powers according to Art. 58(1) GDPR.
I also ask you to inform me about the progress and outcome of the complaint procedure according to Art. 77(2) GDPR and Art. 57(1)(f) GDPR during the course of the complaint procedure, but at the latest within three months (cf. Art. 78(2) GDPR).
I finally ask you to make use of any supervisory measures that you deem necessary to mitigate the controller's violation of my rights in line with your corrective powers as per Art. 58(2) GDPR. In doing so, please consider that the described violations in all likelihood do not just apply to me, but to all users of the app.
{% else %}
In the previous sections, I have explained why I believe that the controller has violated my data protection rights. I am therefore asking you to investigate this matter and to examine the described issues by means of your investigative powers according to Art. 58(1) GDPR. I am also asking you to make use of any supervisory measures that you deem necessary to mitigate the controller's violation of my rights in line with your corrective powers as per Art. 58(2) GDPR. In doing so, please consider that the described violations in all likelihood do not just apply to me, but to all users of the app.
While I am aware that you are not legally required to inform me about the progress and outcome of the procedure as this is not a formal complaint, I would nonetheless appreciate if you did.
{% endif %}
= Concluding remarks
{% if type === 'complaint' %}
You may share my data with the controller for the purpose of processing the complaint.
{% endif %}
If you need any more details, please feel free to contact me. You can reach me as follows: {{ complaintOptions.complainantContactDetails }}{% if complaintOptions.complainantAgreesToUnencryptedCommunication %}\
I agree to being contacted via unencrypted email.{% endif %}
Thank you in advance for your assistance.
// Appendix
#pagebreak()
#counter(heading).update(0)
#set heading(numbering: (..nums) => "A" + nums.pos().map(str).join(".") + ".")
#text(weight: 700, 1.75em)[Appendix]
{% if type === 'complaint' %}
= Results from "{% if analysis.app.platform === 'Android' %}TrackerControl{% elif analysis.app.platform === 'iOS' %}App Privacy Report{% endif %}" on my device, filtered to DNS hostnames contacted by the app <personal-hostnames>
#table(
columns: (10%, 30%, 60%),
align: (right, left, left),
[*\#*], [*Time*], [*Hostname*],
{% for entry in complaintOptions.userNetworkActivity -%}
[{{ entry.index + 1 }}], [{{ entry.timestamp | dateFormat }}], [{{ entry.hostname }}],
{% endfor %}
)
{% endif %}
= DPA guidelines regarding personal data in the context of online tracking <dpa-guidelines-id>
Several DPAs have issued guidelines or guidance notes on the use of cookies and other tracking technologies which involve the processing of IDs that are uniquely assigned to a person. These guidelines universally confirm that such IDs are personal data under the GDPR, especially when they are used or combined to create profiles of individuals or to single them out from others.
For example, the DPC Ireland explains that cookies can include personal data such as usernames or unique identifiers like user IDs and other tracking IDs. The DPC adds that where cookies contain identifiers that may be used to target a specific individual, or where information is derived from cookies and other tracking technologies that may be used to target or profile individuals, this will constitute personal data and its processing is also subject to the rules set out in the GDPR. The DPC also emphasizes that online identifiers are included in the definition of personal data in Article 4(1) of the GDPR, and that it does not matter whether the controller is in possession of other information that may be needed to identify an individual; the fact that the person may be identified, even with the addition of information held by another organisation, is sufficient to make this data personal data.#footnote[DPC Ireland, Guidance Note: Cookies and other tracking technologies, 2020, https://www.dataprotection.ie/sites/default/files/uploads/2020-04/Guidance%20note%20on%20cookies%20and%20other%20tracking%20technologies.pdf]
In an FAQ on Google Analytics, the Danish Datatilsynet also adopts a broad understanding of personal data in relation to online identifiers. It states that a unique identifier makes it possible to identify the individual to whom the data relates, even if it is not possible to assign a specific name or identity to the person concerned. It cites the GDPR's explicit mention of the "singling out" concept.#footnote[Datatilsynet, Google Analytics, https://www.datatilsynet.dk/english/google-analytics]
In its opinion on the interplay between the ePrivacy Directive and the GDPR, the EDPB mentions cookies as a clear example of processing activities which trigger the material scope of both the ePrivacy Directive and the GDPR.#footnote[EDPB, Opinion 5/2019 on the interplay between the ePrivacy Directive and the GDPR, in particular regarding the competence, tasks and powers of data protection authorities, 2019, https://edpb.europa.eu/sites/default/files/files/file1/201905_edpb_opinion_eprivacydir_gdpr_interplay_en_0.pdf]
Similarly, in its guidelines on telemedia, the German Datenschutzkonferenz states that the use of cookies and other tracking technologies often involves the processing of personal data and thus fall within the scope of both the TDDDG (the German law implementing the ePrivacy Directive) and the GDPR.#footnote[Datenschutzkonferenz, Orientierungshilfe der Aufsichtsbehörden für Anbieter:innen von Telemedien ab dem 1. Dezember 2021 (OH Telemedien 2021), Version 1.1, 2022, https://www.datenschutzkonferenz-online.de/media/oh/20221205_oh_Telemedien_2021_Version_1_1_Vorlage_104_DSK_final.pdf]
= DPA decisions regarding personal data in the context of online tracking <dpa-decisions-id>
Some DPAs have also issued decisions on specific cases involving the processing of IDs that are uniquely assigned to a person, again confirming that the processing of unique IDs in the context of online tracking falls under the scope of the GDPR.
For example, the Swedish DPA (IMY) issued a decision in June 2023, fining Tele2 Sverige AB and three other website providers for using Google Analytics despite the EU recommendations and decisions and without implementing additional safeguards.#footnote[At the same time, the IMY also issued three additional, very similar decisions, against other websites: DI-2020-11397 (https://www.imy.se/globalassets/dokument/beslut/2023/beslut-tillsyn-ga-cdon.pdf), DI-2020-11368 (https://www.imy.se/globalassets/dokument/beslut/2023/beslut-tillsyn-ga-coop.pdf), DI-2020-11370 (https://www.imy.se/globalassets/dokument/beslut/2023/beslut-tillsyn-ga-dagens-industri.pdf)] In the decision, the IMY explains that network/online identifiers can be used to identify a user, especially when combined with other similar types of information.#footnote[IMY, Beslut efter tillsyn enligt dataskyddsförordningen – Tele2 Sverige AB:s överföring av personuppgifter till tredjeland, DI-2020-11373, 2023, https://www.imy.se/globalassets/dokument/beslut/2023/beslut-tillsyn-ga-tele2.pdf, p. 10] The IMY considered the data collected by Google Analytics, such as unique identifiers stored in the cookies `_gads`, `_ga`, and `_gid`, IP addresses, and other information related to the website visit and user's browser. They highlight that these identifiers were created with the express aim of being able to distinguish individual visitors, thus making them identifiable. The IMY notes that even if the IDs alone did not make individual identifiable, the IDs in combination with the other transmitted data makes website visitors even more distinguishable. As such, they conclude that the transmitted data information constitutes personal data. The IMY explains that this differentiation is in itself sufficient to make the visitor indirectly identifiable in accordance with Recital 26 GDPR and that knowledge of the visitor's name or physical address is not required. They also do not consider it necessary that the controller or processor actually intends to identify the visitor, noting that the possibility of doing so is in itself sufficient to determine whether it is possible to identify a visitor.#footnote[ibid., p. 11]
Similarly, the Austrian DPA (DSB) issued a decision in December 2021, finding that an Austrian website violated the GDPR by transferring personal data to the US by using Google Analytics. The DSB notes that the cookies used by Google Analytics, `_ga`, `_gid`, and `cid`, contained unique identifiers that were stored on the users' devices and browsers, and that only through these identifiers was it possible for the website operator and Google to distinguish visitors as well as determine whether they had visited the website before. The DSB explains its position that such a possibility of individualizing website visitors was sufficient to open the scope of data protection law and that being able to find out the person's name was not necessary, citing Recital 26 GDPR as justification.#footnote[Österreichische Datenschutzbehörde, Teilbescheid D155.027 2021-0.586.257, 2021, https://noyb.eu/sites/default/files/2022-01/E-DSB%20-%20Google%20Analytics_DE_bk_0.pdf, p. 27–28] With regards to the controller's and Google's argument that they didn't actually intend to associate the IDs with an actual person, the DSB underlines#footnote([ibid., p. 28 (translated)]): #quote[Insofar as the defendants argue that no 'means' are used to link the identification numbers in question here to the person of the complainant, it must be reiterated that the implementation of Google Analytics on [the website] _results in_ a singling out within the meaning of Recital 26 GDPR. In other words: Those who use a tool that only enables such singling out _in the first place_, cannot take the position that they do not 'reasonably' use any means to make natural persons identifiable.]
The DSB also notes that these identifiers could combined with other information, such as browser data and IP addresses, which made the website visitors even more identifiable, referring to Recital 30 GDPR. The DSB further points out that Google Analytics was specifically designed to be implemented on as many websites as possible, in order to collect information about website visitors. They conclude that the data processed by Google Analytics constituted personal data and stress that not applying the GDPR to the processing done by Google Analytics would run afoul of the fundamental right to data protection.#footnote[ibid., p. 29]
The DSB's decision was later confirmed by the Austrian Federal Administrative Court in judgement W245 2252208-1/36E, W245 2252221-1/30E#footnote[https://www.ris.bka.gv.at/Dokumente/Bvwg/BVWGT_20230512_W245_2252208_1_00/BVWGT_20230512_W245_2252208_1_00.pdf].
In a more recent decision in March 2023, the DSB found that the use of Facebook's tracking pixel by an Austrian website provider also violated the GDPR and the ECJ's _Schrems II_ judgement. In the decision, the DSB follows the same argument as in the Google Analytics decision, quoting from it with regards to the classification of tracking data as personal data.#footnote[Österreichische Datenschutzbehörde, Bescheid D155.028 2022-0.726.643, 2023, https://noyb.eu/sites/default/files/2023-03/Bescheid%20redacted.pdf]
Again concerning Google Analytics but also Google Tag Manager, Tietosuojavaltuutetun toimisto, the Finish DPA, issued a decision in December 2022 against the public library online services of four cities in Finland. The decision mentions that personal data was collected through those tools.#footnote[Tietosuojavaltuutetun toimisto, Apulaistietosuojavaltuutetun päätös käsittelyn lainmukaisuutta, käsittelyn turvallisuutta, sisäänrakennettua ja oletusarvoista tietosuojaa, rekisteröityjen informointia ja henkilötietojen siirtoa kolmansiin maihin koskevassa asiassa, 4672/161/22, 2022, https://finlex.fi/fi/viranomaiset/tsv/2022/20221663]
The CNIL, the French DPA, issued a decision in March 2022, ordering three French websites to comply with the GDPR in relation to their use of Google Analytics. The CNIL explains that online identifiers, such as IP addresses or information stored in cookies, could be used as a means of identifying a user, especially when combined with other similar types of information, citing Recital 30 GDPR. The CNIL explains that the websites had to demonstrate the means implemented to ensure that the identifiers collected were anonymous, otherwise they could not be qualified as anonymous. They also note that the IDs used by Google Analytics were unique identifiers that were intended to differentiate between individuals and that these identifiers could also be combined with other information, such as the address of the site visited, metadata relating to the browser and operating system, the time and data relating to the visit to the website, and the IP address. The CNIL argues that this combination reinforced their distinguishing nature and made the visitors identifiable. The CNIL believes that the scope of the right to data protection would be diminished if this were decided otherwise.#footnote[CNIL, Décision n° […] du […] mettant en demeure […], 2022, https://www.cnil.fr/sites/cnil/files/atoms/files/med_google_analytics_anonymisee.pdf, p. 4]
The CNIL also sanctioned Criteo, an online advertising company, with a fine in June 2023 for failing to verify that users from whom it processed data had given their consent. The CNIL considers that Criteo processed personal data, given the number and diversity of the data collected and the fact that they were all linked to an identifier, which made it possible, with reasonable means, to re-identify the natural persons to whom this data relates. The CNIL also notes that the Criteo cookie ID was intended to distinguish each individual whose data it collected and that a large amount of information intended to enrich the user's advertising profile was associated with this identifier. The CNIL believes that even if Criteo did not directly have the identity of the person associated with a cookie ID, reidentification could be possible if Criteo also collected other data such as the email address, the IP address, or even the user agent (or hashed forms thereof). The CNIL concludes that as long as Criteo is able to re-identify individuals using reasonable means, the processed data is personal data under the GDPR.#footnote[CNIL, Délibération SAN-2023-009 du 15 juin 2023, 2023, https://www.legifrance.gouv.fr/cnil/id/CNILTEXT000047707063]
The Norwegian Datatilsynet published a draft decision in May 2021, notifying Disqus, a company that provides a platform for online comments, that it would be fined for unlawfully processing personal data for programmatic advertising. The DPA states that online identifiers, such as cookie IDs, were personal data, as they enabled the controller to distinguish one website user from another, and to monitor how each user interacts with the website, citing Art. 4(1) GDPR and Recital 30 GDPR to support its interpretation.#footnote[Datatilsynet, Advance notification of an administrative fine – Disqus Inc., 20/01801-5, 2021, https://www.datatilsynet.no/contentassets/8311c84c085b424d8d5c55dd4c9e2a4a/advance-notification-of-an-administrative-fine--disqus-inc.pdf, p. 15–16]
Finally, the DPA of Lower Saxony in Germany (LfD NDS) issued a decision in May 2023 concerning the use of a "pay or okay" system by Heise, a German tech news site. The site made users choose between paying for a monthly subscription or agreeing to their data being processed for advertising and other purposes. The LfD found that the requirements for obtaining consent were not fulfilled by Heise. In the decision, the LfD describes the high number of observed local storage objects, tracking techniques and third-party services used on the site, explaining that they will not provide a legal assessment of each one as a result. The LfD notes that Heise processed personal data through these objects, citing for example that Adform placed a `cid` cookie, which they determined to be an ID based on the name.#footnote[Die Landesbeauftrage für den Datenschutz Niedersachsen, Beschwerdeverfahren gegen Verarbeitungen personenbezogener Daten bei der Nutzung der Webseite www.heise.de, 2023, https://noyb.eu/sites/default/files/2023-07/11VerwarnungPurAboModellfinalgeschwrztp_Redacted.pdf, p. 6]
|
https://github.com/dainbow/FunctionalAnalysis2 | https://raw.githubusercontent.com/dainbow/FunctionalAnalysis2/main/themes/1.typ | typst | #import "../conf.typ": *
= Слабая сходимость в банаховом пространстве
== Изометричность вложения $E$ в $E^(**)$. Критерий слабой сходимости последовательности.
#theorem(
"<NAME>, напоминание",
)[
Пусть $E$ -- ЛНП. $M subset E$ -- линейное многообразие, $f$ -- линейный
ограниченный функционал на $M$. Тогда $exists tilde(f) in E^*$:
+ $tilde(f)|_M = f$
+ $norm(tilde(f)) = norm(f)$
]
#corollary[
Выполняются следующие утверждения:
- $forall f in E^* : space f(x) = f(y) => x = y$
- $forall f in E^* : space f(x) = 0 => x = 0$
]
#corollary[
Если $x in E$, то
#eq[
$exists f in E^* : space cases(norm(f) = 1, f(x) = norm(x))$
]
]
#corollary[
#eq[
$forall x in E : norm(x) = sup_(f in E^*, norm(f)_(E^*)=1) abs(f(x)) $
]
]
#theorem("Об изометрии")[
$E$ изометрично $E^(**)$, через отображение $pi : E -> E^(**)$, где
#align(center)[
$pi x = F_x in E^(**); quad F_x (f) = f(x)$
]
]
#proof[
Нужно доказать, что отображение $pi$ не меняет норму.
В силу приведённого выше следствия из теоремы Хана-Банаха:
#align(
center,
)[
$norm(F_x) = sup_(norm(f) = 1)abs(F_x (f)) = sup_(norm(f) = 1)abs(f(x)) = norm(x)$
]
]
#definition[
Пусть $E$ -- нормированное пространство. Говорим, что последовательность
элементов $seq(x)$ *слабо сходится* к $x$:
#align(center)[
$x_n weak x <=> forall f in E^*: f(x_n) -> f(x)$
]
]
#theorem(
"Критерий поточечной сходимости операторов. Напоминание из прошлого семестра",
)[
Пусть $E_1$ -- банахово, $E_2$ -- ЛНП. Причём $seq(A) subset cal(L)(E_1,E_2), A in cal(L)(E_1,E_2)$.
Тогда
#align(
center,
)[
$A_n attach(->, t: "поточечно") A <=> cases(
exists M : space forall n : space norm(A_n) <= M,
exists S : space [angle.l S angle.r] = E_1 : space forall s in S : space A_n s -> A s,
)$
]
]
#theorem(
"Критерий слабой сходимости",
)[
Пусть $E$ -- ЛНП. Тогда последовательность $seq(x) subset E$:
#align(
center,
)[
$x_n weak x <=> cases(
seq(norm(x)) "ограничена",
exists S : space [angle.l S angle.r] = E^* : space forall f in S : space f(x_n) -> f(x),
)$
]
]
#proof[
Перейдём к рассмотрению операторов $F_x_n,F_x in E^(**)$. Тогда слабая
сходимость $x_n weak x$ по определению является поточечной сходимостью $F_x_n (f) -> F_x (f)$.
Из условия:
- $E^(**) = cal(L)(E^*, KK)$
- Пространство $E^*$ всегда полно
- Нормы $norm(F_x_n) = norm(x_n)$ ограничены
- $exists S : space [angle.l S angle.r] = E^* : space forall f in S : space F_x_n f -> F_x f$
Эти условия позволяют нам применить упомянутый выше критерий поточечной
сходимости операторов из предыдущего семестра. А поточечная сходимость
операторов во всём пространстве соответствует $x_n weak x$.
]
#note[
В случае рефлексивного банахова пространства $E$ условие для слабой сходимости
множно ослабить. Достаточно потребовать не сходимости $f(x_n) -> f(x)$, а
существования предела $lim_(n -> oo)f(x_n)$ (тем самым, нам не нужно знать
конкретный $x$).
]
== Слабая сходимость и ограниченные операторы. Слабо ограниченные множества.
#theorem(
"Слабая сходимость и ограниченные операторы",
)[
Пусть $E_1, E_2$ -- ЛНП, $seq(x) subset E_1, x in E_1$, причём $x_n weak x$, а
также $A in cal(L)(E_1,E_2)$. Тогда есть слабая сходимость образов:
#align(center)[
$A x_n weak A x$
]
]
#proof[
По определению слабой сходимости, выполняется
#eq[
$forall f in E_1^* : space f(x_n) ->_(n -> oo) f(x)$
]
В частности, можно рассмотреть функционал $f = g circle.tiny A$ для любого $g in E_2^*$.
Тогда
#eq[
$forall g in E_2^* : space g(A x_n) ->_(n -> oo) g(A x)$
]
Это утверждение в точности совпадает с определением слабой сходимости $A x_n weak A x$.
]
#definition[
Множество $S subset.eq E$ называется *слабо ограниченным*, если
#eq[
$forall f in E^* : space f(S) "- ограниченное множество в" KK$
]
]
#proposition[
Пусть $S subset.eq E$ -- ограниченное множество. Тогда $S$ слабо ограничено.
]
#proof[
По определению, если $f in E^*$, то это линейный ограниченный функционал.
Ограниченный функционал переводит ограниченные множества в ограниченные, по
определению.
Поэтому слабая ограниченность $S$ тривиальна.
]
#theorem(
"Хана",
)[
Пусть $S subset.eq E$ -- слабо ограниченное множество. Тогда $S$ ограничено.
]
#proof[
Предположим противное, то есть $S$ неограничено. Тогда
#eq[
$exists seq(x) subset S : space forall n in NN : space norm(x_n) >= n^2$
]
Рассмотрим последовательность $y_n = x_n / n$. В силу слабой ограниченности, мы
можем сделать следующую оценку на образ $f(y_n), f in E^*$ (где $K_f$ -- константа,
ограничивающая образ $f(S)$):
#eq[
$forall f in E^* : space abs(f(y_n)) = abs(f(x_n)) / n <= K_f / n ->_(n -> oo) 0$
]
Стало быть, $y_n weak 0$. В силу критерия слабой сходимости, $norm(y_n) <= M$ -- есть
ограниченность норм. Отсюда
#eq[
$forall n in NN : space M >= norm(y_n) = norm(x_n) / n >= n^2 / n = n$
]
Противоречие.
]
== Замкнутый шар в Гильбертовом пространстве секвенциально компактен (теорема Банаха).
#definition[
Множество $S subset.eq E$ называется *слабо секвенциально компактным* (или
секвенциально слабо компактным), если из любой последовательности можно выделить
слабо сходящуюся подпоследовательность:
#eq[
$forall seq(x) subset.eq S : space exists seq(idx: k, n) subset.eq NN : space exists x in S : space x_n_k weak_(k -> oo) x$
]
]
#theorem(
"Банаха",
)[
Пусть $H$ -- гильбертово пространство. Тогда $overline(B)(0, R)$ -- слабо
секвенциально компактное множество.
]
#proof[
+ Рассмотрим любую последовательность $seq(x) subset.eq overline(B)(0, R)$. Хотим
показать, что в ней выделяется слабо сходящаяся подпоследовательность $seq(idx: k, x_n)$.
+ Рассмотрим $L = [seq(x)]$. В силу гильбертовости пространства $H$, мы можем
воспользоваться теоремой о проекции. Тогда $H = L plus.circle L^bot$.
+ Выделим такую подпоследовательность $seq(idx: k, y) subset.eq seq(x)$, что есть
сходимость для любого скалярного произведения с $x_m$:
#eq[
$forall m in NN : space exists lim_(k -> oo) (x_m, y_k)$
]
Тогда, в силу критерия слабой сходимости (смотреть замечание после него), $y_k$ будет
слабо сходящейся последовательностью в $L$.
+ Заметим, что из имеющейся сходимости следует слабая сходимость и во всём
пространстве $H$:
#eq[
$H = L plus.circle L^bot => forall h = l + l^bot : space (y_k, h) = (y_k, l) + (y_k, l^bot) = (y_k,l)$
]
А $(y_k, l)$ сходится в силу результата предыдущего пункта.
Единственная вещь, требующая пояснения -- пункт 3, выделение слабо сходящейся
последовательности. Воспользуемся диагональным методом Кантора:
+ Зафиксируем $x_m$. Тогда $(x_m, x_n) <= R^2$ и, получается, ${(x_m, x_n)}_(n = 1)^oo$ является
ограниченной последовательностью чисел. По теореме Больцано-Вейерштрасса, из неё
можно выделить сходящуюся подпоследовательность $x_n_k$.
+ Итерируемся по $m in NN$ (с началом $m = 1$ и последовательностью $x_n$) и
выделяем новую подпоследовательность из той, что была получена на предыдущем
шаге. Обозначаем их как $x_(m,n)$
+ Получили искомую последовательность $y_k = x_(k,k)$.
]
|
|
https://github.com/lemonTree42/Typster | https://raw.githubusercontent.com/lemonTree42/Typster/main/README.md | markdown | # Typster
A small typing game.
## Deployment
https://typster42.herokuapp.com
|
|
https://github.com/Lucas-Wye/tech-note | https://raw.githubusercontent.com/Lucas-Wye/tech-note/main/src/java.typ | typst | = Java
#label("java")
- Java 是由Sun Microsystems公司于1995年5月推出的高级程序设计语言。 Java可运行于多个平台,如Windows, Mac OS,及其他多种UNIX版本的系统。
== Install
#label("install")
#link("https://www.oracle.com/technetwork/java/javase/downloads/index.html")[JDK]
\
#link("https://www.jetbrains.com/idea/")[IntelliJ IDEA]
```sh
# 配置环境变量
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_144 # 这里换成自己的jdk目录
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
```
== Usage of adb(Android Debug)
#label("usage-of-adbandroid-debug")
```sh
# 卸载系统软件
adb shell
pm list package
pm uninstall -k --user 0 package_name
```
|
|
https://github.com/polarkac/MTG-Stories | https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/049%20-%20The%20Brothers'%20War/009_Chapter%205%3A%20Exodus.typ | typst | #import "@local/mtgstory:0.2.0": conf
#show: doc => conf(
"Chapter 5: Exodus",
set_name: "The Brothers' War",
story_date: datetime(day: 26, month: 10, year: 2022),
author: "<NAME>",
doc
)
#align(center)[#emph[Read the roots, tell the tale]]
#align(center)[#emph[Future forms in waving weeds]]
#align(center)[#emph[Higher than truth is hope]]
#align(center)[—#emph[Rootwater Saga]]
Before that rain-soaked morning, Nissa had spent a grand total of fifteen minutes on Dominaria—fifteen minutes of screaming at the closest friends she had. <NAME>. She'd had enough of being manipulated by Liliana and had enough of her friends blithely going along with it. #emph[I can't bear to see another plane broken before I make my own home whole] , Nissa told them. #emph[I'm sorry, but my watch is over.]
Now she was back, along with Chandra. Dominaria wasn't yet broken, but Nissa got the sense, sitting at the meeting room table across from Kaya and Saheeli, both haggard and exhausted, that the plane was careening toward its breaking point.
"Things are happening fast," said Chandra. "Sorin and Arlinn are working together to shore up Innistrad's defenses. Samut has gone into hiding with Hazoret and the population of Amonkhet. At the same time, others are answering Jace's call for help. Some guy named Tyvar arrived just before we left."
"<NAME>," said Kaya.
"Oh, you know him. Is he allergic to shirts or something?"
"Chandra, focus," said Nissa.
"Right," Chandra said. "When everything's set on Ravnica, Jace and company are coming here to rendezvous with Teferi and all of you. Then the strike teams leave for New Phyrexia while Liliana and I wait here as backup."
"How long do we have?" asked Saheeli, exchanging a troubled look with Kaya.
"Jace has it on good authority that the Mirrans are going to launch their offensive very soon," said Chandra. "It could be today or tomorrow. According to Vivien, Urabrask and the rebel Phyrexians are nearly ready as well. I don't know about anyone else, but I'm ready for some action right now."
Of course she was. Leaping before looking—that was the Chandra way.
Nissa, on the other hand, wanted to know more. She'd spent the last several months fulfilling her obligations to Zendikar. The goings-on in the wider Multiverse hadn't concerned her as much as the healing of her own plane. As of late, she'd been chasing down an ancient thresher beast unwittingly let loose by imprudent adventurers from the ruins of the Guul Draz Skyclave. She was in hot pursuit of the ravenous creature when Chandra showed up telling tales of planes Nissa had never heard of.
"What exactly are you doing on Dominaria?" Nissa asked.
"We're helping Teferi find information about how to use the sylex," said Saheeli.
"The sylex." Chandra stared into her empty cup, a grim expression on her face. "The thing that Jaya died for." <NAME>? Nissa had spent days on Ravnica with Chandra learning all she could about who and what the Phyrexians were. They'd spent time talking together, eating together. Never did Chandra mention anything about Jaya's death.
"We're close," said Kaya, "but we need more time."
"You have until Jace gets here."
Kaya clenched her jaw. "Not good enough." Kaya related the details of her time on Kaldheim, home of the World Tree that connected the plane's various realms, and of encountering a Phyrexian creature there. Then she talked of meeting with <NAME>, who'd told them about <NAME>'s secret strategy—a way to bind the planes to New Phyrexia. The conclusion wasn't hard to piece together after that. "If the Phyrexians have created their own tree, we'll need something powerful to destroy it," Kaya explained. "We have nothing without the sylex."
"Our best chance to destroy the Phyrexians is to team up with the Mirrans," Chandra insisted. "We can't pass that opportunity up."
"We are going as fast as we can," said Saheeli.
"Hold on," said Nissa. "Let's say we are able to destroy the World Tree. What happens to New Phyrexia?"
"I'm not sure," said Kaya. "If the tree is as deeply rooted as Kaldheim's, then it's not out of the question that the whole plane might go when the tree does."
Chandra had a more definitive take: "Good."
"How can you say that?" said Nissa. "The Mirrans are there fighting for their home!"
"Let's not get ahead of ourselves," said Saheeli. "We have no evidence that the sylex can detonate an entire plane. It was used on Dominaria millennia ago, and the plane still exists. We have to trust Teferi."
"I do trust him," said Chandra. "My point is that destroying the Phyrexians is the most important thing. No cost is too high."
Saheeli slid her chair away from the table and stood up. "I've already accepted that the lives of my loved ones may come at others' expense. But I will not give into bloodlust."
"I didn't~ That's not what I meant."
"Then what did you mean?" snapped Nissa. She instantly regretted how harshly that came out. Why were things always so difficult between them, no matter how much they cared for each other?
Before Chandra could answer Nissa's query, Teferi appeared in the doorway. He was gaunt, looking like a corpse as he leaned on the doorframe.
"I'm ready," he said quietly, casting a kind but weary glance over to Nissa.
Kaya adjourned the meeting. She and Saheeli accompanied Teferi away from the room, leaving Chandra and Nissa by themselves. Nissa knew Chandra well enough to know that her silence was a brace holding back her vitriol. She could guess what Chandra would say next: #emph[They didn't let me explain! They don't understand! Why can't they be sensible?]
"I didn't~" said Chandra, averting her eyes away from Nissa. "This probably makes me sound like a monster, but~ I want them all to die. All of them. Anything having to do with Phyrexians or Phyrexia. They don't deserve any mercy."
"You're not a monster," said Nissa. "But you're also not someone who revels in death."
"But I want them to suffer. They killed Jaya! Don't you understand that?"
"I do," said Nissa. "But like it or not, Ajani is one of them. Does he get thrown to the slaughter with the rest?"
"That's unfair, and you know it."
Chandra became silent. She sat at the table for a time, her hands folded on the table in front of her. Then, without so much as a murmur, she got up and left the room.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
The Phyrexian attack came in the dead of night.
Despite their dwindling numbers, the Phyrexian troops that survived Elspeth and Jodah's flanking attack pressed forward into the siege line, where they either got hung up on the barricade or funneled into pockets where equally relentless metal soldiers defending the tower tore into them. For the few that managed to cross the tower threshold, Nissa, Wrenn, and a handful of construct guardians were there to ensure they advanced no further.
"I'm losing my grip!" Nissa shouted over her shoulder. From across the room, Wrenn cast a spell, causing the end of the vine looped around the Phyrexian soldier's ankle to swell and harden until it snapped off its entire foot. The soldier toppled to the ground, allowing a clay statue to batter the Phyrexian with its club-like arms until it stopped moving. Over two dozen Phyrexians had met with similar fates in the tower hall, their bodies strewn about in various states of dismemberment. It seemed that victory for the defenders was all but assured.
"We beat them," she said, leaning on her knees. "Wrenn, we won."
Suddenly, a pillar of light scorched the sky outside the tower like a sun ascending, roaring fiercely over the sounds of battle. A moment later, a wave of steam blanketed the vale, engulfing enemy and ally alike. Nissa turned away from the heat, but Wrenn seemed unfazed; she and Seven stood in the middle of the tower's great hall, a limp Phyrexian soldier bent in half at Seven's feet.
Once the heat subsided, Nissa and Wrenn hurried out past the front courtyard, all the way up to the barricade. Phyrexian limbs dangled from still-smoldering spikes. Black, rank-smelling oil covered the metal soldiers, the ghostly golden glow of their eyes like pale will o' wisps floating in the gloom. And then the quiet—after the clang of weapons and the cacophony of screams echoing through the cavernous hallways of the tower had ceased, there was only the steady patter of rain on the dirt.
"Elspeth and Jodah," said Nissa. "I'm going to find them." She began to descend the steps, but Wrenn had Seven moved and block her path.
"Our role remains the same: to guard Teferi," said Wrenn.
"But~" But #emph[nothing] . Wrenn was right. For all anyone knew, there was no one to be found. That blast was no simple light display. Sadly, if Elspeth and Jodah were out there, they were in all likelihood consumed by the magic, their lives given to protect the tower and all inside. Now the duty of getting Teferi and the sylex to New Phyrexia rested on her and Wrenn. "Okay," she said, her head hung in mourning. "Let's regroup with the others at the workshop."
Just as they started to move, explosions again rocked the tower halls. Nissa glanced back out into the front courtyard, but nothing looked different from the moment before. The metal soldiers stood as silent sentinels over the gore-covered battlefield. Where was the noise coming from?
"Above," said Wrenn.
Above and all around. Nissa gazed at the staircase. "Let me go up and see. Wait here and make sure nothing gets through." Wrenn gave the go-ahead, and Nissa scrambled all the way up to the second floor, to a wide hangar open to the elements. Jodah had sent out the thopter fleet from this location, which was now empty save for a few thopters in disrepair.
As below, so it was above on the western flank of the tower. Calm. Still. Not so to the east, toward the paths leading to the wild fields that approached the city of Argivia. The eastern watchtowers had come to life, spraying electrostatic bolts upward into the clouds, creating a false aurora that lit up the night with ribbons of bright green. Out of the haze emerged a battalion of knights, more than a hundred strong and fully outfitted in identical white suits of armor. Above them flew what at first Nissa thought was an angel. Perhaps it had been at one time. No longer. This winged monstrosity was composed of brindled strands of blood-red muscle except for its helmet, a hulking pyramid of stripped bone resting upon its shoulders.
Watching the advancing army, Nissa could only think of the Gatewatch—the original four—facing down the Eldrazi threatening to tear Zendikar asunder. There was camaraderie there, a clear sense of doing right. A naïve sense—Nissa understood that enough now. Still, she longed for the confidence that Gideon could instill in her, the fervor that only Chandra could stoke, balanced with Jace's calm under duress. But none of them were there. Jace was on Ravnica frantically preparing. Chandra left earlier in the day to join him. And Gideon~ He wasn't coming.
#emph[But you're here] , she told herself. She took one more moment for herself and then ran back down to Wrenn. "Another wave of Phyrexians!" she cried.
"How many?"
"A whole army," she said. "If they get too close, we can't prevent them from entering the tower."
Wrenn stood tall. "Then we will stop them."
Nissa turned and led the way back out, not straight to the eastern fortifications but into the front courtyard. The best thing to fight an army was an army of your own. Luckily, she still had the semblance of one at her command.
"Arise!" Nissa screamed, recalling the control word Elspeth used to manage the mechanical army. Elspeth's plan had worked to preserve a large percentage of the defending garrison. The beetle-like metal soldiers numbered several dozen, and she counted six clay statue units still on their feet. They stomped to signal their attention and faced her. "Assemble and march!" she ordered, waving them on to follow her around the perimeter of the tower to meet the incoming force.
As before, the metal soldiers trudged in perfect time, pummeling the rain-soaked ground of the tower's greenbelt until it was a black sludge. They lined up on top of a low battlement on the eastern edge of the tower complex. Slinking through the tight spaces between soldiers, Nissa stepped up to the front of the battlement to survey the scene.
The Phyrexians had advanced close enough for Nissa to discern their ghastly armaments: blades and shields the color of bare bone, sinewy red at their edges. The angelic abomination hovered above the foot soldiers, gesticulating for what Nissa recognized as a complex protection spell. Sure enough, whenever turret fire came close to the enemy ranks, the bolts hit an invisible barrier and dissipated harmlessly.
Fortunately, elementals wouldn't be slowed down by such a barrier. Nissa reached her consciousness out to the earth and the air, inviting the spirits of the plane to inhabit bodies made of dirt and stone, wind and rain. Air currents began to stir. The earth between the armies bubbled and churned. #emph[Defend yourself, Dominaria!]
But upon sensing the presence of the nature spirits, she experienced something she never had before. They recoiled at her presence. #emph[Now is the time to show your strength! ] Nissa implored. They'd heard her—she could feel it—but her appeals went unanswered.
She looked to Wrenn. "Do you feel that? My magic~"
"Yes. The leylines are tangled. Intentionally, I believe."
The Phyrexian army loomed ever closer. There was no more time to wait. The enemy couldn't be allowed to reach the battlements—there would be no way to stop them from infiltrating the tower at that point. If nature would not heed her call, Nissa would have to march onto the battlefield with a legion of machines. But as adept as Saheeli's troops were at fighting, they were empty husks in comparison to the enemies advancing toward them. To Nissa in that moment, the Phyrexians were the crest of a wave meant to overwhelm not only the tower, but all bastions of life and hope everywhere, from Lorwyn to Innistrad to her beloved Zendikar.
With crushing force.
With hidden corruption.
With soul-destroying despair.
Nissa unsheathed the thin, tapered sword hidden in her staff and raised it into the air. "Forward!" she ordered. The mechanical soldiers, followed by lumbering clay statues, led the way down the rampart and onto the field. "Stand your ground! Defend the tower!"
#figure(image("009_Chapter 5: Exodus/01.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none)
The constructs assembled into a siege line into which the Phyrexians charged. The armies collided with sharp staccato thunderclaps. Metallic edges on both sides clanged against armor, searching for weak spots to bite, rip, and tear apart the enemy. The constructs, of course, did not feel fear, but the Phyrexians—their faces either obscured by helmets or replaced by smooth, featureless bone—did not relent, either. Worse, unlike the black-armored forces that had attacked earlier in the night, this white-armored legion showed a semblance of battle tactics. Gone were the berserker charges that left the enemy overextended. These Phyrexians were organized into squads of four or five, working together to pin down the machine warriors and attack from positions of strength.
The clay statues did not fare much better. After the first few Phyrexians lost their weapons in the statues' earthen flesh, they began to instead focus on quick jabbing attacks at the statues' weakest points—their legs. Two had already been tipped over into the mud by Phyrexians crushing the statues' feet and ankles with their heavy shields.
Wrenn tried to manage the battlefield by channeling her internal fire into a burning labyrinth of twisting, flaming corridors, splitting the Phyrexian line into vulnerable pockets for the construct warriors to charge into. But the stress of maintaining her spells while holding her ground against more and more enemies was clearly taking its toll. One Phyrexian swung its heavy blade onto the head of a construct, cutting it down and opening an avenue to attack Wrenn and Seven.
Nissa sprang forward, and sliding underneath the Phyrexian's swing, slashed her own weapon, only for it to glance off the bony plates protecting its abdomen. Back up on her feet, she narrowly dodged two more hefty swings before the Phyrexian pressed the attack. This time, she sidestepped its overhead smash and risked casting a simpler spell on the ground underneath its feet. The loose earth writhed, small plants and roots awakening to suck the Phyrexian's legs down into the muck. From there, a gang of mechanical soldiers finished it off.
Nissa once again gazed upward. The flying Phyrexian had hardly moved, content to maintain its vigil above the fighting, weaving protective spells to help its troops defend and recover from attacks. The strategy was a sound one: Grind the tower defenders down until none were left. Then take all those within the tower with ease. Even without magical support, the numbers did not favor Nissa and her allies. With it? No chance of victory. She had to take the general down.
#emph[Wrenn. ] Nissa broke out into a sprint headed straight for Wrenn, ducking underneath Seven's sweeping boughs. "Wrenn! I need your help!"
"I'm somewhat occupied currently," Wrenn said as Seven kicked a Phyrexian over. "But I'm listening."
"The leader," she said, pointing upward. "I'm going to take it down."
"Your proposal?"
"A little gift of strength from me to you. Then I can climb Seven and go from there."
A rare smile appeared on Wrenn's face. "An acceptable plan."
Nissa pressed her hands to Seven's trunk, lending the strength from her own limbs into theirs. In so doing, she tapped into the wild inferno Seven helped Wrenn contain within her body. Nissa felt her lifeforce intermingle with the flames, but instead of being overwhelmed, Nissa found renewed magical energy—a leyline all its own. She channeled that newfound power into her spell, commanding Wrenn and Seven to grow. Grow stronger. Taller. Her spell in full effect, she felt one of Seven's leafy branches embrace her as if she were no larger than a mouse in an ogre's hand.
"It will see you coming if you climb," said Wrenn. "Seven, make her fly."
In one fluid movement, the now giant-sized Seven launched Nissa skyward, hurling her with such force that the rain stung her face like pinpricks. The winged Phyrexian twisted in mid-air, its awkward movements betraying its surprise at Nissa's unorthodox attack. Though it hoisted up one of its scythe arms to slash at her, she was faster and lighter. Hooking one arm around the creature's neck, Nissa jammed her sword deep into an unarmored section on the right side of its body. The creature swung its arms wildly to shake her off, but Nissa stubbornly held on.
Unable to throw her free, the Phyrexian commander stopped flailing, extended its wings fully, and began to ascend at frightening speed. Down below, the battlefield became a frantic lather of insects crawling over each other, then dots, and then nothing as she and the Phyrexian crossed into the darkness of the storm clouds. The cold air stung her eyes, forcing them closed.
#emph[No!] She would not permit the Phyrexian leader to re-establish contact with its troops. It would threaten no more of her friends, nor would its nightmarish machinations touch one more blade of grass on Dominaria, Zendikar, or anywhere else. Nissa tightened her arm around the Phyrexian's neck. Reaching down, she pulled her sword free from its ribcage and then thrust upward, skewering the knot of cables at the base of its wing again and again and again and again, the itchy warmth of its black blood coating her hand. The Phyrexian arched its back, trembling frantically as her sword's enchantment began to take effect. With each stab, she'd implanted a seed within the Phyrexian, and now, in the frigid Dominarian night, she beckoned the seeds to bloom.
Seedlings burst forth in a symphony of ripping flesh and cracking bone. Her enemy thrashed its arms and wings in vain; the seedlings had wrapped themselves around Nissa's limbs, helping her resist any attempt to shake her off. The Phyrexian began to fall, taking Nissa with it.
All Nissa could do was hold on. Within a few moments, the battlefield came back into view, morphing from pinpoints of light, to beetles struggling against teeth, to the chaotic churn of blood and oil. With only a thought's breadth to decide, Nissa bade her seedlings to let go. As she fell, she tried to collect herself enough to planeswalk. But her thoughts splintered, stretched among the recalcitrant spirits of nature, her friends inside the tower, the gulf left when she'd departed Zendikar, and, increasingly, her own impending death.
Nissa closed her eyes and prepared for impact, only to unexpectedly feel a truss of soft leaves under her back. Seven had extended their branches to catch her. Unfortunately, this opened their flank to the enemy. Cold, cold hands reached up for Nissa from beneath and tightened their fingers around her arms, her legs, jerking her onto the ground. She struggled to reach her feet, but each time she made progress, what seemed like a thousand armored limbs dragged her back down.
#emph[Help! Help us! ] she called out—not with her voice, as her breath was being pressed out of her lungs, but with her mind. She felt herself sink into the ground, past the dirt and the roots, past the bedrock upon which the mountains rested, and still farther down into the innermost parts of the plane where she hoped to find its essence—the Worldsoul.
#emph[Why don't you answer? ] Nissa screamed.#emph[ Can you not hear us?]
Only silence followed. Nissa couldn't understand. On Zendikar, the Worldsoul was as close to her as her own breath. It communed with her. Trusted her. On Innistrad and Amonkhet, the Worldsouls were hostile; on Ravnica it was hidden; but on every plane it was at least #emph[there] . Here, on Dominaria, it was as if a rot had festered deep inside the plane. No, not a rot—a #emph[hatred] born of wounds unhealed and betrayals never rectified. The nature spirits who'd spurned her earlier made their presences known:
#emph[You are not one of Gaea's children] , they said in unison.
Gaea? Yes, that was the name the Worldsoul had chosen for itself. Nissa could sense Gaea close by, watching how she responded to the judgment of her agents who held dominion over Dominaria's untouched wilds.
#emph[There are invaders upon your plane] , Nissa implored. #emph[You must help us defeat them!]
#emph[The blighted ones have returned. We know.]
Visions invaded Nissa's mind of dozens—hundreds—of battles taking place that same night. Massive, gray-skinned warriors led by stained-glass angels battling back Phyrexian horrors boiling up from the city sewers. Elven lords bedecked in warpaint riding atop metal war machines while human mages in flight hurled spells down upon many-horned beasts. Minotaurs desperately defending their sacred stone halls from biomechanical monstrosities, aided by goblin peasants showing no fear. Was this the nadir of Dominaria, the time just before its end?
#emph[You are a meddler come to drain Gaea's strength when her children need it.]
#emph[I am a protector!] Nissa said. #emph[See for yourself!] She opened her mind fully, allowing all to see and feel Zendikar through her. Her memories replayed as if she'd been a disembodied spirit witnessing all the parts of her life. From her first encounter with the soul of Zendikar, to defeating hordes of Eldrazi, to unleashing the healing power of the Lithoform Core. #emph[If any of our homes are to be saved, it must start here! Help us, and we will end the Phyrexians—once and for all!]
#emph[You are oathbreakers . . .]
#emph[How dare you recreate our doom . . .]
#emph[The silver one promised to take the sylex away . . .]
Nissa sought an egress from the darkness but found none. #emph[Whatever promise Karn made to you doesn't matter anymore! Your enemies are upon you! ] So dark. Quiet, like a tomb. But within this void, Nissa found clarity. If this was her final night as <NAME>, she resolved to die fighting in the name of Zendikar. No—in the name of life on all planes.
#emph[If you won't lend your aid, then return me to my fate. I will do it myself.]
That was when she heard it—a faint rumble that steadily intensified into a roar that pressed upon her soul. #emph[Gaea has judged you] , the spirits proclaimed, and in that moment, she felt a force reach into her and emerge through her as a moth from a chrysalis. The mana of the plane opened to her. Nissa's arms and legs became the roots of mighty oaks. Her hair became the wind, sharp as thorns. Her body became the ground, teeming with animals, insects, and plants alike. And then her heart.
Her heart became the wrath of Gaea, a simmering anger that boiled and frothed like a choleric tide washing over the entire vale. Life energy found new receptacles in the bodies of the fallen—both mechanical fighters and mangled Phyrexians. Gaea's would-be destroyers now reassembled themselves, their bodies of steel transmuted to heartwood, oil and powerstones converted into a circulatory system through which energy-rich sap flowed. With uncanny grace, the mass of elemental warriors embarked upon their procession toward the battlefield to fight for the survival of the plane.
Nissa sensed that this was not the first time Dominaria's Worldsoul had touched Phyrexia. Becoming one with the enemy was to invite it into you, to fathom its true motivations. Nissa's questions about the Phyrexians were answered. Flashes of history showed her how they arose, their attempts to take Dominaria for their own, and their aims that ran counter to everything natural.
All Nissa could do in response was scream.
Slowly, sensation began to creep back into her awareness, first a tingling at her extremities, then all at once flaring into all-consuming agony throughout her body. Such anguish she'd never felt before. Such hatred she'd never thought possible emanating from her heart. Her eyes shot open. Only a fraction of a second seemed to have elapsed since she was pulled onto the ground, bone white appendages reaching down to seize her.
But in that moment, everything had changed.
She lunged out on instinct, willing the ground underneath her to churn and strike out at her attackers. This time, the elements immediately bent to her command as if they were extensions of her own body. Earthen tendrils burst upward, forcing away the Phyrexians crowding around her. Nissa came to her feet in time to witness Gaea's protectors pouring down the tower ramparts. They flooded the battlefield, engaging the remaining Phyrexians in a titanic crash.
In the chaos, Nissa spotted Wrenn and Seven striding toward her, sweeping Phyrexians away from their path. When they got close, Seven scooped Nissa up with a bough and held her as they ran back toward the tower's battlements.
"A dirge drifts in from the mountains," said Wrenn. "We must return to Teferi."
"I know," Nissa said. Peering between Seven's branches, she could see the elemental fighters holding the bone-clad Phyrexians at bay like an undulating wall, each fallen enemy being subsumed by Gaea's will and raised as a warrior for her cause. It was as glorious as it was terrifying. Nissa understood the sacrifice that it took, for even a Worldsoul was not infinite. In other parts of the plane, Dominaria's heroes fought against Phyrexian invaders. The presence of the spirits here meant they were not elsewhere to aid others. Thousands would not see the morning.
When they reached the battlement, it was eerily deserted. Motionless. Seven placed Nissa onto the ground, and together, she and Wrenn watched the struggle on the battlefield. Earlier, Nissa had felt it—the flow of life intermingling with the Phyrexian yearning for destruction. It was a microcosm of their fight against all Phyrexians everywhere.
"Nissa, we are not alone."
Nissa followed Wrenn's eyeline to the base of the tower. Dragging itself toward them was the Phyrexian angel, its wings clipped and spine shattered, the hilt of Nissa's sword still protruding from its back. The green seedlings had flourished into vines wrapping themselves around the general's body like a new skin. With irresistible vigor, Nissa stepped forward, her hand extended. She curled her fingers, urging the vines to tighten.
"Do your masters experience sensation through you?" she asked the Phyrexian. "Do they feel it when I squeeze? I want them to know what we are going to do to them—to all of you. Not a simple end, no." She squeezed harder. Vines coiled around the Phyrexian's neck and began to twist.
"Nissa, stop," said Wrenn. "Yours is not a song of cruelty!"
#emph[No, but it must be.] Those voices in Nissa's head. The spirits. #emph[We know this enemy, and in your heart, we see that it has already claimed those you love. They are forever lost. Victory over the blighted ones will require your hands to bear the blood of friend and foe alike.]
With those final words, the spirits departed, and with them left the rage. Nissa staggered forward a step, a gulp in her throat set free. Gaea had shown her what Phyrexians did if left unchecked—they invaded, subsumed, transformed, and then feasted. That knowledge did not go away; she'd see it in her dreams for the rest of her days. Nissa stared at the Phyrexian on the ground in front of her. No matter how broken it was, coursing through its limbs was glistening oil, a foul seed from which Phyrexia could always emerge. Perhaps the same was true for Ajani, for Karn if he'd been turned, for any others corrupted by the Phyrexians. When the time came to do what was necessary to protect the Multiverse, she would have to be decisive. She would have to be the hand that moved for those who could not.
Nissa closed her eyes and clenched her fingers tight. The vines obeyed her command.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
When Wrenn and Nissa reached Saheeli's workshop, the stone wall around the door had been torn open, pushing aside the metal door and barricade. They stepped through into the chamber. Black smoke, the kind that burned with every breath, permeated the room. Through the haze, Nissa could make out more figures than the two she was expecting, all surrounding the Temporal Anchor.
Her heart sank at the thought that Phyrexians had gotten past the defenses. Nissa summoned wind to blow the smoke away and prepared to call upon Gaea's elementals one more time to smash their enemies. But when the smoke lifted, Nissa saw that at least one of the figures was someone she knew.
"Nissa," said Nahiri, her hands raised in supplication. "Stand down."
"Why are you here?" said Nissa, maintaining the swirling winds above their heads.
"Because I asked her to be," said Jace, stepping into view. "We can't afford to turn away any allies in this fight. I hope you understand." His words were stern, but his expression was one of contrition. In the days before Nissa came to Dominaria, Jace had reached out to her to meet and talk—invitations she'd left unanswered. She knew that she couldn't let Chandra be their go-between forever. They'd have to talk their differences out eventually, but right now, there were more important matters to attend to.
Nissa dismissed the winds while stealing a glance at Nahiri to see her reaction. The kor was as stone-faced as ever. Closer to the Temporal Anchor were Saheeli and Kaya, both surveying extensive damage to the machine. Wires and circuitry spilled out of gashes in the anchor's charred metal frame, like guts from a corpse. Debris packed the middle, as if the anchor had been crushed into itself. "What happened?"
"The powerstone imploded and overloaded the anchor," said Saheeli, lifting wreckage away from the machine. "I tried to hold it together, but the strain was too much."
"And Teferi?" Jace asked. "Did he find out how to make the sylex work?"
Kaya shook her head. "He did, but some things still don't make sense. It took everything I had just to maintain contact. A mess of words and images~ I think I understand how to activate the sylex, but we should ask him directly."
"Where is he?"
"There." Kaya pointed to the stasis capsule at the center of the anchor.
Nissa, Wrenn, Nahiri, and Jace aided Saheeli and Kaya to clear a path to the stasis capsule. Once that was done, Kaya was the first to step in.
"Teferi," she said, knocking on the hollow shell. "Are you okay?" After not hearing an answer, she leaned in closer and wiped the grime away from the small porthole in the capsule's door. Cupping her hands around her face, she peered inside. "I can see him, but it's dark~ Wait—something's wrong."
"What?" said Jace, pushing his way forward. Nissa followed close behind and saw at the same time Jace did. Teferi was inside, his eyes closed, a distressed expression on his face. He looked so pale and sickly. No, that wasn't it. He was disappearing before their eyes. She and Jace reached for the door release at the same time, only for Wrenn to call out for them to stop.
"Teferi's chord is still tethered to this device," said Wrenn. "It reverberates with his song. You must not disturb it."
Jace stepped back and concentrated, reaching out his mind to Teferi's. "Wrenn is right. He's still there, but stretched, as if across distant places. Or different times."
Saheeli began to pace, speaking to no one in particular. "I could try to rebuild the anchor again. Maybe reverse the systems to draw him forward through the timestream." She stopped and looked at Jace. "How long do we have left?"
"No time," Jace said with a frown. "Kaya, without Teferi—"
"I can do it," Kaya shot back. "I'll get the sylex to work."
"We can't just leave him," Nissa protested. "The Phyrexians are all over this plane. They're going to come back here."
"The Mirran attack is almost underway," said Nahiri. "That's why we're here now—to gather you and leave for New Phyrexia."
"We can't let him die alone," said Nissa.
"Not alone," called out a voice from the doorway. Leaning against the broken doorframe was Jodah, grimacing while holding his midsection. "And not to die. If I let that happen, he'd never let me hear the end of it."
A moment later, Elspeth stepped out from behind him, and draping his arm over her shoulder, supported him as they both shambled into the room. Nissa had no idea how they'd survived that blast, but it was apparent that they'd only barely done so. Guiding Jodah to a seat at one of Saheeli's worktables, Elspeth sat him down and pressed a small flask into his hand. Then she strode to the middle of the room.
"My name is <NAME>," she said, extending her hand to Jace.
"I know." Jace took her hand, a gleam in his eye Nissa recognized. He'd felt Elspeth's mind long before she made her appearance. "<NAME>."
"You are going to New Phyrexia."
"We are. Once we're done here."
"Then I'm coming with you. You'll need someone who knows the lay of the land."
"And your companion?" said Jace, eyeing Jodah with an expression Nissa could only describe as discomfort. "I~ I can't—"
"Do you think you're the first mind-mage I've dealt with, Beleren?" Jodah said with a venom-laced smirk. "You're neither the first, nor the best. But give it a few hundred years, and maybe you'll get there." His eyes strayed to the capsule housing Teferi, the smile fading from his face. "I am Jodah, Archmage of Dominaria, and right now, my aim is helping my friend. I'll work on freeing Teferi while you lot go off to the most awful place in the Multiverse. Sound good?"
"I didn't mean to offend you."
"Don't worry about being polite," Jodah said. "Worry about being careful, for your companions' sake."
"I will remain here as well," said Wrenn. "My dealings with Teferi are not concluded."
Soon, others began to planeswalk in. Vraska in green and black armor befitting the Golgari queen; The Wanderer, elegant and fierce, accompanied by a young man with a shorn head whom she introduced as <NAME>; Tyvar, still with no shirt; and finally, a grizzled, distant man, graying at the temples, with a jaw clenched as he took in the rubble-strewn environment.
"Lukka, this is <NAME>."
"Hmm," was all Lukka said, paying her minimal attention.
"And Chandra?" Nissa asked Jace. Chandra had left Dominaria earlier in the day with a promise to return. Where was she?
"Kaladesh," Jace replied. "To visit her mother before coming back here."
Nissa nodded. To wait with Wrenn and Liliana and the others. To see if they would come back. It was understandable. Still, Nissa had hoped to see Chandra again before marching into hell, if only to settle things after their heated conversation that morning. To tell her that she had a point. To tell her that she cared. But that would have to wait, like her matters with Jace. Suspended inside a pause.
Everyone made their final preparations before leaving. Saheeli promised to convey Nissa's warmest regards to Pia and enjoy a stiff drink in Yahenni's memory. Wrenn and Jodah conferred with each other on the next steps to bring Teferi back. Kaya traced her finger across the surface of the sylex, studying its symbols, before carefully wrapping it up for the journey ahead. Elspeth introduced herself to the other Planeswalkers, informing them on what they could expect on New Phyrexia. Jace wove a spell establishing a telepathic link between all the strike team members. This way, they could locate each other, even over distance.
Nissa stood away from them all, preferring to meander among the wreckage of the Temporal Anchor. The Gatewatch had assembled once more. On Ravnica—the last time the original four members were together—they renewed their vows to the Multiverse, to each other. This time, though, was different. The quiet schisms between her and Jace, between her and Chandra, were laid bare, like wounds reopened. They wouldn't be fixed by a mere recitation of familiar phrases. But they didn't need to be.
Nissa watched all the others with her in the room, friends and strangers from multiple planes assembled just as the disparate people of Dominaria had come together, overcoming their divides and forging a united front. There was something beautiful in that. Something worthy. Something vital that Nissa had not considered. The struggle against the Phyrexians wasn't simply pushing back against the sick plans enacted by a singular megalomaniac like <NAME>, nor was it a task for Planeswalkers to undertake alone. All beings who hoped for any kind of future faced a choice: allow the Phyrexians to transform every plane into the bleak, charred wastelands Nissa witnessed through Gaea's eyes, or fight alongside others who may once have been enemies.
Honoring their differences. Forging new bonds that would prevail and endure.
Jace announced that the time had come to leave, and everyone going to New Phyrexia gathered around him. Nissa walked toward the center of the room to join them, stopping momentarily when she noticed something small skittering around amid the debris. Kneeling down, she brushed away the ash and scrap to uncover a tiny artifact bird, for sure one of Saheeli's creations. It had her meticulous craftsmanship sprinkled with a bit of playfulness. The bird hopped onto her finger, and Nissa lifted it up to take a closer look. It craned its neck, looked Nissa right in the eye, and let out a tiny metallic tone like the tinkling of morning dew dripping into a still pond.
"For the life of every plane," she whispered, "We will all keep watch."
#figure(image("009_Chapter 5: Exodus/02.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none)
== Epilogue
#strong[?????????]
Teferi woke up on a beach on a warm day. The sand was fine and close packed, damp, only just now starting to dry. He breathed into the sand, blinking as the fine grains irritated his eyes.
A small crab walked across his hand, stopped before him, and blew bubbles. It scurried away.
He felt it walk across his hand.
He felt it.
Teferi sprang to his feet, brushing sand from his body. He was no longer a spirit. He was whole, but he was not in the Temporal Anchor. He felt~
Fine. Rested. Confused, as if he had woken from a nap. He looked around, taking in the coast on which he stood.
The sea stretched out to the horizon, azure and glittering under the midday sun.
Inland, fine white sand stretched up the shore until it met green beachgrass and dunes. Old footprints showed people often walked here, though Teferi was alone right now. The low and placid coast arced away on either side of the dunes. To the left, the coast stretched for about a mile before rising into a rocky, vertical cliff. Shore trees clung to the cliff's pate, a windswept green thatch that collected mist and danced in the distance. To Teferi's right, the beach rolled along into the hazy distance.
Shore birds hovered overhead, riding the steady ocean breeze.
"Kaya," Teferi said. He frowned. He felt his voice vibrate through his throat, heard it with his ears under the soft roar of the coast wind. There was no connection; he had just spoken her name aloud.
The severity of his situation thrummed through him, carried in the sound of the rushing of his blood once more through his physical body.
If he couldn't connect to Kaya, he couldn't connect to the Temporal Anchor. If he couldn't connect to the Anchor, then he couldn't come home. Teferi could only hope that Kaya had gotten what she needed from his conversation with Urza. Did he remember feeling her presence there, or did he imagine that memory? Already he struggled to remember, already he began to forget. The river, subsuming the lake.
What had he forgotten? What did he do?
He only hoped Kaya had been able to get what they needed. If Kaya couldn't remember what he lost, then—
"No," Teferi said, speaking only to himself and the shore birds.
This was not the time to panic; this was only a problem, just another obstacle to overcome. He looked up the beach, toward the old footprints in the sand. There were people here. If there were people, there was hope.
Teferi put his back to the ocean and started walking inland.
|
|
https://github.com/duskmoon314/mdbook-typst-math | https://raw.githubusercontent.com/duskmoon314/mdbook-typst-math/main/example/src/chapter_1.md | markdown | MIT License | # mdbook-typst-math example
Here is some simple examples showing how `mdbook-typst-math` renders math blocks with
`typst`.
---
```markdown
This is an inline example $Q = rho A v + C$
```
This is an inline example $Q = rho A v + C$
---
```markdown
This is a block example
$$
Q = rho A v + C
$$
```
This is a block example
$$
Q = rho A v + C
$$
|
https://github.com/EliasRothfuss/vorlage_typst_doku-master | https://raw.githubusercontent.com/EliasRothfuss/vorlage_typst_doku-master/main/chapter/einleitung.typ | typst | = Einleitung
<Einleitung>
Folgende Stichworte können zum Aufbau der Einleitung herangezogen
werden.
- Hinführung, Begründung, Zweck und Ziel der Aufgabenstellung
- Erläuterung der Problemstellung
- Konkretisierung der zu lösenden Aufgabe
- Gegebenenfalls Formulierung einer Leitfrage oder Forschungsfrage
- Ausgangslage, geplante Vorgehensweise, Methoden zur Bearbeitung und
Zielsituation
- Zum Ende der Einleitung wird eine Kurzübersicht über die Inhalte der
Kapitel gegeben: Die Arbeit ist wie folgt gegliedert: ...
Die Einleitung wird üblicherweise auf ein bis zwei Seiten als
fortlaufender Text geschrieben. Eine weitere Untergliederung in
nummerierte Abschnitte ist nicht empfehlenswert, da dies erstens
unüblich ist, zweitens die Lesbarkeit nicht begünstigt und drittens die
Formulierung der Einleitung erschwert. Weitere Empfehlungen zum Aufbau
der Einleitung und des gesamten Dokuments sind z.~B. aus @DHBW.2021 und
@Lindenlauf.2022 zu entnehmen.
Hinweise:
- Auch in der Einleitung unbedingt zu wichtigen Hintergründen und Fakten
Zitate aufführen. Zitate bitte in der Form @Tipler.2019 oder mit
Seitenbezug @Ziegler.2017[66] oder auch mehrere Zitate
@[email protected] innerhalb einer eckigen Klammer angeben. Zur
besseren Lesbarkeit bitte immer ein Leerzeichen vor dem Zitat
einfügen.
- Bereits in der Einleitung können Abkürzungen erläutert werden.
Grundsätzlich gilt, dass bei der ersten Verwendung einer Abkürzung
diese auch erläutert wird. Zum Beispiel können das Antiblockiersystem
(ABS) oder die Fahrdynamikregelung (Electronic Stability Control, ESC)
als Abkürzungen eingeführt werden. In der Datei
#emph[pages/abkuerzungen.tex] sind alle verwendeten Abkürzungen
einzufügen. Neben dem verpflichtenden Abkürzungsverzeichnis kann auch
ein Glossar hinzugefügt werden. In dieser Vorlage können
Glossareinträge in der Datei #emph[pages/glossar.tex] eingefügt
werden. Ein gls:glossar ist jedoch nicht verpflichtend.
|
|
https://github.com/janlauber/bachelor-thesis | https://raw.githubusercontent.com/janlauber/bachelor-thesis/main/thesis_typ/acknowledgement.typ | typst | Creative Commons Zero v1.0 Universal | #let acknowledgement() = {
set page(
margin: (left: 25mm, right: 25mm, top: 25mm, bottom: 25mm),
numbering: none,
number-align: center,
)
let body-font = "New Computer Modern"
let sans-font = "New Computer Modern Sans"
set text(
font: body-font,
size: 12pt,
lang: "en"
)
set par(leading: 1em)
// --- Acknowledgements ---
align(left, text(font: sans-font, 2em, weight: 700,"Acknowledgements"))
v(15mm)
text(
"Acknowledgements
I would like to express my sincere gratitude to my thesis advisor, Prof. Dr. <NAME>, for his continuous support, insightful guidance, and invaluable feedback throughout this project. His expertise and encouragement were crucial in shaping this thesis.
I extend my thanks to my expert, <NAME>, for his thorough review and constructive feedback on the business aspects of the One-Click Deployment system. His insights were instrumental in refining the project's scope and objectives.
I am also grateful to my team at Natron Tech AG for supporting with me on this project and providing the necessary resources and environment for development and testing.
Also, I would like to thank <NAME>, the founder of Unbrkn GmbH, for his valuable feedback and suggestions, which helped me improve the project significantly and deliver the features that users need.
A special thank you goes to my family, girlfriend and friends for their unwavering support and understanding during this journey. Lastly, I would like to thank the Bern University of Applied Sciences (BUAS) for providing the resources and opportunities to pursue this research.
Bern, 13.06.2024
<NAME>
"
)
} |
https://github.com/flechonn/typst | https://raw.githubusercontent.com/flechonn/typst/main/data/suivi.typ | typst | = Fiche de suivi de projet
Groupe 5
== Semaine 1 (29/01)
Durant cette séance, nous avons principalement discuté des différentes étapes et nous avons mieux défini le cahier des charges de ce projet.
Nous avons également contacté <NAME>, qui est à l’initiative du sujet, pour obtenir des précisions.
Finalement, nous avons commencé à schématiser l’architecture de notre code.
|
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/rivet/0.1.0/src/lib.typ | typst | Apache License 2.0 | #let version = version(0,1,0)
#import "config.typ"
#import "schema.typ" |
https://github.com/crd2333/template-report | https://raw.githubusercontent.com/crd2333/template-report/master/utils.typ | typst | MIT License | // 导入本地包
#import "fonts.typ":*
#import "packages/admonition/0.3.0/lib.typ": *
#import "packages/thms/0.2.0/lib.typ": *
// 导入 preview 包
// 树、图文包裹、图标、真值表
#import "@preview/syntree:0.2.0": syntree, tree
#import "@preview/treet:0.1.1": tree-list
#import "@preview/wrap-it:0.1.0": wrap-content, wrap-top-bottom
#import "@preview/fontawesome:0.4.0": *
#import "@preview/cheq:0.2.0": checklist
#import "@preview/pinit:0.2.0": *
#import "@preview/indenta:0.0.3": fix-indent
#import "@preview/numbly:0.1.0": numbly
#import "@preview/drafting:0.2.0": *
#import "@preview/oxifmt:0.2.1": strfmt
// 假段落,deprecated
#let fake_par = context{let b=par(box()); b; v(-measure(b+b).height)}
// 中文缩进
#let indent = h(2em)
#let noindent(body) = {
set par(first-line-indent: 0em)
body
}
#let tab = indent // alias
#let notab = noindent // alias
// 封装 tree-list,使其无缩进、视为整体且支持根节点;选用这个字体使线段连续
#let tree-list = (root: "", breakable: false, body) => {
let root = if root != "" {[#root\ ]}
block(breakable: breakable)[
#noindent()[
#root
#tree-list(
marker-font: "MesloLGS NF",
marker: [├──#h(0.3em)], // modify as you like
indent: [│#h(1.5em)],
last-marker: [└──#h(0.3em)],
empty-indent: h(2.2em),
body
)
]
]
}
#let date_format(
date: (2023, 5, 14),
lang: "en",
size: "四号",
font: 字体.宋体,
) = {
if type(size) != length {size = 字号.at(size)}
set text(font: font, size: size);
if lang == "zh" {
[#date.at(0)年#date.at(1)月#date.at(2)日]
} else { // 美式日期格式,月日年
[#date.at(1).#date.at(2).#date.at(0)]
}
}
// 目录
#let toc(
depth: 4,
toc_break: true
) = {
set par(first-line-indent: 0pt)
set text(font: (字体.ntl, 字体.思源黑体), size: 字号.小四)
outline(
indent: true,
depth: depth
)
if toc_break {pagebreak()}
}
#let colors = (
gray: luma(240),
blue: rgb(29, 144, 208),
green: rgb(102, 174, 62),
red: rgb(237, 32, 84),
yellow: rgb(255, 201, 23),
purple: rgb(158, 84, 159),
)
// 双下划线
#let double-line(body) = style(styles => {
let size = measure(body, styles)
stack(
body,
v(1pt),
line(length: size.width),
v(2pt),
line(length: size.width),
)
})
// 一条水平横线
#let hline() = {
line(length: 100%)
}
// 快捷 grid
#let grid2(body1, body2) = grid(
columns: 2,
grid.cell(align: center+horizon)[#body1],
grid.cell(align: center+horizon)[#body2]
)
#let grid3(body1, body2, body3) = grid(
columns: 3,
grid.cell(align: center+horizon)[#body1],
grid.cell(align: center+horizon)[#body2],
grid.cell(align: center+horizon)[#body3]
)
// 快捷文字着色,实现了红色蓝色,黑色则为粗体,两个 * 即可
#let redt(body) = text(fill: colors.red, body) // red-text
#let bluet(body) = text(fill: colors.blue, body) // blue-text
// pinit 的公式高亮指针
#let pinit-highlight-equation-from(height: 2em, pos: bottom, fill: rgb(0, 180, 255), highlight-pins, point-pin, body) = {
pinit-highlight(..highlight-pins, dy: -0.6em, fill: rgb(..fill.components().slice(0, -1), 40))
pinit-point-from(
fill: fill, pin-dx: -0.6em, pin-dy: if pos == bottom { 0.8em } else { -0.6em }, body-dx: 0pt, body-dy: if pos == bottom { -1.7em } else { -1.6em }, offset-dx: -0.6em, offset-dy: if pos == bottom { 0.8em + height } else { -0.6em - height },
point-pin,
rect(
inset: 0.5em,
stroke: (bottom: 0.12em + fill),
{
set text(fill: fill)
body
}
)
)
}
// 对各种语言的注释启用 eval,使得可以在注释中使用斜体、粗体和数学公式等
#let comment_process = it => {
let slash_lang = ("c", "c++", "cpp", "Cpp", "typ", "typc", "rust", "rs", "js", "javascript", "ts", "typescript")
let comment-style = if it.lang in slash_lang or it.lang == none {"//"} else {"#"}
show raw.line: it => {
let body = it.body
let comment-token = if "children" in it.body.fields() {
it.body.children.position(it => {
if "child" in it.fields() {
it.child.text.starts-with(comment-style)
} else {
it.text.starts-with(comment-style)
}
})
}
if comment-token == none {return it}
it.body.children.slice(0, comment-token).join()
let matched = it.text.match(regex(comment-style + "[\s\S]*")).text
let comment = matched.match(regex("^" + comment-style + "+")) // ^//+ or ^#+
let comment_len = if comment != none {comment.end} else {0}
let e = matched.slice(comment_len).trim(at: start)
let comment-style = if comment-style == "//" {"/"} else {comment-style}
text(fill: gray.darken(15%), comment-style * comment_len)
matched.slice(comment_len, matched.len() - e.len())
// change * to be \*, other wise pointers in Cpp will be regarded as bold symbol, the same reason for "<" and ">"
let e = e.replace("*", "\*").replace("<", "\<").replace(">", "\>")
text(fill: gray.darken(15%), eval(e, mode: "markup"))
}
it
}
|
https://github.com/v411e/optimal-ovgu-thesis | https://raw.githubusercontent.com/v411e/optimal-ovgu-thesis/main/components.typ | typst | MIT License | #let body-font = "New Computer Modern"
#let sans-font = "New Computer Modern Sans"
// This numbering function cuts of the first levels of a heading
// This is useful if the structure gets too deep
// Example with max-level = 3: [1.2.3.4.5.] → [4.5.]
#let number-until-with(max-level, schema) = (..numbers) => {
// self.pos() returns the captured positional arguments as an array.
if numbers.pos().len() <= max-level {
numbering(schema, ..numbers)
} else if numbers.pos().len() > max-level {
let reduced_numbers = numbers.pos().slice(max-level)
numbering(schema + ".", ..reduced_numbers)
}
}
// Small headings style
#let small-heading() = it => [
#set text(
weight: "regular",
style: "italic"
)
#it
]
#let variable-pagebreak = (is-doublesided) => {
// New chapters should start on the right page which is odd when printed double-sided
if is-doublesided {
pagebreak(weak: true, to: "odd")
} else{
pagebreak(weak: true)
}
}
#let author-fullname = (author) => author.name + " " + author.surname |
https://github.com/Nerixyz/icu-typ | https://raw.githubusercontent.com/Nerixyz/icu-typ/main/impl.typ | typst | MIT License | #let plug = plugin("icu-datetime.wasm")
/// Creates a dictionary from a datetime or echos a dictionary passed as `dt`.
#let datetime-to-dict(dt) = {
if type(dt) == datetime {
(
year: dt.year(),
month: dt.month(),
day: dt.day(),
hour: dt.hour(),
minute: dt.minute(),
second: dt.second(),
)
} else if type(dt) == dictionary {
dt
} else {
panic("Invalid datetime specification - expected type datetime or dictionary - got " + type(dt))
}
}
/// Creates a timezone specification to pass to WASM.
///
/// `offset`: A string specifying the GMT offset (e.g. "-07", "Z", "+05", "+0500", "+05:00")
///
/// `iana`: Name of the IANA TZ identifier (e.g. "Brazil/West" - see https://www.iana.org/time-zones and https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). This is mutually exclusive with `bcp47`. This identifier will be converted to a BCP-47 ID.
/// `bcp47`: Name of the BCP-47 timezone ID (e.g. "iodga" - see https://github.com/unicode-org/cldr/blob/main/common/bcp47/timezone.xml). This is mutually exclusive with `iana`.
///
/// `local-date`: A local date to calculate the metazone-id. This is mutually exclusive with `metazone-id`. When formatting zoned-datetimes this isn't necessary.
/// `metazone-id`: A short ID of the metazone. A metazone is a collection of multiple time zones that share the same localized formatting at a particular date and time (e.g. "phil" - see https://github.com/unicode-org/cldr/blob/main/common/supplemental/metaZones.xml (bottom)).
///
/// `zone-variant`: Many metazones use different names and offsets in the summer than in the winter. In ICU4X, this is called the _zone variant_. Supports `none`, `"st"` (standard), and `"dt"` (daylight).
#let make-timezone-dict(
offset,
iana: none,
bcp47: none,
local-date: none,
metazone-id: none,
zone-variant: none,
) = {
assert(type(offset) == str or type(offset) == int)
assert(iana == none or type(iana) == str)
assert(bcp47 == none or type(bcp47) == str)
assert(not (iana != none and bcp47 != none))
assert(metazone-id == none or type(metazone-id) == str)
assert(not (metazone-id != none and local-date != none))
assert(zone-variant == none or type(zone-variant) == str or type(zone-variant) == bytes)
let tz = (
offset: offset,
)
if iana != none {
tz.insert("timezone-id", (iana: iana))
} else if bcp47 != none {
tz.insert("timezone-id", (bcp47: bcp47))
}
if metazone-id != none {
tz.insert("metazone", (id: bytes(metazone-id)))
} else if local-date != none {
let dt = datetime-to-dict(local-date)
assert(
type(dt.year) == int and
type(dt.month) == int and
type(dt.day) == int
)
if dt.at("hour", default: none) == none {
dt.hour = 0
}
if dt.at("minute", default: none) == none {
dt.minute = 0
}
if dt.at("second", default: none) == none {
dt.second = 0
}
tz.insert("metazone", (local-date: dt))
}
if zone-variant != none {
tz.insert("zone-variant", if type(zone-variant) == str {
bytes(zone-variant)
} else { zone-variant })
}
tz
}
/// Formats a date in some `locale`. Dates are assumed to be ISO dates.
///
/// `dt`: The date to format. This can be a `datetime` or a dictionary with `year`, `month`, `day`.
/// `locale`: A Unicode Locale Identifier (see https://unicode.org/reports/tr35/tr35.html#Unicode_locale_identifier).
/// `length`: The length of the formatted date ("full", "long" (default), "medium", "short", or `none`).
#let fmt-date(
dt,
locale: "en",
length: "full"
) = {
assert(type(locale) == str)
let opts = (locale: locale, length: length)
let dt = datetime-to-dict(dt)
assert(
type(dt.year) == int and
type(dt.month) == int and
type(dt.day) == int
)
str(plug.format_date(cbor.encode(dt), cbor.encode(opts)))
}
/// Formats a time in some `locale`.
///
/// `dt`: The time to format. This can be a `datetime` or a dictionary with `hour`, `minute`, `second`, and (optionally) `nanosecond`.
/// `locale`: A Unicode Locale Identifier (see https://unicode.org/reports/tr35/tr35.html#Unicode_locale_identifier).
/// `length`: The length of the formatted time ("medium", "short" (default), or `none`).
#let fmt-time(
dt,
locale: "en",
length: "short"
) = {
assert(type(locale) == str)
let opts = (locale: locale, length: length)
let dt = datetime-to-dict(dt)
assert(
type(dt.hour) == int and
type(dt.minute) == int and
type(dt.second) == int
)
str(plug.format_time(cbor.encode(dt), cbor.encode(opts)))
}
/// Formats a date and time in some `locale`. Dates are assumed to be ISO dates.
///
/// `dt`: The date and time to format. This can be a `datetime` or a dictionary with `year`, `month`, `day`, `hour`, `minute`, `second`, and (optionally) `nanosecond`.
/// `locale`: A Unicode Locale Identifier (see https://unicode.org/reports/tr35/tr35.html#Unicode_locale_identifier).
/// `date-length`: The length of the formatted date part ("full", "long" (default), "medium", "short", or `none`).
/// `time-length`: The length of the formatted time part ("medium", "short" (default), or `none`).
#let fmt-datetime(
dt,
locale: "en",
date-length: "long",
time-length: "short"
) = {
assert(type(locale) == str)
assert(type(date-length) == str)
assert(type(time-length) == str)
let opts = (
locale: locale,
date: date-length,
time: time-length
)
let dt = datetime-to-dict(dt)
assert(
type(dt.year) == int and
type(dt.month) == int and
type(dt.day) == int and
type(dt.hour) == int and
type(dt.minute) == int and
type(dt.second) == int
)
str(plug.format_datetime(cbor.encode(dt), cbor.encode(opts)))
}
/// Formats a timezone in some `locale`.
///
/// `offset`: A string specifying the GMT offset (e.g. "-07", "Z", "+05", "+0500", "+05:00"). (required)
///
/// `iana`: Name of the IANA TZ identifier (e.g. "Brazil/West" - see https://www.iana.org/time-zones and https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). This is mutually exclusive with `bcp47`. This identifier will be converted to a BCP-47 ID.
/// `bcp47`: Name of the BCP-47 timezone ID (e.g. "iodga" - see https://github.com/unicode-org/cldr/blob/main/common/bcp47/timezone.xml). This is mutually exclusive with `iana`.
///
/// `local-date`: A local date to calculate the metazone-id. This is mutually exclusive with `metazone-id`. When formatting zoned-datetimes this isn't necessary.
/// `metazone-id`: A short ID of the metazone. A metazone is a collection of multiple time zones that share the same localized formatting at a particular date and time (e.g. "phil" - see https://github.com/unicode-org/cldr/blob/main/common/supplemental/metaZones.xml (bottom)).
///
/// `zone-variant`: Many metazones use different names and offsets in the summer than in the winter. In ICU4X, this is called the _zone variant_. Supports `none`, `"st"` (standard), and `"dt"` (daylight).
///
/// `locale`: A Unicode Locale Identifier (see https://unicode.org/reports/tr35/tr35.html#Unicode_locale_identifier)
/// `fallback`: The timezone format fallback. Either `"LocalizedGmt"` or a dictionary for an ISO 8601 fallback (e.g. `(iso8601: (format: "basic", minutes: "required", seconds: "never"))`).
/// `format`: The format to display a time zone as (see https://unicode.org/reports/tr35/tr35-dates.html#time-zone-format-terminology). Valid options are:
/// `generic-location-format` (e.g. "Los Angeles Time")
/// `generic-non-location-long` (e.g. "Pacific Time")
/// `generic-non-location-short` (e.g. "PT")
/// `localized-gmt-format` (e.g. "GMT-07:00")
/// `specific-non-location-long` (e.g. "Pacific Standard Time")
/// `specific-non-location-short` (e.g. "PDT")
/// `iso8601`: A dictionary of ISO 8601 options `(iso8601: (format: "utc-basic", minutes: "optional", seconds: "optional"))` (e.g. "-07:00")
#let fmt-timezone(
offset: none,
iana: none,
bcp47: none,
local-date: none,
metazone-id: none,
zone-variant: none,
locale: "en",
fallback: "localized-gmt",
format: none
) = {
assert(format == none or type(format) == str or type(format) == dictionary)
assert(type(locale) == str)
assert(type(offset) == str or type(offset) == int)
let tz = make-timezone-dict(
offset,
iana: iana,
bcp47: bcp47,
local-date: local-date,
metazone-id: metazone-id,
zone-variant: zone-variant
)
let opts = (
locale: locale,
fallback: fallback,
format: format,
)
str(plug.format_timezone(cbor.encode(tz), cbor.encode(opts)))
}
/// Formats a date and a time in a timezone. Dates are assumed to be ISO dates.
///
/// `dt`: The date and time to format. This can be a `datetime` or a dictionary with `year`, `month`, `day`, `hour`, `minute`, `second`, and (optionally) `nanosecond`.
/// `zone`: The timezone. A dictionary with `offset`, `iana`, `bcp47`, `metazone-id`, and `zone-variant`. The options correspond to the arguments for `fmt-timezone`. Only `offset` is mandatory - the other fields provide supplemental information for named timezones.
/// `locale`: A Unicode Locale Identifier (see https://unicode.org/reports/tr35/tr35.html#Unicode_locale_identifier)
/// `fallback`: The timezone format fallback. Either `"LocalizedGmt"` or a dictionary for an ISO 8601 fallback (e.g. `(iso8601: (format: "basic", minutes: "required", seconds: "never"))`).
/// `date-length`: The length of the formatted date part ("full", "long" (default), "medium", "short", or `none`).
/// `time-length`: The length of the formatted time part ("full", "long" (default), "medium", "short", or `none`).
#let fmt-zoned-datetime(
dt,
zone,
locale: "en",
fallback: "localized-gmt",
date-length: "long",
time-length: "long"
) = {
assert(type(zone) == dictionary)
assert(type(locale) == str)
assert(date-length == none or type(date-length) == str)
assert(time-length == none or type(time-length) == str)
let dt = datetime-to-dict(dt)
let tz = make-timezone-dict(
zone.offset,
iana: zone.at("iana", default: none),
bcp47: zone.at("bcp47", default: none),
local-date: none,
metazone-id: zone.at("metazone-id", default: none),
zone-variant: zone.at("zone-variant", default: none),
)
let spec = (
datetime: dt,
timezone: tz,
)
let opts = (
locale: locale,
fallback: fallback,
date: date-length,
time: time-length,
)
str(plug.format_zoned_datetime(cbor.encode(spec), cbor.encode(opts)))
}
/// Gets information about ICU4X' understanding of the `locale`
///
/// `locale`: A Unicode Locale Identifier (see https://unicode.org/reports/tr35/tr35.html#Unicode_locale_identifier)
#let locale-info(locale) = {
assert(type(locale) == str)
cbor.decode(plug.locale_info(bytes(locale)))
}
|
https://github.com/justmejulian/typst-documentation-template | https://raw.githubusercontent.com/justmejulian/typst-documentation-template/main/theme/abstract.typ | typst | #import "constant.typ": body-font, sans-font
#let abstract(body) = {
set page(
margin: (left: 30mm, right: 30mm, top: 40mm, bottom: 40mm),
numbering: none,
number-align: center,
)
set text(
font: body-font,
size: 12pt,
lang: "en"
)
set par(
leading: 1em,
justify: true
)
// --- Abstract ---
v(1fr)
align(center, text(font: body-font, 1em, weight: "semibold", "Abstract"))
body
v(1fr)
}
|
|
https://github.com/MLAkainu/Network-Comuter-Report | https://raw.githubusercontent.com/MLAkainu/Network-Comuter-Report/main/contents/02_yeu_cau/index.typ | typst | Apache License 2.0 | = Phân tích yêu cầu
== Functional requirements
Xây dựng một ứng dụng chia sẻ file đơn giản với giao thức được định nghĩa sẵn, sử dụng những giao thức trong TCP/IP stack.
=== Client Functions
#block()[
*Basic functions*
#block(inset:(left:1cm))[
*Đăng ký trong kho lưu trữ*
#linebreak()
- Máy khách có thể gửi yêu cầu đăng ký file có trong kho lưu trữ cho máy chủ.
- Thông điệp đắng ký file: "publish <lname> <fname>". File <lname> trên máy khách sẽ được thêm vào kho lưu trữ dưới tên <fname>.
- Các file sau khi đăng ký sẽ được lưu trữ trong kho lưu trữ của tài khoản được liên kết với máy chủ.
*Gửi yêu cầu tải file cho server*
#linebreak()
- Máy khách có thể gửi yêu cầu tải file không có sẵn trong kho lưu trữ của mình. Lúc này máy chủ sẽ phản hồi lại danh sách các máy khách khác có file được yêu cầu.
*Tải file trực tiếp từ nguồn muốn chọn*
#linebreak()
- Máy khách sau khi nhận được phản hồi từ máy chủ danh sách máy khách có sẵn file được yêu cầu có thể chọn một nguồn thích hợp và gửi yêu cầu tải file tới đó.
- Các máy khách được cung cấp một danh sách yêu cầu tải file từ các máy khách khác, máy khách có thể chọn 1 file trong danh sách và gửi yêu cầu tải file tới máy khách đó.
- Thông điệp tải file: "fetch <fname>". Trong đó fname là 1 trong những tên file muốn chọn sau khi server đã phản hồi.
]
*Extended functions*
#block(inset:(left:1cm))[
*Đăng ký tài khoản*
- Người dùng đăng ký địa chỉ của máy vào hệ thống của máy chủ.
* Đăng nhập tài khoản và xác thực*
- Người dùng đăng nhập tài khoản để sử dụng các chức năng của hệ thống.
*Liệt kê danh sách lưu trữ*
- Máy khách có thể kiểm tra danh sach các file có trong kho lưu trữ của mình.
*Tìm kiếm bằng từ khóa*
- Server sẽ hỗ trợ người dùng tìm kiếm file theo từ khóa.
]
]
=== Server Functions
#block()[
*Basic functions*
#block(inset:(left:1cm))[
* Kiểm tra trạng thái máy chủ*
#linebreak()
- Máy chủ có thể kiểm tra trạng thái của máy chủ khác thông qua lệnh "ping \<hostname\>"
*Xem danh sách file của máy khách khác*
#linebreak()
- Máy chủ có thể xem danh sách file trong kho lưu trữ của các máy khách thông qua lệnh "discover \<hostname\>"
*Gửi thông tin cần thiết sau khi nhận yêu cầu tải file từ clients*
#linebreak()
- Sau khi nhận được yêu cầu tìm file từ người dùng, server sẽ tiến hành theo dõi và tìm kiếm để trả về các thông tin nơi đang lưu trữ các file đó cho clients: ID peer, thời gian file được cập nhật.
]
*Extended functions*
#block(inset:(left:1cm))[
*Xem file log*
- Máy chủ có thể xem file log của máy khách khác thông qua.
]
]
== Non-functional requirements
#block()[
*Giao diện người dùng*
– Cung cấp giao diện người dùng dễ sử dụng cho máy khách để nhập các lệnh và theo dõi quá trình tải tệp.
*Multi-threading*
– Triển khai đa luồng trong máy khách để có thể xử lý nhiều tải xuống cùng lúc.
*Hiệu năng và tích hợp*
– Đảm bảo rằng hệ thống hoạt động hiệu quả và có khả năng tích hợp với các mạng internet và hệ thống người dùng khác nhau.
]
== Phân tích kiến trúc
=== Kiến trúc Peer-to-Peer (P2P)
- Kiến trúc Peer-to-Peer (P2P) là một mô hình mạng máy tính trong đó các máy tính (được gọi là nút hoặc "peers") kết nối trực tiếp với nhau để chia sẻ tài nguyên và thông tin mà không cần sự tương tác trung tâm từ máy chủ. Trong kiến trúc P2P, mỗi máy tính có thể đồng thời hoạt động như máy khách và máy chủ, có nghĩa là chúng có khả năng yêu cầu tài nguyên từ các máy tính khác và chia sẻ tài nguyên với người khác.
=== Kiến trúc client-server
- Kiến trúc client-server (còn được gọi là mô hình client-server) là một kiến trúc máy tính phổ biến được sử dụng trong việc tổ chức và quản lý các dịch vụ và tài nguyên trên mạng. Nó dựa trên sự phân chia các vai trò chính trong hệ thống thành hai phần: máy khách (client) và máy chủ (server). Hai phần này tương tác với nhau để cung cấp các dịch vụ, ứng dụng, và tài nguyên cho người dùng.
#pagebreak()
|
https://github.com/jgm/typst-hs | https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/math/frac-03.typ | typst | Other | // Test binomial.
$ binom(circle, square) $
|
https://github.com/liamaxelrod/Resume | https://raw.githubusercontent.com/liamaxelrod/Resume/main/resume%201/resume.typ | typst | #let data = yaml("data.yml")
#let template(body) = {
set list(indent: 1em)
show list: set text(size: 0.92em)
show link: underline
show link: set underline(offset: 3pt)
set page(
paper: "us-letter",
margin: (x: 0.5in, y: 0.5in)
)
set text(
size: 11pt,
font: "New Computer Modern",
)
body
}
#let name_header(name) = {
set text(size: 2.25em)
[*#name*]
}
#let header(
name: "<NAME>",
phone: "072-406 20 29",
email: "<EMAIL>",
linkedin: "none",
site: "github.com/liamaxelrod",
) = {
align(center,
block[
#name_header(name) \
#phone |
#link("mailto:" + email)[#email] |
#link("https://" + linkedin)[#linkedin] |
#link("https://" + site)[#site]
]
)
v(5pt)
}
#let resume_heading(txt) = {
show heading: set text(size: 0.92em, weight: "regular")
block[
= #smallcaps(txt)
#v(-4pt)
#line(length: 100%, stroke: 1pt + black)
]
}
#let edu_item(
name: "Sample University",
degree: "B.S in Bullshit",
location: "Foo, BA",
date: "Aug. 1600 - May 1750"
) = {
set block(above: 0.7em, below: 1em)
pad(left: 1em, right: 0.5em, grid(
columns: (3fr, 1fr),
align(left)[
*#name* \
_#degree _
],
align(right)[
#location \
_#date _
]
))
}
#let exp_item(
name: "<NAME>",
role: "Worker",
date: "June 1837 - May 1845",
location: "Foo, BA",
..points
) = {
set block(above: 0.7em, below: 1em)
pad(left: 1em, right: 0.5em, {
table(
columns: (1fr, 2fr),
align: (left, right),
inset: 0em,
stroke: none,
stack(spacing: 0.75em,
strong(role),
text(style: "italic", name),
),
stack(spacing: 0.75em,
date,
text(style: "italic", location),
),
)
v(0.5em)
list(..points)
})
}
#let project_item(
name: "<NAME>",
skills: "Programming Language 1, Database3",
date: "May 1234 - June 4321",
..points
) = {
set block(above: 0.7em, below: 1em)
pad(left: 1em, right: 0.5em, box[
*#name* | _#text(size: 0.75em, skills) _ #h(1fr) #date
#v(0.25em)
#list(..points)
])
}
#let skill_item(
category: "Skills",
skills: "Balling, Yoga, Valorant",
) = {
set block(above: 0.7em)
set text(size: 0.91em)
pad(left: 1em, right: 0.5em, block[*#category*: #skills])
}
#let personal(d) = {
header(
name: d.name,
phone: d.phone,
email: d.email,
linkedin: d.linkedin,
site: d.site
)
}
#let education(d) = {
resume_heading[Education]
for edu in d {
edu_item(
name: edu.name,
degree: edu.degree,
location: edu.location,
date: edu.date,
)
}
}
#let experience(d) = {
resume_heading[Experience]
for exp in d {
exp_item(
role: exp.role,
name: exp.name,
location: exp.location,
date: exp.date,
.. exp.points
)
}
}
#let projects(d) = {
resume_heading[Projects]
for proj in d {
project_item(
name: proj.name,
skills: proj.skills,
date: proj.date,
..proj.points
)
}
}
#let skills(d) = {
resume_heading[Technical Skills]
for skill in d {
skill_item(
category: skill.category,
skills: skill.skills
)
}
}
#let resume(data) = {
show: template
personal(data.personal)
education(data.education)
experience(data.experience)
projects(data.projects)
skills(data.skills)
}
#resume(data)
|
|
https://github.com/ist199211-ist199311/continuous-ifc-devops | https://raw.githubusercontent.com/ist199211-ist199311/continuous-ifc-devops/master/presentation.typ | typst | #import "@preview/polylux:0.3.1": *
#import "./go-theme.typ": *
// compile .pdfpc wth `polylux2pdfpc {fname}.typ`
// then present with, e.g., `pdfpc --windowed both {fname}.pdf`
// uncomment to get a "submittable" PDF
// #enable-handout-mode(true)
#let kthblue = rgb("#000060")
#show: clean-theme.with(
short-title: [*DD2482 DevOps |* Continuous Information Flow Control],
color: kthblue,
logo: image("assets/KTH_logo_RGB_bla.svg"),
)
#pdfpc.config(duration-minutes: 7)
// consistent formatting + make typstfmt play nice
#let notes(
speaker: "???",
..bullets,
) = pdfpc.speaker-note("## " + speaker + "\n\n" + bullets.pos().map(x => "- " + x).join("\n"))
// #show link: it => underline(stroke: 1pt + kthblue, text(fill: kthblue, it))
#let focus = it => text(kthblue, strong(it))
#let cover = title-slide(
title: [Continuous Information Flow Control],
subtitle: [
*DD2482 Automated Software Testing & DevOps*
#smallcaps[KTH Royal Institute of Technology]
#text(go-yellow)[*Wednesday, October 2#super[nd], 2024*]
#notes(
speaker: "Diogo",
"Introduce group members",
"Topic very relevant in DevSecOps",
)
],
authors: (
[*<NAME>*\
#link("mailto:<EMAIL>")],
[*<NAME>*\
#link("mailto:<EMAIL>")],
),
)
#cover
#outline-slide(title: "Outline")[
#side-by-side(columns: (1.5fr, 1fr))[
#show link: it => [*#it*]
#utils.polylux-outline()
][
#set image(height: 60%)
#scale(x: -100%, image("assets/gopher-toc.svg"))
]
#notes(speaker: "Diogo", "Really fast")
]
#new-section-slide("Information Flow Control")
#slide(title: "The Problem")[
```go
state := { nOptions: 3, timeout: 400, /* ... */ }
func handleX(param int, state State) Response;
func handleY(name string, state State) Response;
```
#pause
#line(length: 50%, stroke: go-fuchsia)
```go
client <- state
```
#pause
#line(length: 50%, stroke: go-fuchsia)
```go
state := { nOptions: 3, /* ... */, s3Key: "<KEY>..." }
```
#notes(speaker: "Raf", "Toy example", "10 years later")
]
#slide(title: "What is IFC?")[
- Security technique to uphold invariants
- Ensure data transfers don't violate some security policy
- Usually, focus on *confidentiality*
- *Noninterference:* public outputs only depend on public inputs
- Static analysis >> dynamic monitoring
#notes(
speaker: "Raf",
"Usually, purpose is to detect and prevent secrets from being exfiltrated into untrusted contexts",
"Public here means anything observable by an attacker",
"Static incurs no costs on runtime performance",
)
]
#new-section-slide("Example Implementation: Glowy")
#slide(title: "Glowy")[
- Static analyzer employing IFC techniques to assess Go programs
- Written in Rust #box(image("assets/rustacean-flat-happy.svg", height: 1em), baseline: 7pt) from scratch, including (spec-compliant) Go lexer/parser
- Information categorized with *labels*
- e.g., ${"high"}$ or ${"nuclear", "pentagon", "navy"}$
- Accumulate over time
#place(
bottom + right,
dy: 60pt,
image("./assets/gopher-idea.svg", height: 70%),
)
#notes(
speaker: "Diogo",
"Static analyzer written in Rust that assesses Go code for information flow violations",
"In Glowy, information is categorized with labels",
)
]
#slide(title: "Tracking Lifetime & Code Annotations")[
#set text(0.9em)
#side-by-side[
- *Sources:* artificial points of origin
#raw(
lang: "go",
"// glowy::label::{secret}\nconst hmacSecret = 0x4D757342",
)
#pause
- *Sinks:* end-state for information
#raw(lang: "go", "// glowy::sink::{}\nfmt.Println(output)")
*Insecure flow if $ell_E lt.eq.not ell_S$*
#pause
][
- *Declassification:* always explicit
#{
set block(stroke: ("left": 4pt + red), inset: ("left": 1em, "y": 5pt))
raw(
lang: "go",
"// glowy::label::{alice}\nvar a int = 3\n// glowy::label::{bob}\nb := 4 * a // {alice, bob}",
block: true,
)
}
#{
set block(stroke: ("left": 4pt + blue), inset: ("left": 1em, "y": 5pt))
raw(
lang: "go",
"// glowy::declassify::{}\nhash := sha256(secret)",
block: true,
)
}
]
#notes(
speaker: "Diogo",
"How do we assign labels to variables?",
"We then define sinks, telling Glowy that only data with at most this label can flow...",
"For declassification, Glowy mandated explicit annotations",
"Creates very identifiable points in the code that need to be looked at very carefully",
)
]
#slide(title: "Taint Analysis")[
#set text(0.9em)
#side-by-side[
- *Explicit Flows*
#raw(
lang: "go",
"// glowy::label::{alice}\na := 3\n// glowy::label::{bob}\nb := 7\n\na += 9 + 2 * b\n// ^ final label {alice, bob}",
)
#pause
][
- *Implicit Flows*
#raw(
lang: "go",
"// glowy::label::{charlie}\nc := 98\n\nout := true // label {}\nif c % 10 == 0 {\n\tout = false\n\t// ^ new label {charlie}\n}",
)
]
#notes(speaker: "Raf")
]
#slide(title: "Example Output")[
#pdfpc.hidden-slide
#grid(
columns: (auto, auto),
column-gutter: 1em,
[
#set text(size: 15pt)
#raw(lang: "go", read("assets/opaque.go"))
],
image("assets/opaque.png", height: 85%),
)
#notes(speaker: "Diogo", "Read output bottom-up")
]
#focus-slide(background: go-fuchsia)[
= Biggest drawback?
#pause
_Maintaining all those damn labels!_
#pause
#set align(end)
#set text(fill: yellow)
#smallcaps[_*Solution?*_]
#notes(speaker: "Raf")
]
#new-section-slide("Continuous IFC")
#slide(title: "Continuous IFC")[
- Each commit, worry only about _that_ commit's span
- Each commit, *enforce* that invariant is held
- Each commit, fix security vulnerabilities before they're ever a problem
#v(1fr)
#set text(fill: kthblue)
*Integrate IFC into CI pipeline!*
#v(1fr)
#place(
bottom + right,
dx: -100pt,
dy: 40pt,
image("./assets/gopher-rocket.svg", height: 65%),
)
#notes(speaker: "Raf")
]
#slide(title: "Continuous Enforcement")[
- GitHub workflow: require check in PR before merging
#only(1, image("assets/pr.png"))
#pause
- Git pre-commit hook: local enforcement at commit level
#only(2, image("assets/hook.png"))
#pause
- IDE integration: real-time linting with immediate feedback
#only(3, image("assets/ide.png"))
#notes(
speaker: "Diogo",
"Glowy is written in Rust and has very good performance (fraction of a second), so it won't affect your productivity",
)
]
#new-section-slide("Conclusion")
#slide(title: "Take-Home Message")[
#set align(center)
"Continuous IFC: low-effort security assurances"
#image("assets/infinity.png", height: 65%)
#place(
bottom,
dx: 280pt,
polygon.regular(
fill: go-fuchsia,
size: 30pt,
vertices: 3,
),
)
#v(1fr)
#set text(size: .7em, fill: gray)
#set align(end)
Image source: Octopus Deploy
#notes(speaker: "Diogo", "Our topic is at the heart of DevSecOps")
]
#cover
|
|
https://github.com/RhenzoHideki/com1 | https://raw.githubusercontent.com/RhenzoHideki/com1/main/Relatorio-01/Relatorio-01.typ | typst | #import "../typst-ifsc/templates/article.typ": article
#show: doc => article(
title: "Laboratorio 01",
subtitle: " Sistemas de comunicação I (COM029007)",
// Se apenas um autor colocar , no final para indicar que é um array
authors:("<NAME>",),
date: "17 de março de 2024",
doc,
)
= Introdução
Este labotatório tem como objetivo revisar os conceitos de sinais de espectro. Tem-se como objetivo de entender e analisar os sinais nos dominios do tempo e frequência.
Nos exercicios apresentados foram apresentados ideias de composição e manipulação de sinais , mudança de dominios do tempo e da frequência, e a utilização de filtros ideais e reais para a recuperação dos sinais originais.
= Desenvolvimento
== Conceitos teóricos utilizados no relatório
A utilização de conceitos básicos de sinais e sistemas, utilizando sistmeas lineares e invariantes no tempo. A analise de sinais tanto no dominio do tempo quanto na frequencia e as suas devidas manipulações.
A aplicação da Transformada de Fourier permite a análise de sinais no domínio da frequência, decompondo um sinal em suas componentes de frequência e possibilitando a compreensão da distribuição espectral do sinal.
A autocorrelação desempenha um papel na análise ao identificar padrões temporais e calcular a similaridade entre diferentes partes do sinal.
Os filtros são utilizados para observar características e aplicações dos sinais, modificando suas características, atenuando certas frequências ou realçando outras.
== Exercicio 01
Comando da questão:
+ Gerar um sinal s(t) composto pela somatória de 3 senos com amplitudes de 6V, 2V e 4V e frequências de 1, 3 e 5 kHz, respectivamente.
+ Plotar em uma figura os três cossenos e o sinal 's ' no domínio do tempo e da frequência.
+ Utilizando a função 'norm', determine a potência média do sinal 's'.
+ Utilizando a função 'pwelch', plote a Densidade Espectral de Potência do sinal 's'.
#pagebreak()
=== Resultados Exercicio 01
#figure(
image("./Figuras/E1/DomTemp.svg",width:130%),
caption: [
Sinais gerados no dominio do tempo \ Fonte: Elaborada pelo autor
],
supplement: "Figura"
);
Na Figura 1 são apresentados os 4 gráficos que foram pedidos pela questão. Estes estão sendo apresentados no dominio do tempo.
Os graficos são cossenos de 6V , 2V e 4V e frequências de 1, 3 e 5 kHz , respectivamente, além do sinal $s(t)$ que foi gerado a partir da soma dos 3 cossenos anteriores
#figure(
image("./Figuras/E1/DomFreq.svg",width:130%),
caption: [
Sinais gerados no dominio da frequência \ Fonte: Elaborada pelo autor
],
supplement: "Figura"
);
Na Figura 2 são apresentados os 4 sinais anteriores da Figura 1 , porém agora foram apresentados no dominio da frequência. É possível ver de forma mais clara que o 4 sinal ($s(t)$) é o resultado da soma dos outros 3 sinais ,apenas analizando as componentes da frequencia.
#figure(
image("./Figuras/E1/pwelch.svg",width:90%),
caption: [
Sinais gerados com a função pwelch \ Fonte: Elaborada pelo autor
],
supplement: "Figura"
);
A Figura 3 mostra o resultado da função pwelch, esta que retorna a densidade espectral de potência do sinal. Assim mostrando onde está a distribuição de energia do sinais nas frequência.
#pagebreak()
== Exercicio 02
+ Gerar um sinal s(t) composto pela somatória de 3 senos com amplitudes de 5V, 5/3V e 1V e frequências de 1, 3 e 5 kHz, respectivamente.
+ Plotar em uma figura os três cossenos e o sinal 's ' no domínio do tempo e da frequência
+ Gerar 3 filtros ideais:
+ Passa baixa (frequência de corte em 2kHz)
+ Passa alta (banda de passagem acima de 4kHz)
+ Passa faixa (banda de passagem entre 2 e 4kHz)
+ Plotar em uma figura a resposta em frequência dos 3 filtros
+ Passar o sinal s(t) através dos 3 filtros e plotar as saídas, no domínio do tempo e da frequência, para os 3 casos
#pagebreak()
=== Resultados Exercicio 02
#figure(
image("./Figuras/E2/DomTemp.svg",width:130%),
caption: [
Sinais gerados no dominio do tempo \ Fonte: Elaborada pelo autor
],
supplement: "Figura"
);
Na Figura 4 são apresentados os 4 gráficos que foram pedidos pela questão. Estes estão sendo apresentados no dominio do tempo.
Os graficos são cossenos de 5V , $5/3$V e 1V e frequências de 1, 3 e 5 kHz , respectivamente, além do sinal $s(t)$ que foi gerado a partir da soma dos 3 cossenos anteriores
#figure(
image("./Figuras/E2/DomFreq.svg",width:130%),
caption: [
Sinais gerados no dominio da frequência \ Fonte: Elaborada pelo autor
],
supplement: "Figura"
);
Na Figura 5 são apresentados os 4 sinais anteriores da Figura 4 , porém agora foram apresentados no dominio da frequência. É possível ver de forma mais clara que o 4 sinal ($s(t)$) é o resultado da soma dos outros 3 sinais ,apenas analizando as componentes da frequencia.
#figure(
image("./Figuras/E2/Filtros.svg",width:130%),
caption: [
Graficos dos Filtros \ Fonte: Elaborada pelo autor
],
supplement: "Figura"
);
Na Figura 6 são apresentados 3 filtros , em vermelho um filtro passa baixa de 2kHz , em verde um filto passa alta de 4kHz e por fim em azul um filtro passa faixa de 2 a 4 kHz.
#pagebreak()
#figure(
image("./Figuras/E2/SinaisFiltrados.svg",width:130%),
caption: [
Sinais Filtrados em ambos dominios \ Fonte: Elaborada pelo autor
],
supplement: "Figura"
);
Na Figura 7 é apresentado o sinal s(t) filtrado pelos 3 filtros anteriores , cada um sendo mostrado a o resultado no dominio da frequencia a esquerda e no dominio do tempo a direita
#pagebreak()
== Exercicio 03
+ Gerar um vetor representando um ruído com distribuição normal utilizando a função 'randn' do matlab. Gere 1 segundo de ruído considerando um tempo de amostragem de 1/10k.
+ Plotar o histograma do ruído para observar a distribuição Gaussiana. Utilizar a função 'histogram'
+ Plotar o ruído no domínio do tempo e da frequência Utilizando a função 'xcorr', plote a função de autocorrelação do ruído.
+ Utilizando a função 'filtro=fir1(50,(1000*2)/fs)', realize uma operação de filtragem passa baixa do ruído. Para visualizar a resposta em frequência do filtro projetado, utilize a função 'freqz'.
+ Plote, no domínio do tempo e da frequência, a saída do filtro e o histograma do sinal filtrado
#pagebreak()
=== Resultados Exercicio 03
#figure(
image("./Figuras/E3/hist.svg",width:130%),
caption: [
Histograma gerado pelo randn \ Fonte: Elaborada pelo autor
],
supplement: "Figura"
);
Figura 8 mostra o histograma gerado por um randn , com intuito de simular um ruido branco.
#figure(
image("./Figuras/E3/domTempFreq.svg",width:130%),
caption: [
Sinais Filtrados em ambos dominios \ Fonte: Elaborada pelo autor
],
supplement: "Figura"
);
A figura 9 mostra o ruido branco gerado pelo rand , tanto no dominio do tempo quanto no dominio da frequencia.
#figure(
image("./Figuras/E3/xcorr.svg",width:130%),
caption: [
Grafico gerado pelo xcorr \ Fonte: Elaborada pelo autor
],
supplement: "Figura"
);
Na figura 10 é mostrado o resultado gerado pela função xcorr, seu intuito é de calcular a relação cruzada do sinal.
#figure(
image("./Figuras/E3/filtro.svg",width:130%),
caption: [
Gráfico dos filtros \ Fonte: Elaborada pelo autor
],
supplement: "Figura"
);
Figura 11 mostra como é o comportamento do filtro passa baixa que geramos com base no comando 'filtro=fir1(50,(1000*2)/fs)'.
#figure(
image("./Figuras/E3/SinalFiltrado.svg",width:130%),
caption: [
Sinal Filtrado \ Fonte: Elaborada pelo autor
],
supplement: "Figura"
);
Na Figura 12 é possivel ver o ruido branco no dominio do tempo e da frequência após aplicarmos o filtro passa baixo no ruido.
#figure(
image("./Figuras/E3/histFiltrado.svg",width:130%),
caption: [
Histograma do sinal filtrado \ Fonte: Elaborada pelo autor
],
supplement: "Figura"
);
A figura 13 é um histograma do ruido branco após ser aplicado o filtro.
= Conclusão
Neste laboratório, foram explorados conceitos fundamentais de sinais e sistemas, com a aplicação prática na análise e manipulação de sinais nos domínios do tempo e da frequência. Através dos exercícios realizados, foi possível compreender a composição de sinais complexos, a importância da amostragem e taxa de amostragem, bem como o papel crucial da Transformada de Fourier na análise espectral de sinais.
Os resultados obtidos nos exercícios demonstraram a aplicação prática dos conceitos teóricos estudados. A visualização dos sinais no domínio do tempo e da frequência, juntamente com a análise da densidade espectral de potência, proporcionou uma compreensão mais profunda da distribuição de energia dos sinais nas diferentes frequências. A aplicação dos filtros ideais e a análise dos sinais filtrados destacaram a importância dos filtros na manipulação e recuperação de sinais originais, ressaltando a necessidade de escolher o filtro adequado para cada aplicação.
Desta forma o laboratório foi essencial para solidificar o entendimento sobre sinais e sistemas, proporcionando uma base sólida para a análise e processamento de sinais em diversas aplicações. O conhecimento adquirido neste laboratório é fundamental para futuros estudos e aplicações práticas no campo da engenharia de sistemas e processamento de sinais. |
|
https://github.com/Mufanc/hnuslides-typst | https://raw.githubusercontent.com/Mufanc/hnuslides-typst/master/utils/decoration.typ | typst | #import "/utils/background.typ": bg
#let image-1 = [
#place(
dx: -5%, dy: -11%,
left + bottom,
image(width: 60%, "/assets/images/decoration-01.png")
)
]
#let image-2 = [
#place(
dx: 14%, dy: 27.5%,
right + bottom,
image(width: 70%, "/assets/images/decoration-02.png")
)
]
#let image-3 = [
#place(
dx: 0%, dy: 5.5%,
left + bottom,
image(width: 37.5%, "/assets/images/decoration-03.png")
)
]
#let image-4 = [
#place(
dx: 8%, dy: 3%,
right + bottom,
image(width: 56%, "/assets/images/decoration-04.png")
)
]
#let image-5 = [
#place(
dx: -2%, dy: 5%,
right + horizon,
image(width: 54%, "/assets/images/decoration-05.png")
)
]
#let decoration(type) = {
if type == 1 {
bg(image-1)
} else if type == 2 {
bg(image-2)
} else if type == 3 {
bg(image-3)
} else if type == 4 {
bg(image-4)
} else if type == 5 {
bg(image-5)
} else {
text(size: 1.5em, weight: 900, "!! NOT IMPLEMENTED !!")
}
} |
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/fletcher/0.1.1/src/utils.typ | typst | Apache License 2.0 | #import calc: floor, ceil, min, max
#import "@preview/cetz:0.1.2": draw, vector
#let DEBUG_COLOR = rgb("f008")
#let zip(a, ..others) = if others.pos().len() == 0 {
a.map(i => (i,))
} else {
a.zip(..others)
}
#let to-abs-length(len, em-size) = {
len.abs + len.em*em-size
}
#let min-max(array) = (calc.min(..array), calc.max(..array))
#let cumsum(array) = {
let sum = array.at(0)
for i in range(1, array.len()) {
sum += array.at(i)
array.at(i) = sum
}
array
}
#let vector-len((x, y)) = 1pt*calc.sqrt((x/1pt)*(x/1pt) + (y/1pt)*(y/1pt))
#let vector-set-len(len, v) = vector.scale(v, len/vector-len(v))
#let vector-unitless(v) = v.map(x => if type(x) == length { x.pt() } else { x })
#let vector-polar(r, θ) = (r*calc.cos(θ), r*calc.sin(θ))
#let vector-angle(v) = calc.atan2(..vector-unitless(v))
#let vector-2d((x, y, ..z)) = (x, y)
#let lerp(a, b, t) = a*(1 - t) + b*t
#let lerp-at(a, t) = {
let max-index = a.len() - 1
lerp(
a.at(calc.clamp(floor(t), 0, max-index)),
a.at(calc.clamp(ceil(t), 0, max-index)),
calc.fract(t),
)
}
#let angle-to-anchor(θ) = {
let i = calc.rem(8*θ/1rad/calc.tau, 8)
(
"right",
"top-right",
"top",
"top-left",
"left",
"bottom-left",
"bottom",
"bottom-right",
).at(int(calc.round(i)))
}
#let rect-at(origin, size) = (-1, +1).map(dir => {
vector.add(origin, vector.scale(size, dir))
})
#let rect-edges((x0, y0), (x1, y1)) = (
((x0, y0), (x1, y0)),
((x1, y0), (x1, y1)),
((x1, y1), (x0, y1)),
((x0, y1), (x0, y0)),
)
#let intersect-rect-with-crossing-line(rect, line) = {
rect = rect.map(vector-unitless)
line = line.map(vector-unitless)
for (p1, p2) in rect-edges(..rect) {
let meet = draw.intersection.line-line(p1, p2, ..line)
if meet != none {
return vector-2d(vector.scale(meet, 1pt))
}
}
panic("didn't intersect", rect, line)
}
/// Determine arc between two points with a given bend angle
///
/// The bend angle is the angle between chord of the arc (line connecting the
/// points) and the tangent to the arc and the first point.
///
/// Returns a dictionary containing:
/// - `center`: the center of the arc's curvature
/// - `radius`
/// - `start`: the start angle of the arc
/// - `stop`: the end angle of the arc
///
/// - from (point): 2D vector of initial point.
/// - to (point): 2D vector of final point.
/// - angle (angle): The bend angle between chord of the arc (line connecting the
/// points) and the tangent to the arc and the first point.
/// -> dictionary
///
/// #arrow-diagram(spacing: 2cm, {
/// for (i, θ) in (0deg, 45deg, -90deg).enumerate() {
/// conn((2*i, 0), (2*i + 1, 0), marks: (none, "head"), bend: θ)
/// conn((2*i, 0), (2*i + 1, 0), [#θ], label-side: center, dash:
/// "dotted")
/// }
/// })
#let get-arc-connecting-points(from, to, angle) = {
let mid = vector.scale(vector.add(from, to), 0.5)
let (dx, dy) = vector.sub(to, from)
let perp = (dy, -dx)
let center = vector.add(mid, vector.scale(perp, 0.5/calc.tan(angle)))
let radius = vector-len(vector.sub(to, center))
let start = vector-angle(vector.sub(from, center))
let stop = vector-angle(vector.sub(to, center))
if start < stop and angle > 0deg { start += 360deg }
if start > stop and angle < 0deg { start -= 360deg }
(center: center, radius: radius, start: start, stop: stop)
} |
https://github.com/jgm/typst-hs | https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/layout/columns-06.typ | typst | Other | // Test an empty second column.
#set page(width: 7.05cm, columns: 2)
#rect(width: 100%, inset: 3pt)[So there isn't anything in the second column?]
|
https://github.com/polarkac/MTG-Stories | https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/032%20-%20Ixalan/006_The%20Race%2C%20Part%201.typ | typst | #import "@local/mtgstory:0.2.0": conf
#show: doc => conf(
"The Race, Part 1",
set_name: "Ixalan",
story_date: datetime(day: 11, month: 10, year: 2017),
author: "<NAME> & <NAME>",
doc
)
#figure(image("006_The Race, Part 1/01.jpg", width: 100%), caption: [Adanto, the First Fort | Art by Svetlin Velinov], supplement: none, numbering: none)
The garrison at Fort Adanto had become accustomed to regular attacks, violent storms, and all manner of unpleasantries from the wild country around them, but they could never have known who would stumble into their lofty barricade from the coast.
Guards and priests alike peered over the Fort's tall, thick walls at the shrunken, crazed-looking figure below. It was a hierophant, a vampiric man of the cloth, covered in sand and cheeks sunken with hunger. His eyes were wild and his beard was coarse with a madman's ambivalence. He bellowed upward at the faces peering down, "I have conquered the waves and death itself, praise Saint Elenda!"
The guards looked to one other uncertainly. The man below had ripped off his tunic and fallen to his knees, his long-nailed hands clasped in benediction. His prayers were loud, absent of any self-awareness. The mortal guards recoiled in discomfort—whoever this was had been lost to the Blood Fast.
"Wondrous miracles! Empty arteries and lapping tongues, she gave us #emph[life] ! Rejoice, you tepid fools!"
The human guards dared not open the door. A vampire in the midst of the Blood Fast was tremendously dangerous. One lost to themselves would not be able to discern between the blood of the faithful and the blood of a sinner. Instead, one of the guards fetched a priest for help.
The starving vampire outside the fort grew more fervent in his prayer. "I forsook sustenance to bring myself closer to blessed Saint Elenda, and here I stand!"
He reached into a moldy bag hanging from his side and threw a jumbled mess of metal onto the ground. The guards could make out a crushed sextant, a broken compass, and a menagerie of other ruined navigational tools.
"I KNEW WE DID NOT NEED THESE TOOLS OF DECEPTION!" the vampire screamed. "My faith in Elenda drew us here!"
The priest of Fort Adanto had made her way to the door. She called through the thick wood to the vampire on the other side. "No ships have arrived today. What vessel brought you here?"
"The sacrosanct buoyancy of inviolable faith!" howled the vampire. "The finest ship in the Legion of Dusk! I arrived on #emph[Her Majesty's Courage] !"
The vampiric priest rolled up her sleeves and nodded at the guards to open the gate. The guards lifted the locks and pulled at the door's massive chains, and the starving vampire stumbled inside.
The priest gasped. "<NAME>?"
"Saint Elenda was the first!" Mavren Fein raved. "Her sacrifice is our survival, her selflessness the model of our success! I took the rite two hundred years ago, and under the guidance of Saint Elenda the First, we will find the way to immortality without the need for blood!"
The priest was kneeling now, picking up the broken pieces of Fein's equipment. She looked up at Mavren Fein with shock. "Were these the navigational tools of your ship?"
"I knew we did not need them!" Mavren Fein spat in response.
He stilled, suddenly sniffing the air, and looked up at the guards on the top of the Fort's walls.
The guards backed away from the ledge, but not nearly fast enough.
<NAME> hissed, and ran at the wall with his eyes locked on the humans above. He began to claw his way up the sides of Fort Adanto, chunks of wood flying in jagged splinters as he climbed ferociously. His face was a terrible mask, teeth bared and eyes wide. He snarled and scrambled upward, snatching the nearest human guard with nails as sharp as knives.
The man yelled in surprise, and <NAME> bit madly at the metal covering between the guard's jaw and collarbone. Though none could react in time to stop the blood-crazed vampire, the attack was in vain—his teeth could not pierce the armor before the other guards ran forward, kicking him off the ledge. He hit the ground with a thump, and in a moment the priest of Fort Adanto was on top of him, pinning him to the ground to prevent another outburst.
"Your piety is apparent, <NAME>," the priest grunted with effort, "but your Blood Fast must end if you wish to remain at Fort Adanto. Break your Blood Fast, Hierophant. Your reverence is manifest, but your mission will require your full awareness."
The priest wrestled <NAME> to his feet and began to walk him toward the prison cells.
#figure(image("006_The Race, Part 1/02.jpg", width: 100%), caption: [Inspiring Cleric | Art by <NAME>legos], supplement: none, numbering: none)
The Legion of Dusk had little use for long-term prisons, but temporary holding cells were necessary for getting prisoners to their full health before sentencing.
<NAME> was led down into the cellars below the church in the center of the Fort. The walls were wood-lined earth, and lit with delicate oil lamps. The priest opened an iron door at the end and guided Mavren inside. The noises of a single whimpering man leaked under the gap between the walls.
"Manuel killed a compatriot in a fight over a game of cards," the priest said to <NAME>, motioning to the cell next door. "He will be the one to break your fast at dusk tonight. I'll prepare the necessaries for the ceremony."
The priest shut and locked the door, and departed upstairs.
Mavren wandered the perimeter of his cell, stomach growling and teeth chattering with excitement.
"Do you know of <NAME>, criminal?" he asked through the wall.
A whimper let through the other side. <NAME> closed his eyes and raised his hands.
"S<NAME>, the most devoted of the devoted, the First and the Faithful. She was born mortal, a warrior nun charged with her brothers and sisters of faith to guard the Immortal Sun in the mountains of Torrezon. Listen!"
The whimper turned to a yelp.
"<NAME> killed them all. Guilty, greedy, foul betrayer of his own!" Mavren spat. "But she, #emph[she] survived; she was nine feet tall! Hair like a raven's wings and nails like lightning's edge! She ran outside to fight Pedron, but the Immortal Sun had been stolen from the fiend by a winged beast in the sky!"
The whimpering next door had stopped. Manuel was apparently listening.
"The beast took the Immortal Sun to the west, and <NAME> followed it! Staunch piety! Blessed Saint Elenda!"
". . . How did she become the first vampire?" Manuel mumbled from the adjacent cell. He yelped as <NAME> slammed his body up against the connecting wall.
"She was a genius! She was a visionary! She turned to dark magic and took on the burden of immortality until the Immortal Sun could be retrieved once again! Blessed wonderful brilliant Saint Elenda, the First and the Faithful. She searched for centuries and returned, yes, she returned to Torrezon, and taught her Rite to the nobles so that we may take up the sacrifice and join her in her search. Genius! Visionary! Blessed by the Night itself!"
<NAME> scraped his nails along the wooden wall.
"I was one of the early ones. I watched as she sailed back into the west and have waited for my day to follow her. Patient patient patient. I'm very good at waiting."
<NAME> went quiet. The only noise was of Manuel's heavy breathing from the adjacent cell.
The vampire knelt, hands shaking with the mania of the Blood Fast.
He snuck his fingers under the gap of the walls separating him from the human.
And Manuel screamed.
In one motion, <NAME> pulled back, and snapped the wall from its sides. He tore through the planks of wood, diving through the broken boards and onto his prey.
A breath later, his teeth were at the neck of the criminal, and the coppery scent of blood filled the air.
Mavren Fein consumed with abandon.
Alarmed by the sudden noise, the priest and guards ran down to the cells, and stopped at the sight in front of them. They looked on reverently as Mavren Fein feasted. Vampirism was a curse, a burden placed upon oneself for the greater good. This vampire's condition was self-imposed, sad, but necessary. What was theirs would not be returned without sacrifices like his.
Mavren Fein gasped and wiped his mouth with the length of his sleeve. Self-awareness had returned to his face, and his body grew still.
"Priest, tell me your name." His voice was calm and measured. A complete opposite of the vampire who had raved and ranted before.
"Mardia," said the Priest. She bowed her head. "I'm sorry I was not able to perform the full ceremony for the breaking of the Blood Fast—"
"It's quite all right, pious Mardia," said <NAME>. He finished cleaning himself up and stood with hands clasped in front of him. "My apologies for the mess I've made."
"The rest of your crew is dead, then?" Mardia asked. Her hands quickly motioned a blessing.
Mavren sighed and nodded. "Yes. We ran ashore when the navigational instruments were destroyed. A pity. But I intend to continue our mission all the same."
"What resources can we provide you, Hierophant?"
<NAME> smiled gently. "A change of clothes. A staff. I have no need for a compass."
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
= VONA
#figure(image("006_The Race, Part 1/03.jpg", width: 100%), caption: [Vona, Butcher of Magan | Art by <NAME>], supplement: none, numbering: none)
Vona of Iedo, Culler of Sinners, Butcher of Magan, had earned her reputation through centuries of warfare. The Apostasine Wars had provided enough entertainment to ensure that her sword was always wet—and her thirst always quenched. Kingdom after kingdom on the continent of Torrezon fell to the unified Church and Crown, and Vona relished every conquest.
And now, on the deck of her ship, she eagerly approached the Brazen Coalition ship on the horizon.
The greatest day of Vona's life was, naturally, the day of her second birth, spent kneeling in a church, working the spell that would bind her life to serve the crown and church in perpetuity. She thought often of that first taste of a heretic's blood and the vow she made as she cast the spell: "Our thirst shall be our penance. Our service shall be our lives. Now and forevermore, the blood of the guilty shall sustain us until we discover true immortality." Vona remembered the rush of new life, the pang of hunger in her gut. Her gifts were incredible; she could walk with the silence of a predator and kill with the same skill. She was never afraid to walk alone at night for the soul of night beat in her heart, coursed through her blood. Why on earth would the church ever want to #emph[stop ] thirsting for blood?
She kept that opinion to herself over the centuries, of course. When Torrezon was finally under the control of the Legion of Dusk, Vona had a difficult time transitioning into a peaceful lifestyle. She had become a noble with her own lands, but the territory was poor and rocky, and it became quickly apparent she was not an able administrator. Her ennui lasted a decade. One night, in a fit of boredom, she decided to break the monotony. It was fun, mundane as a child's game, a quick way to pass the time. She stalked each of her human serfs in their beds and in their fields, and over the course of one happy week killed each of them as part of a pleasant game. Vona rejoiced in the sport of it, and abandoned her humble estate.
That was fifty years ago.
As soon as <NAME> had announced she was assembling a fleet to voyage in search of Saint Elenda—#emph[THE Saint Elenda!] —Vona had volunteered to lead the first ship that left port. She was thirsty. Ever so thirsty. Whether her prey were guilty or not, she would have her fill along the way.
It only worked if she told no one else how little she cared for the rules that bound her. The secret kept it exciting.
#figure(image("006_The Race, Part 1/04.jpg", width: 100%), caption: [Dusk Legion Dreadnought | Art by <NAME>], supplement: none, numbering: none)
And now, a Brazen Coalition ship was in Vona's sights.
Vona stood at the bow of her ship, looking out over the sea with sharp, inhuman eyes. Her mission now maintained that same excitement, kept the ennui at bay.
#emph[The] #emph[Belligerent ] was scrawled on its side, and that ship's crew was distracted by the shore up ahead. A siren flying high above the mast had spotted Vona's ship by now, but they were a small speck against a rapidly-darkening sky.
Vona was hungry, and by nature of their allegiances, #emph[The] #emph[Belligerent ] was full of guilty traitors ripe for consumption. Boarding the pirate ship was ironic, but necessary to keep her sated.
A sudden wave tilted the ship violently forward, and Vona grabbed the rail to regain her balance.
"Where did this storm come from?!" she yelled to her navigator.
The human jabbed his sextant toward the shore. "It must have been summoned! The River Heralds of Ixalan are famous for their elemental—"
"I don't care what they are famous for! Focus on the Brazen Coalition ship—we're nearly close enough to board them!"
Vona watched as her priest lifted his staff into the air, conjuring a churning, black smoke that engulfed their ship. #emph[The Belligerent ] was tantalizingly close (and, heaven above, Vona was starving).
But the sky had turned from drizzly gray to an angry black, and the sea lifted Vona's ship high up to meet the crest of its waves before tumbling back down. Crewmen worked to raise the sails and turn the ship into the wind, but the incessant waves threatened to overturn them all.
Vona saw the white line where the beach met an outcropping of rocks. Her eyes went wide, and she shut them tight just as her ship rammed into the side of the sea stack.
She fell overboard and tumbled through the waves, body loose as a rag doll in the violent push and pull of the sea, and eventually she pulled herself to the surface.
#figure(image("006_The Race, Part 1/05.jpg", width: 100%), caption: [Settle the Wreckage | Art by Dimitar], supplement: none, numbering: none)
Behind her was the wreck of her ship, around her were the bodies of her crew dotting the harsh white of pristine sand, and before her was a wall of dense, dark jungle.
Vona stumbled forward through the waist-deep shallows and felt her foot slip on the rocks below before finding its grip.
She walked onto the beach and tripped over chunks of broken wood tangled among beached kelp. Splashing behind her signaled that she was not the only survivor, and sure enough, a few ragged members of her crew were gasping and wading beside her. They mattered in the sense that strangers in a market mattered—they were alive and had their focuses and their purposes and their tasks, but their function was peripheral to hers.
Vona's crew was a means to an end. They had reached the shores of Ixalan and had thus achieved their end. But hers? Her purpose was one touched by divinity and delivered by the queen herself.
An ancient feeling stirred in her heart. Vona of Iedo, Butcher of Magan, now stood closer to Saint Elenda than she had ever been in her life.
A barbarian's smile spread over the planes of her face. #emph[At last.]
She half-walked, half-swam her way out of the shallows. A few of her crew were calling for help or pathetically slapping the waves, but Vona ignored them. She and her crew had been pursuing the Brazen Coalition vessel for days. Vona had instructed her navigator to prepare to board in order to feed the vampires in preparation for the land expedition ahead. Her kin would need their strength, after all. Now, as Vona looked to the pirate ship that lay beached beside her own, she understood that this was serendipity.
Vona was elated. #emph[If the rumors are true, then the stranger who bears the compass is her captain.]
The vampire paused and weighed her options. She could either wait for the leader to emerge . . . or she could ambush the captain in the thick of the jungle. Vona's grin returned. It had been far too long since her last hunt.
A few pirates tumbled ashore behind her. Vona sniffed the air.
A man, ragged with trauma, sat cradling a freshly broken arm in the sand. His clothing bore the typical rags of a Brazen Coalition pauper, and his face was lined like rumpled linen. He locked eyes with Vona and fell back onto the sand, pushing himself farther and farther away with tired legs.
"Please, no! I'm not a criminal!"
Vona strode forward and looked down her nose at the pirate. "Do you recognize the sovereignty of Queen Miralda?"
"Y—yes! I do!"
The vampire sneered. "Then you should know what her majesty thinks of liars. I find you guilty of deceit, and a criminal in the eyes of the Church."
A blur of noise and sand punctuated her decree, and Vona efficiently silenced the scream that emerged from the pirate's throat.
She drank greedily, and felt the sinner's blood fill her with righteous purpose. Distantly, she knew she was making a mess, but that did not bother her. The sea would wash away her untidiness.
The vampire gasped with sated satisfaction and picked up a sword that had washed onto the beach beside her.
Vona marched toward the thick wall of green.
She wasn't the patient type. She knew her crew would follow suit when they could keep up.
Besides, she did not need them for the task ahead. She was the Butcher of Magan, and the Immortal Sun was hers for the taking.
#figure(image("006_The Race, Part 1/06.jpg", width: 100%), caption: [Paladin of the Bloodstained | Art by <NAME>], supplement: none, numbering: none)
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
= JACE
Jace was thankful he somehow remembered how to swim.
In the chaos of the storm, he had leapt overboard alongside Vraska. Jace grabbed a floating piece of wood to conserve energy and began kicking himself to shore. He sighed in relief through a mouthful of brine when he spotted Vraska surfacing. She swam over to him with firm, confident strokes, and the two began making their way to shore.
"Someone started that storm," Jace noted, spitting out saltwater.
"There was an elementalist on shore, up on that rock over there," Vraska said. "Can't see them anymore."
Jace looked to the nearby outcropping. To his left was the Legion of Dusk ship that had been in pursuit. It was dashed across the rocks, but one of its smaller vessels had survived. The smaller ship was floating at a cockeyed angle in the shallows near a broad delta.
"See that dinghy? We can sail that upriver to the interior of the continent," Vraska said. "I'm going back for the crew. Don't die."
Jace nodded reluctantly and made his way onto the beach. Having just survived a nautical disaster, he had no intention of dying now.
The beach here was rougher than Useless Island had been. It was peppered with wayward rocks and deposited kelp, and the outgoing tide made everything stink of the sea. The air was charged with the weight of the conjured storm, and the breeze it carried was heavy with humidity.
The effect was discomforting. It was time to leave before things inevitably got bloody. He felt like he was at the starting gate for a race, as if some door would swing open and a rabbit would be let loose for him to chase.
He began to make his way toward the beached dinghy. Now that he was out of the water, he could see the tremendous damage the storm had done. #emph[The Belligerent ] was smashed into the side of the Legion of Dusk ship. Bits of each ship stuck out of the other, and their wooden masses tangled up in each other. Jace could make out bodies in the water, but dared not look closely enough to discern which were his friends and which were his enemies.
His heart caught in his chest. Malcolm. Breeches. Gavven. Amelia. These were the only people he could remember ever knowing.
Jace heard a mumbling phrase grow louder in his mind. It sounded hungry, furious, like some kind of an animal. He looked to his right and saw a vampire in shining armor running full-speed toward him through the sand.
Panic jolted through Jace's mind, but as instinct overtook him, his perception slowed almost to a standstill.
The vampire's mind appeared to him, coiled glass and wisps of fragile energy. Jace reached out and, sensing the immensity of his own power, made a significant effort to allow only a minute pinprick of it to reach his target. He charged that small expression of power with one simple command:#emph[ sleep] .
Time resumed. Jace gasped. The vampire in front of him stumbled in the sand and collapsed to the ground, snoring.
Jace froze in his tracks and looked down in pleasant surprise at the vampire at his feet.
"JACE!"
Vraska was running toward him.
#emph[CLOSE YOUR EYES] —she mentally yelled loud enough for him to hear.
Jace screwed his eyes shut and heard something #emph[fwump ] in the sand behind him.
He looked back and down. A petrified vampire lay at his feet. The thing looked as if it had fallen out of a museum. The vampire was frozen mid-run, his clothing solidified in impossible-to-carve thinness, his detail captured down to the pores of his face. Had Jace known otherwise, he would have thought this to be a statue carved by a master's hand. It was almost beautiful.
Vraska came to a stop in front of him.
"We lost Edgar," she said tightly, turning back toward the ship. Jace followed, leaving both the sleeping vampire and its stone crewmate behind.
The surviving crew of #emph[The Belligerent ] was shaking off the crash and bracing for a fight. Several vampires were swimming ashore with ease despite the obvious weight of their armor. Their gifts were good for more than just feasting, it seemed.
Breeches easily ran across the sand toward Vraska, his tail streaming behind him as he ran.
"We fight, you go!" he yelled. Vraska knelt to his level.
"We go as a crew," she said tersely.
Breeches shook his head. "We fight Dusk, you find Sun! Meet up later!"
"How will you find us?" Vraska asked.
Breeches pointed at Jace. "Follow fancy illusion!"
Vraska nodded. "Jace will make something tall when we get off that boat upriver. Have Malcolm check high up every hour to look for us." Vraska said, nodding resolutely at Breeches.
The goblin nodded and shambled back to the survivors on two legs, waving two little knives in each of his hands like a murderous rag doll.
"Breeches!" Vraska called one last time. The goblin turned around, and the rest of the crew behind him listened attentively to their captain.
"We're not here to stay. Leave the locals alone," said the gorgon, "but kill every vampire you find."
The goblin grinned, and the crew of #emph[The Belligerent ] drew their weapons and charged the remaining vampires.
Jace shivered despite the summer heat. He was glad he was on the pirate's side.
"Beleren! With me!" she called before racing off toward the small ship in the river.
Jace and Vraska ran with heavy steps through the sand of the beach toward the small ship near the river delta. The ground beneath them gradually went from a smooth, wet surface to lumpy dry sand that kicked up into their shoes as they ran. They passed the body of a pirate crewmen soaked in his own blood, and Vraska swore. Bloody tracks led away from the body into the thick of the jungle.
Vraska looked back to Jace as they ran. "Jace, you need to camouflage us."
He shut his eyes and dutifully willed a veil of invisibility over himself and Vraska. He hid their movements as they ran over the beach and cast an illusion to disguise their footprints.
Vraska splashed through the shallow water of the estuary and climbed into the boat. Jace hoisted himself up and tried to catch his breath.
Safe under the veil of Jace's illusion, Vraska busied herself with setting the sails.
The boat was small, likely intended for fishing and scouting voyages. Its dark sails fluttered, and a sudden inland breeze pushed them upriver into the jungle.
"May as well use the wind while we can. We have a lot of rowing ahead," Vraska remarked.
They watched as the impending battle on the beach began, but as they passed into a maze of trees, they lost sight of #emph[The Belligerent ] for good. The noise of the fight and the pull of the waves were replaced by the chirping of insects and the calls of small flying reptiles above.
The jungle here was different than that of Useless Island, and Jace marveled at the size of trees. On his island, they were stunted by spatial restriction, but here the trees spread wide and tall. He felt shrunken, a miniature version of himself tossed into a massive garden.
Vraska was busying herself trying to capture the dwindling breeze in her sails. She gave up after a while, and pulled the oars out from under her seat. Her brow was furrowed in visible concern.
"You're worried about the rest of our crew," Jace noted as he began to row. Vraska nodded.
"Yes. But they can take care of themselves," she said. "I'm their captain, not their mother. They'll find us after they've eliminated the threat."
The canopy began to close over them.
#figure(image("006_The Race, Part 1/07.jpg", width: 100%), caption: [Forest | Art by Min Yum], supplement: none, numbering: none)
Shadow and green surrounded their vessel, and the river started to narrow into a deep channel. Branches crisscrossed overhead, and the sun vanished entirely. The air was thick, clammy, and fragrant with the musk of damp earth.
He glanced over the side of the boat. A school of fish was playfully swimming below. He could just make out their shapes in the cloudy water.
Jace looked up, and Vraska was giving him an odd look with an intent he couldn't interpret through expression alone. She looked almost ill with hesitation.
"What is it?" he asked.
She took a deep breath.
"Neither of us are from here," she blurted out.
Jace blinked. "Well, obviously. You said we were from Ravnica—"
She was grimacing, reluctant to talk but even more reluctant to keep it to herself. "Ravnica isn't on this plane."
Jace's eyebrows lifted as far as they could. "This #emph[plane] ?"
Vraska was visibly trying to find a way to put into words what she was trying to say. She stuffed away the compass Jace had given back to her, and talked with her hands.
"You told me your body disappeared and reappeared when you first arrived, and there was a symbol that appeared above your head, right?"
Jace nodded.
Vraska let out a breath and stilled herself. A strange shadow darkened their boat, and her body faded out of sight.
Jace leapt to his feet so quickly he nearly fell off the boat into the current of the river.
He heard a sudden #emph[thud ] and spun around—Vraska had reappeared on the other end of the boat—the same spot she had left had the boat not been travelling upstream—and the same triangle-circle symbol had appeared above her head.
Jace's jaw was entirely slack.
Vraska waved her hands in a little ta-da. "I'm one too. And usually, when we—" she motioned to them both, "—do #emph[that] —" she motioned all around, "—we can travel to other planes of existence. We're Planeswalkers."
This was entirely too much new information to take in at once. Jace began to ask the first of thirty questions that immediately sprang to mind.
Vraska stopped him with an outstretched palm. "Wait till I'm finished! Now, whenever we try to planeswalk, #emph[something ] yanks us back, and we aren't allowed to leave. Right? I believe that Orazca doesn't just contain the Immortal Sun. It also contains the enchantment that keeps us here. I was told to perform a spell to contact another plane when we found the Immortal Sun, and after we do that I think we'll be able to leave."
"Is that possi—"
"A #emph[dragon] taught me how to sail, Jace. Who knows what is possible anymore?#emph["]
Jace was absurdly excited to put the pieces together. He locked eyes with Vraska and thought out loud with gusto. "We thought the compass was just pointing to the city, but it points to blooms of powerful magic." He nodded at Vraska's pocket. "Instead of magnetic north, it points to aetheric north, and it also points toward large outliers of similar kinds of magic. That's why it pointed to me when you found me, and that's why it's probably pointing to you now. I tried to tell you on the boat before we crashed."
She pulled out the compass. It was pointing at her, but slowly shifting back as the mark above her head vanished.
Jace nodded in self-confirmation, fiddling with a switch at the side so the second beam pointed toward what he knew now was aetheric north. He toggled it on and off, with the point toward Orazca remaining static. "We can use it to accurately map our route by calculating the angle between aetheric north and Orazca . . . or we can just follow the direction pointing to large expressions of magic like you've been doing. One is a bit less elegant, but it works."
"That's . . . incredible," Vraska said, blinking at the thaumatic compass. She smiled, laughed. "The barrier must rely on the same magic we use to planeswalk! That's why the compass points there! You figured it out!"
Jace disguised his bashful look with a well-coordinated shrug. Vraska continued, "I was so certain that the person who sent me here was going to end my life if I didn't find what the compass pointed to. But now we have a chance, thanks to you!"
"We both have our talents," Jace replied with humility.
Vraska grinned. "And yours are incredible!" She paused for a moment. Something in Vraska's face shifted. Softened. "Jace, I'm sorry I kept planeswalking from you. I didn't know if I could trust you when I found you. No more hiding things." The waves gently lapped at the side of the boat as she rowed. "I never got a chance to thank you for what you said that night when we were docked at High and Dry. No one has ever listened to my story like you did. Thank you."
Jace smiled. "Your story is worth telling. Thank you for sharing it with me."
The gentle smile she gave in return gave him pause. It was vulnerable and honest. Eyes locked with his.
She had stopped rowing.
Everything about this jungle was bright and over-saturated. It all felt weighty with meaning. Jace had dozens of questions lined up, all of them severely different from one another in tone, a hodgepodge of inquiries both mundane and fantastical. Did she like books? What were the metaphysical properties of the space between planes of existence? How was planeswalking different from casting a normal spell? What was her favorite dessert?
But something at the back of Jace's mind caught his attention.
He surveyed the banks of the river. He sat silently for several seconds, stretching his power out to see if they were being followed. The invisibility cast over the boat was holding. The surrounding mile was largely empty, but there were some impressions on the outer rim. He concentrated as hard as he could to widen his range of perception.
Vraska looked at him intently. "Do you sense anyone?"
Jace nodded. "One human, one vampire, a merfolk . . . and a minotaur."
Vraska's brow knotted in confusion. "A minotaur?"
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
= HUATLI
Thick mangroves gave way to plush sand, and Huatli felt her mount sink slightly with each step into the pristine beach below. She turned around and gave a brief hand motion to her second-in-command—this was the area in which the merfolk had last been spotted.
This is where she would find her guide to lead her to the Golden City.
#figure(image("006_The Race, Part 1/08.jpg", width: 100%), caption: [Huatli, Dinosaur Knight | Art by <NAME>], supplement: none, numbering: none)
Huatli's spirits rose as she contemplated the challenge.
Her clawfoot mount gave a little cry of excitement in response.
The connection between dinosaur and rider was a close one. Some riders preferred to raise their mounts from the moment they hatched. Others caught wild ones and magically imprinted on them. Huatli was deeply practical. Her mounts were not her children or pets. They were tools to be treated with respect, an extension of her warrior-self.
The sky beyond was an angry gray, and choppy waves crashed against an outcropping of rock that jutted out into the sea. Near the stone, Huatli could make out two broken and battered ships. One bore the colors of the Brazen Coalition, and the other had the tattered black sails of the Legion of Dusk clinging to its broken masts.
A #emph[person ] caught her eye. She must have been a person, but she was unlike anyone Huatli had ever seen before.
Her skin was emerald green, more reptilian than anything else, and her shining golden eyes were wide, searching for fellow survivors. A tangle of vines rose out of her head and licked at the air, and she wore a captain's coat and breeches.
Huatli knew better than to approach the ships. Whatever storm the merfolk had conjured had been enough to beach the ships, but probably not enough to eliminate everyone inside of them. While her warrior's training urged her to fight off the invaders, Huatli knew better than to get distracted.
Inti approached on Huatli's right. He rode a bladetooth—a sturdy mount significantly larger than Huatli's smaller, more agile clawfoot. Inti looked down at his captain and pointed toward the rock jutting out near the sunken ships. His other hand tapped the net that was strapped to the side of her saddle.
Huatli nodded. #emph[He must be able to see the River Herald who shaped that storm.]
She turned to Teyeuh. "Return to the city and summon our forces to deter the survivors."
Teyeuh nodded and urged her frillhorn back into the dark green of the jungle.
Huatli and Inti turned parallel to the line of the beach and cut through the thick forest just inside where the wilderness met the sand. They made their way through the mangroves and briny water toward the outcrop where Inti had spotted their mark.
On the beach behind them, they heard a man's scream. Huatli didn't turn to watch the excitement—she knew she must not lose focus. Instead, she drove her agile clawfoot ahead and burst through the jungle into the bright sunlight. The screaming stopped abruptly behind her, and she saw a body lying on the rock ahead. Huatli urged her mount closer to get a better look.
There, lying on the rock overlooking the vast, unending ocean, was an unconscious female merfolk.
#figure(image("006_The Race, Part 1/09.jpg", width: 100%), caption: [Tishana, Voice of Thunder | Art by <NAME>], supplement: none, numbering: none)
She looked old; her fins were long and faded on the ends, and jade trinkets hovered in place around the planes of her face. Whoever this was must have summoned the storm that sunk the two ships, and if she was as important as Huatli sensed she was, she would know the location of Orazca.
The anxiety doubled in Huatli's chest. This plan had seemed awful at first, but seeing the merfolk in front of her made it that much more impossible.
#emph[How am I to convince the Sun Empire's oldest enemy to help me?]
Her courage swelled and her brow lowered in determination. #emph[I will find a way!]
Huatli approached and dismounted. As she walked forward, the merfolk began to shift and move, groggily pulling herself up off the ground. The older merfolk visibly steadied herself, locked eyes with Huatli and Inti at her side, and the fins at her face pulled back sharply in surprise.
"I do not intend to attack you," Huatli said firmly.
The merfolk closed her eyes.
Huatli bristled. What was she doing?
The merfolk inhaled, exhaled, then met Huatli's gaze. "He's making his way there. Get out of my way or I will make you do so."
#emph[What in the world is she talking about? ] Huatli gripped her blade tightly. The River Heralds were famously obtuse. She knew negotiating with one to secure a guide would be difficult, but her gut told her that negotiating with this one may be like asking one of the Sun Empire shamans for advice on what food to eat that day. No answer would be straightforward.
"My name is Huatli, future warrior poet of the Sun Empire. Tell me your name."
"I am Tishana of the River Heralds," the merfolk responded cautiously, "and Ixalan is in peril."
She clawed a hand upward, and a wave crashed at the rock beneath them.
#emph[An intimidation tactic. ] Huatli was not so easily frightened. She held her ground. "Why is Ixalan in peril?"
Tishana's fins fluttered in agitation against the sides of her face. "A River Herald has betrayed my cause and is traveling there now. Kumena means to unbalance radical dependencies."
The merfolk reminded Huatli of what might happen if she crossed one of the Sun Empire shamans with a slightly nutty aunt. A wise and perceptive mystic with the vocabulary of the resident eccentric.
"I want to go to Orazca, but I need a guide."
The merfolk's fins twitched. "#emph[What?] "
"She has seen it," Inti interjected, looking at Huatli.
The merfolk's fins flared.
Huatli chose her words carefully, "I wielded a strange magic, and I saw a golden city."
Tishana gave a deadpan look. "You saw #emph[a ] golden city."
"Yes."
"Not #emph[the ] Golden City?"
Huatli frowned, embarrassed. This conversation was too familiar. "I saw Orazca," she firmly replied.
Inti interjected with a measured voice. "The Golden City needs to be found if we want to protect both of our peoples." He gestured to the chaos of the beach.
Tishana turned to Huatli and leaned forward in interrogation. Her face was stern and straightforward, with a predator's focus. "And you simply need to #emph[go ] there? Not possess it? Not claim it for your own or in the name of your Empire?"
Huatli's mouth was a hard, stern line. She kneeled, and placed her weapon on the ground, looking up at the merfolk with utter respect in her eyes.
"Something within me #emph[made ] me see the city. I am certain it is proof that my mission is crucial to the survival of both Sun Empire and the River Heralds alike. We are not each other's enemy."
The merfolk paused and studied Huatli's face. She seemed to look straight through her, and Huatli felt incredibly young looking back at Tishana's gaze as she knelt on the ground in subordination.
Tishana lowered her eyelids and moved her lips to one side as she thought out her response. She lowered a hand and placed it in front of Huatli's forehead.
Huatli felt oddly warm, as if someone had prodded at a fire within her chest.
Tishana opened her eyes. "I sensed you, days ago," she said.
Huatli couldn't help her look of surprised repulsion.
The merfolk stepped away, ignoring her response. "I sensed a tremendous tug at the energy of our world, like a dolphin trying to leap out of a river."
Tishana was more than a little unnerving. Huatli was no stranger to metaphor, but the merfolk operated on an entirely different level.
"Do you know what it was?" Huatli whispered urgently.
The merfolk's pupils thinned. "I know only that the surface of our world is impassible from underneath. Some can fall in, but once submerged, cannot leap out."
Huatli had no idea what Tishana meant by that.
"I felt a similar tug this morning," she said, "in the direction of the sea. And again, two months before, much further past the horizon. But that energy did not belong to you."
The merfolk knelt and looked Huatli in the eye. "If you say you saw a city when you skimmed the edges of our world, then I believe you."
Inti looked down at Huatli and smiled in pride. Huatli was thankful he was here as support.
"But I want your word, Huatli." Tishana glared. "We are going to the city to keep Kumena #emph[out ] because his presence threatens you as much as it does #emph[us] . If you try and claim Orazca for your own, I will not hesitate to kill you."
Huatli felt deeply uncertain about how the exploration would play out. This was going to be a very interesting trip, but she had no other options.
"Thank you, Tishana."
Huatli climbed up on her mount and offered a hand to the merfolk to join her.
Tishana looked at the hand as if it were made of insects. "I will travel independently," she scowled.
The merfolk lifted a small jade item from a bag at her side and set it on the ground.
#figure(image("006_The Race, Part 1/10.jpg", width: 100%), caption: [Sentinel Totem | Art by <NAME>], supplement: none, numbering: none)
She lifted a hand, and the jade lit from within, a firefly glow encased in mottled green.
The rock and vines that lined the outcropping of rock they stood on began to vibrate, moving toward the jade totem as iron to a magnet. The rock and wood curved and expanded, picking up the totem as it did so, and began to form the shape of an elemental. Within moments, where once was a beautiful carving was now a fierce elemental that stood as tall as Huatli's clawfoot.
#figure(image("006_The Race, Part 1/11.jpg", width: 100%), caption: [Wildgrowth Walker | Art by <NAME>], supplement: none, numbering: none)
Tishana held out a foot as part of the wood formed a foothold. She stepped up, and grabbed the top of her new elemental mount.
"Follow me," she said.
Huatli swallowed. This was a woman of immense power.
She turned her own dinosaur and looked down over the sand to see a scene of absolute chaos. Some survivors were paddling out of the wreckage of the two ships, and a large patch of blood stained the white of the beach. A vampire was running into the thick of the jungle.
Huatli pointed toward the fleeing conquistador. "Inti, tail them! Track me into the rainforest when you finish chasing them off."
Inti tore off down the side of the rocks and into the jungle.
Huatli whistled a quick melody, hoping Teyeuh was not yet out of earshot. She silently thanked Teyeuh for remembering her training; Teyeuh heard the command and immediately turned to follow Inti and the vampire into the jungle.
#emph[Making a run for Orazca, no doubt, ] Huatli laughed to herself. #emph[Pathetic leech.]
The beginning of a poem blossomed in her mind as she trotted her clawfoot down the other side of the outcropping. She looked over the wrecked ships and mused on how her poem about this expedition would begin.
#emph[A ship crewed by leeches chased a ship crewed by fleas] #emph[. . .]
"Stop. Turn toward the river," Tishana yelled in command. The merfolk turned the elemental she was riding and bounded toward the river. Huatli followed suit, and stopped alongside Tishana.
Tishana sighed with the impatience of a busy scholar. "Someone is casting an illusion there, on the water."
Huatli looked past the merfolk's hand into the distance where the ocean water mingled with the river and found herself transfixed. The river was slow-moving and gentle. No waves disturbed its current, but there, a gentle wake was cutting through the water. There was no traceable source, and there was clearly nothing swimming underneath.
"It is . . . odd. Are you certain it is an illusion?" Huatli asked.
Tishana scoffed. "I've been casting illusions longer than you've been alive."
"But do you think one of the Legion of Dusk survivors did that?"
The merfolk shook her head. "Such illusions are beyond their mastery. I worry that this is a greater threat."
With no warning, the merfolk turned her elemental and bounded into the rainforest.
Huatli grunted with frustration and urged her mount to travel faster to follow. They ran into the thick of the jungle, keeping the strange wake of the river in sight.
Leaves and vines whipped past Huatli's face, and her heart sang with hope. Perhaps this #emph[was ] what she was supposed to do after all. Everything about this situation was new and uncomfortable, and Huatli was loath to admit that she was anxious, but things seemed to be working out well so far. To her knowledge, #emph[no ] River Herald had ever willingly worked with a Sun Empire warrior.
Tishana's assistance still felt #emph[extraordinarily ] strange. Huatli couldn't help but wonder if the merfolk planned to take advantage of her. It didn't help that she couldn't get a read on Tishana.
Huatli's clawfoot chirped in excitement. Its feet pounded a steady rhythm against the vegetation of the jungle floor.
"Has the Sun Empire heard the whispers?" Tishana yelled above the slap of leaves and rush of humid jungle air.
"Do you mean #emph[actual] whispers, or rumors?"
The merfolk ignored her request for clarification. "One of our own overheard a conversation on the outpost of High and Dry. We later corroborated it with word from one of #emph[yours] . There is a captain of the Brazen Coalition who possesses a compass that can locate the Golden City," Tishana said. "She has emerald skin, and—"
"—and hair that looks like vines?" Huatli finished.
The merfolk was silent. Only the pounding of her elemental's rock-and-wood feet against the jungle floor broke the quiet.
"I saw her in the wreckage," Huatli said. "If she possesses what you say she does, then that wake is certainly her."
"She must be a skilled illusionist." Tishana's eyes were trained on the wake in the river.
Huatli tightened the grip on her dinosaur's reins. "Then we must be ready. When the river narrows and they can go no further, we strike."
"We need their compass more than we need them dead," Tishana said.
"I do not intend to kill them," Huatli said with offended irritation.
Tishana tsked. "The essential mists of morning," she said with a sage nod.
Huatli bit the inside of her lip in frustration. "Please clarify what #emph[mists] —"
"The location of Orazca is a secret even to us."
Huatli's confidence cratered.
"You don't know where it is . . . at all?"
The merfolk glared back. "We know its general location."
Huatli clamped her mouth shut. She took a deep breath and did her best to hide her mounting frustration. "It is beyond the Sun Empire territory, though, yes?"
"It is over the mountain range that separates Pachatupa and Quetzatl, and across the lake after that."
Huatli referenced her mental topography. "North or south of Lost Vale?"
"South."
"And that is all you know?"
"Yes."
Huatli nodded. She felt in over her head.
#emph[We're going to need that compass.]
|
|
https://github.com/Tiggax/zakljucna_naloga | https://raw.githubusercontent.com/Tiggax/zakljucna_naloga/main/src/sec/5summary.typ | typst | #set heading(offset: 1)
#import "/src/additional.typ": todo
The model, which employs differential equations solved by the Runge-Kutta method, has proven effective in predicting key parameters such as cell density, nutrient consumption, and product concentration over time. The use of the Nelder-Mead algorithm for parameter optimization has further enhanced the model's accuracy by aligning simulations with empirical data.
The simulation provided several important insights. Currently, the model assumes 100% cell viability, representing an idealized scenario. Future iterations could benefit from integrating cell death rates to present a more realistic depiction of bioreactor conditions.
Additionally, the simulation of product formation based solely on cell density could be improved by considering additional factors such as nutrient concentrations, temperature variations, and the different stages of the cell life cycle.
The importance of precise oxygen dynamics modeling was also brought into the foreground.
While the current model uses Henry's law and a simple P controller, incorporating temperature-dependent constants and a full PID controller could enhance oxygen management accuracy.
Several recommendations for future work are proposed. Enhancing the viability model by incorporating mechanisms for apoptosis and necrosis would reflect non-ideal survival conditions and provide a more accurate model of cell viability.
Refining product formation models by including secondary metabolites and product degradation processes could simulate biopharmaceutical production more realistically.
Developing a detailed volumetric dissolution model and refining the PID control approach would optimize oxygen supply within the bioreactor.
These improvements will further increase the model's precision and practical applicability in real-world bioreactor operations.
In conclusion, this thesis provides a robust and adaptable framework for simulating and optimizing fed-batch bioreactors with CHO cells.
The proposed future improvements, such as incorporating more realistic viability models, refined product simulations, and advanced oxygen control, promise to further increase the model's accuracy and practical applicability in real-world bioreactor operations.
The findings and methodologies developed here contribute significantly to the field of bioprocess engineering, offering valuable tools for enhancing the efficiency and reliability of biopharmaceutical production.
|
|
https://github.com/Myriad-Dreamin/typst.ts | https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/bugs/bidi-tofus_00.typ | typst | Apache License 2.0 |
#import "/contrib/templates/std-tests/preset.typ": *
#show: test-page
#"\u{590}\u{591}\u{592}\u{593}"
#"\u{30000}\u{30001}\u{30002}\u{30003}"
|
https://github.com/7sDream/fonts-and-layout-zhCN | https://raw.githubusercontent.com/7sDream/fonts-and-layout-zhCN/master/template/page.typ | typst | Other | #import "consts.typ"
#import "util.typ"
#import "theme.typ": theme, code-highlighting
#import "components.typ": hr, note
#let __current_chapter_title(loc) = {
let current_page = loc.page()
let next_heading = util.query-first(
selector(heading.where(level: 1, outlined: true)),
loc, none,
)
if next_heading != none and next_heading.location().page() == current_page {
return next_heading.body
}
let prev_heading = util.query-last(
selector(heading.where(level: 1, outlined: true)),
none, loc,
)
if prev_heading == none {
return none
}
return prev_heading.body
}
#let __header = locate(loc => {
let current_page = loc.page()
let title = __current_chapter_title(loc)
if title == none {
return none
}
[
#block(spacing: 0pt)[
#if calc.odd(current_page) { h(1fr) }
#title
]
#block(above: 0.4em)[#hr()]
]
})
#let page_setting(doc) = [
#set page(fill: theme.bg) if util.is-pdf-target() and theme.bg != white
#set page(
..consts.size.pdf-page,
header: __header,
) if util.is-pdf-target()
#set page(
..consts.size.web-page,
) if util.is-web-target()
// 段落
#set par(first-line-indent: 0pt, justify: true, linebreaks: "optimized")
// 列表
#set list(marker: ([•], [◦], [‣]))
// 链接
#show ref: set text(fill: theme.link)
#show link: set text(fill: theme.link)
#show cite: set text(fill: theme.link)
// 脚注
#show footnote: set text(fill: theme.link)
#show footnote.entry: set text(size: consts.size.footnote)
#set footnote.entry(indent: 0pt, separator: line(length: 30%, stroke: 0.5pt + theme.main))
// 参考文献
#set bibliography(style: "gb-7714-2015-numeric")
// 图表
#set figure(placement: auto) if util.is-pdf-target()
#show figure: it => if util.is-web-target() { v(0.5em) + it + v(0.5em) } else { it }
#show figure.caption: it => align(left)[#note(it)]
// 代码块
#set raw(syntaxes: (
"/syntax/OpenType-Feature.sublime-syntax",
))
#set raw(theme: code-highlighting) if code-highlighting != none
#show raw.where(block: true): set block(
stroke: 1pt + theme.raw-stroke,
breakable: true,
width: 100%,
inset: 5pt,
)
#show raw.where(block: true): set par(justify: false)
// 表格
#set table(stroke: 1pt + theme.table-stroke)
#set table.hline(stroke: 1pt + theme.table-stroke)
#set table.vline(stroke: 1pt + theme.table-stroke)
#doc
]
|
https://github.com/Myriad-Dreamin/typst.ts | https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/meta/figure_00.typ | typst | Apache License 2.0 |
#import "/contrib/templates/std-tests/preset.typ": *
#show: test-page
#set page(width: 150pt)
#set figure(numbering: "I")
We can clearly see that @fig-cylinder and
@tab-complex are relevant in this context.
#figure(
table(columns: 2)[a][b],
caption: [The basic table.],
) <tab-basic>
#figure(
pad(y: -6pt, image("/assets/files/cylinder.svg", height: 2cm)),
caption: [The basic shapes.],
numbering: "I",
) <fig-cylinder>
#figure(
table(columns: 3)[a][b][c][d][e][f],
caption: [The complex table.],
) <tab-complex>
|
https://github.com/xsro/xsro.github.io | https://raw.githubusercontent.com/xsro/xsro.github.io/zola/typst/nlct/solution/1.1.typ | typst | #import "common.typ":exercise
#exercise(code:"1.1")[
A mathematical model that describes a wide variety of physical
nonlinear systems is the $n$th-order differential equation
$
y^"(n)"=g(t,y,dot(y),dots,y^"(n-1)",u)
$
where $u$ and $y$ are scalar variables.
With $u$ as input and $y$ as output, find a state model.
]
Solution:
Let $x_1=y$,$x_2=y^"(1)"$,$dots$,$x_n=y^"(n-1)"$
$
dot(x)_1&=x_2\
dot(x)_"n-1"&=x_n\
dot(x)_"n"&=g(t,x_1,dots,x_n,u)\
y&=x_1
$ |
|
https://github.com/jneug/typst-tools4typst | https://raw.githubusercontent.com/jneug/typst-tools4typst/main/get.typ | typst | MIT License |
#import "is.typ": all-of-type
// =================================
// Dictionaries
// =================================
/// Create a new dictionary from #args[values].
///
/// All named arguments are stored in the new dictionary as is.
/// All positional arguments are grouped in key/value-pairs and
/// inserted into the dictionary:
/// #codesnippet[```typ
/// #get.dict("a", 1, "b", 2, "c", d:4, e:5)
/// // gives (a:1, b:2, c:none, d:4, e:5)
/// ```]
///
/// // Tests
/// #test(
/// `get.dict("a", "b", "c") == (a:"b", c:none)`,
/// `get.dict("a", "b", "c", 4) == (a:"b", c:4)`,
/// `get.dict(a:"b", "c", 4) == (a:"b", c:4)`
/// )
///
/// - ..dicts (any): Values to merge into the dictionary.
/// -> dictionary
#let dict( ..dicts ) = {
let d = (:)
for i in range(1, dicts.pos().len(), step:2) {
d.insert(
str(dicts.pos().at(i - 1)),
dicts.pos().at(i)
)
}
if calc.odd(dicts.pos().len()) {
d.insert(dicts.pos().last(), none)
}
for (k, v) in dicts.named() {
d.insert(k, v)
}
return d
}
/// Recursivley merges the passed in dictionaries.
/// #codesnippet[```typ
/// #get.dict-merge(
/// (a: 1, b: 2),
/// (a: (one: 1, two:2)),
/// (a: (two: 4, three:3))
/// )
/// // gives (a:(one:1, two:4, three:3), b: 2)
/// ```]
///
/// // Tests
/// #test(
/// `get.dict-merge(
/// (a: 1, b: 2),
/// (a: (one: 1, two:2)),
/// (a: (two: 4, three:3))
/// ) == (a:(one:1, two:4, three:3), b: 2)`
/// )
///
/// Based on work by #{sym.at + "johannes-wolf"} for #link("https://github.com/johannes-wolf/typst-canvas/", "johannes-wolf/typst-canvas").
///
/// - ..dicts (dictionary): Dictionaries to merge.
/// -> dictionary
#let dict-merge( ..dicts ) = {
if all-of-type("dictionary", ..dicts.pos()) {
let c = (:)
for dict in dicts.pos() {
for (k, v) in dict {
if k not in c {
c.insert(k, v)
} else {
let d = c.at(k)
c.insert(k, dict-merge(d, v))
}
}
}
return c
} else {
return dicts.pos().last()
}
}
/// Creats a function to extract values from an argument sink #arg[args].
///
/// The resulting function takes any number of positional and
/// named arguments and creates a dictionary with values from
/// `args.named()`. Positional arguments to the function are
/// only present in the result, if they are present in `args.named()`.
/// Named arguments are always present, either with their value
/// from `args.named()` or with the provided value as a fallback.
///
/// If a #arg[prefix] is specified, only keys with that prefix will
/// be extracted from #arg[args]. The resulting dictionary will have
/// all keys with the prefix removed, though.
/// #sourcecode[```typ
/// #let my-func( ..options, title ) = block(
/// ..get.args(options)(
/// "spacing", "above", "below",
/// width:100%
/// )
/// )[
/// #text(..get.args(options, prefix:"text-")(
/// fill:black, size:0.8em
/// ), title)
/// ]
///
/// #my-func(
/// width: 50%,
/// text-fill: red, text-size: 1.2em
/// )[#lorem(5)]
/// ```]
///
/// // Tests
/// #test(
/// scope:(
/// fun: (..args) => get.args(args)("a", b:4),
/// fun2: (..args) => get.args(args, prefix:"pre-")("a", b:4)
/// ),
/// `fun(a:1, b:2) == (a:1, b:2)`,
/// `fun(a:1) == (a:1, b:4)`,
/// `fun(b:2) == (b:2)`,
/// `fun2(pre-a:1, pre-b:2) == (a:1, b:2)`,
/// `fun2(pre-a:1, b:2) == (a:1, b:4)`,
/// `fun2(pre-b:2) == (b:2)`
/// )
///
/// - args (arguments): Argument of a function.
/// - prefix (string): A prefix for the argument keys to extract.
/// -> dictionary
#let args(
args,
prefix: ""
) = (..keys) => {
let vars = (:)
for key in keys.pos() {
let k = prefix + key
if k in args.named() {
vars.insert(key, args.named().at(k))
}
}
for (key, value) in keys.named() {
let k = prefix + key
if k in args.named() {
vars.insert(key, args.named().at(k))
} else {
vars.insert(key, value)
}
}
return vars
}
/// Recursively extracts the text content of #arg[element].
///
/// If #arg[element] has children, all child elements are converted
/// to text and joined with #arg[sep].
///
/// // Tests
/// #test(
/// `get.text([Hello World!]) == "Hello World!"`,
/// `get.text(list([Hello], [World!]), sep:"-") == "Hello-World!"`,
/// `get.text(5) == "5"`,
/// `get.text(5.3) == "5.3"`,
/// `get.text((:)) == ""`,
/// `get.text(()) == ""`,
/// )
///
/// - element (any)
/// - sep (string, content)
/// -> string
#let text( element, sep: "" ) = {
if type(element) == "content" {
if element.has("text") {
element.text
} else if element.has("children") {
element.children.map(text).join(sep)
} else if element.has("child") {
text(element.child)
} else if element.has("body") {
text(element.body)
} else {
""
}
} else if type(element) in ("array", "dictionary") {
return ""
} else {
str(element)
}
}
/// Returns the color of #arg[stroke].
/// If no color information is available, `default` is used.
///
/// Compared to `stroke.paint`, this function will return a
/// color for any possible stroke definition (length, dictionary ...).
///
/// Based on work by #{sym.at + "PgBiel"} for #link("https://github.com/PgBiel/typst-tablex", "PgBiel/typst-tablex").
///
/// // Tests
/// #test(
/// `get.stroke-paint(2pt + green) == green`,
/// `get.stroke-paint(2pt) == black`,
/// `get.stroke-paint(red) == red`,
/// `get.stroke-paint((thickness:4pt), default:blue) == blue`,
/// `get.stroke-paint((paint:yellow), default:blue) == yellow`
/// )
///
/// - stroke (length, color, dictionary, stroke): The stroke value.
/// - default (color): A default color to use.
/// -> color
#let stroke-paint( stroke, default: black ) = {
if type(stroke) in ("length", "relative length") {
return default
} else if type(stroke) == "color" {
return stroke
} else if type(stroke) == "stroke" {
return stroke.paint
} else if type(stroke) == "dictionary" and "paint" in stroke {
return stroke.paint
} else {
return default
}
}
/// Returns the thickness of #arg[stroke].
/// If no thickness information is available, `default` is used.
///
/// Compared to `stroke.thickness`, this function will return a
/// thickness for any possible stroke definition (length, dictionary ...).
///
/// // Tests
/// #test(
/// `get.stroke-thickness(2pt + green) == 2pt`,
/// `get.stroke-thickness(2pt) == 2pt`,
/// `get.stroke-thickness(red) == 1pt`,
/// `get.stroke-thickness((thickness:4pt), default:5pt) == 4pt`,
/// `get.stroke-thickness((paint:yellow), default:5pt) == 5pt`
/// )
///
/// - stroke (length, color, dictionary, stroke): The stroke value.
/// - default (length): A default thickness to use.
/// -> length
#let stroke-thickness( stroke, default: 1pt ) = {
if type(stroke) in ("length", "relative length") {
return stroke
} else if type(stroke) == "color" {
return 1pt
} else if type(stroke) == "stroke" { // 2em + blue
stroke.thickness
} else if type(stroke) == "dictionary" and "thickness" in stroke {
return stroke.thickness
} else {
return default
}
}
/// Converts #arg[stroke] into a dictionary.
///
/// The dictionary will always have the keys `thickness`,
/// `paint`, `dash`, `cap` and `join`. If `stroke` is a dictionary
/// itself, all key/value-pairs are copied to the resulting stroke.
/// Any named arguments in `overrides` will override the previous values:
/// #codesnippet[```typ
/// #let stroke = get.stroke-dict(2pt + red, cap:"square")
/// ```]
///
/// // Tests
/// #test(
/// `get.stroke-dict(2pt + green) == (
/// thickness: 2pt,
/// paint: green,
/// dash: "solid",
/// cap: "round",
/// join: "round"
/// )`,
/// )
///
/// - stroke (length, color, dictionary, stroke): A stroke value.
/// - ..overrides (any): Overrides for the stroke.
/// -> dictionary
#let stroke-dict( stroke, ..overrides ) = {
let dict = (
paint: stroke-paint(stroke),
thickness: stroke-thickness(stroke),
dash: "solid",
cap: "round",
join: "round"
)
if type(stroke) == "dictionary" {
dict = dict + stroke
}
return dict + overrides.named()
}
/// Returns the inset (or outset) in a given #arg[direction], ascertained from #arg[inset].
///
/// // Tests
/// #test(
/// `get.inset-at(left, 4pt) == 4pt`,
/// `get.inset-at(left, (left: 4pt)) == 4pt`,
/// `get.inset-at(left, (x: 4pt)) == 4pt`,
/// `get.inset-at(left, (right: 4pt)) == 0pt`,
/// `get.inset-at(left, (right: 4pt), default:5pt) == 5pt`,
/// `get.inset-at(right, (right: 4pt), default:5pt) == 4pt`
/// )
///
/// - direction (string, alignment): The direction to get.
/// - inset (length, dictionary): The inset value.
/// - default (length): A default value.
/// -> length
#let inset-at( direction, inset, default: 0pt ) = {
direction = repr(direction) // allows use of alignment values
if type(inset) == "dictionary" {
if direction in inset {
return inset.at(direction)
} else if direction in ("left", "right") and "x" in inset {
return inset.x
} else if direction in ("top", "bottom") and "y" in inset {
return inset.y
} else if "rest" in inset {
return inset.rest
} else {
return default
}
} else if inset == none {
return default
} else {
return inset
}
}
/// Creates a dictionary usable as an inset (or outset) argument.
///
/// The resulting dictionary is guaranteed to have the keys `top`,
/// `left`, `bottom` and `right`. If `inset` is a dictionary itself,
/// all key/value-pairs are copied to the resulting inset.
/// Any named arguments in `overrides` will override the previous values.
///
/// // Tests
/// #test(
/// `get.inset-dict(4pt) == (right:4pt, left:4pt, top:4pt, bottom:4pt)`
/// )
///
/// - inset (length, dictionary): The base inset value.
/// - ..overrides (any): Overrides for the inset.
/// -> dictionary
#let inset-dict( inset, ..overrides ) = {
let dict = (
top: inset-at(top, inset),
bottom: inset-at(bottom, inset),
left: inset-at(left, inset),
right: inset-at(right, inset)
)
if type(inset) == "dictionary" {
dict = dict + inset
}
return dict + overrides.named()
}
/// Returns the alignment along the x-axis from #arg[align].
///
/// If none is present, #arg[default] is returned.
/// #codesnippet[```typc
/// get.x-align(top + center) // center
/// ```]
///
/// // Tests
/// #test(
/// `get.x-align(top + center) == center`,
/// `get.x-align(top) == left`,
/// `get.x-align(center) == center`
/// )
///
/// - align (alignment, 2d alignment): The alignment to get the x-alignment from.
/// - default (alignment): A default alignment.
/// -> alignment
#let x-align( align, default:left ) = {
if align in (left, right, center) {
return align
} else if type(align) == "alignment" and align.x != none {
return align.x
} else {
return default
}
}
/// Returns the alignment along the y-axis from #arg[align].
///
/// If none is present, #arg[default] is returned.
/// #codesnippet[```typc
/// get.y-align(top + center) // top
/// ```]
///
/// // Tests
/// #test(
/// `get.y-align(top + center) == top`,
/// `get.y-align(top) == top`,
/// `get.y-align(center) == top`
/// )
///
/// - align (alignment, 2d alignment): The alignment to get the y-alignment from.
/// - default (alignment): A default alignment.
/// -> alignment
#let y-align( align, default:top ) = {
if align in (top, bottom, horizon) {
return align
} else if type(align) == "alignment" and align.y != none {
return align.y
} else {
return default
}
}
|
https://github.com/VisualFP/docs | https://raw.githubusercontent.com/VisualFP/docs/main/SA/design_concept/content/results/results_requirement_validation.typ | typst | #import "@preview/tablex:0.0.5": tablex, cellx
#import "../../../acronyms.typ": *
= Requirement Validation <requirement_validation>
@functional_requirements and @non_functional_requirements defined 9 use cases and 2 #ac("NFR")s.
@requirement_validation_table shows which of these requirements were fulfilled during the project and which are still open.
#let validation_header(title) = cellx(align: center + horizon)[*#title*]
#let validation_result(id, requirement, result, level) = (
cellx(id),
cellx(requirement),
cellx(fill: level, result),
)
#let lightgreen = rgb(119, 221, 119)
#let lightyellow = rgb(255, 250, 160)
#let lightred = rgb(250, 160, 160)
#show figure: set block(breakable: true)
#figure(
tablex(
columns: (auto, 2fr, 2fr),
validation_header("ID"), validation_header("Requirement"), validation_header("Result"),
..validation_result("UC1", "Simple Function Composition", "Achieved in PoC", lightgreen),
..validation_result("UC2", "Function Execution", "This requirement is considered as out-of-scope for this project.", lightred),
..validation_result("UC3", "Recursive Function Composition", "Achieved in PoC", lightgreen),
..validation_result("UC4", "Function Composition using Higher-Order Functions", "Achieved in PoC", lightgreen),
..validation_result("UC5", "Curried Functions", "Achieved in PoC", lightgreen),
..validation_result("UC6", "Function Composition using Lists", "Achieved in PoC", lightgreen),
..validation_result("UC7", "Data Type Composition", "This requirement is considered as out-of-scope for this project.", lightred),
..validation_result("UC8", "Save Source File", "This requirement is considered as out-of-scope for this project.", lightred),
..validation_result("UC9", "Open Source File", "This requirement is considered as out-of-scope for this project.", lightred),
..validation_result("NFR1", "Platform Compatibility", "The PoC application can be executed on all target platforms. The app's compatibility could be improved by switching to a GHCJS-based UI technology.", lightgreen),
..validation_result("NFR2", "Learnability", [This requirement was achieved with some notes. A more detailed explanation can be found in @validation-nfr2], lightgreen)
),
supplement: "Table",
kind: "table",
caption: "Requirement verification"
) <requirement_validation_table>
The project's main focus was to create a visual concept for function composition and prove that it is feasible with a #ac("PoC") application.
As can be seen in @requirement_validation_table, all requirements related to function composition have been achieved.
Due to time constraints, the requirements UC2, UC7, UC8 and UC9 had to be considered as out-of-scope.
However, during the implementation of the type inference engine, UC7 was kept in mind so that custom data types could be added without much effort.
=== Validation of NFR2 <validation-nfr2>
The non-functional requirement NFR2, as described in @nfr2, states that a user
that isn't familiar with functional programming should be able to use VisualFP
within 1 hour.
This requirement was validated by showcasing the #ac("PoC") to <NAME>, a
software engineer at Hamilton Bonaduz AG. Samuel is a seasoned software
developer but isn't familiar with functional programming.
He was able to use VisualFP within 1 hour, so we deem the requirement to be
achieved.
Still, the trial pointed out some aspects that are worth to be noted for future
development on the project:
- As he wasn't familiar with the function notation used by Haskell, he wasn't
able to make use of type hints (type-holes, function signatures, etc) without
additional explanation.
- He also wasn't familiar with the `cons` and `nil` construction of lists,
additional explanation was necessary before he could use it.
- He would have liked to execute his created values.
- After the showcase, the envisioned outlooks were presented to him. He liked
the option of the visual and textual language (@outlook-visual-textual) very
much.
These shortcomings could be fixed by adding a getting-started tour for beginners, which would explain the different UI components, provide a tutorial for value construction, and explain Haskell's function type notation.
In addition, block values provided by VisualFP could feature a brief description.
|
|
https://github.com/jens-hj/ds-exam-notes | https://raw.githubusercontent.com/jens-hj/ds-exam-notes/main/lectures/13.typ | typst | #import "../lib.typ": *
#show link: it => underline(emph(it))
#set math.equation(numbering: "(1)")
#set enum(full: true)
#set math.mat(delim: "[")
#set math.vec(delim: "[")
#set list(marker: text(catppuccin.latte.lavender, sym.diamond.filled))
#show heading.where(level: 1): it => text(size: 22pt, it)
#show heading.where(level: 2): it => text(size: 18pt, it)
#show heading.where(level: 3): it => {
text(size: 14pt, mainh, pad(
left: -0.4em,
gridx(
columns: (auto, 1fr),
align: center + horizon,
it, rule(stroke: 1pt + mainh)
)
))
}
#show heading.where(level: 4): it => text(size: 12pt, secondh, it)
#show heading.where(level: 5): it => text(size: 12pt, thirdh, it)
#show heading.where(level: 6): it => text(thirdh, it)
#show emph: it => text(accent, it)
#show ref: it => {
//let sup = it.supplement
let el = it.element
if el == none {
it.citation
}
else {
let eq = math.equation
// let sup = el.supplement
if el != none and el.func() == eq {
// The reference is an equation
let sup = if it.fields().at("supplement", default: "none") == "none" {
[Equation]
} else { [] }
// [#it.has("supplement")]
show regex("\d+"): set text(accent)
let n = numbering(el.numbering, ..counter(eq).at(el.location()))
[#sup #n]
}
else if it.citation.has("supplement") {
if el != none and el.func() == eq {
show regex("\d+"): set text(accent)
let n = numbering(el.numbering, ..counter(eq).at(el.location()))
[#el.supplement #n]
}
else {
text(accent)[#it]
}
}
}
}
=== Fog/Edge Storage
- Mobile devices
- Storage and delivery of content in peer devices at the network edge
- Potential reduction in latency
- Potential increase of data rates
==== Mobile
- Each device generates some data
- If a device is lost, the data from that device is lost if nothing clever is done
- Other neighbouring devices can store the data
- Replicas bad, because of storage and bandwidth costs
- Repairing a lost device is _very_ expensive
- Erasure codes are better
- Model as multicast flow problem, see slides
*MSR Repair: Repair with no new-comer nodes*
- See slides
#image("../img/12/fe-simple.png")
#report-block[
What does "min-cut" mean for multicast flow problems?
]
|
|
https://github.com/maxgraw/bachelor | https://raw.githubusercontent.com/maxgraw/bachelor/main/apps/document/src/main.typ | typst | #import "template.typ": *
#show: project.with(
title: "Konzeption und Entwicklung einer Augmented Reality Konstruktionsumgebung für Möbelsysteme auf Basis von WebXR",
type: "Bachelorarbeit",
course: "Mensch Technik Interaktion",
author: "<NAME>",
number: "10012985",
date: "28.05.2024",
logo: image("./media/logo/hrw.jpg", width: 40%),
)
#include "0-base/0-index.typ"
#set page(numbering: "1", number-align: right)
#counter(page).update(1)
#show raw.where(block: true): set block(
breakable: false,
fill: luma(240),
inset: 5pt,
radius: 4pt,
width: 100%,
)
#set heading(numbering: "1.1", supplement: [Abschnitt])
= Einleitung
#include "1-introduction/0-index.typ"
= Theoretische Grundlagen
#include "2-theory/0-index.typ"
= Stand der Technik
#include "3-state/0-index.typ"
= Konzeptentwicklung
#include "4-concept/0-index.typ"
= Implementierung
#include "5-implementation/0-index.typ"
= Evaluation
#include "6-evaluation/0-index.typ"
= Zusammenfassung und Ausblick
#include "7-conclusion/0-index.typ"
#pagebreak()
#bibliography(("./bib/base.yml", "./bib/current-studies.yml", "./bib/ikea.yml", "./bib/wayfair.yml", "./bib/webxr.yml", "./bib/webgl.yml", "./bib/frameworks.yml", "./bib/interfaces.yml", "./bib/shop-interface.yml", "./bib/implementation.yml", "./bib/evaluation.yml"))
#set heading(numbering: none)
#let appendix(body) = {
set heading(numbering: "1.1", supplement: [Anhang])
counter(heading).update(1)
body
}
#pagebreak()
= Anhangsverzeichnis
#outline(indent: auto, title: none, target: heading.where(supplement: [Anhang]))
#pagebreak()
#show: appendix
#show raw.where(block: true): set block(
breakable: true,
)
#include "8-appendix/0-index.typ" |
|
https://github.com/adam-zhang-lcps/papers | https://raw.githubusercontent.com/adam-zhang-lcps/papers/main/toilet-paper-challenge-problem.typ | typst | Creative Commons Attribution Share Alike 4.0 International | #set document(
title: "Challenge Problem: Toilet Paper Roll",
author: "<NAME>",
date: datetime.today(),
)
#set page(paper: "us-letter")
#set text(font: "New Computer Modern")
#set quote(block: true)
#show quote: set pad(x: 2em)
#align(center)[
#text(size: 24pt)[Challenge Problem: Toilet Paper Roll]
]
= Purpose
The purpose of this experiment is to predict the falling rate of an unrolling
toilet paper roll. The success of the calculations will be determined by a
video recording of an unrolling roll and a falling roll dropped from different
heights.
= Materials
In solving this problem, the following materials were used:
- Two toilet paper rolls
- Meter stick
- Scale
- 30 FPS Camera
= Procedure
+ Measure the outer radius of the toilet paper roll. Record the value in
@measurements.
+ Measure the inner (hollow) radius of the toilet paper roll. Record the value
in @measurements.
+ Measure the mass of the toilet paper roll using the scale. Record the value in
@measurements.
+ Use the measured values to calculate the height to drop the held roll from to
match the fall time of the free-falling roll.
+ Drop the two rolls from their respective heights. Record the fall using the
camera.
+ Determine the maximum possible $Delta t$ between the two rolls impacting the
ground using the difference in frames from the video.
= Calculations
== Part 1
#grid(
columns: (auto, auto),
rows: 30%,
quote(
attribution: [from the problem handout],
)[
A toilet paper roll, dropped while holding the paper will #emph()[not] fall
with an acceleration of $g=9.8"m/s/s"$. Using your new knowledge of torque and
using the extended free body diagram for the roll, determine the actual linear
acceleration that the roll would experience. Write your result in terms of $g$
and numerical constants such as measured dimensions of the toilet paper roll.
],
figure(caption: [Diagram from Problem Handout])[
#image("assets/toilet-paper-challenge-problem/diagram.png")
],
)
=== Rotational Inertia
First, the rotational inertia of the toilet paper roll must be calculated for
the next part.
$ I = integral x^2 dif m $
For a partially-hollow cylinder, rotational inertia can be calculated using
volumetric density:
$ phi = m/V $
$ I = integral x^2 phi dif V $
Substituting an expression for change in volumetric density is as follows:
$ I = integral x^2 phi dot 2 pi x h dif x $
Since the mass of a partially-hollow cylinder is contained within two rings,
the bounds of integration are from the inner ring to the outer ring.
$ I &= integral_r^R x^2 phi dot 2 pi x L dif x \
&= 2 phi pi L integral_r^R x^3 dif x $
Integrating yields the following:
$ I &= 2 phi pi L dot (1/4 R^4 - 1/4 r^4) \
&= 1/2 dot m/V dot pi dot L dot (R^4 - r^4) \
&= 1/2 dot m/(pi L (R^2 - r^2)) dot pi L dot (R^4 - r^4) \
&= 1/2 m dot (R^4 - r^4)/(R^2 - r^2) \
&= 1/2 m dot ((R^2 + r^2)(R^2 - r^2))/(R^2 - r^2) \
&= 1/2 m (R^2 + r^2) $
=== Acceleration Function <accel-function>
Applying Newton's 2nd Law for both the translational and rotational motion
yields the following two equations:
$ a = F_"net"/m "and" alpha = tau_"net"/I $
Linear acceleration can be solved from rotational acceleration:
$ alpha = a/R $
$ a = alpha R = (tau_"net" R)/I $
Since the tension force from the held toilet paper is the only torque exerted
on the rotating system, $tau_"net" = limits(T)^arrow R$. // TODO there has to be a better way to do vector notation?
$ a = (limits(T)^arrow R^2)/I $
The translational acceleration equation can then be solved for $limits(T)^arrow$.
$ a = F_"net"/m = (m g - limits(T)^arrow)/m $
$ limits(T)^arrow = m(g-a) $
$limits(T)^arrow$ can then be substituted into the earlier equation.
$ a = (m(g-a) R^2)/I $
Solving for $a$ yields the following:
$ a = (m g R^2)/(I + m R^2) $
Finally, substituting in rotational inertia results in the following:
$ a &= (m g R^2)/(1/2 m (r^2 + R^2) + m R^2) \
&= (2 g R^2)/(r^2 + R^2 + 2R^2) \
&= (2 g R^2)/(r^2 + 3R^2) $
== Part 2 <drop-height-calculations>
#quote(
attribution: [from the problem handout],
)[
If another roll is dropped without being held (accelerating under free fall)
from $1"m "$, from what height should the held roll be dropped so that, if
released at the same time, they hit the ground simultaneously?
]
Since the falling toilet paper roll experiences uniform acceleration and
begins falling from rest, the time which it takes to reach the ground can be
calculated using the following basic kinematic equation.
$ Delta y_"free" = 1/2 g t^2 $
The equation can then be solved for $t$.
$ t = sqrt((2 Delta y_"free")/g) $
Since the drop height of the held roll also experiences near-uniform
acceleration, the drop height can be calculated using the same equation as
above, substituting in the time from the above drop.
$ Delta y_"held" &= 1/2 a t^2 \
&= 1/2 a (sqrt((2 Delta y_"free")/g))^2 \
&= a/2 dot (2 Delta y_"free")/g \
&= (a Delta y_"free")/g $
= Results
== Measurements
#figure(caption: [Toilet Paper Roll Measurements])[
#table(
columns: (auto, auto),
align: (right, left),
[Outer Radius ($R$)],
[0.054m],
[Inner Radius ($r$)],
[0.020m],
[Mass ($m$)],
[0.175kg],
)
] <measurements>
== Calculations
=== Part 1
Substituting measured values into the #link(label("accel-function"))[previously calculated acceleration function] results
in the following:
$ a &= (2 dot 9.8"m/s"^2 dot 0.054^2"m "^2)/(0.020^2"m "^2 + 3 dot 0.054^2"m "^2) \
&= 6.249 "m/s"^2 $
=== Part 2
Substituting measured values as well as the acceleration calculated above into
the #link(label("drop-height-calculations"))[drop height equation] yields the
following:
$ Delta y_"held" &= (6.249 "m/s"^2 dot 1"m ")/(9.8"m/s"^2) \
&= 0.638"m " $
== Drops
Both toilet paper rolls were dropped from their respective calculated heights
to validate the results obtained in this experiment. As predicted, both rolls
impacted the floor nearly simultaneously—impact occurred on the same frame of
the 30 FPS video captured, satisfying the goal of this experiment.
@impact-frame shows the frame of the video during which both rolls impacted
the floor. The full video is available online #link(
"https://drive.google.com/file/d/1hEyK2Em6v7i22vvdASuWQ_-FS7laz5oN/view?usp=drive_link",
)[here].
Since both rolls impacted the floor within one frame of a 30 FPS video, the
margin of error between their contact, $Delta t$, is at most $33.3"ms"$.
#figure(
caption: [Frame of Impact for Both Rolls],
)[
#image("assets/toilet-paper-challenge-problem/impact.png", height: 50%)
] <impact-frame>
|
https://github.com/jgm/typst-hs | https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compute/calc-22.typ | typst | Other | // Error: 12-14 cannot take square root of negative number
#calc.sqrt(-1)
|
https://github.com/TypstApp-team/typst | https://raw.githubusercontent.com/TypstApp-team/typst/master/tests/typ/layout/list-attach.typ | typst | Apache License 2.0 | // Test list attaching.
---
// Test basic attached list.
Attached to:
- the bottom
- of the paragraph
Next paragraph.
---
// Test that attached list isn't affected by block spacing.
#show list: set block(above: 100pt)
Hello
- A
World
- B
---
// Test non-attached list followed by attached list,
// separated by only word.
Hello
- A
World
- B
---
// Test non-attached tight list.
#set block(spacing: 15pt)
Hello
- A
World
- B
- C
More.
---
// Test that wide lists cannot be ...
#set block(spacing: 15pt)
Hello
- A
- B
World
---
// ... even if forced to.
Hello
#list(tight: false)[A][B]
World
|
https://github.com/Myriad-Dreamin/shiroa | https://raw.githubusercontent.com/Myriad-Dreamin/shiroa/main/packages/shiroa/template-theme.typ | typst | Apache License 2.0 |
#import "sys.typ": target
#let book-theme-from(preset, xml: xml, target: target) = {
// todo: move theme style parser to another lib file
let theme-target = if target.contains("-") {
target.split("-").at(1)
} else {
"light"
}
let theme-style = preset.at(theme-target)
let is-dark-theme = theme-style.at("color-scheme") == "dark"
let is-light-theme = not is-dark-theme
let main-color = rgb(theme-style.at("main-color"))
let dash-color = rgb(theme-style.at("dash-color"))
let code-theme-file = theme-style.at("code-theme")
let code-extra-colors = if code-theme-file.len() > 0 {
let data = xml(theme-style.at("code-theme")).first()
let find-child(elem, tag) = {
elem.children.find(e => "tag" in e and e.tag == tag)
}
let find-kv(elem, key, tag) = {
let idx = elem.children.position(e => "tag" in e and e.tag == "key" and e.children.first() == key)
elem.children.slice(idx).find(e => "tag" in e and e.tag == tag)
}
let plist-dict = find-child(data, "dict")
let plist-array = find-child(plist-dict, "array")
let theme-setting = find-child(plist-array, "dict")
let theme-setting-items = find-kv(theme-setting, "settings", "dict")
let background-setting = find-kv(theme-setting-items, "background", "string")
let foreground-setting = find-kv(theme-setting-items, "foreground", "string")
(bg: rgb(background-setting.children.first()), fg: rgb(foreground-setting.children.first()))
} else {
(bg: rgb(239, 241, 243), fg: none)
}
(
style: theme-style,
is-dark: is-dark-theme,
is-light: is-light-theme,
main-color: main-color,
dash-color: dash-color,
code-extra-colors: code-extra-colors,
)
}
|
https://github.com/Clamentos/FabRISC | https://raw.githubusercontent.com/Clamentos/FabRISC/main/src/spec/Macros.typ | typst | Creative Commons Attribution Share Alike 4.0 International | ///
#import "@preview/tablex:0.0.5": tablex, colspanx, rowspanx
///
#let comment(body) = {
v(10pt)
line(length: 100%, stroke: 0.5pt)
emph(body)
line(length: 100%, stroke: 0.5pt)
v(10pt)
}
///..
#let section(title, ..body) = {
text(18pt)[#heading(level: 1, title)]
v(14pt)
for text in body.pos() { par(text) }
}
///..
#let subSection(title, ..body) = {
text(16pt)[#heading(level: 2, title)]
v(12pt)
for text in body.pos() { par(text) }
}
///..
#let subSubSection(title, ..body) = {
text(14pt)[#heading(level: 3, title)]
v(10pt)
for text in body.pos() { par(text) }
}
///..
#let tableWrapper(tableCaption, table) = {
v(10pt)
align(center, figure(table, caption: tableCaption))
v(10pt)
}
///..
#let monospace(text) = {
$mono(text)$
}
///..
#let middle(text) = {
align(center, text)
}
///
|
https://github.com/HEIGVD-Experience/docs | https://raw.githubusercontent.com/HEIGVD-Experience/docs/main/S4/ARO/docs/TE/TE2.typ | typst | #import "/_settings/typst/template-te.typ": *
#show: resume.with(
"Résumé ARO - TE2",
"<NAME>",
cols: 2
)
= Pipeline
== Découpage des instructions
Découpage d’une instruction
- *Fetch* : Recherche d’instruction
- *Decode* : Décodage instruction & lecture registres opérandes
- *Execute* : Exécution de l’opération / calcul adresse mémoire
- *Memory* : Accès mémoire / écriture PC de l’adresse de saut
- *Write back* : Écriture dans un registre du résultat de l’opération
== Calcul de métriques
=== Formule séquentielle vs pipeline
$
T_e &= "temps de passage à chaque étape" \
T_p = n * T_e &= "temps de passage pour n étapes" \
T_t = m * T_p &= "temps total pour m personnes" \ \
T_t &= n * m * T_e
$
=== Formule pipeline
$
T_t = n * T_e + (m - 1) * T_e
$
=== Nombre de cycles d'horloges
$
T_t / T_e = n + m - 1
$
=== Débit
Nombre d’opérations (tâches, instructions) exécutées par unités de temps.
#image("/_src/img/docs/image copy 43.png")
=== Latence
Temps écoulé entre le début et la fin d’exécution de la tâche (instruction).
#image("/_src/img/docs/image copy 42.png")
=== IPC
Instructions Per Cycle : nombre d’instructions exécutées par cycle d’horloge.
$
"IPC" = 1 / ("ratio instruction sans arret" * 1 + "ratio instruction avec arret" * ("nb opération"))
$
=== Accélération
Accélération: nombre de fois plus vite qu’en séquentiel.
$
A = frac(T_s, T_p) = frac(m * n * T_e, (n + m - 1) * T_e) = frac(m * n, n + m -1) " " ~ " " n " (pour m très grand)"
$
- $T_t$ : temps total
- $m$ : nombre d'instructions fournies au pipeline
- $n$ : nombre d'étages du pipeline (MIPS, ARM = 5)
- $T_e$ : temps de cycle d'horloge ($= 1 / "Fréquence horloge"$)
#linebreak()
#image("/_src/img/docs/image copy 91.png")
#colbreak()
= Pipelining aléas
== Résolution d'aléas
Arrêt de pipeline (hardware/software)
*Hardware* : Arrêter le pipeline (stall/break) -> dupliquer les opérations bloquées.
*Software* : Insérer des NOPs (no operation).
== Sans forwarding
Les règles de gestion des aléas sont les suivantes :
- Si l'instruction dépend d'une *valeur calculée par une instruction précédente* (RAW) nous devons attendre que l'opération *write-back soit terminée*.
- Dans le cas ou nous avons des dépendances de données (WAW ou WAR) cela n'impacte pas le pipeline.
*Attention* dans le cas d'aléas structurels, nous ne pouvons pas faire d'opération *Memory Access (M)* et *Fetch (F)* en même temps.
== Avec forwarding
#image("/_src/img/docs/image copy 90.png")
Les règles de gestion des aléas sont les suivantes :
- Si l'instruction suivante dépend d'une valeur calculée par une instruction précédente, la valeur sera directement disponible dans le bloc *Execute*.
- Si un *LOAD* est fait, la valeur sera accesible directement après le bloc *Memory* dans le bloc *Execute*, donc pas besoin d'attendre jusqu'au bloc *Write Back*.
#image("/_src/img/docs/image copy 92.png")
= Taxonomie de Flynn
Classification basée sur les notions de flot de contrôle
- 2 premières lettres pour les instructions, I voulant dire Instruction, S - Single et M - Multiple
- 2 dernières lettres pour le flot de données avec D voulant dire Data, S – Single et M - Multiple
#image("/_src/img/docs/image copy 39.png")
== SISD
Machine SISD (Single Instruction Single Data) = Machine de «Von Neuman».
- Une seule instruction exécutée et une seule donnée (simple, non‐structurée) traitée.
== SIMD
Plusieurs types de machine SIMD : parallèle ou systolique.
- En général l'exécution en parallèle de la même instruction se fait en même temps sur des processeurs différents (parallélisme de donnée synchrone).
== MISD
Exécution de plusieurs instructions en même temps sur la même donnée.
== MIMD
Machines multi-processeurs où chaque processeur exécute son code de manière asynchrone et indépendante.
- S’assurer la cohérence des données,
- Synchroniser les processeurs entre eux, les techniques de synchronisation dépendent de l'organisation de la mémoire. |
|
https://github.com/enseignantePC/2023-24 | https://raw.githubusercontent.com/enseignantePC/2023-24/master/Chapitre1/chap1.typ | typst | #import "../chapter_template.typ": *
#show : it => chapitre(
title: [ Identification des espèces chimiques. ],
objectifs: (
[Notions d'entités et d'espèce chimiques.],
[Apprendre à identifier des espèces chimiques.],
[Corps purs, mélanges.],
[Masse volumique et densité.],
[Température de changement d'état.],
),
number: 1,
it,
columnized: false,
)
#let doc = doc.with(boxed: true)
#set text(12pt)
= Corps purs et mélanges
#doc(
title: [Espèces chimiques],
)[
La matière est constituée d'entités chimiques
(molécules, atomes, ions).
Une *_espèce chimique_* est un ensemble d'entités
chimiques identiques.
Une espèce chimique est caractérisée par sa
formule, son aspect physique (état physique à
température ambiante, couleur, odeur, etc.) et ses
propriétés physiques (température de fusion, d'
ébullition, masse volumique, indice de réfraction,
etc.) et ses propriétés chimiques.
Exemples d'espèces chimiques : l'eau, l'acide
acétique, le cuivre, le chlorure de sodium.
Un *_mélange_* est constitué de plusieurs espèces
chimiques différentes.
]
#doc(
title: [Corps purs simples et corps purs composés],
// boxed: false,
)[
*_Un corps pur_* est constitué d'une seule espèce
chimique.
On distingue deux types de corps purs : les corps
purs simples et les corps purs composés.
Un *_corps pur simple_* est constitué d'un seul type d'
atomes.
Exemple : l'argent Ag, le charbon C, le dioxygène
O2.
*_Un corps pur composé_* est un corps pur qui est
constitué de plusieurs types d'atomes. Ces atomes
différents restent dans des proportions bien
définies dans le corps pur considéré.
Exemples : - l'eau $H_2O$, l'éthanol $C_2H_6O$
- le sel (( $"Na"^+$; $"Cl"^-$ ) : chlorure de
sodium).
]
#doc(
title: [Mélanges homogènes et hétérogènes],
// boxed : false,
)[
Lorsque plusieurs espèces chimiques sont
mélangées, elles peuvent former deux types de
mélanges : un mélange *_homogène_* ou *_hétérogène_*.
Un mélange homogène est constitué d'une seule
phase.
Exemple : l'acier est un mélange homogène de
carbone et de fer. C'est un alliage. Le thé est aussi un mélange homogène.
Des liquides sont miscibles lorsqu'ils se
mélangent l'un avec l'autre pour former un mélange
homogène.
Exemple : l'eau et l'éthanol sont deux liquides
miscibles en toutes proportions ; ils forment un
mélange homogène et il est alors impossible de
distinguer l'un de l'autre dans la solution
résultante.
Un mélange hétérogène est constitué de plusieurs
phases (solide, liquide, gaz), c'est-à-dire
plusieurs corps que l'on peut distinguer.
Exemple : l'eau et le fer en poudre forment un
mélange hétérogène.
Des liquides ne sont pas miscibles lorsqu'ils
forment un mélange hétérogène, constitué de
plusieurs phases distinctes (doc. 3).
]
= Propriétés physiques des espèces chimiques
#doc(
title: [Masse volumique et densité],
)[
Une espèce chimique est caractérisée par sa masse
volumique, ou par sa densité, qui dépend de son
état physique.
Selon son état physique, la masse volumique d'un
échantillon peut considérablement varier.
La masse volumique $rho$ d'un échantillon de matière
est une grandeur égale au quotient de sa masse m
par le volume V qu'il occupe. Elle est donc
définie par la relation : #text(size : 1.5em)[$rho = m/V$]
Dans cette expression, la masse s'exprime en
gramme (g), le volume en centimètre cube (cm3) et
la masse volumique en gramme par centimètre cube
(g·cm-3).
La densité est une grandeur sans unité. La densité
d'un liquide ou d'un solide est égale au quotient
de la masse volumique de l'échantillon par la
masse volumique de l'eau.
La densité est donc définie par la relation : #text(size : 1.5em)[$d = rho/rho_"eau"$]
#v(4pt)
]
// https://www.lelivrescolaire.fr/page/6224013
#doc(
boxed : false,
title: [Température de changement d'état],
)[
Le passage de la matière d'un état à un autre
(solide, liquide ou gazeux) est appelé changement
d'état. Pour un corps pur, il se produit à une
température donnée, qui dépend de l'espèce
chimique constituant le corps pur.
Le passage de l'état solide à liquide (ou liquide
à solide) se produit à la température de fusion,
notée $theta_f$.
Le passage de l'état liquide à l'état gazeux (ou
de gazeux à liquide) se produit à la température d'
ébullition, notée $theta_e$
]
// #pagebreak() // uncomment and bug report
#columns(2)[
#doc(title: [Solubilité], breakable : false)[
La solubilité s (exprimée en g·L-1) d'une espèce chimique (solide, liquide ou gaz) correspond à la masse maximale de cette espèce que l'on peut dissoudre dans un litre de solution (généralement de l'eau).
La solubilité dépend de la température et de la nature de la solution.
]
#colbreak()
#figure(image("etat.png", width: 80%))
]
#doc(title : [Densité et flottaison])[
La densité d'un échantillon permet de savoir s'il coule ou s'il flotte dans l'eau. Un échantillon, non miscible, dont la densité est supérieure à 1 coule dans l'eau. Un échantillon, non misible, dont la densité est inférieure à 1 flotte dans l'eau.
]
= Identification d'espèces chimiques
#doc(title : [Identification par les propriétés physiques])[
On peut identifier une espèce chimique par ses caractéristiques physiques (aspect, couleur), mais surtout par ses propriétés physiques.
Pour identifier une espèce chimique, il faut comparer ses propriétés physiques à celles qui sont référencées (voir l'énoncé, les fiches de sécurité du NIOSH, le livre Handbook of Chemistry ou Wikipedia).
Exemple : pour déterminer expérimentalement la température d'ébullition, de fusion, la masse volumique ou la solubilité dans un solvant, on compare la valeur obtenue avec celles fournies dans les tables de référence.
]
#columns(
2,
)[
#doc(
title: [Identification par des tests chimiques],
boxed: false,
)[
Il existe des tests chimiques qui permettent de
reconnaître la présence de certaines espèces
chimiques.
]
#colbreak()
#figure(
image(
"tests_chimiques.png",
width: 100%,
),
)
]
// #doc(
// title: [],
// )[]
|
|
https://github.com/julyfun/fr-art-test | https://raw.githubusercontent.com/julyfun/fr-art-test/main/exam.typ | typst | #import "@preview/ttt-exam:0.1.2": *
#set text(size: 12pt, font: ("Rubik"), weight: 300, lang: "fr")
#show: exam.with(
..toml("meta.toml").info,
logo: image("sjtu.png"),
cover: true, // true or false
eval-table: false, // true or false
appendix: none, // content or none
)
= Partie 1: Création artistique (40 PTs)
#assignment[
Dessiner et expliquer.
#question(points: 20)[
Utilisez un crayon pour dessiner deux tableaux d'encadrement de votre environnement actuel, montrant les caractéristiques du rococo dans le premier et les caractéristiques du cubisme dans le second.
]
#figure(answer(field: box(radius: 3pt, stroke: 0.5pt, width: 36em, height: 24em)[])[])
#figure(answer(field: box(radius: 3pt, stroke: 0.5pt, width: 36em, height: 24em)[])[])
#question(points: 20)[
Rédigez une analyse de chacun d'eux en 80 mots environ.
]
#answer(field: lines(10))[Les peintures doivent refléter les caractéristiques suivantes. Caractéristiques du rococo : légèreté, grâce et élégance, primauté de la décoration. Caractéristiques du cubisme : Fragmentation et géométrisation des formes, utilisation de la couleur, abstraction et recherche de la "vérité" de l'objet.]
]
= Partie 2: Questionnaire à choix multiple (30 PTs)
#let _multiple-choice(distractors: (), answer: (), dir: ttb) = {
let answers = if (type(answer) == array ) { answer } else { (answer,) }
let choices = (..distractors, ..answers)
choices = shuffle(choices).map(choice => {
box(inset:(x:0.5em))[
#context {
let is-solution = _solution.get() and choice in answers
checkbox(fill: if is-solution { red }, tick: is-solution )
}
]; choice;
})
stack(dir:dir, spacing: 1em, ..choices)
}
#let multiple-choice(..args, dir: ttb) = {
// assertions
let data = args.named()
assert(type(data) == dictionary, message: "expected data to be a dictionary, found " + type(data))
let keys = data.keys()
assert("prompt" in keys, message: "could not find prompt in keys");
assert("distractors" in keys, message: "could not find distractors in keys");
assert("answer" in keys, message: "could not find answer in keys");
// create output
block(breakable: false,
question(points: { 3 })[
#data.prompt
#_multiple-choice(
distractors: data.distractors,
answer: data.answer,
dir: dir //if data.at("dir", default: none) != none { data.at("dir") } else { ttb }
)
// show hint if available.
#if ("hint" in data.keys()) {
strong(delta: -100)[Hint: #data.at("hint", default: none)]
}
]
)
}
== Introduction aux arts français
#multiple-choice(
prompt: [
Choisissez des artistes français parmi les artistes suivants.],
distractors: (
"<NAME>", "<NAME>", "<NAME>"
),
answer: (
"<NAME>"
),
dir: ltr,
)
#multiple-choice(
prompt: [
Quelle ville française est célèbre pour le site culturel qui porte son nom ?
],
distractors: (
"Lourdes", "Toulouse", "Saint-Gaudens"
),
answer: (
"Aurignac",
),
dir: ltr,
)
#figure(image("img/001.png", height: 200pt))
#multiple-choice(
prompt: [
Quel type d’outil le motif du tableau est-il le plus susceptible de représenter ?
],
distractors: (
"un totem",
"un ornement",
"une sorte de panneau routier",
),
answer: (
"une arme"
),
dir: ltr,
)
#figure(image("img/002.png", height: 200pt))
#multiple-choice(
prompt: [Quelle(s) caractéristique(s) de "Le Cri" de <NAME> correspond(ent) à l'expressionnisme ?],
distractors: (
"Le thème de la nature paisible et sereine",
"Le réalisme dans la représentation des personnages",
"L'absence de détails et la simplification des formes",
),
answer: (
"L'utilisation de couleurs vives et non-naturalistes",
"La perspective déformée et la figure déséquilibrée",
),
dir: ttb,
)
#figure(image("img/003.png", height: 200pt))
#multiple-choice(
prompt: [Lors de l’analyse de la composition de la Joconde, les méthodes de segmentation applicables sont ?],
distractors: (
"Division en réticule",
"division diagonale",
"Diviser en tiers",
"Divisé en cinq parties égales",
),
answer: (
),
dir: ttb,
)
#multiple-choice(
prompt: [Quelles caractéristiques de "L'École d'Athènes" de Raphaël reflètent l'esprit de la Renaissance ?],
distractors: (
"La représentation réaliste et détaillée des personnages",
"L'utilisation de couleurs vives et contrastées",
"La représentation d'une scène de discussion philosophique",
),
answer: (
"La composition symétrique et équilibrée",
"La présence d'une perspective illusionniste et d'une profondeur spatiale",
),
dir: ttb,
)
#figure(image("img/007.png", height: 200pt))
#multiple-choice(
prompt: [Quels sont les personnages principaux représentés dans cette œuvre et leurs significations symboliques ?],
distractors: (
"Mercure, le dieu du commerce, et Mars, le dieu de la guerre, représentant les activités terrestres",
"Hercule, le héros légendaire, et Bacchus, le dieu du vin, symbolisant la force et la débauche",
"Le Christ et la Vierge Marie, incarnant la pureté spirituelle",
),
answer: (
"Adam et Ève, représentant le péché originel et la chute de l'homme",
"Vénus, la déesse de l'amour, et Cupidon, son fils, symbolisant la passion amoureuse",
),
dir: ttb,
)
#multiple-choice(
prompt: [Quelles sont les principales influences qui ont façonné le style néoclassique dans l'art français du XVIIIe siècle ?],
distractors: (
"Le rejet total du style rococo et de ses excès décoratifs",
"La volonté de se détacher des courants romantiques et réalistes",
"Le rôle central joué par l'Académie royale de peinture et de sculpture",
),
answer: (
"L'influence des modèles esthétiques de la Grèce et de la Rome antiques",
"L'évolution des connaissances archéologiques sur l'Antiquité",
),
dir: ttb,
)
#figure(image("img/011.png", height: 200pt))
#multiple-choice(
prompt: [Dans son tableau "Les Corbeaux au-dessus d'un champ de blé", peint juste avant sa mort, quels éléments suggèrent l'état d'esprit tourmenté de Van Gogh ?],
distractors: (
"L'absence totale de figures humaines",
"L'utilisation de couleurs vives et contrastées",
"La perspective plongeante sur le champ de blé"
),
answer: (
"Le ciel orageux et menaçant",
"Le mouvement tourbillonnant des corbeaux"
),
dir: ttb,
)
#figure(image("img/012.png", height: 200pt))
#multiple-choice(
prompt: [Comment le tableau "Le Rêve" de Picasso, peint en 1932, s'inscrit-il dans le mouvement cubiste ?],
distractors: (
"Par l'emploi de couleurs vives et contrastées",
"Par l'absence totale de référence à la figure humaine",
"Par l'incorporation d'éléments de la réalité dans la composition"
),
answer: (
"Par l'utilisation de formes géométriques simples",
"Par la représentation simultanée de plusieurs points de vue"
),
dir: ttb,
)
= Partie 3: Questions à réponse courte (30 PTs)
== Introduction aux arts français
#question(points: 3)[
Expliquer comment le nombre d'or $Phi$ est calculé mathématiquement.
]
#answer(field: lines(2))[$(sqrt(5) + 1) / 2$]
#question(points: 3)[
Qu'est-ce que le Cubisme et quelles sont ses principales caractéristiques ?
]
#answer(field: lines(2))[Fragmentation des formes, Perspective multiple, Palette de couleurs restreinte, Collage et assemblage]
#figure(image("img/004.png", height: 200pt))
#question(points: 3)[
Analyser la composition du Supplice de Jane Gray à l'aide de méthodes de segmentation.
]
#answer(field: lines(2))[Trois divisions égales sont utilisées pour distinguer les différents personnages, et des divisions en losange sont utilisées pour distinguer les personnages et les arrière-plans.]
#figure(image("img/005.png", height: 200pt))
#question(points: 3)[Quelles sont les principales innovations techniques et symboliques apportées par <NAME> dans son tableau "Les Époux Arnolfini" ?]
#answer(field: lines(2))[Utilisation de la peinture à l'huile, permettant des détails extrêmement minutieux et réalistes. \
Maîtrise de la perspective linéaire pour créer une illusion de profondeur
Rendu détaillé des textures, des matériaux et des reflets. \
Symbolisme des objets (chandelier, chien, gants) qui transmettent des significations sur le mariage et la vie conjugale.]
#figure(image("img/006.png", height: 200pt))
#question(points: 3)[Quelle est la signification symbolique du crâne anamorphique représenté dans "Les Ambassadeurs" de Hans Holbein le Jeune ?]
#answer(field: lines(2))[C'est un memento mori, un rappel de la vanité et de la fragilité de la vie humaine. Le crâne symbolise la mort qui guette derrière l'opulence et le prestige des deux hommes représentés.]
#figure(image("img/008.png", height: 150pt))
#figure(image("img/009.png", height: 150pt))
#question(points: 3)[Quelles sont les principales différences de composition entre la "Cène" de Léonard de Vinci et celle réalisée par le Tintoret ?]
#answer(field: lines(2))[Vinci : utilisation d'une perspective linéaire complexe, avec des lignes de fuite convergentes vers le Christ, éclairage doux et uniforme, mettant l'accent sur la scène centrale.
Tintoret : perspective plus libre, avec un traitement plus dynamique de l'espace, utilisation de contrastes d'ombre et de lumière, créant une atmosphère plus dramatique.
]
#question(points: 3)[Quels sont les principaux facteurs qui ont conduit à l'émergence du style rococo en France au XVIIIe siècle ?]
#answer(field: lines(2))[Volonté de se détacher du classicisme et du formalisme de l'époque précédente. Goût pour le luxe, l'élégance et les plaisirs de la vie de cour.]
#question(points: 3)[Quels sont les arts majeurs qui ont émergé dans l’art français au fil du temps, du style post-Renaissance aux temps modernes ? Les triez: Rococo, Néoclassicisme, Renaissance, Surréalisme, Romantisme, Cubisme, Réalisme et Impressionnisme, Baroque et classicisme, Fauvisme]
#answer(field: lines(2))[Renaissance, Baroque et classicisme, Rococo, Néoclassicisme, Romantisme, Réalisme, Impressionnisme, Fauvisme, Cubisme, Surréalisme]
#figure(image("img/010.png", height: 200pt))
#question(points: 3)[Quelles sont les principales innovations picturales mises en œuvre par Monet dans son tableau "Impression, soleil levant" (1872) ?]
#answer(field: lines(2))[Technique de la touche libre, Primauté de l'effet lumineux, Travail en extérieur ("en plein air")]
#figure(image("img/013.png", height: 200pt))
#question(points: 3)[En quoi les œuvres de <NAME> ont-elles pu inspirer et influencer le mouvement fauviste, qui émerge au début du XXe siècle ?
]
#answer(field: lines(2))[Utilisation de la couleur pure et expressive. Gestualité et touche picturale. Importance de l'expressivité et de la subjectivité.]
|
|
https://github.com/liuguangxi/suiji | https://raw.githubusercontent.com/liuguangxi/suiji/main/examples/random-walk.typ | typst | MIT License | #set document(date: none)
#import "/src/lib.typ": *
#import "@preview/cetz:0.2.2"
#set page(width: auto, height: auto, margin: 0.5cm)
#cetz.canvas(length: 5pt, {
import cetz.draw: *
let n = 2000
let (x, y) = (0, 0)
let (x-new, y-new) = (0, 0)
let rng = gen-rng(42)
let v = ()
for i in range(n) {
(rng, v) = uniform(rng, low: -2.0, high: 2.0, size: 2)
(x-new, y-new) = (x - v.at(1), y - v.at(0))
let col = color.mix((blue.transparentize(20%), 1-i/n), (green.transparentize(20%), i/n))
line(stroke: (paint: col, cap: "round", thickness: 2pt),
(x, y), (x-new, y-new)
)
(x, y) = (x-new, y-new)
}
})
|
https://github.com/AHaliq/CategoryTheoryReport | https://raw.githubusercontent.com/AHaliq/CategoryTheoryReport/main/preamble/lemmas.typ | typst | #import "@preview/lemmify:0.1.6": *
#import "@preview/showybox:2.0.1": showybox
// Define default theorem environments.
#let (theorem, lemma, corollary, remark, proposition, example, proof, definition, rules: thm-rules) = default-theorems(
"thm-group",
lang: "en",
thm-numbering: thm-numbering-heading.with(max-heading-level: 1),
thm-styling: (thm-type, name, number, body) => align(left)[*#thm-type #number* (#emph(name)) #body]
)
#show thm-selector("thm-group", subgroup: "proof"): it => box(
it,
stroke: red + 1pt,
inset: 1em,
)
#let exercise(name, body) = showybox(frame: (
border-color: silver,
))[
#underline(smallcaps([Exercise #name:])) #body
] |
|
https://github.com/julyfun/fr-art-test | https://raw.githubusercontent.com/julyfun/fr-art-test/main/eval.typ | typst | #import "@preview/ttt-utils:0.1.2": grading, components
#import "@preview/ttt-exam:0.1.2": small-grading-table
#let get-info(data) = {
return data.at("info", default: (
class:"unknown",
subject:"unknown",
title: "1. Exam",
subtitle: "",
date: 2024-01-01,
authors: "unknown",
))
}
#let process-students(students, grade-scale) = {
students.pairs().map( ((name, points)) => {
// sum points
points = if type(points) == array { points.sum() } else { points }
// get grade
let grade = if type(points) == int or type(points) == float { grading.points-to-grade(points,grade-scale) } else { "" }
// return dict for each student
("name": name, "points": points, "grade": grade)
})
}
// get file from input.
#let file = sys.inputs.at("file", default: "meta.toml")
// read data from file
#let data = toml(file)
// page settings
#set page(
"a4",
margin:2cm,
header: [#components.tag(get-info(data).class) - #components.tag(fill: rgb("#C1E1C1"), get-info(data).subject) #h(1fr) #components.tag(fill: gray, get-info(data).title)]
)
#set text(font: "Rubik", lang: "de")
#set table(fill: (_,y) => if y == 0 { luma(230)})
// title
#align(center, text(16pt)[Auswertung])
// calculations
#let total-points = data.at("points", default: 0).at("total", default: 0)
#let grade-scale = grading.ihk-scale(total-points, step: 0.5, offset: 1)
#let grade-dist = state("grade-dist",("1":0,"2":0,"3":0,"4":0,"5":0,"6":0))
#let student-data = process-students(data.students, grade-scale)
#grid(
rows: (1fr, auto),
columns(2,table(
columns: 3,
inset: (_,y) => if (y < 1) { 0.5em } else {(x:0.5em, y:1em)},
fill: (_,y) => if (y < 1) {luma(230)} else if calc.even(y) { luma(245)} else { none },
align: center + horizon,
table.header("Name/ID", "Points", "Grade"),
..student-data.map(s => {
let grade = if s.grade != none [
*#s.grade* #grade-dist.update(d => { d.at(str(s.grade)) = d.at(str(s.grade)) + 1; d})
] else [ #text(red)[*X*] ]
(s.name, [#s.points], grade)
}).flatten()
)),
[
= Verteilung
#context small-grading-table(grade-scale, grade-dist.final())
#stack(dir: ltr, spacing: 2em)[
*Total-Points:* #total-points
][
*Average-Grade:* #context grading.grade-average(grade-dist.final())
]
]
)
|
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/unichar/0.1.0/ucd/block-11C00.typ | typst | Apache License 2.0 | #let data = (
("BHAIKSUKI LETTER A", "Lo", 0),
("BHAIKSUKI LETTER AA", "Lo", 0),
("BHAIKSUKI LETTER I", "Lo", 0),
("BHAIKSUKI LETTER II", "Lo", 0),
("BHAIKSUKI LETTER U", "Lo", 0),
("BHAIKSUKI LETTER UU", "Lo", 0),
("BHAIKSUKI LETTER VOCALIC R", "Lo", 0),
("BHAIKSUKI LETTER VOCALIC RR", "Lo", 0),
("BHAIKSUKI LETTER VOCALIC L", "Lo", 0),
(),
("BHAIKSUKI LETTER E", "Lo", 0),
("BHAIKSUKI LETTER AI", "Lo", 0),
("BHAIKSUKI LETTER O", "Lo", 0),
("BHAIKSUKI LETTER AU", "Lo", 0),
("BHAIKSUKI LETTER KA", "Lo", 0),
("BHAIKSUKI LETTER KHA", "Lo", 0),
("BHAIKSUKI LETTER GA", "Lo", 0),
("BHAIKSUKI LETTER GHA", "Lo", 0),
("BHAIKSUKI LETTER NGA", "Lo", 0),
("BHAIKSUKI LETTER CA", "Lo", 0),
("BHAIKSUKI LETTER CHA", "Lo", 0),
("BHAIKSUKI LETTER JA", "Lo", 0),
("BHAIKSUKI LETTER JHA", "Lo", 0),
("BHAIKSUKI LETTER NYA", "Lo", 0),
("BHAIKSUKI LETTER TTA", "Lo", 0),
("BHAIKSUKI LETTER TTHA", "Lo", 0),
("BHAIKSUKI LETTER DDA", "Lo", 0),
("BHAIKSUKI LETTER DDHA", "Lo", 0),
("BHAIKSUKI LETTER NNA", "Lo", 0),
("BHAIKSUKI LETTER TA", "Lo", 0),
("BHAIKSUKI LETTER THA", "Lo", 0),
("BHAIKSUKI LETTER DA", "Lo", 0),
("BHAIKSUKI LETTER DHA", "Lo", 0),
("BHAIKSUKI LETTER NA", "Lo", 0),
("BHAIKSUKI LETTER PA", "Lo", 0),
("BHAIKSUKI LETTER PHA", "Lo", 0),
("BHAIKSUKI LETTER BA", "Lo", 0),
("BHAIKSUKI LETTER BHA", "Lo", 0),
("BHAIKSUKI LETTER MA", "Lo", 0),
("BHAIKSUKI LETTER YA", "Lo", 0),
("BHAIKSUKI LETTER RA", "Lo", 0),
("BHAIKSUKI LETTER LA", "Lo", 0),
("BHAIKSUKI LETTER VA", "Lo", 0),
("BHAIKSUKI LETTER SHA", "Lo", 0),
("BHAIKSUKI LETTER SSA", "Lo", 0),
("BHAIKSUKI LETTER SA", "Lo", 0),
("BHAIKSUKI LETTER HA", "Lo", 0),
("BHAIKSUKI VOWEL SIGN AA", "Mc", 0),
("BHAIKSUKI VOWEL SIGN I", "Mn", 0),
("BHAIKSUKI VOWEL SIGN II", "Mn", 0),
("BHAIKSUKI VOWEL SIGN U", "Mn", 0),
("BHAIKSUKI VOWEL SIGN UU", "Mn", 0),
("BHAIKSUKI VOWEL SIGN VOCALIC R", "Mn", 0),
("BHAIKSUKI VOWEL SIGN VOCALIC RR", "Mn", 0),
("BHAIKSUKI VOWEL SIGN VOCALIC L", "Mn", 0),
(),
("BHAIKSUKI VOWEL SIGN E", "Mn", 0),
("BHAIKSUKI VOWEL SIGN AI", "Mn", 0),
("BHAIKSUKI VOWEL SIGN O", "Mn", 0),
("BHAIKSUKI VOWEL SIGN AU", "Mn", 0),
("BHAIKSUKI SIGN CANDRABINDU", "Mn", 0),
("BHAIKSUKI SIGN ANUSVARA", "Mn", 0),
("BHAIKSUKI SIGN VISARGA", "Mc", 0),
("BHAIKSUKI SIGN VIRAMA", "Mn", 9),
("BHAIKSUKI SIGN AVAGRAHA", "Lo", 0),
("BHAIKSUKI DANDA", "Po", 0),
("BHAIKSUKI DOUBLE DANDA", "Po", 0),
("BHAIKSUKI WORD SEPARATOR", "Po", 0),
("BHAIKSUKI GAP FILLER-1", "Po", 0),
("BHAIKSUKI GAP FILLER-2", "Po", 0),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
("BHAIKSUKI DIGIT ZERO", "Nd", 0),
("BHAIKSUKI DIGIT ONE", "Nd", 0),
("BHAIKSUKI DIGIT TWO", "Nd", 0),
("BHAIKSUKI DIGIT THREE", "Nd", 0),
("BHAIKSUKI DIGIT FOUR", "Nd", 0),
("BHAIKSUKI DIGIT FIVE", "Nd", 0),
("BHAIKSUKI DIGIT SIX", "Nd", 0),
("BHAIKSUKI DIGIT SEVEN", "Nd", 0),
("BHAIKSUKI DIGIT EIGHT", "Nd", 0),
("BHAIKSUKI DIGIT NINE", "Nd", 0),
("BHAIKSUKI NUMBER ONE", "No", 0),
("BHAIKSUKI NUMBER TWO", "No", 0),
("BHAIKSUKI NUMBER THREE", "No", 0),
("BHAIKSUKI NUMBER FOUR", "No", 0),
("BHAIKSUKI NUMBER FIVE", "No", 0),
("BHAIKSUKI NUMBER SIX", "No", 0),
("BHAIKSUKI NUMBER SEVEN", "No", 0),
("BHAIKSUKI NUMBER EIGHT", "No", 0),
("BHAIKSUKI NUMBER NINE", "No", 0),
("BHAIKSUKI NUMBER TEN", "No", 0),
("BHAIKSUKI NUMBER TWENTY", "No", 0),
("BHAIKSUKI NUMBER THIRTY", "No", 0),
("BHAIKSUKI NUMBER FORTY", "No", 0),
("BHAIKSUKI NUMBER FIFTY", "No", 0),
("BHAIKSUKI NUMBER SIXTY", "No", 0),
("BHAIKSUKI NUMBER SEVENTY", "No", 0),
("BHAIKSUKI NUMBER EIGHTY", "No", 0),
("BHAIKSUKI NUMBER NINETY", "No", 0),
("BHAIKSUKI HUNDREDS UNIT MARK", "No", 0),
)
|
https://github.com/Mc-Zen/quill | https://raw.githubusercontent.com/Mc-Zen/quill/main/tests/layout/relative%20for%20row%2Ccol%20spacing/test.typ | typst | MIT License | #set page(width: auto, height: auto, margin: 0pt)
#import "/src/quill.typ": *
#quantum-circuit(
column-spacing: 1em,
row-spacing: 1em,
gate($H$), gate($H$), [\ ],
gate($H$), 1
)
#pagebreak()
#quantum-circuit(
min-row-height: 1em,
min-column-width: 1em,
gate($H$), gate($H$), [\ ],
gate($H$), 1
) |
https://github.com/polarkac/MTG-Stories | https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/002%20-%20Return%20to%20Ravnica/005_In%20Praise%20of%20the%20Worldsoul%2C%20Part%202.typ | typst | #import "@local/mtgstory:0.2.0": conf
#show: doc => conf(
"In Praise of the Worldsoul, Part 2",
set_name: "Return to Ravnica",
story_date: datetime(day: 03, month: 10, year: 2012),
author: "<NAME>",
doc
)
Cecilee came to build gardens. Instead, she built walls.
At first, the woodshapers made the walls around their settlement shoulder high—enough to keep out the wild boars at night. Then they put a lock on the gate to keep out troublemakers, like the Azorius arrestor who kept imposing fines. Just days before, the woodshapers raised the walls to twenty feet high. The Gruul were angry with her, and Cecilee was worried it wouldn’t be high enough, even though she now felt like she was living in a prison.
And it was true. The walls hadn’t been high enough. But the Gruul had nothing to do with it.
When they first settled in the Rubblebelt, Cecilee felt dizzy in all the open space. On most days, the edge of the city was just a blue smear through the haze. She and her followers built their first home on an open plain near the sprawling ruins of a tenement, now draped with emerald vines. The floors of the building had rotted away, leaving jagged walls leaning on piles of rubbish. With enough woodshapers, Cecilee wondered if the ruins could be animated to walk away and leave the Rubblebelt for good.
#figure(image("005_In Praise of the Worldsoul, Part 2/02.jpg", width: 100%), caption: [Druid’s Deliverance | Art by Dan Scott], supplement: none, numbering: none)
For the first time in Cecilee’s life, the sky dominated—an expanse of blue that kept luring her eyes from the dry, red soil where they planted seeds. She dreamed that Selesnya gardens would soon engulf Rubblebelt. They would inch down the destroyed land and beyond, reclaiming the filthy city and its stone grip on the world. The Rubblebelt was the home of the Gruul, a disjointed collection of savage clans who claimed the abandoned zones of Ravnica. To appease their Gruul brethren, Cecilee wanted a wild, tangled garden unlike the manicured lawns of Selesnya. She wanted a place where the Gruul would feel at home.
In the early days, Cecilee’s first priority was to build a healing center. The Gruul had healers of their own, but they were nomadic and moved haphazardly through the Rubblebelt. The Selesnyans offered a constant and reliable place to come. To Cecilee’s delight, they did come; not in large numbers, but enough for her community to feel like it was doing good work. The Gruul refused the Selesnyan teachings, but Cecilee believed that would come in time.
But then they adopted Zi, and everything changed. The scouts found the infant abandoned in the Rubblebelt and brought him back to the vernadi. She unwrapped the baby from his tattered blanket and saw a Gruul tattoo on his back. Disbelief spread through her community. How could the Gruul be so savage as to desert a child? Cecilee named the child after her brother, Ruzi, and took him into her home to raise as her own son.
Sometimes, Cecilee found herself wishing for her brother more than she prayed to the Worldsoul. She had spent her childhood tripping in Ruzi’s shadow. He could shoot better and run faster than her and could outfight any youth around Vitu-Ghazi. But he always looked back to make sure she hadn’t stumbled, and he never forgot to hold her hand across the dangerous places. Ruzi was the only one who insisted she could talk, although he—nor anyone else—had ever heard her speak a word.
And then one day Cecilee did speak. She stood up abruptly during a gathering at the heart of Vitu-Ghazi, just as the Guildmaster Trostani was finished with her recitation. And everyone—from the centaurs stamping on the balcony to the wolves sprawled beneath the benches—fixed their eyes on the wisp of an elf girl, a mute no longer.
Words of praise tumbled from her without pause, a recitation in praise of Selesnya so beautiful that even the eldest of the dryads were humbled. She is a conduit to the Worldsoul, they said. They celebrated her emergence as a mouthpiece of the fundamental and epic truths that could only be spoken by the communal mind. Ruzi acted like she had sprouted a second head. But Cecilee ignored his concerns. She felt the Worldsoul like others felt the patter of the rain. For her, it had become a tangible, all-consuming, and life-nourishing gift.
#figure(image("005_In Praise of the Worldsoul, Part 2/04.jpg", width: 100%), caption: [Grove of the Guardian | Art by Christine Choi], supplement: none, numbering: none)
When Cecilee felt called to establish a settlement in the Rubblebelt, only Ruzi counseled her against it. The dryads sang her praises, saying she was the gardener who could cultivate the most savage of them. Ruzi told her to think of her own skin. By then, Cecilee couldn’t separate herself from the whole. She saw the Gruul as hardscrabble kin of Selesnya. They shared a common love of nature, after all. Nature that was being strangled by the ever-growing demands of the world-city.
Ruzi tried to explain that the Gruul saw things differently. To them, Selesnya’s immaculate gardens were a falsehood. Yes, blades of grass could be fashioned to paint a picture of harmony. But Ruzi warned that harmony was not a music that the Gruul can hear. Not above the din and clatter of their warlike spirits. But love and acceptance must prevail, Cecilee insisted. Selesnyans must strive to win the hearts of their enemies. No matter the burden. No matter the cost.
And so she went, leading twenty followers, to the wildest place any of them could imagine. And they began to make a home. A home with open arms, open tables, and healing hands.
Each night, Cecilee tried to commune with the Worldsoul. She pleaded to the communal mind for perfection through unity. And her little community grew a little each day, just like the sapling of the guildtree blossoming in the dusty courtyard. Cecilee promised her followers that someday their roots would stretch across Ravnica and all voices would praise the Worldsoul.
But they had been harassed at every turn. The Azorius cited statutes about why their healing center was illegal. An Izzet mage babbled about arcane energy and portals and demanded they leave. After Cecilee adopted Zi, the Gruul sent a woman to take him back. The woman was a shaman from Nikya’s clan. She explained that Nikya claimed the boy as kin and demanded he be raised as Gruul. But Cecilee wouldn’t listen. Zi had been left to die in the rubble, and she couldn’t bear to give the boy to a stranger.
After that, the Gruul stopped coming to the healing center and attacked the Selesnyans if they ventured too far from their walls. Each night, the Gruul bonfires seemed closer to their gate. Some whispered that Cecilee should return the boy.
Just before sunrise, their gate flew off the hinges and splintered on the ground. With a single strike, their safety was shattered. A massive ogre with a mutilated face was first through the gate. Cecilee told her followers to run, although now the walls penned them in. Alone, Cecilee stood in the courtyard with her arms raised, as if her slender body could stall the intruders. A strange, sinewy woman strode across the threshold, followed by more brutal, scarred men. From the sight of piercings and street clothes, Cecilee knew they weren’t Gruul.
#figure(image("005_In Praise of the Worldsoul, Part 2/06.jpg", width: 100%), caption: [Thrill-Kill Assassin | Art by <NAME>], supplement: none, numbering: none)
The woman struck Cecilee in the mouth and sent her reeling down into the mud. As Cecilee struggled to her knees, the woman struck her again. There were many people under her care, but all Cecilee could think about was Zi, sleeping in his cradle.
"I could snap your arms like twigs," the woman gloated. To Cecilee, she looked like an ugly doll, starved to skeletal form, with a fake painted smile. The woman ripped the young guild tree out of the ground and hurled it across the courtyard; her minions howled and danced, delighted by the mayhem. Cecilee couldn’t move, shocked at the disregard of the priceless thing that had brought her so much joy.
Cecilee hadn’t seen much of the world outside Vitu-Ghazi and knew little about Ravnica, even the corner of the Rubblebelt she now called home. She didn’t know the woman was a for-hire Rakdos killer who called herself <NAME>. Confronted with violence, Cecilee’s limbs felt thick like stone and her mind was just useless sand. The woman took out her rusty blade and chopped the blonde hair from Cecilee’s head. Laughed as she did so.
"Are you a cow?" the woman wondered later. Cecilee’s followers then lay dead, face down in the mud. Yet Cecilee still knelt, surrounded by the blood and dirt and the golden locks of her hair. The woman seemed genuinely curious by Cecilee’s lack of action. "Why do you do nothing but sit?"
But Cecilee had become mute once again. The roots carrying life to and from Vitu-Ghazi were severed. The wisdom of a thousand souls became nothing more than a wordless hum in her overwhelmed mind. There was just the woman and her rusty blade cutting Cecilee’s throat in that devastated land and the darkness of the world.
|
|
https://github.com/QuadnucYard/cswc-lecture-report-typst | https://raw.githubusercontent.com/QuadnucYard/cswc-lecture-report-typst/main/main.typ | typst | MIT License | #import "lib.typ": lec-report
#show: lec-report.with(
stu-id: [61520000],
stu-name: [漫游者],
time: [2024/04/01],
loc: [健雄书院报告厅],
speaker: [穹天帝],
subject: [现代排版工具\ Typst的使用],
)
#text(fill: rgb("#595959"))[参考格式:宋体,5号字,左对齐,单倍行距(或固定值18磅)]
东南大学吴健雄学院是东南大学培养拔尖创新优秀人才的荣誉学院。学院汇聚了全校的高端资源培养优秀人才:以享誉世界的著名物理学家、东南大学杰出校友吴健雄先生的名字命名。著名物理学家、诺贝尔奖得主丁肇中先生受聘为学院名誉院长。中国科学院院士、东南大学校长黄如教授兼任学院院长。三十多年不断的艰苦创业和探索实践,东南大学吴健雄学院树立起“卓越化、个性化、国际化”的育人理念,形成了具有东南大学特色的拔尖创新优秀人才培养模式,成为东南大学拔尖创新优秀人才的培养基地、教育教学改革的实践基地和管理改革的示范基地。
学院的发展历程最早可以追溯到1985年成立的原南京工学院(东南大学前身)少年班。随着教育改革的不断深入,少年班1990年改称为强化班。在积累多年优秀人才培养经验的基础上,2004年东南大学正式成立吴健雄学院。原强化班改称为“电子信息类强化班”,并进一步开设了“机械动力类强化班”。2007年增设了本研贯通、个性化培养的“高等理工实验班”,实行导师指导、优才优育的培养方式。2016年推出开放式、个性化拔尖人才培养的“工科试验班(吴健雄班)”(简称“吴健雄班”)。从首届少年班约20人的规模,发展为现在每年招生120人左右,现有在校学生近500人。
学院始终以“汇聚优质资源,培养精英人才”为办学宗旨,秉持“卓越化、个性化、国际化”育人理念,致力于培养发展志向远大、国际视野宽阔的未来战略科学家、工程科技领军人才和业界高端引领人才。贯彻“厚基础、宽口径、强交叉、重个性”的指导思想,构建“三制五化”的培养模式。“三制”即“导师制、书院制、完全学分制”;“五化”即“小班化、个性化、国际化、卓越化、本研一体化”。聘请国内外优秀高端师资开展小班化和研究型教学。学院全面实行导师制,为学生进国家级科技创新平台进行创新能力培养提供良好条件。利用校、院两级资源平台开展多种形式的国际交流培养,为学生迈向更高发展平台打下坚实基础并提供有效支撑。
|
https://github.com/EGmux/TheoryOfComputation | https://raw.githubusercontent.com/EGmux/TheoryOfComputation/master/style.typ | typst | #set text(font: (
"PragmaPro Mono",
// "PragmaPro Mono Liga"
// "Noto Color Emoji"
// "Noto Font Emoji"
))
|
|
https://github.com/RaphGL/ElectronicsFromBasics | https://raw.githubusercontent.com/RaphGL/ElectronicsFromBasics/main/DC/chap5/2_simple_series_circuits.typ | typst | Other | #import "../../core/core.typ"
// todo: change the tables for a better formatted one
=== Simple series circuits
Let\'s start with a series circuit consisting of three resistors and a
single battery:
#image("static/00087.png")
The first principle to understand about series circuits is that the
amount of current is the same through any component in the circuit. This
is because there is only one path for electrons to flow in a series
circuit, and because free electrons flow through conductors like marbles
in a tube, the rate of flow (marble speed) at any point in the circuit
(tube) at any specific point in time must be equal.
From the way that the 9 volt battery is arranged, we can tell that the
electrons in this circuit will flow in a counter-clockwise direction,
from point 4 to 3 to 2 to 1 and back to 4. However, we have one source
of voltage and three resistances. How do we use Ohm\'s Law here?
An important caveat to Ohm\'s Law is that all quantities (voltage,
current, resistance, and power) must relate to each other in terms of
the same two points in a circuit. For instance, with a single-battery,
single-resistor circuit, we could easily calculate any quantity because
they all applied to the same two points in the circuit:
#image("static/00088.png")
$
I &= E / R \
I &= (9 "volts") / (3 k Omega) = 3m"A"
$
Since points 1 and 2 are connected together with wire of negligible
resistance, as are points 3 and 4, we can say that point 1 is
electrically common to point 2, and that point 3 is electrically common
to point 4. Since we know we have 9 volts of electromotive force between
points 1 and 4 (directly across the battery), and since point 2 is
common to point 1 and point 3 common to point 4, we must also have 9
volts between points 2 and 3 (directly across the resistor). Therefore,
we can apply Ohm\'s Law ($I = E/R$) to the current through the resistor,
because we know the voltage (E) across the resistor and the resistance
(R) of that resistor. All terms (E, I, R) apply to the same two points
in the circuit, to that same resistor, so we can use the Ohm\'s Law
formula with no reservation.
However, in circuits containing more than one resistor, we must be
careful in how we apply Ohm\'s Law. In the three-resistor example
circuit below, we know that we have 9 volts between points 1 and 4,
which is the amount of electromotive force trying to push electrons
through the series combination of R#sub[1], R#sub[2], and R#sub[3].
However, we cannot take the value of 9 volts and divide it by 3k, 10k or
5k $Omega$ to try to find a current value, because we don\'t know how much
voltage is across any one of those resistors, individually.
#image("static/00087.png")
The figure of 9 volts is a #emph[total] quantity for the whole circuit,
whereas the figures of 3k, 10k, and 5k $Omega$ are #emph[individual]
quantities for individual resistors. If we were to plug a figure for
total voltage into an Ohm\'s Law equation with a figure for individual
resistance, the result would not relate accurately to any quantity in
the real circuit.
For R#sub[1], Ohm\'s Law will relate the amount of voltage across
R#sub[1] with the current through R#sub[1], given R#sub[1]\'s
resistance, 3k$Omega$:
$ I_(R 1) = E_(R 1) / (3 k Omega) $
$ E_(R 1) = I_(R 1) (3 k Omega) $
But, since we don\'t know the voltage across R#sub[1] (only the total
voltage supplied by the battery across the three-resistor series
combination) and we don\'t know the current through R#sub[1], we can\'t
do any calculations with either formula. The same goes for R#sub[2] and
R#sub[3]: we can apply the Ohm\'s Law equations if and only if all terms
are representative of their respective quantities between the same two
points in the circuit.
So what can we do? We know the voltage of the source (9 volts) applied
across the series combination of R#sub[1], R#sub[2], and R#sub[3], and
we know the resistances of each resistor, but since those quantities
aren\'t in the same context, we can\'t use Ohm\'s Law to determine the
circuit current. If only we knew what the #emph[total] resistance was
for the circuit: then we could calculate #emph[total] current with our
figure for #emph[total] voltage ($I = E / R $).
This brings us to the second principle of series circuits: the total
resistance of any series circuit is equal to the sum of the individual
resistances. This should make intuitive sense: the more resistors in
series that the electrons must flow through, the more difficult it will
be for those electrons to flow. In the example problem, we had a 3 k$Omega$,
10 k$Omega$, and 5 k$Omega$ resistor in series, giving us a total resistance of 18
k$Omega$:
$
R_"total" &= R_1 + R_2 + R_3 \
R_"total" &= 3k Omega + 10k Omega + 5k Omega \
R_"total" &= 18k Omega
$
In essence, we\'ve calculated the equivalent resistance of R#sub[1],
R#sub[2], and R#sub[3] combined. Knowing this, we could re-draw the
circuit with a single equivalent resistor representing the series
combination of R#sub[1], R#sub[2], and R#sub[3]:
#image("static/00089.png")
Now we have all the necessary information to calculate circuit current,
because we have the voltage between points 1 and 4 (9 volts) and the
resistance between points 1 and 4 (18 k$Omega$):
$
I_"total" &= E_"total" / R_"total" \
I_"total" &= (9 "volts") / (18k Omega) = 500 mu A
$
Knowing that current is equal through all components of a series circuit
(and we just determined the current through the battery), we can go back
to our original circuit schematic and note the current through each
component:
#image("static/00090.png")
Now that we know the amount of current through each resistor, we can use
Ohm\'s Law to determine the voltage drop across each one (applying
Ohm\'s Law in its proper context):
$
E_(R 1) &= I_(R 1) R_1 \
E_(R 1) &= (500 mu A) (3k Omega) = 1.5 V
$
\
$
E_(R 2) &= I_(R 2) R_2 \
E_(R 2) &= (500 mu A) (10k Omega) = 5 V
$
\
$
E_(R 3) &= I_(R 3) R_3 \
E_(R 3) &= (500 mu A) (5k Omega) = 2.5 V
$
Notice the voltage drops across each resistor, and how the sum of the
voltage drops (1.5 + 5 + 2.5) is equal to the battery (supply) voltage:
9 volts. This is the third principle of series circuits: that the supply
voltage is equal to the sum of the individual voltage drops.
However, the method we just used to analyze this simple series circuit
can be streamlined for better understanding. By using a table to list
all voltages, currents, and resistances in the circuit, it becomes very
easy to see which of those quantities can be properly related in any
Ohm\'s Law equation:
#table(
columns: (auto, auto, auto, auto, auto, auto),
table.header([], [R1], [R2], [R3], [Total], []),
[E], [], [], [], [], [Volts],
[I], [], [], [], [], [Amps],
[R], [], [], [], [], [Ohms],
)
The rule with such a table is to apply Ohm\'s Law only to the values
within each vertical column. For instance, E#sub[R1] only with I#sub[R1]
and R#sub[1]; E#sub[R2] only with I#sub[R2] and R#sub[2]; etc. You begin
your analysis by filling in those elements of the table that are given
to you from the beginning:
#table(
columns: (auto, auto, auto, auto, auto, auto),
table.header([], [R1], [R2], [R3], [Total], []),
[E], [], [], [], [], [Volts],
[I], [], [], [], [], [Amps],
[R], [3k], [10k], [5k], [], [Ohms],
)
As you can see from the arrangement of the data, we can\'t apply the 9
volts of E#sub[T] (total voltage) to any of the resistances (R#sub[1],
R#sub[2], or R#sub[3]) in any Ohm\'s Law formula because they\'re in
different columns. The 9 volts of battery voltage is #emph[not] applied
directly across R#sub[1], R#sub[2], or R#sub[3]. However, we can use our
\"rules\" of series circuits to fill in blank spots on a horizontal row.
In this case, we can use the series rule of resistances to determine a
total resistance from the #emph[sum] of individual resistances:
#table(
columns: (auto, auto, auto, auto, auto, auto),
table.header([], [R1], [R2], [R3], [Total], []),
[E], [], [], [], [], [Volts],
[I], [], [], [], [], [Amps],
[R], [3k], [10k], [5k], [*18k*], [Ohms],
)
$
"using the rule of series circuits we get:" \
R_T = R_1 + R_2 + R_3 = 18k
$
Now, with a value for total resistance inserted into the rightmost
(\"Total\") column, we can apply Ohm\'s Law of $I = E / R$ to total voltage
and total resistance to arrive at a total current of 500 $mu$A:
#table(
columns: (auto, auto, auto, auto, auto, auto),
table.header([], [R1], [R2], [R3], [Total], []),
[E], [], [], [], [9], [Volts],
[I], [], [], [], [$500 mu$], [Amps],
[R], [3k], [10k], [5k], [*18k*], [Ohms],
)
Then, knowing that the current is shared equally by all components of a
series circuit (another \"rule\" of series circuits), we can fill in the
currents for each resistor from the current figure just calculated:
#table(
columns: (auto, auto, auto, auto, auto, auto),
table.header([], [R1], [R2], [R3], [Total], []),
[E], [], [], [], [9], [Volts],
[I], [$500 mu$], [$500 mu$], [$500 mu$], [$500 mu$], [Amps],
[R], [3k], [10k], [5k], [*18k*], [Ohms],
)
$
"using the rule of series we get:" \
I_T = I_1 = I_2 = I_3
$
Finally, we can use Ohm\'s Law to determine the voltage drop across each
resistor, one column at a time:
#table(
columns: (auto, auto, auto, auto, auto, auto),
table.header([], [R1], [R2], [R3], [Total], []),
[E], [1.5], [5], [2.5], [9], [Volts],
[I], [$500 mu$], [$500 mu$], [$500 mu$], [$500 mu$], [Amps],
[R], [3k], [10k], [5k], [*18k*], [Ohms],
)
Just for fun, we can use a computer to analyze this very same circuit
automatically. It will be a good way to verify our calculations and also
become more familiar with computer analysis. First, we have to describe
the circuit to the computer in a format recognizable by the software.
The SPICE program we\'ll be using requires that all electrically unique
points in a circuit be numbered, and component placement is understood
by which of those numbered points, or \"nodes,\" they share. For
clarity, I numbered the four corners of our example circuit 1 through 4.
SPICE, however, demands that there be a node zero somewhere in the
circuit, so I\'ll re-draw the circuit, changing the numbering scheme
slightly:
#image("static/00091.png")
All I\'ve done here is re-numbered the lower-left corner of the circuit
0 instead of 4. Now, I can enter several lines of text into a computer
file describing the circuit in terms SPICE will understand, complete
with a couple of extra lines of code directing the program to display
voltage and current data for our viewing pleasure. This computer file is
known as the #emph[netlist] in SPICE terminology:
```
series circuit
v1 1 0
r1 1 2 3k
r2 2 3 10k
r3 3 0 5k
.dc v1 9 9 1
.print dc v(1,2) v(2,3) v(3,0)
.end
```
Now, all I have to do is run the SPICE program to process the netlist
and output the results:
```
v1 v(1,2) v(2,3) v(3) i(v1)
9.000E+00 1.500E+00 5.000E+00 2.500E+00 -5.000E-04
```
This printout is telling us the battery voltage is 9 volts, and the
voltage drops across R#sub[1], R#sub[2], and R#sub[3] are 1.5 volts, 5
volts, and 2.5 volts, respectively. Voltage drops across any component
in SPICE are referenced by the node numbers the component lies between,
so v(1,2) is referencing the voltage between nodes 1 and 2 in the
circuit, which are the points between which R#sub[1] is located. The
order of node numbers is important: when SPICE outputs a figure for
v(1,2), it regards the polarity the same way as if we were holding a
voltmeter with the red test lead on node 1 and the black test lead on
node 2.
We also have a display showing current (albeit with a negative value) at
0.5 milliamps, or 500 microamps. So our mathematical analysis has been
vindicated by the computer. This figure appears as a negative number in
the SPICE analysis, due to a quirk in the way SPICE handles current
calculations.
In summary, a series circuit is defined as having only one path for
electrons to flow. From this definition, three rules of series circuits
follow: all components share the same current; resistances add to equal
a larger, total resistance; and voltage drops add to equal a larger,
total voltage. All of these rules find root in the definition of a
series circuit. If you understand that definition fully, then the rules
are nothing more than footnotes to the definition.
#core.review[
- Components in a series circuit share the same current:
$ I_"Total" = I_1 = I_2 = ... = I_n $
- Total resistance in a series circuit is equal to the sum of the
individual resistances:
$ R_"Total" = R_1 + R_2 + ... + R_n $
- Total voltage in a series circuit is equal to the sum of the
individual voltage drops:
$ E_"Total" = E_1 + E_2 + ... + E_n$
]
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/commute/0.1.0/lib.typ | typst | Apache License 2.0 | #let node(pos, label) = (kind: "node", pos: pos, label: label)
#let arr(start, end, label, start-space: none, end-space: none, label-pos: 1em, curve: 0deg, stroke: 0.45pt, ..options) = {
(
kind: "arrow",
start: start,
end: end,
label: label,
start-space: start-space,
end-space: end-space,
label-pos: label-pos,
curve: curve,
stroke: stroke,
options: options.pos(),
)
}
#let commutative-diagram(
node-padding: (70pt, 70pt),
arr-clearance: 0.7em,
padding: 1.5em,
debug: false,
..entities
) = {
style(styles => {
// useful utility function
let center(c) = pad(left: -100%, top: -100%, c)
// get nodes and arrows from the function arguments
let entities = entities.pos()
let nodes = entities.filter(e => e.kind == "node")
let arrows = entities.filter(e => e.kind == "arrow")
// adjust node and arrow coordinates so that the min is (0, 0)
let min-row = calc.min(..nodes.map(node => node.pos.at(0)))
let min-col = calc.min(..nodes.map(node => node.pos.at(1)))
let max-row = calc.max(..nodes.map(node => node.pos.at(0)))
let max-col = calc.max(..nodes.map(node => node.pos.at(1)))
for node in nodes {
node.pos.at(0) -= min-row
node.pos.at(1) -= min-col
}
for arr in arrows {
arr.start.at(0) -= min-row
arr.start.at(1) -= min-col
arr.end.at(0) -= min-row
arr.end.at(1) -= min-col
}
max-row -= min-row
max-col -= min-col
min-col = 0
min-row = 0
// measure the size of the various rows and columns
let col-sizes = ()
let row-sizes = ()
for r in range(0, max-row+1) {
row-sizes.push(0pt)
}
for c in range(0, max-col+1) {
col-sizes.push(0pt)
}
for node in nodes {
let m = measure(node.label, styles)
if m.width > col-sizes.at(node.pos.at(1)) {
col-sizes.at(node.pos.at(1)) = m.width
}
if m.height > row-sizes.at(node.pos.at(0)) {
row-sizes.at(node.pos.at(0)) = m.height
}
}
let row-pos = row-sizes
let col-pos = col-sizes
row-pos.at(0) /= 2
col-pos.at(0) /= 2
for r in range(1, max-row+1) {
row-pos.at(r) += row-pos.at(r - 1) + node-padding.at(1)
}
for c in range(1, max-col+1) {
col-pos.at(c) += col-pos.at(c - 1) + node-padding.at(0)
}
// total diagram dimensions
let height = row-sizes.fold(-node-padding.at(1), (x, y) => x+y+node-padding.at(1))
let width = col-sizes.fold(-node-padding.at(0), (x, y) => x+y+node-padding.at(0))
// useful functions used many times later
let coords(pos) = (
col-pos.at(pos.at(1)), row-pos.at(pos.at(0))
)
let size-at(pos) = {
for node in nodes {
if node.pos == pos {
return measure(node.label, styles)
}
}
return (width: 0pt, height: 0pt)
}
// various vector utility functions
let v-add(a, b) = (a.at(0) + b.at(0), a.at(1) + b.at(1))
let v-sub(a, b) = (a.at(0) - b.at(0), a.at(1) - b.at(1))
let v-mul(a, x) = (a.at(0) * x, a.at(1) * x)
let v-add-dir(p, a, l) = v-add(p, v-mul((calc.cos(a), calc.sin(a)), l))
let v-length(vv) = calc.sqrt(vv.at(0)/1mm*vv.at(0)/1mm + vv.at(1)/1mm*vv.at(1)/1mm)*1mm
// measures the length of a segment starting in the center
// of a rectangle and ending on one of the rectangle's edges,
// given the angle of the segment
let measure-at-angle(m, a, padding) = {
if calc.sin(a) == 0 {
m.width / 2 + padding
} else if calc.cos(a) == 0 {
m.height / 2 + padding
} else {
calc.min(
(m.width / 2 + padding) / calc.abs(calc.cos(a)),
(m.height / 2 + padding) / calc.abs(calc.sin(a)),
calc.max(m.width, m.height) / 2 + padding,
)
}
}
let pt-per-em = measure(rect(width: 1em), styles).width
// the box where all the diagram's elements are
box(
width: width + 2*padding, height: height + 2*padding,
stroke: if debug { 0.5pt + red } else { none },
inset: padding,
{
for arr in arrows {
let start = coords(arr.start)
let end = coords(arr.end)
let angle = calc.atan2((end.at(0) - start.at(0)) / 1pt, (end.at(1) - start.at(1)) / 1pt)
let curve-angle = arr.curve
let start-space = arr.start-space
let end-space = arr.end-space
if start-space == none {
start-space = measure-at-angle(size-at(arr.start), angle - curve-angle, arr-clearance / 1em * pt-per-em) / pt-per-em * 1em
}
if end-space == none {
end-space = measure-at-angle(size-at(arr.end), angle + curve-angle, arr-clearance / 1em * pt-per-em) / pt-per-em * 1em
}
if "inj" in arr.options {
start-space += 0.2em
}
let astart = v-add-dir(start, angle - curve-angle, start-space)
let aend = v-add-dir(end, angle + 180deg + curve-angle, end-space)
// more hacky, but more beautiful
place(dx: aend.at(0), dy: aend.at(1),
rotate(angle + curve-angle + 90deg, origin: top+left,
if "surj" in arr.options {
move(dy: 0.3em, center(box[
$arrow.t.twohead$
#place(dy: -0.35em, dx: 0.24em, rect(width: 0.10em, height: 0.7em, fill: white))
]))
} else {
move(dy: 0.3em, center(box[
$arrow.t$
#place(dy: -0.50em, dx: 0.2em, rect(width: 0.10em, height: 0.7em, fill: white))
]))
}
)
)
place(dx: astart.at(0), dy: astart.at(1),
rotate(angle - curve-angle - 90deg, origin: top+left, {
if "bij" in arr.options {
move(dy: 0.25em, center(box[
$arrow.t$
#place(dy: -0.50em, dx: 0.20em, rect(width: 0.10em, height: 0.7em, fill: white))
]))
} else if "inj" in arr.options {
place(pad(top: -100%, circle(stroke: arr.stroke, radius: 0.15em))) + rect(width: 0.33em, height: 0.2em, fill:white)
} else if "def" in arr.options {
place(dx: -0.2em, line(stroke: arr.stroke, length: 0.4em))
}
})
)
let N = int(20*calc.abs(curve-angle / 1rad) + 1)
let frac = 1
if "dashed" in arr.options {
N = int((v-length(v-sub(start, end)) - (start-space + end-space) / 1em * pt-per-em) / 8pt)
frac = 0.7
}
let normal = (- aend.at(1) + astart.at(1), aend.at(0) - astart.at(0))
let t = calc.tan(curve-angle)
for i in range(-N, N) {
place(line(
start: v-add(v-add(v-mul(astart, (N -i)/(2*N)), v-mul(aend, (N+i)/(2*N))),
v-mul(normal, (i - N)*(i + N)/N/N/4*t)),
end: v-add(v-add(v-mul(astart, (N -i -frac)/(2*N)), v-mul(aend, (N+i+frac)/(2*N))),
v-mul(normal, (i +frac - N)*(i+frac + N)/N/N/4*t)),
stroke: arr.stroke,
))
}
let middle = v-add(v-mul(v-add(astart, aend), 0.5), v-mul(normal, -t/4))
if arr.label-pos == 0 {
place(dx: middle.at(0), dy: middle.at(1), center(rect(fill: white, arr.label, outset:-0.2em)))
} else {
let lpos = v-add-dir(middle, angle - 90deg, arr.label-pos)
place(dx: lpos.at(0), dy: lpos.at(1), center(arr.label))
}
}
for node in nodes {
let coords = coords(node.pos)
place(
dx: coords.at(0),
dy: coords.at(1),
center(node.label)
)
if debug {
let m = measure(node.label, styles)
place(
dx: coords.at(0),
dy: coords.at(1),
center(rect(width: m.width + 2 * arr-clearance, height: m.height + 2 * arr-clearance, stroke: 0.5pt+red)),
)
place(
dx: coords.at(0),
dy: coords.at(1),
center(circle(radius: calc.max(m.width, m.height) / 2 + arr-clearance, stroke: 0.5pt+red)),
)
}
}
})
})
}
|
https://github.com/AU-Master-Thesis/thesis | https://raw.githubusercontent.com/AU-Master-Thesis/thesis/main/lib/durationfmt.typ | typst | MIT License |
#let durationfmt(d) = {
assert(type(d) == duration)
let weeks = calc.floor(d.weeks())
let years = calc.div-euclid(weeks, 52)
let days = d.days() - 7 * weeks
weeks = calc.rem(weeks, 52)
let parts = ()
if years > 0 {
if years == 1 {
parts.push([1 year])
} else {
parts.push([#years years])
}
}
if weeks > 0 {
if weeks == 1 {
parts.push([1 week])
} else {
parts.push([#weeks weeks])
}
}
if days > 0 {
if days == 1 {
parts.push([1 day])
} else {
parts.push([#days days])
}
}
// parts
if parts.len() == 1 {
parts.first()
} else if parts.len() == 2 {
parts.first()
[ and ]
parts.last()
} else if parts.len() > 2 {
parts.slice(0, parts.len() - 1).join(", ")
[ and ]
parts.last()
}
// [ ago]
}
// #let jan1 = datetime(day: 1, month: 1, year: 2023)
// #let april1 = datetime(day: 1, month: 4, year: 2024)
// #let may1 = datetime(day: 2, month: 5, year: 2024)
// #let today = datetime.today()
// #durationfmt(today - jan1)
// #durationfmt(today - april1)
// #durationfmt(today - may1)
// #{ calc.div-euclid(104, 52)}
|
https://github.com/f-ttok/polylux-template | https://raw.githubusercontent.com/f-ttok/polylux-template/main/ja-169.typ | typst | MIT License | #import "@preview/polylux:0.3.1": *
#set page(paper: "presentation-16-9", margin: (x: 1em, y: 1.2em))
#let fgcolor = rgb("#222")
#let bgcolor = rgb("#fff")
#show heading: set block(below: 1em)
#set text(size: 24pt, font: ("Inter", "Noto Sans JP"), fill: fgcolor, weight: 400)
#show math.equation: set text(size: 27pt, font: "New Computer Modern Math")
#set par(leading: 1em)
#let title-slide(body) = {
set heading(outlined: false)
logic.polylux-slide(align(center + horizon, body))
}
#let slide(body) = {
logic.polylux-slide(body)
}
#title-slide[
= タイトル
著者
発表場所(日付)
]
#slide[
== スライドタイトル
$ F(A) := 1/(2 pi i) integral_Gamma f(z) (z I - A)^(-1) dif z $
]
|
https://github.com/kairosiot/software.2024.11-Document_Template | https://raw.githubusercontent.com/kairosiot/software.2024.11-Document_Template/main/example/example.typ | typst | Other | #import "../typst-orange.typ": project, part, chapter, my-bibliography, appendices, make-index, index, theorem, mathcal
//#set text(font: "Linux Libertine")
//#set text(font: "TeX Gyre Pagella")
#set text(font: "Lato")
//#show math.equation: set text(font: "Fira Math")
#show math.equation: set text(font: "Lato Math")
#show raw: set text(font: "Fira Code")
#show: project.with(
title: "Exploring the Physical Manifestation of Humanity’s Subconscious Desires",
subtitle: "A Practical Guide",
date: "Anno scolastico 2023-2024",
author: "<NAME>",
mainColor: rgb("#F36619"),
lang: "en",
cover: image("./background.svg"),
imageIndex: image("./orange1.jpg"),
listOfFigureTitle: "List of Figures",
listOfTableTitle: "List of Tables",
supplementChapter: "Chapter",
supplementPart: "Part",
part_style: 0,
copyright: [
Copyright © 2023 <NAME>
PUBLISHED BY PUBLISHER
#link("https://github.com/flavio20002/typst-orange-template", "TEMPLATE-WEBSITE")
Licensed under the Apache 2.0 License (the “License”).
You may not use this file except in compliance with the License. You may obtain a copy of
the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by
applicable law or agreed to in writing, software distributed under the License is distributed on an
“AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
_First printing, July 2023_
]
)
#part("Part One Title")
#chapter("Sectioning Examples", image: image("./orange2.jpg"), l: "chap1")
#index("Sectioning")
== Section Title
#index("Sectioning!Sections")
#lorem(50)
#footnote[Footnote example text...Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent porttitor arcu luctus,
imperdiet urna iaculis, mattis eros. Pellentesque iaculis odio vel nisl ullamcorper, nec faucibus ipsum molestie.]
#lorem(50)
=== Subsection Title
#index("Sectioning!Subsections")
#lorem(50)
#lorem(50)
#lorem(50)
==== Subsubsection Title
#index("Sectioning!Subsubsections")
#lorem(100)
===== Paragraph Title
#index("Sectioning!Paragraphs")
#lorem(50)
#lorem(50)
#lorem(50)
#lorem(50)
#lorem(50)
#lorem(50)
#lorem(50)
#lorem(50)
#lorem(50)
#lorem(50)
#lorem(50)
#lorem(50)
#lorem(50)
#lorem(50)
#lorem(50)
#heading(level:2, numbering: none, "Unnumbered Section", outlined: false)
#heading(level:3, numbering: none, "Unnumbered Subsection", outlined: false)
#heading(level:4, numbering: none, "Unnumbered Subsubsection", outlined: false)
#chapter("In-text Element Examples", image: image("./orange2.jpg"))
== Referencing Publications
#index("Citation")
This statement requires citation @Smith:2022jd; this one is more specific @Smith:2021qr[page.~162].
== Link Examples
#index("Links")
This is a URL link: #link("https://www.latextemplates.com")[LaTeX Templates]. This is an email link: #link("mailto:<EMAIL>")[<EMAIL>]. This is a
monospaced URL link: https://www.LaTeXTemplates.com.
== Lists
#index("Lists")
#index("Vocabulary")
Lists are useful to present information in a concise and/or ordered way.
=== Numbered List
#index("Lists!Numbered List")
+ First numbered item
+ First indented numbered item
+ Second indented numbered item
+ First second-level indented numbered item
+ Second second-level indented numbered item
2. Second numbered item
3. Third numbered item
=== Bullet Point List
#index("Lists!Bullet Points")
- First bullet point item
- First indented bullet point item
- Second indented bullet point item
- First second-level indented bullet point item
- Second bullet point item
- Third bullet point item
=== Descriptions and Definitions
#index("Lists!Descriptions and Definitions")
/ Name: Definition
/ Word: Definition
/ Comment: Elaboration
== International Support
àáâäãåèéêëìíîïòóôöõøùúûüÿýñçˇcšž \
ÀÁÂÄÃÅÈÉÊËÌÍÎÏÒÓÔÖÕØÙÚÛÜŸÝÑ \
ßÇŒÆ ˇCŠŽ
== Ligatures
fi fj fl ffl ffi Ty
== Referencing Chapters
#index("Referencing")
This statement references to another chapter @chap1
#part("Part Two Title")
#chapter("Mathematics", image: image("./orange2.jpg"))
== Theorems
#index("Theorems")
=== Several equations
#index("Theorems!Several equations")
This is a theorem consisting of several equations.
#theorem(name: "Name of the theorem")[
In $E=bb(R)^n$ all norms are equivalent. It has the properties:
$ abs(norm(bold(x)) - norm(bold(y))) <= norm(bold(x-y)) $
$ norm(sum_(i=1)^n bold(x)_i) <= sum_(i=1)^n norm(bold(x)_i) quad "where" n "is a finite integer" $
]
=== Single Line
#index("Theorems!Single Line")
This is a theorem consisting of just one line.
#theorem()[
A set $mathcal(D)(G)$ in dense in $L^2(G)$, $|dot|_0$.
]
== Definitions
#index("Definitions")
== Notations
#index("Notations")
== Remarks
#index("Remarks")
== Corollaries
#index("Corollaries")
== Propositions
#index("Propositions")
=== Several equations
#index("Propositions!Several equations")
=== Single Line
#index("Propositions!Single Line")
== Examples
#index("Examples")
=== Equation Example
#index("Examples!Equation")
=== Text Example
#index("Examples!Text")
== Exercises
#index("Exercises")
== Problems
#index("Problems")
== Vocabulary
#index("Vocabulary")
#chapter("Presenting Information and Results with a Long Chapter Title", image: image("./orange3.jpg"))
== Table
#index("Table")
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent porttitor arcu luctus, imperdiet
urna iaculis, mattis eros. Pellentesque iaculis odio vel nisl ullamcorper, nec faucibus ipsum molestie.
Sed dictum nisl non aliquet porttitor. Etiam vulputate arcu dignissim, finibus sem et, viverra nisl.
Aenean luctus congue massa, ut laoreet metus ornare in. Nunc fermentum nisi imperdiet lectus
tincidunt vestibulum at ac elit. Nulla mattis nisl eu malesuada suscipit.
#figure(
table(
columns: (auto, auto, auto),
inset: 10pt,
align: horizon,
[*Treatments*], [*Response 1*], [*Response 2*],
[Treatment 1],
[0.0003262],
[0.562],
[Treatment 2],
[0.0015681],
[0.910],
[Treatment 3],
[0.0009271],
[0.296],
),
caption: [Table caption.],
) <table>
Referencing @table in-text using its label.
== Figure
#index("Figure")
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent porttitor arcu luctus, imperdiet
urna iaculis, mattis eros. Pellentesque iacu#theorem()[
A set $mathcal(D)(G)$ in dense in $L^2(G)$, $|dot|_0$.
]lis odio vel nisl ullamcorper, nec faucibus ipsum molestie.
Sed dictum nisl non aliquet porttitor. Etiam vulputate arcu dignissim, finibus sem et, viverra nisl.
Aenean luctus congue massa, ut laoreet metus ornare in. Nunc fermentum nisi imperdiet lectus
tincidunt vestibulum at ac elit. Nulla mattis nisl eu malesuada suscipit.
#figure(
image("creodocs_logo.svg", width: 50%),
caption: [Figure caption.],
) <figure>
Referencing @figure in-text using its label.
#figure(
placement: top,
table(
columns: (auto, auto, auto),
inset: 10pt,
align: horizon,
[*Treatments*], [*Response 1*], [*Response 2*],
[Treatment 1],
[0.0003262],
[0.562],
[Treatment 2],
[0.0015681],
[0.910],
[Treatment 3],
[0.0009271],
[0.296],
),
caption: [Floating table.],
) <table1>
#figure(
placement: bottom,
image("creodocs_logo.svg", width: 100%),
caption: [Floating figure.],
) <figure1>
#my-bibliography( bibliography("sample.bib"))
#make-index(title: "Index")
#show: appendices.with("Appendices")
#chapter("Appendix Chapter Title", image: image("./orange2.jpg"))
== Appendix Section Title
#lorem(50)
#chapter("Appendix Chapter Title", image: image("./orange2.jpg"))
== Appendix Section Title
#lorem(50) |
https://github.com/Myriad-Dreamin/typst.ts | https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/math/linebreak_03.typ | typst | Apache License 2.0 |
#import "/contrib/templates/std-tests/preset.typ": *
#show: test-page
// A single linebreak at the end still counts as one line.
#let hrule(x) = box(line(length: x))
#hrule(60pt)$e^(pi i)+1 = 0\ $
|
https://github.com/Myriad-Dreamin/typst.ts | https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/math/matrix-gaps_01.typ | typst | Apache License 2.0 |
#import "/contrib/templates/std-tests/preset.typ": *
#show: test-page
#set math.mat(gap: 1em)
$ mat(1, 2; 3, 4) $
|
https://github.com/Enter-tainer/typstyle | https://raw.githubusercontent.com/Enter-tainer/typstyle/master/tests/assets/cetz-tree.typ | typst | Apache License 2.0 | // CeTZ Library for Layouting Tree-Nodes
#import "../util.typ"
#import "../draw.typ"
#import "../coordinate.typ"
#import "../vector.typ"
#import "../matrix.typ"
#let typst-content = content
/// Layout and render tree nodes
///
/// - root (array): Tree structure represented by nested lists
/// Example: `([root], [child 1], ([child 2], [grandchild 1]))`
/// - draw-node (function): Callback for rendering a node.
/// Signature: `(node) => elements`. The nodes position
/// is accessible through the anchor `"center"` or the last
/// position `()`.
/// - draw-edge (function): Callback for rendering edges between nodes
/// Signature: `(source-name, target-name, target-node) => elements`
/// - direction (string): Tree grow direction (top, bottom, left, right)
/// - parent-position (string): Positioning of parent nodes (begin, center, end)
/// - grow (float): Depth grow factor (default 1)
/// - spread (float): Sibling spread factor (default 1)
#let tree(root, draw-node: auto, draw-edge: auto,
direction: "down", parent-position: "center",
grow: 1, spread: 1, name: none, ..style) = {
assert(parent-position in ("begin", "center"))
assert(grow > 0)
assert(spread > 0)
if direction == "down" { direction = "bottom" }
if direction == "up" { direction = "top" }
let opposite-dir = (left: "right", right: "left",
bottom: "top", top: "bottom")
if draw-edge == auto {
draw-edge = (source-name, target-name, target-node) => {
let (a, b) = (source-name + "." + direction,
target-name + "." + opposite-dir.at(direction))
draw.line(a, b)
/*
if direction == "bottom" {
draw.line(a, (rel: (0, -grow/3)), ((), "-|", b), b)
} else if direction == "up" {
draw.line(a, (rel: (0, grow/3)), ((), "-|", b), b)
} else if direction == "left" {
draw.line(a, (rel: (-grow/3, 0)), ((), "|-", b), b)
} else if direction == "right" {
draw.line(a, (rel: (grow/3, 0)), ((), "|-", b), b)
}
*/
}
} else if draw-edge == none {
draw-edge = (..) => {}
}
if draw-node == auto or draw-node in ("rect",) {
draw-node = (node, parent-name) => {
let content = node.content
if type(content) == str {
content = [#content]
} else if type(content) in (float, int) {
content = $#content$
} else if type(content) == dictionary and "content" in content {
content = content.content
} else if type(content) != typst-content {
panic("Unsupported content type "+type(content)+"! "+
"Provide your own `draw-node` implementation.")
}
if content != none {
draw.content((), content, name: "content")
} else {
draw.content((), [?], name: "content")
}
if draw-node == "rect" {
draw.rect((rel: (-.1, .1), to: "content.top-left"),
(rel: (.1, -.1), to: "content.bottom-right"))
}
}
}
assert(draw-node != none, message: "Node draw callback must be set!")
let build-node(tree, depth: 0, sibling: 0) = {
let children = ()
let cnt = none
if type(tree) == array {
children = tree.slice(1).enumerate().map(((n, c)) =>
build-node(c, depth: depth + 1, sibling: n))
cnt = tree.at(0)
} else {
cnt = tree
}
return (x: 0, y: depth * grow, n: sibling, depth: depth,
children: children, content: cnt)
}
// Layout node recursive
//
// return:
// (node, left-x, right-x, shift-x)
let layout-node(node, shift-x, ctx) = {
if node.children.len() == 0 {
node.x = shift-x
return (node, node.x, node.x)
} else {
let (min-x, max-x) = (none, none)
let (left, right) = (none, none)
let n-children = node.children.len()
for i in range(0, n-children) {
let child = node.children.at(i)
let (child-min-x, child-max-x) = (none, none)
(child, child-min-x, child-max-x) = layout-node(
child, shift-x, ctx)
node.children.at(i) = child
left = util.min(child.x, left)
right = util.max(child.x, right)
min-x = util.min(min-x, child-min-x)
max-x = util.max(max-x, child-max-x)
if child-max-x > right {
shift-x = child-max-x
}
shift-x += spread
}
if parent-position == "begin" {
node.x = left
} else {
node.x = left + (right - left) / 2
}
node.direct-min-x = left
node.direct-max-x = right
node.min-x = min-x
node.max-x = max-x
return (node, min-x, max-x)
}
}
let layout(node, ctx) = {
let (n, ..) = layout-node(node, 0, ctx)
return n
}
let node-position(node) = {
if direction == "bottom" {
return (node.x, -node.y)
} else if direction == "top" {
return (node.x, node.y)
} else if direction == "left" {
return (-node.y, node.x)
} else if direction == "right" {
return (node.y, node.x)
} else {
panic(message: "Invalid tree direction.")
}
}
let anchors(node, parent-path) = {
if parent-path != none {
parent-path += "-"
} else {
parent-path = ""
}
let d = (:)
d.insert(parent-path + str(node.n), node-position(node))
for child in node.children {
d += anchors(child, parent-path + str(node.n))
}
return d
}
let render(node, parent-name) = {
let name = "node-" + str(node.depth) + "-" + str(node.n)
let cmds = ()
cmds += draw.group(name: name, {
draw.move-to(node-position(node))
draw.anchor("center", ())
draw-node(node, parent-name)
})
if parent-name != none {
cmds += draw-edge(parent-name, name, node)
}
for child in node.children {
cmds += render(child, name)
}
return cmds
}
let root = build-node(root)
((
name: name,
style: style.named(),
before: ctx => {
ctx.groups.push((
ctx: ctx,
anchors: (:),
tree-root: layout(root, ctx)
))
return ctx
},
after: ctx => {
let self = ctx.groups.pop()
let nodes = ctx.nodes
ctx = self.ctx
if name != none {
ctx.nodes.insert(name, nodes.at(name))
}
return ctx
},
custom-anchors-ctx: (ctx) => {
let self = ctx.groups.last()
return anchors(self.tree-root, none)
},
children: (ctx) => {
let self = ctx.groups.last()
render(self.tree-root, none)
},
),)
}
|
https://github.com/Mc-Zen/quill | https://raw.githubusercontent.com/Mc-Zen/quill/main/tests/gates/nwire/test.typ | typst | MIT License | #set page(width: auto, height: auto, margin: 0pt)
#import "/src/quill.typ": *
#quantum-circuit(
1, nwire(1), nwire($2$), nwire($n$), nwire("p"), nwire($2n+1$), 2,
) |
https://github.com/Myriad-Dreamin/typst.ts | https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/crates/conversion/vec2bbox/README.md | markdown | Apache License 2.0 | # reflexo-vec2bbox
Render bounding box of vector items.
See [Typst.ts](https://github.com/Myriad-Dreamin/typst.ts)
|
https://github.com/polarkac/MTG-Stories | https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/022_Commander%20(2015%20Edition).typ | typst | #import "@local/mtgset:0.1.0": conf
#show: doc => conf("Commander (2015 Edition)", doc)
#include "./022 - Commander (2015 Edition)/001_All the Cairns of Jund.typ"
#include "./022 - Commander (2015 Edition)/002_Family Values.typ"
|
|
https://github.com/Enter-tainer/typstyle | https://raw.githubusercontent.com/Enter-tainer/typstyle/master/tests/assets/unit/math/complex-math.typ | typst | Apache License 2.0 | $
Re[epsilon(omega) \/ epsilon.alt_0] =& 1 + 2 / pi cal(P) integral_0^oo (omega' Im[
epsilon(omega') \/ epsilon_0
]) / (omega'^2 - omega^2) dif omega' \
Im[epsilon(omega) \/ epsilon.alt_0] =& sigma / (epsilon_0 omega) - (2 omega) / pi cal(P) integral_0^oo (omega' Re[
epsilon(omega') \/ epsilon_0 - 1
]) / (omega'^2 - omega^2) dif omega'
$ |
https://github.com/Blezz-tech/math-typst | https://raw.githubusercontent.com/Blezz-tech/math-typst/main/lib/my.typ | typst | #import "@preview/showybox:2.0.1": showybox
#let task(term) = box[
#showybox(
frame: (
border-color: blue.darken(50%),
title-color: blue.lighten(60%),
body-color: blue.lighten(70%)
),
body-style: (
color: black,
weight: "regular",
align: center
),
[#term]
)
]
#let answer(term) = box[
#showybox(
frame: (
border-color: green.darken(50%),
title-color: green.lighten(60%),
body-color: green.lighten(70%)
),
body-style: (
color: black,
weight: "regular",
align: center
),
[#term]
)
]
#let emptyset = (normal: $diameter$)
// https://github.com/typst/typst/issues/1595#issuecomment-1609971882
#let ru_alph(pattern: "а)") = {
let alphabet = "абвгдежзиклмнопрстуфхцчшщэюя".split("")
let f(i) = {
let letter = alphabet.at(i)
let str = ""
for char in pattern {
if char == "а" {
str += letter
}
else if char == "А" {
str += upper(letter)
}
else {
str += char
}
}
str
}
f
} |
|
https://github.com/shiki-01/typst | https://raw.githubusercontent.com/shiki-01/typst/main/school/syspro/1st_term_1/1_1.typ | typst | #import "../../../lib/conf.typ": conf, come, desc, ce, light
#import "@preview/codelst:2.0.1":
#import "@preview/pintorita:0.1.1"
#import "@preview/fletcher:0.4.3" as fletcher: diagram, node, edge
#show raw.where(lang: "pintora"): it => pintorita.render(it.text)
#show: doc => conf(
title: [情報システム 1学期],
date: [2024年4月11日],
doc,
)
#show heading: it => [
#if it.level == 1 {
[
#set align(center)
#set text(22pt)
#pad(
bottom: -70pt,
[#it\ ]
)
]
} else if it.level == 2 {
[
#set align(left)
#set text(18pt)
#pad(
top: 15pt,
bottom: -70pt,
[#it\ ]
)
]
} else if it.level == 3 {
[
#set align(left)
#set text(15pt)
#pad(
bottom: -70pt,
[#it\ ]
)
]
}
#if it.level == 2 {line(length: 100%,stroke: rgb("#eee"))}
#pad(bottom: -20pt, [])
#if it.level == 3 {
[#pad(bottom: 10pt,[])]
} else if it.level == 2 {
[#pad(bottom: -10pt,[])]
}
]
= 序章
== 情報システムの定義
#desc("情報システムとは")[
データ処理システム及び装置であって情報処理を行うもの。\
事務機器、通信装置などを含む
]
#light("今までになかった")情報の処理の伝達などをおこなうプロセスを作ること。
== 情報システム開発の目的と目標
== 情報システムのライフサイクル
#image(
"./img/1_1_1.drawio.png"
)
== 情報システムの種類とプロジェクト
*種類*
#table(
columns: 2,
[システム名],[説明],
[生産管理システム],[製品の生産計画や生産ラインの管理を行うシステム],
[原材料調達システム],[必要な原材料の調達や在庫管理を行うシステム],
[製造管理システム],[製品の製造工程や品質管理を行うシステム],
[在庫管理システム],[製品や資材の在庫管理を行うシステム],
[運送管理システム],[製品の配送や物流管理を行うシステム],
[販売管理システム],[製品の販売計画や顧客管理を行うシステム],
[財務会計システム],[企業の財務情報や会計処理を管理するシステム]
)
#pagebreak()
*利用形態*
Government(行政)\
Business(企業)\
Consumer(個人)
G to C 住民表やパスポートの発行サービスなど\
B to G 電子入札システム \
B to B 基幹系業務システム\
B to C 通販サイト\
C to C フリマやオークション\
*プロジェクト体制図例*
```pintora
mindmap
@param layoutDirection TB
+ PM Project Manager
++ PL Project Leader
+++ Team A Leader
++++ A1 Member
++++ A2 Member
+++ Team B Leader
++++ B1 Member
++++ B2 Member
```
#desc("QCD")[
プロジェクトを適切に進めるために適切さを評価する指標\
Quality(品質)\
Cost(コスト)\
Delivery(納期)
]
#desc("ステークホルダー")[
利害関係者\
プロジェクトにかかわる企業の経営者や部門の責任者、現場の利用者を指す。\
プロジェクト内の「決定権を持つ人」の意味で用いられることもある。
]
#pagebreak()
= 情報システムの設計
== 情報システムの要求分析と定義
=== 要求分析と定義の意義
#desc("要件定義")[
利用者側が実現したいことを明確にしてから「要件定義」として開発者側が作ろうとするものを定義する。
]
#diagram(
node-stroke: .1pt,
edge-stroke: .5pt,
node((0,0), [要求分析と定義], corner-radius: 2pt, extrude: (0, 3)),
edge("->"),
node((0,-1), [要件定義], corner-radius: 2pt, extrude: (0, 3)),
edge("->"),
node((0,-2), [基本(外部)設計], corner-radius: 2pt, extrude: (0, 3)),
edge("->"),
node((0,-3), [詳細(内部)設計], corner-radius: 2pt, extrude: (0, 3)),
edge("->"),
node((0,-4), [製造(プログラム)], corner-radius: 2pt, extrude: (0, 3)),
edge("->"),
node((0,-5), [テスト], corner-radius: 2pt, extrude: (0, 3)),
edge("->"),
node((0,-6), [本番移行(リリース)], corner-radius: 2pt, extrude: (0, 3)),
edge("->"),
node((0,-7), [運用・保守], corner-radius: 2pt, extrude: (0, 3)),
)
=== 要求定義の活動
*意見交換・情報収集方法*
- 資料調査
- 観察調査
- ヒアリング
*共通理解を進める方法*
- 機能要求と非機能要求の確認
- ユースケース図の作成
- 機能改装図の作成
*要求定義に含まれるもの*
- 背景
- 課題
- 目的
- 概要
- 機能
*ユースケース図*
#table(
columns: 2,
[図記号],[説明],
[ユースケース],[ユーザーがシステムに対して行う操作、機能],
[アクター],[情報システムを利用する対象、対象の名称],
[対象],[ユースケースを実現する対象],
)
対象内に記述されるユースケースは機能要求を表し、対象外に記述されるユースケースは非機能要求を表す。
P.18 問2
#image(
"./img/1_1_3.drawio.svg"
)
#pagebreak()
*機能階層図*
#come("機能階層図","info")[
情報システムが提供する機能にだけ着目し、図示するもの。
]
```pintora
mindmap
@param layoutDirection LR
+ システム名
++ 機能A
+++ 機能A1
+++ 機能A2
++ 機能B
+++ 機能B1
+++ 機能B2
```
ユースケース図において、明確になった情報システムが備えるべき機能について、さらに細分化した図を作成することができ、設計すべき情報システムのモジュールを明確にすることができる。
*要求定義*
#light[要求分析]を踏まえて#light[要求定義]を行う
#pagebreak()
*節末問題*
2
#image(
"./img/1_1_4.drawio.svg"
)
```pintora
mindmap
@param layoutDirection LR
+ レビュー機能
++ レビュー一覧
+++ レビュー詳細
++++ リアクション
++++ 保存
+++ 検索
++++ 絞り込み
++ レビュー投稿
++++ レビュー編集
++++ 投稿の削除
```
== 情報システムのモデル化
=== システムのモデル化
#desc("モデル化")[
データの処理の流れを図式化すること
]
例)
- データフロー図(Data Flow Diagram: DFD)
- 実体関連図(Entity Relationship Diagram: ERD)
- 状態遷移図
=== データフロー図(DFD)
#desc("DFD")[
データの流れを図式化したもの。主に#light[データフロー]、#light[データストア]、#light[外部実体]、#light[プロセス]の4つの図記号を使って表現される。
]
#table(
columns: 3,
[名前],[図記号],[説明],
[データフロー],
[
#diagram(
node-stroke: .1pt,
edge-stroke: .5pt,
edge("-|>"),
)
],
[データの流れを表す],
[データストア],
[
#diagram(
node-stroke: .1pt,
edge-stroke: .5pt,
node((0,0), [データストア], corner-radius: 2pt, extrude: (0, 3))
)
],
[データの保管場所を表す],
[外部実体],
[
#diagram(
node-stroke: .1pt,
edge-stroke: .5pt,
edge("-|>"),
node((0,0), [外部実体],stroke:auto, corner-radius: 2pt, extrude: (0, 3))
)
],
[システム外部のデータの流れを表す],
[プロセス],
[
#diagram(
node-stroke: .1pt,
edge-stroke: .5pt,
node((0,0), [プロセス], corner-radius: 2pt, extrude: (0, 3),radius: 2em)
)
],
[データの加工を表す],
)
#pagebreak()
例)図書管理システムにおける「図書の予約」のデータフロー図
#table(
columns: 2,
table.cell(
align: center,
colspan: 2
)[図書の予約],
[外部実体(発生源、出力先)],[利用者],
[データフロー],[予約申請情報、返却情報、予約情報、在庫情報、貸出案内、利用者情報],
[データストア],[利用者台帳、貸出台帳、蔵書台帳],
[プロセス],[予約],
)
#image(
"./img/1_1_5.drawio.svg"
)
例)図書管理システムにおける「新規図書の購入」のデータフロー図
#table(
columns: 2,
table.cell(
align: center,
colspan: 2
)[新規図書の購入],
[外部実体(発生源、出力先)],[図書館職員],
[データフロー],[購入リスト、購入候補図書],
[データストア],[購入図書候補台帳],
[プロセス],[図書購入],
)
#pagebreak()
#table(
columns: 2,
table.cell(
align: center,
colspan: 2
)[図書の検索],
[外部実体(発生源、出力先)],[利用者],
[データフロー],[書籍名・著者名、在庫情報、登録なし(在庫登録なし)],
[データストア],[蔵書台帳、購入図書候補台帳],
[プロセス],[検索],
)
#table(
columns: 2,
table.cell(
align: center,
colspan: 2
)[図書の予約],
[外部実体(発生源、出力先)],[利用者],
[データフロー],[予約申請情報、返却情報、予約情報、在庫情報、貸出情報、登録なし(在庫登録なし)、利用者情報],
[データストア],[利用者台帳、貸出台帳、蔵書台帳],
[プロセス],[予約],
)
#image(
"./img/1_1_6.drawio.svg"
)
#pagebreak()
#desc("実体関連図(ERD)")[
データ構造を実体(エンティティ)とその間の関係(リレーションシップ)で表現したもの。
]
#table(
columns: 2,
[名前],[説明],
[実体],[データのまとまりを表す。記号の中に実体名を記述する。],
[関連],[実体同士の関連を示す。記号の中に関連名を記述する。],
[属性],[実体が持つ属性情報を表す。記号の中に実体名と属性情報を記述する],
[カーディナリティ],[関連情報の詳細を表す。],
)
#table(
columns: 2,
[名前],[説明],
[1 : 1],[ひとつのAに対してBは一つ存在し、逆に一つのBに対してAが存在する関係を表す],
[1 : n],[ひとつのAに対して複数のBが存在し、逆に一つのBに対してAが存在する関係を表す],
[n : m],[複数のAに対して複数のBが存在する関係を表す],
)
*現行の図書管理システムにおける実体関連図を作成する*
1. 実体と関連を洗い出す
2. 実体と関連のカーディナリティを洗い出す
3. 実体の属性を洗い出す
#table(
columns: 2,
[実体],[関連],
table.cell(
rowspan: 2
)[利用者と図書],[貸出],[返却],
[図書館職員と図書],[登録],
)
#pagebreak()
p31 問5
- ひとつの実体Cに対して実体Bは複数存在し、逆に複数の実体Bに対しては実体Cが一つしか存在しない。実体Cと実体Bの関連は「関連b」とする。
- 複数の実体Aに対して実体Cは複数存在し、逆に複数の実体Cに対しても実体Aは複数存在する。実体Aと実体Cの関連は「関連a」とする。
#image(
"./img/1_1_7.drawio.svg"
)
p36 ③
次の実体関連図について、それぞれの実体と関連がどのようになっているか説明しなさい。
#image(
"./img/1_1_8.drawio.svg"
)
- ひとつの実体Aに対して実体Bは複数存在し、逆に複数の実体Bに対して実体Aは一つしか存在しない。実体Aと実体Bの館関連は「関連a」とする
- ひとつの実体Bに対して実体Cは複数存在し、逆に複数の実体Cに対しても実体Bは複数存在する。実体Bと実体Cの関連は「関連b」とする
- ひとつの実体Cに対して実体Aはひとつだけ存在し、逆にひとつの実体Aに対しても実体Cはひとつだけ存在する。実体Cと実体Aの関連は「関連c」とする
#desc("状態遷移図")[
システムの状態遷移を表す図。状態の移り変わるきっかけ(イベント)とその時に実行する動作(アクティビティ)を合わせて表現する。主に#light[状態]、#light[遷移]、#light[開始状態]、#light[終了状態]の4つの図記号を使って表現される。
]
#table(
columns: 3,
[名前],[図記号],[意味],
[状態],
[
#diagram(
node-stroke: .1pt,
edge-stroke: .5pt,
node((0,0), [状態], corner-radius: 2pt, extrude: (0, 3))
)
],[開始状態、終了状態、状態],
[遷移],
[
#diagram(
node-stroke: .1pt,
edge-stroke: .5pt,
edge("-|>"),
)
],
[状態間の移り変わりを表す],
[開始状態],
[
●
],
[状態遷移図の開始を表す],
[終了状態],
[
⦿
],
[状態遷移図の終了を表す],
)
状態遷移表を作成することによって、情報システムの設計を進めるときに、テストの段階などで修正のリスクを回避することができる。
p36 問6
「図書の検索」処理の端末における入出力時のメニュー画面の状態遷移図を「状態」「遷移(イベント / アクティビティ)」を考えて作成しなさい。
#image(
"./img/1_1_9.drawio.svg"
)
#pagebreak()
= 情報システムの分割
== モジュール分割
#desc("モジュール")[
複雑な機能をできるだけ単純なモジュール(要素)に分割して効率よく設計を進めていくこと。
]
#come("利点","comment")[
- 作業をモジュールごとに分担して進めることができる
- 作業中の不具合をモジュール単位で修復作業ができる
- モジュール自体をほかの情報システムで再利用することができる
]
#table(
columns: 2,
table.cell(
align: center,
colspan: 2,
)[モジュール分割の技法],
[技法],[説明],
[STS分割],[データの流れに注目し、実行すべき機能を入力処理機能(源泉: Source )、変換機能(変換: Transformation )、出力機能(吸収: Sink )の三つに分割する技法],
[トランザクション分割],[トランザクション(データの種類とその処理単位)に応じて分割する技法],
[共通機能分割],[共通する機能をまとめてモジュール化する技法],
)
== STS分割
*分割の手順*
1. DFDを参考に、データの流れに注目する
2. #light[最大抽象入力点]と、#light[最大抽象出力点]を特定する\
ここでの最大抽象入力点とは、その点以降は入力データが発生しない最大中小最大抽象出力店とは、その点以降は出力データが発生しない最大の場所のことを言う。
3. STS(入力処理機能、変換機能、出力機能)に分割する
4. モジュールに変換する
#image(
"./img/1_1_10.drawio.svg"
)
*章末問題*
1. 次の文章を読んで各問いに答えなさい。
(1) 文中のかっこの当てはまるものをこたえよ
情報システムの設計は、要求分析と定義、外部設計、内部設計、プログラミング、テスト、運用・保守というような流れになっている。要求分析と定義から外部設計までを#light[上流工程]、それ以降を#light[下流工程]と呼ぶ。\
(2) 次のア~ウの文章は、下線部 a における方法を説明したものである。それぞれどのような調査方法などを説明したもか答えなさい
資料調査\
ア. 現行の情報システムの業務内容の資料から、処理内容・方法を調査する
ヒアリング(面接)調査\
イ.現行の情報システムと、業務で使用している利用者にヒアリング(面接)を行い、問題点などを調査する
観察調査\
ウ.現行の情報システムが実際に運用されている現場を開発者が観察し、問題点などを調査する
(3) 次の文章はなにについて説明している文章か、問題文中から四文字で抜きだせ\
「実際の情報システムに、実装してほしい機能や性能の要求。利用者が見落とす可能性は低い」
A. 機能要求
#pagebreak()
2. 次の文章を読んで、各問題に答えなさい。
(1) 文章中のかっこの中に当てはまる言葉を書きなさい
図書管理システムの設計において、利用者の要求分析や新しい図書管理システムの素案の提案を行うためにデータや処理の流れを図式化することを#light[モデル化]という。
(2) (1)の手法の一つにDFDというものがある。「返却の督促」の処理・機能を以下の資料を参考に「外部実態」「データフロー」「データストア」「プロセス」を考え、DFDを作成しなさい。
#table(
columns: 2,
table.cell(
align: center,
colspan: 2
)[返却の督促],
[外部実体],[図書館職員、利用者],
[データフロー],[返却情報、貸出情報、利用者情報],
[データストア],[利用者台帳、貸出台帳],
[プロセス],[返却の督促],
)
#image(
"./img/1_1_11.drawio.svg"
)
(3)
(4) 「図書の検索」の処理についてシステム名、機能名、詳細機能を考え、機能階層図を作成しなさい。
```pintora
mindmap
@param layoutDirection LR
+ 図書検索システム
++ 検索情報の入力
+++ 検索結果の表示
+++ 予約画面への遷移
```
3. 次の状態遷移図から状態遷移表を作成しなさい。
#table(
columns: 4,
[],[イベントA],[イベントB],[イベントC],
[状態A],[状態B],[\*],[\*],
[状態B],[\*],[状態C],[\*],
[状態C],[\*],[\*],[状態A],
)
4. 次のかっこの中に当てはまる言葉を書きなさい
情報システムの設計は、利用者と開発者との間で、これから設計する情報システムについて調査や要求分析(利用者との意見交換・情報収集)をすることから始まる。利用者との意見交換や情報収集する方法としては、#light[資料調査]調査、#light[観察調査]調査、#light[ヒヤリング(面接)]調査がある。このような調査を実施し、利用者と開発者との間での共通理解をしていく。共通理解を進めていく手法として、#light[機能要求]と#light[非機能要求]の確認、#light[機能階層図]、#light[ユースケース図]の作成がある。\
開発者側は、最終的に要求分析を行った情報をもとに、#light[要求定義]をする。#light[要求定義]では、情報システムの設計を進めるうえで、背景、課題、目的、概要、機能の項目を明確にする。
5. 次の文章を読んで各問いに答えなさい
モジュール分割とは、実際の情報システムの設計を進めていくとき、複雑な機能が組み合わさることで実現されるため、複雑な機能をできるだけ単純な#light[モジュール]に分割して、効率よく設計を進めていくための技法である。\
モジュール分割を行う技法と死しては、STS分割、トランザクション分割、共通機能分割などがある。\
#light[STS分割]とは、一つのモジュールをデータの流れに注目し、実行すべき機能を源泉、変換、吸収の三つに分割する技法である。\
#light[トランザクション分割]とは、トランザクションに応じて分割する技法である。\
#light[共通機能分割]とは、モジュール分割を進めるときに、モジュール間で共通して行われる処理をまとめる技法である。
(1) かっこに当てはまる言葉を書きなさい
(2)
- 設計及び開発作業をモジュールごとに分担して進めることができる
(3) トランザクションについて説明せよ
データの種類とその処理単位のこと
6. 登場した分割技法以外の分割技法の用途や特徴を一つ調べなさい。
*ジャクソン法とワーニエ法*
#desc("ジャクソン法")[
入出力データの構造に着目して分割する技法。基本・連続・選択・繰り返しの四つの単位を基準として階層構造化し、モジュールに分割する。
]
#desc("ワーニエ法")[
入力データの構造に着目した技法で、順次・選択・繰り返しの三つの単位を基準として分割し、処理内容の繰り返しにおける処理回数を重視する
] |
|
https://github.com/soul667/typst | https://raw.githubusercontent.com/soul667/typst/main/PPT/MATLAB/touying/docs/docs/layout.md | markdown | ---
sidebar_position: 3
---
# Layout Your Contents
To better manage every detail in the slides and achieve better rendering results, like Beamer, Touying has introduced some unique concepts. This helps you maintain global information better and easily switch between different themes.
## Global Information
You can set the title, subtitle, author, date, and institution information for slides using:
```typst
#let s = (s.methods.info)(
self: s,
title: [Title],
subtitle: [Subtitle],
author: [Authors],
date: datetime.today(),
institution: [Institution],
)
```
The `date` parameter can accept `datetime` format and `content` format. The display format of the date in `datetime` format can be changed using:
```typst
#let s = (s.methods.datetime-format)(self: s, "[year]-[month]-[day]")
```
:::tip[Internals]
Here, we introduce a bit of the OOP concept in Touying.
You should know that Typst is a typesetting language that supports incremental rendering. That is, Typst caches the results of previous function calls. This requires Typst to have only pure functions, meaning functions that do not change external variables. Therefore, it's challenging to modify a global variable in the true sense, as done in LaTeX. Even if you use `state` or `counter`, you need to use `locate` and callback functions to access their values, and this approach has a significant impact on performance.
Touying does not use `state` and `counter`, nor does it violate the Internals of Typst's pure functions. Instead, it cleverly uses a method in an object-oriented style to maintain a global singleton `s`. In Touying, an object refers to a Typst dictionary with its own member variables and methods. We have a convention that methods have a named parameter `self` to pass the object itself, and all methods are placed in the `.methods` domain. With this concept, it's not difficult to write a method to update `info`:
```typst
#let s = (
info: (:),
methods: (
// update info
info: (self: none, ..args) => {
self.info += args.named()
self
},
)
)
#let s = (s.methods.info)(self: s, title: [title])
Title is #s.info.title
```
This way, you can also understand the purpose of the `utils.methods()` function: it binds `self` to all methods of `s` and returns it. It simplifies the subsequent use through unpacking syntax.
```typst
#let (init, slide, slides) = utils.methods(s)
```
:::
## Sections and Subsections
Similar to Beamer, Touying also has the concepts of sections and subsections.
In the `#show: slides` mode, sections and subsections correspond to first-level and second-level titles, respectively. For example:
```typst
#import "@preview/touying:0.2.1": *
#let (init, slide, slides) = utils.methods(s)
#show: init
#show: slides
= Section
== Subsection
Hello, Touying!
```

However, the second-level title does not always correspond to the subsection. The specific mapping may vary depending on the theme.
In the more general `#slide[..]` mode, sections and subsections are passed as parameters to the `slide` function, for example:
```typst
#slide(section: [Let's start a new section!])[..]
#slide(subsection: [Let's start a new subsection!])[..]
```
This will create a new section and a new subsection, respectively. However, this change typically only affects the internal `sections` state of Touying and is not displayed on the slide by default. The specific display may vary depending on the theme.
Note that the `section` and `subsection` parameters of `slide` can accept both content blocks and arrays in the format `([title], [short-title])` or dictionaries in the format `(title: [title], short-title: [short-title])`. The `short-title` will be used in some special cases, such as in the navigation of the `dewdrop` theme.
## Table of Contents
Displaying a table of contents in Touying is straightforward:
```typst
#import "@preview/touying:0.2.1": *
#let (init, slide, touying-outline) = utils.methods(s)
#show: init
#slide[
== Table of contents
#touying-outline()
]
```
The definition of `touying-oultine()` is:
```typst
#let touying-outline(enum-args: (:), padding: 0pt) = { .. }
```
You can modify the internal enum parameters with `enum-args`.
If you have complex custom requirements for the table of contents, you can use:
```typst
#slide[
== Table of contents
#states.touying-final-sections(sections => ..)
]
```
## Page Management
Due to the use of the `set page(..)` command in Typst, which creates a new page instead of modifying the current one, Touying chooses to maintain a `s.page-args` member variable in the singleton `s`. These parameters are only applied when creating a new slide.
:::warning[Warning]
Therefore, you should not use the `set page(..)` command yourself. Instead, you should modify the `s.page-args` member variable inside `s`.
:::
This way, we can query the parameters of the current page in real-time using `s.page-args`. This is useful for some functions that need to get page margins or the current page background color, such as `transparent-cover`.
## Page Columns
If you need to divide a page into two or three columns, you can use the default `compose` feature provided by the Touying `slide` function. The simplest examples are:
```typst
#slide[
First column.
][
Second column.
]
```

If you need to change the way columns are composed, you can modify the `composer` parameter of `slide`. The default parameter is `utils.with.side-by-side(columns: auto, gutter: 1em)`. If we want the left column to occupy the remaining width, we can use:
```typst
#slide(composer: utils.side-by-side.with(columns: (1fr, auto), gutter: 1em))[
First column.
][
Second column.
]
```
 |
|
https://github.com/An-314/Notes-of-DSA | https://raw.githubusercontent.com/An-314/Notes-of-DSA/main/list.typ | typst | = 列表List
根据是否修改数据结构,所有操作大致分为两类方式
- 静态: 仅读取,数据结构的内容及组成一般不变:`get`、`search`
- 动态: 需写入,数据结构的局部或整体将改变: `put`、`insert`、`remove`
与操作方式相对应地,数据元素的存储与组织方式也分为两种
- 静态:数据空间整体创建或销毁
数据元素的物理次序与其逻辑次序严格一致;可支持高效的静态操作;比如向量,元素的物理地址与其逻辑次序线性对应
- 动态:为各数据元素动态地分配和回收的物理空间
相邻元素记录彼此的物理地址,在逻辑上形成一个整体;可支持高效的动态操作
列表(`list`)是采用动态储存策略的典型结构
- 其中的元素称作节点(`node`),通过指针或引用彼此联接
- 在逻辑上构成一个线性序列
- 相邻节点彼此互称前驱(`predecessor`)或后继(`successor`)
- 没有前驱/后继的节点称作首(`first/front`) /末(`last/rear`)节点
- 循位置访问(call by position)
*`ListNode`接口*
```cpp
pred() / succ() // 当前节点前驱/后继节点的位置
data() // 当前节点所存数据对象
insertAsPred() / insertAsSucc() // 插入前驱/后继节点,返回新节点位置
```
```cpp
template <typename T> using ListNodePosi = ListNode<T>*; //列表节点位置(C++.0x)
template <typename T> struct ListNode { //简洁起见,完全开放而不再严格封装
T data; //数值
ListNodePosi<T> pred; //前驱
ListNodePosi<T> succ; //后继
ListNode() {} //针对header和trailer的构造
ListNode(T e, ListNodePosi<T> p = NULL, ListNodePosi<T> s = NULL)
: data(e), pred(p), succ(s) {} //默认构造器
ListNodePosi<T> insertAsPred( T const & e ); //前插入
ListNodePosi<T> insertAsSucc( T const & e ); //后插入
};
```
*`List`接口*
```cpp
size() / empty() // 报告节点总数 / 判定是否为空 列表
first() / last() // 返回首 / 末节点的位置 列表
insertAsFirst(e) / insertAsLast(e) // 将e当作首 / 末节点插入 列表
insert(p, e), insert(e, p) // 将e当作节点p的直接后继、 前驱插入 列表
remove(p) // 删除节点p 列表
sort(p, n) / sort() // 区间 / 整体排序 列表
find(e, n, p) / search(e, n, p) // 在指定区间内查找目标e 列表 / 有序列表
dedup() / uniquify() // 剔除重复节点 列表 / 有序列表
traverse( visit() ) // 遍历列表,统一按visit()处理所有节点 列表
```
```cpp
template <typename T> class List { //列表模板类
private: Rank _size; ListNodePosi<T> header, trailer; //哨兵
//头、 首、 末、 尾节点的秩, 可分别理解为-1、 0、 n-1、 n
protected: /* ... 内部函数 */
public: /* ... 构造函数、析构函数、只读接口、可写接口、遍历接口 */
};
```
*构造*
```cpp
template <typename T> void List<T>::init() { //初始化,创建列表对象时统一调用
header = new ListNode<T>;
trailer = new ListNode<T>;
header->succ = trailer; header->pred = NULL;
trailer->pred = header; trailer->succ = NULL;
_size = 0;
}
```
*访问*:重载下标操作符,可模仿向量的循秩访问方式
```cpp
template <typename T> //O(r)效率,虽方便,勿多用
ListNodePosi<T> List<T>::operator[]( Rank r ) const { //0 <= r < size
ListNodePosi<T> p = first(); //从首节点出发
while ( 0 < r-- ) p = p->succ; //顺数第r个节点即是
return p; //目标节点
} //秩 == 前驱的总数
```
时间复杂度为$O(r)$,均匀分布时期望为$O(n)$。
== 无序列表
=== 插入与删除
实现是容易的,就是修改指针指向的问题,但是要注意的是,插入的时候,要先修改前驱的后继,再修改后继的前驱,删除的时候,先修改前驱的后继,再修改后继的前驱,最后删除节点。
通过重载性质,直接从函数声明上区分前插入、后插入
```cpp
template <typename T> ListNodePosi<T> List<T>:: //e当作p的前驱插入
insert(T const & e, ListNodePosi<T> p) { _size++; return p->insertAsPred( e ); }
template <typename T> //前插入算法(后插入算法完全对称)
ListNodePosi<T> ListNode<T>::insertAsPred( T const & e ) { //O(1)
ListNodePosi<T> x = new ListNode( e, pred, this ); //创建
pred->succ = x; pred = x; //次序不可颠倒
return x; //建立链接,返回新节点的位置
} //得益于哨兵,即便this为首节点亦不必特殊处理——此时等效于insertAsFirst(e)
```
```cpp
template <typename T> T List<T>::remove( ListNodePosi<T> p ) { //删除合法节点p
T e = p->data; //备份待删除节点存放的数值(设类型T可直接赋值)
p->pred->succ = p->succ; p->succ->pred = p->pred; //短路联接
delete p; _size--; return e; //返回备份的数值
} //O(1)
```
=== 构造与析构
`copyNodes()` + 构造
```cpp
template <typename T> void List<T>::copyNodes( ListNodePosi<T> p, Rank n ) { //O(n)
init(); //创建头、尾哨兵节点并做初始化
while ( n-- ) { //将起自p的n项依次作为末节点
insertAsLast( p->data ); //插入
p = p->succ;
}
}
List<T>::List( List<T> const & L ) { copyNodes( L.first(), L._size ); }
```
`clear()` + 析构
```cpp
template <typename T> List<T>::~List() //列表析构
{ clear(); delete header; delete trailer; } //清空列表,释放头、尾哨兵节点
template <typename T> Rank List<T>::clear() { //清空列表
Rank oldSize = _size;
while ( 0 < _size ) //反复
remove( header->succ ); //删除首节点, O(n)
return oldSize;
}
```
#figure(
image("fig\列表\1.jpg", width: 80%),
caption: "列表的构造与析构",
)
=== 查找与去重
无序的查找也只能$O(n)$。
```cpp
template <typename T> //0 <= n <= rank(p) < _size
ListNodePosi<T> List<T>::find( T const & e, Rank n, ListNodePosi<T> p ) const {
while ( 0 < n-- ) //自后向前
if ( e == ( p = p->pred ) ->data ) //逐个比对(假定类型T已重载“==”)
return p; //在p的n个前驱中,等于e的最靠后者
return NULL; //失败
} //O(n)
template <typename T>
ListNodePosi<T> find( T const & e ) const { return find( e, _size, trailer ); }
```
去重
```cpp
template <typename T> Rank List<T>::dedup() {
Rank oldSize = _size;
ListNodePosi<T> p = first();
for ( Rank r = 0; p != trailer; p = p->succ ) //O(n)
if ( ListNodePosi<T> q = find( p->data, r, p ) ) //O(n)
remove ( q );
else
r++; //无重前缀的长度
return oldSize - _size; //删除元素总数
} //正确性及效率分析的方法与结论,与Vector::dedup()相同
```
=== 遍历
一样地,利用函数对象或者函数指针。
```cpp
template <typename T> void List<T>::traverse( void ( * visit )( T & ) )
{ for( NodePosi<T> p = header->succ; p != trailer; p = p->succ ) visit( p->data ); }
template <typename T> template <typename VST> void List<T>::traverse( VST & visit )
{ for( NodePosi<T> p = header->succ; p != trailer; p = p->succ ) visit( p->data ); }
```
== 有序列表
=== 唯一化
直接一趟线性扫描即可,时间复杂度为$O(n)$。
```cpp
template <typename T> Rank List<T>::uniquify() {
if ( _size < 2 ) return 0; //平凡列表自然无重复
Rank oldSize = _size; //记录原规模
ListNodePosi<T> p = first(); ListNodePosi<T> q; //各区段起点及其直接后继
while ( trailer != ( q = p->succ ) ) //反复考查紧邻的节点对(p,q)
if ( p->data != q->data ) p = q; //若互异,则转向下一对
else remove(q); //否则(雷同) 直接删除后者, 不必如向量那样间接地完成删除
return oldSize - _size; //规模变化量,即被删除元素总数
} //只需遍历整个列表一趟, O(n)
```
=== 查找
`search`相较于`find`,在有序结构中,约定语义,希望能返回失败的位置,例如返回失败时左边界的前驱。
```cpp
template <typename T> //在有序列表内节点p的n个真前驱中,找到不大于e的最靠后者
ListNodePosi<T> List<T>::search( T const & e, Rank n, ListNodePosi<T> p ) const {
do { //初始有: 0 <= n <= rank(p) < _size;此后, n总是等于p在查找区间内的秩
p = p->pred; n--; //从右向左
} while ( ( -1 != n ) && ( e < p->data ) ); //逐个比较,直至越界或命中
return p; //最终停止的位置; 失败时为区间左边界的前驱(可能就是header)
} //调用者可据此判断查找是否成功
```
最好$O(1)$,最坏$O(n)$;等概率时平均$O(n)$,正比于区间宽度。
== 选择排序Selection Sort
对于起泡排序,每次的效果是将最大的元素放到最后。不必经历那么多循环,直接找到最大的元素,放到最后即可。
```cpp
template <typename T> void List<T>::selectionSort( ListNodePosi<T> p, Rank n ) {
ListNodePosi<T> head = p->pred, tail = p;
for ( Rank i = 0; i < n; i++ ) tail = tail->succ; //待排序区间为(head, tail)
while ( 1 < n ) { //反复从(非平凡)待排序区间内找出最大者,并移至有序区间前端
insert( remove( selectMax( head->succ, n ) ), tail ); //可能就在原地...
tail = tail->pred; n--; //待排序区间、有序区间的范围,均同步更新
}
}
```
#figure(
image("fig\列表\2.png", width: 80%),
caption: "选择排序",
)
只能线性搜索,向前试探
```cpp
template <typename T> //从起始于位置p的n个元素中选出最大者, 1 < n
ListNodePosi<T> List<T>::selectMax( ListNodePosi<T> p, Rank n ) { //Θ(n)
ListNodePosi<T> max = p; //最大者暂定为p
for ( ListNodePosi<T> cur = p; 1 < n; n-- ) //后续节点逐一与max比较
if ( ! lt( (cur = cur->succ)->data, max->data ) ) //data max
max = cur; //则更新最大元素位置记录
return max; //返回最大节点位置
}
```
*稳定性*:有多个元素同时命中时,约定返回其中特定的某一个(比如最靠后者)。若采用平移法,如此即可保证,重复元素在列表中的相对次序,与其插入次序一致。
复杂度是$Theta(n^2)$,但是比起起泡排序,减少了交换次数,因此效率更高。如果采用堆优化,可以将复杂度降低到$O(n log n)$,但是丧失了稳定性。
== 插入排序Insertion Sort
始终将序列视作两部分:
- 前缀 `S[0, r)`:有序
- 后缀 `U[r, n)`:待排序
初始化: `|S| = r = 0`
反复地,针对`e = A[r]`
- 在`S`中查找适当位置
- 插入`e`
- `r ++`
#figure(
image("fig\列表\3.png", width: 80%),
caption: "插入排序",
)
核心想法是减而之治。
```cpp
template <typename T> void List<T>::insertionSort( ListNodePosi<T> p, Rank n ) {
for ( Rank r = 0; r < n; r++ ) { //逐一引入各节点,由Sr得到Sr+1
insert( search( p->data, r, p ), p->data ); //查找 + 插入
p = p->succ; remove( p->pred ); //转向下一节点
} //n次迭代, 每次O(r + 1)
} //仅使用O(1)辅助空间,属于就地算法
```
- 得益于此前约定的`search()`接口语义,前缀的确总是保持有序,而且*稳定*
- 复杂度,最好$O(n)$,最坏$O(n^2)$,平均:
若前缀已经有序,对于随机的下一个元素,插入位置是均等的,则有
$
1 + sum_(k=0)^r k/(r+1) = 1 + 1/(r+1)
$
从而总体复杂度是$O(n^2)$。
- 可简明度量有序/乱序的程度与时间成本之成正比
- 输入敏感性/input-sensitivity
- *在线*online:在数据完全就绪之前,即可开始计算
== 归并排序Merge Sort
就像向量中的二路归并排序一样,将列表分为两部分,分别排序,然后合并。
```cpp
template <typename T> void List<T>::mergeSort( ListNodePosi<T> & p, Rank n ) {
if ( n < 2 ) return; //待排序范围足够小时直接返回,否则...
ListNodePosi<T> q = p; Rank m = n >> 1; //以中点为界
for ( Rank i = 0; i < m; i++ ) q = q->succ; //均分列表: O(m) = O(n)
mergeSort( p, m ); mergeSort( q, n – m ); //子序列分别排序
p = merge( p, m, *this, q, n – m ); //归并
} //若归并可在线性时间内完成,则总体运行时间亦为O(nlogn)
```
```cpp
template <typename T> ListNodePosi<T> //this.[p +n) & L.[q +m):归并排序时, L == this
List<T>::merge( ListNodePosi<T> p, Rank n, List<T>& L, ListNodePosi<T> q, Rank m ) {
ListNodePosi<T> pp = p->pred; //归并之后p或不再指向首节点,故需先记忆,以便返回前更新
while ( ( 0 < m ) && ( q != p ) ) //小者优先归入
if ( ( 0 < n ) && ( p->data <= q->data ) ) { p = p->succ; n--; } //p直接后移
else { insert( L.remove( ( q = q->succ )->pred ) , p ); m--; } //q转至p之前
return pp->succ; //更新的首节点
} //运行时间O(n + m),线性正比于节点总数
```
良好的搜索语义保证了*稳定性*。
== 游标实现
有些语言不支持指针类型,可以利用线性数组,以游标方式模拟列表
- elem[]:对外可见的数据项
- link[]:数据项之间的引用
维护逻辑上互补的列表data和free
下图中`data`箭头所指的地方是列表的头,`free`箭头所指的地方是空闲的头。其左侧`elem[]`对应的指针就是他的后继。
#figure(
image("fig\列表\4.png", width: 80%),
caption: "游标实现",
)
#figure(
image("fig\列表\5.png", width: 80%),
caption: "游标实现",
)
#figure(
image("fig\列表\6.png", width: 80%),
caption: "游标实现",
)
#figure(
image("fig\列表\7.png", width: 80%),
caption: "游标实现",
) |
|
https://github.com/protohaven/printed_materials | https://raw.githubusercontent.com/protohaven/printed_materials/main/common-tools/chop_saw_metal.typ | typst |
#import "/meta-environments/env-features.typ": *
= Metal Chop Saw
The metal chop saw is a power tool suited for making cuts through thin stock: square rod, round rod, angle iron, or square tube.
The metal chop saw can be very dangerous: make sure you have a good understanding of how to operate this tool, and be very careful using this tool.
== Notes
=== Safety
#safety_hazard_box([*No freehand cuts.* Freehand cutting is a major cause of accidents and should not be attempted.])
Be mindful of the area to the right of the metal chop saw; waste pieces may be violently thrown in that direction after a cut is complete. If another shop member is using the metal drill press, vertical metal band saw, or any of the grinders, wait until they have finished before making a cut.
Do not make cuts that produce waste pieces smaller than 8mm (5/16") in length. The waste piece must be 8mm (5/16") or greater to avoid the piece falling through the blade slot and causing any potential danger.
Don’t use the metal chop saw for 45° angle cuts. Use this saw for cuts at 90°.
When making a cut, only let the blade approach the workpiece from the back or from the top. Do not let the workpiece touch the back part of the blade where the teeth are traveling upward: the teeth may pull the workpiece up and out of the vise.
The metal chop saw is not bolted down. // Make sure any workpiece mounted in the vise will not tip over the saw during the cut.
Unplug the saw while performing any maintenance.
=== Use
If you see several chipped teeth in a row during the blade inspection step, the blade needs to be replaced: please inform a tech on duty.
// We have a 14” blade, but the signage on the saw lists capacities for a 15” blade. Be conservative with the amount of cut for a given material; make your cuts below the listed capacities.
Apply gentle pressure during a cut. Use enough pressure to take light chips or shavings with the cutting heads. Applying insufficient pressure will prevent chip formation, cut poorly and dull the blade. Applying excess pressure will not make the machine perform any better, and will reduce the lifetime of the motor and the blade.
== Parts of the Metal Chop Saw
=== Full View
#figure(
image("./images/chop_saw-metal-front_quarter-annotated.png", width: 100%),
caption: "An annotated full view of the metal chop saw.",
)
=== Table View
#figure(
image("./images/chop_saw-metal-table-annotated.png", width: 100%),
caption: "An annotated full view of the metal chop saw table.",
)
=== Lower Blade Guard
The lower blade guard will automatically retract as the saw is lowered into the cut, and then automatically cover the blade as the saw is lifted from the cut.
Do not hold the lower blade guard open.
=== Upper Blade Guard
The upper blade guard is fixed in position to cover the top half of the blade at all times when in use.
=== Handwheel
The handwheel tightens or loosens the vice jaws.
=== Quick Release Mechanism
The quick release mechanism releases the clamping screw on the front vice jaw, so that the front swiveling jive jaw can be quickly adjusted.
Lift the blue handle to slide the front vice jaw away form or into the workpiece. Always replace the quick release mechanism before using the saw to make sure proper clamping force is being applied to the workpiece.
=== Front Swiveling Vice Jaw
The front vise jaw can swivel to accommodate miter cuts. Miter cuts are prohibited on this tool: the abrasive chop saw in the blacksmithing area should be used instead.
Always make sure the front vice jaw has stable and full contact with the workpiece; see @chop_saw_metal-workholding for more information about workholding with this tool.
=== Repositionable Rear Vice Jaw
The rear vise jaw can be locked into an angled position to accommodate miter cuts. Miter cuts are prohibited on this tool: the abrasive chop saw in the blacksmithing area should be used instead.
Always make sure the rear vice jaw has stable and full contact with the workpiece; see @chop_saw_metal-workholding for more information about workholding with this tool.
=== Cutting Handle
Use the cutting handle to lower the cutting head into the work piece.
Only use the cutting handle with your right hand.
// === Cutting Head Hold Down Pin
//
// (Push/pull) the cutting head hold down pin to lock the cutting head in the lowered position.
//
// Locking the head in the lowered position is useful for transporting the saw.
=== Rear Vice Jaw Locking Lever
The rear vice jaw locking lever locks the rear vice jaw into place.
// === Travel Stop Adjustment Screw
//
=== Protractor Scale
Use the protractor scale to align the rear vice jaw to an angle when making miter cuts.
Miter cuts are prohibited on this tool: the abrasive chop saw in the blacksmithing area should be used instead.
// Set the rear vice jaw at an angle to make angled cuts. #warning([Do not set the rear vice jaw to an angle more/less than n degrees; to shallow/steep of an angle may cause the cutoff to fly away from the machine.])
// === Work Bench Mounting Holes x4
//
//
// === Blade Change Hex Key
//
// Is the blade on the saw a member-changable part?
//
// === Blade Arbor Guard
//
//
// === Arbor Lock Button
//
// === Positive Stop Location Pin
//
// === Shield
//
// === Carbon Brushes Access Cap
=== On/Off Trigger Switch
The on/off switch has two parts: the safety lock and the trigger switch. The safety lock is the button under the thumb when gripping the handle, and must be pressed to turn on the saw. The trigger switch is on the inside of the handle.
To turn on the motor, depress the safety lock, then squeeze the trigger switch.
// === Carry Handle
=== Chip Collection Tray
The chip collection tray catches chips and dust that are ejected downward out of the cut.
Check the chip collection tray for any previously cut material that extends into the cutting area, and might interfere with a cut. Clear out any interfering material before making a cut.
== Basic Operation
=== Workholding
<chop_saw_metal-workholding>
- Clear the machine of swarf and dust before clamping the workpiece.
- Make sure the workplace is secure.
- Make sure the workpiece doesn’t rock in the clamp.
- Make sure the workpiece is is full contact with the table. \
_If the piece drops during the cut, it could rotate and pinch the blade._
- Make sure the front is tight.
- Make sure the back jaw is set and clamped.
Check that *both* ends of the workpiece are secure in the vise. Pieces to short to be fully secured in the vise cannot be safely clamped, and should not be used with this saw.
Secure the part so the blade catches it on the down or through swing, not on the upswing.
TODO: iamge of this
Bring the unpowered saw blade down on the workpiece to check position of the cut:
- Make sure the cut is positioned where you want it on the workpiece.
- Make sure the waste piece is at least 8mm (5/16") in length.
Secure the part so the blade catches it on the down or through swing, not on the upswing.
// Do not over-tighten the clamp when the rear vise jaw is set to an angle as the vice screw can get bent from the alteral forces.
=== Setting Up
Inspect the entire blade for chipped teeth.
Clean the clamps and table before securing the workpiece. Make sure the clamping area is free of swarf and dust, and nothing will get on the clamping surfaces that may cause the workpiece to loosen of shift.
Ensure that the cut-off portion of the workpiece is free to move away from the blade at the end of the cut. Be very careful to make sure that the waste piece will not get jammed in the clamping area, against the blade, or in any other part of the machine.
Ensure that the workpiece is held securely in the vise. (see @chop_saw_metal-workholding)
Check to make sure no one is nearby who could get hit by a flying waste piece.
=== Making a Cut
+ Plug in the machine. \
_Do NOT put the electrical box on the table of the drill press._
+ *Only use the right hand to operate the saw.* \
_Keep your body away from cut, and out of the path of any flying debris._
+ With the saw in a fully upright position, turn on the motor and let the blade come up to full speed.
+ Gently lower the saw blade toward the workpiece. Go slowly!
+ Gradually increase the pressure as the saw blade enters the workpiece.\
_Do not force the saw blade into the workpiece. Let the saw blade do the work._
+ Adjust the cutting pressure to suit the material. \
_Use the least amount of pressure needed to make the cut. Use more pressure to move the blade through thicker parts of the workpiece, less pressure to move the blade through thinner parts of the workpiece._
+ Reduce pressure as the blade begins to exit the material.
+ Turn off the motor.
+ Upon completion of the cut, allow the saw blade assembly to rise completely into its upper position.
+ Do not remove your hands or the workpiece from the tool until the blade has come to a complete stop and the blade is completely covered by the blade guard.
=== Cleaning Up
- Use chip brushes and dust pans to clean up any swarf and dust.
- Pick up any waste pieces.
- Unplug the saw, and stow the power cable.
|
|
https://github.com/next-generation-cartographers/ngc-code-of-conduct | https://raw.githubusercontent.com/next-generation-cartographers/ngc-code-of-conduct/main/code-of-conduct.typ | typst |
#let body-font = "Source Sans Pro"
#let display-font = "Space Grotesk"
#let gray = luma(150)
#let light-gray = luma(240)
#set page(
margin: (x: 3.5cm, top: 3cm, bottom: 4cm),
background: {
set text(font: display-font, weight: "black", size: 10em, tracking: .2em, fill: light-gray)
set box(stroke: .05em + light-gray, radius: 1em, inset: (x: .5em, y: .25em))
rotate(-45deg, box(upper[Draft]))
},
header: [
#grid(
columns: (auto, 1fr, auto),
align: horizon,
{
image("links/ngc-rgb-logomark-black.svg", height: 1.2em)
},
{
set align(center)
set text(font: display-font, weight: "black", fill: gray, size: .75em)
box(
inset: .5em,
fill: gray,
baseline: .5em,
radius: 1em,
text(fill: white, tracking: .2em, upper[draft]),
)
h(.5em)
[· Code of conduct – Feb, 5th 2024]
}, {})
],
footer: context [
#set align(center)
#set text(0.75em, fill: gray, font: display-font)
#counter(page).display(
"1 of 1",
both: true,
)
]
)
#set text(font: body-font)
#show heading: it => {
v(1.5em, weak: true)
set align(if(it.level == 1) {center} else {left})
set text(font: display-font)
it
}
#align(
center,
image("links/ngc-rgb-logotype-black.svg", width: 2cm)
)
= International Cartographic Association\ Working Group – Next Generation Cartographers\ Code of Conduct
== Purpose
To state the commitment of Next Generation Cartographers, as a group and for each individual
member, to uphold ethical and professional standards of conduct.
== Who The Policy Applies To
All members of the Next Generation Cartographers community, and Next Generation
Cartographers as an ICA Working Group. We expect members to follow these rules at
meetings, in person and virtual, related social events, online forums and spaces, including
Discord and Telegram, social media, and in any other modality of engagement.
== Policy Statement
*Promote an inclusive environment.* As a global group of students and early career
cartographers, we welcome and support people of all backgrounds, identities, and
abilities. We are mindful of power differentials within our community and prioritize the safety of marginalized people, and we take care to promote a positive environment. We engage in constructive criticism rather than challenging or attacking others with whom we disagree. #underline[Constructive criticism] includes specific and actionable feedback with the intent of helping the recipient.
*Treat others with respect and dignity.* We engage in respectful conversation with one another. We will not always agree, but disagreement is not an excuse for disrespectful behavior. #underline[We do not tolerate abuse or harassment of community members or participants]. Abusive behavior includes hurtful behaviors which are intimidating, rude, unwelcome, offensive, demeaning and that disrespect the dignity and autonomy of others. #underline[Harassment] includes, but is not limited to:
- Offensive comments related to gender, gender identity and expression, sexual orientation, disability, group status, physical appearance, body size, race, or religion;
- False statements meant to harm a person’s reputation;
- Publication of private communications;
- Non-consensual outing of any aspect of a person’s identity;
- Deliberate mistitling, misgendering, or using ‘dead’ or rejected names;
- Stalking, in person or online;
- Deliberate intimidation or bullying, online or offline;
- Unwelcome photography or recording;
- Sustained disruption of talks or other events;
- Inappropriate physical contact;
- Unwelcome sexual attention.
*Speak up and report violations.* Everyone has the responsibility to report harassment. If you are being harassed, notice someone else being harassed, or if you have concerns, please reach out to (designated person) or Next Generation Cartographers leadership [members] right away with the following information:
- The name of the person submitting the report;
- The name of the person subjected to misconduct;
- The name (if known) or description of person committing misconduct (accused);
- A detailed description of the misconduct, including dates, times, locations, witnesses(if any) and any other pertinent information.
We will work to quickly address the problem. Reports remain confidential.
== Responsibilities
As a member of Next Generation Cartographers, you are responsible for becoming
familiar with and following this policy.
== How Reports Are Handled
Next Gen Cartography will review all reports of misconduct. If warranted, a leadership meeting will be scheduled to discuss potential courses of action or consequences, including contact with the ICA Executive Committee.
#v(1fr)
#block(stroke: 1pt + luma(220), width: 100%, inset: 1em, radius: .25em)[
#set text(font: display-font)
*Policy History*
Issue Date:\
Effective Date:\
Update/Review Summary:
]
#[
#set text(fill: gray)
*Notes*\
Language in this code of conduct policy is based on and adapted from policies from NACIS, Geek Feminism, MenEngage Alliance, Brown University, and from International Science Council Code of Conduct.
] |
|
https://github.com/Isaac-Duan/ousr_typst_templates | https://raw.githubusercontent.com/Isaac-Duan/ousr_typst_templates/main/t1.typ | typst | MIT License | #set text(size:10pt, font: ("simsun"), lang: "zh")
#set page("a4", flipped: true, columns: 2)
// 设置heading的格式
// 在每一个heading后添加一个不可见的段落(par),这样正文的缩进可以保持2个字符
#show heading: it => {
if it.level == 1 {
set align(center)
set text(font:"Microsoft Yahei UI", size: 30pt)
it
par(leading:1.4em)[#text(size:0.5em)[#h(2em)]]
}
if it.level == 2 {
set align(left)
set text(weight:"black",size: 26pt)
it
par(leading:1.4em)[#text(size:0.5em)[#h(2em)]]
}
}
#set par(first-line-indent: 2em)
#show emph: it => {
text(font:"楷体",it.body)
}
#set page(
//height: 100pt,
//margin: 20pt,
footer: [
#set align(center)
#set text(8pt)
#counter(page).display(
"1 / 1",
both: true,
)
]
)
// 添加一个靠左对齐的 “致书对象”
#let tos(x) = [
#set par(first-line-indent: 0em)
#set text(font:"FangSong", size: 18pt)
#x
]
// 添加一个靠右居中对齐的“姓名,日期”的签名戳
#let nametime(n,t) = [
#set align(right)
#block(above: 40pt, below: 120pt)[
#set align(center)
#set par(first-line-indent: 0em)
#set text(font:"FangSong")
#n
#parbreak()
#t
]
]
= 缩进测试文章
== 「出师表」全文
#tos[陛下据言:]
先帝创业未半而中道崩殂,今天下三分,益州疲弊,此诚危急存亡之秋也。然侍卫之臣不懈于内,忠志之士忘身于外者,盖追先帝之殊遇,欲报之于陛下也。诚宜开张圣听,以光先帝遗德,恢弘志士之气,不宜妄自菲薄,引喻失义,以塞忠谏之路也。
宫中府中,俱为一体,陟罚臧否,不宜异同。若有作奸犯科及为忠善者,宜付有司论其刑赏,以昭陛下平明之理,不宜偏私,使内外异法也。
侍中、侍郎郭攸之、费祎、董允等,此皆良实,志虑忠纯,是以先帝简拔以遗陛下。愚以为宫中之事,事无大小,悉以咨之,然后施行,必能裨补阙漏,有所广益。
将军向宠,性行淑均,晓畅军事,试用于昔日,先帝称之曰能,是以众议举宠为督。愚以为营中之事,悉以咨之,必能使行阵和睦,优劣得所。
亲贤臣,远小人,此先汉所以兴隆也;亲小人,远贤臣,此后汉所以倾颓也。先帝在时,每与臣论此事,未尝不叹息痛恨于桓、灵也。侍中、尚书、长史、参军,此悉贞良死节之臣,愿陛下亲之信之,则汉室之隆,可计日而待也。
臣本布衣,躬耕于南阳,苟全性命于乱世,不求闻达于诸侯。先帝不以臣卑鄙,猥自枉屈,三顾臣于草庐之中,咨臣以当世之事,由是感激,遂许先帝以驱驰。后值倾覆,受任于败军之际,奉命于危难之间,尔来二十有一年矣。
先帝知臣谨慎,故临崩寄臣以大事也。受命以来,夙夜忧叹,恐托付不效,以伤先帝之明,故五月渡泸,深入不毛。今南方已定,兵甲已足,当奖率三军,北定中原,庶竭驽钝,攘除奸凶,兴复汉室,还于旧都。此臣所以报先帝而忠陛下之职分也。至于斟酌损益,进尽忠言,则攸之、祎、允之任也。
愿陛下托臣以讨贼兴复之效,不效,则治臣之罪,以告先帝之灵。若无兴德之言,则责攸之、祎、允等之慢,以彰其咎;陛下亦宜自谋,以咨诹善道,察纳雅言,深追先帝遗诏,臣不胜受恩感激。
今当远离,临表涕零,不知所言。
#nametime[汉丞相征北顺天大将军诸葛亮][公元227年5月14日]
== 「后出师表」全文
先帝深虑#emph[汉、贼不两立,王业不偏安],故托臣以讨贼也。以先帝之明,量臣之才,固知臣伐贼,才弱敌强也。然不伐贼,王业亦亡。惟坐而待亡,孰与伐之?是故托臣而弗疑也。
臣受命之日,寝不安席,食不甘味。思惟北征。宜先入南。故五月渡泸,深入不毛,并日而食;臣非不自惜也,顾王业不可得偏安于蜀都,故冒危难,以奉先帝之遗意也,而议者谓为非计。今贼适疲于西,又务于东,兵法乘劳,此进趋之时也。谨陈其事如左:
高帝明并日月,谋臣渊深,然涉险被创,危然后安。今陛下未及高帝,谋臣不如良、平,而欲以长策取胜,坐定天下,此臣之未解一也。
刘繇、王朗各据州郡,论安言计,动引圣人,群疑满腹,众难塞胸,今岁不战,明年不征,使孙策坐大,遂并江东,此臣之未解二也。
曹操智计,殊绝于人,其用兵也,仿佛孙、吴,然困于南阳,险于乌巢,危于祁连,逼于黎阳,几败北山,殆死潼关,然后伪定一时耳。况臣才弱,而欲以不危而定之,此臣之未解三也。
曹操五攻昌霸不下,四越巢湖不成,任用李服而李服图之,委任夏侯而夏侯败亡,先帝每称操为能,犹有此失,况臣驽下,何能必胜?此臣之未解四也。
自臣到汉中,中间期年耳,然丧赵云、阳群、马玉、阎芝、丁立、白寿、刘郃、邓铜等及曲长、屯将七十余人,突将、无前、賨叟、青羌、散骑、武骑一千余人。此皆数十年之内所纠合四方之精锐,非一州之所有;若复数年,则损三分之二也,当何以图敌?此臣之未解五也。
今民穷兵疲,而事不可息;事不可息,则住与行劳费正等。而不及今图之,欲以一州之地,与贼持久,此臣之未解六也。
夫难平者,事也。昔先帝败军于楚,当此时,曹操拊手,谓天下已定。然后先帝东连吴越,西取巴蜀,举兵北征,夏侯授首,此操之失计,而汉事将成也。然后吴更违盟,关羽毁败,秭归蹉跌,曹丕称帝。凡事如是,难可逆见。臣鞠躬尽瘁,死而后已。至于成败利钝,非臣之明所能逆睹也。
#nametime[诸葛亮][兴安三十六年十月四日]
== 雪国 \<日文原版 -- 节选>
国境の長いトンネルを抜けると雪国であった。夜の底が白くなった。信号所に汽車が止まった。
内側の座席から娘が立って来て、島村の前のガラス窓を落とした。雪の冷気が流れ込んだ。娘は窓いっぱいに乗り出して、遠くへ叫ぶように、
「駅長さん、駅長さん」
明かりをさげてゆっくり吹きを踏んできた男は、襟巻で鼻の上まで包み、耳に帽子の毛皮を垂れていた。
もうそんな寒さかと島村は外を眺めると鉄道の官舎らしいバラックが山裾に寒々と散らばっているだけで、雪の色はそこまで行かぬうちに闇に飲まれていた。
「駅長さん、私です、御機嫌よろしゅうございます」
「ああ、葉子さんじゃないか。お帰りかい。また寒くなったよ」
「弟が今度こちらに勤めさせていただいておりますのですってね。お世話さまですわ」
「こんなところ、今に寂しくて参るだろうよ。若いのに可哀想だな」
「ほんの子供ですから、駅長さんからよく教えてやっていただいて、よろしくお願いいたしますわ」
「よろしい。元気で働いてるよ。これからいそがしくなる。去年は大雪だったよ。よく雪崩れてね、汽車が立往生するんで、村も炊出しがいそがしかったよ」
「駅長さんずいぶん厚着に見えますわ。弟の手紙には、まだチョッキも着ていないようなことを書いてありましたけれど」
私は着物を四枚重ねだ。若い者は寒いと酒ばがり飲んでいるよ。それでごろごろあすこにぶっ倒れてるのさ、風邪を引いてね」
駅長は宿舎の方へ手の明かりを振り向けた。
「弟もお酒をいただきますでしょうか」
「いや」
「駅長さんもうお帰りですの?」
「私は怪我をして、医者に通ってるんだ」
「まあ。いけませんわ」
和服に外套の駅長は寒い立話をさっさと切り上げたいらしく、もう後姿を見せながら、
「それじゃまあ大事にいらっしゃい」
「駅長さん、弟は今出ておりませんの?」と葉子は雪の上を目探しして、
「駅長さん、弟をよく見てやって、お願いです」
悲しいほど美しい声であった。高い響きのまま夜の雪から木魂して来そうだった。
汽車が動き出しても、彼女は窓から胸を入れなかった。そうして線路の下を歩いている駅長に追いつくと、
「駅長さあん、今度の休みの日に家へお帰りって、弟に言ってやって下さあい」
「はあい」と、駅長が声を張り上げた。
葉子は窓をしめて、赤らんだ頬に両手をあてた。
ラッセルを三台備えて雪を待つ、国境の山であった。トンネルの南北から、電力による雪崩れ報知線が通じた。除雪人夫延べ人員五千名に加えて消防組青年団の延人員二千名出動の手配がもう整っていた。
そのような、やがて雪に埋もれる鉄道信号所に葉子という娘の弟がこの冬から勤めているのだと分かると、島村はいっそう彼女に興味を強めた。
しかしここで、「娘」と言うのは、島村にそう見えたからであって、連れの男が彼女の何であるか、むろん島村の知るはずはなかった。二人のしぐさは夫婦じみていたけれども、男は明らかに病人だった。病人相手ではつい男女の隔てがゆるみ、まめまめしく世話すればするほど、夫婦じみて見えるものだ。字際また自分より年上の男をいたわる女の幼い母ぶりは、遠目に夫婦とも思われよう。
島村は彼女一人だけを切り離して、その姿の感じから、自分勝手に娘だろうときめているだけのことだった。でもそれには、彼がその娘を不思議な見方であまりに見つめ過ぎた結果、彼自らの感傷が多分に加わってのことかもしれない。
もう三時間も前のこと、島村は退屈まぎれに左手の人差指をいろいろに動かして眺めては、結局この指だけが、これから会いに行く女をなまなましく覚えている、はっきり思い出そうとあせればあせるほど、つかみどころなくぼやけてふく記憶の頼りなさのうちに、この指だては女の触感で今も濡れていて、自分を遠くの女へ引く寄せるかのようだと、不思議に思いながら、鼻につけて匂いを嗅いでみたりしていたが、ふとその指で窓ガラスに線を引くと、そこに女の片目がはっきり浮き出たのだった。彼は驚いて声をあげそうになった。しかしそれは彼が心を遠く部屋っていたからのことで、気がついてみればなんでもない、向こう側の座席の女が写ったのだった。外は夕闇がおりているし、汽車のなかは明かりがついている。それで窓ガラスが鏡になる。けれども、スチイムの温みでガラスがすっかり水蒸気に濡れているから、指で拭くまでその鏡はなかったのだった。
娘の片目だけはかえって異様に美しかったものの、島村は顔を窓に寄せると、夕景色見たさという風なり旅愁顔を俄かづくりして、掌でガラスをこすった。
娘は胸をこころもち傾けて、前に横わたった男を一心に見下ろしていた。肩に力が入っているところから、少しいかつい眼も瞬きさえしないほどの真剣さのしるしだと知れた。男は窓の方を枕にして、娘の横へ折り曲げた足をあげていた。三等車である。島村の真横ではなく、一つ前の向こう側の座席だったから、横寝している男の顔は耳のあたりまでしか鏡に写らなかった。
娘は島村とちょうど斜めに向かい合っていることになるので、じかにだって見られるのだが、彼女等が汽車に乗り込んだ時、なにか涼しく刺すような娘の美しさに驚いて見を伏せるとたん、娘の手を固くつかんだ男の青黄色い手が見えたものだから、島村は二度とそっちを向いては悪いような気がしていたのだった。
鏡の中の男の顔色はただもう娘の胸のあたりを見ているゆえに安らかだという風に落ちついていた。弱い体力が弱いながらに甘い調和を漂わせていた。襟巻を枕に敷き、それを鼻の下にひっかけて口をぴったり覆い、それからまた上になった頬を包んで、一種の頬かむりのような工会だが、ゆるんで来たり、鼻にかぶさって来たりする。男が目を動かすか動かさぬうちに、娘はやさしい手つきで直してやっていた。見ている島村がいらっ立て来るほど幾度もその同じことを、二人は無心に繰り返していた。また、男の足をつつんだ外套の裾が時々開いて垂れ下がる。それも娘はすぐ気がついて直してやっていた。これらがまことに自然であった。このようにして距離というものを忘れながら、二人は果しなく遠くへ行くものの姿のように思われたほどだった。それゆえ島村は悲しみをみているというつらさはなくて、夢のからくりを眺めているような思いだった。不思議な鏡のなかのことだったからでもあろう。
鏡の底には夕景色が流れていて、つまり写るものと写す鏡とが、映画の二重写しのように動くのだった。登場人物と背景とはなんのかかわりもないのだった。しかも人物は透明のはかなさで、風景は夕闇のおぼろな流れで、その二つが融け合いながらこの世ならぬ象徴の世界を描いていた。殊に娘の顔のただなかに野山のともし火がともった時には、島村はなんともいえぬ美しさに胸がふるえたほどだった。
遥かの山の空はまだ夕焼の名残の色がほのかだったから、窓ガラス越しに見る風景は遠くの方までものの形が消えてはいなかった。しかし色はもう失われてしまっていて、どこまで行っても平凡な野山の姿がなもさら平凡に見え、なにものも際立って注意を惹きようがないゆえに、かえってなにかぼうっと大きい感情の流れであった。むろんそれは娘の顔をそのなかに浮べでいたからである。姿が写る部分だけは窓の外が見えないけれども、娘の輪郭のまわりを絶えず夕景色が動いているので、娘の顔も透明のように感じられた。しかしほんとうに透明かどうかは、顔の裏を流れてやまぬ夕景色が顔の表を通るかのように錯覚されて、見極める時がつかめないのだった。
汽車のなかもさほど明るくはなし、ほんとうの鏡のように強くはなかった。反射がなかった。だから、島村は見入っているうちに、鏡のあることをだんだん忘れてしまって、夕景色の流れのなかに娘が浮かんでいるように思われて来た。
そういう時彼女の顔のなかにともし火がともったのだった。この鏡の映像は窓の外のともし火を消す強さはなかった。ともし火も映像を消しはしなかった。そうしてともし火は彼女の顔のなかを流れて通るのだった。しかし彼女の顔を光り輝かせるようなことはしなかった。冷たく遠い光であった。小さい瞳のまわりをぼうっと明るくしながら、つまり娘の眼と火とあ重なった瞬間、彼女の眼は夕闇の波間の浮ぶ、妖しく美しい夜光虫であった。
こんな風に見られていることを、葉子は気づくはずがなかった。彼女はただ病人に心を奪われていたが、たとえ島村の方へ振り向いたところで、窓ガラスに写る自分の姿は見えず、窓の外を眺める男など見に止まらなかっただろう。
島村が葉子を長い間盗み見しながら彼女に悪いということを忘れていたのは、夕景色の鏡の非現実な力にとらえられていたからだったろう。
だから、彼女が駅長に呼びかけて、ここでもなにか真剣過ぎるものを見せた時にも、物語めいた興味が先に立ったのかもしれない。
ところがそれから半時間ばかり後に、思いがけなく葉子達も島村と同じ駅に下りたので、彼はまたなにか起るかと自分にかかわりがあるかのように振り返ったが、プラット・フォウムの寒さに触れると、急に汽車のなかの非礼が恥しくなって、後も見ずに機関車の前を渡った。
男が葉子の肩につかまって線路へ下りようとした時に、こちらから駅員が手を上げて止めた。やがて闇から現れて来た長い貨物列車が二人の姿を隠した。
宿屋の客引きの番頭はちょうど火事場の消防のようにものものしい雪装束だった。耳をつつみ、ゴムの長靴をはいていた。待合室の窓から線路の方を眺めて立っている女も、青いマントを着て、その頭巾をかぶっていた。
島村は汽車のなかのぬくみがさめなくて、そとのほんとうの寒さをまだ感じなかったけれども、雪国の冬は初めてだから、土地の人のいでたちにまずおびやかされた。
「そんな格好をするほど寒いのかね」
「へい、もうすっかり冬支度です。雪の後でお天気になる前の晩は、特別冷えます。今夜はこれでも氷点を下っておりますでしょうね」
「これが氷点以下かね」と、島村は軒端の可愛い氷柱を眺めながら、宿の番頭と自動車に乗った。雪の色が家々の低い屋根をいっそう低く見せて、村はしいんと底に沈んでいるようだった。
「なるほどなににさわっても冷たさがちがうよ」
「去年は氷点下二十何度といるのが一番でした」
「雪は?」
「さあ、普通七、八尺ですけれど、多い時は一丈を二、三尺超えてますでしょうね」
「これからだね」
「これからですよ。この雪はこの間一尺ばかり降ったのが、だいぶ解けてきたところです」
「解けることもあるのかね」
「もういつ大雪になるか分かりません」
「十二月の初めであった。
島村はしつっこい風心地でつもっていた鼻が、頭のしんまですっといちどきに通って、よごれものが洗い落とされるように、水洟がしきりと落ちて来た。
「お師匠さんとこの娘はまだいるかい」
「へえ、おりますおります。駅におりましたが、御覧になりませんでした、濃い青のマントを着て」
「あれがそうだったの?――後で呼べるだろう」
「今夜ですか」
「今夜だ」
「今の終列車でお師匠さんの息子が帰るとか言って、迎えに出ていましたよ」
夕景色のなかで菓子にいたわられていた病人は、島村が合いに来た女の家の息子だったのだ。
そうと知ると、自分の胸のなかをなにかが通り過ぎたように感じたけれども、このめぐりあわせを、彼はさほど不思議と思うことはなかった。不思議と思わぬ自分を不思議と思ったくらいのものであった。
指で覚えている女と眼にともし火をつけていた女との間に、何ががあるのかなにが起きるのか、島村はなぜかそれが心のどこかで見えるような気持ちもする。まだ夕景色の鏡から醒め切らぬせいだろうか。あの夕景色の流れは、さては時の流れの象徴であったかと、彼はほとそんなことを呟いた。
スキイの季節前の温泉宿は最も客の少ない時で、島村が内湯から上がって来ると、もう全く寝静まっていた。古びた廊下は彼の踏むたびにガラス戸を微かに鳴らした。その長いはずれの帳場の曲り角に、裾を冷え冷えと黒光りの板の上へ広げて、女が高く立っていた。
とうとう芸者に出たのであろうかと、その裾を見てはっとしたけれども、こちらへ歩いて来るでもない、体のどこかを崩して迎えるしなを作るでもない、じっと動かぬその立ち姿から、彼は遠目にも真面目なものを受け取って、急いた行ったが、女の傍に立っても黙っていた。女も濃い白粉の顔で微笑もうとすると、かえって泣き面になったので、何も言わずに二人は部屋の方へ歩き出した。
あんなことがあったのに、手紙も出さず、合いにも来ず、踊りの型の本など送るという約束も果さず、女からすれば笑って忘れられたとしか思えないだろうから、まず島村の詫びかいいわけを言わぬばならない順序だったが、顔を見ないで歩いているうちにも、彼女は彼を責めるどころか、体いっぱいになつかしさを感じていることが知れるので、彼はなおさら、どんなことを行ったにしても、その言葉は自分の方が不真面目だという響きしか持たぬだろうと思って、なにか彼女に気おされる甘い喜びにつつまれていたが、階段の下まで来ると、
「こいつが一番よく君を覚えていたよ」と、人差指だけ伸ばした左手の握り拳を、いきなり女の目の前に突きつけた。
「すう?」と、女は彼の指を握るとそのまま離さないで手をひくように階段を上って行った。
火燵の前で手を離すと、彼女はさっと首まで赤くなって、それをごまかすためにあわててまた彼の手を拾いながら、
「これが覚えていてくれたの?」
「右じゃない、こっちだよ」と、女の掌の間から右手を抜いて火燵に入れると、改めて左の握り拳を出した。彼女はすました顔で、
「ええ、分かってるわ」
ふふと含み笑いしながら、島村の掌を拡げて、その上に顔を押しあてた。
「これが覚えていてくれたの?」
「ほう冷たい。こんな冷たい髪の毛初めてだ」
「東京はまだ雪が降らないの?」
「君はあの時、ああ言ってたけれども、あれはやっぱり嘘だよ。そうでなければ、誰が年の暮にこんな寒いところへ来るものか」
あの時は――雪崩の危険期が過ぎて、新緑の登山季節に入った頃だった。
あけびの新芽も間もなく食膳に見られなくなる。
無為徒食の島村は自然と自身に対する真面目さも失いがちなので、それを呼び戻すには山がいいと、よく一人で山歩きをするが、その夜も国境の山々から七日ぶりで温泉場へ下りて来ると、芸者を呼んでくれと言った。ところがその日は道路普請の落成祝いで、村の繭倉兼芝居小屋を宴会場に使ったほどの賑やかさだから、十二、三人の芸者では手が足りなくて、とうてい貰えないだろが、師匠の家の娘なら宴会を手伝いに行ったにしろ、踊を二つ三つ見せただけで帰るから、もしかしたら来てくれるかもしれないとのことだった。島村が聞き返すと、三味線と踊の師匠の家にいる娘は芸者というわけではないが、大きい宴会などには時たま頼まれて行くこともある、半玉がなく、立って踊りたがらない年増が多いから、娘は重宝がられている、宿屋の客の座敷へなどめったに一人で出ないけれども、全くの素人とも言えない、ざっとこんな風な女中の説明だった。
女の印象は不思議なくらい清潔であった。足指の裏の窪みまできれいであろうと思われた。山々の初夏を見た自分の眼のせいかと、島村は疑ったほどだった。
着つけにどこか芸者風なところがあったが、むろん裾はひずっていないし、やわらかい単衣をむしこきちんと着ている方であった。帯だけは不似合に高価なものらしく、それがかえってなにかいたましく見えた。
山の話などはじめたのをしおに、女中が立って行ったけれども、女はこの村から眺められる山々の名もろくに知らず、島村は酒を飲む気にもなれないでいると、女はやはり生まれはこの雪国、東京でお酌をしているうちに受け出され、ゆくすえ日本踊の師匠として身を立てさせてもらうつもりでいたところ、一年半ばかれで旦那が死んだと、思いのほか素直に話した。しかしその人に死別れてから今日までのことが、おそらく彼女のほんとうの身の上話かもしれないが、それは急に打ち明けそうもなかった。十九だと言った。嘘でないなら、この十九が二十一、二に見えることに島村ははじめてくつろぎを見つけ出して、歌舞伎の話などしかけると、女は彼よりも俳優の芸風や消息精通していた。そういう話相手に飢えていてか、夢中でしゃべっているうち、根が花柳界出の女らしいうちこけようを示してきた。男の気心を一通り知っているようでもあった。それにしてもかれは頭から相手を素人ときめているし、一週間ばかり人間とろくに口をきいたこともない後だから、人なつかしさが温かく溢れて、女にまず友情のようなものを感じた。山の感傷が女の上にまで尾をひいて来た。
女は翌日の午後、お湯道具を廊下の外に置いて、彼の部屋へ遊びに寄った。
彼女が坐るか坐らないうちに、彼は突然芸者を世話してくれと言った。
#nametime[川端康成][公元1984年5月17日]
|
https://github.com/Error-418-SWE/Documenti | https://raw.githubusercontent.com/Error-418-SWE/Documenti/src/2%20-%20RTB/Documentazione%20interna/Verbali/23-12-10/23-12-10.typ | typst | #import "/template.typ": *
#show: project.with(
date: "10/12/23",
subTitle: "Meeting di retrospettiva e pianificazione",
docType: "verbale",
authors: (
"<NAME>",
),
timeStart: "15:00",
timeEnd: "16:10",
);
= Ordine del giorno
- Analisi dei keep doing e degli improvements;
- Esposizione avanzamenti dei lavori dello sprint attuale;
- Organizzazione attività e ruoli del prossimo sprint.
== Analisi dei keep doing e degli improvements
=== Keep doings
- Il gruppo ha preso confidenza con le tecnologie e le norme da applicare;
- Il lavoro su diversi documenti è avvenuto correttamente e in parallelo;
- Ottima disponibilità di ogni membro del gruppo nell'aiutarsi con il lavoro in caso di difficoltà;
- Fase di review delle Pull Request più rapida.
=== Improvements
- Definire delle convenzioni da adottare riguardanti il codice;
- Lavoro concentrato principalmente nel weekend;
- Richiesta maggiore partecipazione dei membri del gruppo sulle board di Miro.
=== Soluzioni adottate
- Formulare convenzioni da adottare per il codice;
- Impegnarsi a fissare delle scadenze infrasettimanali così da ridurre il carico di lavoro il weekend;
- Utilizzare le board su Miro con anticipo aggiungendo il proprio feedback.
== Esposizione avanzamenti dei lavori dello sprint attuale
Sono stati mostrati gli avanzamenti dei lavori riguardo:
- l'implementazione della containerizzazione Docker;
- l'introduzione dei bin e di una creazione più accurata degli scaffali nel PoC A.
== Organizzazione attività e ruoli prossimo sprint
In luce degli avanzamenti ottenuti durante lo sprint attuale e del backlog relativo al prossimo sprint, sono state previste le seguenti attività da svolgere:
- avanzare con la gestione dei bin nel PoC A;
- migliorare l'uso di Docker;
- iniziare a lavorare sul Piano di Qualifica;
- implementare la possibilità di avere più file typst per Pull Request modificando le GitHub Actions;
- adeguare l'Analisi dei Requisiti in funzione di quanto emerso durante lo scorso meeting con il professor Cardin;
- aggiungere nel file di Analisi dei Requisiti la tabella che correli gli Use Case ai requisiti.
Inoltre è stato deciso che le modifiche al Piano di Progetto saranno fatte dall'Amministratore. \
Non è previsto per il prossimo sprint ma è stata considerata l'implementazione di una Action di GitHub che aggiorni i documenti presenti in repository aggiungendo i riferimenti ai termini del Glossario.
|
|
https://github.com/polarkac/MTG-Stories | https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/026%20-%20Eldritch%20Moon/003_Emrakul%20Rises.typ | typst | #import "@local/mtgstory:0.2.0": conf
#show: doc => conf(
"<NAME>",
set_name: "<NAME>",
story_date: datetime(day: 22, month: 06, year: 2016),
author: "<NAME>",
doc
)
#emph[The madness on Innistrad has come to a head. Jace and Tamiyo witnessed Sorin's confrontation with Avacyn, and then they watched as the ] vampire destroyed the angel#emph[. All of Innistrad shuddered when Avacyn drew her last breath. Now the plane is without a protector, exposed to threats both of the world and from beyond—exactly as Nahiri wants it. Rumblings can be felt across the land, and tremors shake the few hearts that have held out against the madness.]
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
= The Bluffs of Selhoff
Nahiri had done a great deal of work.
She had kept her vow, the one she made when standing in the dust of Bala Ged. There was still dust under her fingernails and in the deepest folds of her clothes; she had left it there as a reminder. Since leaving Zendikar, she had pushed herself, every hour of every day and long into each night, allowing her rage to fuel her. She had strained, reaching out into the Blind Eternities with fingertips that burned from the swelling aether, toiling in stone, in magics more powerful than she had ever dared to wield before, and all of it had been ten times more difficult than she remembered. But she had not once complained, not once faltered or paused to rest. And now, finally, she would be rewarded. She would see her work pay off. And so, too, would Sorin.
Innistrad's final ward had fallen. Nahiri had felt the lifting of the last shred of protection like heavy plated armor removed from a soldier after battle. The world was left naked and vulnerable. Only this time the battle was not over. It had just begun.
"As Zendikar has bled, so will Innistrad." Nahiri held her breath. The ground beneath her feet shifted. The plane began to pulse, seizing with tremors, like a chain of explosive reactions thudding deep under the surface and echoing through the night. Sorin would feel them too. This thought gave Nahiri great satisfaction. "Come!" she cried to the sky. "Come to me. Come to Innistrad!"
#figure(image("003_Emrakul Rises/01.jpg", width: 100%), caption: [Warped Landscape | Art by Cliff Childs], supplement: none, numbering: none)
She felt it then: a presence.
The air became hot and still, and Nahiri breathed in deeply. #emph[Yes. ] She knew that scent all too well. A thrill flooded her with an intensity she hadn't felt in centuries. She ran to the edge of the bluff, her legs wheeling out of control, her mind unable to keep up with the hammering of her heart, the pounding of her feet.
She looked to the water. To the temple she had constructed for the god. It was no longer empty. Tears blossomed in the corners of Nahiri 's eyes, but she swiped them away. This was not her moment to cry. "As I have wept, so will Sorin."
The shape under the water grew, waves churned, and the surface threatened to break. Finally. It was time.
= The Moors of Gavony
It was time. Time to pray.
#emph[Dear <NAME>. Mother told me that if I get scared, I should pray. I'm scared now.]
#figure(image("003_Emrakul Rises/02.jpg", width: 100%), caption: [Art by <NAME>], supplement: none, numbering: none)
Though flanked by cathars with gleaming blades and hard steel armor, Maeli cowered. He felt alone.
He had felt alone since he had fled the village on the day that the horrible angels had come with their rain of fire. He had run into the forest like his mother had told him, and he had not gone back to the village. He had wanted to a hundred times. But she had told him no matter what he couldn't return, and her eyes had been more serious than he had ever seen them. He had thought it best to listen. Now he wished he hadn't. Now he wished he was home.
He clutched the stuffed rabbit given to him by the old woman with the gray hair. The one who had found him in the woods and taken him into her house that smelled of sweets and stale bread. She had told him to call her Ms. Sadie, and said that her house could be his house for as long as he wanted. But that had never been what he wanted.
#emph[Dear <NAME>. I want to go home. Please. Can I go home?]
There was no answer. Instead, thick writhing arms reached for him, shooting through the space between the cathars' blades; they were the same writhing arms that had burst out of Ms. Sadie's chest that very night while they ate their dinner. It had happened not long after Maeli had felt his chair shudder, and even a shorter time after a gust of wind had blown through the open shutters, bringing along a smell like too-sweet nectar. His spoon had been in his mouth when Ms. Sadie's chest had cracked open; he had been halfway through swallowing a mouthful of thin stew. Most of the stew had come out of his nose, and it had burned him, inside his head, up behind his eyes. It had made him cry. Tears had streamed down his cheeks as Ms. Sadie and her too many arms chased him.
"Stay back!" The cathars shifted in the tall grass, slicing off one arm after another. One landed at Maeli's feet. As he looked down at it, his insides twisted and squirmed; this was one of her true arms, he was sure. There was a bit of the yellow blouse she had been wearing, and farther down, her big brown, hairy mole blinked up at him.
Maeli buried his head in the stuffed rabbit as a tear ran down his cheek. #emph[Please, Avacyn. ] The angel had come to him once before. She had helped him. When he was scared and lost. His mother had told him that Avacyn had come because she had prayed for the angel's help, prayed so hard that Avacyn could not ignore her. Maeli didn't know how one prayer could be harder than another prayer; he didn't know how to make his prayer so hard that Avacyn couldn't ignore it, but he knew he had to try. He screamed his prayer as loud as he could into the damp, matted fur of the stuffed rabbit. "PLEASE, AVACYN! HELP ME!"
"Avacyn is gone!" The voice pierced the cold pit in Maeli's stomach, and icy fear leaked out, seeping up his spine and the back of his neck. Like cold fingers, it reached up under his skull, grabbing hold of his head and turning his eyes up to the sky.
An angel.
#figure(image("003_Emrakul Rises/03.jpg", width: 100%), caption: [Angelic Purge | Art by <NAME>], supplement: none, numbering: none)
For a fleeting moment, hope pulsed in Maeli's heart. Hope that was a lie, he knew even as he felt it; the angel hovering above was not Avacyn.
"#emph[She] is here now," the angel said, looking straight into Maeli's eyes. "#emph[She] is rising! Rising!" The angel tossed her head back and cried out with a shrieking laugh that filled the sky. Then abruptly she ceased laughing and held completely still as though frozen in the sky. "I—I'amrakul!" She dove down, her blade slicing through the air ahead of her. Maeli squeezed his eyes shut. #emph[Please.]
= The Coast of Nephalia
#emph[Please. Please choose me. ] Edith clenched her toes hard against the smooth, wet rock, securing her foothold. She was as close as she could get now. As close as she could be until the rising, until the becoming. Yet she wanted to be closer.
#emph[Please choose me. ] She had proven that she was devout. The most devout. "The most devout."
#emph[Choose me. ] She stole a hasty glance first out from under one side of her hood and then the other. Yes. She confirmed that the rocks nearest her were devoid of other cultists. She stood taller. Proud. No one else was there, where she was. No one else was as close. She was the closest. "The closest." She wanted to be closer.
"Choose me! Me! Me'mrakul." She raised her arms, spreading them to the sky, opening herself to the one that was coming.
The waves crashed over her. She could feel it; it was time.
#figure(image("003_Emrakul Rises/04.jpg", width: 100%), caption: [Art by <NAME>han], supplement: none, numbering: none)
"Emrakul!" The name, the power, the fullness unfurled within her as the water roiled. "Emrakul!" The wholeness embraced her, entwined with her, became her. The sea swelled upward toward the sky. "Choose me, Emrakul. Take me. Emrakul."
Other voices rose up behind her, chanting along with her, in time with the magenta glow pulsing beneath the surface of the water. "Choose me'mrakul. Take me'mrakul. I'amrakul."
The glow grew stronger, brighter, more powerful, and it became a steady unwavering light. Edith inched closer on her rock, her toes searching for purchase. She was foremost. The closest. Closer now. Even closer.
Around her, the great twisted stone pillars sparked in the night. Violet bolts of power discharged from the pointed edges, jumping from one to its neighbor and then to the next. Her power. It was all Her power. Everything was Her. Closer. Closer.
#figure(image("003_Emrakul Rises/05.jpg", width: 100%), caption: [Art by <NAME>], supplement: none, numbering: none)
The swell of the water sent waves crashing and rebounding. There was no longer a distinction between the sea and the land. Edith moved closer. Never before had she been the most. The best. Never before. But never before had it mattered. It mattered now, and she was now. The most. The closest. The best. "I'amrakul!"
An explosive burst of sea shot up into the sky, rising like a thick column of stone, tumbling over itself, crumbling and growing simultaneously, chaos in motion. And then it froze, as though time had stopped. It hung there like a rocky mountain bluff in the sky. From below, there was a rumbling.
And then Emrakul rose.
#figure(image("003_Emrakul Rises/06.jpg", width: 100%), caption: [Art by <NAME>], supplement: none, numbering: none)
Edith could not contain the wail that erupted from her chest. The sound of her voice swelled with the undulation of Her power, and melded with the resonance of Her embrace, complete.
Emrakul saw Edith there before her. She looked down at Edith with one enormous, glowing magenta eye.
And Edith saw Emrakul. She stared, transfixed, into the glow, falling deeper and deeper into the intensity of Her being. There was so much to see, so much to become. She had been chosen. "I'amrakul."
She leaned in closer.
= The Depths of the Ulvenwald
She leaned in closer, pressing her back against Alena's. They were back to back and surrounded; Hal felt the urge to surrender, to crumple to the ground. But instead she focused on the heat radiating off Alena's sculpted arms, the feel of it against her own clammy flesh, and she acted as though the world was not on the verge of collapse. "Where do you want to begin?" She casually tossed the question over her shoulder.
Step for step they rotated together in place, sizing up the task before them. They were in a grove in the Ulvenwald, but the Ulvenwald was not the woods they had known. Everything had become twisted and horrifying: the trees now had arms with long slender fingers that reached out to pull at Hal's hair, the brambles had mouths that blabbered and shrieked, the mosses had legs that carried them around like scampering rats, and now even the townsfolk, who did not belong here in the woods, had given in to the coercive force and become things that were far worse than the worst monsters Hal had ever known.
"We should start with the townsfolk," Alena said.
Hal nodded.
There were three, so mutated that their human forms were barely recognizable.
"Come'mrakul. Be'mrakul." they called out.
Hal felt the pull of their words. They had given in to the call the way Hal had been tempted to. They had crumpled and now they no longer had to fight it.
"Are'mrakul. We'mrakul."
Hal's ears rang and her insides crawled. It would be so easy. She could—#emph[no] ! Alena's steady heartbeat said "no."
"I'll start with the jumpy one and you take the thick one." Alena's voice didn't hitch, not even once.
Hal forced herself to ignore the constriction in her throat, the tightness in her head. "Sounds like a plan." She would try. She would fight. She grasped her blade and closed her mind to the garbled chanting. The thick one. She focused on the thick one—and then she gasped.
"Alena. Alena, is that—" Hal couldn't finish.
Alena peered over. "<NAME>. May the angel save him."
#figure(image("003_Emrakul Rises/07.jpg", width: 100%), caption: [Art by <NAME>], supplement: none, numbering: none)
Hal was gripped by vertigo, her vision dimmed. Impossible.
"Are'mrakul." The abomination of the elder lurched forward. It was all Hal could do to brandish her sword and block his thick, branching arm.
"Come'mrakul. Be'mrakul." Elder Kolman's words tumbled through Hal's spinning mind. How could this monster be the man she had once known?
He swung at her with an arm that was like the trunk of a tree. Hal staggered back, her mind reeling.
"Are'mrakul. Be'mrakul." The words wrapped round and round her, enveloping her. They told her not to think, not to worry, just to surrender. #emph[Be'mrakul. I'amrakul.]
"Hal?" Alena's voice. "Hal! His arm. Watch on the right!"
Hal heard the words, but didn't make sense of them. Suddenly a flash of silver split through the Elder's thick arm. Alena's blade. Hal knew she should swing her sword too. But it was so heavy. It did not want to be swung.
#emph[Be'mrakul. One'mrakul. ] She felt like she was floating.
"Hal!" Alena sounded upset. But she was far away. So far away.
#emph[Be'mrakul.]
"Stay with me, Hal."
#emph[Are'mrakul.]
"I need you."
#emph[I'amraku—]
"Please!"
It was Alena's touch, her sweating fingers gripping Hal's wrist, that yanked Hal away from the suffocating embrace. She looked up at the woman she loved.
"Hal? Oh please, Hal."
She didn't want Alena to be upset. She didn't want Alena to be so far away. And she didn't want Alena to be alone.
She had to fight. It was hard. Harder than anything she had ever done. But she had to do it. She pushed the tightness out of her mind and found within herself the strength to lift her blade. "I'm all right, Alena," she said. "I'll be all right."
"Of course you will." Hal felt the tension go out of Alena's body as Alena helped her to her feet.
"Be'mrakul." The elder's jowls sputtered.
Hal glared at him—#emph[no] , that thing was not a him, it was not Elder Kolman. It was a monster. One that threated to tear Hal away from the staunch woman at her side. She would not allow it.
"We should take him together, I think." Alena nodded at the monster.
"Yes, I think that would be best."
They stood side by side, shoulders pressed close. Alena inhaled. "On my mark."
Hal didn't need Alena's mark to cue her; she felt the movement of Alena's muscles and hers responded instinctively. Together, they moved like a double-headed axe, lashing out on both sides but always connected in the middle. Alena sliced through the monster's left shoulder as Hal's blade chopped through its right. The squirming appendages landed on the ground at their feet, but the abomination didn't seem to notice. It lunged for them. "We'mrakul!"
Hal swung again, beheading the once-holy man. Still he continued to chant, "I'amrakul, are'mrakul, Emrakul!"
Hal couldn't bear to hear the words any longer. "Shut up!" She raised her blade and brought it down with such force that she cleaved the elder's head in two. A mass of latticed roots sprang out as though they had been packed inside too tightly all along.
The chanting ceased. It was done.
Hal reached out and Alena's hand was there. The immediacy with which their fingers intertwined told her that Alena would always be there. She silently made a promise to give the same in return.
"We'mrakul." It was the voice of another of the townsfolk from behind. "Be'mrakul."
Hal wanted to scream. And then she saw it. An opening, over the fallen elder's body, one that lead out of the grove of horrors. "Come!" She tugged on Alena's hand. "This way!"
Alena followed Hal out through the reaching appendages and writhing masses. Out into the trees. Out where the air did not reek of rotten flesh. Out where the brambles remained rooted and the moss didn't skitter in sickening patches across the ground.
They ran until they could no longer hear the chanting, until they could no longer feel the pressure in their heads. And then they ran farther, until their muscles gave way and their lungs screamed. They stopped at the edge of a bluff, collapsing into each other, forehead pressed to forehead, hands gripping shoulders, having breaths coalescing in the shrinking space between their lips.
"Hal."
"Alena."
They would never surrender this; they would never let go.
= The Skies over Innistrad
They would never let go, never. They had seen the light, felt the power. The truth had embraced them. It had made them.
Bruna was gone.
Gisela was finished.
Instead, they had become. Her. One. #emph[One'mrakul] .
Emrakul's angel parted four wings, reached out with two arms, and cried with a single voice that sprang from two mouths, "We are Emrakul!"
#figure(image("003_Emrakul Rises/08.jpg", width: 100%), caption: [Art by <NAME>], supplement: none, numbering: none)
They were in Her image, the image of the everlasting truth, and their voice was Hers. "We are Emrakul!"
Their call drew others. "We are'mrakul!" Voices rose up from the world below, melding into one sound, one truth. "One'mrakul, be'mrakul, we'mrakul!"
It was glorious. It was everything. It was Her.
Emrakul's angel led all below in following Her radiant form. What once was dark was now bathed in Her light, true light that was spreading farther and farther, a blossoming sunrise that would soon touch every corner of the world. "All are Emrakul! We are Emrakul!"
= The Twisted Road to Thraben
#emph[We are Emrakul. All are Emrak— ] "Gah! No." Jace pushed the swirling words from his mind with a stern swipe. "And stay out."
Tamiyo had taught him how to combat Emrakul's maddening touch, but maintaining the mental bulwark was more challenging than the moonfolk made it seem. That was a problem. A big problem for his plan.
Every time he focused for too long on something other than the Eldrazi, Her tainted lattice would creep back into his head, corrupting his defenses and burrowing into the deepest recesses of his mind.
This time it had been the sight of the warped angel in the sky overhead that had distracted Jace. He had done well at keeping his eyes on Tamiyo's back, keeping his focus on their trek across the rocks; he was following her toward what she called the nexus point. But the presence of the angel had been too much to ignore. So impossibly alien was its shape that Jace's curiosity had gotten the better of him. He'd glanced up and been drawn in instantly, having to work to parse what he was witnessing. At first he'd thought it a demon, but it was far worse than that. By the time he had resolved the multiple wings, the lattice-like connective tissue between the dual heads, the melding echoing voice, he had lost himself. That was unacceptable. He needed to be able to trust his mind for what he was about to do. Was he really about to do it? Could he actually justify bringing the rest of them here, to be set upon by this madness?
The question dropped to the pit of his stomach and swelled up into a wave of nausea. He had thought it was the right thing. Hadn't he? Yes, he had come to it as the only solution. He was certain—almost certain. Close to certain. "Gah!" Jace threw up his arms.
"Shh!" Tamiyo shot a scolding glance over her shoulder.
"Sorry." Jace held up his hands defensively.
Tamiyo glowered but turned back to the path, to her magical lantern and her soft footfalls. He should tell her. Tell her to wait here and he would bring help. This was bigger than something the two of them could handle alone. In truth, it always had been, even when Jace thought it was just the mad angel, Avacyn. If it hadn't been for Sorin back at the cathedral—#emph[Sorin] . Jace cursed the ancient vampire who had brought Innistrad to the brink of destruction and then just merely drifted away, leaving the mess for Jace to clean up.
But an Eldrazi titan wasn't something he could clean up alone. It was never meant to be something he had to do alone. Gideon himself had told Jace to come back to Zendikar if he heard news of the titan. Well, Jace had done better than that; he had found Her. Gideon should be quite pleased.
Ahead, Tamiyo paused at the shore and held her lantern aloft. Jace followed the tendrils of magically enhanced light, lifting his eyes to the sky. As soon as he did, he wished he hadn't.
It was the first time he had actually seen Her: the titan, Emrakul.
#figure(image("003_Emrakul Rises/09.jpg", width: 100%), caption: [Art by <NAME>], supplement: none, numbering: none)
Jace was transfixed.
Emrakul was bigger, he could swear, than either of the others. And, in her way, far, far more powerful. She had only been on this world for a short time, and already so much of it seemed to belong to her. All of Innistrad had uprooted itself to follow her. Cultists, warped into her likeness, dragged themselves over the rocks, abandoning all that they had been in their former lives. Animals and monsters alike, on the land, in the sky, and in the sea flocked behind her as she went. The trees, mosses, and brambles, even the algae trailed itself from the water to be closer to her warping presence.
Jace, too, felt the urge to go to Her. #emph[I'amrakul.]
#emph[No.]
He wanted to shake himself. He had to clear his mind. He had to think. He couldn't let Her have what She wanted. He once again mimicked what Tamiyo had taught him, clenching his hands into fists with the effort. The process of ensuring that there was no residue of delirium was not unlike clearing away cobwebs from inside one's head. Thick, lattice-like cobwebs exuded by a towering Eldrazi monstrosity hell-bent on consuming the mind of every living thing on this world. Jace shuddered.
This is what he would have to be able to do for them, for Gideon and Chandra and Nissa. He'd have to protect their minds along with his own. He couldn't bring them here and then leave them to be consumed by Her. He wouldn't. So then the question was: Could he do it? He had asked himself this very thing what felt like a hundred times, and yet he didn't have the answer.
"You say they call Her Emrakul?" Tamiyo's curious voice drew Jace out of his thoughts. He glanced at her; her face was a study in serenity, as though holding her mind against the madness was no more difficult than breathing.
"Yes," Jace said. "That's one of the things they call Her."
"Fascinating that such a thing should have a name." Tamiyo lifted her telescope from her belt and placed it to her eye. "I wonder if that is what She calls Herself."
Jace had never paused to ask that question. He would have never thought it something worth asking; the moonfolk saw things much differently than he did. He stared ahead at Emrakul's massive form, trying to see Her the way Tamiyo did. He looked into Her enormous magenta eye. It was warm and welcoming. He wondered what he would find if he went inside. He held himself back, just on the precipice. #emph[What is your name? ] he asked#emph[ What do you call yourself] ?
A deluge of words echoed from all corners of his mind:
#emph[The enteral infinity—this world is mine.]
#emph[The absolute—I shall have all.]
#emph[The beginning—I shall be all.]
#emph[The being—all are'mrakul.]
#emph[The end.]
#emph[The end.]
#emph[The end.]
Jace pulled back, gasping for breath. This was not the end. This would not be the end. Not for him, and not for Innistrad. He had to stop doubting, stop procrastinating; he had to trust his mind. He glanced again at the serene Tamiyo; if she could do it, he could do it, he could do it for them. #emph[Yes. ] It was time to bring the Gatewatch to Innistrad. He cleared his throat. "Tamiyo, I have to go."
"What?" Tamiyo turned, her lavender eyes wide.
"There are three others. Planeswalkers. They're powerful, they're the best there are, and they can help. I have to go get them. On another world, we killed two more like that." He nodded at Emrakul without actually looking at Her.
Tamiyo appeared reluctant to believe him. "Two?"
"It took all of us, but yes."
Tamiyo cocked her head and squinted into his eyes. Jace had the urge to look away—he felt guilty under her scrutiny, though he wasn't sure why. And then suddenly she smiled. "You did. Yes, you really and truly did. My, now that's a story I'll have to hear." She sighed. "But another time. If this world's story hopes for an ending other than darkness, we must each do our part."
"Will you come with me?"
"No, Jace. That's not my path."
"Will you be here when we come back?"
"We will all be where we must be."
Jace opened his mouth to argue, but then he felt a calming touch on his mind. Tamiyo. He no longer had to fight to hold onto his sanity; he hadn't even realized that he had been straining so hard. It was like a terrible headache had finally broken. Relief. He relaxed into it.
"I will protect your mind so you can planeswalk," Tamiyo said. "Go."
In that moment, there was nothing Jace wanted more than to do as she said. He wanted to go, to leave this world, leave the titan. Return to the world they had already saved: Zendikar. Sea Gate. The merfolk the kor and the vampires together. Nissa would be there, her green eyes aglow. And Gideon with his broad shoulders and ready smile, and—
"Well, look who decided to show up. Hey, Gideon, over here!"
—Chandra.
"About time!" The tromping of boots materialized in Jace's ears, and the afterimage of Emrakul looming above gave way to the smiling face of his friend.
|
|
https://github.com/edvinsyk/quarto-landscape | https://raw.githubusercontent.com/edvinsyk/quarto-landscape/main/README.md | markdown | # Landscape Extension For Quarto
> [!IMPORTANT]
> This extension has been merged into quarto version 1.6.6. (see. quarto-dev/quarto-cli#10581) and should work out of the box.
The 'quarto-landscape' filter enables a landscape div, that switches the pages within the selection to landscape.
It implements the same div for docx, latex, and Typst, making it easier to switch between formats.
## Installing
```bash
quarto add edvinsyk/quarto-landscape
```
This will install the extension under the `_extensions` subdirectory.
If you're using version control, you will want to check in this directory.
## Using
Simply enclose what you want to have in landscape format using the landscape div.
```{markdown}
Portrait format
::: {.landscape}
Landscape format
:::
Portrait format
```
This is commonly needed for displaying graphs or tables with dimensions when writing papers or content.
PDFs require the following in the YAML.
## Required in YAML
The following is required in YAML for the extension to work:
```{yaml}
# Required for all:
filters:
- landscape
# Required for PDF:
```{yaml}
format:
pdf:
include-in-header:
text: |
\usepackage{pdflscape}
```
## Example
Here is the source code for a minimal example: [example.qmd](example.qmd).
## Acknowledgements
Thanks to tarleb for the [word implementation](https://stackoverflow.com/questions/73784720/changing-page-orientation-in-word-using-quarto)
|
|
https://github.com/jgm/typst-hs | https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/layout/enum-numbering-05.typ | typst | Other | // Error: 22-24 invalid numbering pattern
#set enum(numbering: "")
|
https://github.com/YunkaiZhang233/PMT-notes | https://raw.githubusercontent.com/YunkaiZhang233/PMT-notes/main/week1/week1.typ | typst | MIT License | #import "@preview/dvdtyp:1.0.0": *
#import "../misc.typ" : *
#show: title(1)
#show link: set text(blue)
#outline()
= So Many Contradictions!
Many of the problems I found people to be confused with are with *not*, *contradiction*,
and *proof by contradiction*. I do admit it to be hard as this is indeed confusing. Let's take a
look at them with definitions and examples.
== Definitions
First let's take a look of the definitions of these mentioned in Steffen's notes, section 1.2.
#definition("All the 'Conflict' Statement from Notes")[
- *Showing 'not':* _Assume P holds... we have a contradiction. Then 'not P' is true._
- *From a contradiction, anything follows:* _... we have a contradiction. Then P is true._
- *Proof by Contradiction:* _Assume that 'not P' holds... we have a contradiction. Then P is true._
]
Note that here we omit the explanations as you can look them up on your own.
From how they looks like, you can find out that their difference would be the order of $P$ and $not P$ in the assumptions and in the proof goals.
You will notice that the notes says not to abuse "proof by contradiction".
This is because that "proof by contradiction" usually involves proving something looks like
$not not P$ and then transform it back to $P$ in the process. It would be a great implementation
to minimise such redundancy.
Another important thing is that proof by contradiction is *not applicable* in constructive logic.
See the #link(<bonus>)[bonus chapter] if you are interested. However the scope of this class is limited to classical logic, thus yes I think you can understand them essentially as the same but *proof by contradiction* is more verbose.
== Example Illustration
If it still feels confusing, take a look at this example.
#example("Proof with Sets")[
Prove that: _If $A subset.eq B$, then $A sect B = A$_
]
Note that the proofs below are not "strict" proofs that would get 100% marks in exams.
There are written to help you understand.
0. For both approaches, we first assume that $A subset.eq B$.
=== If you are proving by contradiction
1. You first assume towards a contradiction. Therefore, you assume _not_ ($A sect B = A$) holds, which further expands to "not ( $A sect B subset.eq A$ and $A subset.eq A sect B$)"
2. by de Morgan's Law, we get "not ($A sect B subset.eq A$)" or "not ($A subset.eq A sect B$)". By using cases, the former will be rejected (reason yourself!). Thus by using or, "not ($A subset.eq A sect B$)" holds.
3. Then there must be some element $x in A$ such that $x in.not A sect B$, namely $o$.
4. As $o in A$, $o in.not A sect B$, this means $o in.not B$
5. However, as we assumed $A subset.eq B$ in the universal step 0, by definition all elements of
$A$ must also be in $B$. Therefore as $o in A$, $o in B$ holds.
6. This contradicts with result in 3.
7. Remember we assumed $A sect B != A$ on our own in 1. Then we get contradiction. We say now that
$A sect B = A$ holds and completed the proof via proof by contradiction.
=== A bit verbose, isn't it?
By taking a look of the step 4 above, you may have observed that there is a more direct way
to prove our goal! The whole point of 1-3 is to create a contradiction to apply "proof by contradiction". and 5-6 is to contradict that.
Do not use proof by contradiction for the sake of "I want to use proof by contradiction".
This is verbose and just takes excess time.
=== A cleaner approach inspired by this
(remember 0. we first assume that $A subset.eq B$ for both approaches).
To prove: $A sect B = A$
1. This means to prove $A sect B subset.eq A$ and $A subset.eq A sect B$.
- To prove $A sect B subset.eq A$
2. For all $x in A sect B$, by definition, $x in A$ and $x in B$,
3. thus $x in A$, proved.
- To prove $A subset.eq A sect B$
4. For all $x in A$, by assumption, $x in B$.
5. Therefore $x in A$ and $x in B$ holds. Thus $x in A sect B$. proved.
both cases are proved so problem proved
=== Note the difference?
The non-contradiction way works very similar to proof by contradiction but much less wording
and much less glitches! It also does not involve "double negation" (negation in assumption, negation via contradiction) and feels much better whilst keeping the structure.
Aside from #link(<bonus>)[the bonus chapter], #link("https://math.andrej.com/2010/03/29/proof-of-negation-and-proof-by-contradiction/")[This blog] is really helpful to understand the difference between "showing not" and "proof by contradiction". It's still good to know that they are different as a computer scientist.
= Bonus <bonus>
== (Optional, FYI, Not Examinable) on LEM and Proof by Contradiction
As Steffen mentioned in section 1.3, *Law of the Excluded Middle* and *Proof by Contradiction* is
#underline([not allowed]) in certain kinds of mathematics (like in constructive logic) whilst
the content you will learn in this course would be classical logic.
You may be confused, how can we say that $P or not P$ is false?
#example("LEM is FALSE in constructive logic")[
Let's define the famous Goldbach Conjecture as Proposition $P$: \
_"There is an even number that cannot be written as the sum of two prime numbers."_
This is related to the famous Goldbach Conjecture, which hasn't been proven or disproven yet.
- *Classical Logic View:* A classical logician would say, "Either the Goldbach Conjecture is true (every even number is the sum of two primes), or it's false (there's at least one even number that isn't)." Classical logic allows us to make this statement, even though we don't know which one is true.
- *Constructive Logic View:* In constructive logic, you can't just say "P or not P" without proof. If you claim there's an even number that isn't the sum of two primes, you need to *find that number*. If you claim every even number can be written as the sum of two primes, you need to *prove it*. Since we can't do either yet, constructive logic doesn't allow us to assert "P or not P.", so LEM does not hold.
]
Proof by contradiction heavily relies on the *Law of Excluded Middle* (LEM). Here's how:
1. *Assume $not P$:* You start by assuming the negation of $P$.
2. *Derive a contradiction:* You show that this assumption leads to a contradiction.
3. *Conclude $P$:* By the Law of Excluded Middle, since $P or not P$ is always true, and $not P$ leads to a contradiction, you must conclude that $P$ is true.
Thus, similarly we cannot say proof by contradiction is true.
This reasoning is valid because, in classical logic, the Law of Excluded Middle guarantees that either $P$ or $not P$ is true, so ruling out $not P$ forces $P$ to be true.
In *constructive logic*, proof by contradiction is *not generally valid* because the Law of Excluded Middle is not accepted universally. Constructive logic requires that you provide *constructive evidence* of $P$ rather than just ruling out $not P$ through contradiction.
- If you assume $not P$ and derive a contradiction, this doesn't necessarily mean $P$ is true in constructive logic. You must constructively prove $P$ by finding a direct proof, not just by elimination of alternatives.
Constructive Logic is further related to the Curry-Howard correspondence, through which
you can correspond computational objects to proofs. This is also very useful in computer science.
= Credits
This set of notes is written by #link("https://typst.app")[typst], using the template
#link("https://typst.app/universe/package/dvdtyp/")[dvdtyp 1.0.0].
Most of the materials are linked to Steffen's DMLR notes, available on Scientia. |
https://github.com/vEnhance/1802 | https://raw.githubusercontent.com/vEnhance/1802/main/r02.typ | typst | MIT License | #import "@local/evan:1.0.0":*
#show: evan.with(
title: [Notes for 18.02 Recitation 2],
subtitle: [18.02 Recitation MW9],
author: "<NAME>",
date: [9 September 2024],
)
#quote[
You all have a little bit of "I want to save the world" in you,
that's why you're here, in college.
I want you to know that it's okay if you only save one person,
and it's okay if that person is you.
]
This handout (and any other DLC's I write) are posted at
#url("https://web.evanchen.cc/1802.html").
= Housekeeping
- Office hours is every Monday at 10am.
- Today's office hours is in 2-361 temporarily, only for this week.
- I'll update my website once I know what room I'm stuck in.
- If you want additional office hours with me,
you can email me to schedule a separate appointment.
- Apparently I'm supposed to take attendance. Please fill out the attendance form on my site.
= Errata from last Wednesday
Last week in R1 I said that it probably didn't actually matter which way you labeled your axes.
*This is wrong!* You need to pick a labeling consistent with the *right-hand rule*.
I think it's easier to remember that you put your (right) index finger along the $+x$-direction,
middle finger along the $+y$-direction, and thumb along the $+z$-direction.
= The TL;DR cookbook
Up until now you were given a bunch of _definitions_ of the dot product,
cross product, and determinant.
Another way you can think about them is by _what they're used for_,
which may or may not be more useful for actually doing homework and exam questions.
- Dot product (type signature: takes two vectors as input and outputs a scalar)
- Answers the question "*are two vectors perpendicular?*".
(Check whether the dot product is zero.)
- More generally, gives you the *angle between two vectors*.
- Requires the extra step of dividing by the lengths of the vectors and take inverse cosine.
- Also gives you the *scalar projection*.
- Requires the extra step of dividing by the length of the vector you're projecting onto.
- $3 times 3$ determinant (type signature: takes $3 times 3$ matrix as input and outputs a scalar)
- Gives you the *volume of a parallelepiped*.
(take the determinant $arrow(D A)$, $arrow(D B)$, $arrow(D C)$).
- In particular, you can check *coplanar* by seeing if the volume is zero.
- Cross product of $arrow(A B)$ and $arrow(A C)$
(type signature: takes two $RR^3$ vectors and outputs an $RR^3$ vector)
- The magnitude gives you _twice_ the (signed) *area* of the triangle $A B C$.
- The direction gives you a vector *perpendicular to both*.
= Analogy for normal vectors and planes in $RR^3$ by changing to $RR^2$
If you are confused about normal vectors in the plane, it might help to first do the $RR^2$ case,
which is easier to draw and for which you might have better intuition from eighth or ninth
grade algebra.
Here's a question: what's the set of vectors in $RR^2$ perpendicular to $vec(1,2)$?
It's a line of slope $-1/2$ through the origin, namely
$ 0 = vec(x,y) dot vec(1, 2) <==> 0 = x + 2 y. $
#figure(
image("figures/r02-x-plus-2y.png", width: 12cm),
caption: [Plots of $x+2y=0$ and $x+2y=pi$.],
)
Okay, in that case what does the line
$ x + 2 y = pi $
look like? Well, it's a parallel line, the slope is still the same.
Equivalently, you could also imagine it as the set of points $vec(x,y)$ such that
$ vec(x,y) - vec(pi,0) " is perpendicular to " (1,2) $
or do the same thing for any point on the line, like
$ vec(x,y) - vec(0, pi slash 2) " is perpendicular to " (1,2) $
or even
$ vec(x,y) - vec(0.218 pi, 0.564 pi) " is perpendicular to " (1,2) $
But that's silly. Most of the time you don't care about base points.
All you care if you want the line have the specific slope $-1/2$,
and for that the LHS just needs to be $x + 2y$ (or even $100 x + 200 y$).
The RHS can be whatever you want.
In $RR^3$, the exact same thing is true for the expression $a x + b y + c z = d$.
The only difference is that the word "slope" is banned (or at least needs a new type;
it won't be a single number).
Nevertheless, even if we can't talk about slope, we can still talk about parallel planes,
and now the whole discussion carries over wholesale.
= Digression: Trivial vs non-trivial results
18.02 is not a proof-based class, so I will not talk about formal proofs during recitation.
(If you want proofs, come to office hours.)
So you will take a lot of theorems in this class as *black boxes*.
However, I want to at least distinguish between two things:
- *"Trivial theorems"*: an A-level student in 18.02 could reasonably justify this theorem to a friend
using material from earlier in the course.
- *"Nontrivial theorems"*: an explanation of why the theorem holds
requires at least one new idea, concept, or some substantial calculation.
You're not expected to know how to prove the trivial theorems either;
you are on P/NR, after all, enjoy it.
But I think it's helpful context if I at least tell you
which results are _supposed_ to be easy and which are _supposed_ to be hard.
(Though for exams, you just memorize all of them anyway.)
For example, in R1 last week,
I explained how a bunch of concepts had both a geometric picture and an algebraic definition.
The fact that the picture matches the definition was _trivial_ for all material in R1:
for example, the fact that $vec(a,b)$ has length $sqrt(a^2+b^2)$
is a direct consequence of the Pythagorean theorem.
I'm sorry for anyone that was bored.
However, in contrast, many of the results in your
Thursday/Friday lectures are _really_ nontrivial.
- The theorem saying the algebraic definition $x_1 x_2 + y_1 y_2 + z_1 z_2$ of the dot product
coincides with the geometric definition $|bf(a)| |bf(b)| cos theta$ is nontrivial.
In fact, when I was walking home after your first recitation last week,
I was thinking to myself about what I needed to say for today,
and I realized I didn't actually know how to prove this either!
I was walking from Charles/MGH, which is a 15-minute walk,
and it took the whole time to figure out a proof.
I typed up the proof in #url("https://web.evanchen.cc/1802.html") if you want to see it.
Poonen proves this using the law of cosines, but it's tricky.
I think my proof is easier to come up with but longer and less clever.
- Pretty much everything with determinants is black magic.
Even pure algebra like $det(A B) = det(A) det(B)$
for two $2 times 2$ matrices $A$ and $B$ is painful: imagine expanding
$ det(mat(a_1, b_1; c_1, d_1) mat(a_2, b_2; c_2, d_2))
= det mat(a_1, b_1; c_1, d_1) det mat(a_2, b_2; c_2, d_2) . $
It seems like a minor miracle: one would have to verify
#eqn[
$
(a_1 a_2 + b_1 c_2) (c_1 b_2 + d_1 d_2) - (a_1 b_2 + b_1 d_2)(a_2 c_1 + c_2 d_1) \
= (a_1 d_1 - b_1 c_1)(a_2 d_2 - b_2 c_2)
$
<det2>
]
which you can do, but it's not fun.
And that's just $2 times 2$ matrices. The $3 times 3$ one is even worse,
and the $n times n$ situation is a lost cause.
I actually have really strong opinions on how linear algebra should be taught;
I strongly prefer certain abstract "intrinsic" definitions that
don't rely on coordinates and formulas like the 18.02 definitions do,
because the abstract definitions explain why all these miracles keep happening.
Unfortunately, this is too abstract to do in just a few weeks of 18.02.
But if you are curious and want to open Pandora's box, take 18.700 or 18.701!
Or if you want to just jump into the deep end of the pool,
I also wrote this up in chapters 9 and 12 of my advanced textbook
_An Infinitely Large Napkin_ (#url("https://evanchen.cc/napkin.html")).
You'll get to learn about something called the _wedge product_
that will let you _derive_ the formula for the determinant and see where it comes from
(in contrast to 18.02, where you are just given the mysterious formula
and have to memorize it).
- The geometric picture of the cross product is nontrivial,
but you can verify it by brute-force calculation.
Specifically, given $bf(a)$ and $bf(b)$ in $RR^3$,
you have a long formula for $bf(c) = bf(a) times bf(b)$.
You can manually verify that $bf(c) dot bf(a) = bf(c) dot bf(b) = 0$
and also that the signed volume of the parallelepiped formed by $bf(a)$, $bf(b)$,
and $1/(|bf(c)|^2) bf(c)$ is $1$.
However, this calculation is even more disgusting than the one in @det2,
and unsatisfying because it doesn't show you where the formula comes from
(only proves it's correct).
(In truth, the cross product is secretly a worse form of the wedge product. Just saying. `;)`)
= Recitation questions from official course
== Problem 1
Consider the vectors $upright(bold(a)) = angle.l 2 , 3 , 6 angle.r$ and
$upright(bold(b)) = angle.l 1 , 2 , 2 angle.r$.
- What is the scalar component of $upright(bold(a))$ in the direction of
$upright(bold(b))$?
- What is the vector component of $upright(bold(a))$ in the direction of
$upright(bold(b))$?
== Problem 2 (from Poonen notes 3.7-3.10): Introduction to planes
- What does the set of vectors perpendicular to
$angle.l 1 , 2 , 3 angle.r$ look like?
- What is the equation of the plane with normal vector
$angle.l 1 , 2 , 3 angle.r$ passing through the point $P$ with
coordinates $(4 , 5 , 6)$?
- Are the vector $angle.l - 5 , 1 , 1 angle.r$ and the plane
$x + 2 y + 3 z = 6$ parallel? Perpendicular? Both? Neither?
- What is the distance from the point $Q$ with coordinates $(2 , 3 , 5)$
to the plane in the second part of this question? (Take the vector
$arrow(P Q)$ and project onto the normal direction to the plane.)
== Problem 3
Consider the three points
$P : (1 , 2 , 4) ; Q : (0 , 1 , 3) ; R : (2 , 4 , 7)$.
- Calculate the cross-product $arrow(P Q) times arrow(P R)$.
- What is the equation of the plane containing the points $P , Q , R$?
(See the second part of the last question.)
- What is the area of the triangle $P Q R$?
= Another problem I made up in the shower if those are too easy
- Suppose $A$, $B$, $C$, $D$ are points in $RR^3$.
What is the geometric interpretation of the following expression#footnote[
First make sure you know what type of object it is.
For the final answer to the whole question, open the following Wikipedia page:
#url("https://w.wiki/9bmU").
]?
$ (arrow(D A) times arrow(D B)) dot arrow(D C) $
- Suppose $P = (p_1, ..., p_n)$ is a point in $RR^n$
while $cal(H)$ is the hyperplane $a_1 x_1 + ... + a_n x_n = c$.
Prove that the distance from $P$ to $cal(H)$ is given by the following formula:
$ (|(a_1 p_1 + ... + a_n p_n) - c|) / sqrt(a_1^2+...+a_n^2). $
|
https://github.com/Edubmstr/typst_public | https://raw.githubusercontent.com/Edubmstr/typst_public/main/supercharged-dhbw1/titlepage.typ | typst | #let titlepage(
authors,
date,
heading-font,
language,
left-logo-height,
logo-left,
logo-right,
many-authors,
right-logo-height,
supervisor,
title,
type-of-degree,
type-of-degree-specification,
type-of-thesis,
time-of-thesis,
university,
university-location,
at-university,
date-format,
show-confidentiality-statement,
confidentiality-marker,
) = {
if (many-authors) {
v(-1.5em)
} else {
v(-1em)
}
// logos (optional)
stack(dir: ltr,
spacing: 1fr,
// Logo at top left if given
align(horizon,
if logo-left != none {
set image(height: left-logo-height)
logo-left
}
),
// Logo at top right if given
align(horizon,
if logo-right != none {
set image(height: right-logo-height)
logo-right
}
)
)
v(-3em)
if (many-authors) {
v(1fr)
} else {
v(1.5fr)
}
// university
align(center, text(1.5em,
[#university \ #university-location]))
// type of thesis (optional)
if (type-of-thesis != none and type-of-thesis.len() > 0) {
align(center, text(weight: "bold", 2em, type-of-thesis))
v(0em)
}
// title
align(center, text(weight: "bold", font: heading-font, 1.4em, title))
v(0em)
// confidentiality marker (optional)
if (confidentiality-marker.display) {
let display = false
let x-offset = 0pt
let y-offset = 0pt
let size = 7em
let title-spacing = 2em
if (type-of-degree == none and type-of-thesis == none) {
title-spacing = 0em
}
if ("display" in confidentiality-marker) {
display = confidentiality-marker.display
}
if ("offset-x" in confidentiality-marker) {
x-offset = confidentiality-marker.offset-x
}
if ("offset-y" in confidentiality-marker) {
y-offset = confidentiality-marker.offset-y
}
if ("size" in confidentiality-marker) {
size = confidentiality-marker.size
}
if ("title-spacing" in confidentiality-marker) {
confidentiality-marker.title-spacing
}
v(title-spacing)
let color = if (show-confidentiality-statement) {
red
} else {
green.darken(5%)
}
place(
right,
dx: 35pt + x-offset,
dy: -70pt + y-offset,
)[
#circle(radius: size / 2, fill: color)
]
}
// type of degree (optional)
if (type-of-degree != none and type-of-degree.len() > 0) {
align(center, text(1em, [#if (language == "de") {
[für den Erwerb des]
} else {
[for the]
}]))
v(-0.25em)
align(center, text(weight: "semibold", 1.25em, type-of-degree))
}
// v(1.5em)
// course of studies
align(center, text(weight: "bold", 2em, [ Studiengang #authors.map(author => author.course-of-studies).dedup().join(" | ")]
))
align(center, text(1.2em, [Studienrichtung: #type-of-degree-specification \ Bearbeitungszeitraum: #time-of-thesis]))
// align(center, text(1em, if (language == "de") {
// "von"
// } else {
// "by"
// }))
// if (many-authors) {
// v(0.8em)
// } else {
// v(2em)
// }
// // authors
// grid(
// columns: 100%,
// gutter: if (many-authors) {
// 14pt
// } else {
// 18pt
// },
// ..authors.map(author => align(center, {
// text(weight: "medium", 1.25em, [#author.name])
// }))
// )
// if (many-authors) {
// v(0.8em)
// } else {
// v(2em)
// }
// // date
// align(center, text(1.2em, if (type(date) == datetime) {
// date.display(date-format)
// } else {
// [#date.at(0).display(date-format) -- #date.at(1).display(date-format)]
// }))
v(2em)
// author information
align(center, grid(
align: left,
columns: (150pt, auto),
gutter: 15pt,
// students
text(if (language == "de") {
[Verfasser: \ Matrikelnummer]
} else {
[Student: \ Student ID: ]
}),
stack(
dir: ttb,
for author in authors {
text([#author.name \ #author.student-id])
linebreak()
}
),
// course information
text(if (language == "de") {
[Kurs: \ Studiengangsleiter]
} else {
[Course: \ Course-Advisor ]
}),
stack(
dir: ttb,
for author in authors {
text([#author.course \ #author.course-advisor])
linebreak()
}
),
// university-supervisor
if (not at-university) {
text(if (language == "de") {
"Wissenschaftlicher Betreuer:"
} else {
"Scientific Supervisor:"
})
},
if (not at-university) {
stack(
dir: ttb,
for author in authors {
let university-supervisor = ""
// company name
if (
"name" in supervisor.university and
supervisor.university.name != none and
supervisor.university.name != ""
) {
university-supervisor+= supervisor.university.name
} else {
panic("Author '" + author.name + "' is missing a company name. Add the 'name' attribute to the company object.")
}
// company address (optional)
if (
"mail-address" in supervisor.university and
supervisor.university.mail-address != none and
supervisor.university.mail-address != ""
) {
university-supervisor+= text([\ #supervisor.university.mail-address])
}
// company city
if (
"phone-number" in supervisor.university and
supervisor.university.phone-number != none and
supervisor.university.phone-number != ""
) {
university-supervisor+= text([\ #supervisor.university.phone-number])
} else {
panic("Author '" + author.name + "' is missing the city of the company. Add the 'city' attribute to the company object.")
}
university-supervisor
linebreak()
}
)
},
// company
if (not at-university) {
text(if (language == "de") {
"Ausbildungsbetrieb:"
} else {
"Company:"
})
},
if (not at-university) {
stack(
dir: ttb,
for author in authors {
let company-address = ""
// company name
if (
"name" in author.company and
author.company.name != none and
author.company.name != ""
) {
company-address+= author.company.name
} else {
panic("Author '" + author.name + "' is missing a company name. Add the 'name' attribute to the company object.")
}
// company address (optional)
if (
"address" in author.company and
author.company.address != none and
author.company.address != ""
) {
company-address+= text([\ #author.company.address])
}
// company city
if (
"city" in author.company and
author.company.city != none and
author.company.city != ""
) {
company-address+= text([\ #author.company.city])
} else {
panic("Author '" + author.name + "' is missing the city of the company. Add the 'city' attribute to the company object.")
}
// company country (optional)
if (
"country" in author.company and
author.company.country != none and
author.company.country != ""
) {
company-address+= text([, #author.company.country])
}
company-address
linebreak()
}
)
},
// supervisor
// company
if ("company" in supervisor) {
text(if (language == "de") {
"Firmenbetreuer:"
} else {
"Supervisor in the Company:"
})
},
if (not at-university) {
stack(
dir: ttb,
for author in authors {
let company-supervisor = ""
// company name
if (
"name" in supervisor.company and
supervisor.company.name != none and
supervisor.company.name != ""
) {
company-supervisor+= supervisor.company.name
} else {
panic("Author '" + author.name + "' is missing a company name. Add the 'name' attribute to the company object.")
}
// company address (optional)
if (
"mail-address" in supervisor.company and
supervisor.company.mail-address != none and
supervisor.company.mail-address != ""
) {
company-supervisor+= text([\ #supervisor.company.mail-address])
}
// company city
if (
"phone-number" in supervisor.company and
supervisor.company.phone-number != none and
supervisor.company.phone-number != ""
) {
company-supervisor+= text([\ #supervisor.company.phone-number])
} else {
panic("Author '" + author.name + "' is missing the city of the company. Add the 'city' attribute to the company object.")
}
company-supervisor
linebreak()
}
)
},
))
v(5em)
}
|
|
https://github.com/tshu-w/CV | https://raw.githubusercontent.com/tshu-w/CV/main/zh.typ | typst | #import "tmpl.typ": *
#let author = "王天舒"
#show: body => tmpl(
author: author,
lang: "zh",
body
)
= #author
#let sep = [ #h(0.5pt) | #h(0.5pt) ]
#fa.fa-envelope(solid: true) #link("mailto:<EMAIL>")[<EMAIL>] #sep
#fa.fa-github() #link("https://github.com/tshu-w")[github.com/tshu-w] #sep
// #fa.fa-phone() (+86) 188-0115-7128 #sep
#fa.fa-location-dot() 北京
#h(1fr) #link("https://files.tianshu.me/cv/zh.pdf")[在线版本]
== 教育经历
#entry(
tl: [*中国科学院软件研究所・国科大杭高院*,计算机科学与技术,博士],
tr: "2019 年 9 月 - 2025 年 7 月",
)[
- 研究方向:LLM,Entity Resolution,Text2SQL 和 Structured Text Retrieval #h(1fr) 导师:孙乐,韩先培研究员
- 平均绩点:3.73/4,获得荣誉:三好学生,一等学业奖学金 #h(1fr) 硕转博
]
/*
#entry(
tl: [*中国科学院软件研究所・国科大杭高院*,计算机科学与技术,博士],
tr: "2021 年 9 月 - 2025 年 7 月",
)[
- 研究方向:LLM 及其在数据科学中的应用 #h(1fr) 导师:孙乐研究员
- 平均绩点:3.73/4,获得荣誉:三好学生,一等学业奖学金
]
#entry(
tl: [*中国科学院软件研究所*,计算机软件与理论,硕士],
tr: "2019 年 9 月 - 2021 年 9 月",
)[
- 研究方向:实体消解(Entity Resolution)#h(1fr) 导师:韩先培研究员
]
*/
#entry(
tl: [*北京交通大学*,计算机科学与技术,学士],
tr: "2015 年 9 月 - 2019 年 7 月",
)[
- 平均绩点:91.2/100(前 10%),英语六级:513,推荐免试攻读研究生
]
== 科研经历
#entry(
tl: [<NAME> _et al._, "Bridging the Gap between Reality and Ideality of Entity Matching: A Revisting and Benchmark ReConstrcution", in _Proc. of IJCAI 2022_, pp. 3978–3984. doi: #link("https://doi.org/10.24963/ijcai.2022/552")[10.24963/ijcai.2022/552].],
tr: [CCF-A],
)[
- 分析实体匹配基准隐含的不合理假设,构建首个开放实体、不平衡标签和多模态基准,以缓解评估偏差
]
#entry(
tl: [<NAME> _et al._, "DBCopilot: Scaling Natural Language Querying to Massive Databases", _CoRR_, 2023, doi: #link("https://doi.org/10.48550/arXiv.2312.03463")[10.48550/arXiv.2312.03463]. #fa.fa-github() #link("https://github.com/tshu-w/DBCopilot")[tshu-w/DBCopilot] #fa.fa-star() 48 stars],
tr: [投稿至 ICDE 2025],
)[
- 提出一种大小模型协同合作,生成式联合检索的 Text2SQL 框架,将自然语言查询扩展到海量数据库
]
#entry(
tl: [<NAME> _et al._, "Match, Compare, or Select? An Investigation of Large Language Models for Entity Matching", _CoRR_, 2024, doi: #link("https://doi.org/10.48550/arXiv.2405.16884")[10.48550/arXiv.2405.16884].],
tr: [投稿至 ACL ARR 2024 June],
)[
- 探究 LLM 用于实体匹配的不同策略,并基于探究结果设计了一种更有成效和效率的组合式框架
]
#entry(
tl: [<NAME> _et al._, "Towards Universal Dense Blocking for Entity Resolution", _CoRR_, 2024, doi: #link("https://doi.org/10.48550/arXiv.2404.14831")[10.48550/arXiv.2404.14831].],
tr: [],
)[
- 基于 GitTables 训练通用实体记录(Record)表示模型,以实现无需特定领域数据微调的稠密分块
]
== 工作经历
#entry(
tl: [*AI Lab实习生*|字节跳动],
tr: "2019 年 2 月 - 2019 年 8 月",
)[
协助头条搜索「精准问答」项目的开发及优化
- 使用 Spark & Hive 统计每日 Top 10 查询的精准问答覆盖情况,为正向挖掘提供支持
- 通过 MapReduce 对全量 CQA 数据根据规则、答案类型、问题意图、答案质量等维度进行筛选
- 使用动态规划算法优化答案片段抽取模块,提升 >50% 的答案摘要抽取效率
]
== 荣誉奖项
#entry(
tl: [*国际大学生程序设计竞赛(ICPC)亚洲区域赛*],
tr: "2016 年 - 2018 年",
)[
- 金奖 #sym.times 2:第42届北京站,第43届焦作站
- 银奖 #sym.times 3:第42届乌鲁木齐站,第42、43届东部赛区总决赛
- 铜奖 #sym.times 1:第41届东部赛区总决赛
]
#entry(
tl: [*中国大学生程序设计竞赛(CCPC)*],
tr: "2017 年 - 2018 年",
)[
- 季军 #sym.times 1:第4届全国邀请赛湘潭站
- 金奖 #sym.times 3:第3届秦皇岛站,第4届桂林站、吉林站
]
== 专业技能
- 技术特长:熟悉 LLM 训练及 Agent 应用,信息检索,表示学习,软件开发,DevOps,数据分析等
- 编程语言:掌握 Python,C++,Bash,熟悉 SQL,Lua,TypeScript,Java
- 系统软件:熟练使用 macOS/Linux,Emacs,Git,Pytorch,Docker,Ray,Spark,#LaTeX 等
- 开源贡献:向 #link("https://github.com/Lightning-AI/pytorch-lightning")[Lightning-AI/pytorch-lightning](10 commits)等#link("https://github.com/pulls?page=4&q=is%3Apr+author%3Atshu-w")[33]个开源项目多次贡献代码
// == 学术论文
// #bibliography("pub.bib", title: none, full: true)
#align(right, text(fill: gray, size: 0.9em)[最后更新于 #datetime.today().display("[year]年[month]月[day]日")])
|
|
https://github.com/sitandr/typst-examples-book | https://raw.githubusercontent.com/sitandr/typst-examples-book/main/src/snippets/grids.md | markdown | MIT License | ## Fractional grids
For tables with lines of changing length, you can try using _grids in grids_.
<div class="warning">
Don't use this where <a href="https://typst.app/docs/reference/model/table/#definitions-cell-colspan">cell.colspan and rowspan</a> will do.
</div>
```typ
// author: jimpjorps
#grid(
columns: (1fr,),
grid(
columns: (1fr,)*2, inset: 5pt, stroke: 1pt, [hello], [world]
),
grid(
columns: (1fr,)*3, inset: 5pt, stroke: 1pt, [foo], [bar], [baz]
),
grid.cell(inset: 5pt, stroke: 1pt)[abcxyz]
)
```
## Automerge adjacent cells with same values
This example works for adjacent cells horizontally, but it's not hard to upgrade it to columns too.
```typ
// author: tebine
#let merge(children, n-cols) = {
let rows = children.chunks(n-cols)
let new-children = ()
for r in rows {
// First group starts at index 0
let i = 0
// Search next group
while i < r.len() {
// Group starts with one cell
let c = r.at(i).body
let n = 1
for j in range(i+1, r.len()) {
let c-next = r.at(j).body
if c-next == c {
// Add cell to group
n += 1
} else {
break
}
}
// Group is finished
new-children.push(table.cell(colspan: n, c))
i += n
}
}
return new-children
}
#show table: it => {
let merged = merge(it.children, it.columns.len())
if it.children.len() == merged.len() { // trick to avoid recursion
return it
}
table(columns: it.columns.len(), ..merged)
}
#table(columns: 2,
[1], [2],
[3], [3],
[4], [5],
)
```
## Slanted column headers with slanted borders
```typ
// author: tebine
#let slanted(it, alpha: 45deg, len: 2.5cm) = layout(size => {
let width = size.width
let b = box(inset: 5pt, rotate(-alpha, reflow: true, it))
let b-size = measure(b)
let l = line(angle: -alpha, length: len)
let l-width = len * calc.cos(alpha)
let l-height = len * calc.sin(alpha)
place(bottom+left, l)
place(bottom+left, l, dx: width)
place(bottom+left, line(length: width), dx: l-width, dy: -l-height)
place(bottom+left, dx: width/2, b)
box(height: l-height) // invisible box to set the height
})
#table(
columns: 2,
align: center,
table.header(
table.cell(stroke: none, inset: 0pt, slanted[*AAA*]),
table.cell(stroke: none, inset: 0pt, slanted[*BBBBBB*]),
),
[aaaaa], [bbbbbb], [c], [d],
)
```
|
https://github.com/tilman151/pypst | https://raw.githubusercontent.com/tilman151/pypst/main/docs/usage.md | markdown | MIT License | # Usage
Pypst can be used to create Typst documents programmatically.
This can be useful for generating reports, slides, or other documents directly in Python to avoid copy-pasting data.
A full example can be found in the [examples](https://github.com/tilman151/pypst/docs/examples/document) directory of the repository.
## Basics
Pypst contains classes that represent Typst elements.
You can create a Typst document by instantiating these classes and nesting them as needed.
```pycon
>>> import pypst
>>> heading = pypst.Heading("My Heading", level=1)
>>> itemize = pypst.Itemize(["First item", "Second item", "Third item"])
```
Each of these classes has a `render` method that returns the Typst code as a string.
```pycon
>>> print(heading.render())
= My Heading
>>> print(itemize.render())
- First item
- Second item
- Third item
```
If you want to combine multiple elements into a single document, you can use the `Document` class.
You can even add imports for other Typst files or packages.
```pycon
>>> document = pypst.Document([heading, itemize])
>>> document.add_import("utils.typ")
>>> print(document.render())
#import "utils.typ"
<BLANKLINE>
= My Heading
<BLANKLINE>
- First item
- Second item
- Third item
```
The output of the `render` method can be written to a `.typ` file for compilation.
## Dynamic Generation
You can use Python loops and conditionals to generate Typst elements.
This can be useful for creating lists or other repetitive structures.
```pycon
>>> enum = pypst.Enumerate([])
>>> for i in range(1, 4): # (1)!
... enum.add(f"Item {i}")
>>> print(enum.render())
+ Item 1
+ Item 2
+ Item 3
+ Item 4
>>> if len(enum.items) > 3: # (2)!
... doc.add(enum)
```
1. By using loops, you fill a list with your data. It may come from experiment results, database queries, or even API calls.
2. Add elements conditionally, based on your data. This way you can include information about optional data only when it is available.
## Including Figures
You can include figures in your document by using the `Figure` class.
The body of the figure can be any Typst element, but the most common, images and tables, are supported directly by Pypst.
```pycon
>>> figure = pypst.Figure("examples/example.png", caption="Example script and output")
>>> print(figure.render())
#figure(
image("examples/example.png"),
caption: "Example script and output"
)
```
You can create images or plots with your favorite Python library and include them in your Typst document.
Tables can be generated from Pandas data frames, as shown [here](pandas.md).
## Using Templates
To use your own template or external ones, you can use a wrapper Typst file.
Here is an example for using the IEEE template:
```
#import "@preview/charged-ieee:0.1.0": ieee
#show: ieee.with(
title: [Using Templates with Pypst],
abstract: [#lorem(100)],
authors: (
(
name: "Alice",
department: [Co-Author],
organization: [Best University],
email: "<EMAIL>"
),
(
name: "Bob",
department: [Co-Author],
organization: [Best University],
email: "<EMAIL>"
),
),
index-terms: ("Scientific writing", "Typesetting", "Document creation", "Syntax")
)
// include generated file
#include("my-document.typ")
```
The wrapper file imports and sets up the template.
It then includes the generated file created with Pypst.
## What about show and set rules?
Pypst doesn't support the `show` and `set` rules by design.
We think it is easier to set up your global rules in a template file and then include your generated document, like shown [above](usage.md#using-templates).
Generating dynamic rules doesn't seem like a common use case.
If you still want to include rules, you can always add them as a string to your document.
```pycon
>>> document.add("#set: text(size: 12pt)")
``` |
https://github.com/miliog/typst-penreport | https://raw.githubusercontent.com/miliog/typst-penreport/master/typst-penreport/helper/cwe.typ | typst | MIT No Attribution | #let cweXmlData = xml("../static/cwec_v4.12.xml")
#let findWeaknessById(id) = {
for weakness in cweXmlData.first().children.at(1).children {
if ("attrs" in weakness and weakness.attrs.ID == str(id)) {
let description = weakness.children.at(1).children.at(0)
// A fix for CWE-20 and probably others as well
description = description.replace(regex("\n[ ]{2,}"), " ")
return (
id: weakness.attrs.ID,
name: weakness.attrs.Name,
description: description,
link: "https://cwe.mitre.org/data/definitions/" + str(id) + ".html",
)
}
}
assert(false, message: "CWE not found!")
} |
https://github.com/dyc3/senior-design | https://raw.githubusercontent.com/dyc3/senior-design/main/expo/expo-abstract.typ | typst | *School of Systems and Enterprises*
*Project Name*
OpenTogetherTube Load Balancer
*Description*
OpenTogetherTube (OTT) is an open source web application that allows users to watch
videos together in real-time. The nature of the application makes it non-trivial
to scale to a large number of users. To solve this, the team has designed and
implemented a custom load balancer to appropriately handle the needs of the project.
The load balancer allows the application to be deployed around the world, lowering
latency for users, improving reliability, and allowing for a larger number of
simultaneous users.
*Members*
- <NAME>
- <NAME>
- <NAME>
- <NAME>
*Advisor*
Professor <NAME>
*Tags*
software, distributed computing, cloud computing, open source
|
|
https://github.com/TypstApp-team/typst | https://raw.githubusercontent.com/TypstApp-team/typst/master/tests/typ/bugs/bidi-tofus.typ | typst | Apache License 2.0 | // Test that shaping missing characters in both left-to-right and
// right-to-left directions does not cause a crash.
---
#"\u{590}\u{591}\u{592}\u{593}"
#"\u{30000}\u{30001}\u{30002}\u{30003}"
|
https://github.com/ZaninAndrea/physics-rl | https://raw.githubusercontent.com/ZaninAndrea/physics-rl/main/report/template.typ | typst | #let script-size = 7.97224pt
#let footnote-size = 8.50012pt
#let small-size = 9.24994pt
#let normal-size = 12.0000pt
#let large-size = 15pt
// This function gets your whole document as its `body` and formats
// it as an article in the style of the American Mathematical Society.
#let ams-article(
// The article's title.
title: "Paper title",
shortTitle: none,
// An array of authors. For each author you can specify a name,
// department, organization, location, and email. Everything but
// but the name is optional.
authors: (),
// Your article's abstract. Can be omitted if you don't have one.
abstract: none,
// The article's paper size. Also affects the margins.
paper-size: "a4",
// The path to a bibliography file if you want to cite some external
// works.
bibliography-file: none,
// The document's content.
body,
) = {
// Formats the author's names in a list with commas and a
// final "and".
let names = authors.map(author => author.name)
let author-string = if authors.len() == 2 {
names.join(" and ")
} else {
names.join(", ", last: ", and ")
}
// Set document metadata.
set document(title: title, author: names)
// Set the body font. AMS uses the LaTeX font.
set text(size: normal-size, font: "New Computer Modern")
// Configure the page.
set page(
paper: paper-size,
// The margins depend on the paper size.
margin: if paper-size != "a4" {
(
top: (116pt / 279mm) * 100%,
left: (126pt / 216mm) * 100%,
right: (128pt / 216mm) * 100%,
bottom: (94pt / 279mm) * 100%,
)
} else {
(
top: 100pt,
left: 100pt,
right: 100pt,
bottom: 80pt,
)
},
// The page header should show the page number and list of
// authors, except on the first page. The page number is on
// the left for even pages and on the right for odd pages.
header-ascent: 30pt,
header: locate(loc => {
let i = counter(page).at(loc).first()
if i == 1 { return }
i -= 1
let headerText = title
if shortTitle != none{
headerText = shortTitle
}
set text(size: small-size)
grid(
columns: (6em, 1fr, 6em),
[#i],
align(center, upper(headerText))
)
}),
)
// Configure headings.
set heading(numbering: "1.")
show heading: it => {
// Create the heading numbering.
let number = if it.numbering != none {
counter(heading).display(it.numbering)
h(7pt, weak: true)
}
// Level 1 headings are centered and smallcaps.
// The other ones are run-in.
set text(size: normal-size, weight: 400)
if it.level == 1 {
set align(center)
set text(size: large-size)
pagebreak(weak: true)
strong([
#number
#it.body
])
v(15pt, weak: true)
} else {
v(15pt, weak: true)
number
strong(it.body)
h(7pt, weak: true)
}
}
set text(hyphenate: false)
// Configure lists and links.
set list(indent: 24pt, body-indent: 5pt)
set enum(indent: 24pt, body-indent: 5pt)
show link: set text(font: "New Computer Modern Mono")
// Configure equations.
show math.equation: set block(below: 8pt, above: 9pt)
show math.equation: set text(weight: 400)
// Configure citation and bibliography styles.
set bibliography(style: "springer-mathphys", title: "References")
show figure: it => {
set align(center)
v(12.5pt, weak: true)
// Display the figure's body.
block(it.body, inset: (
left: -60pt,
right: -60pt
))
// Display the figure's caption.
if it.has("caption") {
// Gap defaults to 17pt.
v(if it.has("gap") { it.gap } else { 17pt }, weak: true)
smallcaps(it.supplement)
if it.numbering != none {
[ ]
it.counter.display(it.numbering)
}
[. ]
it.caption.body
}
v(15pt, weak: false)
}
// Display the title and authors.
v(35pt, weak: true)
align(center, upper({
text(size: 1.2 * normal-size, weight: 500, "PACS Project Report")
v(25pt, weak: true)
text(size: 1.3 * large-size, weight: 700, title)
v(25pt, weak: true)
text(size: normal-size, author-string)
}))
// Configure paragraph properties.
set par(first-line-indent: 0em, justify: true, leading: 0.58em)
show par: set block(spacing: 0.58em, above: 1em)
// Display the abstract
if abstract != none {
v(20pt, weak: true)
set text(script-size)
show: pad.with(x: 35pt)
smallcaps[Abstract. ]
abstract
}
// Display the article's contents.
v(60pt, weak: true)
body
// Display the bibliography, if any is given.
if bibliography-file != none {
show bibliography: set text(8.5pt)
show bibliography: pad.with(x: 0.5pt)
bibliography(bibliography-file)
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.