repo
stringlengths 26
115
| file
stringlengths 54
212
| language
stringclasses 2
values | license
stringclasses 16
values | content
stringlengths 19
1.07M
|
---|---|---|---|---|
https://github.com/fiit-community/base-typst-template | https://raw.githubusercontent.com/fiit-community/base-typst-template/main/template/lib.typ | typst | MIT License | #import "@local/base-fiit-template:0.1.0": *
#import "assets.typ"
|
https://github.com/SillyFreak/typst-packages-old | https://raw.githubusercontent.com/SillyFreak/typst-packages-old/main/template/README.md | markdown | MIT License | # Typst package
See the [manual](docs/manual.pdf) for details.
|
https://github.com/jinnovation/resume | https://raw.githubusercontent.com/jinnovation/resume/main/data.typ | typst | #let personal = (
name: "<NAME>",
email: "<EMAIL>",
url: "https://jonathanj.in",
linkedin: "https://linkedin.com/in/jinnovation",
github: "https://github.com/jinnovation",
huggingface: "https://huggingface.co/jinnovation",
)
#let skills = (
"Machine Learning and Data": (
link("https://ray.io")[Ray],
link("https://pytorch.org")[PyTorch],
link("https://spark.apache.org")[Apache Spark],
link("https://flink.apache.org/")[Apache Flink],
link("https://mlflow.org")[MLflow],
link("https://airflow.apache.org")[Apache Airflow],
link("https://www.kubeflow.org")[Kubeflow],
link("https://www.tensorflow.org")[TensorFlow],
),
"Infrastructure and Distributed Systems": (
"Kubernetes",
"Terraform",
"Prometheus",
"gRPC",
"Docker",
),
"Enterprise Platforms": (
"Amazon Web Services (AWS)",
"Google Cloud (GCP)",
link("https://databricks.com")[Databricks],
),
"Programming Languages": (
"Python",
"Go",
"C++",
"Java",
)
)
#let education = (
(
institution: "University of Chicago",
url: "https://uchicago.edu",
area: "Computer Science",
startYear: 2011,
endYear: 2015,
location: "Chicago, IL",
degrees: (
(
type: "B.S.",
area: "Computer Science",
),
(
type: "B.A",
area: "Economics",
)
)
),
)
#let speaking = (
(
title: "Accelerating Time-to-Production for ML at Hinge",
url: "https://youtu.be/_nsTcYtfnXU",
conference: "Ray Summit",
date: "2024-09-30",
),
(
title: "How Spotify is Navigating an Evolving ML Landscape with Hendrix Platform",
url: "https://twimlai.com/conf/twimlcon/2022/session/how-spotify-is-navigating-an-evolving-ml-landscape-with-hendrix-platform/",
conference: "TWIMLcon AI Platforms",
date: "2022-10-04",
),
(
title: "Empowering Traceable and Auditable ML in Production at Spotify with Hendrix",
url: "https://mlconf.com/sessions/empowering-traceable-and-auditable-ml-in-production-at-spotify-with-hendrix",
conference: "MLconf",
date: "2022-03-28",
),
(
conference: "KubeCon + CloudNativeCon",
url: "https://www.youtube.com/watch?v=KUyEuY5ZSqI",
title: "Scaling Kubeflow for Multi-tenancy at Spotify",
date: "2021-10-07",
),
)
#let work = (
(
organization: "Hinge",
url: "https://hinge.co",
position: "Staff Machine Learning Engineer, AI Platform",
startDate: "2024-04-15",
location: "New York, NY",
blurb: [
Leading the platformization of Hinge's various AI/ML efforts
(recommendations, trust and safety, user growth and retention, etc.).
],
highlights: (
[
Re-architected photo-scoring pipeline for
#link("https://hingeapp.zendesk.com/hc/en-us/articles/26558052212627-What-is-Top-Photo")[Top
Photo] to enable multi-plexed rescoring of user photos in
near-real-time using Databricks Delta Live Tables, Spark, Flink,
and Ray Serve; reduced rollout time of new photo-scoring models
from months to one week.
],
[
Defined the technical direction of Hinge's model serving
strategy. Conducted in-depth and methodical evaluation of two
solutions (Ray Serve and
#link("https://www.databricks.com/product/model-serving")[Databricks
Model Serving]) and defined multi-quarter development roadmap.
],
)
),
(
organization: "Humane Intelligence",
url: "https://www.humane-intelligence.org/",
position: "Engineering Advisor",
startDate: "2024-02-01",
endDate: "2024-08-30",
location: "New York, NY",
hide: true,
blurb: [
"Fractional" tech lead and architect. Partner with the CEO to define
and execute on engineering strategies, including hiring and vendor
selection. Contribute in hands-on capacity for technical
proofs-of-concepts.
],
highlights: (
[
Led the hiring and management of a team of engineering
contractors and an external development agency; defined,
communicated, and coordinated development roadmap, led platform
evaluations, and defined technical ways-of-working for a
brand-new team;
],
[
Spearheaded 0-to-1 development of platform for collaborative,
crowd-sourced auditing of large language models (open-source and
vendor) using Vercel, Next.js, and the Hugging Face API; enabled
over 100
"#link("https://www.humane-intelligence.org/bounty1")[bias
bounty]" participants to contribute over 30 submissions via
Hugging Face API.
],
),
),
(
organization: "Spotify",
position: "Senior Machine Learning Engineer",
url: none,
location: "New York, NY",
startDate: "2021-03-01",
endDate: "2024-03-04",
blurb: [
Senior member of the ML Platform org. Primarily focused on managed
multi-tenant compute infrastructure for Kubeflow and Ray in
GCP. Later shifted focus to AI/ML governance and artifact/experiment
management solutions.
],
highlights: (
[
Drove early-stage evaluation and implementation of centralized,
multi-tenant Ray infrastructure based on KubeRay;
],
[
Spearheaded development of Backstage-based model governance
solution in preparation for the EU Digital Services Act;
],
[
Defined and drove general-availability roadmap for
Kubeflow-based orchestration product; defined SLOs and educated
ML Platform org on SRE best practices.
],
),
),
(
organization: "NVIDIA",
position: "Senior Systems Software Engineer, AI Infrastructure",
location: "New York, NY",
startDate: "2019-12-01",
endDate: "2021-01-01",
url: none,
blurb: [
Worked on AI infrastructure for autonomous vehicle research and development.
],
),
(
organization: "Twitter",
position: "Machine Learning Software Engineer",
startDate: "2018-08-01",
endDate: "2019-12-01",
url: none,
location: "New York, NY",
blurb: [
Member of Cortex, Twitter's central ML platform organization. Worked
on: workflow orchestration; experiment management.
],
// highlights: (
// [
// Enabled distributed training of TensorFlow models in Apache
// Mesos from an Airflow pipeline via Deepbird, Twitter's
// TensorFlow-based model training/evaluating/serving framework
// ],
// ),
),
(
organization: "Uber",
position: "Software Engineer, Observability",
startDate: "2016-07-01",
endDate: "2018-07-01",
location: "New York, NY",
hide: true,
),
(
organization: "OkCupid",
position: "Software Engineer",
location: "New York, NY",
startDate: "2015-07-01",
endDate: "2016-07-01",
hide: true,
)
)
|
|
https://github.com/schang412/typst-whalogen | https://raw.githubusercontent.com/schang412/typst-whalogen/master/README.md | markdown | Apache License 2.0 | # whalogen
whalogen is a library for typsetting chemical formulae with Typst, inspired by mhchem.
GitHub repository: https://github.com/schang412/typst-whalogen
## Examples

```typst
#import "@preview/whalogen:0.2.0": ce
$ #ce("HCl + H2O -> H3O+ + Cl-") $
```
See the [manual](manual.pdf) for more details and examples.
|
https://github.com/yixiak/sysu-report-typst-template | https://raw.githubusercontent.com/yixiak/sysu-report-typst-template/master/usage.typ | typst | MIT License | #import "template.typ": *
#show:report.with(title: "实验报告实验",
subtitle: "尝试使用 Typst 编写实验报告",
name: "张三",
stdid: "22223333",
classid: "实验二班",
) |
https://github.com/so298/cv-theme.typ | https://raw.githubusercontent.com/so298/cv-theme.typ/main/cv.typ | typst | #set page("a4")
#import "./theme.typ": *
#show: cv
#set text(font: ja_sans, size: 10pt, lang: "ja")
#title("なまえ")
#info("Phone", "xxx-xxxx-xxxx")
#info("E-Mail", link("mailto:<EMAIL>", "<EMAIL>"))
#info("GitHub", link("https://github.com/your_user_name")[your_user_name])
#v(5pt)
= 経歴
== 学歴
#cventry("2020/04 - 2024/03", "すごい大学", "卒業", [
- ここに説明を書くことができます。
])
== 職務経験
#cventry("2020/12 - 2022/03", "やばい会社", "アルバイト", [
- 仕事内容の説明。
])
== その他
#cventry("2020/12 - 2022/03", "すごい賞", "", [
- 内容の説明。
])
= スキルと興味
== トピック
説明文。
|
|
https://github.com/fsr/rust-lessons | https://raw.githubusercontent.com/fsr/rust-lessons/master/src/lesson5.typ | typst | #import "slides.typ": *
#show: slides.with(
authors: ("<NAME>", "<NAME>"), short-authors: "H&A",
title: "Wer rastet, der rostet", short-title: "Rust-Kurs Lesson 5", subtitle: "Ein Rust-Kurs für Anfänger",
date: "Sommersemester 2023",
)
#show "theref": $arrow.double$
#show link: underline
#new-section("Enums")
#slide(title: "Enums: Overview")[
- define a type by _enumerating_ its possible _variants_
- can represent only _one_ variant at a time
- hold associated data like a struct or a tuple
- access variants with the _namespace_ operator *`::`*
#columns(2)[
#begin(2)[
```rust
#[derive(Debug)]
enum MouseButton {
Left,
Middle,
Right,
}
println!("{:?}", MouseButton::Left);
// prints `Left`
println!("{:?}", MouseButton::Right as u8);
// prints `2`
```
]
#colbreak()
#begin(3)[
```rust
#[derive(Debug)]
enum WindowEvent {
Mouse {
btn: MouseButton,
x: u32,
y: u32,
},
KeyPress(u16), // contains keycode
FocusLost,
FocusGained,
}
```
]
]
]
#slide(title: "Non-existent values: the Option type")[
```rust
enum Option<T> {
None,
Some(T),
}
```
- generic over its encapsulated type
- globally usable, no need to prefix `Option::`
- None theref there is no value
- Some theref there is a value
```rust
let m_btn = Some(MouseButton::Left);
```
]
#slide(title: "The match expression")[
```rust
let my_bool = true;
match my_bool {
true => {},
false => {},
}
let btn = MouseButton::Middle;
match btn {
MouseButton::Left => { println!("left") },
MouseButton::Middle => { println!("middle") },
MouseButton::Right => { println!("right") },
}
```
]
#slide(title: "The match expression")[
#columns(2)[
```rust
let num = Some(12);
let num = match num {
Some(x) => x * 2,
None => 9,
};
// binding with a catch all pattern
match num {
3 => println!("three"),
5 => prinltn!("five"),
other => println!("got {other}"),
}
```
#colbreak()
```rust
// the _ placeholder
match num {
3 => println!("still three"),
_ => {} // ignores other possibilities
}
```
]
]
#slide(title: "Exercise: Temperature conversion (mit mat(s)ch spielen)", theme-variant: "action")[
Write 3 methods for the `Temperature` type that convert the inner value to the desired unit.
The functions should be called `to_celsius`, `to_fahrenheit`, `to_kelvin`.
They should return the corresponding integer value; `i32`, `i32`, `u32` respectively.
Use the `match` statement.
You can ignore decimals and rounding errors.
```rust
enum Temperature {
Celsius(i32),
Fahrenheit(i32),
Kelvin(u32),
}
```
At the end you should be able to do this:
```rust
let temp1 = Temperature::Celsius(-20);
println!("temp1: {}°C", temp1.to_celsius()); // -20
println!("temp1: {}°F", temp1.to_fahrenheit()); // -4
println!("temp1: {}K", temp1.to_kelvin()); // 253
```
]
#new-section("Patterns and matching")
#slide(title: "Matching literals")[
```rust
let n = 1;
match n {
1 => println!("one"),
2 => println!("two"),
_ => println!("anything"),
}
```
]
#slide(title: "Matching named variables")[
```rust
let n = 1;
match n {
1 => println!("one"),
2 => println!("two"),
n => println!("n = {n}"),
}
```
]
#slide(title: "Matching multiple patterns")[
- using the _or_ operator `|` or using a range expression
```rust
let n = 1;
match n {
1 | 2 => println!("one or two"),
3..=6 => println!("[3,6]"),
7..10 | 13 => println!("[7,10) or 13"),
n => println!("n = {n}"),
}
```
]
#slide(title: "Destructuring: structs")[
```rust
struct Point {
x: i32,
y: i32,
z: i32,
}
let p = Point { x: 0, y: 7 };
match p {
Point { x, y: 0, z: 0 } => println!("On the x axis at {x}"),
Point { x: 0, y, z: 0 } => println!("On the y axis at {y}"),
Point { x: 0, y: 0, z } => println!("On the z axis at {z}"),
Point { x: a, y: b, z: c } => { // `x`, `y`, `z` are renamed to `a`, `b`, `c`
println!("On neither axis: ({a}, {b}, {c})");
}
}
```
]
#slide(title: "Destructuring: enums")[
```rust
enum WindowEvent {
Mouse { btn: MouseButton, x: u32, y: u32 },
KeyPress(u16),
FocusLost,
FocusGained,
}
let event = WindowEvent::Mouse { btn: MouseButton::Left, x: 20, y: 100 };
match event {
WindowEvent::Mouse { btn: MouseButton::Left | MouseButton::Right, x, y } => { ... },
WindowEvent::Mouse { btn: MouseButton::Middle, x, y } => { ... },
WindowEvent::KeyPress(keycode) => { ... },
WindowEvent::FocusLost => { ... },
WindowEvent::FocusGained => { ... },
}
```
]
#slide(title: "Ignoring values")[
- with the `_` catch-all
```rust
fn foo(_: u16, b: u16) {
println!("we only need b: {b}");
}
fn main() {
foo(5, 6);
let numbers = (1, 2, 3, 4, 5);
match numbers{
(_, b, _, d, _) => println!("(_, {b}, _, {d}, _)"),
}
}
```
]
#slide(title: "Ignoring values")[
- with the `..` range
```rust
let numbers = (1, 2, 3, 4, 5);
match numbers {
(first, .., last) => {
println!("Some numbers: {first}, {last}");
}
}
let origin = Point { x: 0, y: 0, z: 0 };
let Point { x, .. } = origin;
println!("x is {x}");
```
]
#slide(title: "Match guards")[
- condition, attached to a pattern
- applies to the entire pattern
```rust
let num = Some(4);
match num {
Some(x) if x % 2 == 0 => println!("The number {} is even", x),
Some(x) => println!("The number {} is odd", x),
None => {},
}
let (x, cond) = (4, false);
match x {
// ( ) if cond =>
4 | 5 | 6 if cond => println!("yes"),
_ => println!("no"),
}
```
]
#slide(title: "@ Bindings")[
```rust
enum Question {
Input { n: i32 },
}
let q = Question::Input { n: 24 };
let answer = match q {
Question::Input { n: num @ 24 } => num + 18,
Question::Input { n: num @ 50..=100 | num @ 13 } => {
eprintln!("We don't want number {num}!");
12 * 4 - 6
},
_ => 6 * 7,
}
println!("Answer to the Ultimate Question of Life, the Universe, and Everything is {answer}");
```
]
#slide(title: "The match expression")[
#columns(2)[
```rust
let num = Some(12);
let num = match num {
Some(x) => x * 2,
None => 9,
};
// binding with a catch all pattern
match num {
3 => println!("three"),
5 => prinltn!("five"),
other => println!("got {other}"),
}
```
#colbreak()
```rust
// the _ placeholder
match num {
3 => println!("still three"),
_ => {} // ignores other possibilities
}
```
]
]
#slide(title: "Exercise: Temperature conversion (mit mat(s)ch spielen)", theme-variant: "action")[
Write 3 methods for the `Temperature` type that convert the inner value to the desired unit.
The functions should be called `to_celsius`, `to_fahrenheit`, `to_kelvin`.
They should return the corresponding integer value; `i32`, `i32`, `u32` respectively.
Use the `match` statement.
You can ignore decimals and rounding errors.
```rust
enum Temperature {
Celsius(i32),
Fahrenheit(i32),
Kelvin(u32),
}
```
At the end you should be able to do this:
```rust
let temp1 = Temperature::Celsius(-20);
println!("temp1: {}°C", temp1.to_celsius()); // -20
println!("temp1: {}°F", temp1.to_fahrenheit()); // -4
println!("temp1: {}K", temp1.to_kelvin()); // 253
```
]
#slide(title: "Non-exhaustive pattern matching with `if let`")[
#alternatives(position: top)[
```rust
fn eval(maybe_inner: Option<i32>) -> bool {
match maybe_inner {
Some(inner) => {
let result = do_some_crazy_computation(inner);
println!("We have an answer: {:?}", result);
result
},
None => false
}
}
```
][
```rust
fn eval(maybe_inner: Option<i32>) -> bool {
if let Some(inner) = maybe_inner {
let result = do_some_crazy_computation(inner);
println!("We have an answer: {:?}", result);
return result;
}
false
}
```
]
]
#slide(title: "Task: 'click'", theme-variant: "action")[
#uncover("1-")[- implement a `WindowEvent` enum like in the slides]
#uncover("2-")[- create some instances of it]
#uncover("3-")[- use `if let` to print the coordinates of clicks]
#alternatives()[```rust
fn main() {
let lost = WindowEvent::FocusLost;
}
```][```rust
fn main() {
let lost = WindowEvent::FocusLost;
let click = WindowEvent::Mouse { btn: MouseButton:: Left, x: 20, y: 100 };
}
```][```rust
fn main() {
let lost = WindowEvent::FocusLost;
let click = WindowEvent::Mouse { btn: MouseButton:: Left, x: 20, y: 100 };
print_coordinates_if_click(lost); // lost prints nothing, click does
}
```]
]
#slide(title: "Task: 'Patterned Bars'", theme-variant: "action")[
#two-grid()[
#uncover("1-")[- presumes you have done task 'bars']
#uncover("2-")[- the normal pattern can be set to something other than `#`]
#uncover("3-")[- add an `enum Pattern` for patterned bars]
#uncover("4-")[- include `Normal`, `Single(char)`]
#uncover("5-")[- use them in Bars: in the `struct`, in `print`, ...]
#uncover("5-")[- e.g. to mark the max and min values]
#uncover("6-")[- maybe add a `Multiple(&'static str)` to `Pattern`]
//' fucking highlighting
][
#alternatives()[```
##### 5
### 3
######## 8
###### 6
``` ```rust
pub struct Bars {
width: i32,
values: [i32; HEIGHT],
}
```][```
##### 5
### 3
######## 8
###### 6
``` ```rust
pub struct Bars {
width: i32,
values: [i32; HEIGHT],
// set to '#' in Bars::new()
normal_pattern: char
}
```][```
##### 5 #Pattern::Normal
::: 3 #Pattern::Single(':')
//////// 8 #Pattern::Single('/')
###### 6
``` ```rust
pub enum Pattern {
Normal, // needs no extra infos
Single(char), // stores a char
}
```][```
##### 5
::: 3
//////// 8
###### 6
``` ```rust
pub enum Pattern {
Normal, // needs no extra infos
Single(char), // stores a char
}
```][```
##### 5
::: 3
//////// 8
###### 6
``` ```rust
pub enum Pattern {
Normal, // needs no extra infos
Single(char), // stores a char
}
```][```
##### 5 #Pattern::Normal
::: 3 #Pattern::Single(':')
/¯\_/¯\_ 8 #Pattern::Multiple("/¯\_")
###### 6
``` ```rust
pub enum Pattern {
Normal, // needs no extra infos
Single(char), // stores a char
// stores a string literal
Multiple(&'static str)
}
```] //' fucking highlighting
]
]
|
|
https://github.com/k4zuy/Typst-Template-HTW | https://raw.githubusercontent.com/k4zuy/Typst-Template-HTW/main/thesis.typ | typst | #import "common/titlepage.typ": *
#import "common/metadata.typ": *
#import "style/style.typ": *
#import "common/acronyms.typ": acro
//#import "common/acronyms.typ": *
#titlepage(
title: titleEnglish,
titleGerman: titleGerman,
degree: degree,
program: program,
supervisor: supervisor,
advisors: advisors,
author: author,
studentNumber: studentNumber,
startDate: startDate,
submissionDate: submissionDate
)
#show: style.with(
title: titleEnglish,
titleGerman: titleGerman,
degree: degree,
program: program,
supervisor: supervisor,
advisors: advisors,
author: author,
studentNumber: studentNumber,
startDate: startDate,
submissionDate: submissionDate
)
= Einleitung
#lorem(100) |
|
https://github.com/hooyuser/typst_math_notes | https://raw.githubusercontent.com/hooyuser/typst_math_notes/master/0.1.0/math-notes.typ | typst | #import "@preview/ctheorems:1.1.2": *
#import "commutative-diagrams.typ": *
#let outline_style(it, outline_color: black) = {
set text(font: "Noto Sans")
show link: set text(black)
let fill_line_color = luma(70%)
let indents = ("l1": 32pt, "l2": 28pt, "l3": 30pt) //indents for numbering
let extra_paddings = ("l2": 1pt, "l3": 2pt)
//let indents = ("l1": 30pt, "l2": 28pt, "l3": 25pt)
let loc = it.element.location()
let page_number = it.page // page number
let chapter_idx = it.body.children.at(0)
let header_text = it.element.body
let level2_padding = 2pt
let level3_padding = 1pt
let vline_color = rgb("f36619").darken(0%)
let content_line = if it.level == 1 {
set text(size: 16pt, weight: 700, fill: outline_color)
v(26pt, weak: true)
let inset_left = 0.5em
box(
inset: (left: -inset_left),
grid(
columns: (indents.l1 + inset_left, auto),
align: horizon,
circle(
stroke: 0.1pt + outline_color,
fill: outline_color.lighten(82%),
)[
#set align(center + horizon)
#text(size: 17pt, fill: outline_color.saturate(0%), chapter_idx)
],
grid.cell[
#header_text
#h(1fr)
#page_number
]
),
)
v(-10pt, weak: true)
} else if it.level == 2 {
v(10pt, weak: true)
set text(size: 12pt, weight: 600)
h(indents.l1 + extra_paddings.l2) // level2_padding as extra padding
box(width: indents.l2, chapter_idx)
header_text
h(0.4em)
box(
stroke: none,
width: 1fr,
inset: (y: 0.0em),
line(length: 100%, stroke: fill_line_color + .5pt),
)
h(0.4em)
page_number
} else if it.level == 3 {
v(8pt, weak: true)
let is_first = chapter_idx.text.last() == "1"
set text(size: 9.5pt, weight: 400, fill: luma(15%))
let vline_offset = indents.l1 + extra_paddings.l2 + 0.9em // 0.9em needs to fine-tuned for the vertical line
let vline_y_padding = 0.2em
let outset_top = if is_first {
vline_y_padding
} else {
1em - vline_y_padding
}
box(
stroke: (left: 2pt + vline_color),
outset: (left: -vline_offset, top: outset_top, bottom: vline_y_padding),
{
h(indents.l1 + indents.l2 + extra_paddings.l3) // level3_padding as extra padding
box(width: indents.l3, chapter_idx)
header_text
h(1fr)
page_number
},
)
}
link(loc, content_line)
}
#let heading_style(it) = {
set block(above: 1.4em, below: 1em)
if it.numbering == none {
it
} else if it.level == 1 {
set par(first-line-indent: 0em)
text(weight: 700, 22pt, tracking: 0.5pt, font: "Lato", fill: luma(30%))[
#v(2em)
Chapter #counter(heading).display(it.numbering)#v(1.1em, weak: true)
]
text(weight: 700, 28pt, font: "Lato", ligatures: false)[
#it.body #v(2em, weak: true)
]
} else if it.level == 2 {
set text(16pt, weight: 700, font: "New Computer Modern")
it
} else if it.level == 3 {
set text(13pt, weight: 700, font: "New Computer Modern")
it
} else {
set text(weight: 700, font: "New Computer Modern")
it
}
}
// Theorem environment
#let thm_env_head_sans(name, color) = [#text(font: "Latin Modern Sans", weight: 700, fill: color)[#name]]
#let thm_env_name_sans(name, color) = [#text(font: "Noto Sans Display", weight: 500, fill: color, size: 10.5pt)[#name]]
#let theorem_color = rgb("#f19000")
#let theorem_color_bg = rgb("#fdf8ea")
#let quoteblock(background_color, front_color, bar_width: 0.25em, inset: 1em, contents) = pad(
left: 0.5 * bar_width,
block(
fill: none,
stroke: (left: bar_width + background_color),
pad(left: 0.5 * bar_width, block(fill: front_color, width: 100%, inset: inset, contents)),
),
)
// Theorem environment for definition, lemma, proposition, corollary
#let thmbox_quote(
identifier,
head,
..blockargs,
supplement: auto,
padding: (left: 0.3em),
namefmt: x => [(#x)],
numberfmt: x => x,
titlefmt: strong,
bodyfmt: x => x,
separator: [#h(0.1em):#h(0.2em)],
base: "heading",
base_level: none,
front_color: luma(230),
background_color: luma(30),
) = {
if supplement == auto {
supplement = head
}
let boxfmt(name, number, body, title: auto, ..blockargs_individual) = {
set block(breakable: true)
set par(first-line-indent: 0pt)
if not name == none {
name = [ #namefmt(name) ]
} else {
name = []
}
if title == auto {
title = head
}
if not number == none {
title += h(0.15em) + numberfmt(number)
}
title = titlefmt(title)
body = bodyfmt(body)
quoteblock(front_color, background_color)[#title#h(2pt)#name#separator#v(3pt)#body]
}
return thmenv(identifier, base, base_level, boxfmt).with(supplement: supplement)
}
#let thmbox_quote_style(identifier, head, front_color, background_color) = thmbox_quote(
identifier,
thm_env_head_sans(head, front_color),
separator: [ \ ],
namefmt: x => thm_env_name_sans(x, front_color),
numberfmt: x => thm_env_head_sans(x, front_color),
fill: background_color,
breakable: true,
front_color: front_color,
background_color: background_color,
base_level: 2,
supplement: head,
)
// Theorem environment for example
#let thmbox_frame(
identifier,
head,
..blockargs,
supplement: auto,
padding: (top: 0.5em, bottom: 0.5em),
namefmt: x => [(#x)],
numberfmt: x => x,
titlefmt: strong,
bodyfmt: x => x,
separator: [#h(0.1em):#h(0.2em)],
base: "heading",
base_level: none,
) = {
if supplement == auto {
supplement = head
}
let boxfmt(name, number, body, title: auto, ..blockargs_individual) = {
set par(first-line-indent: 0pt)
if not name == none {
name = [ #namefmt(name) ]
} else {
name = []
}
if title == auto {
title = head
}
if not number == none {
title += " " + numberfmt(number)
}
title = titlefmt(title)
body = bodyfmt(body)
pad(
..padding,
block(
width: 100%,
inset: 1.2em,
radius: 0.3em,
breakable: false,
..blockargs.named(),
..blockargs_individual.named(),
[#title#name#separator#v(3pt)#body],
),
)
}
return thmenv(identifier, base, base_level, boxfmt).with(supplement: supplement)
}
// convert list of pairs to dictionary
#let dict_from_pairs(pairs) = {
for pair in pairs {
assert(pair.len() == 2, message: "`from_pairs` accepts an array of pairs")
(pair.at(0): pair.at(1))
}
}
// color dictionary for theorem environments
#let thm_env_color_dict = (
theorem: (front: rgb("#f19000"), background: rgb("#fdf8ea")),
proposition: (front: rgb("#30773c"), background: rgb("#ebf4ec")),
lemma: (front: rgb("#907a6b"), background: rgb("#f6f4f2")),
corollary: (front: rgb("#a74eb4"), background: rgb("#f9effb")),
definition: (front: rgb("#000069"), background: rgb("#f2f2f9")),
)
// generate theorem environments from color dictionary
#let gen_thm_envs(name_color_dict) = {
let theorem_envs = name_color_dict.pairs().map(((env_name, env_colors)) => {
// capitalize the first letter of the environment name
let header = upper(env_name.first()) + env_name.slice(1)
(env_name, thmbox_quote_style("theorem", header, env_colors.front, env_colors.background))
})
// convert list of pairs to dictionary to enable matching by environment name
dict_from_pairs(theorem_envs)
}
// Export theorem environments
#let (definition, proposition, lemma, theorem, corollary) = gen_thm_envs(thm_env_color_dict)
#let example = thmbox_frame(
"example",
thm_env_head_sans("Example", rgb("#2a7f7f")),
separator: [ \ ],
namefmt: x => thm_env_name_sans(x, rgb("#2a7f7f")),
numberfmt: x => thm_env_head_sans(x, rgb("#2a7f7f")),
fill: rgb("#f2fbf8"),
stroke: rgb("#88d6d1") + 1pt,
breakable: true,
base_level: 2,
supplement: "Example",
)
#let proof = thmproof("proof", "Proof", separator: [.])
#let remark = thmproof("remark", "Remark", separator: [.])
#let math_notes(doc, title: "TITLE", title_font: "Noto Serif") = {
set text(fallback: false)
set page(margin: 1.9cm)
set heading(numbering: "1.1")
set par(leading: 0.55em, first-line-indent: 1.8em, justify: true)
// set font for document text
// #set text(font: "New Computer Modern", size: 11pt, fallback: false)
set text(font: "STIX Two Text", size: 11pt, fallback: false)
set strong(delta: 200)
// set font for math text
// #show math.equation: set text(font: "STIX Two Math", weight: 400)
show math.equation: set text(font: "New Computer Modern Math", weight: 450, features: ("cv01",), fallback: false)
show math.equation: set block(below: 8pt, above: 9pt)
//#show raw: set text(font: "New Computer Modern Mono")
// setting for enumeration and list
set enum(indent: 0.45em, body-indent: 0.45em, numbering: "(i)", start: 1)
set list(indent: 0.45em, body-indent: 0.45em)
// setting for paragraph
set par(leading: 0.7em)
show par: set block(spacing: 0.55em)
// setting for heading
show heading: heading_style
// setting for outline "#4682b4"
show outline.entry: outline_style.with(outline_color: rgb("f36619"))
// setting for theorem environment
show: thmrules.with(qed-symbol: $square$)
// setting reference style
show ref: set text(rgb("#395094"))
// setting link style
show link: set text(rgb("#395094"))
set math.mat(delim: "[")
set math.vec(delim: "[")
// Title Page
v(1fr)
align(center)[
#text(font: title_font, size: 35pt, weight: 500, ligatures: false)[#smallcaps(title)]
#v(1.5fr)
#text(font: title_font, size: 15pt, datetime.today().display())
]
v(1.2fr)
pagebreak()
// Table of Contents
block(inset: (left: -0.5em, right: -0.5em))[
#outline(title: text(font: "Noto Sans", size: 23pt, weight: 700, stretch: 150%)[Contents #v(1em)], depth: 3)
]
pagebreak()
// Set Header and Footer
// Define state for header and footer
// Set Header and Footer
let chapter_dict = state("chapter_dict", (:))
let current_chapter = state("current_chapterg", "")
let current_section = state("current_section", "")
show heading.where(level: 1): curr-heading => (
context {
curr-heading // preserve heading style, only add side effect
let chapter_page_number = str(here().page())
chapter_dict.update(headings => {
// if one page have more than one chapter, only keep the first one
if chapter_page_number not in headings {
headings.insert(chapter_page_number, curr-heading.body)
}
headings
})
}
)
show heading.where(level: 2): curr-heading => {
curr-heading
current_section.update(curr-heading.body)
}
set page(
number-align: center,
header: context {
// get the absolute page number of the current page
let absolute_page_number = here().page()
let chapter_dict_final = chapter_dict.final()
let page_num_str = str(absolute_page_number)
let is_first_page_of_chapter = page_num_str in chapter_dict_final
let chapters = heading.where(level: 1)
let sections = heading.where(level: 2)
// get the chapter number of the current chapter
let chapter_number = counter(chapters).display()
// get the chapter-section number of the current section
let section_counter = counter(chapters.or(sections)).display()
let section_number = if section_counter.len() <= 1 {""} else {
section_counter}
if is_first_page_of_chapter {
current_chapter.update(chapter_dict_final.at(page_num_str))
current_section.update("")
}
else {
let chapter_name = current_chapter.get()
let section_name = current_section.get()
[*#chapter_number #upper(chapter_name)* #h(1fr) #smallcaps[#section_number #section_name]]
// [#chapter_name#h(1fr)#section_name]
}
},
// header: context {
// let chapters = heading.where(level: 1)
// let sections = heading.where(level: 2)
// // get an array of all chapters before current location
// let chapters_before = query(chapters.before(here()))
// // get an array of all chapters after current location
// let chapters_after = query(chapters.after(here()))
// // get an array of all sections before current location
// let sections_before = query(sections.before(here()))
// // display nothing if query result is empty
// if chapters_before.len() == 0 or chapters_after.len() == 0 or sections_before.len() == 0 {
// return
// }
// // get the absolute page number of the first page of the current chapter
// let chapter_absolute_page_number = chapters_after.first().location().page()
// // get the absolute page number of the current page
// let absolute_page_number = here().page()
// // if the current page is the first page of a chapter, then display nothing
// if absolute_page_number == chapter_absolute_page_number {
// return
// }
// // get the chapter number of the current chapter
// let chapter_number = counter(chapters).display()
// // get the chapter-section number of the current section
// let section_number = counter(chapters.or(sections)).display()
// // get the current chapter name
// let chapter_name = chapters_before.last().body
// // get the current section name
// let section_name = sections_before.last().body
// [*#chapter_number #upper(chapter_name)* #h(1fr) #smallcaps[#section_number #section_name]]
// },
// footer: context {
// let page_number = counter(page).get().first()
// if calc.odd(page_number) {
// set align(left)
// // counter(page).display("i")
// circle(radius: auto, fill: orange)[
// #set align(center + horizon)
// #page_number
// ]
// } else {
// set align(right)
// circle(radius: auto, fill: orange)[
// #set align(center + horizon)
// #page_number
// ]
// }
// },
)
// Start counting pages from here
counter(page).update(1)
// Main content
doc
}
|
|
https://github.com/sarahzeller/tud | https://raw.githubusercontent.com/sarahzeller/tud/main/_extensions/sarahzeller/article/typst-show.typ | typst | MIT License | #show: doc => ica-abstract(
$if(title)$
title: "$title$",
$endif$
$if(by-authors)$
authors: (
$for(by-authors)$
(
name: "$it.name$",
corresponding: $if(it.corresponding)$ $it.corresponding$ $else$ false $endif$,
affiliations: (
$for(it.affiliations/first)$id: $it.id$,
email: [$it.email$],
)
$endfor$
),
$endfor$
),
$endif$
$if(affiliations)$
affiliations: (
$for(affiliations)$
"$it.name$",
$endfor$
),
$endif$
$if(keywords)$
keywords: (
$for(keywords)$
"$it$",
$endfor$
),
$endif$
$if(jel-codes)$
jel-codes: (
$for(jel-codes)$
"$it$",
$endfor$
),
$endif$
$if(mainfont)$
mainfont: "$mainfont$",
$endif$
doc,
) |
https://github.com/UM-nerds/modern-report-umfds | https://raw.githubusercontent.com/UM-nerds/modern-report-umfds/main/README.md | markdown | MIT License | # modern-report-umfds
A template for writing reports for the Faculty of Sciences of the University of Montpellier.
Basic usage:
```typst
#import "@preview/modern-report-umfds:0.1.1": umfds
#show: umfds.with(
title: [Your report title],
authors: (
"Author 1",
"Author 2",
"Author 3",
"Author 4"
),
date: datetime.today().display("[day] [month repr:long] [year]"), // or any string
img: image("cover.png"), // optional
abstract: [
Your abstract, optional
],
bibliography: bibliography("refs.bib", full: true), // optional
lang: "en", // or "fr"
)
// Your report content
```
|
https://github.com/ekmanib/curriculum-vitae | https://raw.githubusercontent.com/ekmanib/curriculum-vitae/main/docs/experience.typ | typst | #text(font: "Jost", size: 16pt)[
Experiencia
]
#text(stroke: 0.5pt + rgb("a60707"))[
_Data Steward, <NAME> (Jun 2024 - Presente)_
]
Gestionar el gobierno de datos, incluyendo la integridad de datos, fuentes únicas de información, soluciones tecnológicas, ciclo de vida del dato, controles e implementación de acciones correctivas. Asegurar la calidad, consistencia y disponibilidad de la información, conforme a políticas, procedimientos y normativas.
#text(stroke: 0.5pt + rgb("a60707"))[
_Trainee, <NAME> (Nov 2023 - May 2024)_
]
Brindé soporte en la implementación y mantenimiento del sistema de gestión de datos en la entidad. Me involucré en proyectos para automarizar tareas y visualizar y comunicar la labor e impacto de la sección de Gobierno de Datos.
#text(stroke: 0.5pt + rgb("a60707"))[
_Asistente de Investigación, USFQ Data Hub (Ene 2022 - Ago 2023)_
]
Realicé análisis estadísticos de datos de diversa índole para investigación y entendimiento de datos que pudieran ser útiles para el propósito del Data Hub.
Escribí programas en Python para obtener datos de diversas fuentes, limpiarlos y traerlos a los repositorios mantenidos por el Data Hub. Brindé soporte en consultorías del Data Hub. |
|
https://github.com/Error0229/- | https://raw.githubusercontent.com/Error0229/-/main/__%20.%20_%20.%20_/🧉.typ | typst | The Unlicense | #align(center, text(16pt)[
*Matrix Algebra and Its Applications*\
*Problem Set Before Quiz 2*
])
|
https://github.com/jemus42/typst-slides-bips | https://raw.githubusercontent.com/jemus42/typst-slides-bips/main/main.typ | typst | MIT License | #import "bips.typ": *
#show: bips-theme.with(
aspect-ratio: "4-3",
author_corresponding: (
name: [<NAME>],
email: link("mailto:<EMAIL>")[<EMAIL>]
),
lang: "german",
//logo: "logo.png"
)
#title-slide(
title: "An impressive display of confusion in a 4D manifold",
subtitle: "An exercise in futility",
//author: "<NAME>",
institute: [Institute of Impressive Demos],
//date: [],
occasion: "Conference of Things and Stuff"
)
#polylux-slide({
set page(
paper: "presentation-4-3",
fill: bips-colors.white,
margin: (x: 10%, top: 0%, bottom: 8%)
)
[
Hello
]
})
#slide(title: "Fun for the whole family")[
Guess where I've been debugging the gradient line thingy.
#rect(width: 75%, height: 2%, fill: luma(150))
Here's some state:
- #locate(loc => {bips-author-main-email.at(loc)})
- #bips-lang.display()
- #locate(loc => {bips-logo.at(loc) == "bips-logo.png"})
- #bips-logo.display()
]
#slide(title: "A non-tight list: Doing things for the sake of it")[
- A variety of reasons are available
- Most of them kind of bad tbh
- An assortment of opportunities
- An abundance of alternatives
- A country mile of miscellany, only comparable to a non-imperial mile of metric proportions
- What's up with this list spacing
]
#slide(title: "A tight list: Doing things for the sake of it")[
- A variety of reasons are available
- Most of them kind of bad tbh
- An assortment of opportunities
- An abundance of alternatives
- A country mile of miscellany, only comparable to a non-imperial mile of metric proportions
- What's up with this list spacing
]
#slide(title: "A bit of math")[
$ hat(sigma)^2(X) = 1/(n - 1) sum_(i = 1)^n (macron(x) - x_i)^2 $
$ Y = X beta + epsilon quad | epsilon tilde.op cal(N)(0, sigma^2) $
$ hat(Y) = X hat(beta) $
$ hat(beta) = (X^top X)^(-1) X^top Y $
]
#slide(title: "An overlong title because people just can't have nice things")[
- #lorem(2)
- #lorem(6)
- #text(lorem(3), fill: red)
- #text(lorem(9), size: 42pt)
]
#slide(title: [Something with `code` I guess])[
```r
all_slide_check <- all_slide_check |>
dplyr::mutate(dplyr::across(dplyr::where(is.logical), \(x) {
dplyr::case_when(
x ~ "\u2705", # Green check symbol
!x ~ "\u274c", # Red X symbol
is.na(x) ~ ""
)
})) |>
dplyr::mutate(
# Insert red question mark emoji instead of red X for easier visual parsing maybe
compare_check = ifelse(grepl("dissimilar pages", compare_check_note), "\u2753", compare_check)
)
```
]
#slide(title: "Something with references")[
Hey you like trees? @ishwaran2008randomsurvival
//#cite("ishwaran2008randomsurvival", style: "alphanumerical")
The elastic net is given as
$ 1/n thin norm(hat(y)_i - y_i)_2^2 + lambda (alpha abs(beta_j) + (1-alpha)/2 beta_j^2) $ @zou2005regularizationvariable
This is another citation. @bender2005generatingsurvival
]
#thanks(thankstext: "Thank you for your attention!")[
// You can add additional text here
]
#slide-references(title: "References")[
]
//#hide(bibliography("references.bib"))
|
https://github.com/tiankaima/typst-notes | https://raw.githubusercontent.com/tiankaima/typst-notes/master/README.md | markdown | # Typst Notes
这里存放了部分使用 Typst 的笔记/幻灯片,目录如下:
| Term | Date | Title | GitHub | Google Docs |
| ---- | ---- | ----- | ----------- | ---------------- |
| 2024 Spring | 2024.05.14 | LUG 101 Ch 7 报告 | [GitHub](./b647c0-lug_101_ch7/) | [Google Docs](https://docs.google.com/viewer?url=https://github.com/tiankaima/typst-notes/releases/download/ci_latest/b647c0-lug_101_ch7.pdf) |
| | 2024.04.15 | 数学分析 B2 (24 SP) 讲义 (TBC) | [GitHub](./2bc0c8-2024_spring_TA/) | [Google Docs](https://docs.google.com/viewer?url=https://github.com/tiankaima/typst-notes/releases/download/ci_latest/2bc0c8-2024_spring_TA.pdf) |
| | 2024.03.18 | 人工智能基础 作业 | [GitHub](./ea2724-ai_hw/) | [Google Docs](https://docs.google.com/viewer?url=https://github.com/tiankaima/typst-notes/releases/download/ci_latest/ea2724-ai_hw.pdf) |
| | 2024.03.16 | 算法基础 作业 | [GitHub](./7e1810-algo_hw/) | [Google Docs](https://docs.google.com/viewer?url=https://github.com/tiankaima/typst-notes/releases/download/ci_latest/7e1810-algo_hw.pdf) |
| | 2024.03.07 | 计算机图形学 作业 1 报告 | [GitHub](./1cc213-cg_hw1_report/) | [Google Docs](https://docs.google.com/viewer?url=https://github.com/tiankaima/typst-notes/releases/download/ci_latest/1cc213-cg_hw1_report.pdf) |
| 2023 Fall | 2024.01.12 | 符号计算软件 课程报告 | [GitHub](./1e67fb-mma_final_report/) | [Google Docs](https://docs.google.com/viewer?url=https://github.com/tiankaima/typst-notes/releases/download/ci_latest/1e67fb-mma_final_report.pdf) |
| | 2024.01.12 | 数学分析 期中考试 | [GitHub](./eda4a9-math_analysis_mid_2023/) | [Google Docs](https://docs.google.com/viewer?url=https://github.com/tiankaima/typst-notes/releases/download/ci_latest/eda4a9-math_analysis_mid_2023.pdf) |
| | 2023.09.12 | 数学分析 B1 (23 FA) 讲义 (部分,未完成) | [GitHub](./feebf7-2023_fall_TA/) | [Google Docs](https://docs.google.com/viewer?url=https://github.com/tiankaima/typst-notes/releases/download/ci_latest/feebf7-2023_fall_TA.pdf) |
| | 2023.09.28 | 运筹学 作业 | [GitHub](./333aba-optimization/) | [Google Docs](https://docs.google.com/viewer?url=https://github.com/tiankaima/typst-notes/releases/download/ci_latest/333aba-optimization.pdf) |
| 2023 Summer | 2023.08.07 | 数学前沿课程 报告 (Sobolev 不等式) | [GitHub](./b298e5-sobolev/) | [Google Docs](https://docs.google.com/viewer?url=https://github.com/tiankaima/typst-notes/releases/download/ci_latest/b298e5-sobolev.pdf) |
| | 2023.08.02 | 测试文件 | [GitHub](./1a79a4-example/) | [Google Docs](https://docs.google.com/viewer?url=https://github.com/tiankaima/typst-notes/releases/download/ci_latest/1a79a4-example.pdf) |
|
|
https://github.com/GYPpro/DS-Course-Report | https://raw.githubusercontent.com/GYPpro/DS-Course-Report/main/Rep/11.typ | typst | #import "@preview/tablex:0.0.6": tablex, hlinex, vlinex, colspanx, rowspanx
#import "@preview/codelst:2.0.1": sourcecode
// Display inline code in a small box
// that retains the correct baseline.
#set text(font:("Times New Roman","Source Han Serif SC"))
#show raw.where(block: false): box.with(
fill: luma(230),
inset: (x: 3pt, y: 0pt),
outset: (y: 3pt),
radius: 2pt,
)
#show raw: set text(
font: ("consolas", "Source Han Serif SC")
)
#set page(
paper: "a4",
)
#set text(
font:("Times New Roman","Source Han Serif SC"),
style:"normal",
weight: "regular",
size: 13pt,
)
#let nxtIdx(name) = box[ #counter(name).step()#counter(name).display()]
#set math.equation(numbering: "(1)")
#show raw.where(block: true): block.with(
fill: luma(240),
inset: 10pt,
radius: 4pt,
)
#set math.equation(numbering: "(1)")
#set page(
paper:"a4",
number-align: right,
margin: (x:2.54cm,y:4cm),
header: [
#set text(
size: 25pt,
font: "KaiTi",
)
#align(
bottom + center,
[ #strong[暨南大学本科实验报告专用纸(附页)] ]
)
#line(start: (0pt,-5pt),end:(453pt,-5pt))
]
)
/*----*/
= 基于R-BTree实现`map`
\
#text(
font:"KaiTi",
size: 15pt
)[
课程名称#underline[#text(" 数据结构 ")]成绩评定#underline[#text(" ")]\
实验项目名称#underline[#text(" ") 基于R-BTree实现`map` #text(" ")]指导老师#underline[#text(" 干晓聪 ")]\
实验项目编号#underline[#text(" 11 ")]实验项目类型#underline[#text(" 设计性 ")]实验地点#underline[#text(" 数学系机房 ")]\
学生姓名#underline[#text(" 郭彦培 ")]学号#underline[#text(" 2022101149 ")]\
学院#underline[#text(" 信息科学技术学院 ")]系#underline[#text(" 数学系 ")]专业#underline[#text(" 信息管理与信息系统 ")]\
实验时间#underline[#text(" 2024年6月13日上午 ")]#text("~")#underline[#text(" 2024年7月13日中午 ")]\
]
#set heading(
numbering: "1.1."
)
= 实验目的
基于R-BTree实现`map`
= 实验环境
计算机:PC X64
操作系统:Windows + Ubuntu20.0LTS
编程语言:C++:GCC std20
IDE:Visual Studio Code
= 程序原理
`map`维护一个$SS arrow.r RR$的映射,对于$RR$的规模$n$保证:
总体空间复杂度$OO(log_2 n)$,访问时间复杂度$OO(log_2 n)$,插入删除复杂度$OO(log_2 n)$。
在代码中,每个映射体现为`std::pair<KEY_TYPE,VALUE_TYPE>`
在`RB_Tree`的基础上,在每个节点上添加数据项`VALUE`,并且对应的修改泛型系统。
额外实现一个基于节点推断后续节点的函数,以提供对迭代器的支持,具体实现见代码。
#pagebreak()
= 程序代码
== `map.hpp`
#sourcecode[```cpp
#ifndef RBTREE_MAP_HPP
#define RBTREE_MAP_HPP
#ifdef __PRIVATE_DEBUGE
#include <iostream>
#endif
#include <vector>
#include <stdlib.h>
#include "Dev\02\myVector.h"
using std::vector;
namespace myDS
{
template <typename KEY,typename VALUE>
class map{
private:
// using int size_t;
enum COLOR {RED,BLACK};
protected:
//节点类
class Node{
public:
KEY key;
VALUE value;
COLOR color;
Node *leftSubTree, //左子树根节点指针
*rightSubTree, //右子树根节点指针
*parent; //父节点指针
explicit Node() : //构造函数
key(KEY()),
color(COLOR::RED),
leftSubTree(nullptr),
rightSubTree(nullptr),
parent(nullptr),
value(VALUE()) { };
//获取父节点指针
inline Node * getParent() {
return parent;
}
//获取祖父节点指针
inline Node * getGrandParent() {
if(parent == nullptr) return nullptr;
else return parent->parent;
}
//获取叔叔节点指针
inline Node * getUncle() {
Node* __gp = this->getGrandParent();
if(__gp == nullptr) return nullptr;
else if(parent == __gp->rightSubTree) return __gp->leftSubTree;
else return __gp->rightSubTree;
}
//获取兄弟节点指针
inline Node * getSibling(){
if(parent == nullptr) return nullptr;
else if(parent->leftSubTree == this) return parent->rightSubTree;
else return parent->leftSubTree;
}
};
class iterator{
friend map;
protected:
Node * ptr;
Node * NIL;
void loop2Begin() {
if(ptr == NIL){ptr = nullptr;return;}
while(ptr->leftSubTree != NIL) ptr = ptr->leftSubTree;
}
void loop2End() {
if(ptr == NIL){ptr = nullptr;return;}
if(ptr->parent == nullptr){ ptr = nullptr;return;}
while(ptr->parent->leftSubTree != ptr) {
ptr = ptr->parent;
if(ptr->parent == nullptr){ ptr = nullptr;return;}
}
ptr = ptr->parent;
}
void getNextNode() {
if(ptr->rightSubTree != NIL){
ptr = ptr->rightSubTree;
loop2Begin();
} else {
loop2End();
}
}
public:
iterator(Node * _ptr,Node * _NIL) {
ptr = _ptr;
NIL = _NIL;
}
const std::pair<KEY,VALUE> operator*()
{
return {ptr->key,ptr->value};
}
KEY *operator->() //?
{
return ptr;
}
myDS::map<KEY,VALUE>::iterator operator++() {
auto old = *this;
getNextNode();
return old;
}
myDS::map<KEY,VALUE>::iterator operator++(int) {
getNextNode();
return (*this);
}
bool operator==( myDS::map<KEY,VALUE>::iterator _b) {
return ptr == _b.ptr;
}
bool operator!=( myDS::map<KEY,VALUE>::iterator _b) {
return ptr != _b.ptr;
}
};
//树结构
Node *root, *NIL;
public:
map() {
NIL = new Node();
NIL->color = COLOR::BLACK;
root = nullptr;
};
~map(){
auto DeleteSubTree = [&](auto self,Node *p) -> void{
if(p == nullptr || p == NIL) return;
self(self,p->leftSubTree);
self(self,p->rightSubTree);
delete p;
return;
};
if(!(root == nullptr)) DeleteSubTree(DeleteSubTree,root);
delete NIL;
}
void insert(KEY key) {
if(root == nullptr) {
root = new Node();
root->color = COLOR::BLACK;
root->leftSubTree = NIL;
root->rightSubTree = NIL;
root->key = key;
} else {
if(this->locate(key,root)) return;
subInsert(root,key);
}
}
void insert(KEY key,VALUE value) {
if(root == nullptr) {
root = new Node();
root->color = COLOR::BLACK;
root->leftSubTree = NIL;
root->rightSubTree = NIL;
root->key = key;
root->value = value;
} else {
if(this->locate(key,root)) return;
insert(key);
(*this)[key] = value;
}
}
myDS::map<KEY,VALUE>::iterator find(KEY tar) {
if(this->locate(tar,root) != nullptr) return myDS::map<KEY,VALUE>::iterator(this->locate(tar,root));
else return this->end();
}
bool erase(KEY key) {
return subDelete(root,key);
}
myDS::map<KEY,VALUE>::iterator begin(){
auto rt = iterator(root,NIL);
rt.loop2Begin();
return rt;
}
myDS::map<KEY,VALUE>::iterator end(){
return iterator(nullptr,NIL);
}
VALUE & operator[] (std::size_t key) {
if(root == nullptr) {
root = new Node();
root->color = COLOR::BLACK;
root->leftSubTree = NIL;
root->rightSubTree = NIL;
root->key = key;
return locate(key,root)->value;
} else {
if(locate(key,root) == nullptr) this->insert(key);
return locate(key,root)->value;
}
}
#ifdef __PRIVATE_DEBUGE
void printDfsOrder()
{
auto dfs = [&](auto self,Node * p ) -> void {
if(p == nullptr){ std::cout << "ED\n";return;}
if(p->leftSubTree == nullptr && p->rightSubTree == nullptr) {std::cout << "[NIL] \n";return;}
std::cout << "["<< p->key << " : " << p->value << "] ";
self(self,p->leftSubTree);
self(self,p->rightSubTree);
return;
};
dfs(dfs,root);
}
vector<int> printList;
void printIterOrder()
{
auto dfs = [&](auto self,Node * p) -> void{
if(p->leftSubTree == nullptr && p->rightSubTree == nullptr) {std::cout << "[NIL] \n";return;}
self(self,p->leftSubTree);
std::cout << "["<< p->key << " : " << p->value << "] ";
self(self,p->rightSubTree);
};
dfs(dfs,root);
}
#endif
private:
Node * locate(KEY t,Node * p) {
if(p == NIL) return nullptr;
else if(p->key == t) return p;
else if(p->key > t) return locate(t,p->leftSubTree);
else return locate(t,p->rightSubTree);
}
//右旋某个节点
void rotateRight(Node *p)
{
Node * _gp = p->getGrandParent();
Node * _pa = p->getParent();
Node * _rotY = p->rightSubTree;
_pa->leftSubTree = _rotY;
if(_rotY != NIL) _rotY->parent = _pa;
p->rightSubTree = _pa;
_pa->parent = p;
if(root == _pa) root = p;
p->parent = _gp;
if(_gp != nullptr) if(_gp->leftSubTree == _pa) _gp->leftSubTree = p;
else _gp->rightSubTree = p;
return;
}
//左旋某个节点
void rotateLeft(Node *p)
{
if(p->parent == nullptr){
root = p;
return;
}
Node *_gp = p->getGrandParent();
Node *_pa = p->parent;
Node *_rotX = p->leftSubTree;
#ifdef __DETIL_DEBUG_OUTPUT
printIterOrder();
#endif
_pa->rightSubTree = _rotX;
#ifdef __DETIL_DEBUG_OUTPUT
printIterOrder();
#endif
if(_rotX != NIL)
_rotX->parent = _pa;
#ifdef __DETIL_DEBUG_OUTPUT
printIterOrder();
#endif
p->leftSubTree = _pa;
#ifdef __DETIL_DEBUG_OUTPUT
printIterOrder();
#endif
_pa->parent = p;
#ifdef __DETIL_DEBUG_OUTPUT
printIterOrder();
#endif
if(root == _pa)
root = p;
p->parent = _gp;
#ifdef __DETIL_DEBUG_OUTPUT
printIterOrder();
#endif
if(_gp != nullptr){
if(_gp->leftSubTree == _pa)
_gp->leftSubTree = p;
else
_gp->rightSubTree = p; //?!
}
#ifdef __DETIL_DEBUG_OUTPUT
printIterOrder();
#endif
}
//插入节点递归部分
void subInsert(Node *p,KEY key)
{
if(p->key >= key){ //1 2
if(p->leftSubTree != NIL) //3
subInsert(p->leftSubTree, key);
else {
Node *tmp = new Node();//3
tmp->key = key;
tmp->leftSubTree = tmp->rightSubTree = NIL;
tmp->parent = p;
p->leftSubTree = tmp;
resetStatus_forInsert(tmp);
}
} else {
if(p->rightSubTree != NIL) //1 2
subInsert(p->rightSubTree, key);
else {
Node *tmp = new Node();
tmp->key = key;
tmp->leftSubTree = tmp->rightSubTree = NIL;
tmp->parent = p;
p->rightSubTree = tmp;
resetStatus_forInsert(tmp);
}
}
}
//插入后的平衡维护
void resetStatus_forInsert(Node *p) {
//case 1:
if(p->parent == nullptr){
root = p;
p->color = COLOR::BLACK;
return;
}
//case 2-6:
if(p->parent->color == COLOR::RED){
//case 2: pass
if(p->getUncle()->color == COLOR::RED) {
p->parent->color = p->getUncle()->color = COLOR::BLACK;
p->getGrandParent()->color = COLOR::RED;
resetStatus_forInsert(p->getGrandParent());
} else {
if(p->parent->rightSubTree == p && p->getGrandParent()->leftSubTree == p->parent) {
//case 3:
rotateLeft(p);
p->color = COLOR::BLACK;
p->parent->color = COLOR::RED;
rotateRight(p);
} else if(p->parent->leftSubTree == p && p->getGrandParent()->rightSubTree == p->parent) { //this
//case 4:
rotateRight(p);
p->color = COLOR::BLACK;
p->parent->color = COLOR::RED;
rotateLeft(p);
} else if(p->parent->leftSubTree == p && p->getGrandParent()->leftSubTree == p->parent) {
//case 5:
p->parent->color = COLOR::BLACK;
p->getGrandParent()->color = COLOR::RED;
rotateRight(p->parent);
} else if(p->parent->rightSubTree == p && p->getGrandParent()->rightSubTree == p->parent) {
//case 6: BUG HERE
p->parent->color = COLOR::BLACK;
p->getGrandParent()->color = COLOR::RED;
rotateLeft(p->parent);
}
}
}
}
//删除时的递归部分
bool subDelete(Node *p, KEY key){
//获取最接近叶节点的儿子
auto getLowwestChild = [&](auto self,Node *p) -> Node*{
if(p->leftSubTree == NIL) return p;
return self(self,p->leftSubTree);
};
if(p->key > key){
if(p->leftSubTree == NIL){
return false;
}
return subDelete(p->leftSubTree, key);
} else if(p->key < key){
if(p->rightSubTree == NIL){
return false;
}
return subDelete(p->rightSubTree, key);
} else if(p->key == key){
if(p->rightSubTree == NIL){
deleteChild(p);
return true;
}
Node *smallChild = getLowwestChild(getLowwestChild,p->rightSubTree);
std::swap(p->key, smallChild->key);
std::swap(p->value,smallChild->value);
deleteChild(smallChild);
return true;
}else{
return false;
}
}
// //删除入口
// bool deleteChild(Node *p, int key){
// if(p->value > key){
// if(p->leftSubTree == NIL){
// return false;
// }
// return deleteChild(p->leftSubTree, key);
// } else if(p->value < key){
// if(p->rightSubTree == NIL){
// return false;
// }
// return deleteChild(p->rightSubTree, key);
// } else if(p->value == key){
// if(p->rightSubTree == NIL){
// delete_one_child (p);
// return true;
// }
// Node *smallest = getSmallestChild(p->rightTree);
// swap(p->value, smallest->value);
// delete_one_child (smallest);
// return true;
// }else{
// return false;
// }
// }
//删除处理:删除某个儿子
void deleteChild(Node *p){
Node *child = p->leftSubTree == NIL ? p->rightSubTree : p->leftSubTree;
if(p->parent == nullptr && p->leftSubTree == NIL && p->rightSubTree == NIL){
p = nullptr;
root = p;
return;
}
if(p->parent == nullptr){
delete p;
child->parent = nullptr;
root = child;
root->color = COLOR::BLACK;
return;
}
if(p->parent->leftSubTree == p) p->parent->leftSubTree = child;
else p->parent->rightSubTree = child;
child->parent = p->parent;
if(p->color == COLOR::BLACK){
if(child->color == COLOR::RED){
child->color = COLOR::BLACK;
} else
resetStatus_forDelete(child);
}
delete p;
}
//删除后的平衡维护
void resetStatus_forDelete(Node *p){
if(p->parent == nullptr){
//case 0-0:
p->color = COLOR::BLACK;
return;
}
if(p->getSibling()->color == COLOR::RED) {
//case 0-1:
p->parent->color = COLOR::RED;
p->getSibling()->color = COLOR::BLACK;
if(p == p->parent->leftSubTree) rotateLeft(p->parent);
else rotateRight(p->parent);
}
if( p->parent->color == COLOR::BLACK &&
p->getSibling()->color == COLOR::BLACK &&
p->getSibling()->leftSubTree->color == COLOR::BLACK &&
p->getSibling()->rightSubTree->color == COLOR::BLACK) {
//case 1-1:
p->getSibling()->color = COLOR::RED;
resetStatus_forDelete(p->parent);
} else if(p->parent->color == COLOR::RED && p->getSibling()->color == COLOR::BLACK&& p->getSibling()->leftSubTree->color == COLOR::BLACK && p->getSibling()->rightSubTree->color == COLOR::BLACK) {
//case 1-2:
p->getSibling()->color = COLOR::RED;
p->parent->color = COLOR::BLACK;
} else {
if(p->getSibling()->color == COLOR::BLACK) {
if(p == p->parent->leftSubTree && p->getSibling()->leftSubTree->color == COLOR::RED && p->getSibling()->rightSubTree->color == COLOR::BLACK) {
//case 1-3:
p->getSibling()->color = COLOR::RED;
p->getSibling()->leftSubTree->color = COLOR::BLACK;
rotateRight(p->getSibling()->leftSubTree);
} else if(p == p->parent->rightSubTree && p->getSibling()->leftSubTree->color == COLOR::BLACK && p->getSibling()->rightSubTree->color == COLOR::RED) {
//case 1-4:
p->getSibling()->color = COLOR::RED;
p->getSibling()->rightSubTree->color = COLOR::BLACK;
rotateLeft(p->getSibling()->rightSubTree);
}
}
p->getSibling()->color = p->parent->color;
p->parent->color = COLOR::BLACK;
//case 1-5:
if(p == p->parent->leftSubTree){
//case 0-3
p->getSibling()->rightSubTree->color = COLOR::BLACK;
rotateLeft(p->getSibling());
} else {
//case 0-4
p->getSibling()->leftSubTree->color = COLOR::BLACK;
rotateRight(p->getSibling());
}
}
}
};
} // namespace myDS
#endif
```]
== `_PRIV_TEST.cpp`
#sourcecode[```cpp
#include <iostream>
#define __PRIVATE_DEBUGE
#include <Dev\11\map.hpp>
using namespace std;
int main()
{
myDS::map<int,int> testMP;
while(1)
{
cout << ">>>";
string s;
cin >> s;
if(s == "im") {
int t;
cin >> t;
testMP.insert(t);
} else if(s == "is") {
int t,v;
cin >> t >> v;
testMP.insert(t,v);
} else if(s == "p") {
std::cout << "===DFS Order===\n";
testMP.printDfsOrder();
std::cout << "===Iter Order===\n";
testMP.printIterOrder();
for(auto x:testMP) cout << "[" << x.first << " " << x.second << "] ";
cout << "\n";
} else if(s == "d") {
int t;
cin >> t;
cout << testMP.erase(t) << "\n";
} else if(s == "f") {
int t;
cin >> t;
cout << testMP[t] << "\n";
} else if(s == "m") {
int t,v;
cin >> t >> v;
testMP[t] = v;
}
}
}
```]
= 测试数据与运行结果
运行上述`_PRIV_TEST.cpp`测试代码中的正确性测试模块,得到以下内容:
```
>>>is 1 3
>>>is 2 5
>>>is 3 7
>>>im 4
>>>p
===DFS Order===
[2 : 5] [1 : 3] [NIL]
[NIL]
[3 : 7] [NIL]
[4 : 0] [NIL]
[NIL]
===Iter Order===
[NIL]
[1 : 3] [NIL]
[2 : 5] [NIL]
[3 : 7] [NIL]
[4 : 0] [NIL]
[1 3] [2 5] [3 7] [4 0]
>>>f 2
5
>>>m 2 1145
>>>p
===DFS Order===
[2 : 1145] [1 : 3] [NIL]
[NIL]
[3 : 7] [NIL]
[4 : 0] [NIL]
[NIL]
===Iter Order===
[NIL]
[1 : 3] [NIL]
[2 : 1145] [NIL]
[3 : 7] [NIL]
[4 : 0] [NIL]
[1 3] [2 1145] [3 7] [4 0]
>>>d 2
1
>>>p
===DFS Order===
[3 : 7] [1 : 3] [NIL]
[NIL]
[4 : 0] [NIL]
[NIL]
===Iter Order===
[NIL]
[1 : 3] [NIL]
[3 : 7] [NIL]
[4 : 0] [NIL]
[1 3] [3 7] [4 0]
```
可以看出,代码运行结果与预期相符,可以认为代码正确性无误。
|
|
https://github.com/RemiSaurel/miage-rapide-tp | https://raw.githubusercontent.com/RemiSaurel/miage-rapide-tp/main/0.1.0/template/main.typ | typst | #import "@preview/miage-rapide-tp:0.1.0": *
#show: doc => conf(
subtitle: "Rendu TP n°1",
authors: (
(
name: "<NAME>",
),
(
name: "<NAME>",
),
(
name: "<NAME>",
),
(
name: "<NAME>",
),
),
"L3 MIAGE - Base de données",
date: "05/09/2024",
doc
)
= Introduction
#lorem(10)
= TP
Une mini introduction pour le TP...
#question("La question 1 ?")
#remarque("Remarque personnalisée", bg-color: olive, text-color: white)
#question("Donne un exemple de code en python.")
Voici le code nécessaire pour afficher "Hello, World!" en Python :
#code-block("print('Hello, World!')", "py", title: "HelloWorld en Python")
#question("Une question sans numéro !", counter: false)
#remarque("La remarque par défaut est très sobre.")
#question("Passer du code via un fichier ?")
#code-block(read("code/main.py"), "py")
#code-block(read("code/example.sql"), "sql", title: "Classic SQL")
#question("Une autre question ?")
$ A = pi r^2 $
$ "area" = pi dot "radius"^2 $
$ cal(A) :=
{ x in RR | x "is natural" } $
#let x = 5
$ #x < 17 $
#question("Des matrices ?")
$ mat(
1, 2, ..., 10;
2, 2, ..., 10;
dots.v, dots.v, dots.down, dots.v;
10, 10, ..., 10;
) $
#question("Du code inline !")
What is ```rust fn main()``` in Rust
would be ```c int main()``` in C
#question("Un tableau ?")
#table(
columns: (1fr, 1fr, 1fr),
inset: 10pt,
align: horizon,
table.header(
[], [*Area*], [*Parameters*],
),
"Une cellule",
$ pi h (D^2 - d^2) / 4 $,
[
$h$: height \
$D$: outer radius \
$d$: inner radius
],
"Une autre cellule",
$ sqrt(2) / 12 a^3 $,
[$a$: edge length]
)
= Conclusion
#lorem(10)
|
|
https://github.com/MrToWy/Bachelorarbeit | https://raw.githubusercontent.com/MrToWy/Bachelorarbeit/master/Code/relationPrisma.typ | typst | ```prisma
model TranslationKey {
id Int @id @default(autoincrement())
translations Translation[]
faculties Faculty[]
}
``` |
|
https://github.com/7sDream/fonts-and-layout-zhCN | https://raw.githubusercontent.com/7sDream/fonts-and-layout-zhCN/master/chapters/01-history/mm-variable.typ | typst | Other | #import "/template/template.typ": web-page-template
#import "/template/components.typ": note, title-ref
#import "/lib/glossary.typ": tr
#show: web-page-template
// ## Multiple Masters and Variable fonts
== #tr[multiple master]和#tr[variable font]
// In 1540, <NAME> released the first *typeface family* - his Double Pica included two alphabets, one upright Roman and one italic. Around four hundred years later, the concept of a "related bold" was added to the typeface family idea.[^13] Users of type now expect to be able to select roman, bold, italic, and bold italic forms of Latin fonts, but more to the point, Latin script users now use both *speed* (italic) and *weight* to create typographic differentiation and establish hierarchy. Not long after, in 1957, <NAME>'s Univers was designed based on a typographic system of nine weights, five widths, and a choice of regular and oblique - a potential 90-member family, although in practice far fewer cuts of Univers were actually designed.
1540 年,<NAME> 发布了第一个*#tr[typeface family]*——他的Double Pica包含两套字母,一套是直立的罗马体、另一套是意大利体。大约四百年后,“相关粗体”的概念被添加到#tr[typeface family]中@Tracy.LettersCredit.1986[65-66]。如今,字体用户希望能选择拉丁字体的罗马体、粗体、意大利体和粗意大利体形式。更重要的是,拉丁字母的使用者们往往会同时使用*速度*(意大利体)和*重量*来展现版面差异和构建层次。在不久之后的1957年,Adrian Frutiger设计了Univers字体,它包含9个字重、5种宽度以及直立倾斜的变化,是一个共有90个成员的家族,尽管实际上只有其中的一小部分完成了设计。
// But what if nine weights is not enough? More realistically, what if the designer has only provided a regular and a related bold, and you need something in the middle? The one development Adobe attempted to make to their Type 1 PostScript font format in 1991 was the idea of *multiple masters* which aimed to solve this problem: the font would contain two or more sets of outlines, and the user could "blend" their own font from some proportion of the two. They could mix 3 parts the regular weight to 1 part bold weight to create a sort of hemi-semi-bold.
但如果九个字重还不够怎么办?更现实的是,如果设计师只提供了常规字体和对应的粗体,而你恰好需要它们之间的某个粗细又该怎么办?Adobe在1991年尝试为PostScript Type 1字体格式开发了*#tr[multiple master]*的构想(@figure:MM),其目的就是为了解决这个问题。该字体包含两套或更多的#tr[outline],用户按照一定比例进行“混合”,就可以得到自己想要的字体。比如可以把3份常规字重与1份粗体混合,得到一种1/4粗体。
#figure(caption: [
// > Adobe Myriad MM, with width (left to right) and weight (top to bottom) masters
Adobe Myriad MM,带有宽度(从左到右)和字重(从上到下)#tr[master]。
])[#image("MM.png")] <figure:MM>
// It was a great idea; the designers were excited; technologically, it was a triumph. Adobe worked hard to promote the technology, redesigning old families as MM fonts. But it turned out to be way ahead of its time. For one thing, very few applications provided support for accessing the masters and generating the intermediate fonts (called "instances"). For another, handling the instances was a mess. "Users were forced to generate instances for each variation of a font they wanted to try, resulting in a hard drive littered with font files bearing such arcane names as `MinioMM_578 BD 465 CN 11 OP`."[^14]
这是一个好主意,设计师们兴奋不已。从技术上讲,这也是一次胜利。 Adobe努力推广该技术,将之前的#tr[typeface family]重新设计为#tr[multiple master]字体。但事实证明,这一技术过于超前。一方面,很少有应用程序支持访问#tr[master]或生成的中间字体(称为“#tr[instance]”);另一方面,处理这些#tr[instance]非常麻烦。“用户被迫为他们想要尝试的每种字体生成#tr[instance],导致硬盘上充斥着带有`MinioMM_578 BD 465 CN 11 OP`之类诡异名称的字体文件。”@Riggs.AdobeOriginals.2014
// Adobe Multiple Master Fonts, as a technology, ended up dying a quiet death. But the concept of designing fonts based on multiple masters (originally borrowed from the Ikarus system) became an established tool of digital type design. Instead of allowing the user the flexibility to create whatever instance combination they wanted, type designers would create multiple masters in their design - say, a regular and a black - and release a family by using interpolation to generate the semibold and bold family members.
作为一种技术,Adobe#tr[multiple master]字体最终悄无声息的死去了。 但是,基于#tr[multiple master]设计字体的理念(最初是从Ikarus系统借鉴来的)已成为数字字体设计的标配。字体设计师不再允许用户灵活地创建所需的#tr[instance]组合,而是在设计时创建多个#tr[master](如常规体和超粗体),然后插值生成半粗体和粗体等#tr[typeface family]成员。
// Another attempt at the dream of infinitely tweakable in-between fonts came from Apple, as part of their GX font program. As we mentioned above, Apple's extensions to TrueType included the ability to create instances of fonts based on variations of multiple masters. But the same thing happened again: while it was typographically exciting, application support never came through, as supporting the format would require extensive software rewrites. But this time, there would be a longer lasting impact; as we will see in [the section on OpenType Font Variations](opentype.md#OpenType Font Variations), the way that GX fonts implemented these variations has been brought into in the OpenType standard.
作为GX字体程序的一部分,Apple为实现无级可调中间字体的梦想尝试了另一种方式。前文也提到过,Apple对TrueType的扩展包括基于#tr[multiple master]之间的变化创建字体#tr[instance]的功能。然而,同样的事情又再次发生了:尽管#tr[typography]行业对其感到兴奋,但在应用层面却从未得到支持,因为支持这种格式需要对软件进行大规模的重构。但这次产生的影响更加持久,正如我们将在#title-ref(<heading:opentype.font-variation>, web-path: "/chapters/04-opentype/variation.typ", web-content: [OpenType可变字体])一节中看到的那样,GX字体实现这种变体的方式已被纳入了OpenType标准中。
// OpenType finally adopted variable fonts in 2016. We're still waiting to see how applications will support the technology, but this time the success of variable fonts doesn't depend on application support. There is another, more important factor behind the rise of variable fonts: bandwidth. With fonts increasingly being hosted on the web, variable font technology means that a regular and a bold can be served in a single transaction - a web site can use multiple fonts for only slightly more bytes, and only a few more milliseconds, than a single font.
在2016年,OpenType终于支持了#tr[variable font]。我们仍然期待应用程序能支持该技术,但这次#tr[variable font]的成功并不依赖应用程序的支持。#tr[variable font]的广泛使用还有另一个更重要的因素:带宽。随着字体越来越多地托管在网络上,#tr[variable font]技术意味着可以在一次请求中同时获取常规体和粗体——网站使用多种变体相对单个字体的额外开销,可能只是几字节几毫秒而已。
|
https://github.com/polarkac/MTG-Stories | https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/043%20-%20Innistrad%3A%20Midnight%20Hunt/003_Episode%202%3A%20The%20Motives%20of%20the%20Wolf.typ | typst | #import "@local/mtgstory:0.2.0": conf
#show: doc => conf(
"Episode 2: The Motives of the Wolf",
set_name: "Innistrad: Midnight Hunt",
story_date: datetime(day: 08, month: 09, year: 2021),
author: "<NAME>",
doc
)
"These woods belong to us," he told her. People said he didn't talk much, but he talked to her. Maybe it was because this was her first hunt. She was a wild mess of a girl then—streaked with dirt and blood and earth. Distantly, she thought to herself that she should start braiding her hair if this was going to keep happening.
"But what about Kessigers?" She felt compelled to ask.
Tovolar grunted.
He stared straight back at her, and she straight back at him. It only made sense to ask. She hugged her legs closer to her chest. "It's just—I think we can share."
#figure(image("003_Episode 2: The Motives of the Wolf/01.jpg", width: 100%), caption: [Tovolar, Dire Overlord | Art by: <NAME>], supplement: none, numbering: none)
How strange she must have looked, covered in blood, looking out toward the village to which she was too afraid to return. The village she was now defending. Tovolar had stayed with her after she changed back. She was glad for the company—the thought of being alone right now was worse than the thought of facing her family. Somehow, as bad as this was, it was easier to deal with knowing that she wasn't alone.
Tovolar was Kessig's own personal bogeyman. She'd heard about him all through the last four or five years, heard what he did, and a lot of things he didn't do. Whole herds of cattle slaughtered. Houses broken into and torn asunder. They said he killed vampires; they said he dabbled in dark magic; they said he was all sorts of things.
But in the morning, when she woke as she did, he had gotten her a blanket and sat quietly at her side. The man sitting next to her was all muscle and tooth, yet he made himself smaller to keep from frightening her. In his own quiet way, he explained what had happened.
The first thing she asked was if she'd killed anyone. He said, "Not tonight." And so, their conversation, such as it was, began. This was the first moment of truly uncomfortable silence.
But then he stood. He did not need to ask her to follow.
She simply did.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
She shifts before she knows what she's doing—dives into the woods near the witch and goes, her clothes dropped haphazardly along the way. The wolves don't wait for her. Streak's bounding in front of them all—but he chances to look back at her, and she nods to him.
The howl pierces the silence of the woods, the silence that is not silence, the silence that is the thousand teeming lives within. She knows it. She knows him.
And he, of course, knows that she's here.
She doesn't know why she expected any different.
She doesn't know what to expect when she catches up to him.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
"Hunting is who we are," he told her.
She didn't like this. There was something wrong with it—some dark magic in the air. In the early hours of the morning, they might see anyone and anything; surely, there would be hunters in the forest? Surely, there would be people—people from the village, even, who might see her with him and know what had happened to her?
"But if it was just hunting, people wouldn't be afraid," she said to him. "We don't have to kill #emph[people] ."
She'd seen the good reason, like any other Kessiger. People pulled bodies out of the woods every morning. You had to, especially after full moons. Werewolves were enough to deal with—no one wanted to add geists to Kessig's compounding problems. Hunters often visited her father in the smithy to seek new weapons. Sometimes they even spoke about what they saw—about the beasts bigger than two men stacked together, who tore through flesh as easily as the elder Kord tore through paper. Their weapons adorned the house and so, too, did all the holy symbols that didn't sell.
Her father said they would protect her. So did everyone else.
But Arlinn never found much comfort in the dour outlook of the village. With them, it was always about what she couldn't do—she couldn't go into the woods; she couldn't play her flute too loudly; she couldn't greet strangers or make new friends when travelers came through. Caution and the angel kept them safe, that was the thought, but they also kept her world small and boring.
#emph[We don't trust you. Go away] —that was what her village said to the world. Wasn't there room for more?
And when she heard the howl, she realized that there #emph[was] something more. It sounded so happy, so soothing, so~so like an old friend.
A life free of walls, free of holy symbols. A life free of fear and full of something #emph[else] .
Under cover of night, she left.
Tovolar glanced back at her. "That what you think?"
"Yes," she answered, with all her heart.
He shook his head and kept walking. She followed.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
Seeing things never felt the same after her first hunt. She hadn't realized how limited her human eyes were until she saw with the wolf's; hadn't realized the visual is truly only a small part of the world. She cannot see the grubs wriggling through the underbrush with her human eyes; she cannot smell blood in the air from miles away with her human nose; she cannot taste the sharp tang of the night with her human tongue.
But as a wolf, she can do all those things. And she knows that he's just up ahead. She catches his scent long before she can see him. So, too, the scent of the others around him—some familiar, and some decidedly not.
#emph[What have you gotten yourself into? ] She wonders.
When at last the trees break enough for her to catch sight of him, she skids to a halt. He is there, his eyes piercing as ever in the night, surrounded by huge wolves. Arlinn is by no means the runt of the litter, but these newcomers have arms thick as the trees around her. One's wearing a ship's chain as a bandolier. Isn't it early in the night for them to have changed?
Tovolar, flanked by his packmates, looks about the size of a human man. But he isn't. That much is clear as Arlinn makes her way to him, as his gruff face tries to smile for her. "You came home."
"I came to investigate," Arlinn says. Looking the newcomers up and down, she suppresses an instinctual growl. "Who are these guys?"
Tovolar stops near Redtooth. Arlinn's hackles rise.
He meets her eyes, then walks away.
He does not need to say follow me.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
Arlinn's stomach threatened to empty. A sweet, pungent miasma forced its way down Arlinn's throat. She knew precisely what lay ahead of them, and she wanted Tovolar to stop leading them. She wanted to stop following him.
But where would she go if she did? She was a wolf now, just like him. No matter what happened, there were good odds she'd end up rampaging if left to her own devices.
She couldn't just leave.
So, she followed, and when at last Tovolar pointed out the bodies to her, she did her best not to vomit. Her best wasn't very good. Three hunters torn apart like common animals, their ribs exposed to the brightening day, their faces locked in rictus terror. Crossbows and silver bolts scattered around them like pine needles. Blood-soaked symbols of Avacyn clutched in their hands. Everywhere she looked, there was something worse to see, and everywhere she looked, her stomach threatened to empty, until at last it did, and all the raw venison she'd enjoyed came up out of her.
Tovolar grunted. He set his hand on her shoulder then turned her to face the bodies again.
"Please," she stammered. "I don't want to look."
But he kept one hand on her shoulder. "You have to understand."
She sucked in a breath. "But why? What is there to~?"
He let go of her then, long enough to stride over to the bodies. What might have taken her three steps took him only one. Kneeling next to the bodies, he looked up at her again. "Last night, how did it feel?"
She swallowed. "Like being free. But it isn't worth—"
"Being free is worth whatever we pay for it," he answered. Standing, he kicked one of the bodies with the tip of his boot. "I'm tired of hiding."
And how strange it was that hiding was all Arlinn wanted to do.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
She smells them before she sees them.
More wolves. Plenty of them. They wear human forms now but that does not change what they are, does not change the hunger they feel, does not change them in the eyes of the villagers. They are wolves—and she is, too.
She sees them comparing armor pilfered from cathars; she sees them painting patterns on skin that will show just as well on fur; she sees them fighting like newborn pups. There are so many new faces and new scents that they leave her dizzy, shifting back to her human form as the horror of it starts setting in.
Because her eyes, of course, aren't telling her the whole story.
Those wolves don't smell like Mondronen. They're not part of Tovolar's pack. So why are they here? And the others—those who, like Tovolar's guards, stand head and shoulders above their rest, their faces seemingly caught mid-shift—who are they?
This is more than just a hunt.
#figure(image("003_Episode 2: The Motives of the Wolf/02.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none)
The howls coming to her ears tell most of it. As a child, she'd plug her ears to try to keep the sound away, but there's no hope of doing that now. Dozens of wolves all calling to each other in the night, maybe even a hundred voices proclaiming to each other: #emph[I'm with you, I will hunt.]
And that voice is lodged at the base of Arlinn's throat, too, as moonrise draws ever nearer. Already some of the more eager—like Tovolar's guards—have begun their transformations. The crack and pop of bone lend the distant howls asynchronous percussion.
Tovolar turns toward her. There is a smile on that face, there is pride in his eyes as he gestures widely to the wolves around them. As they walk farther in, he is greeted by howls so high Arlinn feels them on her skin—and by what used to be the Mondronen Howlpack's salute.
"Who are all of these people?" she asks him.
"Family," he answers. "Our new pack."
Arlinn frowns. "Not much of a family reunion to me. Looks more like you're getting ready for something."
His shoulders rise in a laugh he can't quite voice. The sound echoes. She knows that look. She knows she won't like the answer.
But she stays for it anyway.
"Getting ready to take what's ours," he says. Behind him two of the new wolves, already changed, tear down trees to serve as clubs. "Used to be just the woods. Now the nights are, too."
Streak nuzzles against him. Stopping their trip, Tovolar kneels to pet him. Boulder thwaps his head against Arlinn's shoulder, as if asking permission to join him. Arlinn swallows.
"Tovolar," she says, her voice dropping low, "just what are you hunting?"
Trees coming down. Wolves howling. A man with an obelisk slung over his shoulder. The air thick with the scent of hunger. Blood, too—someone's already killed. She can hear jaws tearing flesh asunder. It isn't far.
The moon's climbing higher and higher.
Tovolar touches the tip of Streak's nose, runs his hands over his ears. Streak never sits this well for her. He isn't moving at all, not even swishing his tail. Tovolar touches his forehead to Streak's, then points—and away the wolf goes, hungry as the night.
Arlinn's stomach sinks. It's only hunger. He'll be back. But she doesn't want to waste any more time. He stands again, towering over her, as always, looking about the gathering before looking back down at her.
"Whatever we want. Bloodsuckers, when we can find them. The Dires have a lot of fun making them beg."
"Dires?" She stares, but she already knows who he means—the wolves at his sides, the behemoths. "Hunting vampires is one thing, but you can't—"
A sharp grunt stops her, or perhaps the old reflexes attached to it. His brows narrow, his lips pull back from his teeth, and as the light falls on his face, his teeth grow longer.
"We can do whatever we want," he says. "I tried to teach you that."
More howls, closer now. Arlinn's heart hammers in her chest. She wants to hunt. She wants to run.
She plants her heels. "No, you can't. People have been living in these woods for generations; they've carved out lives for themselves. All they want is a life without fear, the same as us."
He draws up to her, eyes burning. "Too much church in you," he growls. "Too little wolf."
When he looks down on her, she is again standing in the wood with him, again staring at the bodies of the cathars, again afraid.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
When she returned that morning, her mother waited in the drawing room. The years wore heavy on her—but this night was heavier than most. The woman's shoulders slumped; great bags formed beneath her eyes. When she threw her arms around Arlinn's embrace they were small and weak.
"Where #emph[were ] you?" she creaked. "Arlinn, they found four of our boys down in the woods, torn right apart just like~"
And she could have told her then. She could have been honest.
But her eyes fell on one of the angel's symbols, shaped by her father's own hands, and she knew that she couldn't tell the truth.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
Arlinn isn't some young pup anymore. She isn't afraid anymore.
Moonlight makes it easier to shift. Her bones crack and rearrange, forge themselves into something at once new and old. Tovolar falls into relief before her.
He's smiling.
She hates that he's smiling.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
On the first hunt, she ran with Tovolar. On the second, Tovolar and three others. On the third, she ran with the pack.
Tearing through the forest, lost in the thrill of the hunt, all she wanted to do was sink her teeth into the sumptuous flesh of a deer. And she thought, foolishly, that she might even keep her mind long enough to drag it back to the village—to her father's smithy, maybe, where she could say that maybe one of the boys up the road had left it for them.
When your barn is full of mice, you get yourself a cat. When your woods are full of werewolves, you send out your best hunters. It's only natural.
She remembered seeing the deer. It looked up at her while lapping at a river, pelt white as the moon, eyes red as blood. She remembered jumping for it. She remembered the pain that followed, sudden and sharp, the breath knocked out of her, the crack of her back on the rough ground. She remembered looking down and seeing the bolt buried in her chest. She did not remember very much else except that in the morning, she awoke surrounded by the grisly remains of the kids who used to steal pies from her mother's window. Hunters, now—their crossbows just within reach.
Her mouth was slick with their blood.
She screamed, then. That was that.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
This is the only time she'll ever tower over him—when she's transformed and he hasn't. Now she's the one who snarls at him. The others gather around in a circle, some shifting from the excitement, some simply hungry for the taste of blood. Weapons and paws and feet beat against the earth: #emph[thump, thump, thump.]
She rounds on him, but he does not move.
"You want to hunt," he says.
And it's true that she does. To be among those like you is a dizzying feeling. These wolves know her, though she does not know them; they know the struggle of existing in a Plane like this. Innistrad wants them dead. Isn't it right to live despite that? Isn't it right to take their lives back, by force if they must?
It isn't. No matter how appealing it may seem, it isn't.
She has to stop him. If she strikes him down now, the struggle for who controls the hunt might delay things enough to get some kind of help.
Down comes the claw.
But before it can make contact, Boulder's in motion, jumping in front of him. Arlinn pulls back at the very last moment, her heart sinking into her stomach.
It only takes a moment of thought to figure out what's going on, only takes studying Boulder's friendly face turned at once hopeful and hungry.
Streak joins him. So does Redtooth. Only Patience remains at Arlinn's side—but even she's looking up at her expectantly.
They want to hunt.
Tovolar smirks. "Your pack understands."
One by one the wolves around them change. How many are there, already changed? How many stand on their haunches waiting for her to draw blood?
Patience waited for her every day, once. Now Arlinn is the one who lingers.
#figure(image("003_Episode 2: The Motives of the Wolf/03.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none)
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
There were symbols everywhere inside the church. In the mornings, when dawn's light first pierced the stained-glass windows, there were no shadows save those in holy shape. Arlinn treasured the dawn above all else. Each sunrise was a new victory against the beast within herself; each clean-handed morning a promise to her future self. The beast was gone.
Services began the moment the sun crested the Kessig hills. At first, she had not been permitted to hold them herself, but she attended every day with a feverish need for safety, as if the sight of the illuminated angel alone could bring her salvation.
Perhaps it could.
Or perhaps it was the people.
The same people at every service. The same people huddled around sacred texts. Barnaby always teasing her about being the first one into the cathedral—but becoming the second person soon after. Trusting herself enough to spend a night baking with Luciana, who swore she had better recipes but should have known better than to wager against a baker's daughter. <NAME>, always gently asking if there was anything else she'd like to confess and reassuring her when she lied to his face.
Safety and warmth. Good people. The morning light promised all of this and more, and for years it was enough. In time, she stopped worrying about what drove her here.
Until he showed up to morning services.
He didn't say anything. He didn't have to. The look of him was enough. The wild in him called to the wild in her: the scuffs of dirt on his borrowed armor, the smears of rusted red against the white and burnt yellow, the scents of fire and blood and pine. All he did was sit next to her. Didn't say a word.
But she knew with a dull, sinking horror what would come next.
Afterward, he left, and all her new friends asked what was wrong, and she told them that she didn't want to talk. She wanted to leave. Needed some time to herself. She'd be all right.
Arlinn locked herself in her room that night—pulled the curtains over the windows, wrapped her vestments tight, laid holy symbols wherever her eyes could find them.
But it was hard to see them in the dark.
Maybe that was why it happened.
Maybe that was why it wasn't enough.
But she'll never really know, not now, why it happened the way it did, or what unfathomable kindness drove Luciana to check on her.
She remembered the blood. She remembered the hunt. She remembered wanting to be anywhere but there.
And then, suddenly, she was.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
To relive history is to tear open a wound and hope it will heal differently.
#emph[He ] wants to hunt. Her wolves want to hunt. The pack wants to hunt.
She doesn't. And she must keep them safe as best she can.
Arlinn kneels. She strokes Patience's head, scratching that spot between her ears, and gives her a final embrace.
"Keep everyone safe," she says. Her muzzle's awkward in this form, the words don't make sense, but she hopes Patience knows what she means. A pat on the haunch serves as final permission. Arlinn stands, and Patience walks to him.
The gathered wolves holler and howl, each sound a dagger in Arlinn's heart.
Tovolar nods. "When you're ready for the new world, come find us."
He starts to shift. She doesn't stay to watch.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
She finds her way back to the witch. It isn't hard—she's got the scent now—but it does take some time, since she stops whenever she hears one of her wolves among the howlpack.
There are no pleasantries. She doesn't have time or energy for them.
"I'll get your key," she says.
If Katilda notices the wolves are gone, she says nothing about it—instead, she invites Arlinn into the warm light of the fire.
There are no wolves here.
But there are people, and there is something close to holy light, and for tonight, it will have to do.
#figure(image("003_Episode 2: The Motives of the Wolf/04.jpg", width: 100%), caption: [Dawnhart Wardens | Art by: <NAME>], supplement: none, numbering: none)
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
Morning light brings new friends.
For an ancient witch, Katilda is a popular one. At first light, she and her witches gather in the center of the camp. Magic pours from them in streams, scattering out into the air. Katilda tells her it's a calling, something to let the coven's chosen champions know it's time to gather.
Arlinn has a calling of her own, but it's not one the coven can see. While they're conducting theirs, she sneaks off to Ravnica. Nothing's ever simple there. To even get #emph[access ] to Jace's house, she needs to fill out three forms and swear two oaths—and in the end, he isn't even there. But that's fine enough—there's still friends to be had, and a legend as well.
Arlinn's heard of Teferi in passing—mostly of a plan he was cooking up with the others—but she wasn't expecting him to be so~approachable. Disarmingly so, even. He's the first one to greet her as she comes through the door. The easy smile counts for a lot—but so, too, does dealing with someone close to her own age.
Not that he's her age. He's much older. Almost unfathomably old. As he pours her a cup of tea she tries not to dwell on the implications.
"Take it you didn't just come here to keep me company, Arlinn," he says. "You look like you haven't slept."
"That obvious, huh?" she answers. The tea is good—smooth and full bodied, surprisingly so given how short the steeping time was. All the same, her mother's is better. She misses it.
"If you're going to ask if I can stretch out the night so you can rest up, the answer's no," he says. It's said with warmth, but Arlinn can't hide the flinch. Teferi leans forward. "Sorry, that seems like it hit close to home."
Arlinn doesn't bother beating around the bush. "The nights on Innistrad #emph[are ] getting longer, but that means no one's getting any rest. It's why I came. Something's coming—the wolves are~"
She can't bring herself to finish, doesn't even know where to start—but she doesn't have to. At least not for another few minutes. Someone emerges, stretching like a cat atop the stairs, someone who hops with excitement when she realizes there's a visitor. Chandra jumps the banister (and the stairs) just to get to them quicker.
"Arlinn!" she calls, plopping herself down at one of the tables next to them. "Hey, did you bring that recipe for—"
Maybe Arlinn #emph[does] look as dour as she feels—Chandra stops mid-sentence. Arlinn sighs. "I'm afraid it'll have to wait," she says. "As I was telling Teferi—"
But the door opens again, and another new face is staring back at her. A raised brow soon follows. "So, you're the one who used pencil on the ink-only forms?"
It's all so ridiculous, but it's ridiculous in the way that she needed.
It feels a bit like mornings with Barnaby and Luciana.
Arlinn allows herself to laugh, just this once, just to remember what it is she's fighting for.
Humans run in packs, too.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
They listen. She's grateful. The stranger's name is Kaya, and the idea of day and night falling out of balance upsets her in that quiet way that leads to a decisive change. They'll come. They'll help. But first, they need to meet Katilda's people.
When they reappear in the woods together, Arlinn knows immediately which way to go. She'll take the towering Kessig oaks over the cramped buildings of Ravnica any day—she never feels like she can breathe there.
Beneath the trees and the arcs of the Celestus, they walk back to the coven. Chandra looks up at the old artifact with pure wonder and curiosity. Arlinn envies it a little—but truth be told, she feels some of that wonder herself to this day.
By the time they arrive, there are a couple dozen new faces there, too. So many in one day—it's going to be hard to keep them all straight. But she'll learn. And she wants to. Because the three at her back know what she is, and not even one looks at her in fear.
Perhaps it will be the same for the gathered cathars and mages up ahead. No one Arlinn knows personally, but she knows all cathars and priests after a fashion—you wear someone's clothes long enough, you get an idea of their character. They stand in a throng centered on the witch: six or so cathars, a couple of priests, and the rest hardy Kessigers of no particular stripe. Standing the proudest among them is a dark-skinned woman in white armor, a light dust of snow on her shoulders. If you asked a child to describe the bravest cathar they knew, you'd get someone like her: the well-polished armor, the noble features, broad shoulders, and gentle eyes. She's listening as Katilda explains something—but both turn toward the approaching newcomers.
#figure(image("003_Episode 2: The Motives of the Wolf/05.jpg", width: 100%), caption: [Adeline, Resplendent Cathar | Art by: <NAME>], supplement: none, numbering: none)
"<NAME>, I take it?" calls the cathar. Her voice is rich and resonant—clearly, she's learned to project.
"The same," Arlinn answers. "These are my friends—Kaya, Teferi, and—"
"<NAME>," the pyromancer cuts in. "My name's Chandra. What's #emph[your ] name?"
The cathar smirks and chuckles. "Adeline's fine. It's nice to meet you, Arlinn, Kaya, Teferi, and <NAME>. Katilda says you're here to help with Harvesttide?"
Arlinn has the feeling Chandra would help with whatever it was Adeline asked of her, but they can't let their eyes stray too far from their goal here. "We're here to help find the key," Arlinn answers. "Festivals aren't much my thing, I'm afraid."
Kaya clears her throat behind her. "You didn't mention anything about a festival."
"Katilda thinks it's necessary," Arlinn answers.
"It is," says Katilda. Her voice somehow carries despite the small distance between them, and as the heroes rejoin the larger group, her eyes stay fixed to Arlinn's. "The ritual is a precise thing with little room for error. You cannot skip steps in ancient magic."
"It's a temperamental thing," echoes Teferi. "The older magic gets, the more set it is in its ways."
"He understands," says Katilda.
Arlinn doesn't have the energy to fight it when Teferi's already stepping up. "So, what do you need from us exactly? Arlinn told us about the ritual." He gestures to the Celestus pieces above them with his staff. "When we find the Moonsilver key, what's to be done with it?"
"You bring it to the center of the Celestus. Arlinn knows the way," she answers. "I will await you there with the coven. There, we join it with the Sungold lock and complete the ritual."
"And do you have any idea where we could find the key?" Kaya asks. "Any leads, any last known whereabouts?"
Katilda sighs. "No. It was taken from the Dawnheart Coven centuries ago."
"Right," says Kaya. "Then I guess we'd better start looking. Arlinn, do you have any ideas?"
She's never heard anything about a Moonsilver key before last night, and all she knows of the Celestus are old legends, but she is sure of one thing. "There's got to be something in Thraben. Might have been the church that took the key."
"And if that's the case, I'm sure it's safely hidden away," says Adeline. She nods. "To Thraben, then."
"Uh~are you sure Thraben's all that safe?" says Chandra. "Are you #emph[sure ] we have to go there again? Because last time didn't go so great, and it wasn't very safe at all." Adeline casts her a sidelong look, and Chandra quickly adds: "Not that I'm afraid."
Arlinn sighs. "I know what you mean—but the vaults should still be all right."
It's been some time since Arlinn last visited the cathedral.
She hopes it'll go better than it did then.
|
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/bamdone-aiaa/0.1.0/README.md | markdown | Apache License 2.0 | # bamdone-aiaa
This is a Typst template for a one-column paper from the proceedings of the American Institute of Aeronautics and Astronautics. The paper is tightly spaced, fits a lot of content and comes preconfigured for numeric citations from
BibLaTeX or Hayagriva files.
## Usage
You can use this template in the Typst web app by clicking "Start from template"
on the dashboard and searching for `bamdone-aiaa`.
Alternatively, you can use the CLI to kick this project off using the command
```
typst init @preview/bamdone-aiaa
```
Typst will create a new directory with all the files needed to get you started.
## Configuration
This template exports the `aiaa` function with the following named arguments:
- `title`: The paper's title as content.
- `authors-and-affiliations`: An array of author dictionaries and affiliation dictionaries.
Author dictionaries must have a `name` key and can have the keys `job`, `department`, `aiaa` is optional. Affiliation dictionaries must have the keys `institution`,`city`,`state`,`zip`, and `country`.
- `abstract`: The content of a brief summary of the paper or `none`. Appears at the top of the first column in boldface. Shall be `content`.
- `paper-size`: Defaults to `us-letter`. Specify a [paper size string](https://typst.app/docs/reference/layout/page/#parameters-paper) to change the page format.
- `bibliography`: The result of a call to the `bibliography` function or `none`.
Specifying this will configure numeric, AIAA-style citations.
The function also accepts a single, positional argument for the body of the
paper.
The template will initialize your package with a sample call to the `aiaa`
function in a show rule. If you want to change an existing project to use this
template, you can add a show rule like this at the top of your file:
```typ
#import "@preview/bamdone-aiaa:0.1.0": aiaa
#show: aiaa.with(
title: [A typesetting system to untangle the scientific writing process],
abstract: [
These instructions give you guidelines for preparing papers for AIAA Technical Papers. Use this document as a template if you are using Typst. Otherwise, use this document as an instruction set. Define all symbols used in the abstract. Do not cite references in the abstract. The footnote on the first page should list the Job Title and AIAA Member Grade for each author, if known. Authors do not have to be AIAA members.
],
authors: (
(
name:"<NAME>",
job:"Insert Job Title",
department:"Department Name",
aiaa:"and AIAA Member Grade (if any) for first author"
),
(
institution:"Business or Academic Affiliation's Full Name 1",
city:"City",
state:"State",
zip:"Zip Code",
country:"Country"
),
),
bibliography: bibliography("refs.bib"),
)
// Your content goes below.
``` |
https://github.com/frectonz/the-pg-book | https://raw.githubusercontent.com/frectonz/the-pg-book/main/book/099.%20highres.html.typ | typst | highres.html
The High-Res Society
December 2008For nearly all of history the success of a society was proportionate
to its ability to assemble large and disciplined organizations.
Those who bet on economies of scale generally won, which meant the
largest organizations were the most successful ones.Things have already changed so much that this is hard for us to
believe, but till just a few decades ago the largest organizations
tended to be the most progressive. An ambitious kid graduating
from college in 1960 wanted to work in the huge, gleaming offices
of Ford, or General Electric, or NASA. Small meant small-time.
Small in 1960 didn't mean a cool little startup. It meant uncle
Sid's shoe store.When I grew up in the 1970s, the idea of the "corporate ladder" was
still very much alive. The standard plan was to try to get into a
good college, from which one would be drafted into some organization
and then rise to positions of gradually increasing responsibility.
The more ambitious merely hoped to climb the same ladder faster.
[1]But in the late twentieth century something changed. It turned out
that economies of scale were not the only force at work. Particularly
in technology, the increase in speed one could get from smaller
groups started to trump the advantages of size.The future turned out to be different from the one we were expecting
in 1970. The domed cities and flying cars we expected have failed
to materialize. But fortunately so have the jumpsuits with badges
indicating our specialty and rank. Instead of being dominated by
a few, giant tree-structured organizations, it's now looking like
the economy of the future will be a fluid network of smaller,
independent units.It's not so much that large organizations stopped working. There's
no evidence that famously successful organizations like the Roman
army or the British East India Company were any less afflicted by
protocol and politics than organizations of the same size today.
But they were competing against opponents who couldn't change the
rules on the fly by discovering new technology. Now it turns out
the rule "large and disciplined organizations win" needs to have a
qualification appended: "at games that change slowly." No one knew
till change reached a sufficient speed.Large organizations will start to do worse now, though,
because for the first time in history they're no longer getting the
best people. An ambitious kid graduating from college now doesn't
want to work for a big company. They want to work for the hot
startup that's rapidly growing into one. If they're really ambitious,
they want to start it.
[2]This doesn't mean big companies will disappear. To say that
startups will succeed implies that big companies will exist, because
startups that succeed either become big companies or are acquired
by them.
[3]
But large organizations will probably never again
play the leading role they did up till the last quarter of the
twentieth century.It's kind of surprising that a trend that lasted so long would ever
run out. How often does it happen that a rule works for thousands
of years, then switches polarity?The millennia-long run of bigger-is-better left us with a lot of
traditions that are now obsolete,
but extremely deeply rooted.
Which means the ambitious can now do arbitrage on them. It will
be very valuable to understand precisely which ideas to keep and
which can now be discarded.The place to look is where the spread of smallness began: in the
world of startups.There have always been occasional cases, particularly in the US,
of ambitious people who grew the ladder under them instead of
climbing it. But till recently this was an anomalous route that
tended to be followed only by outsiders. It was no coincidence
that the great industrialists of the nineteenth century had so
little formal education. As huge as their companies eventually
became, they were all essentially mechanics and shopkeepers at
first. That was a social step no one with a college education would
take if they could avoid it. Till the rise of technology startups,
and in particular, Internet startups, it was very unusual for
educated people to start their own businesses.The eight men who left Shockley Semiconductor to found Fairchild
Semiconductor, the original Silicon Valley startup, weren't even
trying to start a company at first. They were just looking for a
company willing to hire them as a group. Then one of their parents
introduced them to a small investment bank that offered to find
funding for them to start their own, so they did. But starting a
company was an alien idea to them; it was something they backed
into.
[4]Now I would guess that practically every Stanford or Berkeley
undergrad who knows how to program has at least considered the idea
of starting a startup. East Coast universities are not far behind,
and British universities only a little behind them. This pattern
suggests that attitudes at Stanford and Berkeley are not an anomaly,
but a leading indicator. This is the way the world is going.Of course, Internet startups are still only a fraction of the world's
economy. Could a trend based on them be that powerful?I think so. There's no reason to suppose there's any limit to the
amount of work that could be done in this area. Like science,
wealth seems to expand fractally. Steam power was a sliver of the
British economy when Watt started working on it. But his work led
to more work till that sliver had expanded into something bigger
than the whole economy of which it had initially been a part.The same thing could happen with the Internet. If Internet startups
offer the best opportunity for ambitious people, then a lot of
ambitious people will start them, and this bit of the economy will
balloon in the usual fractal way.Even if Internet-related applications only become a tenth of the
world's economy, this component will set the tone for the rest.
The most dynamic part of the economy always does, in everything
from salaries to standards of dress. Not just because of its
prestige, but because the principles underlying the most dynamic
part of the economy tend to be ones that work.For the future, the trend to bet on seems to be networks of small,
autonomous groups whose performance is measured individually. And
the societies that win will be the ones with the least impedance.As with the original industrial revolution, some societies are going
to be better at this than others. Within a generation of its birth
in England, the Industrial Revolution had spread to continental
Europe and North America. But it didn't spread everywhere. This
new way of doing things could only take root in places that were
prepared for it. It could only spread to places that already had
a vigorous middle class.There is a similar social component to the transformation that began
in Silicon Valley in the 1960s. Two new kinds of techniques were
developed there: techniques for building integrated circuits, and
techniques for building a new type of company designed to grow fast
by creating new technology. The techniques for building integrated
circuits spread rapidly to other countries. But the techniques for
building startups didn't. Fifty years later, startups are ubiquitous
in Silicon Valley and common in a handful of other US cities, but
they're still an anomaly in most of the world.Part of the reason—possibly the main reason—that startups
have not spread as broadly as the Industrial Revolution did is their
social disruptiveness. Though it brought many social changes, the
Industrial Revolution was not fighting the principle that bigger
is better. Quite the opposite: the two dovetailed beautifully.
The new industrial companies adapted the customs of existing large
organizations like the military and the civil service, and the
resulting hybrid worked well. "Captains of industry" issued orders
to "armies of workers," and everyone knew what they were supposed
to do.Startups seem to go more against the grain, socially. It's hard
for them to flourish in societies that value hierarchy and stability,
just as it was hard for industrialization to flourish in societies
ruled by people who stole at will from the merchant class. But
there were already a handful of countries past that stage when the
Industrial Revolution happened. There do not seem to be that many
ready this time.
Notes[1]
One of the bizarre consequences of this model was that the usual
way to make more money was to become a manager. This is one of the
things startups fix.[2]
There are a lot of reasons American car companies have been
doing so much worse than Japanese car companies, but at least one
of them is a cause for optimism: American graduates have more
options.[3]
It's possible that companies will one day be able to grow big
in revenues without growing big in people, but we are not very far
along that trend yet.[4]
<NAME>, Making Silicon Valley, MIT Press, 2006.Thanks to <NAME>, <NAME>, <NAME>,
and <NAME> for reading drafts of this.
|
|
https://github.com/htlwienwest/da-vorlage-typst | https://raw.githubusercontent.com/htlwienwest/da-vorlage-typst/main/README.md | markdown | MIT License | # HTL Wien West Diploma Thesis
This is a Typst diploma thesis template for students of the HTL Wien West. It fulfils all the necessary requirements for the diploma thesis.
| | | | |
| -- | -- | -- | -- |
|  |  |  |  |
## Usage
You can use this template in the Typst web app by clicking "Start from template" on the dashboard and searching for `htlwienwest-da`.
Alternatively, you can use the CLI to kick this project off using the command
```
typst init @preview/htlwienwest-da
```
Typst will create a new directory with all the files needed to get you started.
## Configuration
This template exports the `diplomarbeit` function with the following named arguments:
- `titel`: `string` - The title of the thesis
- `schuljahr`: `string` - The current school year
- `abteilung`: `string` - The student's department
- `unterschrifts-datum`: `string` - The submission date
- `autoren`: `array(dict)` - An array of all authors, represented as dictionaries. Each of them has the following properties
- `vorname`: `string` - Firstname of the student
- `nachname`: `string` - Lastname of the student
- `klasse`: `string` - School class of the student
- `betreuer`: `dict` - The student's advisor as dictionary
- `name`: `string | content` - The advisor's name
- `geschlecht`: `"male" | "female"` - Gender of advisor for correct gendering
- `aufgaben`: `content` - The student's responsibilities
- `kurzfassung`: `content` - Abstract in german as content block
- `abstract`: `content` - Abstract in english as content block
- `vorwort`: `content` - The thesis' preface
- `danksagung`: `content` - Acknowledgement
- `anhang`: `content | none` - Appendix
- `literaturverzeichnis`: `function` - The bibliography prefilled with the BibTex file path
The function also accepts a single, positional argument for the body of the paper.
The template will initialize your package with a sample call to the `diplomarbeit`function in a show rule. If you want to change an existing project to use thistemplate, you can add a show rule like this at the top of your file:
```typ
#import "@preview/htlwienwest-da:0.1.0": *
#show: diplomarbeit.with(
titel: "Titel der Diplomarbeit",
abteilung: "Informationstechnologie",
schuljahr: "2023/24",
unterschrifts-datum: "20.04.2024",
autoren: (
(
vorname: "Hans", nachname: "Mustermann",
klasse: "5AHITN",
betreuer: (name: "Dr. <NAME>", geschlecht: "male"),
aufgaben: [
#lorem(100)
]
),
(
vorname: "Herta", nachname: "Musterfrau",
klasse: "5AHITN",
betreuer: (name: "Dipl.-Ing <NAME>", geschlecht: "female"),
aufgaben: [
#lorem(100)
]
),
kurzfassung: [
Die Kurzfassung muss die folgenden Inhalte darlegen (§8, Absatz 5 Prüfungsordnung): Thema, Fragestellung, Problemformulierung, wesentliche Ergebnisse. Sie soll einen prägnanten Überblick über die Arbeit geben.
],
abstract: [
Englische Version der Kurzfassung (siehe #link(<Kurzfassung>)[_Kurzfassung_])
],
vorwort: [
Perönlicher Zugang zum Thema. Gründe für die Themenwahl.
],
danksagung: [
Dank an Personen, die bei der Erstellung der Arbeit unterstützt haben.
],
anhang: include "anhang.typ", // entfernen falls nicht benötigt
literaturverzeichnis: bibliography.with("literaturverzeichnis.bib")
)
// Your content goes below.
```
## Provided Functions
Beside the `diplomarbeit` function, the template also provides the `autor` function that is used after a heading to indicate the specific author of the current section.
```
== Some Heading
#autor[Your Name]
```
This will render additional information to the section's heading.
# Installing
To install the template locally, you can use
```bash
just install
```
which uses the [just](https://github.com/casey/just) command runner.
If you don't want to install `just`, you can run
```bash
bash ./scripts/package @local
```
The installed version can be used via `@local` instead of `@preview`. To create a new typst project from the template, run
```bash
typst init @local/htlwienwest-da:<version-in-typst.toml>
```
|
https://github.com/LDemetrios/Typst4k | https://raw.githubusercontent.com/LDemetrios/Typst4k/master/src/test/resources/suite/scripting/recursion.typ | typst | // Test recursive function calls.
--- recursion-named ---
// Test with named function.
#let fib(n) = {
if n <= 2 {
1
} else {
fib(n - 1) + fib(n - 2)
}
}
#test(fib(10), 55)
--- recursion-unnamed-invalid ---
// Test with unnamed function.
// Error: 17-18 unknown variable: f
#let f = (n) => f(n - 1)
#f(10)
--- recursion-named-returns-itself ---
// Test capturing with named function.
#let f = 10
#let f() = f
#test(type(f()), function)
--- recursion-unnamed-does-not-return-itself ---
// Test capturing with unnamed function.
#let f = 10
#let f = () => f
#test(type(f()), int)
--- recursion-shadowing ---
// Test redefinition.
#let f(x) = "hello"
#let f(x) = if x != none { f(none) } else { "world" }
#test(f(1), "world")
--- recursion-maximum-depth ---
// Error: 15-21 maximum function call depth exceeded
#let rec(n) = rec(n) + 1
#rec(1)
--- recursion-via-include-in-layout ---
// Test cyclic imports during layout.
// Error: 2-38 maximum show rule depth exceeded
// Hint: 2-38 check whether the show rule matches its own output
#layout(_ => include "recursion.typ")
--- recursion-show-math ---
// Test recursive show rules.
// Error: 22-25 maximum show rule depth exceeded
// Hint: 22-25 check whether the show rule matches its own output
#show math.equation: $x$
$ x $
--- recursion-show-math-realize ---
// Error: 22-33 maximum show rule depth exceeded
// Hint: 22-33 check whether the show rule matches its own output
#show heading: it => heading[it]
$ #heading[hi] $
|
|
https://github.com/Myriad-Dreamin/typst.ts | https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/layout/spacing_03.typ | typst | Apache License 2.0 |
#import "/contrib/templates/std-tests/preset.typ": *
#show: test-page
// Test RTL spacing.
#set text(dir: rtl)
A #h(10pt) B \
A #h(1fr) B
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/unichar/0.1.0/ucd/block-1AB0.typ | typst | Apache License 2.0 | #let data = (
("COMBINING DOUBLED CIRCUMFLEX ACCENT", "Mn", 230),
("COMBINING DIAERESIS-RING", "Mn", 230),
("COMBINING INFINITY", "Mn", 230),
("COMBINING DOWNWARDS ARROW", "Mn", 230),
("COMBINING TRIPLE DOT", "Mn", 230),
("COMBINING X-X BELOW", "Mn", 220),
("COMBINING WIGGLY LINE BELOW", "Mn", 220),
("COMBINING OPEN MARK BELOW", "Mn", 220),
("COMBINING DOUBLE OPEN MARK BELOW", "Mn", 220),
("COMBINING LIGHT CENTRALIZATION STROKE BELOW", "Mn", 220),
("COMBINING STRONG CENTRALIZATION STROKE BELOW", "Mn", 220),
("COMBINING PARENTHESES ABOVE", "Mn", 230),
("COMBINING DOUBLE PARENTHESES ABOVE", "Mn", 230),
("COMBINING PARENTHESES BELOW", "Mn", 220),
("COMBINING PARENTHESES OVERLAY", "Me", 0),
("COMBINING LATIN SMALL LETTER W BELOW", "Mn", 220),
("COMBINING LATIN SMALL LETTER TURNED W BELOW", "Mn", 220),
("COMBINING LEFT PARENTHESIS ABOVE LEFT", "Mn", 230),
("COMBINING RIGHT PARENTHESIS ABOVE RIGHT", "Mn", 230),
("COMBINING LEFT PARENTHESIS BELOW LEFT", "Mn", 220),
("COMBINING RIGHT PARENTHESIS BELOW RIGHT", "Mn", 220),
("COMBINING SQUARE BRACKETS ABOVE", "Mn", 230),
("COMBINING NUMBER SIGN ABOVE", "Mn", 230),
("COMBINING INVERTED DOUBLE ARCH ABOVE", "Mn", 230),
("COMBINING PLUS SIGN ABOVE", "Mn", 230),
("COMBINING DOUBLE PLUS SIGN ABOVE", "Mn", 230),
("COMBINING DOUBLE PLUS SIGN BELOW", "Mn", 220),
("COMBINING TRIPLE ACUTE ACCENT", "Mn", 230),
("COMBINING LATIN SMALL LETTER INSULAR G", "Mn", 230),
("COMBINING LATIN SMALL LETTER INSULAR R", "Mn", 230),
("COMBINING LATIN SMALL LETTER INSULAR T", "Mn", 230),
)
|
https://github.com/Mc-Zen/zero | https://raw.githubusercontent.com/Mc-Zen/zero/main/src/zero.typ | typst | MIT License | #import "impl.typ"
#import "num.typ": num, set-num, set-group, set-round
#import "state.typ": default-state
#import "ztable.typ": ztable
|
https://github.com/sahasatvik/typst-theorems | https://raw.githubusercontent.com/sahasatvik/typst-theorems/main/manual_examples.typ | typst | MIT License | #import "manual_template.typ": *
#import "theorems.typ": *
#show: thmrules
#show: project.with(
title: "typst-theorems",
authors: (
"sahasatvik",
),
url: "https://github.com/sahasatvik/typst-theorems"
)
= Introduction
This document only includes the examples given in the manual; each one of
these has been explained in full detail there.
= Feature demonstration
#let theorem = thmbox(
"theorem",
"Theorem",
fill: rgb("#e8e8f8")
)
#theorem("Euclid")[
There are infinitely many primes.
] <euclid>
#let lemma = thmbox(
"theorem",
"Lemma",
fill: rgb("#efe6ff")
)
#lemma[
If $n$ divides both $x$ and $y$, it also divides $x - y$.
]
#let corollary = thmbox(
"corollary",
"Corollary",
base: "theorem",
fill: rgb("#f8e8e8")
)
#corollary(numbering: "1.1")[
If $n$ divides two consecutive natural numbers, then $n = 1$.
]
== Proofs
#let proof = thmproof("proof", "Proof")
#proof([of @euclid])[
Suppose to the contrary that $p_1, p_2, dots, p_n$ is a finite enumeration
of all primes. Set $P = p_1 p_2 dots p_n$. Since $P + 1$ is not in our list,
it cannot be prime. Thus, some prime factor $p_j$ divides $P + 1$. Since
$p_j$ also divides $P$, it must divide the difference $(P + 1) - P = 1$, a
contradiction.
]
#theorem[
There are arbitrarily long stretches of composite numbers.
]
#proof[
For any $n > 2$, consider $
n! + 2, quad n! + 3, quad ..., quad n! + n #qedhere
$
]
== Suppressing numbering
#let example = thmplain(
"example",
"Example"
).with(numbering: none)
#example[
The numbers $2$, $3$, and $17$ are prime.
]
#lemma(numbering: none)[
The square of any even number is divisible by $4$.
]
#lemma[
The square of any odd number is one more than a multiple of $4$.
]
#lemma(number: "42")[
The square of any natural number cannot be two more than a multiple of 4.
]
== Limiting depth
#let definition = thmbox(
"definition",
"Definition",
base_level: 1,
stroke: rgb("#68ff68") + 1pt
)
#definition("Prime numbers")[
A natural number is called a _prime number_ if it is greater than $1$ and
cannot be written as the product of two smaller natural numbers. <prime>
]
#definition("Composite numbers")[
A natural number is called a _composite number_ if it is greater than $1$
and not prime.
]
#example(base_level: 4, numbering: "1.1")[
The numbers $4$, $6$, and $42$ are composite.
]
== Custom formatting
#let proof-custom = thmplain(
"proof",
"Proof",
base: "theorem",
titlefmt: smallcaps,
bodyfmt: body => [
#body #h(1fr) $square$
]
).with(numbering: none)
#lemma[
All even natural numbers greater than 2 are composite.
]
#proof-custom[
Every even natural number $n$ can be written as the product of the natural
numbers $2$ and $n\/2$. When $n > 2$, both of these are smaller than $2$
itself.
]
#let notation = thmenv(
"notation", // identifier
none, // base - do not attach, count globally
none, // base_level - use the base as-is
(name, number, body, color: black) => [
// fmt - format content using the environment name, number, body, and an optional color
#text(color)[#h(1.2em) *Notation (#number) #name*]:
#h(0.2em)
#body
#v(0.5em)
]
).with(numbering: "I") // use Roman numerals
#notation[
The variable $p$ is reserved for prime numbers.
]
#notation("for Reals", color: green)[
The variable $x$ is reserved for real numbers.
]
#lemma(title: "Lem.", stroke: 1pt)[
All multiples of 3 greater than 3 are composite.
]
== Labels and references <references>
#pad(
left: 1.2em,
[
Recall that there are infinitely many prime numbers via @euclid.
]
)
#pad(
left: 1.2em,
[
You can reference future environments too, like @oddprime[Cor.].
]
)
#lemma(supplement: "Lem.", refnumbering: "(1.1)")[
All primes apart from $2$ and $3$ are of the form $6k plus.minus 1$.
] <primeform>
You can modify the supplement and numbering to be used in references, like @primeform.
== Overriding `base`
#let remark = thmplain("remark", "Remark", base: "heading")
#remark[
There are infinitely many composite numbers.
]
#corollary[
All primes greater than $2$ are odd.
] <oddprime>
#remark(base: "corollary")[
Two is a _lone prime_.
]
|
https://github.com/MLAkainu/Network-Comuter-Report | https://raw.githubusercontent.com/MLAkainu/Network-Comuter-Report/main/referrences.typ | typst | Apache License 2.0 | #align(center, text(15pt)[*Tài liệu tham khảo*])
[1] Slide môn học Mạng máy tính CO3093.\
[2] ByteByteGo. 8 Popular Network Protocols. Truy cập từ: https://substackcdn.com \
[3] <NAME>, <NAME>, <NAME>.
A Virtual Prototyping Platform for Exploration of Vehicular Electronics. ResearchGate. Truy cập từ: https://www.researchgate.net/publication/370038185_A_Virtual_Prototyping_Platform_for_Exploration_of_Vehicular_Electronics |
https://github.com/Myriad-Dreamin/typst.ts | https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/visualize/shape-rect_02.typ | typst | Apache License 2.0 |
#import "/contrib/templates/std-tests/preset.typ": *
#show: test-page
//
// // Error: 15-38 unexpected key "cake", valid keys are "top-left", "top-right", "bottom-right", "bottom-left", "left", "top", "right", "bottom", and "rest"
// #rect(radius: (left: 10pt, cake: 5pt)) |
https://github.com/WinstonMDP/math | https://raw.githubusercontent.com/WinstonMDP/math/main/exers/6.typ | typst | #import "../cfg.typ": *
#show: cfg
$ "Prove that" lim_(x -> x') a^x = a^x' $
That is, $all(epsilon > 0) ex(delta > 0) all(x in RR):
0 < abs(x' - x) < delta -> abs(a^x' - a^x) < epsilon$
$ex(delta > 0) all(x in QQ): 0 < abs(x' - x) < delta -> abs(a^x' - a^x) < epsilon$
I'm proving that $all(x in RR): 0 < abs(x' - x) < delta -> abs(a^x' - a^x) < epsilon$
If $x in QQ$ then ...
$x in II$
$ex(q in QQ): abs(x' - x) < abs(x' - q) < delta$
$abs(a^(x') - a^q) < epsilon$
|
|
https://github.com/chendaohan/rust_tutorials | https://raw.githubusercontent.com/chendaohan/rust_tutorials/main/books/2.安装Rust.typ | typst | #set heading(numbering: "1.")
#set text(size: 15pt)
#let path = "images/安装Rust/"
= 打开 Rust 官网
#link("https://www.rust-lang.org", [Rust Programming Language]): https://www.rust-lang.org
#image(path + "home_page.png")
= 点击 Install 或 Get Started
#image(path + "install_page_link.png")
= Linux 安装
```sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
= Windows 安装
== 下载安装包
#image(path + "install_package.png")
== 安装 Visual Studio(需重启)
#image(path + "install_vc_option.png")
#image(path + "visual_studio_installer.png")
= 安装 Rust 工具链
#image(path + "install_rust_option.png")
#image(path + "finish.png")
= 检查是否安装成功
```sh
rustc --version
```
#image(path + "rustc.png")
= 更新 Rust 工具链
```sh
rustup update
```
#image(path + "rustup.png")
= 安装 VS Code 的 Rust 插件 rust-analyzer
#image(path + "rust_analyzer.png")
= 其它 VS Code 插件
#figure(
image(path + "toml.png"),
caption: [toml 语法高亮,代码提示]
)
#figure(
image(path + "crates.png"),
caption: [Rust 依赖管理]
)
#figure(
image(path + "error_lens.png"),
caption: [高亮错误、警告]
)
#figure(
image(path + "codelldb.png"),
caption: [调试代码插件]
) |
|
https://github.com/nvarner/typst-lsp | https://raw.githubusercontent.com/nvarner/typst-lsp/master/README.md | markdown | MIT License | # Typst LSP
A language server for [Typst](https://typst.app/).
## Features
- Syntax highlighting, error reporting, code completion, and function signature
help
- Compiles to PDF on save (configurable to as-you-type, or can be disabled)
- Experimental formatting using [typstfmt](https://github.com/astrale-sharp/typstfmt)
This repo consists of:
- an LSP server, written in Rust
- [a corresponding VS Code(ium) extension](https://github.com/nvarner/typst-lsp/tree/master/editors/vscode).
The extension is available on the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=nvarner.typst-lsp)
and [OpenVSX](https://open-vsx.org/extension/nvarner/typst-lsp).
## Near future goals
- Improved preview (e.g. built-in PDF viewer, render to image for speed)
- Support for more editors
## Building from source
### Prerequisites
Install [Rust](https://www.rust-lang.org/), which comes with `cargo`. Among other things, `cargo` is the build tool used for Rust projects.
### Building
```sh
cargo build --release
```
Cargo will download and compile Rust dependencies as needed. The `--release` flag produces and optimized binary. The resulting executable will be at `target/release/typst-lsp` (with `.exe` extension on Windows).
### Cargo features
Cargo features allow you to customize the build by enabling chunks of code at compile time.
We need an HTTP client to download Typst packages. The client needs a TLS
implementation; by default, [Rustls](https://github.com/rustls/rustls) is used. If you would like to disable or change this, the following Cargo features are available:
- `remote-packages` (default): use an HTTP client to download Typst packages
- `rustls-tls` (default): use Rustls for TLS
- `native-tls`: use your platform's TLS implementation
For example, the following command will build with `native-tls`:
```sh
cargo build --release --no-default-features --features remote-packages,fontconfig,native-tls
```
For Linux, `native-tls` means OpenSSL. You will need to install its headers to compile with `native-tls`.
Additionally, the `fontconfig` feature is used to enable minimal support for `fontconfig`. This is necessary
for the LSP to detect fonts in certain Linux distributions, such as NixOS, and is thus enabled by default.
If this causes any problems for your distribution, you can disable support for `fontconfig` by not enabling that feature,
such as by compiling with the flags `--no-default-features --features remote-packages,rustls-tls`.
**NOTE:** If the LSP fails to find your fonts through `fontconfig`, try setting (when running the LSP) the `FONTCONFIG_FILE`
environment variable to the absolute path of the fontconfig configuration file specifying your desired font paths. This can happen
when using VSCode through Flatpak on distributions such as NixOS, and can lead to some fonts not being detected when compiling your
Typst documents. To set the environment variable through Flatpak, you may either use Flatseal or run a command such as below
(assuming a `--user` installation) - make sure to replace the path after `FONTCONFIG_FILE` with the appropriate one for your system:
```sh
# For VSCode:
flatpak override --user --env=FONTCONFIG_FILE=$HOME/.config/fontconfig/conf.d/configfilenamehere.conf com.visualstudio.code
# For VSCodium:
flatpak override --user --env=FONTCONFIG_FILE=$HOME/.config/fontconfig/conf.d/configfilenamehere.conf com.vscodium.codium
```
### Bumping the Typst version
**Warning:** at time of writing, the Typst API has changed in every release. Until the language is stable, you may need Rust knowledge to address changes in Typst to successfully compile against a new version of Typst.
You will need to modify the Typst dependencies in `Cargo.toml`. These are at the top of the `[dependencies]` section, have names starting with `typst`, and reference `git = "https://github.com/typst/typst.git"`.
If you want to compile against a versioned release of Typst, change the `tag`s to the tag for your desired release. Usually, the tags are named `vX.X.X`.
If you want to compile against a commit that hasn't been released, replace the `tag`s with `rev`s, and set their values to the Git commit hash. Commit hashes are hexadecimal strings, and have long and short versions that both name the commit. Among other places, a commit's hash can be found at the end of the GitHub URL for that commit.
## Development guide
### Prerequisites
Install:
- [Rust](https://www.rust-lang.org/) for the LSP itself
- [Rust Analyzer](https://rust-analyzer.github.io/) an extension for Rust LSP for VS Code
- [node](https://nodejs.org/en) for the VS Code extension; it may be easiest to
install via [fnm](https://github.com/Schniz/fnm)
### First time setup
1. Clone this repository locally
2. Open it in VS Code; it's needed to run the extension
3. In the `editors/vscode` subdirectory:
1. Run `npm install` to install extension dependencies
2. Run `npm run compile` to build the extension
4. Run through the development cycle once to initialize and test everything
5. (Optional: install the dev version of the extension): Press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>,
and choose `Developer: Install Extension from Location...` and choose
the directory for the extension, `editors/vscode/`. There will not be any messages, but
the extension can be found in the Extensions `@installed` list.
### Development cycle
1. Make any changes
2. Run `cargo install --path .`; at present, the VS Code extension just invokes
the `typst-lsp` command to start the LSP, and this command will compile and
replace that binary with the latest version
- If modifying the extension, keep `npm run watch` running, or `npm run compile`
after changes
3. Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> to launch the "Extension Development Host"; if it's already
running, invoke "Developer: Reload Window" from the command palette in the
Extension Development Host
- If prompted, choose "Run Extension"
4. Within the Extension Development Host, the extension will be active and ready
for testing
#### Tracing with Jaeger
[Jaeger](https://www.jaegertracing.io/) is a tool to visualize tracing data. It
shows spans (e.g. a span corresponds to each time a file is opened, each time we
calculate semantic tokens, etc.) and associated data (e.g. the URL of the file
opened), which provides timing and debugging data.
By default, the LSP does not send data to Jaeger. To enable it:
1. Launch the Jaeger server. The [`opentelemetry_jaeger`](https://docs.rs/opentelemetry-jaeger/latest/opentelemetry_jaeger/)
crate recommends the following:
```
$ docker run -d -p6831:6831/udp -p6832:6832/udp -p16686:16686 -p14268:14268 jaegertracing/all-in-one:latest
```
2. Compile the LSP with the `jaeger` feature enabled. In the terminal, run:
```
$ cargo build --features jaeger
```
In VS Code, you can use the "Run Extension [Jaeger]" task to launch the
extension with Jaeger support.
3. Run the LSP, then eventually close it.
4. From Jaeger, search for traces. It may be best to restrict the search to
traces with a minimum length, such as 2 seconds, to hide smaller traces that
come from the task sending data to Jaeger.
## Installation guide
### Visual Studio Code
- Install it from [Marketplace](https://marketplace.visualstudio.com/items?itemName=nvarner.typst-lsp).
### Neovim
#### Basic setup
> Prerequisites: [`mason-lspconfig.nvim`](https://github.com/williamboman/mason-lspconfig.nvim), [`mason.nvim`](https://github.com/williamboman/mason.nvim) and [`nvim-lspconfig`](https://github.com/neovim/nvim-lspconfig) (Optional for advanced users, but required for this guide).
1. Run `MasonInstall typst-lsp`.
2. Edit your `init.lua` settings (For more details, you may consult [server_configurations.md#typst_lsp](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#typst_lsp)):
```lua
require'lspconfig'.typst_lsp.setup{
settings = {
exportPdf = "onType" -- Choose onType, onSave or never.
-- serverPath = "" -- Normally, there is no need to uncomment it.
}
}
```
3. You may also install [`typst.vim`](https://github.com/kaarmu/typst.vim) for more capabilities in nvim.
#### Additional steps for `coc.nvim` users
Run `CocConfig` to edit the settings so that `coc.nvim` could offer functions such as auto-completion:
```
{
"languageserver": {
"typst": {
"command": "typst-lsp",
"filetypes": ["typst"]
}
}
}
```
### Sublime Text
Follow the [configuration instructions](https://lsp.sublimetext.io/language_servers/#typst) for the LSP plugin for Sublime Text.
|
https://github.com/gongke6642/tuling | https://raw.githubusercontent.com/gongke6642/tuling/main/布局/columns/columns.typ | typst | 将一个区域分成多个大小相等的列。
该column功能允许将任何容器的内部分成多个列。它不会使列的高度相等,相反,列将占据其容器的高度或页面上的剩余高度。如果需要,列功能可以跨页。
如果您需要在整个文档中插入列,则可以使用该 page函数的columns参数。
#image("屏幕截图 2024-04-14 171732.png")
#image("屏幕截图 2024-04-14 172142.png") |
|
https://github.com/justinvulz/document | https://raw.githubusercontent.com/justinvulz/document/main/drawimg/p1.typ | typst | #import "../typst_packages/drawimg.typ": *
#show: doc => conf(doc)
#figure(
// caption: [Simplified Graph of $Q_n$],
gap: 1em,
grid(
columns: 3,
align: center+horizon,
gutter: 1em,
diagram(
spacing: (6em,3em),
node-stroke: aqua,
node-inset: 0.3em,
{
node((0,0),$V_0(0)$)
node((0,1),$V_1(0)$)
edge((0,0),(0,1),$binom(n-1,0)$)
node((1,0),$V_0(1)$)
node((1,1),$V_1(1)$)
edge((1,0),(1,1),$binom(n-1,1)$)
edge((0,0),(1,0),$binom(n-1,0)binom(n-1-0,1)$)
edge((0,1),(1,1))
node((2,0),$V_0(2)$)
node((2,1),$V_1(2)$)
edge((2,0),(2,1),$binom(n-1,2)$)
edge((1,0),(2,0),$binom(n-1,1)binom(n-1-1,1)$)
edge((1,1),(2,1))
}
),
$dots$,
diagram(
spacing: (8em,3em),
node-stroke: aqua,
node-inset: 0.3em,
{
node((0,0),$V_0(n-2)$)
node((0,1),$V_1(n-2)$)
edge((0,0),(0,1),$binom(n-1,n-2)$)
edge((0,0),(1,0),$binom(n-1,n-2)binom(n-1-(n-2),1)$)
edge((0,1),(1,1))
node((1,0),$V_0(n-1)$)
node((1,1),$V_1(n-1)$)
edge((1,0),(1,1),$binom(n-1,n-1)$)
}
)
)
) |
|
https://github.com/bennyhandball/PA1_LoB_Finance | https://raw.githubusercontent.com/bennyhandball/PA1_LoB_Finance/main/PA/main.typ | typst | #import "supercharged-dhbw/2.1.0/acronym-lib.typ": *
#import "supercharged-dhbw/2.1.0/check-attributes.typ": *
#import "supercharged-dhbw/2.1.0/confidentiality-statement.typ": *
#import "supercharged-dhbw/2.1.0/declaration-of-authorship.typ": *
#import "supercharged-dhbw/2.1.0/lib.typ": *
#import "supercharged-dhbw/2.1.0/titlepage.typ": *
#import "acronyms.typ": acronyms
#import "supercharged-dhbw/2.1.0/appendix.typ": appendix
#show: supercharged-dhbw.with(
title: "Projektbudget in SAP S/4HANA: Implementierung und Analyse eines Genehmigungsprozesses mithilfe des SAP Workflow Management Tools auf der Business Technology Platform",
short-title: "Projektbuget-Genehmigung in SAP S/4HANA ",
type-of-degree-specification: "Sales & Consulting",
time-of-thesis: "29.07.2024 - 18.11.2024",
authors: ((
name: "<NAME>",
student-id: "5146364",
course: "WWI23SCB",
course-advisor: "Prof. Dr. <NAME>",
course-of-studies: "Wirtschaftsinformatik", company: ((
name: "SAP SE",
address: "Dietmar-Hopp-Allee 16",
city: "69190 Walldorf")
)),
),
acronyms: acronyms, // displays the acronyms defined in the acronyms dictionary
at-university: false, // if true the company name on the title page and the confidentiality statement are hidden
bibliography: bibliography("sources.bib"),
appendix: appendix,
date: datetime.today(),
language: "de", // en, de
supervisor: (
company: (
name: "<NAME>",
mail-address: "<EMAIL>",
phone-number: "+496227750273"),
university: (
name: "<NAME>",
mail-address: "<EMAIL>",
phone-number: "T.B.A")
),
university: "Duale Hochschule Baden-Württemberg",
university-location: "Mannheim",
bib-style :"elsevier-harvard",
// for more options check the package documentation (https://typst.app/universe/package/supercharged-dhbw)
)
//
// Edit this content to your liking
= Einleitung
//Besseren Einstieg
//Urlaubsantrag muss genehmigt werden
// Genehmigung einer Bestellung -> Approval
== Motivation & Problemstellung
//Struktur der Arbeit
"Ein Ziel ohne Plan ist nur ein Wunsch." - Antoine de Saint-Exupéry @Zitat_Einstieg.
Im dynamischen Umfeld moderner Unternehmen sind klare Prozesse und eine präzise Planbarkeit unerlässlich #cite(<Prozessmanagement_Book>, supplement: "S. 5"). Dies gilt z.B. für die Verwaltung von Mitarbeiterurlauben als auch für die Genehmigung von Projektbudgets.
Im Rahmen eines Urlaubsantragsprozesses beim Arbeitgeber wird meist ein Antrag an den Vorgesetzten gestellt, der diesen anschließend bewilligen oder ablehnen kann. Dabei wird in der Regel geprüft, ob der Mitarbeiter noch über ausreichende Urlaubstage verfügt.
Einen vergleichbarer Genehmigungsprozess bezogen auf das Projektbudget findet man ebenfalls bei der
Genehmigung von Projektbudgets im Unternehmenskontext.
Eine präzise und transparente Budgetierung von Projekten ist hierbei essenziell. Unzureichende Kontrolle und ein fehlender Überblick über das Projektbudget können zu finanziellen Verlusten führen und die Performance des Unternehmens beeinträchtigen. Die Verwendung moderner Unternehmens-Anwendungssoftware (#acr("ERP")-Software), bietet hier eine entscheidende Unterstützung, um das Budget entsprechend verwalten und beplanen zu können #cite(<ERP-Systeme_Book_Gronau>, supplement: "S. 182"). Laut Dr. <NAME> (Chef Software Architekt bei SAP) versteht man unter dem Begriff #acr("ERP")
"eine Software die mit mehreren Modulen verknüpft ist, um eine Vielzahl von Geschäftsprozessen zu verwalten und zu steuern, die Unternehmen unterstützen. Lagerverwaltung, Produktplanung, Einkauf, Bestandskontrolle, Fertigung, Kundenservice und Auftragsverfolgung können von #acr("ERP")" unterstützt werden" #cite(<ERP-Systeme_Book_Sarferaz>, supplement: "S.3").
Obwohl Genehmigungsprozesse in verschiedenen Unternehmensbereichen, wie der Urlaubsverwaltung, standardisiert und effizient abgebildet werden können, stellt die Projektbudgetierung in SAP S/4HANA Public Cloud eine spezielle Herausforderung dar, da im Standardumfang keine standardisierte Funktion zur Genehmigung von Projektbudgets vorhanden ist.
Durch diese derzeit fehlende Funktion ist die Verwaltung und Genehmigung von Projektbudgets nur beschränkt möglich.
Die Genehmigung der Projektbudgtes muss daher manuell und systemfern durchgeführt werden, was zu einem erheblichen Arbeitsaufwand führt.
Eine weitere Herausforderung stellt die eingeschränkte Anpassungsmöglichkeit der Public Cloud dar, wenn Unternehmen ihre spezifischen Geschäftsanforderungen abbilden möchten @ERP_Clean_Core.
Durch eine Standarderweiterung auf der #acr("BTP") kann die Verwaltung und Genehmigung ermöglicht werden @SAP_Guide.
Dabei wird das SAP Build Tool auf der #acr("BTP") genutzt um mithilfe des SAP Workflow Tools einen Workflow zu erstellen, der eine Genehmigungsprozessautomatisierung ermöglicht @ERP_Clean_Core.
Mithilfe von Workflows können Geschäftsprozesse automatisiert, standardisiert und effizienter gestaltet werden @SAP_Workflow_Overview. Dabei können Aufgaben, Benachrichtigungen oder Berechtigungen automatisch in einer zuvor definierten Reihenfolge ausgeführt werden @SAP_Workflow_Overview. Diese Lösung bietet eine maßgebliche Optimierung des Projektbudget-Genehmigungsprozesses hinsichtlich der Entlastung der Mitarbeiter und der Effizienz @Workflow_source.
== Struktur der Arbeit
Die vorliegende Arbeit ist in sieben Hauptkapitel gegliedert. Nach der Einleitung, in der die Motivation und Problemstellung dargelegt, sowie der Aufbau und die Zielsetzung der Arbeit beschrieben werden, folgt in Kapitel 2 eine umfassende Darstellung der theoretischen Grundlagen. Hier werden zunächst die allgemeinen Konzepte der Projektbudgetierung erläutert, bevor auf die spezifischen Aspekte des SAP S/4HANA-Systems eingegangen wird. Dazu gehören sowohl die Grundlagen von SAP S/4HANA als auch das Projektsystem. Im Anschluss wird die Business Technology Platform (BTP) als relevante technologische Innovationsplattform für die Automatisierung und das Workflow-Management im Rahmen der Projektbudgetierung vorgestellt.
In Kapitel 3 werden die angewandten wissenschaftlichen Methoden diskutiert und begründet, warum die vorliegenden Methoden gewählt wurden. Nach der Auswahl der Methoden erfolgt die Durchführung von Experteninterviews, deren qualitative Auswertung nach der Methode von Mayring vorgenommen wird.
Im vierten Kapitel wird die Anforderungserhebung basierend auf den Experteninterviews behandelt. Die Ergebnisse werden analysiert und hinsichtlich ihrer Relevanz und Priorität eingeordnet.
Kapitel 5 beschreibt die Implementierung der im Rahmen dieser Arbeit vorgeschlagenen Standarderweiterung im SAP S/4HANA-System. Darauf aufbauend wird in Kapitel 6 eine Evaluierung der erzielten Ergebnisse vorgenommen, wobei der Fokus auf der Beurteilung der Effizienz und der Zielerreichung liegt.
Die Arbeit schließt mit einer Zusammenfassung in Kapitel 7 ab. Hier werden neben dem Fazit eine kritische Reflexion der durchgeführten Arbeit, sowie ein Ausblick gegeben.
== Abgrenzung der Arbeit
Gegenstand dieser Arbeit ist die Standarderweiterung hinsichtlich der Projektbudgetierung in SAP S/4HANA Public Cloud Version 2408. Darauffolgende Versionen können nicht berücksichtigt werden. Die beschriebenen Funktionaliäten sind bis auf kleinere Einschränkungen auf die SAP S/4HANA Private Cloud übertragbar.
== Ziel und Gang
Das Ziel dieser Arbeit ist es den Genehmigungsprozess von Projektbudgets in SAP S/4HANA Public Cloud detailliert zu analysieren und zu evaluieren. Dabei soll beurteilt werden, ob die Standarderweiterung den durch Experteninterviews und eine folgende qualitative Inhaltsanalyse nach Mayring erhobenen Anforderungen entspricht.
Nach der Erhebung und Analyse der Anforderungen soll die Standarderweiterung dann implementiert werden und der Aufwand der Implementierung dokumentiert und dargestellt werden. Das Ergebnis der Arbeit soll der Finance-Beratungsabteilung dazu dienen, eine möglichst optimierte, auf die Kundenbedürfnisse abgestimmte Entscheidungsfindung bereitzustellen und zusätzlich ein Bewusstsein dafür zu schaffen, wie die Standarderweiterung der Projektbudgetgenehmigung bei Public-Cloud Kunden gewinnbringend eingesetzt werden kann.
= Theoretische Grundlagen
== Projektbudgetierung Grundlagen
Betrachtet man die Grundlagen der Projektbudgetierung, so ist zunächst wichtig zu definieren, was man unter einem Projekt versteht. Dabei gibt es keine einheitliche Definition für den Projektbegriff. Deshalb ist es von großer Relevanz, mehrere Definitionen zu nennen und diese zu vergleichen.
Ein Projekt ist ein Vorhaben, das im Wesentlichen durch Einmaligkeit der Rahmenbedingungen in seiner Gesamtheit und seinen Zusammenhängen gekennzeichnelt ist @Multiprojektmanagement. Die
Rahmenbedingungen sind nach @Multiprojektmanagement:
- neuartige und komplexe Zielvorgaben
- definierter Zeit- und Kostenrahmen
- multidisziplinäre Aufgabenstellung
- Fachkenntnisse und Aufgabenbereiche
- Risikobehaftet
Das deutsche Institut für Normung (DIN) (zitiert nach @Projektmanagement) definiert ein Projekt als ein "Vorhaben, das im Wesentlichen durch Einmaligkeit der Bedingung in ihrer Gesamtheit gekennzeichnet ist." Die Einmaligkeit der Bedingung kann sich beziehen auf die "Zielvorgabe, zeitlich, finanzielle, personelle oder andere Begrenzungen, projektspezifische Organisation" (DIN 69901-5:2009-01,S.11).
Vergleicht man die Definitionen, so fällt auf, dass in beiden Definitionen ein Projekt als zeitlich befristete Vorhaben mit einem festen Kostenrahmen definiert wird. Im Gegensatz zu einer Kostenstelle, die dauerhaft anfallende Kosten, nach den Stellen an denen die Kosten anfallen ansammeln @Schnelleinstieg_Controlling.
//Übergang zur Kostenstelle ?
Zu einem Projekt gehört ebenfalls das Projektbudget, welches ein wichtiges Element zur Steuerung von Projekten ist #cite(<Handbuch_Projektmanagement>, supplement: "S. 337").
Unter einem Budget ganz allgemein versteht man "wertmäßige Plangrößen (z.B. Einzahlungen/Auszahlungen, Einnahmen/Ausgaben, Aufwendungen/Erträge, der Kosten/Erlöse)" #cite(<Handbuch_Projektmanagement>,supplement: "S. 337").
Hingegen "die Budgetierung bezeichnet den Prozess der Erstellung, Verabschiedung und Kontrolle der Budgets sowie eventuelle Anpassungen" #cite(<Handbuch_Projektmanagement>,supplement: "S. 338").
//Hier fehlen die Quellen du Dummkopf
Im Rahmen der Projektbudgetierung werden für ein Projekt ein Gesamtbudget und Einzelbudgets aufgestellt, aufgeteilt, kontrolliert und evtl. angepasst #cite(<Handbuch_Projektmanagement>,supplement: "S. 337").
Die Projektbudgetierung stellt einen zentralen Bestandteil der Projektplanung dar und spezifiziert den Projektplan im Hinblick auf die erforderlichen Ressourcen #cite(<Handbuch_Projektmanagement>,supplement: "S. 337"). Dabei wird zwischen variablen und fixen Budgetkosten sowie verschiedenen Budgetkostenarten differenziert #cite(<Handbuch_Projektmanagement>,supplement: "S. 337"). Die Umwandlung fixer in variable Projektkosten führt dabei zu einer gesteigerten Flexibilität während des Projektverlaufs #cite(<Handbuch_Projektmanagement>,supplement: "S. 337").
Unter fixen Kosten versteht man Kosten, die unabhängig von der Produktionsmenge anfallen. Ein Beispiel für fixe Kosten im Projektrahmen wäre die Miete für die benötigten Büroräume #cite(<Mikroökonomik>, supplement: "S.204").
Unter variablen Kosten hingegen versteht man Kosten, die abhängig von der Produktionsmenge sind. Beispielsweise sind die Lohnkosten für projektbezogene Arbeitskräfte variabel #cite(<Mikroökonomik>, supplement: "S.204").
Zudem ermöglichen unterschiedliche Projektkostenarten, spezifische Schwerpunkte in der Steuerung des Projekts. Methoden wie die Budgetsimulation, der Soll-Ist-Vergleich und die Abweichungsanalyse sind wesentliche Instrumente, um das Projektbudget präzise zu planen und bei Bedarf anzupassen #cite(<Handbuch_Projektmanagement>,supplement: "S.337").
== SAP S/4HANA
=== Grundlagen S/4HANA
Die SAP SE ist ein 1972 gegründetes deutsches Unternehmen mit dem Hauptsitz in Walldorf @SAP_1972, welches bezogen auf die Marktkapitalisierung das wertvollste deutsche DAX-Unternehmen ist (Stand: September 2024, @Marktkapitalisierung_SAP) und zudem Stand 2023 Marktführer bei ERP-Systemen ist #cite(<ERP-Systeme_Book_Sarferaz>, supplement: "S.7").
Mit der Einführung von S/4HANA im Jahr 2015 hat SAP einen bedeutenden Schritt in der Entwicklung von #acr("ERP")-Systemen gemacht @SAP_1972. SAP S/4HANA ist ein ERP-System, das zur Planung von Unternehmensressourcen dient und sämtliche Abläufe funktionsübergreifend unterstützt #cite(<ERP_System_Brugger>,supplement: "S.96"). S/4HANA steht für die Bezeichnung High-performance Analitic Appliance (HANA) @HANA_Abkürzung_Informationen. Als Nachfolger der SAP Business Suite aus dem Jahr 2004 und Ablösung von SAP R/3, das erstmals eine Client-Server-Technologie einsetzte, bietet S/4HANA eine Reihe von Innovationen @SAP_1972.
Das Herzstück eines S/4HANA-Systems ist die HANA Datenbank, eine spaltenbasierte In-Memory Datenbank, die im Vergleich zu herkömmlichen Datenbanken einen schnelleren Datenzugriff und bessere Analysezeiten ermöglicht @HANA_Abkürzung_Informationen. Durch diese Eigenschaft können Echtzeitanalysen und Berechnungen zur Laufzeit realisiert und ermöglicht werden @HANA_Abkürzung_Informationen. Dies ist insbesondere bei der Verarbeitung von Big Data Analysen von großer Bedeutung @S4HANA_Overview.
S/4HANA bietet ebenfalls eine neue veränderte Benutzeroberfläche, namens SAP Fiori, die die bisherigen SAP GUI-Oberflächen ablöst @SAP_Fiori_Informationen. SAP Fiori ist dabei browserbasiert, was bedeutet, dass keine spezielle Software lokal auf dem Gerät installiert werden muss @SAP_Fiori_Informationen. Nutzer können SAP Fiori plattformunabhängig und flexibel über gängige Browser wie Google Chrome, Mozialla Firefox oder Safari aufrufen @SAP_Fiori_Informationen. Durch die Nutzung von SAP-Fiori Werkzeugen und -Vorlagen können Apps schnell entwickelt und eine konsistente Benutzererfahrung in den Apps bereit gestellt werden @SAP_Fiori_Overview.
Grundsätzlich haben Unternehmen bei SAP S/4HANA verschiedene Bereitstellungsoptionen @SAP_Deployment_Options : On-Premise, Private Cloud oder Public Cloud.
Die SAP S/4HANA Public Cloud ist die #acr("SaaS")-Edition der SAP S/4HANA ERP-Systems, dabei handelt es sich um eine öffentliche Cloud, die von SAP gehostet und betrieben wird @SAP_Deployment_Options. Bei diesem Modell wird die Software-Instanz mit anderen Kunden geteilt und über ein Abonnementsystem zur Verfügung gestellt @SAP_Deployment_Options.
Erweiterungen der SAP S/4HANA Cloud werden durch die SAP #acr("BTP")-Extension Suite mit von SAP freigegebenen und verwalteten Application Programming Interfaces ("whitelisted APIs") ermöglicht @SAP_Deployment_Options.
Die SAP S/4HANA Private Cloud ermöglicht den Kunden, ihre Deployment-Option genau auf ihre Bedürfnisse abzustimmen. Diese Option basiert auf dem S/4 On-Premise Solution Stack, der in der private Cloud gehostet und von Hyperscalern verwaltet wird @SAP_Deployment_Options.
Bei der On-Premise Lösung hosten Unternehmen die Software auf eigenen Servern, während bei der Private-Cloud Lösung die Software auf Servern von Drittanbietern (Hyperscalern) als Single-Tenant betrieben wird @SAP_Deployment_Options. Single-Tentant beschreibt in diesem Kontext, eine dedizierte, isolierte Cloud Umgebung, die nur für den spezifischen Kunden bereitgestellt wird @Multi_Single_Tenant. Im Gegensatz zu einer Multi-Tenant-Umgebung, in der mehrere Kunden (Mandanten) die gleiche Software-Instanz teilen, hat der Kunde in einer Single-Tenant-Lösung seine eigene Instanz der SAP-Software @Multi_Single_Tenant.
Die beiden eben beschriebenen Varianten bieten eine hohe Flexibilität für Unternehmen, um die Software an ihre individuellen Anforderungen und Geschäftsprozesse anzupassen @SAP_Private_Cloud.
Im Gegensatz dazu müssen sich Unternehmen bei der Public-Cloud-Lösung weitesgehend an den Standard des Systems halten, da die Software in einer Multi-Tenant-Architektur läuft und nur bedingt modifiziert werden kann @SAP_Anpassungen_Standard_Public_Cloud. Die On-Premise Lösung hingegen wird als Product as a Service unterstützt, jedoch nur noch bedingt vermarktet @S4HANA_Deployment_Options.
Die bedingte Anpassbarkeit der Public Cloud stellt Unternehmen vor die Herausforderung ihre Prozesse an den Standard anzupassen @SAP_Anpassungen_Standard_Public_Cloud.
SAP hat diese Problematik erkannt und bietet mit der Clean Core Strategie eine Lösung, welche sowohl die Vorteile der Standartisierung berücksichtigt, aber auch Flexibilität hinsichtlich der individuellen Anpassungen bietet @ERP_Clean_Core.
Die Clean Core Strategie von SAP verfolgt das Ziel, die Stabilität, Wartbarkeit und Updatesicherheit von SAP-Systemen zu verbessern @ERP_Clean_Core. Bei der Clean-Core Strategie geht es darum, den Kern (Core) des SAP-Systems standardisiert und unverändert zu erhalten @ERP_Clean_Core. Kundenspezifische Anpassungen und Erweiterungen sollen außerhalb des Kernsystems in seperaten Erweiterungsumgebungen, beispielsweise der #acr("BTP") durchgeführt werden @ERP_Clean_Core. Durch die Verwendung von definierten Schnittstellen, Erweiterungspunkten und #acr("API")s können Unternehmen ihre SAP-Systeme flexibel an Geschäftsanforderungen anzupassen, ohne den Kern zu verändern @ERP_Clean_Core.
Dies ermöglicht eine bessere Wartbarkeit und schnellere Updates, da die Integrität des SAP-Cores erhalten bleibt @ERP_Clean_Core.
=== Grundlagen Projektsystem (PS)
// Was versteht man unter einem Projekt ?
Innerhalb des Projektmanagements unterscheidet man zwischen fremdfinanzierten (Kundenprojekte) und eigenfinanzierten Projekten (Gemeinkostenprojekte oder Investitionsprojekte) @Projektsystem_SAP_Help. Unter Gemeinkosten allgemein versteht man Kosten , die nicht direkt einem Produkt zugeordnet werden können #cite(<Handbuch_Erfolgsrechnung_Wertsteigerung>, supplement: "S. 257").
Das #acr("PS") ist ein zentraler Bestandteil des #acr("ERP")-Systems von SAP und spielt eine wesentliche Rolle bei der Verwaltung von Projekten @Projektsystem_SAP_Help. Durch das Projektsystem PS der SAP können die Planung, die Steuerung und die Überwachung von komplexen Geschäftsprojekten erleichtert werden @Projektsystem_SAP_Help. Zudem können Module wie das #acr("FI"), das #acr("CO") und die #acr("MM") integriert werden @Projektsystem_Integration. Ein Projekt in SAP ERP-Systemen besteht aus einer Projektdefinition, einem Projektstrukturplan und Netzplänen #cite(<SAP_ERP-Praxishandbuch_Projektmanagement>, supplement: "S.95"). Dabei bildet die Projektdefinition den allgemeinen organisatorischen Rahmen ab, der Projektstrukturplan bildet den Aufbau des Projekts ab und die Netzplänen den Ablauf #cite(<SAP_ERP-Praxishandbuch_Projektmanagement>, supplement: "S.95"). Die Projektdefinition besteht aus keinem, einem oder beliebig vielen Teilprojekten, den sogenannten PSP-Elementen #cite(<SAP_ERP-Praxishandbuch_Projektmanagement>, supplement: "S.95").
//hier weiter
Der Ablauf eines Projekts im SAP PS kann in mehrere aufeinander aufbauende Phasen untergliedert werden.
Die erste Phase umfasst die Projektinitialisierung, dabei wird das Projekt definiert und die ersten Planungsdaten erfasst @Projektsystem_1NT_Process_Navigator. Dazu wird ein #acr("PSP") erstellt, der die zentralen Meilensteine und Arbeitsblöcke enthält @Projektsystem_1NT_Process_Navigator. Die "Arbeitsblocke" sind die letzendlichen PSP-Elemente, die genutzt werden, um das Projekt zu strukturieren @Projektsystem_1NT_Process_Navigator.
Anschließend folgt die Projektplanung, wobei der Detaillierungsgrad erhöht wird und mit Ressourcen, Terminen und Kosten kalkuliert wird @Projektsystem_1NT_Process_Navigator.
Der nächste Schritt umfasst die eigentliche Projektdurchführung. Dabei werden die zuvor erstellten Projektpläne operativ umgesetzt @Projektsystem_1NT_Process_Navigator. Um eine effiziente Projektdurchführung zu ermöglichen, werden Aufgaben konkret zugewiesen und Fortschritte überwacht @Projektsystem_1NT_Process_Navigator.
Über die Gesamte Projektdauer ist das #acr("CO") unerlässlich, da das dieses dabei die Kosten, Termine und die Qualität überwacht @Projektsystem_1NT_Process_Navigator. Zudem werden in dieser Phase Abweichungsanalysen und das Risikomanagement durchgeführt.
Der letzte Schritt ist der Projektabschluss @Projektsystem_1NT_Process_Navigator. Dieser erfolgt nach der Fertigstellung des Projekts @Projektsystem_1NT_Process_Navigator. In diesem Schritt erfolgt die letztendliche Kontrolle und Abrechnung. Zudem werden alle Ergebnisse dokumentiert und das Projekt wird formal beendet @Projektsystem_1NT_Process_Navigator.
// Grundlagen
//! Muss gemacht werden
//? Frage ich nach
//* Highlight
== Business Technology Platform (BTP)
#figure(caption:
"SAP cloud applications and SAP BTP"
, image(width: 15cm,
"assets/BTP001_2406_U2L2_01.png"
))
<sap_portfolio_btp>
=== Grundlagen BTP //BTP Grafik in den Anhang
// Grundlagen direkt darunter oder extra Kapitel
Die #acr("BTP") der SAP ist eine Innovationsplattform im SAP-Ökosystem @SAP_BTP, welche für SAP-Anwendungen in der Cloud optimiert ist @SAP_BTP. Sie unterstützt Unternehmen bei digitalen Transformationsprozessen und hilft, innovative Geschäftsanwendungen zu entwicklen @SAP_BTP . Dabei stellt die #acr("BTP") eine Schnittstelle zwischen bestehenden Systemen und der Entwicklung neuer Technologien und Anwendungen dar (@sap_portfolio_btp). Dabei können Geschäftsprozesse miteinander verbunden, erweitert geplant und integriert werden @SAP_BTP. Durch die Möglichkeit einer Low-Code und Pro-Code Anwendungsentwicklung bietet die #acr("BTP") eine intuitive Entwicklungsumgebung, um die Geschäftsprozesse des Zielunternehmens beschleunigt aber trotzdem kontrolliert, in einer Sicheren Umgebung, zu entwicklen @SAP_BTP.
Die #acr("BTP") stellt das SAP Build Tool bereit, welches mit Hilfe von KI die Entwicklung und Automatisierung von Anwendungen beschleunigt @SAP_Build.
Die #acr("BTP") bietet vorkonfigurierte Datenmodelle, Integrationen von Workflows, #acr("API")s und #acr("KI") Services @SAP_BTP. Durch diese Dienste können neue Anwendungen bereitgestellt werden, Prozesse integriert, Aufgaben automatisiert, Anwendungen mit Chatbots versehen und Daten und deren Auswirkungen für das gesamte Unternehmen analysiert werden @SAP_BTP. Dadurch können Unternehmen ihre Prozesse optimieren, Innovationen vorantreiben und Wettbewerbsvorteile erlangen, da diese flexibel auf sich ändernde Marktanforderungen reagieren können @SAP_BTP.
Die #acr("BTP") basiert auf einem modularen Konzept und umfasst folgende Hauptbereiche in einer zentralen Umgebung: Das Datenbank/Datenmanagement darunter auch die Echtzeitsichten von Daten, die Analytik, die Anwendungsentwicklung und Automatisierung, die Integration und Künstliche Intelligenz (@sap_portfolio_btp)@SAP_BTP.
=== SAP Build Process Automation
SAP Build bietet unterschiedliche Tools und Werkzeuge auf der #acr("BTP") an, die den Anwender bei der Entwicklung und Automatisierung von Anwendungen unterstützen @SAP_Build.
Ein zentrales Element ist die Build Process Automation, die als SAP-Lösung zur Prozessautomatisierung dient. Sie unterstützt dabei Workflows und Bots, sowohl für SAP- als auch für Fremdsysteme @SAP_Build. Die Plattform ermöglicht es, Prozesse grafisch darzustellen und über einen KI-gestützten Editor, der Drag-and-Drop-Funktionalitäten bietet, Automatisierungen ohne Programmierkenntnisse zu erstellen und anzupassen @SAP_Build.
#figure(caption:
"SAP Business Process Automation Editor"
, image(width: 15cm,
"assets/Business Process Automation.jpg"
))
<Business_Process_Automation>
Durch die geringe Komplexität werden keine spezialisierten Entwickler benötigt, um Prozesse zu automatisieren, da dies durch die Low-Code/No-Code Entwicklung durch die entsprechenden Fachbereiche entwickelt werden kann (@Business_Process_Automation). Zudem werden vorkonfigurierte Szenarien bereitgestellt, um Standardabläufe automatisieren zu können @SAP_Build.
=== SAP Workflow Management Tool
Ein weiteres Feature der SAP Business Process Automation ist das SAP Workflow Management Tool @SAP_Build_Workflow.
#figure(caption:
[SAP Workflow Management #cite(<Workflow_Management_Abbildung>)]
, image(width: 15cm, "assets/workflow-management.png"
))<workflow_management>
Der Begriff "Workflow" wird von der SAP wie folgt definiert:
Unter einem Workflow versteht man die "Abfolge von miteinander verbundenen Aktivitäten oder Aufgaben, die ausgeführt werden, um ein bestimmtes Ergebnis zu erzielen" @SAP_Workflow. Aufeinanderfolgende zu bearbeitende Prozessschritten werden sobald die Workflow-Instanz aufgerufen wird abgearbeitet @SAP_Workflow.
Betrachtet man den Begriff Workflow-Mangement so wird dieser als "Prozess der Digitalisierung einzelner Prozesse und die Verwaltung der Ergebnisse definiert" @SAP_Workflow. Die @workflow_management zeigt das Potential des Workflow Managements auf. Dabei stehen auf der linken Seite die Applicationen für welche Workflows zur automatisierung verwendet werden können. Auf der rechten Seite der Abbildung werden die nutzbaren #acr("API")s gezeigt, und welche "Aufgaben" durch Workflows automatisiert werden können (@workflow_management).
Das Feature ermöglicht die Prozessautomatisierung durch die einfache Erstellung eines Workflows mit Hilfe von Drag and Drop - Funktionalitäten (siehe @workflow_editor). Dabei können Formulare verwaltet, eine Entscheidungslogik verwaltet und Prozessabläufe erstellt, angepasst und organisiert werden @SAP_Build_Workflow.
//Link/Quelle einfügen
#figure(caption:
"SAP Workflow Editor"
, image(width: 15cm,
"assets/Workflow-2.png"
))
<workflow_editor>
= Wissenschaftliche Methodiken
// Inhaltsananalyse nach Myring
// Inhaltsanalyse nach Kuckartz
// Wichtig: Warum wurden folgende Methoden gewählt
// Gibt es eine wissenschaftliche Methode zur Implementierung
//*Aufzählung möglicher Methoden
== Auswahl der Methodiken
Zur methodischen Erarbeitung des vorliegenden Themas kommen verschiedene Vorgehensweisen in Betracht.
Dazu gehören Experteninterviews, Umfragen, Qualitative Inhaltsanalyse nach Mayring, Anforderungsanalyse, Literaturrecherche und die Evaluierung.
Um die theoretischen Grundlagen der Arbeit wurden anhand von einer Literaturrecherche ermittelt.
Die Literaturrecherche eignet sich im Grundlagenteil der Arbeit dazu, relevante Informationen an die Standarderweiterung zu erarbeiten.
Des weiteren wurde eine Methodik für die eigentliche Anforderungserhebung benötigt.
Das erste Auswahlkriterium war die Frage nach einer qualitativen Vorgehensweise, da eine quantitative Vorgehensweise bei einer sehr neuen Standarderweiterung nur wenig Grundlage findet.
Ausgewählt wurde dabei die Durchführung von Experteninterviews zur Ermittlung von Anforderungen rund um die Projektbudgetierung in einem SAP S/4HANA Public Cloud System. Experteninterviews zählen zu den qualitativen Forschungsmethoden #cite(<Experteninterviews>, supplement : "S.23"). Die gewonnenen Anforderungen wurden anschließend mit Hilfe einer Anforderungsanalyse herausgearbeitet. Eine Inhaltsanalyse nach Mayring wurde für die Bestimmung der Anforderungen nicht gewählt, da dafür mehrere Texte benötigt werden, um Übereinstimmungen und ein representatives Ergebnis herbeiführen zu können. Nachdem die Anforderungen bestimmt wurden, wurde die Standarderweiterung implementiert und anschließend evaluiert, ob die Standarderweiterung die Anforderungen erfüllt oder nicht.
== Experteninterviews
//Aufbau einer Frage zeigen (Wie werden solche Fragen in einem Interview aufgebaut )
Für die Gewinnung der Informationen zu dieser Arbeit wurden verschiedene Interviews durchgeführt. Dabei wurden zwei verschiedene Funktionsfelder befragt, um mehrere Sichtweisen und Perspektiven zu ermöglichen. Es wurden Experten der Beratung für einen prozessualen Einblick und Kunden für eine Kundenperspektive befragt.
Experteninterviews lassen sich in drei Typen gliedern: strukturiert, semistrukturiert und unstrukturiert. //Quelle
Nach S.Wassermann (2015) ist ein semistrukturiertes, also leitfdengestütztes offenes Interview als Erhebungsinstrument zu empfehlen, da die zuvor definierten Fragen beantworten werden können, jedoch die Freiheit und Flexibilität besteht, weitere Nachfragen stellen zu können. //Zitat einfügen
Die Interviews in dieser Arbeit weisen dabei einen semistrukturierten Aufbau auf.
== Interviewleitfäden
*Interviewleitfaden Berater*
+ Können Sie bitte Ihre berufliche Rolle und Aufgabe beschreiben ?
+ Wie genehmigen Unternehmen typischerweise das Projektbudget ohne ein Projektbudget-Genehmigungstool ?
+ Welche Herausforderungen treten bei der aktuellen Handhabung der Projektbudgets auf ?
+ Welche Relevanz hat ein digitales Projektgenehmigungstool bei Ihren Kunden ?
+ Welche Anforderungen/Kriterien sehen Sie bei Kunden für die Implementierung eines neuen Budgetgenehmigungsprozesses in SAP S/4HANA?
*Interviewleitfaden Kunde*
+ Können Sie bitte Ihre berufliche Rolle und Aufgabe beschreiben ?
+ Wie erfolgt aktuell die Genehmigung von Projektbudgets in Ihrem Unternehmen und welche Herausforderungen gibt es dabei ?
+ Welche Relevanz hat ein digitales Projektgenehmigungstool bei Ihnen ?
+ Welche Herausforderungen/Anforderungen haben Sie an einen Genehmigungsprozess für Projektbudgets ?
+ Wer wird in Ihrem Unternehmen das Projektbudget genehmigen, welche Stakeholder sind am Genehmigungsprozess beteiligt ?
= Anforderungsanalyse
== Auswertung der Experteninterviews
== Darstellung und Priorisierung der Experteninterviewergebnisse
= Implementierung der Standarderweiterung
Um die Standarderweiterung implementieren zu können, stellt die SAP einen Configuration & User Guide auf dem Business Accelerator Hub zur verfügung @SAP_Guide.
In der Webanwendung "Business Accelerator Hub" der SAP findet man alle #acr("API")s, die für die S/4HANA Cloud öffentlich verfügbar sind @SAP_Accelorrator_Hub. Diese können dabei ermittelt, erkundet und getestet werden @SAP_Accelorrator_Hub.
== Überblick SAP S/4HANA Extension - Budget Approval
#figure(caption:
[SAP S/4HANA Extension - Budget Approval #cite(<SAP_Guide>)],
image(width: 10cm,
"assets/BudgetApproval.png"
))
<budget_approval>
Die Abbildung zeigt eine Übersicht über den Genehmigungsprozess (@budget_approval). Der Budgetgenehmigungsprozess ermöglicht Kunden Genehmigungen oder Überprüfungen des geplanten Budgets zu automatisieren. //Quelle User Guide
Dabei greift der Enduser auf das Fiori Launchpad zu. Das Fiori Launchpad ist der allgemeine Einstiegspunkt zu SAP Fiori-Anwendungen auf mobilden und Dektop-Geräten @SAP_Fiori_Launchpad.
Der erste Schritt des Budgetgenehmigungsprozesses ist der Geschäftsanwender (Antragssteller) welcher eine Budgetvorlage in Excel hoch lädt und die Genehmigung des Budgets beantragt. //Quelle
Dabei werden die Genehmigungsgruppen anhand des Genehmigungsbudgets und der Währung bestimmt (siehe )
//ASXRgrQRAPXlMk>VXTfida9scAoXJtgAunyAvRmc
//https://my300470-api.s4hana.ondemand.com
= Evaluierung der Ergebnisse
= Zusammenfassung
== Fazit
== Kritische Reflexion der Arbeit
== Ausblick
|
|
https://github.com/olivierbma/typst-cmp | https://raw.githubusercontent.com/olivierbma/typst-cmp/main/README.md | markdown | # typst-cmp
Small Neovim plugin for creating snippets from imported files
This is a small plugin that finds the imported files and pases them to find top level functions that return components and create luasnip snippets out of them. They are then inserted into the nvim-cmp completion engine.
The plugin supports `#import "@local/test:0.1.0": *` and `#import "test.typ": *` imports
# To install it
If you use Lazy, just add the following lines to your config:
```lua
return {
'olivierbma/typst-cmp',
dependencies = {'L3MON4D3/LuaSnip', 'hrsh7th/nvim-cmp'},
}
```
# How to configure
The configuration is very simple, you just need to add this to your config (preferably in your ftplugin folder for typst files)
```lua
require('typst-cmp').setup()
```
# What I want to add
- [x] Recursive imports
- [ ] More configuration options
- [ ] Support for `#import "@preview/test:0.1.1": *`
- [ ] Better support of partial imports (right now `#import "@preview/test:0.1.1": foo` is treated as `#import "@preview/test:0.1.1": *`
- [ ] Async loading and parsing of files
- [ ] Auto update snippets on file changes
|
|
https://github.com/daskol/typst-templates | https://raw.githubusercontent.com/daskol/typst-templates/main/icml/icml2024.typ | typst | MIT License | // Workaround for the lack of an `std` scope.
#let std-bibliography = bibliography
// Metrical size of page body.
#let body = (
width: 6.75in,
height: 9.0in,
)
// Default font sizes from original LaTeX style file.
#let font-defaults = (
tiny: 6pt,
scriptsize: 7pt,
footnotesize: 9pt,
small: 9pt,
normalsize: 10pt,
large: 12pt,
Large: 14pt,
LARGE: 17pt,
huge: 20pt,
Huge: 25pt,
)
// We prefer to use Times New Roman when ever it is possible.
#let font-family = ("Times New Roman", "Nimbus Roman", "TeX Gyre Termes")
#let font = (
Large: font-defaults.Large + 0.4pt, // Actual font size.
footnote: font-defaults.footnotesize,
large: font-defaults.large,
small: font-defaults.small,
normal: font-defaults.normalsize,
script: font-defaults.scriptsize,
)
#let format_author_names(authors) = {
// Formats the author's names in a list with commas and a
// final "and".
let author_names = authors.map(author => author.name)
let author-string = if authors.len() == 2 {
author_names.join(" and ")
} else {
author_names.join(", ", last: ", and ")
}
return author_names
}
#let statement(kind: "statement", supplement: none, content) = {
if supplement == none {
supplement = upper(kind.first()) + lower(kind.slice(1))
}
figure(
kind: kind,
supplement: [#supplement],
numbering: "1",
content,
)
}
#let statement_render(supplement_fn: strong, body_fn: emph, it) = {
block(above: 11.5pt, below: 11.5pt, {
supplement_fn({
it.supplement
if it.numbering != none {
[ ]
// Render prefix (heading) part of a counter.
let prefix = locate(loc => {
let index = counter(heading).at(loc)
let prefix = index.slice(0, -1) // Ignore the last level.
let header = query(selector(heading).before(loc), loc,).at(-1)
return numbering(header.numbering, ..prefix)
})
[#prefix]
// Render last digit of a counter.
let ix = locate(loc => {
let ix_assump = counter(figure.where(kind: "assumption")).at(loc)
let ix_state = counter(figure.where(kind: "statement")).at(loc)
let ix_notice = counter(figure.where(kind: "notice")).at(loc)
let index = ix_assump.first() + ix_state.first() + ix_notice.first()
return numbering(it.numbering, index)
})
[#ix]
}
[. ]
})
body_fn(it.body)
})
}
#let notice_render(it) = statement_render(
supplement_fn: emph,
body_fn: body => body,
it)
#let assumption(content) = {
statement(kind: "assumption", supplement: [Assumption], content)
}
#let definition(content) = {
statement(kind: "assumption", supplement: [Definition], content)
}
#let corollary(content) = { statement(supplement: [Corollary], content) }
#let lemma(content) = { statement(supplement: [Lemma], content) }
#let proposition(content) = { statement(supplement: [Proposition], content) }
#let theorem(content) = { statement(supplement: [Theorem], content) }
#let note(content) = { statement(kind: "notice", supplement: [Note], content) }
#let remark(content) = {
statement(kind: "notice", supplement: [Remark], content)
}
// Render reference to theorem-like figures (definitions, lemmas, theorems, and
// so on).
#let render-ref-statement(it) = {
// Ignore all elements that are not figures and not theorem-like figures.
let el = it.element
if el == none or el.func() != figure {
return it
} else if el.kind not in ("assumption", "notice", "statement") {
return it
}
// Reference number for theorem-like figures has form
// "<section>.<number>". So, we get the section number if there is any.
let loc = el.location()
let ix_heading = counter(heading).at(loc)
let prefix = ix_heading.at(0, default: 0)
// And now we compute a number of a theorem-like figure in the section.
let ix_assump = counter(figure.where(kind: "assumption")).at(loc)
let ix_state = counter(figure.where(kind: "statement")).at(loc)
let ix_notice = counter(figure.where(kind: "notice")).at(loc)
let suffix = ix_assump.first() + ix_state.first() + ix_notice.first()
// Finally, render it as a content.
el.supplement
[~]
numbering("1.1", prefix, suffix)
}
// And a definition for a proof.
#let proof(body) = block(spacing: 11.5pt, {
emph[Proof.]
[ ] + body
h(1fr)
box(scale(160%, origin: bottom + right, sym.square.stroked))
})
#let make_figure_caption(it) = {
set align(center)
block(width: 100%, {
set align(left)
set text(size: font.small)
emph({
it.supplement
if it.numbering != none {
[ ]
it.counter.display(it.numbering)
}
it.separator
})
[ ]
it.body
})
}
#let make_figure(caption_above: false, it) = {
// set align(center + top)
place(center + top, float: true,
block(breakable: false, width: 100%, {
if caption_above {
it.caption
}
v(0.1in, weak: true)
it.body
v(0.1in, weak: true)
if not caption_above {
it.caption
}
}))
}
#let anonymous-author = (
name: "<NAME>",
email: "<EMAIL>",
affl: ("anonymous-affl", ),
)
#let anonymous-affl = (
department: none,
institution: "Anonymous Institution",
location: "Anonymous City, Anonymous Region",
country: "Anonymous Country",
)
#let anonymous-notice = [
Preliminary work. Under review by the International Conference on Machine
Learning (ICML). Do not distribute.
]
#let arxiv-notice = []
#let public-notice = [
_Proceedings of the 41#super[st] International Conference on Machine
Learning_, Vienna, Austria. PMLR 235, 2024. Copyright 2024 by the author(s).
]
#let make-author(author, affl2idx) = {
// Sanitize author affilations.
let affl = author.at("affl")
if type(affl) == str {
affl = (affl,)
}
// Make a list of superscript indices.
let indices = affl.map(it => str(affl2idx.at(it)))
let has-equal-contrib = author.at("equal", default: false)
if has-equal-contrib {
indices.insert(0, "*")
}
// Render author and affilation references to content.
set text(size: font.normal, weight: "regular")
return strong(author.name) + super(typographic: false, [
#indices.join(" ")
])
}
#let make-affilations-and-notice(authors, affls) = {
let info = ()
// Add equal contribution notice.
let has-equal-contrib = authors.fold(false, (acc, it) => {
let equal-contrib = it.at("equal", default: false)
return acc or equal-contrib
})
if has-equal-contrib {
info.push(super[\*] + [Equal contribution])
}
// Prepare list of affilations.
let ordered-affls = authors.map(it => it.affl).flatten().dedup()
let affilations = ordered-affls.enumerate(start: 1).map(pair => {
let (ix, it) = pair
let affl = affls.at(it, default: none)
assert(affl != none, message: "unknown affilation: " + it)
// Convert structured affilation representation to plain one (array).
if type(affl) == dictionary {
let keys = ("department", "institution", "location", "country")
let parts = ()
for key in keys {
let val = affl.at(key, default: none)
if val != none {
parts.push(val)
}
}
affl = parts
}
// Validate affilation representation.
assert(type(affl) == array,
message: "wrong affilation type: " + type(affl))
assert(affl.len() > 0,
message: "empty affilation: " + it + " :" + repr(affl))
// Finally, join parts of affilation.
return super(str(ix)) + affl.join(", ")
})
if affilations != () {
info.push(affilations.join([ ]) + [.])
}
// Prepare list of corresponding authors (author which has its email).
let correspondents = authors.fold((), (acc, it) => {
let email = it.at("email", default: none)
if email != none {
let mailto = link("mailto:" + it.email, it.email)
acc.push([#it.name \<#mailto\>])
}
return acc
})
if correspondents != () {
info.push([Correspondence to: ] + correspondents.join(", ") + [.])
}
return info
}
/**
* icml2024
*
* Args:
* accepted: Valid values are `none`, `false`, and `true`. Missing value
* (`none`) is designed to prepare arxiv publication. Default is `false`.
*/
#let icml2024(
title: [],
authors: (),
keywords: (),
date: auto,
abstract: none,
bibliography: none,
header: none,
appendix: none,
accepted: false,
body,
) = {
if header == none {
header = title
}
// Sanitize authors and affilations arguments.
if accepted != none and not accepted {
authors = ((anonymous-author,), (anonymous-affl: anonymous-affl))
}
let (authors, affls) = authors
// Configure document metadata.
set document(
title: title,
author: authors.map(it => it.name),
keywords: keywords,
date: date,
)
// Prepare affilation and notice footnote.
let contrib-info = make-affilations-and-notice(authors, affls)
let make-contribs() = {
set text(size: font.small)
set par(leading: 0.5em, justify: true)
line(length: 0.8in, stroke: (thickness: 0.05em))
block(spacing: 0.45em, width: 100%, { // Footnote line.
h(1.2em) // BUG: https://github.com/typst/typst/issues/311
if contrib-info != () {
contrib-info.join([ ])
parbreak()
}
if accepted == none {
arxiv-notice
} else if accepted {
public-notice
} else {
anonymous-notice
}
})
}
// Prepare authors and footnote anchors.
let ordered-affls = authors.map(it => it.affl).flatten().dedup()
let affl2idx = ordered-affls.enumerate(start: 1).fold((:), (acc, it) => {
let (ix, affl) = it
acc.insert(affl, ix)
return acc
})
let make-authors() = authors.map(it => make-author(it, affl2idx))
set page(
paper: "us-letter",
margin: (left: 0.75in,
right: 8.5in - (0.75in + 6.75in),
top: 1.0in,
bottom: 11in - 1in - 9in),
header-ascent: 10pt,
header: locate(loc => {
// The first page is a title page. It does not have running header.
let pageno = counter(page).at(loc).first()
if pageno == 1 {
return
}
// Render running title since the second page.
set align(center)
set text(size: font.footnote, weight: "bold")
block(spacing: 0pt, fill: none, {
set block(spacing: 0em)
text(size: font.small, header)
v(3.5pt) // By default, fancyhdr spaces 4pt.
line(length: 100%, stroke: (thickness: 1pt))
})
}),
footer-descent: 25pt - font.normal,
footer: locate(loc => {
let i = counter(page).at(loc).first()
align(center, text(size: font.normal, [#i]))
})
)
// Main body font is Times (Type-1) font.
set columns(2, gutter: 0.25in)
set par(justify: true, leading: 0.58em)
set text(font: font-family, size: font.normal)
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
}
// Reset "theorem"counters.
if it.level == 1 {
counter(figure.where(kind: "assumption")).update(0)
counter(figure.where(kind: "statement")).update(0)
counter(figure.where(kind: "notice")).update(0)
}
set align(left)
if it.level == 1 {
text(size: font.large, weight: "bold")[
#v(0.25in, weak: true)
#number
*#it.body*
#v(0.15in, weak: true)
]
} else if it.level == 2 {
text(size: font.normal, weight: "bold")[
#v(0.2in, weak: true)
#number
*#it.body*
#v(0.13in, weak: true)
]
} else if it.level == 3 {
text(size: font.normal, weight: "regular")[
#v(0.18in, weak: true)
#number
#smallcaps(it.body)
#v(0.1in, weak: true)
]
}
}
set figure.caption(separator: [.])
show figure: set block(breakable: false)
show figure.caption.where(kind: table): it => make_figure_caption(it)
show figure.caption.where(kind: image): it => make_figure_caption(it)
show figure.where(kind: image): it => make_figure(it)
show figure.where(kind: table): it => make_figure(it, caption_above: true)
show figure.where(kind: "assumption"): it => {
statement_render(body_fn: body => body, it)
}
show figure.where(kind: "statement"): it => statement_render(it)
show figure.where(kind: "notice"): it => notice_render(it)
// Math equation numbering and referencing.
set math.equation(numbering: "(1)")
show ref: it => {
let eq = math.equation
let el = it.element
if el != none and el.func() == eq {
let numb = numbering(
"1",
..counter(eq).at(el.location())
)
let color = rgb(0%, 8%, 45%) // Originally `mydarkblue`. :D
let content = link(el.location(), text(fill: color, numb))
[(#content)]
} else if el != none and el.func() == heading {
let numb = numbering(
el.numbering,
..counter(el.func()).at(el.location()))
if numb.at(-1) == "." {
numb = numb.slice(0, -1)
}
let color = rgb(0%, 8%, 45%) // Originally `mydarkblue`. :D
let content = text(fill: color, numb)
// If numbering starts with letter then the heading is an appendix.
let supplement = el.supplement
if numb.at(0) not in ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9") {
supplement = [Appendix]
}
link(el.location())[#supplement~#content]
} else if el != none and el.func() == figure {
let numb = numbering(
el.numbering,
..counter(figure.where(kind: el.kind)).at(el.location()))
if numb.at(-1) == "." {
numb = numb.slice(0, -1)
}
let color = rgb(0%, 8%, 45%) // Originally `mydarkblue`. :D
let content = text(fill: color, numb)
link(el.location())[#el.supplement~#content]
} else {
render-ref-statement(it)
}
}
// Configure algorithm rendering.
counter(figure.where(kind: "algorithm")).update(0)
show figure.caption.where(kind: "algorithm"): it => {
strong[#it.supplement #it.counter.display(it.numbering)]
[ ]
it.body
}
show figure.where(kind: "algorithm"): it => {
place(top, float: true,
block(breakable: false, width: 100%, {
set block(spacing: 0em)
line(length: 100%, stroke: (thickness: 0.08em))
block(spacing: 0.4em, it.caption) // NOTE: No idea why we need it.
line(length: 100%, stroke: (thickness: 0.05em))
it.body
line(length: 100%, stroke: (thickness: 0.08em))
})
)
}
// Render title.
text(size: font.Large, weight: "bold")[
#v(0.5pt)
#line(length: 100%)
#v(1pt)
#show par: set block(spacing: 18pt)
#align(center)[#title]
#v(1pt)
#line(length: 100%)
]
v(0.1in - 1pt)
{
// Render authors.
set align(center)
make-authors().map(it => {
box(inset: (left: 0.5em, right: 0.5em), it)
}).join()
}
v(0.2in)
columns(2, gutter: 0.25in, {
set text(size: font.normal)
show par: set block(spacing: 11pt)
// Render abstract.
// ICML instruction tels that font size of `Abstract` must equal to 11 but
// it does not like so.
align(center, text(size: font.large, [*Abstract*]))
pad(left: 2em, right: 2em, abstract)
v(0.12in)
// Place contribution and notice at the bottom of the first column.
place(bottom, float: true, clearance: 0.5em, {
set block(spacing: 0pt)
make-contribs()
})
// Display body.
set text(size: font.normal)
body
// Display the bibliography, if any is given.
if bibliography != none {
show std-bibliography: set text(size: font.normal)
set std-bibliography(title: "References", style: "icml2024.csl")
bibliography
}
})
if appendix != none {
pagebreak()
counter(heading).update(0)
counter("appendices").update(1)
set heading(
numbering: (..nums) => {
let vals = nums.pos()
let value = "ABCDEFGHIJ".at(vals.at(0) - 1)
return value + "." + nums.pos().slice(1).map(str).join(".")
}
)
appendix
}
}
// NOTE We provide table support based on tablex package. It does not
// correspond closely to LaTeX's booktabs but it is the best of what we have at
// the moment.
#import "@preview/tablex:0.0.7": cellx, hlinex, tablex
// Tickness values are taken from booktabs.
#let toprule = hlinex(stroke: (thickness: 0.08em))
#let bottomrule = toprule
#let midrule = hlinex(stroke: (thickness: 0.05em))
#let map-col(mapper, ix, jx, content, ..args) = {
return mapper(ix, jx, content, ..args)
}
#let map-row(mapper, ix, row, ..args) = {
return row.enumerate().map(el => map-col(mapper, ix, ..el, ..args))
}
#let map-cells(cells, mapper, ..args) = {
return cells.enumerate().map(el => map-row(mapper, ..el, ..args)).flatten()
}
// Helper routine for turning off equation numbering.
#let eq = it => {
set math.equation(numbering: none)
it
}
// Vertical ruler on left margin of a page.
#let itoa(val) = {
if val > 999 {
return str(val)
} else if val > 99 {
return str(val)
} else if val > 9 {
return "0" + str(val)
} else {
return "00" + str(val)
}
}
#let vruler(page: 0, offset: 0pt, fill: none) = {
let count = 55
let numbers = range(page * count, (page + 1) * count)
let content = numbers.map(it => itoa(it)).join([ \ ])
let sidebar = block(width: 15pt, height: 9in, fill: fill)[
#set text(fill: rgb(70%, 70%, 70%))
#set par(leading: 5.2pt)
#align(right, content)
]
return place(
top,
sidebar,
dx: -30pt,
dy: offset,
float: false)
}
#let cite-color = rgb(0%, 8%, 45%)
/**
* Alternative citing routine.
*/
#let refer(..keys, color: cite-color) = {
let citations = keys.pos().map(key => cite(key)).join([ ])
return [(] + text(fill: color, citations) + [)]
}
/**
* Simple routine for rewriting content. It replaces a sequence of references
* that are joined with spaces or line breaks (elements without width).
*/
#let rewrite-citations(doc, color: cite-color) = style(styles => {
let atoms = doc.children
let body = []
let ix = 0
while ix < atoms.len() {
let atom = atoms.at(ix)
if atom.func() != ref {
body = body + [#atom]
ix += 1
} else {
// Look-a-head for other refs.
let refs = (atom, )
let jx = ix + 1
while jx < atoms.len() {
// If the next one content block is a reference then append reference
// to the list of references.
let lookahead = atoms.at(jx)
if lookahead.func() == ref {
refs.push(lookahead)
jx += 1
continue
}
// Now, we assume that if the width of content block is zero then it is
// a space or line break. Thus we skip it and make another iteration.
let shape = measure(lookahead, styles)
if shape.width == 0pt {
jx += 1
continue
}
// Otherwise, we stop iterations.
break
}
// Combine refs into single citation, and wrap it into context with
// colored text.
let citation = refs.join([])
body = body + [(] + text(fill: color, citation) + [)]
// Advance iterator on number of continues block of citations.
ix += jx - ix
}
}
return body
})
|
https://github.com/frectonz/the-pg-book | https://raw.githubusercontent.com/frectonz/the-pg-book/main/book/111.%20twitter.html.typ | typst | twitter.html
Why Twitter is a Big Deal
April 2009Om Malik is the most recent of many people
to ask why Twitter is such a big deal.The reason is that it's a new messaging
protocol, where you don't specify the recipients.
New protocols are rare. Or more precisely, new
protocols that take off are.
There are only a handful of commonly used ones: TCP/IP
(the Internet), SMTP (email), HTTP (the web), and so on. So any
new protocol is a big deal. But Twitter is a protocol owned
by a private company. That's even rarer.Curiously, the fact that the founders of Twitter
have been slow to monetize it may in the long run
prove to be an advantage. Because they haven't tried
to control it too much, Twitter feels to everyone like
previous protocols. One forgets it's owned by a
private company. That must have made it easier for
Twitter to spread.
|
|
https://github.com/Quaternijkon/Typst_FLOW | https://raw.githubusercontent.com/Quaternijkon/Typst_FLOW/main/src/pdfpc.typ | typst | // Attribution: This file is based on the code from https://github.com/andreasKroepelin/polylux/blob/main/utils/pdfpc.typ
// Author: <NAME>
#let pdfpc-file(loc) = {
let arr = query(<pdfpc>).map(it => it.value)
let (config, ..slides) = arr.split((t: "NewSlide"))
let pdfpc = (
pdfpcFormat: 2,
disableMarkdown: false,
)
for item in config {
pdfpc.insert(lower(item.t.at(0)) + item.t.slice(1), item.v)
}
let pages = ()
for slide in slides {
let page = (
idx: 0,
label: 1,
overlay: 0,
forcedOverlay: false,
hidden: false,
)
for item in slide {
if item.t == "Idx" {
page.idx = item.v
} else if item.t == "LogicalSlide" {
page.label = str(item.v)
} else if item.t == "Overlay" {
page.overlay = item.v
page.forcedOverlay = item.v > 0
} else if item.t == "HiddenSlide" {
page.hidden = true
} else if item.t == "SaveSlide" {
if "savedSlide" not in pdfpc {
pdfpc.savedSlide = page.label - 1
}
} else if item.t == "EndSlide" {
if "endSlide" not in pdfpc {
pdfpc.endSlide = page.label - 1
}
} else if item.t == "Note" {
page.note = item.v
} else {
pdfpc.insert(lower(item.t.at(0)) + item.t.slice(1), item.v)
}
}
pages.push(page)
}
pdfpc.insert("pages", pages)
[#metadata(pdfpc)<pdfpc-file>]
}
/// Add some speaker notes to the slide for exporting to pdfpc file.
#let speaker-note(text) = {
let text = if type(text) == str {
text
} else if type(text) == content and text.func() == raw {
text.text.trim()
} else {
panic("A note must either be a string or a raw block")
}
[ #metadata((t: "Note", v: text)) <pdfpc> ]
}
#let end-slide = [
#metadata((t: "EndSlide")) <pdfpc>
]
#let save-slide = [
#metadata((t: "SaveSlide")) <pdfpc>
]
#let hidden-slide = [
#metadata((t: "HiddenSlide")) <pdfpc>
]
/// Configuration for the pdfpc export. You can export the pdfpc file by shell command `typst query --root . ./example.typ --field value --one "<pdfpc-file>" > ./example.pdfpc`.
///
/// Example:
///
/// ```typ
/// #pdfpc.config(
/// duration-minutes: 30,
/// start-time: datetime(hour: 14, minute: 10, second: 0),
/// end-time: datetime(hour: 14, minute: 40, second: 0),
/// last-minutes: 5,
/// note-font-size: 12,
/// disable-markdown: false,
/// default-transition: (
/// type: "push",
/// duration-seconds: 2,
/// angle: ltr,
/// alignment: "vertical",
/// direction: "inward",
/// ),
/// )
/// ```
///
/// - `duration-minutes` is the duration of the presentation in minutes.
///
/// - `start-time` is the start time of the presentation.
///
/// - `end-time` is the end time of the presentation.
///
/// - `last-minutes` is the number of minutes to show the last slide.
///
/// - `note-font-size` is the font size of the speaker notes.
///
/// - `disable-markdown` is a flag to disable markdown in the speaker notes.
///
/// - `default-transition` is the default transition for the slides.
#let config(
duration-minutes: none,
start-time: none,
end-time: none,
last-minutes: none,
note-font-size: none,
disable-markdown: false,
default-transition: none,
) = {
if duration-minutes != none {
[ #metadata((t: "Duration", v: duration-minutes)) <pdfpc> ]
}
let _time-config(time, msg-name, tag-name) = {
let time = if type(time) == "datetime" {
time.display("[hour padding:zero repr:24]:[minute padding:zero]")
} else if type(time) == "string" {
time
} else {
panic(msg-name + " must be either a datetime or a string in the HH:MM format.")
}
[ #metadata((t: tag-name, v: time)) <pdfpc> ]
}
if start-time != none {
_time-config(start-time, "Start time", "StartTime")
}
if end-time != none {
_time-config(end-time, "End time", "EndTime")
}
if last-minutes != none {
[ #metadata((t: "LastMinutes", v: last-minutes)) <pdfpc> ]
}
if note-font-size != none {
[ #metadata((t: "NoteFontSize", v: note-font-size)) <pdfpc> ]
}
[ #metadata((t: "DisableMarkdown", v: disable-markdown)) <pdfpc> ]
if default-transition != none {
let dir-to-angle(dir) = if dir == ltr {
"0"
} else if dir == rtl {
"180"
} else if dir == ttb {
"90"
} else if dir == btt {
"270"
} else {
panic("angle must be a direction (ltr, rtl, ttb, or btt)")
}
let transition-str = (
default-transition.at("type", default: "replace")
+ ":" +
str(default-transition.at("duration-seconds", default: 1))
+ ":" +
dir-to-angle(default-transition.at("angle", default: rtl))
+ ":" +
default-transition.at("alignment", default: "horizontal")
+ ":" +
default-transition.at("direction", default: "outward")
)
[ #metadata((t: "DefaultTransition", v: transition-str)) <pdfpc> ]
}
}
|
|
https://github.com/crd2333/crd2333.github.io | https://raw.githubusercontent.com/crd2333/crd2333.github.io/main/src/docs/Courses/计算机组成与设计/计算机抽象和技术.typ | typst | ---
order: 1
---
#import "/src/components/TypstTemplate/lib.typ": *
#show: project.with(
title: "计算机组成与设计",
lang: "zh",
)
#let tbl_white(white_row: 1 , content_size: 9pt,..args) = align(center, block[
#show table.cell: it => if it.y <= white_row - 1 {
set text(fill: white, stroke: white)
it
} else {
set text(size: content_size)
it
}
#tbl(..args)
])
= Computer Abstractions and Technology
== 计算机的发展历史
- 最早的电子计算机
- 计算机的迭代:Generation 1(1946-1957)、Generation 2(1958-1964)、Generation 3(1965-1970)、Generation 4(1971-?)
- 电子计算机 Generation 5
- 主导技术
- 处理器(Processors):大规模生产
- Memroy: SRAM, DRAM
- Compilers
- RISC(reduced instruction set computer) 处理器与 CISC(complex instruction set computer) 处理器
#info(caption: "Contents of Chapter 1")[
1.1 Introduction \
1.2 Below Your Program \
1.3 Computer Organization and Hardware System \
1.4 Integrated Circuits \
1.5 Real Stuff: Manufacturing Pentium Chips \
1.6 History of Computer Development
]
== Introduction
- Progress in computer technology
- Moore's Law 为基础:芯片设计流程长,以摩尔定律为指导
- 一些偏科普的概念
== Eight Great Ideas
1. Design for Moore's Law
2. Use Abstraction to Simplify Design,以此帮助复杂系统的设计
- 软硬件之间的 Instruction Set Architecture(ISA)
3. Make the Common Case Fast
4. Performance via Parallelism,并行
5. Performance via Pipelining,流水线
6. Performance via Prediction,预测
7. Hierarchy of Memories,内存层次结构
- Registers, Cache, Memory, Disk, Tape
8. Dependability via Redundancy,用一定的冗余来保证可靠性
== Below Your Program
- 一种简化视角
#fig("/public/assets/Courses/计组/img-2024-02-28-11-29-52.png", width: 40%)
- 计算机语言
- 机器语言:二进制编码
- 汇编语言:符号化的机器语言
- 高层次编程语言
- 更接近 natural language
- 可移植,独立于硬件
- 用编译器(Complier)翻译成汇编语言,再由汇编器(Assembler)翻译成机器语言
== Computer Organization and Hardware System
- 计算机的可分解性
#fig("/public/assets/Courses/计组/img-2024-02-28-11-43-13.png", width: 59%)
- Display
- CRT(raster Cathode Ray Tube) display,不怎么用了
- LCD(Liquid Crystal Display) display
- The display principle
- Hardware support for graphics -- raster refresh buffer(frame buffer) to store bit map
- Goal of bit map -- to faithfully represent what is on the screen
#fig("/public/assets/Courses/计组/img-2024-02-28-11-54-09.png", width: 70%)
- Motherboard(主板):主板以及硬件附加在其上
- CPU
- Memory
- Networks
== Integrated Circuits
- Cost
#fig("/public/assets/Courses/计组/img-2024-02-28-11-58-17.png", width: 70%)
== Performance
- Response Time and Throughput
- Response Time(响应时间):字面意思,一个 task 多久响应
- Throughput(吞吐量):单位时间内完成的 task 数量
- 用更快的处理器,影响 response time;用更多的处理器,影响 throughput
- 我们只关注单核,因此更关注 response time
- Relative Performance
=== Measuring Execution Time
- Elapsed Time:总响应时间,包括所有方面如 I/O, OS overhead, idle time
- CPU Time(Execution time):CPU 执行时间,再细可以分成 user CPU time 和 system CPU time
#fig("/public/assets/Courses/计组/img-2024-02-28-12-07-05.png", width: 70%)
- Clock rate, or Clock frequency
- 计算例
#fig("/public/assets/Courses/计组/img-2024-02-28-12-10-22.png", width: 70%)
- Instruction Count and CPI:以上假定每个指令均只用一个时钟周期,下面考虑更复杂的情况
- CPI(Cycles Per Instruction):每条指令的平均时钟周期数
#fig("/public/assets/Courses/计组/img-2024-02-28-12-16-32.png", width: 70%)
#fig("/public/assets/Courses/计组/img-2024-03-04-08-14-23.png", width: 70%)
- 计算例
- Same ISA(Instruction Set Architecture),指的是 Instruction Count 相同
#fig("/public/assets/Courses/计组/img-2024-03-04-08-03-38.png", width: 70%)
- 三个因素实际上是互相影响的,最终用 CPU Time 来衡量性能好坏
- CPI in more details
#fig("/public/assets/Courses/计组/img-2024-03-04-08-08-53.png", width: 65%)
- 计算例
#fig("/public/assets/Courses/计组/img-2024-03-04-08-09-29.png", width: 70%)
== Incredible performance improvement
- CPU 单核性能过去提升迅速,现在增速放缓,three walls
- Power Wall:功耗限制,散热问题
$
"Power" = "Capacitance" times "Voltage"^2 times "Frequency"
$
- 从公式中可以看出,降低电压是有效的降低功耗的方法,但不能一味往下降
- Memory Wall:内存速度增长远远慢于处理器速度增长
- 这也是 Cache 为什么被提出
- ILP Wall:指令级并行性,指令流水线、乱序执行、超标量处理器等技术的局限性。
- ILP(Instruction Level Parallelism) $=>$ TLP(Thread Level Parallelism) + DLP(Data Level Parallelism). 指令集并行到头了,考虑线程级和数据级
== Multiprocessors
- 通过多核来提高性能,需要显性的并行编程
- SPEC CPU Benchmark
- 一个同时衡量 performance 和 power 的公式
$
"Overall Performance per Watt" = (sum_(i=0)^(10)"ssj_ops"_i) / (sum_(i=0)^(10)"Power"_i)
$
- 陷阱: Amdahl’s Law
$
T_"improved" = T_"unaffected" + T_"affected" / "improvement factor"
$
- Make the common case fast
- fastest case 也有瓶颈
- Fallacy: Low Power at Idle
- 陷阱: MIPS as a Performance Metric
- MIPS(Million Instructions Per Second)
#fig("/public/assets/Courses/计组/img-2024-03-04-08-45-03.png", width: 70%)
|
|
https://github.com/nhuongmh/nhuongmh.cv | https://raw.githubusercontent.com/nhuongmh/nhuongmh.cv/main/cv_1.typ | typst | Do What The F*ck You Want To Public License | #import "template.typ": *
#import "data.typ": *
#show: project.with(
title: name,
author: author,
)
#section[ #titleemj("curl.svg") #selftitle ]
#self
#section[ #titleemj("seedling.svg") #techtitle ]
#tech
#section[ #titleemj("telescope.svg") #projecttitle ]
#projectexperience
// #section[ #titleemj("darts.svg") #projects_section_title ]
// #projects
#section[ #titleemj("mortarboard.svg") #edutitle ]
#edu
// #section[ #titleemj("football.svg") #hobbiestitle ]
// #hobbies
|
https://github.com/Gavinok/typst-res | https://raw.githubusercontent.com/Gavinok/typst-res/master/res.typ | typst | #import "layout.typ": res-name, contact, EXP, special-color, resume
#import "projects.typ"
#show: resume.with(
name: "<NAME>",
contacts: (
"": "<EMAIL>",
"": "<NAME>",
"": "Gavinok",
"": "<NAME>",
)
)
= Education
#EXP("University of Victoria", "Victoria, BC", "B.S Software Engineering", "September 2017-2023")
= Experience
#include "experience.typ"
#let languages = ("C", "C++", "Java")
#columns(2)[
= projects
#projects.projects.filter(
(arg2) => projects.is_desired_project(languages, arg2)
).map(projects.project_to_text).join()
#colbreak()
= technical skills
#include "skills.typ"
]
= EXTRACURRICULAR ACTIVITIES
#EXP("Sprint Canoe Athlete & Coach", "Calgary, AB", "", "May 2005-Present")
#v(-15pt)
#set text(size: 10pt)
- Member of the Canadian Junior National Team (2015),
- Multiple Time National Medalist (2016-2019),
#v(-5pt)
#set text(size: 11pt)
#EXP("YouTube Tutorials", text(style: "italic", "September 2020-Present"), "", "")
#v(-10pt)
#set text(size: 10pt)
- Creating tutorials on programming, Linux and productivity.,
- With Over 450,000 views.
|
|
https://github.com/soarowl20240613/geelypaper | https://raw.githubusercontent.com/soarowl20240613/geelypaper/main/paper.typ | typst | #import "@preview/easytable:0.1.0": easytable, elem
#import elem: *
#import "@preview/i-figured:0.2.4"
#import "@preview/sourcerer:0.2.1": code
//************ 表格设置
#let tr_alt = tr.with(cell_style: (x: none, y: none) => (
fill: if calc.even(y) {
luma(95%)
} else {
none
},
))
//************
#let paper(
title: "",
faculty: "",
class: "",
author: "",
studentnumber: "",
adviser: "",
date: datetime.today().display(),
cnabstract: [],
cnkeywords: (),
enabstract: [],
enkeywords: (),
body,
) = {
// 设置文档属性
set document(
title: title,
author: author,
keywords: cnkeywords.join(",") + enkeywords.join("; "),
)
// 设置纸张大小
set page(
paper: "a4",
margin: (top: 2.5cm, bottom: 2cm, inside: 2.5cm, outside: 2cm),
)
// 设置正文
set text(12pt, font: ("Times New Roman", "SimSun"), lang: "zh", region: "cn")
//************ 图形、代码及表格列表设置
// this `level: 2` instructs the figure counters to be reset for every
// level 2 section, so at every level 1 and level 2 heading.
show heading: i-figured.reset-counters.with(level: 1)
// this `level: 2` instructs the figure numbering to include the first
// two levels of the current heading numbering.
// how this should behave with zeros can be set using `zero-fill`.
// e.g., setting `zero-fill: false` and `leading-zero: false` assures
// there is never a `0` in the numbering.
show figure: i-figured.show-figure.with(level: 1, numbering: "1-1")
show math.equation: i-figured.show-equation
set figure.caption(position: top, separator: [#h(1em)])
show figure.where(kind: image): set figure.caption(position: bottom)
//************
//************ 代码框设置
show raw.where(block: true): it => code(
fill: none,
lang: it.lang,
stroke: 0pt + luma(180),
it,
)
//************
//************ 标题页设置
v(5fr)
align(center, image("logo.png", width: 50%))
v(10pt)
set align(center)
text(40pt, "本科毕业设计")
v(10fr, weak: true)
let hline() = [#v(-0.7em)#line(length: 20em)]
text(
14pt,
table(
columns: (20%, auto),
stroke: none,
[题#h(2em)目:], [#title#hline()],
[学#h(2em)院:], [#faculty#hline()],
[年级专业:], [#class#hline()],
[学生姓名:], [#author#hline()],
[学#h(2em)号:], [#studentnumber#hline()],
[指导教师:], [#adviser#hline()],
),
)
v(10fr, weak: true)
text(14pt, date)
set align(left)
pagebreak()
//************
// typst目前在标题、图、表、无序列表和有序列表之后不能正确缩进,添加以下代码:
//************ 设置缩进
let fake-par = style(styles => {
let b = par[#box()]
let t = measure(b + b, styles)
b
v(-t.height)
})
show enum: it => {
it
fake-par
}
show figure: it => {
it
fake-par
}
show heading: it => {
it
fake-par
}
show image: it => {
it
fake-par
}
show list: it => {
it
fake-par
}
show table: it => {
it
fake-par
}
//************
set par(first-line-indent: 2em, justify: true)
show par: set block(spacing: 0.65em)
//************ 版权页
pagebreak(weak: true)
counter(page).update(1)
align(center, text(16pt, font: "SimHei", [学术诚信声明]))
v(5pt)
[本人郑重声明:所呈交的毕业论文(设计),是本人在导师的指导下,独立进行研究工作所取得的成果。除文中已经注明引用的内容外,本论文不包含任何其他个人或集体已经发表或撰写过的作品成果。对本文的研究做出重要贡献的个人和集体,均已在文中以明确方式标明。本人完全意识到本声明的法律结果由本人承担。]
table(
columns: (1fr, 1fr, 1fr, 1fr),
stroke: none,
[], [], [#align(right, [作者签名:])], [#v(1em)#line(length: 100%)],
)
v(2em)
align(center, text(16pt, font: "SimHei", [版权使用授权书]))
v(5pt)
[本人在导师指导下所完成的毕业论文(设计)及相关的资料(包括图纸、试验记录、原始数据、实物照片、图片、录音带、设计手稿等),知识产权归属吉利学院。本人完全了解吉利学院有关保存、使用毕业论文(设计)的规定。本人授权吉利学院可以将本毕业论文(设计)的全部或部分内容编入有关数据库进行检索,可以采用任何复制手段保存和汇编本毕业论文(设计)。如果发表相关成果,一定征得指导教师同意,且第一署名单位为吉利学院。本人离校后使用毕业论文(设计)或与该论文直接相关的学术论文或成果时,第一署名单位仍为吉利学院。]
table(
columns: (1fr, 1fr, 1fr, 1fr),
stroke: none,
[#align(right, [作者签名:])],
[#v(1em)#line(length: 100%)],
[#align(
right,
[指导教师签名:],
)],
[#v(1em)#line(length: 100%)],
)
pagebreak()
//************
//************ 页眉、页脚
set page(
header: [#h(1fr)吉利学院本科毕业设计#h(1fr)#line(length: 100%, stroke: 2pt)],
number-align: center,
)
//************
// 设置章节标题居中、黑体
show heading: set text(font: ("Times New Roman", "SimHei"))
show heading.where(level: 1): it => {
align(center)[#it]
}
set heading(numbering: none)
set page(numbering: "I")
counter(page).update(1)
//************ 中文摘要
pagebreak(weak: true)
heading([摘#h(2em)要])
v(5pt)
cnabstract
v(1em)
let cn = cnkeywords.join(";")
par(first-line-indent: 0em)[
#text(font: "SimHei", [关键词:])
#cn
]
//************
//************ 英文摘要
pagebreak(weak: true)
heading([ABSTRACT])
v(5pt)
enabstract
v(1em)
let en = enkeywords.join("; ")
par(first-line-indent: 0em)[
#text([*Keywords:* ])
#en
]
//************
//************ 目录
pagebreak(weak: true)
set par(first-line-indent: 0em, justify: true)
outline(title: [目#h(2em)录], indent: 2em, depth: 3)
i-figured.outline(title: [图形列表])
i-figured.outline(target-kind: table, title: [表格列表])
i-figured.outline(target-kind: raw, title: [代码列表])
// master 版本不能编译
i-figured.outline(target-kind: math.equation, title: [公式列表])
pagebreak()
//************
//************ 正文
set page(numbering: "1")
counter(page).update(1)
// 设置章节标题
set heading(numbering: (..nums) => {
let vals = nums.pos()
if vals.len() == 1 {
let value = str(vals.at(0))
return "第" + value + "章"
} else {
return nums.pos().map(str).join(".")
}
})
// 设置章节标题分页并位于奇数页、居中
show heading.where(level: 1): it => {
pagebreak(weak: true)
align(center)[#it]
}
// 首行缩进
set par(first-line-indent: 2em, justify: true)
body
//************
}
|
|
https://github.com/DashieTM/ost-5semester | https://raw.githubusercontent.com/DashieTM/ost-5semester/main/web3/weeks/week7.2.typ | typst | #import "../../utils.typ": *
#section("Forms")
Essentially just a usage of the templates from before -> enhances html5 form.
```html
<form>
<input type="text" class="form-control" pattern="[a-zA-Z]{3,}">
</form>
```
Two-way data binding: ```html
<label for="login">Login Name</label>
<input type="text" class="form-control" id="login" required
[(ngModel)]="model.login" name="login">
```
#subsection("Handle Validation Error Messages")
- The validation is automatically applied
- Reference the [ngModel] directive and check its valid property
- To reference the directive (as object) in the template, a specific syntax is
used: − ngModel is the exported name of the directive, \#nameField represents
the template reference variable
```html
<input type="text" class="form-control" id="name" required
[(ngModel)]="model.name" name="name" #nameField="ngModel">
<div [hidden]="nameField.valid || nameField.pristine" class="alert alert-danger">
Name is required
</div>
```
#subsection("Submitting the Form")
#align(
center,
[#image("../../Screenshots/2023_11_02_03_13_53.png", width: 80%)],
)
#subsection("Submitting the form with ngModel")
#align(
center,
[#image("../../Screenshots/2023_11_02_03_14_06.png", width: 80%)],
)
|
|
https://github.com/lyzynec/hys-or-kys | https://raw.githubusercontent.com/lyzynec/hys-or-kys/main/main.typ | typst | #import "lib.typ": *
#show: project.with(
title: "HYS or KYS",
author: "lyzynec",
)
#week(name: [Discrete-event systems: (finite) state automata as a model of discrete-event systems])[#include "01/main.typ"]
#week(name: [Petri nets and their use for modelling, analysis and control of
discrete--event systems])[#include "02/main.typ"]
#week(name: [(max,+) algebra and its use for modelling, analysis and control of
(some) discrete-event systems])[#include "03/main.typ"]
#week(name: [Hybrid automata as the key modeling framework for hybrid
systems])[#include "04/main.typ"]
#week(name: [Hybrid equations as an alternative modeling framework for hybrid
systems])[#include "05/main.typ"]
#week(name: [Subclasses of hybrid systems: Reset (control) systems,
Switched/switching dynamical systems, Piecewise Affine (PWA) Systems.
Definitions and conditions of existence and uniqueness of a solution]
)[#include "06/main.typ"]
|
|
https://github.com/Shedward/dnd-charbook | https://raw.githubusercontent.com/Shedward/dnd-charbook/main/dnd/page/abilities.typ | typst | #import "../core/core.typ": *
#let abilities(title: [Abilities], ..abilities) = page(
header: section(title)
)[
#let abilityBlock(ability) = [
#set text(hyphenate: false)
#set text(top-edge: 0.5em)
#abilityHeader(ability.title)\
#if ability.source != none [
#abilitySource(ability.source)
]
#par(
first-line-indent: 1.5em
)[
#ability.body
]
]
#columned(separator: false)[
#for ability in abilities.pos() {
if type(ability) == "content" {
ability
} else if type(ability) == "dictionary" {
[ #abilityBlock(ability)\ ]
} else {
panic("Not supported ability type " + type(ability))
}
}
]
]
|
|
https://github.com/typst/templates | https://raw.githubusercontent.com/typst/templates/main/charged-ieee/template/main.typ | typst | MIT No Attribution | #import "@preview/charged-ieee:0.1.2": ieee
#show: ieee.with(
title: [A Typesetting System to Untangle the Scientific Writing Process],
abstract: [
The process of scientific writing is often tangled up with the intricacies of typesetting, leading to frustration and wasted time for researchers. In this paper, we introduce Typst, a new typesetting system designed specifically for scientific writing. Typst untangles the typesetting process, allowing researchers to compose papers faster. In a series of experiments we demonstrate that Typst offers several advantages, including faster document creation, simplified syntax, and increased ease-of-use.
],
authors: (
(
name: "<NAME>",
department: [Co-Founder],
organization: [Typst GmbH],
location: [Berlin, Germany],
email: "<EMAIL>"
),
(
name: "<NAME>",
department: [Co-Founder],
organization: [Typst GmbH],
location: [Berlin, Germany],
email: "<EMAIL>"
),
),
index-terms: ("Scientific writing", "Typesetting", "Document creation", "Syntax"),
bibliography: bibliography("refs.bib"),
figure-supplement: [Fig.],
)
= Introduction
Scientific writing is a crucial part of the research process, allowing researchers to share their findings with the wider scientific community. However, the process of typesetting scientific documents can often be a frustrating and time-consuming affair, particularly when using outdated tools such as LaTeX. Despite being over 30 years old, it remains a popular choice for scientific writing due to its power and flexibility. However, it also comes with a steep learning curve, complex syntax, and long compile times, leading to frustration and despair for many researchers @netwok2020 @netwok2022.
== Paper overview
In this paper we introduce Typst, a new typesetting system designed to streamline the scientific writing process and provide researchers with a fast, efficient, and easy-to-use alternative to existing systems. Our goal is to shake up the status quo and offer researchers a better way to approach scientific writing.
By leveraging advanced algorithms and a user-friendly interface, Typst offers several advantages over existing typesetting systems, including faster document creation, simplified syntax, and increased ease-of-use.
To demonstrate the potential of Typst, we conducted a series of experiments comparing it to other popular typesetting systems, including LaTeX. Our findings suggest that Typst offers several benefits for scientific writing, particularly for novice users who may struggle with the complexities of LaTeX. Additionally, we demonstrate that Typst offers advanced features for experienced users, allowing for greater customization and flexibility in document creation.
Overall, we believe that Typst represents a significant step forward in the field of scientific writing and typesetting, providing researchers with a valuable tool to streamline their workflow and focus on what really matters: their research. In the following sections, we will introduce Typst in more detail and provide evidence for its superiority over other typesetting systems in a variety of scenarios.
= Methods <sec:methods>
#lorem(45)
$ a + b = gamma $ <eq:gamma>
#lorem(80)
#figure(
placement: none,
circle(width: 20%),
caption: [A circle representing the Sun.]
) <fig:sun>
In @fig:sun you can see a common representation of the Sun, which is a star that is located at the center of the solar system.
#lorem(120)
#figure(
caption: [The Planets of the Solar System and Their Average Distance from the Sun],
table(
// Table styling is not mandated by the IEEE. Feel free to adjust these
// settings and potentially move them into a set rule.
columns: (6em, auto),
align: (left, right),
inset: (x: 8pt, y: 4pt),
stroke: (x, y) => if y <= 1 { (top: 0.5pt) },
fill: (x, y) => if y > 0 and calc.rem(y, 2) == 0 { rgb("#efefef") },
table.header[Planet][Distance (million km)],
[Mercury], [57.9],
[Venus], [108.2],
[Earth], [149.6],
[Mars], [227.9],
[Jupiter], [778.6],
[Saturn], [1,433.5],
[Uranus], [2,872.5],
[Neptune], [4,495.1],
)
) <tab:planets>
In @tab:planets, you see the planents of the solar system and their average distance from the Sun.
The distances were calculated with @eq:gamma that we presented in @sec:methods.
#lorem(240)
#lorem(240)
|
https://github.com/swablab/documents | https://raw.githubusercontent.com/swablab/documents/main/templates/tmpl_doc.typ | typst | Creative Commons Zero v1.0 Universal | #import "common.typ": common, colors
#let tmpl_doc(
title: none,
changes: (),
doc,
) = {
show: doc => common(title: title, doc)
set enum(
numbering: "(1)"
)
set text(
size: 12pt,
)
// Titelblatt
align(center)[
#image("lightmode-swablab.png", width: 70%)
#pad(top: 2em, bottom: 2em)[
#text(1.75em, font: "Ubuntu", hyphenate: false)[
#heading(outlined: false)[*#title*]
]
]
#changes.at(-3) - #changes.at(-2) \
swablab e.V. \
Katharinenstr. 1 \
72250 Freudenstadt
]
set page(
footer: [
#text(size: 10pt, fill: colors.subtext)[#changes.at(-3)]
#h(2fr)
#text(size: 10pt, fill: colors.subtext)[#counter(page).display()]
],
margin: (bottom: 2.5cm)
)
// Inhaltsverzeichnis
show heading: it => [
#v(2.25em, weak: true)
#set text(font: "Ubuntu", 18pt)
#strong[#it.body]
#v(1.25em, weak: true)
]
outline(title: [*Inhaltsverzeichnis*])
set par(
leading: 1em,
)
pagebreak()
// Formatierung Inhalt
set heading(numbering: "§1")
show heading: it => [
#v(2.25em, weak: true)
#set text(font: "Ubuntu", 18pt)
#strong[
#counter(heading).display()
#it.body
]
#v(1.25em, weak: true)
]
// Inhalt
doc
pagebreak()
// Änderungen
set heading(numbering: none)
show heading: it => [
#set text(font: "Ubuntu", 18pt)
#strong[#it.body]
#v(1.25em, weak: true)
]
block(breakable: false)[
#heading([Änderungen])
#table(
columns: (auto, auto, 1fr),
inset: 8pt,
align: auto,
stroke: 0.5pt,
[*Version*], [*Änderungsdatum*], [*Änderungen*],
..changes
)]
} |
https://github.com/OCamlPro/ppaqse-lang | https://raw.githubusercontent.com/OCamlPro/ppaqse-lang/master/src/étude/defs.typ | typst |
#let todo(t) = text(red)[TODO: #t]
#let paradigme(p) = text(blue, p)
#let pageref(label) = context {
let loc = locate(label)
let nums = counter(page).at(loc)
link(loc, numbering(loc.page-numbering(), ..nums))
}
#let crate(name) = link("https://lib.rs/crates/" + name, name)
#let language(
name:str,
introduction:content,
paradigme:content,
model_intro:[],
runtime:content,
wcet:content,
pile:content,
numerique:content,
formel:content,
intrinseque:content,
tests:content,
compilation:content,
debug:content,
metaprog:content,
parsers:content,
derivation:content,
packages:content,
communaute:content,
assurances:content,
adherence:content,
interfacage:content,
critique:content,
) = [
= #name
== Description
#introduction
=== Paradigme
#paradigme
=== Mécanismes intrinsèques de protection
#intrinseque
=== Compilateurs
#compilation
=== Interfaçage
#interfacage
=== Adhérence au système
#adherence
=== Gestionnaire de paquets
#packages
=== Communauté
#communaute
== Outillage
=== Débugueurs
#debug
=== Tests
#tests
=== Parsing
#parsers
=== Meta programmation
#metaprog
=== Dérivation
#derivation
== Analyse & fiabilité
#model_intro
=== Analyse statique
#runtime
=== Meta formalisation
#formel
=== WCET
#wcet
=== Pile
#pile
=== Qualité numérique
#numerique
=== Assurances
#assurances
=== Utilisation dans le critique
#critique
]
|
|
https://github.com/flaribbit/typst-sdu-master-thesis | https://raw.githubusercontent.com/flaribbit/typst-sdu-master-thesis/master/template.typ | typst | // font names
#let 宋体 = ("Times New Roman", "SimSun")
#let 黑体 = ("Times New Roman", "SimHei")
#let 字号 = (
初号: 42pt, 小初: 36pt, 一号: 26pt, 小一: 24pt, 二号: 22pt, 小二: 18pt,
三号: 16pt, 小三: 15pt, 四号: 14pt, 小四: 12pt, 五号: 10.5pt, 小五: 9pt,
)
// helper function to format number
#let format-num(..nums)=nums.pos().map(str).join("-")
// define custom figure function
#let figure2(body, caption: none, caption-en: none)={
set text(size: 字号.五号)
counter("figure2").step(level: 2)
figure(body)
let num = counter("figure2").display(format-num)
if caption!=none {
block[#h(1fr)图#num #caption#h(1fr)]
}
if caption-en!=none{
block[#h(1fr)Fig. #num #caption-en#h(1fr)]
}
}
// define custom table function
#let table2(body, caption: none, caption-en: none)={
set text(size: 字号.五号)
counter("table2").step(level: 2)
let num = counter("table2").display(format-num)
if caption!=none {
block[#h(1fr)表#num #caption#h(1fr)]
}
if caption-en!=none{
block[#h(1fr)Tab. #num #caption-en#h(1fr)]
}
figure(body)
}
// helper functions
#let placeholder(len)=[#for i in range(len){"文本"}]
#let indent()=h(2em)
#let underline-box(width, body: []) = box(body, width: width, stroke: (bottom: 0.5pt), outset: (bottom: 4pt))
#let add-toc-en(body, level: 1, numbered: true)=context metadata((type: "toc-en", level: level, body: body, numbered: numbered, page: numbering(page.numbering, ..counter(page).get())))
// 封面页
#let project(
分类号: [],
密级: [],
学号: [],
标题: [],
title: [],
日期: [2024年3月1日],
作者姓名: [],
培养单位: [],
专业名称: [],
指导教师: [],
合作导师: [],
摘要: [],
关键词: (),
abstract: [],
keywords: (),
body
)={
// 中文粗体设置
import "@preview/cuti:0.2.0": show-cn-fakebold
show: show-cn-fakebold
// font, paragraph, page settings
set text(size: 字号.小四, font: 宋体)
set par(justify: true, leading: 1em, first-line-indent: 2em)
set block(above: 1em)
set page(paper: "a4", margin: (top: 2.8cm, bottom: 2.5cm, left: 2.5cm, right: 2.5cm))
// #set block(above: 16pt)
// numbering settings
let fake-par={box();context v(-measure(block()+block()).height)}
set heading(numbering: "1.1")
set math.equation(numbering: "1")
show heading.where(level: 1): it => {
set align(center)
set text(size: 字号.小三, font: 黑体)
set block(above: 24pt, below: 18pt)
if it.numbering==none {
it;fake-par
return
}
counter(math.equation).update(0)
counter("figure2").step()
counter("table2").step()
it;fake-par
}
show heading.where(level: 2): it => {
set text(size: 字号.四号, font: 黑体)
set block(above: 24pt, below: 6pt)
it;fake-par
}
show heading.where(level: 3): it => {
set text(size: 字号.小四, font: 黑体)
it;fake-par
}
// override default reference format
show ref: it => {
if it.element == none { return it }
if it.element.func()==math.equation{
let loc = it.element.location()
let chap = counter(heading.where(level: 1)).at(loc).first()
let num = counter(math.equation).at(loc).first()
return [公式#chap\-#num]
}
let el = it.element.child.children.first()
if el.has("key") {
if el.key == "figure2"{
let num = counter("figure2").at(it.element.location())
// update num manually
if num.len()==1 { num.push(1) } else { num.at(1) += 1 }
return [图#format-num(..num)]
} else if el.key == "table2"{
let num = counter("table2").at(it.element.location())
// update num manually
if num.len()==1 { num.push(1) } else { num.at(1) += 1 }
return [表#format-num(..num)]
}
}
return it
}
// override default numbering for equation with (1-1) format
set math.equation(numbering: num=>{
let chap = counter(heading.where(level:1)).get().first()
[(#chap\-#num)]
})
// 参考文献格式
set bibliography(title: "参考文献", style: "assets/chinese-gb7714-2005-numeric.csl")
// 封面页
{
set text(size: 字号.四号, weight: "bold")
set par(first-line-indent: 0pt)
par[分类号:#分类号#h(1fr)单位代码:#box(width: 4em)[10422]]
par[密#h(1em)级:#密级#h(1fr)学#h(2em)号:#box(width: 4em, 学号)]
v(20pt)
align(center, image("assets/sdu.png"))
{
set text(size: 字号.小二)
place(dy: 1em, box(width: 100%, align(center, {
标题
parbreak()
title
})))
par[论文题目:]
}
v(4.4cm)
{
set align(center)
set block(above: 1.6em)
[作 者 姓 名 ];underline-box(11em, body: 作者姓名);parbreak()
[培 养 单 位 ];underline-box(11em, body: 培养单位);parbreak()
[专 业 名 称 ];underline-box(11em, body: 专业名称);parbreak()
[指 导 教 师 ];underline-box(11em, body: 指导教师);parbreak()
[合 作 导 师 ];underline-box(11em, body: 合作导师);parbreak()
v(1.3cm)
text(size: 字号.小二, 日期)
}
}
pagebreak()
pagebreak()
// 声明页
{
set text(size: 字号.四号)
set par(leading: 1.5em)
set block(above: 1.5em)
align(center, text(size: 字号.三号, weight: "bold")[原 创 性 声 明])
par[本人郑重声明:所呈交的学位论文,是本人在导师的指导下,独立进行研究所取得的成果。除文中已经注明引用的内容外,本论文不包含任何其他个人或集体已经发表或撰写过的科研成果。对本文的研究作出重要贡献的个人和集体,均已在文中以明确方式标明。本声明的法律责任由本人承担。]
v(2em)
par(first-line-indent: 0pt)[论文作者签名:#underline-box(6em)#h(4em)日 期:#underline-box(8em)]
v(4em)
align(center, text(size: 字号.三号, weight: "bold")[关于学位论文使用授权的声明])
par[本人同意学校保留或向国家有关部门或机构送交论文的印刷件和电子版,允许论文被查阅和借阅;本人授权山东大学可以将本学位论文的全部或部分内容编入有关数据库进行检索,可以采用影印、缩印或其他复制手段保存论文和汇编本学位论文。]
par[(保密论文在解密后应遵守此规定)]
v(2em)
par(first-line-indent: 0pt)[论文作者签名:#underline-box(5em) 导师签名:#underline-box(5em) 日 期:#underline-box(6em)]
}
pagebreak()
// 中文摘要页
set text(size: 字号.小四)
set page(numbering: "I", header: {
set block(above: 6pt)
set text(size: 字号.五号)
align(center)[山东大学硕士学位论文]
line(length: 100%, stroke: 0.5pt)
})
counter(page).update(1)
heading(level: 1, numbering: none)[摘#h(2em)要]
add-toc-en(level: 1, numbered: false)[Chinese Abstract]
摘要
par(first-line-indent: 0pt)[*关键词:*#关键词.join(";")]
pagebreak()
// 英文摘要页
heading(level: 1, numbering: none)[Abstract]
add-toc-en(level: 1, numbered: false)[English Abstract]
abstract
par(first-line-indent: 0pt)[*Keywords:* #keywords.join("; ")]
pagebreak()
// 中文目录页
{
set par(first-line-indent: 0pt)
heading(level: 1, numbering: none, outlined: false)[目#h(2em)录]
outline(indent: true, title: none)
}
pagebreak()
// 英文目录页
context{
set par(first-line-indent: 0pt)
heading(level: 1, numbering: none, outlined: false)[CONTENTS]
let elems=query(metadata)
for e in elems {
let v=e.value
if v.type=="toc-en" {
let loc = e.location()
h(1em*(v.level -1))
if v.numbered {
numbering("1.1 ", ..counter(heading).at(loc))
}
[#v.body#box(width:1fr,repeat[.])#v.page]
parbreak()
}
}
}
// 内容开始
set page(numbering: "1")
counter(page).update(1)
pagebreak()
body
}
|
|
https://github.com/Myriad-Dreamin/typst.ts | https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/text/raw-line_03.typ | typst | Apache License 2.0 |
#import "/contrib/templates/std-tests/preset.typ": *
#show: test-page
// Ref: false
// Test line extraction works.
#show raw: code => {
for i in code.lines {
test(i.count, 10)
}
test(code.lines.at(0).text, "import numpy as np")
test(code.lines.at(1).text, "")
test(code.lines.at(2).text, "def f(x):")
test(code.lines.at(3).text, " return x**2")
test(code.lines.at(4).text, "")
test(code.lines.at(5).text, "x = np.linspace(0, 10, 100)")
test(code.lines.at(6).text, "y = f(x)")
test(code.lines.at(7).text, "")
test(code.lines.at(8).text, "print(x)")
test(code.lines.at(9).text, "print(y)")
test(code.lines.at(10, default: none), none)
}
```py
import numpy as np
def f(x):
return x**2
x = np.linspace(0, 10, 100)
y = f(x)
print(x)
print(y)
```
|
https://github.com/k0tran/cont_labs | https://raw.githubusercontent.com/k0tran/cont_labs/master/reports/lab5.typ | typst | #import "template.typ": *
#show: lab.with(n: 5)
#align(center)[#text(size: 17pt)[*Предисловие*]]
Теперь лабораторные выполняются на Windows, потому что Debian 11 часто отбивается от сети университета, из-за чего каждые пять минут приходиться логиниться снова, а после \~5 раз достигается лимит устройств.
= Подготовка виртуальной машины
#pic(img: "lab5/vagrant.png")[Конфигурация `vagrant`]
В данном `Vagrantfile`:
- отключаются обновления для образа и гостевых дополнений (необходим плагин `vagrant-vbguest`);
- проброс портов, которые могут понадобится в будущем;
- использованеи моста (`public_network`) для доступа к nginx извне;
- общая папка для сохранения файлов Dockerfile, docker-compose.yml и сертификатов;
- ограничения на память (могут понадобиться);
- установка docker и docker-compose (для последнего необходим плагин `vagrant-docker-compose`).
= Сертификаты
#pic(img: "lab5/mkcert1.png")[Установка mkcert]
#pic(img: "lab5/mkcert2.png")[Установка корневого сертификата]
#pic(img: "lab5/mkcert3.png")[Выпуск необходимых сертификатов]
#pic(img: "lab5/mkcert4.png")[Исправление формата и задание как provision]
= Nginx
#pic(img: "lab5/nginx1.png")[Создание необходимых директорий и перемещение сертификатов]
#pic(img: "lab5/nginx2.png")[Provision]
Файл app.conf:
```conf
server {
listen 80;
server_name dns.student registry.student;
# Перенаправление с HTTP на HTTPS
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name dns.student;
ssl_certificate /etc/nginx/ssl/dns.student.crt;
ssl_certificate_key /etc/nginx/ssl/dns.student.key;
location / {
proxy_pass http://dns:3000; # DNS
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
server {
listen 443 ssl;
server_name registry.student;
ssl_certificate /etc/nginx/ssl/registry.student.crt;
ssl_certificate_key /etc/nginx/ssl/registry.student.key;
location / {
proxy_pass http://registry:5000; # Registry
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
```
= Docker compose
```yml
version: '3'
services:
dns:
image: adguard/adguardhome:latest
ports:
- '53:53/tcp'
- '53:53/udp'
networks:
- lab5_network
restart: unless-stopped
volumes:
- volume_dns_work:/opt/adguardhome/work
- volume_dns_conf:/opt/adguardhome/conf
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
hostname: dns
nginx:
image: nginx:latest
restart: unless-stopped
ports:
- '80:80'
- '443:443'
volumes:
- ./nginx/conf/app.conf:/etc/nginx/conf.d/default.conf:ro
- ./nginx/certs:/etc/nginx/ssl
networks:
- lab5_network
depends_on:
- dns
- registry
deploy:
resources:
limits:
cpus: '1'
memory: 1G
hostname: web
registry:
image: registry:2
hostname: registry
networks:
- lab5_network
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
environment:
- REGISTRY_AUTH=htpasswd
- REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd
- REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm
volumes:
- ./auth:/auth
restart: unless-stopped
depends_on:
- dns
networks:
lab5_network:
volumes:
volume_dns_work:
volume_dns_conf:
registry_auth:
```
#pic(img: "lab5/dc1.png")[Первая попытка поднять]
#pic(img: "lab5/dc2.png")[Смотрим кто занял 53 порт]
#pic(img: "lab5/dc3.png")[Ставим no в /etc/systemd/resolved.conf]
```shell
sudo systemctl restart systemd-resolved
```
#pic(img: "lab5/dc4.png")[Успешный запуск]
#pic(img: "lab5/dc5.png")[Provision]
= Настройка DNS
#pic(img: "lab5/dns1.png")[Приветственное окно]
#pic(img: "lab5/dns2.png")[Ставим порт на 3000]
#pic(img: "lab5/dns3.png")[Устанавливаем пароль]
#pic(img: "lab5/dns4.png")[Жмем next]
#pic(img: "lab5/dns5.png")[Завершение]
#pic(img: "lab5/dns6.png")[Открываем dashboard]
#pic(img: "lab5/dns7.png")[Dashboard]
#pic(img: "lab5/dns8.png")[Перезаписываем DNS (1)]
#pic(img: "lab5/dns9.png")[Перезаписываем DNS (2)]
#pic(img: "lab5/dns10.png")[Проверка из виртуальной машины]
= Загрузка wg-dashboard
Используюем следующий Dockerfile (из прошлой лабы):
```Dockerfile
FROM ubuntu:20.04
LABEL author="<NAME>."
LABEL email="none"
LABEL version="0.1.0"
LABEL description="wgdashboard + wireguard + ubuntu"
RUN adduser user01 --disabled-password && \
echo "user01 ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# Update
# Sudoers = hotfix
RUN apt-get update -y && \
rm -rf /etc/sudoers && \
apt-get install -y wireguard iproute2 net-tools git python3-pip gunicorn && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Setup wireguard config
RUN echo -n "[Interface]\nPrivateKey = " > /etc/wireguard/wg0.conf && \
wg genkey | tee -a /etc/wireguard/wg0.conf | wg pubkey > publickey && \
echo -n "Address = 10.0.0.1/" >> /etc/wireguard/wg0.conf && \
ip -of inet addr show eth0 | awk '{split($4, a, "/"); print a[2]}' >> /etc/wireguard/wg0.conf && \
echo "ListenPort = 51820" >> /etc/wireguard/wg0.conf && \
echo -n "\n[Peer]]\nPublicKey = " >> /etc/wireguard/wg0.conf && \
cat publickey >> /etc/wireguard/wg0.conf && rm -f publickey && \
echo "AllowedIPs = 0.0.0.0/0" >> /etc/wireguard/wg0.conf
# Setup wg-dashboard
RUN cd /usr/local/share && \
git clone -b v3.0.6 https://github.com/donaldzou/WGDashboard.git wgdashboard && \
cd wgdashboard/src && \
chmod u+x wgd.sh && ./wgd.sh install && \
sudo chmod -R 755 /etc/wireguard
EXPOSE 51820/udp
EXPOSE 10086/tcp
WORKDIR /app
ENTRYPOINT ["/bin/bash", "-c", "wg-quick up wg0 && cd /usr/local/share/wgdashboard/src && ./wgd.sh start && tail -f /dev/null"]
```
#pic(img: "lab5/reg1.png")[Сборка]
#pic(img: "lab5/reg2.png")[Тэгируем]
#pic(img: "lab5/reg3.png")[Генерим креды]
После этого добавили лайн в провижн.
#pic(img: "lab5/reg4.png")[Успешный логин]
#pic(img: "lab5/reg5.png")[Ошибка пуша]
#pic(img: "lab5/reg6.png")[Ошибка пуша в логах nginx]
Добавляем `client_max_body_size 0;`
#pic(img: "lab5/reg7.png")[Ошибка unknown blob]
#pic(img: "lab5/reg8.png")[Напрямую пушится нормально]
Фикс из https://github.com/distribution/distribution/issues/2746:
```
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto https;
proxy_ssl_server_name on;
proxy_http_version 1.1;
```
#pic(img: "lab5/reg9.png")[Работает]
= Доступ к админке днс
#pic(img: "lab5/adm1.png")[Экспортируем корневой сертификат]
#pic(img: "lab5/adm2.png")[Устанавливаем]
#pic(img: "lab5/adm3.png")[Сертификат установлен успешно]
Однако по какой-то причине windows не хочет использовать dns 127.0.0.1:53
#pic(img: "lab5/adm4.png")[Диг неуспешен]
При этом:
#pic(img: "lab5/adm5.png")[DNS выставлен]
#pic(img: "lab5/adm6.png")[NMap показывается что порт открыт]
#pic(img: "lab5/adm7.png")[Доступа из браузера нет]
#pic(img: "lab5/adm8.png")[Nslookup тоже самое выдает]
#pic(img: "lab5/adm9.png")[Curl]
#pic(img: "lab5/adm10.png")[Брендмаэр отрублен]
Теперь для того что бы удостоверится что сертификаты работают изменим hosts:
#pic(img: "lab5/adm11.png")[Файл hosts]
#pic(img: "lab5/adm12.png")[Все работает]
|
|
https://github.com/MrToWy/Bachelorarbeit | https://raw.githubusercontent.com/MrToWy/Bachelorarbeit/master/Code/latexDockerfile.typ | typst | #import("../Template/customFunctions.typ"): *
#codly(
highlights:(
(line:0, fill:red, label: <setImage>),
(line:5, fill:green, label: <installPackage>),
),
)
```Dockerfile
FROM python:3.11.9-alpine3.20
COPY . /app
WORKDIR /app
RUN pip install requests
RUN crontab /app/crontab
# log to stdout for easier debugging
CMD ["crond", "-f", "-l", "2"]
``` |
|
https://github.com/kdog3682/mathematical | https://raw.githubusercontent.com/kdog3682/mathematical/main/0.1.0/src/demonstrations.typ | typst | #import "demonstrations/beginner.typ" as beginner
#import "demonstrations/medium.typ" as medium
#import "demonstrations/advanced.typ" as advanced
|
|
https://github.com/TypstApp-team/typst | https://raw.githubusercontent.com/TypstApp-team/typst/master/tests/typ/visualize/shape-rect.typ | typst | Apache License 2.0 | // Test the `rect` function.
---
// Default rectangle.
#rect()
---
#set page(width: 150pt)
// Fit to text.
#rect(fill: conifer)[Textbox]
// Empty with fixed width and height.
#block(rect(
height: 15pt,
fill: rgb("46b3c2"),
stroke: 2pt + rgb("234994"),
))
// Fixed width, text height.
#rect(width: 2cm, fill: rgb("9650d6"))[Fixed and padded]
// Page width, fixed height.
#rect(height: 1cm, width: 100%, fill: rgb("734ced"))[Topleft]
// These are inline with text.
{#box(rect(width: 0.5in, height: 7pt, fill: rgb("d6cd67")))
#box(rect(width: 0.5in, height: 7pt, fill: rgb("edd466")))
#box(rect(width: 0.5in, height: 7pt, fill: rgb("e3be62")))}
// Rounded corners.
#stack(
dir: ltr,
spacing: 1fr,
rect(width: 2cm, radius: 30%),
rect(width: 1cm, radius: (left: 10pt, right: 5pt)),
rect(width: 1.25cm, radius: (
top-left: 2pt,
top-right: 5pt,
bottom-right: 8pt,
bottom-left: 11pt
)),
)
// Different strokes.
#set rect(stroke: (right: red))
#rect(width: 100%, fill: lime, stroke: (x: 5pt, y: 1pt))
---
// Error: 15-38 unexpected key "cake", valid keys are "top-left", "top-right", "bottom-right", "bottom-left", "left", "top", "right", "bottom", and "rest"
#rect(radius: (left: 10pt, cake: 5pt))
---
// Error: 15-21 expected length, color, gradient, dictionary, stroke, none, or auto, found array
#rect(stroke: (1, 2))
---
#set page(width: 17.8cm)
#lorem(100)
#rect(lorem(100))
#set par(justify: true)
#lorem(100)
#rect(lorem(100))
|
https://github.com/NOOBDY/formal-language | https://raw.githubusercontent.com/NOOBDY/formal-language/main/q3.typ | typst | The Unlicense | #import "@preview/finite:0.3.0": automaton, layout
#let q3 = [
3. (Fun with `NFA`) For each of the following languages, construct an `NFA`, with the specified number of states, that accepts the language. In all cases, the alphabet is ${0, 1}$.
1. ${w | w "ends with 10"}$ with 3 states.
#automaton(
(
q0: (q1:"1"),
q1: (q2:"0"),
q2: (q0:"0", q1:"1"),
),
labels: (
q0: $ q_0 $,
q1: $ q_1 $,
q2: $ q_2 $
),
final: ("q2"),
style: (
state: (
stroke: 0.5pt,
),
transition: (
stroke: 0.5pt,
curve: 0,
label: (
angle: 0deg
)
),
q2-q1: (curve: 0.5),
q2-q0: (curve: 1.3)
),
)
2. ${w | w "contains the substring 1011"}$ with 5 states.
#automaton(
(
q0: (q1:"1"),
q1: (q2:"0"),
q2: (q0:"0", q3:"1"),
q3: (q2:"0", q4:"1"),
q4: (),
),
labels: (
q0: $ q_0 $,
q1: $ q_1 $,
q2: $ q_2 $,
q3: $ q_3 $,
q4: $ q_4 $,
),
final: ("q4"),
style: (
state: (
stroke: 0.5pt,
),
transition: (
stroke: 0.5pt,
curve: 0,
label: (
angle: 0deg
)
),
q3-q2: (curve: 0.7),
q2-q0: (curve: 1.0)
),
)
3. ${w | w "contains an odd number of 1s or exactly two 0s"}$.
#automaton(
(
q: (q00:"2", q10:"2"),
q00: (q01:"1"),
q01: (q00:"1"),
q10: (q11:"0"),
q11: (q12:"0"),
q12: (q13:"0"),
q13: (),
),
labels: (
q: $ q $,
q00: $ q_(00) $,
q01: $ q_(01) $,
q10: $ q_(10) $,
q11: $ q_(11) $,
q12: $ q_(12) $,
q13: $ q_(13) $,
),
final: ("q01", "q12"),
style: (
state: (
stroke: 0.5pt,
),
transition: (
stroke: 0.5pt,
curve: 0,
label: (
angle: 0deg
)
),
q-q00: (label: (text: $epsilon.alt$)),
q-q10: (label: (text: $epsilon.alt$)),
q00-q01: (curve: 0.5),
q01-q00: (curve: 0.5),
q10-q10: (anchor: bottom),
q11-q11: (anchor: bottom),
q12-q12: (anchor: bottom),
q13-q13: (anchor: bottom),
),
layout: layout.custom.with(
positions: (..) => (
q: (0, 1),
q00: (2, 2),
q01: (4, 2),
q10: (2, 0),
q11: (4, 0),
q12: (6, 0),
q13: (8, 0),
)
)
)
4. ${w | w "begins with 1 or ends with 0"}$ with whatever number of states you like.
#automaton(
(
q: (q00:"2", q10:"2"),
q00: (q01:"1"),
q01: (),
q10: (q11:"0"),
q11: (q10:"1"),
),
labels: (
q: $ q $,
q00: $ q_(00) $,
q01: $ q_(01) $,
q02: $ q_(02) $,
q10: $ q_(10) $,
q11: $ q_(11) $,
),
final: ("q01", "q11"),
style: (
state: (
stroke: 0.5pt,
),
transition: (
stroke: 0.5pt,
curve: 0,
label: (
angle: 0deg
)
),
q10-q11: (curve: 0.5),
q11-q10: (curve: 0.5),
q-q00: (label: (text: $epsilon.alt$)),
q-q10: (label: (text: $epsilon.alt$)),
q01-q01: (anchor: right),
q02-q02: (anchor: right),
q10-q10: (anchor: bottom),
q11-q11: (anchor: bottom),
),
layout: layout.custom.with(
positions: (..) => (
q: (0, 1),
q00: (2, 2),
q01: (4, 2),
q10: (2, 0),
q11: (4, 0),
)
)
)
5. ${11, 111}^ast$ with whatever number of states you like.
#automaton(
(
q: (q00:"2", q10:"2"),
q00: (q01:"1"),
q01: (q02:"1"),
q02: (q:"2"),
q10: (q11:"1"),
q11: (q12:"1"),
q12: (q13:"1"),
q13: (q:"2"),
),
labels: (
q: $ q $,
q00: $ q_(00) $,
q01: $ q_(01) $,
q02: $ q_(02) $,
q10: $ q_(10) $,
q11: $ q_(11) $,
q12: $ q_(12) $,
q13: $ q_(13) $,
),
final: ("q02", "q13"),
style: (
state: (
stroke: 0.5pt,
),
transition: (
stroke: 0.5pt,
curve: 0,
label: (
angle: 0deg
)
),
q-q00: (label: (text: $epsilon.alt$)),
q-q10: (label: (text: $epsilon.alt$)),
q02-q: (label: (text: $epsilon.alt$)),
q13-q: (label: (text: $epsilon.alt$)),
),
layout: layout.custom.with(
positions: (..) => (
q: (5, 2),
q00: (3, 4),
q01: (5, 4),
q02: (7, 4),
q10: (2, 0),
q11: (4, 0),
q12: (6, 0),
q13: (8, 0),
)
)
)
]
|
https://github.com/alberto-lazari/computer-science | https://raw.githubusercontent.com/alberto-lazari/computer-science/main/advanced-topics-pl/presentation/sections/markup-mode.typ | typst | #import "/common.typ": *
#new-section("Markup mode")
#slide[
- Default syntax mode
#show: pause(2)
- Syntactic sugar for function calls
#grid(
columns: (1fr, auto, 1fr),
gutter: 3em,
example[
```typst
= Title
*List* with:
- _item_
```
],
[#v(3.5em) $<==>$],
example[
```typst
#{
heading("Title"); parbreak()
text(strong("List") + " with:")
list(emph("item"))
}
```
],
)
]
#slide(title: "Content type")[
#grid(
columns: (1fr, 1fr),
[
#line-by-line(mode: "transparent")[
- Tree of content elements
- From functions or markup
- Document as join of all returned contents
]
],
example[
```typst
#let content = [_example_ *text*]
This is the content: "#content" \
Representation: #repr(content)
```
]
)
]
#slide(title: "Problem")[
#set text(size: .85em)
+ Everything is a function call
+ Functions are expressions
#show: pause(2)
#sym.arrow.double Final document needs to be a series of `content` values
#show: pause(3)
#grid(
columns: (2fr, 3fr),
[Solution: explicitly join every single one?],
example(size: .75em)[
```typst
#let document = {
emph("This ") + [is a test to ] + text(fill: red, "join ") + [eveything]
}
#document
```
]
)
]
#slide(title: "Joining")[
#grid(
columns: (auto, auto),
gutter: 2em,
[
- Every line returns a value (or `none`)
- A block returns the join of every generated value
#uncover(2)[- Conditionals and loops are expressions too]
],
{
only(1, example[
```typst
#let document = {
emph("This ")
[is a test to ]
text(fill: red, "join ")
[eveything]
}
#document
```
])
only(2, example[
```typst
#for x in (1, 2, 3) [
- #x #if x == 1 [ (first) ]
]
```
])
}
)
]
|
|
https://github.com/Error-418-SWE/Documenti | https://raw.githubusercontent.com/Error-418-SWE/Documenti/src/2%20-%20RTB/Documentazione%20interna/Verbali/23-11-23/23-11-23.typ | typst | #import "/template.typ": *
#show: project.with(
date: "23/11/23",
subTitle: "Discussione a seguito del meeting con il Proponente",
docType: "verbale",
authors: (
"<NAME>",
),
timeStart: "14:45",
timeEnd: "15:15",
);
= Ordine del giorno
- Discussione relativa al meeting con il Proponente;
- Suddivisione compiti da svolgere.
== Discussione relativa al meeting con il Proponente
Il gruppo ha condotto una discussione relativa al meeting esterno appena concluso, ragionando sui suggerimenti, approvazioni e cambiamenti proposti dal Proponente. Sono state corrette alcune ipotesi fatte, come la questione delle dimensioni fisse e prefissate dei bin e degli scaffali. Il Proponente ha espressamente specificato la richiesta di avere dimensioni e configurazioni variabili rispettivamente per bin e scaffali.
Il gruppo si ritiene soddisfatto riguardo il lavoro fatto sull'individuazione degli use case e sulle spiegazioni ricevute dal Proponente riguardo chiarimenti tecnici e compatibilità con diversi device. Si è deciso di proseguire su questa strada visti i riscontri positivi ottenuti.
È stata molto apprezzata la disponibilità del Proponente nel rispondere alle nostre richieste riguardo vari elementi (come caratteristiche dei prodotti, codifica dei bin, piantina del magazzino) che serviranno nei periodi a venire.
== Suddivisione compiti da svolgere
In seguito alla discussione iniziale, sono stati individuati i compiti principali da svolgere nella seconda metà della settimana, e ognuno di essi è stato assegnato ad un gruppo o ad una singola persona.
Si è ribadita l'importanza di completare in tempi ragionevoli il documento di Analisi dei Requisiti.
È inoltre necessario aggiornare le Norme di Progetto in vista delle prossime attività di analisi e di realizzazione del PoC. Infine, il consuntivo dello Sprint 2 non è ancora stato inserito nel Piano di Progetto. I vari documenti risultano in fase di redazione.
Al progettista è stato affidato il compito di studiare ed esplorare le tecnologie sconosciute al team, in particolare Three.js, attraverso lo sviluppo di funzionalità basilari per entrare in confidenza con questa nuova tecnologia.
= Azioni da intraprendere
Le azioni da intraprendere decise durante il meeting sono:
- stesura dei documenti indicati nel punto precedente;
- continuazione del lavoro di individuazione e perfezionamento degli use case.
|
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/lemmify/0.1.0/README.md | markdown | Apache License 2.0 | # Lemmify
Lemmify is a library for typesetting mathematical
theorems in typst. It aims to be easy to use while
trying to be as flexible and idiomatic as possible.
This means that the interface might change with updates
to typst (for example if user-defined element functions
are introduced). But no functionality should be lost.
## Basic Usage
To get started with Lemmify, follow these steps:
1. Import the Lemmify library:
```typst
#import "@preview/lemmify:0.1.0": *
```
2. Define the default styling for a few default theorem types:
```typst
#let (
theorem, lemma, corollary,
remark, proposition, example,
proof, rules: thm-rules
) = default-theorems("thm-group", lang: "en")
```
3. Apply the generated styling:
```typst
#show: thm-rules
```
4. Create theorems, lemmas, and proofs using the defined styling:
```typst
#theorem(name: "Some theorem")[
Theorem content goes here.
]<thm>
#proof[
Complicated proof.
]<proof>
@proof @thm[Some thoerem]
```
5. Customize the styling further using show rules. For example, to add a red box around proofs:
```
#show thm-selector("thm-group", subgroup: "proof"): it => box(
it,
stroke: red + 1pt,
inset: 1em
)
```
The result should now look something like this:

## Useful examples
If you do not want to reset the theorem counter on headings
you can use the `max-reset-level` parameter:
```typst
default-theorems("thm-group", max-reset-level: 0)
```
It specifies whats the highest level at which the counter is reset. To manually reset the counter you can use the
`thm-reset-counter` function.
---
By specifying `numbering: none` you can create unnumbered
theorems.
```typst
#example(numbering: none)[
Some example.
]
```
To make all examples unnumbered you could use the following code:
```typst
#let example = example.with(numbering: none)
```
---
To create other types (or subgroups) of theorems you can use the
`new-theorems` function.
```typst
#let (note, rules) = new-theorems("thm-group", ("note": text(red)[Note]))
#show: rules
```
If you have already defined custom styling you will notice that
the newly created theorem does not use it.
You can create a dictionary to make applying it again easier.
```typst
#let my-styling = (
thm-styling: thm-styling-simple,
thm-numbering: ...,
ref-styling: ...
)
#let (note, rules) = new-theorems("thm-group", ("note": "Note), ..my-styling)
```
---
By varying the `group` parameter you can create independently numbered theorems:
```typst
#let (
theorem, proof,
rules: thm-rules-a
) = default-theorems("thm-group-a")
#let (
definition,
rules: thm-rules-b
) = default-theorems("thm-group-b")
#show: thm-rules-a
#show: thm-rules-b
```
## Example
```typst
#import "@preview/lemmify:0.1.0": *
#let my-thm-style(
thm-type, name, number, body
) = grid(
columns: (1fr, 3fr),
column-gutter: 1em,
stack(spacing: .5em, strong(thm-type), number, emph(name)),
body
)
#let my-styling = (
thm-styling: my-thm-style
)
#let (
theorem, rules
) = default-theorems("thm-group", lang: "en", ..my-styling)
#show: rules
#show thm-selector("thm-group"): box.with(inset: 1em)
#lorem(20)
#theorem[
#lorem(40)
]
#lorem(20)
#theorem(name: "Some theorem")[
#lorem(30)
]
```

## Documentation
The two most important functions are:
`default-theorems`: Create a default set of theorems
based on the given language and styling.
- `group`: The group id.
- `lang`: The language to which the theorems are adapted.
- `thm-styling`, `thm-numbering`, `ref-styling`: Styling
parameters are explained in further detail in the
[Styling](#styling-parameters) section.
- `proof-styling`: Styling which is only applied to proofs.
- `max-reset-level`: The highest heading level on which
theorems are still reset.
`new-theorems`: Create custom sets of theorems with
the given styling.
- `group`: The group id.
- `subgroup-map`: Mapping from group id to some argument.
The simple styles use `thm-type` as the argument (ie
"Beispiel" or "Example" for group id "example")
- `thm-styling`, `thm-numbering`,
`ref-styling`, `ref-numbering`: Styling which to apply
to all subgroups.
---
`use-proof-numbering`: Decreases the numbering of
a theorem function by one.
See [Styling](#styling) for more information.
---
`thm-selector`: Returns a selector for all theorems
of the specified group. If subgroup is specified, only the
theorems belonging to it will be selected.
---
There are also a few functions to help with resetting counters.
`thm-reset-counter`: Reset theorem group counter manually.
Returned content needs to added to the document.
`thm-reset-counter-heading-at`: Reset theorem group counter
at headings of the specified level. Returns a rule that
needs to be shown.
`thm-reset-counter-heading`: Reset theorem group counter
at headings of at most the specified level. Returns a rule
that needs to be shown.
### Styling parameters
If possible the best way to adapt the look of theorems is to use show
rules as shown [above](#basic-usage), but this is not always possible.
For example if we wanted theorems to start
with `1.1 Theorem` instead of `Theorem 1.1`.
You can provide the following functions to adapt the look of the theorems.
----
`thm-styling`: A function: `(arg, name, number, body) -> content`, that
allows you to define the styling for different types of theorems.
Below only the `arg` will be specified.
Pre-defined functions
- `thm-style-simple(thm-type)`: **thm-type num** _(name)_ body
- `thm-style-proof(thm-type)`: **thm-type num** _(name)_ body □
- `thm-style-reversed(thm-type)`: **num thm-type** _(name)_ body
---
`thm-numbering`: A function: `figure -> content`, that determines how
theorems are numbered.
Pre-defined functions: (Assume heading is 1.1 and theorem count is 2)
- `thm-numbering-heading`: 1.1.2
- `thm-numbering-linear`: 2
- `thm-numbering-proof`: No visible content is returned, but the
counter is reduced by 1 (so that the proof keeps the same count as
the theorem). Useful in combination with `use-proof-numbering`
to create theorems that reference the previous theorem (like proofs).
---
`ref-styling`: A function: `(arg, thm-numbering, ref) -> content`, to style
theorem references.
Pre-defined functions:
- `thm-ref-style-simple(thm-type)`
- `@thm -> thm-type 1.1`
- `@thm[custom] -> custom 1.1`
---
`ref-numbering`: Same as `thm-numbering` but only applies
to the references.
## Roadmap
- More pre-defined styles.
- Referencing theorems by name.
- Support more languages.
- Better documentation.
- Outlining theorems.
If you are encountering any bugs, have questions or
are missing features, feel free to open an issue on
[Github](https://github.com/Marmare314/lemmify).
|
https://github.com/ofurtumi/formleg | https://raw.githubusercontent.com/ofurtumi/formleg/main/h10/H10.typ | typst | #import "@templates/ass:0.1.1": *
#show: doc => template(
class: "TÖL301G",
project: "Homework 10",
doc
)
= Which of the following are true?
Let $f(n) = 4n(n+2log_2 n^2) + e^(-n) + 8sin((2 pi n)/256)$
We can show that $f(n) = o(g(n))$ if: $ lim_(n->infinity) f(n)/g(n) = 0 $
We can show that $f(n) = O(g(n))$ if:
== $f(n) = o(n log_2 n)$
This is false since $f(n)$ grows faster than $g(n)$
- for $n = 100$: $ f(100)/g(100) = ( ~41605 )/200 = ~208 $
- for $n = 10000$: $ f(10000)/g(10000) = ( ~400320003 )/132877= ~3012 $
== $f(n) = o(2^n)$
This is true since $f(n)$ grows more slowly than $g(n)$
== $f(n) = o(n^4)$
This is true since $f(n)$ grows more slowly than $g(n)$
== $f(n) = O(n log_2 n^n)$
$n log_2 n^n = n^2 log_2 n$
This is false since for every $n > 2$ then $f(n)$ grows faster than $g(n)$
== $f(n) = O(2^n + 1)$
This is true because $2^n+1 >= n^2$
= $M_2$ modified
$ f(n) = (2k+1)(n+1), "where" k="ceil"(log_2 n) $
- $f(8) = 63$ my turing machine does the check in $44$ steps
- $f(10) = 99$ my turing machine does the check in $70$ steps
- $f(30) = 341$ my turing machine does the check in $262$ steps
- $f(60) = 793$ my turing machine does the check in $634$ steps
- $f(100) = 1515$ my turing machine does the check in $1264$ steps
= _"a reasonable time"_
== Brute force
We run Dijkstra's algorithm for all permutations of every transportation request and if there are no feasable solutions we return false otherwise we return the shortest path.
This would be a very slow algorithm since we would have to run Dijkstra's algorithm $n!$ times.
== Better algorithm
|
|
https://github.com/sitandr/typst-examples-book | https://raw.githubusercontent.com/sitandr/typst-examples-book/main/src/snippets/layout/insert_lines.md | markdown | MIT License | # Lines between list items
```typ
/// author: frozolotl
#show enum.where(tight: false): it => {
it.children
.enumerate()
.map(((n, item)) => block(below: .6em, above: .6em)[#numbering("1.", n + 1) #item.body])
.join(line(length: 100%))
}
+ Item 1
+ Item 2
+ Item 3
```
The same approach may be easily adapted to style the enums as you want. |
https://github.com/Az-21/material-you-adapter | https://raw.githubusercontent.com/Az-21/material-you-adapter/main/README.md | markdown | Apache License 2.0 | # Material You Adapter
Adapt Material You (M3) theme files to various languages and technologies
## Usage
1. Export *Jetpack Compose* (Kotlin) theme from [Material Theme Builder](https://material-foundation.github.io/material-theme-builder/).
2. [Optional] Rename the zip file; output will use the name of zip file(s).
3. Place the `.zip` file in `Input/` folder of this program.
4. Run `main.py`.
5. Find generated outputs in `Output/` folder.
> [!TIP]
> This script supports multiple theme files. All `.zip` files inside `Input/` folder will be adapted.
## Sample Input
```kt
// Generated by Material Theme Builder (zip file > ui/theme/Color.kt)
val primaryLight = Color(0xFF4C662B)
val onPrimaryLight = Color(0xFFFFFFFF)
// ...
val primaryDark = Color(0xFFB1D18A)
val onPrimaryDark = Color(0xFF1F3701)
// ...
```
## Typst Adapter
[Typst](https://github.com/typst/typst) is a markup-based typesetting system.
### Sample Output
```typ
#let m3light = (
primary: rgb("#4C662B"),
onPrimary: rgb("#FFFFFF"),
//...
)
#let m3dark = (
primary: rgb("#B1D18A"),
onPrimary: rgb("#1F3701"),
// ...
)
```
### Usage
```typ
#import "color.typ": m3dark, m3light
#box(width: 32pt, height: 32pt, fill: m3dark.primary)
#box(width: 32pt, height: 32pt, fill: m3light.primary)
```
## Power FX | Power Apps Adapter
[Power Apps](https://www.microsoft.com/en-us/power-platform/products/power-apps) is a low-code application building tool.
### Sample Output
> [!NOTE]
> To reduce modifications required when switching themes, this module generates dark mode and light mode in separate files.
```c
// Light
Set(M3Primary, ColorValue("#4C662B"));
Set(M3OnPrimary, ColorValue("#FFFFFF"));
// ...
```
```c
// Dark
Set(M3Primary, ColorValue("#B1D18A"));
Set(M3OnPrimary, ColorValue("#1F3701"));
// ...
```
### Usage
- Copy paste the variable declarations in the `OnStart` $f x$ parameter of the *App*.
|
https://github.com/piepert/typst-seminar | https://raw.githubusercontent.com/piepert/typst-seminar/main/Beispiele/Essay/fullcite.typ | typst | // Habe hier ein eigenes Bibliographie-Plugin geschrieben, weil
// in den Essays des Instituts für Philosophie kein Literaturverzeichnis
// nötig ist, sondern nur Fußnoten bevorzugt werden. Und Fußnoten
// kann Typst ja nicht, also musste ich improvisieren.
// enthält die Bibliographie-Daten der YAML-Datei
#let bibliography-data = state("bibliography-data")
// enthält die Fußnoten für eine bestimmte Seite und einen counter, der
// für die Fußnoten mitzählt
#let bibliography-footnotes = state("bibliography-footnotes")
// Funktion, die in template.typ in jedem Seiten-Footer aufgerufen
// wird und somit die Fußnoten darstellen muss.
#let footnotes-gen-footer() = {
// Zuerst wird der Footer generiert.
locate(loc => {
// den State an der aktuellen Stelle bekommen
let footnotes = bibliography-footnotes.at(loc)
// Wenn es irgendwie Probleme mit dem State gibt (er z.B. nicht richtig
// initialisiert wurde oder die Fußnoten leer sind), wird erstmal nur die
// Seitennummer angegeben und die Funktion wird verlassen
if footnotes == none or footnotes.len() == 0 {
counter(page).display()
h(1fr)
return
// sonst wird eine nette Linie gezeichnet, die Seitenzahl und weiter gehts.
} else {
line(length: 100%, stroke: 0.25mm)
counter(page).display()
h(1fr)
}
// jetzt wird jede Fußnote generiert
for f in footnotes.footnotes {
h(1.5em) // Abstand aus ästhetischen Gründen zwischen jeder Fußnote
// damit die Fußnotenzahl etwas besser lesbar wird, ist die Schriftgröße
// für sie größer
text(size: 12pt, super(str(f.num)))
// und damit der Text der Fußnote nicht zu groß wird, wird die
// Schriftgröße für sie etwas kleiner
text(size: 10pt, f.footnote)
}
})
// Danach werden die Fußnoten geleert, damit sie nicht auf
// der nächsten Seite nochmal auftauchen.
bibliography-footnotes.update(k => {
if k != none and "footnotes" in k.keys() {
k.footnotes = ()
}
k
})
}
#let load-bibliography(file-path) = {
// YAML-Datei der Bibliographie wird geladen und direkt in ein
// Dictionary-Objekt umgewandelt
bibliography-data.update(yaml(file-path))
}
#let fullcite(..args) = {
let key = ""
let postfix = none
let prefix = none
let args = args.pos()
// Die Funktion kann mit beliebig vielen Argumenten aufgerufen
// werden, das wird hier abgecheckt.
if args.len() == 0 {
panic("Missing at least one argument 'key' for fullcite!")
} else if args.len() == 1 { // fullcite(key)
key = args.at(0)
} else if args.len() == 2 { // fullcite(key, postfix)
key = args.at(0)
postfix = args.at(1)
} else if args.len() == 3 { // fullcite(key, postfix, prefix)
key = args.at(0)
postfix = args.at(1)
prefix = args.at(2)
} else {
panic("Too many arguments for fullcite!")
}
if prefix != none and str(prefix).trim() != "" {
prefix += " "
} else {
prefix = ""
}
if postfix != none and str(postfix).trim() != "" {
postfix = ", "+postfix
} else {
postfix = ""
}
// Zitat nach dem Schema "<Prefix> <Quelle>, <Postfix>" erstellen
locate(loc => {
let bib_data = bibliography-data.at(loc)
if key not in bib_data.keys() {
return strong(text(red, "KEY \""+key+"\" NOT FOUND!"))
}
prefix + bib_data.at(key) + postfix
})
}
#let cite-footnote(f) = {
bibliography-footnotes.update(k => {
if k == none {
// Wenn die Fußnoten vorher leer waren,
// sind sie jetzt mit 1 Element gefüllt, nämlich f
(counter: 1, footnotes: ((num: 1, footnote: f),))
} else {
// Sonst wird f einfach rangehangen und es wird weitergezählt
k.counter += 1
k.footnotes.push((num: k.counter, footnote: f))
k
}
})
// Die Funktion soll zwar zählen, aber es soll nur die Nummer hochgestellt
// zurückgegeben werden! Der Rest wird dann in den Fußnoten angezeigt
locate(loc => super(str(bibliography-footnotes.at(loc).counter)))
} |
|
https://github.com/platformer/typst-algorithms | https://raw.githubusercontent.com/platformer/typst-algorithms/main/test/assertions/assert_i_in_algo.typ | typst | MIT License | #import "../../algo.typ": i
#i
|
https://github.com/thanhdxuan/dacn-report | https://raw.githubusercontent.com/thanhdxuan/dacn-report/master/datn-week-1/contents/03-plan.typ | typst | = Kế hoạch thực hiện đồ án tốt nghiệp
Về tổng quan, đồ án tốt nghiệp sẽ được thực hiện trong vòng 15 tuần.
#table(
columns: (0.2fr, 2fr),
inset: 10pt,
align: horizon,
[*Tuần*], [*Kế hoạch thực hiện*],
[1], [Lên kế hoạch thực hiện đồ án tốt nghiệp, chỉnh sửa đồ án theo góp ý của hội đồng.],
[2], [Chỉnh sửa đồ án theo góp ý của hội đồng và giảng viên hướng dẫn.],
[3], [Phát triển thêm chức năng phát hiện gian lận cho bộ công cụ.],
[4], [Phát triển thêm chức năng phát hiện gian lận cho bộ công cụ.],
[5], [Phát triển thêm chức năng cho bộ công cụ theo sự hướng dẫn của giảng viên hướng dẫn.],
[6], [Phát triển thêm chức năng cho bộ công cụ theo sự hướng dẫn của giảng viên hướng dẫn.],
[7], [Phát triển thêm chức năng cho bộ công cụ theo sự hướng dẫn của giảng viên hướng dẫn.],
[8], [Phát triển thêm chức năng cho bộ công cụ theo sự hướng dẫn của giảng viên hướng dẫn.],
[9], [Phát triển thêm chức năng cho bộ công cụ theo sự hướng dẫn của giảng viên hướng dẫn.],
[10], [Phát triển thêm chức năng cho bộ công cụ theo sự hướng dẫn của giảng viên hướng dẫn.],
[11], [Phát triển thêm chức năng cho bộ công cụ theo sự hướng dẫn của giảng viên hướng dẫn.],
[12], [Triển khai ứng dụng lên internet.],
[13], [Triển khai ứng dụng lên internet.],
[14], [Kiểm thử, viết báo cáo đồ án tốt nghiệp.],
[15], [Kiểm thử, viết báo cáo đồ án tốt nghiệp.]
)
#pagebreak() |
|
https://github.com/wznmickey/JI_Lab_Report_typst_template | https://raw.githubusercontent.com/wznmickey/JI_Lab_Report_typst_template/main/conf.typ | typst | #let conf(
lab-number: 0,
title: none,
name: none,
studentID: 0,
doc,
) = {
set page(
margin: (top: 1in + 20pt + 12pt + 25pt, bottom: 1in + 20pt + 12pt + 25pt, left: 1in + 31pt, right: 1in + 31pt),
numbering: "1",
paper: "a4",
)
set par(leading: 0.6em, first-line-indent: 1.6em, justify: true)
set text(font: "New Computer Modern", size: 12pt)
show raw: set text(font: "New Computer Modern Mono")
show par: set block(spacing: 0.6em)
show heading: set block(above: 1.4em, below: 1em)
set par(linebreaks: auto)
set heading(numbering: "1.1 ")
set math.equation(numbering: "(1)", block: true, supplement: [Eq.])
set figure(placement: auto)
set table(
align: center,
columns: 5,
inset: 6pt,
stroke: 0.5pt,
)
show figure: it => box(width:100%)[
#align(center)[#it.body]
#let size = measure(it.caption).width
#let available-size = 8.3in - 2in - 62pt
#v(if it.has("gap") {it.gap} else {0.5em})
#set align(if (size>available-size) {left} else {center})
#set par(justify: true)
#it.caption
#v(1em)
]
align(center + horizon)[ #line(
length: 100%,
stroke: 1pt,
)
#v(5mm - 0.6em)
#text(smallcaps[UM-SJTU Joint Institute], size: 14.4pt)
#par(text("", size: 14.4pt))
#text(smallcaps[Physics Laboratory], size: 14.4pt)
#text("(PHYS1410J)")
#line(
length: 100%,
stroke: 1pt,
)
#v(4cm - 0.6em)
#text(smallcaps[Laboratory Report], size: 14.4pt)
#par(text("", size: 14.4pt))
#text(smallcaps("Excercise " + str(lab-number)), size: 14.4pt)
#par(text("", size: 14.4pt))
#text(smallcaps(title), size: 14.4pt)]
v(9.4cm)
table(
rows: (0.4em) * 3,
columns: 2,
stroke: none,
align: left,
("Name: "+name), ("ID: "+str(studentID)),
[Date: #datetime.today().display()], []
)
//align(right)[#text("[rev4.1]", size: 10pt)] // comment it out
pagebreak()
doc
}
|
|
https://github.com/donabe8898/typst-thesis-template | https://raw.githubusercontent.com/donabe8898/typst-thesis-template/main/resume/titlepage.typ | typst | Apache License 2.0 | // The project function defines how your document looks.
// It takes your content and some metadata and formats it.
// Go ahead and customize it to your liking!
#import "../lib/meta.typ": meta
#let titlepage(
title: none,
subtitle:none,
author: none,
date: none, // 日付
year: none, // 年度
teacher: none, // 指導教員
univ_name: none, // 大学名および学部学科名
size: "a4",
body,
) = {
// Set the document's basic properties.
set document(author: author, title: title)
set text(font: "Noto Sans CJK JP", lang: "ja",size: 11pt)
set heading(numbering: "1.1")
set align(center)
set page(
margin: (left: 25mm, right: 25mm, top: 30mm, bottom: 30mm),
number-align: center,
)
// Title page.
// The page can contain a logo if you pass one with `logo: "logo.png"`.
// v(1.2fr)
// if logo != none {
// align(right, image(logo, width: 26%))
// }
// v(1.2fr)
// text(1.1em, date)
v(4em)
text(1em, weight: 360, year)
v(1.1em)
text(1em,weight: 360, "卒業論文")
v(1.1em)
text(1.8em, weight: 400, title)
v(25em)
text(1.8em, weight: 360, author)
v(1.2em)
text(1em, weight: 360, teacher)
v(1em)
text(1em, weight: 360, date)
v(1em)
text(1em, weight: 360, univ_name)
v(3em)
// pad(
// top: 0.7em,
// bottom: 0.7em,
// right: 50%,
// grid(
// columns: (1fr,) * calc.min(3, authors.len()),
// gutter: 1em,
// ..authors.map(author => align(center)[
// *#author.name* \
// #author.email
// ]),
// ),
// )
pagebreak()
// Main body.
set par(justify: true)
body
} |
https://github.com/dice-punk-press/open-d12 | https://raw.githubusercontent.com/dice-punk-press/open-d12/main/src/extensions/combat.typ | typst | Creative Commons Attribution 4.0 International | = Combat
== Description
_This extension adds more detailed combat rules to the game._
#columns(2)[
= Mechanics
Combat takes place in rounds. Each round a character can take
one action (or two half-actions). Players decide on their
character's initial actions, reveal them, and then can use any
remaining part of their action to respond to the actions of other
characters. After responses have been decided all actions are
resolved by making rolls. Finally, any consequences of the
actions are applied and the round ends.
== Actions
To do something in combat a character needs to spend an action.
Typically an action is used to move or make a roll in order to
attack, use a skill, cast a spell, etc.
Each character has one action to spend each round and gets their
action back at the start of the next round.
=== Half-Actions
If a character wants to do two things in a round they can split
their action into two half-actions. A half action always has an
additional penalty dice (this represents rushing or acting
hastily in the game world).
=== Movement
Moving X meters costs half an action.
== Combat Phases
Each round is divided into 6 phases: Describe, Decide, Reveal,
Respond, Roll, Tidy.
=== Describe:
The *Narrator* outlines the current situation,
describing which characters are present, where they are, and any
other relevant details like terrain, conditions, etc.
*Example:* _"The three of you are standing at one end of a long,
narrow bridge made of wood and rope. At the other end are two
goblins, they appear to have seen you and are waving their
spears menacingly as they advance. Beyond the goblins the narrow
mountain track winds up into the mist, one side falling sharply
into empty space. Below the bridge a raging river flows.
A mixture of spray and mist covers everything with a slick film
of moisture."_
=== Decide
Players decide which actions their characters will take and if
they are holding back any part of their action to use in the
respond phase. They also decide on the order any actions will
happen in. The *Narrator* decides the same for the non-player
characters.
_Example_: "Bob decides to cast a defensive spell (1 action) on
Alice, Alice decides to take a full attack with a bow against
the left goblin (1 action), and Eve decides to take a quick
attack with her crossbow against the right goblin (1/2 action).
The Goblins each decide to advance half way across the bridge
(1/2 action) and throw their spears, one at Bob and one at Eve
each using a quick attack (1/2 action)."
=== Reveal
The players and the *Narrator* reveal the characters' actions.
=== Respond
Characters with any of their action remaining can now use it to
respond to the actions of other characters.
_Example_: "Eve has half an action remaining and uses it to
attempt to dodge the spear thrown at her."
=== Roll
The *Narrator* and players make any necessary rolls to resolve
the actions. All actions are resolved simultaneously and the
consequences of any damage or other effects are determined in
the tidy phase.
_Example_: "Bob rolls to cast his spell, Alice rolls to attack
with her bow, Eve rolls (but with a penalty dice for using a
half action). Each of the Goblins move (no roll required) and
then roll to attack with their spears (each with a penalty dice)
. Eve also gets to roll to dodge the spear thrown at her, again
with a penalty dice as it is a half action."
=== Tidy
Any characters with zero or fewer chances remaining are removed
from the combat (and maybe the game). Any other effects are
applied ready for the start of the next round.
] |
https://github.com/tweaselORG/ReportHAR | https://raw.githubusercontent.com/tweaselORG/ReportHAR/main/docs/README.md | markdown | MIT License | reporthar
# reporthar
## Table of contents
### Type Aliases
- [Analysis](README.md#analysis)
- [App](README.md#app)
- [ComplaintOptionsFormal](README.md#complaintoptionsformal)
- [ComplaintOptionsInformal](README.md#complaintoptionsinformal)
- [GenerateAdvancedOptions](README.md#generateadvancedoptions)
- [GenerateAdvancedOptionsComplaintFormal](README.md#generateadvancedoptionscomplaintformal)
- [GenerateAdvancedOptionsComplaintInformal](README.md#generateadvancedoptionscomplaintinformal)
- [GenerateAdvancedOptionsDefault](README.md#generateadvancedoptionsdefault)
- [GenerateOptions](README.md#generateoptions)
- [GenerateOptionsComplaintFormal](README.md#generateoptionscomplaintformal)
- [GenerateOptionsComplaintInformal](README.md#generateoptionscomplaintinformal)
- [GenerateOptionsDefault](README.md#generateoptionsdefault)
- [IosAppPrivacyReportNetworkActivityEntry](README.md#iosappprivacyreportnetworkactivityentry)
- [NetworkActivityReport](README.md#networkactivityreport)
- [SupportedLanguage](README.md#supportedlanguage)
- [TrackerControlNetworkTrafficExportEntry](README.md#trackercontrolnetworktrafficexportentry)
### Variables
- [supportedLanguages](README.md#supportedlanguages)
- [templates](README.md#templates)
- [translations](README.md#translations)
### Functions
- [generate](README.md#generate)
- [generateAdvanced](README.md#generateadvanced)
- [parseNetworkActivityReport](README.md#parsenetworkactivityreport)
## Type Aliases
### Analysis
Ƭ **Analysis**: `Object`
Information about a network traffic analysis that was performed.
#### Type declaration
| Name | Type | Description |
| :------ | :------ | :------ |
| `app` | [`App`](README.md#app) | Information about the analyzed app. |
| `date` | `Date` | The date and time the analysis was performed. |
| `dependencies` | `Record`<`string`, `string`\> | The versions of the dependencies used in the analysis. |
| `deviceManufacturer?` | `string` | The manufacturer of the device/emulator the analysis was performed on. |
| `deviceModel?` | `string` | The model of the device/emulator the analysis was performed on. |
| `deviceType` | ``"device"`` \| ``"emulator"`` | Whether the analysis was run on an emulator or a physical device. |
| `har` | `Har` | The recorded network traffic in HAR format. |
| `harMd5?` | `string` | The MD5 hash of the HAR file such that recipients of the report can verify the integrity of the attached HAR file. |
| `platformBuildString?` | `string` | The OS build string of the device/emulator the analysis was performed on. |
| `platformVersion` | `string` | The operating system version of the device/emulator the analysis was performed on. |
| `trackHarResult` | `ReturnType`<typeof `processRequest`\>[] | The [TrackHAR](https://github.com/tweaselORG/TrackHAR) analysis results for the HAR. |
#### Defined in
[src/lib/generate.ts:27](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/generate.ts#L27)
___
### App
Ƭ **App**: `Object`
Information about an app.
#### Type declaration
| Name | Type | Description |
| :------ | :------ | :------ |
| `id` | `string` | The app's ID, i.e. the bundle ID on iOS or package name on Android. |
| `name` | `string` | The app's user-facing name. |
| `platform` | ``"Android"`` \| ``"iOS"`` | The platform the app runs on. |
| `store?` | ``"Google Play Store"`` \| ``"Apple App Store"`` | The app store the app is distributed through, if applicable. |
| `url?` | `string` | The URL to the app's store page, if available. |
| `version` | `string` | The version of the app that was analyzed. |
#### Defined in
[src/lib/generate.ts:11](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/generate.ts#L11)
___
### ComplaintOptionsFormal
Ƭ **ComplaintOptionsFormal**: `Object`
Additional information for formal complaints to a data protection authority.
#### Type declaration
| Name | Type | Description |
| :------ | :------ | :------ |
| `deviceHasRegisteredSimCard` | `boolean` | Whether the user's device has a SIM card registered to them. |
| `loggedIntoAppStore` | `boolean` | Whether the user is logged into this app store account on their device. |
| `userDeviceAppStore?` | `string` | The app store the app was installed through on the user's device. |
| `userNetworkActivity` | [`NetworkActivityReport`](README.md#networkactivityreport) | A report of the user's network activity, as recorded using the iOS App Privacy Report or Tracker Control on Android. This is used to prove that the user's device actually sent requests to the relevant trackers. Parse the raw exports from the platforms into the correct format using [parseNetworkActivityReport](README.md#parsenetworkactivityreport). |
#### Defined in
[src/lib/generate.ts:99](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/generate.ts#L99)
___
### ComplaintOptionsInformal
Ƭ **ComplaintOptionsInformal**: `Object`
Additional information required for generating an informal complaint to a data protection authority.
#### Type declaration
| Name | Type | Description |
| :------ | :------ | :------ |
| `complainantAddress` | `string` | The complainant's postal address. |
| `complainantAgreesToUnencryptedCommunication` | `boolean` | Whether the complainant agrees to the DPA communicating with them via unencrypted email. |
| `complainantContactDetails` | `string` | The complainant's contact details, e.g. email address. |
| `controllerAddress` | `string` | The controller's postal address. |
| `controllerAddressSourceUrl` | `string` | The URL of the source where the controller's postal address was found. |
| `controllerResponse` | ``"none"`` \| ``"denial"`` \| ``"broken-promise"`` | How the controller responded to the notice, with the following possible values: - `none`: The controller did not respond. - `denial`: The controller denied the claims made in the notice. - `broken-promise`: The controller promised to make changes, but did not actually do so. |
| `date` | `Date` | The date the complaint is being made. |
| `nationalEPrivacyLaw` | ``"TDDDG"`` \| ``false`` | If the complaint should also reference the ePrivacy directive, the name of the national law implementing it. Supported values: - `TDDDG`: Germany (previously TTDSG). |
| `noticeDate` | `Date` | The date the notice to the controller was sent. |
| `reference` | `string` | The complaint's reference number, to be used in any further communication about this complaint. |
#### Defined in
[src/lib/generate.ts:60](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/generate.ts#L60)
___
### GenerateAdvancedOptions
Ƭ **GenerateAdvancedOptions**: [`GenerateAdvancedOptionsDefault`](README.md#generateadvancedoptionsdefault) \| [`GenerateAdvancedOptionsComplaintFormal`](README.md#generateadvancedoptionscomplaintformal) \| [`GenerateAdvancedOptionsComplaintInformal`](README.md#generateadvancedoptionscomplaintinformal)
Options for the [generateAdvanced](README.md#generateadvanced) function.
**`Remarks`**
The options type is a discriminated union based on the `type` property:
- For `type: 'report' | 'notice'`, provide [GenerateAdvancedOptionsDefault](README.md#generateadvancedoptionsdefault).
- For `type: 'complaint'`, provide [GenerateAdvancedOptionsComplaintFormal](README.md#generateadvancedoptionscomplaintformal).
- For `type: 'complaint-informal'`, provide [GenerateAdvancedOptionsComplaintInformal](README.md#generateadvancedoptionscomplaintinformal).
#### Defined in
[src/lib/generate.ts:179](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/generate.ts#L179)
___
### GenerateAdvancedOptionsComplaintFormal
Ƭ **GenerateAdvancedOptionsComplaintFormal**: `Object`
Options for generating a formal complaint using the [generateAdvanced](README.md#generateadvanced) function.
#### Type declaration
| Name | Type | Description |
| :------ | :------ | :------ |
| `analysis` | [`Analysis`](README.md#analysis) | Information about the second network traffic analyis that will be the basis for the complaint. |
| `complaintOptions` | [`ComplaintOptionsInformal`](README.md#complaintoptionsinformal) & [`ComplaintOptionsFormal`](README.md#complaintoptionsformal) | Additional metadata for formal complaints. |
| `initialAnalysis` | [`Analysis`](README.md#analysis) | Information about the initial network traffic analyis that the notice to the controller was based on. |
| `language` | [`SupportedLanguage`](README.md#supportedlanguage) | The language the generated document should be in. |
| `type` | ``"complaint"`` | The type of document to generate, with the following possible values: - `complaint`: Generate a formal complaint to a data protection authority. |
#### Defined in
[src/lib/generate.ts:132](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/generate.ts#L132)
___
### GenerateAdvancedOptionsComplaintInformal
Ƭ **GenerateAdvancedOptionsComplaintInformal**: `Object`
Options for generating a formal or in informal complaint using the [generateAdvanced](README.md#generateadvanced) function.
#### Type declaration
| Name | Type | Description |
| :------ | :------ | :------ |
| `analysis` | [`Analysis`](README.md#analysis) | Information about the second network traffic analyis that will be the basis for the complaint. |
| `complaintOptions` | [`ComplaintOptionsInformal`](README.md#complaintoptionsinformal) | Additional metadata for complaints. |
| `initialAnalysis` | [`Analysis`](README.md#analysis) | Information about the initial network traffic analyis that the notice to the controller was based on. |
| `language` | [`SupportedLanguage`](README.md#supportedlanguage) | The language the generated document should be in. |
| `type` | ``"complaint-informal"`` | The type of document to generate, with the following possible values: - `complaint-informal`: Generate an informal suggestion for investigation to a data protection authority. |
#### Defined in
[src/lib/generate.ts:151](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/generate.ts#L151)
___
### GenerateAdvancedOptionsDefault
Ƭ **GenerateAdvancedOptionsDefault**: `Object`
Options for generating a report or controller notice using the [generateAdvanced](README.md#generateadvanced) function.
#### Type declaration
| Name | Type | Description |
| :------ | :------ | :------ |
| `analysis` | [`Analysis`](README.md#analysis) | Information about the network traffic analyis that the document should be based on. |
| `language` | [`SupportedLanguage`](README.md#supportedlanguage) | The language the generated document should be in. |
| `type` | ``"report"`` \| ``"notice"`` | The type of document to generate, with the following possible values: - `report`: Generate a technical report. - `notice`: Generate a notice to the controller. |
#### Defined in
[src/lib/generate.ts:117](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/generate.ts#L117)
___
### GenerateOptions
Ƭ **GenerateOptions**: [`GenerateOptionsDefault`](README.md#generateoptionsdefault) \| [`GenerateOptionsComplaintFormal`](README.md#generateoptionscomplaintformal) \| [`GenerateOptionsComplaintInformal`](README.md#generateoptionscomplaintinformal)
Options for the [generate](README.md#generate) function.
**`Remarks`**
The options type is a discriminated union based on the `type` property:
- For `type: 'report' | 'notice'`, provide [GenerateOptionsDefault](README.md#generateoptionsdefault).
- For `type: 'complaint'`, provide [GenerateOptionsComplaintFormal](README.md#generateoptionscomplaintformal).
- For `type: 'complaint-informal'`, provide [GenerateOptionsComplaintInformal](README.md#generateoptionscomplaintinformal).
#### Defined in
[src/index.ts:123](https://github.com/tweaselORG/ReportHAR/blob/main/src/index.ts#L123)
___
### GenerateOptionsComplaintFormal
Ƭ **GenerateOptionsComplaintFormal**: `Object`
Options for generating a formal complaint using the [generate](README.md#generate) function.
#### Type declaration
| Name | Type | Description |
| :------ | :------ | :------ |
| `complaintOptions` | [`ComplaintOptionsInformal`](README.md#complaintoptionsinformal) & [`ComplaintOptionsFormal`](README.md#complaintoptionsformal) | Additional metadata for formal complaints. |
| `har` | `TweaselHar` | The HAR containing the recorded network traffic of second analysis, that will be the basis for the complaint. Must be a tweasel HAR with metadata. |
| `harMd5?` | `string` | The MD5 hash of the second HAR file such that recipients of the report can verify the integrity of the attached HAR file. |
| `initialHar` | `TweaselHar` | The HAR containing the recorded network traffic of the initial analysis that the notice to the controller was based on. Must be a tweasel HAR with metadata. |
| `initialHarMd5?` | `string` | The MD5 hash of the initial HAR file such that recipients of the report can verify the integrity of the attached HAR file. |
| `initialTrackHarResult` | `ReturnType`<typeof `processRequest`\>[] | The [TrackHAR](https://github.com/tweaselORG/TrackHAR) analysis results for the initial HAR. |
| `language` | [`SupportedLanguage`](README.md#supportedlanguage) | The language the generated document should be in. |
| `trackHarResult` | `ReturnType`<typeof `processRequest`\>[] | The [TrackHAR](https://github.com/tweaselORG/TrackHAR) analysis results for the second HAR. |
| `type` | ``"complaint"`` | The type of document to generate, with the following possible values: - `complaint`: Generate a complaint to a data protection authority. |
#### Defined in
[src/index.ts:34](https://github.com/tweaselORG/ReportHAR/blob/main/src/index.ts#L34)
___
### GenerateOptionsComplaintInformal
Ƭ **GenerateOptionsComplaintInformal**: `Object`
Options for generating an informal complaint using the [generate](README.md#generate) function.
#### Type declaration
| Name | Type | Description |
| :------ | :------ | :------ |
| `complaintOptions` | [`ComplaintOptionsInformal`](README.md#complaintoptionsinformal) | Additional metadata for informal complaints. |
| `har` | `TweaselHar` | The HAR containing the recorded network traffic of second analysis, that will be the basis for the complaint. Must be a tweasel HAR with metadata. |
| `harMd5?` | `string` | The MD5 hash of the second HAR file such that recipients of the report can verify the integrity of the attached HAR file. |
| `initialHar` | `TweaselHar` | The HAR containing the recorded network traffic of the initial analysis that the notice to the controller was based on. Must be a tweasel HAR with metadata. |
| `initialHarMd5?` | `string` | The MD5 hash of the initial HAR file such that recipients of the report can verify the integrity of the attached HAR file. |
| `initialTrackHarResult` | `ReturnType`<typeof `processRequest`\>[] | The [TrackHAR](https://github.com/tweaselORG/TrackHAR) analysis results for the initial HAR. |
| `language` | [`SupportedLanguage`](README.md#supportedlanguage) | The language the generated document should be in. |
| `trackHarResult` | `ReturnType`<typeof `processRequest`\>[] | The [TrackHAR](https://github.com/tweaselORG/TrackHAR) analysis results for the second HAR. |
| `type` | ``"complaint-informal"`` | The type of document to generate, with the following possible values: - `complaint-informal`: Generate an informal suggestion for investigation to a data protection authority. |
#### Defined in
[src/index.ts:74](https://github.com/tweaselORG/ReportHAR/blob/main/src/index.ts#L74)
___
### GenerateOptionsDefault
Ƭ **GenerateOptionsDefault**: `Object`
Options for generating a report or controller notice using the [generate](README.md#generate) function.
#### Type declaration
| Name | Type | Description |
| :------ | :------ | :------ |
| `har` | `TweaselHar` | The HAR containing the recorded network traffic. Must be a tweasel HAR with metadata. |
| `harMd5?` | `string` | The MD5 hash of the HAR file such that recipients of the report can verify the integrity of the attached HAR file. |
| `language` | [`SupportedLanguage`](README.md#supportedlanguage) | The language the generated document should be in. |
| `trackHarResult` | `ReturnType`<typeof `processRequest`\>[] | The [TrackHAR](https://github.com/tweaselORG/TrackHAR) analysis results for the HAR. |
| `type` | ``"report"`` \| ``"notice"`` | The type of document to generate, with the following possible values: - `report`: Generate a technical report. - `notice`: Generate a notice to the controller. |
#### Defined in
[src/index.ts:12](https://github.com/tweaselORG/ReportHAR/blob/main/src/index.ts#L12)
___
### IosAppPrivacyReportNetworkActivityEntry
Ƭ **IosAppPrivacyReportNetworkActivityEntry**: `Object`
A network access as recorded in an iOS App Privacy Report.
**`See`**
https://developer.apple.com/documentation/network/privacy_management/inspecting_app_activity_data#3845757
#### Type declaration
| Name | Type | Description |
| :------ | :------ | :------ |
| `bundleID` | `string` | The bundle identifier of the initiating app. |
| `context` | `string` | The website that made the connection, if applicable. |
| `domain` | `string` | The domain of the network connection. |
| `domainOwner` | `string` | The owner of the domain, if applicable. |
| `domainType` | ``1`` \| ``2`` | When the associated value is `1`, the domain has been identified as potentially collecting information across apps and sites, and potentially profiling users. A value of `2` means that the domain hasn’t been identified as such. |
| `firstTimeStamp` | `string` | The time of the first connection to this domain. |
| `hits` | `number` | The number of times the app contacted the domain in the last seven days. |
| `initiatedType` | ``"AppInitiated"`` \| ``"NonAppInitiated"`` | Whether the app (`AppInitiated`) or the user (`NonAppInitiated`) initiated the connection. |
| `timeStamp` | `string` | The time of the most recent connection. |
| `type` | ``"networkActivity"`` | An associated value of `networkActivity` means that this dictionary describes network activity data. |
#### Defined in
[src/lib/user-network-activity.ts:28](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/user-network-activity.ts#L28)
___
### NetworkActivityReport
Ƭ **NetworkActivityReport**: { `appId`: `string` \| `undefined` ; `hostname`: `string` ; `index`: `number` ; `timestamp`: `Date` }[]
An entry in a network activity report, containing information about the hostnames that were contacted on the user's
device.
#### Defined in
[src/lib/user-network-activity.ts:7](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/user-network-activity.ts#L7)
___
### SupportedLanguage
Ƭ **SupportedLanguage**: keyof typeof [`templates`](README.md#templates) & keyof typeof [`translations`](README.md#translations)
A language that translations and templates are available for.
#### Defined in
[src/lib/translations.ts:27](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/translations.ts#L27)
___
### TrackerControlNetworkTrafficExportEntry
Ƭ **TrackerControlNetworkTrafficExportEntry**: { `App`: `string` ; `Category`: `string` ; `Package`: `string` ; `Tracker`: `string` ; `daddr`: `string` ; `time`: `string` ; `uid`: `string` ; `uncertain`: `string` } \| { `Tracker Category`: `string` ; `Tracker Name`: `string` ; `daddr`: `string` ; `time`: `string` ; `uncertain`: `string` }
An entry in a network traffic export from the Tracker Control app on Android.
Exports across all apps contain more fields than exports for just one app.
#### Defined in
[src/lib/user-network-activity.ts:60](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/user-network-activity.ts#L60)
## Variables
### supportedLanguages
• `Const` **supportedLanguages**: ``"en"``[]
The languages that translations and templates are available for.
#### Defined in
[src/lib/translations.ts:22](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/translations.ts#L22)
___
### templates
• `Const` **templates**: `Object`
The Typst template files.
#### Type declaration
| Name | Type |
| :------ | :------ |
| `en` | { `complaint`: `string` ; `notice`: `string` ; `report`: `string` ; `style`: `string` } |
| `en.complaint` | `string` |
| `en.notice` | `string` |
| `en.report` | `string` |
| `en.style` | `string` |
#### Defined in
[src/lib/translations.ts:12](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/translations.ts#L12)
___
### translations
• `Const` **translations**: `Object`
The string translations.
#### Type declaration
| Name | Type |
| :------ | :------ |
| `en` | { `properties`: { `accelerometerX`: `string` = "Accelerometer X"; `accelerometerY`: `string` = "Accelerometer Y"; `accelerometerZ`: `string` = "Accelerometer Z"; `appId`: `string` = "App ID"; `appName`: `string` = "App name"; `appVersion`: `string` = "App version"; `architecture`: `string` = "Architecture"; `batteryLevel`: `string` = "Battery level"; `carrier`: `string` = "Carrier"; `country`: `string` = "Country"; `deviceName`: `string` = "Device name"; `diskFree`: `string` = "Free disk space"; `diskTotal`: `string` = "Total disk space"; `diskUsed`: `string` = "Used disk space"; `hashedIdfa`: `string` = "Hashed device advertising ID"; `idfa`: `string` = "Device advertising ID (GAID/IDFA)"; `idfv`: `string` = "Developer-scoped device ID (IDFV/ASID/ANDROID\_ID)"; `installTime`: `string` = "App install time"; `isCharging`: `string` = "Charging status"; `isEmulator`: `string` = "Is device an emulator?"; `isFirstLaunch`: `string` = "Is first launch?"; `isInDarkMode`: `string` = "Is app in dark mode?"; `isInForeground`: `string` = "Is app in foreground?"; `isRoaming`: `string` = "Is device roaming?"; `isRooted`: `string` = "Is device rooted?"; `language`: `string` = "Language"; `latitude`: `string` = "Latitude"; `localIp`: `string` = "Local IP address(es)"; `longitude`: `string` = "Longitude"; `macAddress`: `string` = "MAC address"; `manufacturer`: `string` = "Manufacturer"; `model`: `string` = "Model"; `networkConnectionType`: `string` = "Network connection type"; `orientation`: `string` = "Orientation"; `osName`: `string` = "OS name"; `osVersion`: `string` = "OS version"; `otherIdentifiers`: `string` = "Other unique identifiers for the user, device, session, or installation"; `publicIp`: `string` = "Public IP address"; `pushNotificationToken`: `string` = "Push notification token"; `ramFree`: `string` = "Free RAM"; `ramTotal`: `string` = "Total RAM"; `ramUsed`: `string` = "Used RAM"; `referer`: `string` = "Referer"; `revenue`: `string` = "Earned revenue"; `rotationX`: `string` = "Rotation X"; `rotationY`: `string` = "Rotation Y"; `rotationZ`: `string` = "Rotation Z"; `screenHeight`: `string` = "Screen height"; `screenWidth`: `string` = "Screen width"; `signalStrengthCellular`: `string` = "Signal strength (cellular)"; `signalStrengthWifi`: `string` = "Signal strength (Wi-Fi)"; `startTime`: `string` = "App start time"; `state`: `string` = "State/Sub national entity"; `timeSpent`: `string` = "Time spent in app"; `timezone`: `string` = "Time zone"; `trackerSdkVersion`: `string` = "Tracker SDK version"; `uptime`: `string` = "Uptime"; `userAgent`: `string` = "User agent"; `viewedPage`: `string` = "Viewed page"; `volume`: `string` = "Volume" } ; `tracker-descriptions`: { `adjust`: `string` = "Adjust offers the following services:\n\n- User engagement tracking using events. “You can define in-app events for your app to measure user registrations, add-to-carts, or level ups, while setting up revenue events lets you record in-app purchases and transactions. Set up events to: See where your users go directly after install, Discover the app features your users like the most, Identify the last thing a user does before they become inactive”[https://help.adjust.com/en/article/add-events]\n- Mobile attribution, in order to “[i]dentify [the] best users and channels”.[https://www.adjust.com/product/mobile-app-attribution/] “Adjust's attribution matches your app users to the source that drove their install. You can use this attribution data to measure campaign performance, run effective retargeting campaigns, optimize your creative assets, and more.”[https://help.adjust.com/en/article/attribution-methods] Additionally, “Adjust can reattribute dormant users who engage with a new source and then return to [the] app.”[https://help.adjust.com/en/article/reattribution]\n\n Adjust uses two attribution methods:\n - “Deterministic attribution is Adjust's main attribution method and involves device matching. We collect a unique identifier from recorded engagements and installs, and if both IDs match, we can attribute that engagement to the install. With a 100% accuracy rate, click-based device matching is the most reliable attribution method. We use deterministic attribution to attribute installs (first app opens) and reattribute (assign new attribution sources to) inactive users. Adjust uses the following identifiers for deterministic attribution: Advertising IDs […], Device IDs […], Adjust reftags […]”[https://help.adjust.com/en/article/attribution-methods#deterministic-attribution]\n - “Probabilistic modeling […] uses machine learning to support a statistical approach to measurement.”[https://help.adjust.com/en/article/attribution-methods#probabilistic-modeling]\n- Uninstall and reinstall tracking. “When a user installs [the] app, the app is given a unique push token which the Adjust SDK forwards to Adjust's servers. Silent push notifications are then sent once per day to check if the app is still installed.”[https://help.adjust.com/en/article/uninstalls-reinstalls]\n- Audience segmentation to “group users together based on […] criteria”.[https://www.adjust.com/product/audience-builder/]\n- Fraud prevention. “Organic users are captured accurately and not misattributed”.[https://www.adjust.com/product/fraud-prevention/]\n\nAdditionally, Adjust can pull in tracking data from partner companies.[https://help.adjust.com/en/article/partner-connections]"; `branch-io`: `string` = "Branch offers the following services:\n\n- Mobile attribution[https://www.branch.io/attribution/] to “[c]apture every customer touchpoint across any channel, platform, OS to optimize […] campaigns and maximize ROI.”[https://www.branch.io/features/]\n- Ad conversion tracking. Branch can “[r]etarget app users who see a web ad and then purchase in the app, attribute revenue to the web ad that drove the install, and measure cumulative revenue from users across both web and app.”[https://www.branch.io/universal-ads/]\n- Custom audiences to “communicate the perfect message to the ideal customer, at the right moment”. “Get higher return on ad spend (ROAS) with precision retargeting of high-value active users and eliminate wasted spend in your acquisition campaigns by excluding existing customers. Re-engage lapsed users, boost propensity to purchase, and increase sessions per user.”[https://www.branch.io/engagement-builder/]\n- Fraud protection.[https://www.branch.io/fraud-protection/]\n\nBranch provides integrations to automatically “send Branch data to […] marketing and analytics partners to measure and optimize […] campaigns.”[https://www.branch.io/data-feeds/]"; `branch-io-attribution-api`: `string` = "The Branch Attribution API is used for “deep linking and session attribution. […] Every time the API is called, it will track an INSTALL, REINSTALL, or OPEN event in Branch and return deep link data in the response if the session is attributed.”[https://help.branch.io/developers-hub/reference/attribution-api] It can also track “additional downstream conversion events” like PURCHASE.[https://help.branch.io/developers-hub/reference/attribution-api#tracking-downstream-events]"; `chartboost`: `string` = "Chartboost is an advertising platform focused on mobile gaming that caters to both publishers[https://www.chartboost.com/products/monetization/] and advertisers[https://www.chartboost.com/products/advertising/].\n\nChartboost supports mediation (real-time bidding)[https://www.chartboost.com/products/mediation/], analytics[https://docs.chartboost.com/en/mediation/analytics/], and A/B testing[https://docs.chartboost.com/en/mediation/ab-tests/]."; `facebook-audience-network`: `string` = "Meta Audience Network is a service by Facebook that allows app developers to monetize their apps with ads.[https://developers.facebook.com/docs/audience-network] Facebook offers Audience Network SDKs for Android[https://developers.facebook.com/docs/audience-network/setting-up/platform-setup/android/add-sdk], iOS[https://developers.facebook.com/docs/audience-network/setting-up/platform-setup/ios/add-sdk], and Unity[https://developers.facebook.com/docs/audience-network/setting-up/platform-steup/unity/add-sdk]."; `facebook-graph-app-events`: `string` = "The Graph API is provided by Facebook to “get data into and out of the Facebook platform”.[https://developers.facebook.com/docs/graph-api/overview] It can be accessed through the Facebook SDKs for Android[https://developers.facebook.com/docs/android/graph] and iOS[https://developers.facebook.com/docs/ios/graph].\n\nThe App Events endpoint allows developers to “track actions that occur in [a] mobile app or web page such as app installs and purchase events” in order to “measure ad performance and build audiences for ad targeting”. The Facebook SDK automatically logs app installs, app sessions, and in-app purchases using this endpoint. Additionally, developers can manually log their own events.[https://developers.facebook.com/docs/marketing-api/app-event-api]"; `firebaseinstallations`: `string` = "The Firebase Installations service (FIS) provides a unique identifier for each installed instance of a Firebase app, called Firebase installation ID (FID).[https://firebase.google.com/docs/projects/manage-installations] “Many Firebase services depend on the Firebase Installations API in order to identify app installs and/or authenticate client requests to their servers.”[https://console.cloud.google.com/marketplace/product/google/firebaseinstallations.googleapis.com] Other purposes include user segmentation, message delivery, performance monitoring, tracking the number of unique users, or selecting which configuration values to return.[https://firebase.google.com/docs/projects/manage-installations]\n\nFIDs can also be used by Google Analytics for attribution.[https://firebase.google.com/docs/projects/manage-installations]"; `google-fundingchoices`: `string` = "With Google's Privacy & Messaging API (formerly Funding Choices[https://support.google.com/fundingchoices/answer/9010669?hl=en]), app developers can manage users' consent choices[https://developers.google.com/funding-choices] and show consent forms[https://developers.google.com/admob/android/privacy#load-and-show-form]. It can also be used to detect ad blockers and display messages to “recover lost revenue from ad blocking users”.[https://support.google.com/admob/answer/10107561]\n\nThe Privacy & Messaging API is available through Google's AdMob, Ad Manager, and AdSense SDKs on the web, Android, and iOS.[https://support.google.com/fundingchoices/answer/9010669?hl=en]"; `googledatatransport-batchlog`: `string` = "The GoogleDataTransport SDK is a transport layer used internally by many other Firebase (e.g. Crashlytics, Performance, Core) Google (e.g. ML Kit) SDKs and services.[https://github.com/firebase/firebase-ios-sdk/issues/8220#issuecomment-858040701] It batches application-specific data from within an app to Google, using a common endpoint regardless of the actual SDK that was integrated by the app developer.[https://stackoverflow.com/a/76334853]"; `infonline`: `string` = "INFOnline provides digital audience measurement for websites and apps.[https://www.infonline.de/en/]\n\nThey offer two separate measurement systems: Census Measurement (IOMb[https://www.infonline.de/download/?wpdmdl=7135]) and INFOnline Measurement pseudonymous (IOMp[https://www.infonline.de/download/?wpdmdl=7135], formerly SZMnG[https://www.infonline.de/faqs/]). Census Measurement can be recognized by the URL path fragment “base.io”, whereas INFOnline Measurement pseudonymous uses “tx.io”.[https://docs.infonline.de/infonline-measurement/en/integration/web/checkliste\_web\_allgemein/]\n\nINFOnline boasts with constantly adapting their technology in order to circumvent browser restrictions, ad and tracking blockers, and privacy-preserving changes by operating systems.[https://www.infonline.de/measurement/]"; `infonline-pseudonymous`: `string` = "Unlike Census Measurement, which works anonymously without identifiers, INFOnline Measurement pseudonymous “is designed as a pseudonymous system (with client identifiers)”.[https://docs.infonline.de/infonline-measurement/en/getting-started/verfahrensbeschreibung/]\n\nAccording INFOnline’s own documentation, “[…] the pseudonymous INFOnline Measurement may only be loaded and executed if there is active consent from the user of [the] web page. […] The following also applies to apps: Only start the session of pseudonymous measurement if you have the user's consent.”[https://docs.infonline.de/infonline-measurement/en/getting-started/rechtliche-auswirkungen/]"; `ironsource`: `string` = "ironSource offers the following services:\n\n- Analytics.[https://www.is.com/analytics/]\n- App monetization for publishers[https://www.is.com/monetization/], including ad mediation[https://www.is.com/mediation/], real-time bidding[https://www.is.com/in-app-bidding/], and A/B testing[https://www.is.com/monetization-ab-testing/].\n- Advertising for user acquisition, to “[k]eep your best users in your portfolio with cross promotion campaigns”.[https://www.is.com/user-growth/] Advertisers can “[a]ccurately measure the ad revenue generated for each device and impression – from any ad unit, across every ad network.”[https://www.is.com/impression-level-revenue/]\n- Audience segmentation, to “[p]ersonalize the ad experience for different audiences to keep users coming back and encourage them to progress in your game”.[https://www.is.com/segments/]"; `microsoft-appcenter`: `string` = "Visual Studio App Center is a collection of services by Microsoft to help developers “continuously build, test, release,\nand monitor apps for every platform.”[https://learn.microsoft.com/en-us/appcenter/]\n\nAmong those services are:\n\n- App Center Diagnostics, to “[collect] information about crashes and errors” in apps.[https://learn.microsoft.com/en-us/appcenter/diagnostics/]\n- App Center Analytics, which “helps [developers] understand user behavior and customer engagement […]. The SDK automatically captures session count and device properties like model, OS version, etc. [Developers] can define [their] own custom events […].”[https://learn.microsoft.com/en-us/appcenter/sdk/analytics/android] By tracking events, developers can “learn more about […] users' behavior and understand the interaction between […] users and […] apps.”[https://learn.microsoft.com/en-us/appcenter/analytics/event-metrics]\n\nRegardless of the particular SDK or service, all data sent to App Center goes to a single endpoint.[https://learn.microsoft.com/en-us/appcenter/sdk/data-collected]"; `mopub`: `string` = "MoPub was a mobile app monetization service.[https://web.archive.org/web/20210126085400/https://www.mopub.com/en]\n\nMoPub has since been acquired by AppLovin and integrated into AppLovin MAX.[https://www.applovin.com/blog/applovins-acquisition-of-mopub-has-officially-closed/]"; `onesignal`: `string` = "OneSignal provides SDKs and APIs to help developers “send push notifications, in-app messages, SMS, and emails.”[https://documentation.onesignal.com/docs/onesignal-platform]\n\nFor that, it also offers personalization[https://onesignal.com/personalization], user segmentation[https://onesignal.com/targeting-segmentation], and A/B testing[https://documentation.onesignal.com/docs/ab-testing] features. Developers can “send personalized messages based on real-time user behavior, […] user attributes, events, location, language, and more”.[https://onesignal.com/personalization] Audience cohorts can be synced from various analytics providers.[https://onesignal.com/targeting-segmentation]\n\nAdditionally, OneSignal offers analytics features. Developers can “[c]reate an understanding as to how [their] messaging drives direct, indirect, and unattributed user actions” and “[e]asily quantify which messages are driving sales, engagement, and more”.[https://onesignal.com/analytics] OneSignal advertises with helping developers “know precisely when a device receives a notification”, even if “[u]sers uninstall apps, swap phones, turn off their phones, or are unreachable”.[https://onesignal.com/analytics] Analytics data can be shared with various third-party tracking companies using integrations.[https://onesignal.com/integrations/category/analytics]"; `onesignal-add-a-device`: `string` = "The “Add a device” endpoint is used ”to register a new device with OneSignal.“[https://documentation.onesignal.com/v9.0/reference/add-a-device]"; `singular-net`: `string` = "Singular offers the following services:\n\n- Analytics on a company's marketing spending and efficacy[https://www.singular.net/marketing-analytics/], with the goal of “[acquiring] the highest value users”[https://www.singular.net/ad-monetization/].\n- Tracking and attribution of users, “connecting the install of a mobile app and the user’s activities inside the app to the marketing campaign that led to the installation”.[https://www.singular.net/mobile-attribution/] “For every install, Singular scans its database for relevant ad interactions (ad clicks and ad views) that originated from the same device […]. […] The goal is to reconstruct the user journey as the first step toward finding the touchpoint that most likely led the user to install the app.”[https://support.singular.net/hc/en-us/articles/115000526963-Understanding-Singular-Mobile-App-Attribution] Additionally, Singular attributes the following events to the user: ”User sessions (i.e., every time the user opens the app), Revenue events (purchases made through the app), Any other events that are relevant to [the] app, such as sign-ups, tutorial completions, or level-ups.“, as well as app uninstalls[https://support.singular.net/hc/en-us/articles/115000526963-Understanding-Singular-Mobile-App-Attribution]\n- Mobile ad fraud prevention.[https://www.singular.net/fraud-prevention/]\n\nSingular boasts with being able to track users across devices, using “advertiser-reported IDs to tie different devices to the same user”.[https://www.singular.net/cross-device-attribution/] They claim: “By implementing an API call to the Singular SDK or server with a user ID, Singular helps you sync up users and devices in such a way that you can recognize customers or users and properly attribute conversions to ad spend and marketing activity, plus assign customers or users to cohorts, regardless of which device or platform they’re using at any given moment.”[https://www.singular.net/glossary/cross-device-attribution/]\n\nAdditionally, they pull in, aggregate, standardize, and match tracking data from thousands of partner companies in the fields of analytics, attribution, audience measurement, and ad monetization.[https://www.singular.net/partner-integrations/]"; `smartbear-bugsnag`: `string` = "BugSnag offers the following services:\n\n- Error monitoring, collecting and visualizing crash data.[https://www.bugsnag.com/error-monitoring/]\n- Real user monitoring, to “[o]ptimize your application based on real-time user actions with your application” and give “visibility into critical performance metrics like hot and cold app starts, network requests, screen-load time and more.”[https://www.bugsnag.com/real-user-monitoring/]"; `smartbear-bugsnag-notify`: `string` = "The Error Reporting API is used to send error reports and crashes to BugSnag.[https://bugsnagerrorreportingapi.docs.apiary.io/#reference/0/minidump/send-error-reports]"; `smartbear-bugsnag-session`: `string` = "The Session Tracking API is used to “notify Bugsnag of sessions starting in web, mobile or desktop applications.”[https://bugsnagsessiontrackingapi.docs.apiary.io/#reference/0/session/report-a-session-starting]" } } |
| `en.properties` | { `accelerometerX`: `string` = "Accelerometer X"; `accelerometerY`: `string` = "Accelerometer Y"; `accelerometerZ`: `string` = "Accelerometer Z"; `appId`: `string` = "App ID"; `appName`: `string` = "App name"; `appVersion`: `string` = "App version"; `architecture`: `string` = "Architecture"; `batteryLevel`: `string` = "Battery level"; `carrier`: `string` = "Carrier"; `country`: `string` = "Country"; `deviceName`: `string` = "Device name"; `diskFree`: `string` = "Free disk space"; `diskTotal`: `string` = "Total disk space"; `diskUsed`: `string` = "Used disk space"; `hashedIdfa`: `string` = "Hashed device advertising ID"; `idfa`: `string` = "Device advertising ID (GAID/IDFA)"; `idfv`: `string` = "Developer-scoped device ID (IDFV/ASID/ANDROID\_ID)"; `installTime`: `string` = "App install time"; `isCharging`: `string` = "Charging status"; `isEmulator`: `string` = "Is device an emulator?"; `isFirstLaunch`: `string` = "Is first launch?"; `isInDarkMode`: `string` = "Is app in dark mode?"; `isInForeground`: `string` = "Is app in foreground?"; `isRoaming`: `string` = "Is device roaming?"; `isRooted`: `string` = "Is device rooted?"; `language`: `string` = "Language"; `latitude`: `string` = "Latitude"; `localIp`: `string` = "Local IP address(es)"; `longitude`: `string` = "Longitude"; `macAddress`: `string` = "MAC address"; `manufacturer`: `string` = "Manufacturer"; `model`: `string` = "Model"; `networkConnectionType`: `string` = "Network connection type"; `orientation`: `string` = "Orientation"; `osName`: `string` = "OS name"; `osVersion`: `string` = "OS version"; `otherIdentifiers`: `string` = "Other unique identifiers for the user, device, session, or installation"; `publicIp`: `string` = "Public IP address"; `pushNotificationToken`: `string` = "Push notification token"; `ramFree`: `string` = "Free RAM"; `ramTotal`: `string` = "Total RAM"; `ramUsed`: `string` = "Used RAM"; `referer`: `string` = "Referer"; `revenue`: `string` = "Earned revenue"; `rotationX`: `string` = "Rotation X"; `rotationY`: `string` = "Rotation Y"; `rotationZ`: `string` = "Rotation Z"; `screenHeight`: `string` = "Screen height"; `screenWidth`: `string` = "Screen width"; `signalStrengthCellular`: `string` = "Signal strength (cellular)"; `signalStrengthWifi`: `string` = "Signal strength (Wi-Fi)"; `startTime`: `string` = "App start time"; `state`: `string` = "State/Sub national entity"; `timeSpent`: `string` = "Time spent in app"; `timezone`: `string` = "Time zone"; `trackerSdkVersion`: `string` = "Tracker SDK version"; `uptime`: `string` = "Uptime"; `userAgent`: `string` = "User agent"; `viewedPage`: `string` = "Viewed page"; `volume`: `string` = "Volume" } |
| `en.properties.accelerometerX` | `string` |
| `en.properties.accelerometerY` | `string` |
| `en.properties.accelerometerZ` | `string` |
| `en.properties.appId` | `string` |
| `en.properties.appName` | `string` |
| `en.properties.appVersion` | `string` |
| `en.properties.architecture` | `string` |
| `en.properties.batteryLevel` | `string` |
| `en.properties.carrier` | `string` |
| `en.properties.country` | `string` |
| `en.properties.deviceName` | `string` |
| `en.properties.diskFree` | `string` |
| `en.properties.diskTotal` | `string` |
| `en.properties.diskUsed` | `string` |
| `en.properties.hashedIdfa` | `string` |
| `en.properties.idfa` | `string` |
| `en.properties.idfv` | `string` |
| `en.properties.installTime` | `string` |
| `en.properties.isCharging` | `string` |
| `en.properties.isEmulator` | `string` |
| `en.properties.isFirstLaunch` | `string` |
| `en.properties.isInDarkMode` | `string` |
| `en.properties.isInForeground` | `string` |
| `en.properties.isRoaming` | `string` |
| `en.properties.isRooted` | `string` |
| `en.properties.language` | `string` |
| `en.properties.latitude` | `string` |
| `en.properties.localIp` | `string` |
| `en.properties.longitude` | `string` |
| `en.properties.macAddress` | `string` |
| `en.properties.manufacturer` | `string` |
| `en.properties.model` | `string` |
| `en.properties.networkConnectionType` | `string` |
| `en.properties.orientation` | `string` |
| `en.properties.osName` | `string` |
| `en.properties.osVersion` | `string` |
| `en.properties.otherIdentifiers` | `string` |
| `en.properties.publicIp` | `string` |
| `en.properties.pushNotificationToken` | `string` |
| `en.properties.ramFree` | `string` |
| `en.properties.ramTotal` | `string` |
| `en.properties.ramUsed` | `string` |
| `en.properties.referer` | `string` |
| `en.properties.revenue` | `string` |
| `en.properties.rotationX` | `string` |
| `en.properties.rotationY` | `string` |
| `en.properties.rotationZ` | `string` |
| `en.properties.screenHeight` | `string` |
| `en.properties.screenWidth` | `string` |
| `en.properties.signalStrengthCellular` | `string` |
| `en.properties.signalStrengthWifi` | `string` |
| `en.properties.startTime` | `string` |
| `en.properties.state` | `string` |
| `en.properties.timeSpent` | `string` |
| `en.properties.timezone` | `string` |
| `en.properties.trackerSdkVersion` | `string` |
| `en.properties.uptime` | `string` |
| `en.properties.userAgent` | `string` |
| `en.properties.viewedPage` | `string` |
| `en.properties.volume` | `string` |
| `en.tracker-descriptions` | { `adjust`: `string` = "Adjust offers the following services:\n\n- User engagement tracking using events. “You can define in-app events for your app to measure user registrations, add-to-carts, or level ups, while setting up revenue events lets you record in-app purchases and transactions. Set up events to: See where your users go directly after install, Discover the app features your users like the most, Identify the last thing a user does before they become inactive”[https://help.adjust.com/en/article/add-events]\n- Mobile attribution, in order to “[i]dentify [the] best users and channels”.[https://www.adjust.com/product/mobile-app-attribution/] “Adjust's attribution matches your app users to the source that drove their install. You can use this attribution data to measure campaign performance, run effective retargeting campaigns, optimize your creative assets, and more.”[https://help.adjust.com/en/article/attribution-methods] Additionally, “Adjust can reattribute dormant users who engage with a new source and then return to [the] app.”[https://help.adjust.com/en/article/reattribution]\n\n Adjust uses two attribution methods:\n - “Deterministic attribution is Adjust's main attribution method and involves device matching. We collect a unique identifier from recorded engagements and installs, and if both IDs match, we can attribute that engagement to the install. With a 100% accuracy rate, click-based device matching is the most reliable attribution method. We use deterministic attribution to attribute installs (first app opens) and reattribute (assign new attribution sources to) inactive users. Adjust uses the following identifiers for deterministic attribution: Advertising IDs […], Device IDs […], Adjust reftags […]”[https://help.adjust.com/en/article/attribution-methods#deterministic-attribution]\n - “Probabilistic modeling […] uses machine learning to support a statistical approach to measurement.”[https://help.adjust.com/en/article/attribution-methods#probabilistic-modeling]\n- Uninstall and reinstall tracking. “When a user installs [the] app, the app is given a unique push token which the Adjust SDK forwards to Adjust's servers. Silent push notifications are then sent once per day to check if the app is still installed.”[https://help.adjust.com/en/article/uninstalls-reinstalls]\n- Audience segmentation to “group users together based on […] criteria”.[https://www.adjust.com/product/audience-builder/]\n- Fraud prevention. “Organic users are captured accurately and not misattributed”.[https://www.adjust.com/product/fraud-prevention/]\n\nAdditionally, Adjust can pull in tracking data from partner companies.[https://help.adjust.com/en/article/partner-connections]"; `branch-io`: `string` = "Branch offers the following services:\n\n- Mobile attribution[https://www.branch.io/attribution/] to “[c]apture every customer touchpoint across any channel, platform, OS to optimize […] campaigns and maximize ROI.”[https://www.branch.io/features/]\n- Ad conversion tracking. Branch can “[r]etarget app users who see a web ad and then purchase in the app, attribute revenue to the web ad that drove the install, and measure cumulative revenue from users across both web and app.”[https://www.branch.io/universal-ads/]\n- Custom audiences to “communicate the perfect message to the ideal customer, at the right moment”. “Get higher return on ad spend (ROAS) with precision retargeting of high-value active users and eliminate wasted spend in your acquisition campaigns by excluding existing customers. Re-engage lapsed users, boost propensity to purchase, and increase sessions per user.”[https://www.branch.io/engagement-builder/]\n- Fraud protection.[https://www.branch.io/fraud-protection/]\n\nBranch provides integrations to automatically “send Branch data to […] marketing and analytics partners to measure and optimize […] campaigns.”[https://www.branch.io/data-feeds/]"; `branch-io-attribution-api`: `string` = "The Branch Attribution API is used for “deep linking and session attribution. […] Every time the API is called, it will track an INSTALL, REINSTALL, or OPEN event in Branch and return deep link data in the response if the session is attributed.”[https://help.branch.io/developers-hub/reference/attribution-api] It can also track “additional downstream conversion events” like PURCHASE.[https://help.branch.io/developers-hub/reference/attribution-api#tracking-downstream-events]"; `chartboost`: `string` = "Chartboost is an advertising platform focused on mobile gaming that caters to both publishers[https://www.chartboost.com/products/monetization/] and advertisers[https://www.chartboost.com/products/advertising/].\n\nChartboost supports mediation (real-time bidding)[https://www.chartboost.com/products/mediation/], analytics[https://docs.chartboost.com/en/mediation/analytics/], and A/B testing[https://docs.chartboost.com/en/mediation/ab-tests/]."; `facebook-audience-network`: `string` = "Meta Audience Network is a service by Facebook that allows app developers to monetize their apps with ads.[https://developers.facebook.com/docs/audience-network] Facebook offers Audience Network SDKs for Android[https://developers.facebook.com/docs/audience-network/setting-up/platform-setup/android/add-sdk], iOS[https://developers.facebook.com/docs/audience-network/setting-up/platform-setup/ios/add-sdk], and Unity[https://developers.facebook.com/docs/audience-network/setting-up/platform-steup/unity/add-sdk]."; `facebook-graph-app-events`: `string` = "The Graph API is provided by Facebook to “get data into and out of the Facebook platform”.[https://developers.facebook.com/docs/graph-api/overview] It can be accessed through the Facebook SDKs for Android[https://developers.facebook.com/docs/android/graph] and iOS[https://developers.facebook.com/docs/ios/graph].\n\nThe App Events endpoint allows developers to “track actions that occur in [a] mobile app or web page such as app installs and purchase events” in order to “measure ad performance and build audiences for ad targeting”. The Facebook SDK automatically logs app installs, app sessions, and in-app purchases using this endpoint. Additionally, developers can manually log their own events.[https://developers.facebook.com/docs/marketing-api/app-event-api]"; `firebaseinstallations`: `string` = "The Firebase Installations service (FIS) provides a unique identifier for each installed instance of a Firebase app, called Firebase installation ID (FID).[https://firebase.google.com/docs/projects/manage-installations] “Many Firebase services depend on the Firebase Installations API in order to identify app installs and/or authenticate client requests to their servers.”[https://console.cloud.google.com/marketplace/product/google/firebaseinstallations.googleapis.com] Other purposes include user segmentation, message delivery, performance monitoring, tracking the number of unique users, or selecting which configuration values to return.[https://firebase.google.com/docs/projects/manage-installations]\n\nFIDs can also be used by Google Analytics for attribution.[https://firebase.google.com/docs/projects/manage-installations]"; `google-fundingchoices`: `string` = "With Google's Privacy & Messaging API (formerly Funding Choices[https://support.google.com/fundingchoices/answer/9010669?hl=en]), app developers can manage users' consent choices[https://developers.google.com/funding-choices] and show consent forms[https://developers.google.com/admob/android/privacy#load-and-show-form]. It can also be used to detect ad blockers and display messages to “recover lost revenue from ad blocking users”.[https://support.google.com/admob/answer/10107561]\n\nThe Privacy & Messaging API is available through Google's AdMob, Ad Manager, and AdSense SDKs on the web, Android, and iOS.[https://support.google.com/fundingchoices/answer/9010669?hl=en]"; `googledatatransport-batchlog`: `string` = "The GoogleDataTransport SDK is a transport layer used internally by many other Firebase (e.g. Crashlytics, Performance, Core) Google (e.g. ML Kit) SDKs and services.[https://github.com/firebase/firebase-ios-sdk/issues/8220#issuecomment-858040701] It batches application-specific data from within an app to Google, using a common endpoint regardless of the actual SDK that was integrated by the app developer.[https://stackoverflow.com/a/76334853]"; `infonline`: `string` = "INFOnline provides digital audience measurement for websites and apps.[https://www.infonline.de/en/]\n\nThey offer two separate measurement systems: Census Measurement (IOMb[https://www.infonline.de/download/?wpdmdl=7135]) and INFOnline Measurement pseudonymous (IOMp[https://www.infonline.de/download/?wpdmdl=7135], formerly SZMnG[https://www.infonline.de/faqs/]). Census Measurement can be recognized by the URL path fragment “base.io”, whereas INFOnline Measurement pseudonymous uses “tx.io”.[https://docs.infonline.de/infonline-measurement/en/integration/web/checkliste\_web\_allgemein/]\n\nINFOnline boasts with constantly adapting their technology in order to circumvent browser restrictions, ad and tracking blockers, and privacy-preserving changes by operating systems.[https://www.infonline.de/measurement/]"; `infonline-pseudonymous`: `string` = "Unlike Census Measurement, which works anonymously without identifiers, INFOnline Measurement pseudonymous “is designed as a pseudonymous system (with client identifiers)”.[https://docs.infonline.de/infonline-measurement/en/getting-started/verfahrensbeschreibung/]\n\nAccording INFOnline’s own documentation, “[…] the pseudonymous INFOnline Measurement may only be loaded and executed if there is active consent from the user of [the] web page. […] The following also applies to apps: Only start the session of pseudonymous measurement if you have the user's consent.”[https://docs.infonline.de/infonline-measurement/en/getting-started/rechtliche-auswirkungen/]"; `ironsource`: `string` = "ironSource offers the following services:\n\n- Analytics.[https://www.is.com/analytics/]\n- App monetization for publishers[https://www.is.com/monetization/], including ad mediation[https://www.is.com/mediation/], real-time bidding[https://www.is.com/in-app-bidding/], and A/B testing[https://www.is.com/monetization-ab-testing/].\n- Advertising for user acquisition, to “[k]eep your best users in your portfolio with cross promotion campaigns”.[https://www.is.com/user-growth/] Advertisers can “[a]ccurately measure the ad revenue generated for each device and impression – from any ad unit, across every ad network.”[https://www.is.com/impression-level-revenue/]\n- Audience segmentation, to “[p]ersonalize the ad experience for different audiences to keep users coming back and encourage them to progress in your game”.[https://www.is.com/segments/]"; `microsoft-appcenter`: `string` = "Visual Studio App Center is a collection of services by Microsoft to help developers “continuously build, test, release,\nand monitor apps for every platform.”[https://learn.microsoft.com/en-us/appcenter/]\n\nAmong those services are:\n\n- App Center Diagnostics, to “[collect] information about crashes and errors” in apps.[https://learn.microsoft.com/en-us/appcenter/diagnostics/]\n- App Center Analytics, which “helps [developers] understand user behavior and customer engagement […]. The SDK automatically captures session count and device properties like model, OS version, etc. [Developers] can define [their] own custom events […].”[https://learn.microsoft.com/en-us/appcenter/sdk/analytics/android] By tracking events, developers can “learn more about […] users' behavior and understand the interaction between […] users and […] apps.”[https://learn.microsoft.com/en-us/appcenter/analytics/event-metrics]\n\nRegardless of the particular SDK or service, all data sent to App Center goes to a single endpoint.[https://learn.microsoft.com/en-us/appcenter/sdk/data-collected]"; `mopub`: `string` = "MoPub was a mobile app monetization service.[https://web.archive.org/web/20210126085400/https://www.mopub.com/en]\n\nMoPub has since been acquired by AppLovin and integrated into AppLovin MAX.[https://www.applovin.com/blog/applovins-acquisition-of-mopub-has-officially-closed/]"; `onesignal`: `string` = "OneSignal provides SDKs and APIs to help developers “send push notifications, in-app messages, SMS, and emails.”[https://documentation.onesignal.com/docs/onesignal-platform]\n\nFor that, it also offers personalization[https://onesignal.com/personalization], user segmentation[https://onesignal.com/targeting-segmentation], and A/B testing[https://documentation.onesignal.com/docs/ab-testing] features. Developers can “send personalized messages based on real-time user behavior, […] user attributes, events, location, language, and more”.[https://onesignal.com/personalization] Audience cohorts can be synced from various analytics providers.[https://onesignal.com/targeting-segmentation]\n\nAdditionally, OneSignal offers analytics features. Developers can “[c]reate an understanding as to how [their] messaging drives direct, indirect, and unattributed user actions” and “[e]asily quantify which messages are driving sales, engagement, and more”.[https://onesignal.com/analytics] OneSignal advertises with helping developers “know precisely when a device receives a notification”, even if “[u]sers uninstall apps, swap phones, turn off their phones, or are unreachable”.[https://onesignal.com/analytics] Analytics data can be shared with various third-party tracking companies using integrations.[https://onesignal.com/integrations/category/analytics]"; `onesignal-add-a-device`: `string` = "The “Add a device” endpoint is used ”to register a new device with OneSignal.“[https://documentation.onesignal.com/v9.0/reference/add-a-device]"; `singular-net`: `string` = "Singular offers the following services:\n\n- Analytics on a company's marketing spending and efficacy[https://www.singular.net/marketing-analytics/], with the goal of “[acquiring] the highest value users”[https://www.singular.net/ad-monetization/].\n- Tracking and attribution of users, “connecting the install of a mobile app and the user’s activities inside the app to the marketing campaign that led to the installation”.[https://www.singular.net/mobile-attribution/] “For every install, Singular scans its database for relevant ad interactions (ad clicks and ad views) that originated from the same device […]. […] The goal is to reconstruct the user journey as the first step toward finding the touchpoint that most likely led the user to install the app.”[https://support.singular.net/hc/en-us/articles/115000526963-Understanding-Singular-Mobile-App-Attribution] Additionally, Singular attributes the following events to the user: ”User sessions (i.e., every time the user opens the app), Revenue events (purchases made through the app), Any other events that are relevant to [the] app, such as sign-ups, tutorial completions, or level-ups.“, as well as app uninstalls[https://support.singular.net/hc/en-us/articles/115000526963-Understanding-Singular-Mobile-App-Attribution]\n- Mobile ad fraud prevention.[https://www.singular.net/fraud-prevention/]\n\nSingular boasts with being able to track users across devices, using “advertiser-reported IDs to tie different devices to the same user”.[https://www.singular.net/cross-device-attribution/] They claim: “By implementing an API call to the Singular SDK or server with a user ID, Singular helps you sync up users and devices in such a way that you can recognize customers or users and properly attribute conversions to ad spend and marketing activity, plus assign customers or users to cohorts, regardless of which device or platform they’re using at any given moment.”[https://www.singular.net/glossary/cross-device-attribution/]\n\nAdditionally, they pull in, aggregate, standardize, and match tracking data from thousands of partner companies in the fields of analytics, attribution, audience measurement, and ad monetization.[https://www.singular.net/partner-integrations/]"; `smartbear-bugsnag`: `string` = "BugSnag offers the following services:\n\n- Error monitoring, collecting and visualizing crash data.[https://www.bugsnag.com/error-monitoring/]\n- Real user monitoring, to “[o]ptimize your application based on real-time user actions with your application” and give “visibility into critical performance metrics like hot and cold app starts, network requests, screen-load time and more.”[https://www.bugsnag.com/real-user-monitoring/]"; `smartbear-bugsnag-notify`: `string` = "The Error Reporting API is used to send error reports and crashes to BugSnag.[https://bugsnagerrorreportingapi.docs.apiary.io/#reference/0/minidump/send-error-reports]"; `smartbear-bugsnag-session`: `string` = "The Session Tracking API is used to “notify Bugsnag of sessions starting in web, mobile or desktop applications.”[https://bugsnagsessiontrackingapi.docs.apiary.io/#reference/0/session/report-a-session-starting]" } |
| `en.tracker-descriptions.adjust` | `string` |
| `en.tracker-descriptions.branch-io` | `string` |
| `en.tracker-descriptions.branch-io-attribution-api` | `string` |
| `en.tracker-descriptions.chartboost` | `string` |
| `en.tracker-descriptions.facebook-audience-network` | `string` |
| `en.tracker-descriptions.facebook-graph-app-events` | `string` |
| `en.tracker-descriptions.firebaseinstallations` | `string` |
| `en.tracker-descriptions.google-fundingchoices` | `string` |
| `en.tracker-descriptions.googledatatransport-batchlog` | `string` |
| `en.tracker-descriptions.infonline` | `string` |
| `en.tracker-descriptions.infonline-pseudonymous` | `string` |
| `en.tracker-descriptions.ironsource` | `string` |
| `en.tracker-descriptions.microsoft-appcenter` | `string` |
| `en.tracker-descriptions.mopub` | `string` |
| `en.tracker-descriptions.onesignal` | `string` |
| `en.tracker-descriptions.onesignal-add-a-device` | `string` |
| `en.tracker-descriptions.singular-net` | `string` |
| `en.tracker-descriptions.smartbear-bugsnag` | `string` |
| `en.tracker-descriptions.smartbear-bugsnag-notify` | `string` |
| `en.tracker-descriptions.smartbear-bugsnag-session` | `string` |
#### Defined in
[src/lib/translations.ts:5](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/translations.ts#L5)
## Functions
### generate
▸ **generate**(`options`): `Promise`<`Uint8Array`\>
Generate a technical report, controller notice or DPA complaint based on a network traffic analysis performed using
tweasel tools.
**`Remarks`**
This is a high-level function that takes a tweasel HAR and relies on the additionaly metadata therein. If you have a
HAR from another source, use [generateAdvanced](README.md#generateadvanced) instead and manually provide the required metadata.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `options` | [`GenerateOptions`](README.md#generateoptions) | The options specifying what to generate. |
#### Returns
`Promise`<`Uint8Array`\>
The generated document as a PDF file.
#### Defined in
[src/index.ts:144](https://github.com/tweaselORG/ReportHAR/blob/main/src/index.ts#L144)
___
### generateAdvanced
▸ **generateAdvanced**(`options`): `Promise`<`Uint8Array`\>
Generate a technical report, controller notice or DPA complaint based on a network traffic analysis, manually
specifying all metadata.
**`Remarks`**
If the analysis was performed using tweasel tools, you can instead use [generate](README.md#generate) to have the metadata
automatically extracted from the tweasel HAR file.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `options` | [`GenerateAdvancedOptions`](README.md#generateadvancedoptions) | The options specifying what to generate. |
#### Returns
`Promise`<`Uint8Array`\>
The generated document as a PDF file.
#### Defined in
[src/lib/generate.ts:195](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/generate.ts#L195)
___
### parseNetworkActivityReport
▸ **parseNetworkActivityReport**(`type`, `report`): [`NetworkActivityReport`](README.md#networkactivityreport)
Parse a network activity report from the iOS App Privacy Report or Tracker Control on Android into a standardized
[NetworkActivityReport](README.md#networkactivityreport) format.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `type` | ``"ios-app-privacy-report-ndjson"`` \| ``"tracker-control-csv"`` | The type/format of the input report, with the following possible values: - `ios-app-privacy-report-ndjson`: A report exported from the iOS App Privacy Report feature, in NDJSON format. - `tracker-control-csv`: A CSV export of the network traffic log from the Tracker Control Android app. This supports both the full export of all apps and the individual app export. In the latter case, the `appId` in the result will always be `undefined`. |
| `report` | `string` | The report to parse. |
#### Returns
[`NetworkActivityReport`](README.md#networkactivityreport)
The parsed report as a [NetworkActivityReport](README.md#networkactivityreport).
#### Defined in
[src/lib/user-network-activity.ts:94](https://github.com/tweaselORG/ReportHAR/blob/main/src/lib/user-network-activity.ts#L94)
|
https://github.com/FrightenedFoxCN/cetz-cd | https://raw.githubusercontent.com/FrightenedFoxCN/cetz-cd/main/tests/parser.typ | typst | #import "../src/parser.typ": *
#parse-item(`$S$ ar[rd, swapped]`.text)
// multiple arrows
#parse-item(`$T$ ar[r, swapped, $g$] ar[d, bent: 45, offset: 2]`.text)
#parser(```
$A$ ar[r] ar[rd, $f$, swapped] & $B$ ar[d] \
& $C$
```.text) |
|
https://github.com/lsacienne/UTBM-Internship-Report-Typst | https://raw.githubusercontent.com/lsacienne/UTBM-Internship-Report-Typst/main/utbm.typ | typst | MIT License | #let cover(
title: "Analyse de durabilité des systèmes de propulsion par microcontrôleurs externe",
report-type: "STXX",
report-year: "P20XX",
picture: "assets/images/background.jpg",
student: (
first-name: "Prénom",
last-name: "NOM",
specialty: "Nom de la spécialité d'ingénieur",
sector: "Nom de la filière",
),
company: (
name: "Entreprise DEMO-Contrôleurs",
address: "8 rue de la Fierté",
postal-code: "75013",
city: "Paris",
website: "www.democontroleurs.com",
),
tutor: (
first-name: "Prénom",
last-name: "NOM",
),
supervisor: (
first-name: "Prénom",
last-name: "NOM",
),
) = {
set page(paper: "a4", margin: (top: .5cm, left: 1cm, right: 0cm, bottom: 0cm))
set text(font: "Arial")
grid(
columns: (auto, auto),
rows: (auto),
gutter: 1fr,
inset: (right:1cm),
align: horizon,
image(
"assets/images/french_republic.png",
width: 1.94cm
),
image(
"assets/images/utbm_logo.png",
width: 2.51cm
)
)
show image: set block(above: 6pt)
image(
picture,
width: 20.04cm,
height: 11.14cm,
fit: "cover"
)
show rect: set block(above: 0pt)
rect(
width: 100%,
height: 0.92cm,
fill: black,
inset: (left: 0.8cm)
)[
#align(horizon)[
#text(white, size: 14pt, weight: 900)[UNIVERISTÉ DE TECHNOLOGIE]
#text(white, size: 14pt, weight: 400)[ DE BELFORT-MONTBÉLIARD]
]
]
rect(
width: 100%,
height: 3.31cm,
fill: rgb(27,94,135),
inset: (left: 0.8cm)
)[
#align(horizon + left)[
#text(
white,
size: 24pt,
weight: "bold"
)[#title]
]
]
rect(
width: 100%,
height: 0.92cm,
fill: rgb(79,78,85),
inset: (left: 0.8cm)
)[
#align(horizon)[
#text(white, size: 12pt, weight: "bold")[Rapport de stage #report-type - #report-year]
]
]
show par: set block(above: 6pt)
set text(white)
rect(
width: 100%,
height: 10.945cm,
fill: rgb(98,184,143),
inset: (left: 0.8cm)
)[
#grid(
columns: (auto, auto),
rows: (auto, auto, auto),
gutter: 1fr,
row-gutter: 1fr,
inset: (
top: 0.8cm,
bottom: 2cm,
right: 1.2cm
),
align: horizon,
grid.cell(x:0, y:0)[
#text(size: 18pt, weight: "bold")[#student.first-name #student.last-name]
#text(size: 10pt, weight: "bold")[#student.specialty]
#text(size: 10pt, weight: "bold")[#student.sector]
],
grid.cell(x:0, y:1)[
#text(size: 18pt, weight: "bold")[#company.name]
#text(size: 12pt, weight: "bold")[#company.address]
#text(size: 12pt, weight: "bold")[#company.postal-code #company.city]
#text(size: 12pt, weight: "bold")[
#link(company.website)
]
],
grid.cell(x:0, y:2)[
#text(size: 12pt)[Tuteur en entreprise]
#text(size: 14pt, weight: "bold")[#tutor.last-name #tutor.first-name]
],
grid.cell(x:1, y:2, align: end)[
#text(size: 12pt)[Suiveur UTBM]
#text(size: 14pt, weight: "bold")[#supervisor.last-name #supervisor.first-name]
],
)
]
}
#let fourth-cover(
abstract,
subject: "Sujet de stage et description du travail réalisé",
report-type: "STXX",
report-year: "P20XX",
student: (
first-name: "Prénom",
last-name: "NOM"
),
company: (
name: "Entreprise DEMO-Contrôleurs",
address: "8 rue de la Fierté",
postal-code: "75013",
city: "Paris",
website: "www.democontroleurs.com",
),
) = {
set text(font: "Arial")
set page(
paper: "a4",
margin: (top: 0cm, left: 1cm, right: 0cm, bottom: 3cm),
footer: [
#grid(
columns: 2,
column-gutter: 1fr,
align: top,
inset: (right:1.5cm),
image(
"assets/images/utbm_logo.png",
width: 2.95cm
),
grid.cell()[
#grid(
columns: 2,
gutter: 1mm,
image(
"assets/images/ut_group.png",
width: 1.87cm
),
image(
"assets/images/ubfc.png",
width: 1.81cm
)
)
]
)
]
)
rect(
fill: rgb(98,184,143),
width: 100%,
height: 4.43cm,
inset: (left: 0.8cm, bottom: 1.2cm)
)[
#align(bottom + left)[
#show par: set block(spacing: 10pt)
#set text(white)
#text(size: 18pt, weight: "bold")[#student.last-name #student.first-name]
#text(size: 14pt, weight: "bold")[Rapport de Stage #report-type - #report-year]
]
]
block(
inset: (left: 0.8cm, right: 2.4cm, top: 0.5cm)
)[
#show par: set block(spacing: 20pt)
#align(left)[
#text(size: 12pt, weight: "bold")[
#subject
]
]
#par(justify: true)[
#show par: set block(spacing: 0.65em)
#abstract
]
]
block(
height: auto,
spacing: 1fr,
inset: (left: 0.8cm),
par[
#show text: set block(spacing: 4pt)
#show par: set block(spacing: 4pt)
#text(
size: 18pt,
weight: "bold"
)[#company.name]
#text(rgb(128,128,128), size: 12pt, weight: "bold")[#company.address]
#text(rgb(128,128,128), size: 12pt, weight: "bold")[#company.postal-code #company.city]
#text(rgb(128,128,128), size: 12pt, weight: "bold")[
#link(company.website)
]
]
)
}
|
https://github.com/so298/cv-theme.typ | https://raw.githubusercontent.com/so298/cv-theme.typ/main/theme.typ | typst | #let mygray = rgb("#6A6A6A")
#let mydarkgray = rgb("#4A4A4A")
#let ja_sans = "<NAME>"
#let en_sans = "Open Sans"
#let cv(body) = {
// styling
show heading: set text(fill: navy)
show heading.where(level: 1): it => block(below: 0.8em, {
set text(size: 18pt)
it.body
})
show heading.where(level: 2): it => block(below: 0.8em, {
set text(size: 14pt)
it.body
})
// main body
body
}
#let title(name, page_title: "Curriculum Vitae") = {
block(text(size: 15pt, page_title))
v(5pt)
block(text(size: 35pt, fill: navy, [#name]))
v(10pt)
}
#let info(attr, value) = block(width: 100%, height: 0pt, {
set text(size: 9pt)
box(width: 45pt, text(fill: mygray, [#attr]))
box(text(weight: "medium", [#value]))
})
#let cventry(year, org, position, detail) = {
grid(columns: (90pt, 1fr),
box(text(font: (en_sans, ja_sans), size: 10pt, fill: mydarkgray, [#year])),
{
block(width: 100%, below: 0.8em, {
box(text(size: 11pt, weight: "medium", [#org]))
h(5pt)
box(baseline: 1pt, [#position])
})
block(text([#detail]))
}
)
v(4pt)
}
|
|
https://github.com/mariuslb/thesis | https://raw.githubusercontent.com/mariuslb/thesis/main/content/06-diskussion.typ | typst | = Diskussion
== Interpretation der Ergebnisse
Die Ergebnisse der Untersuchung zeigen, dass Elektrofahrzeuge im Vergleich zu Fahrzeugen mit Verbrennungsmotoren eine höhere Energieeffizienz aufweisen. Die durchschnittlichen Energieverbräuche der Elektrofahrzeuge lagen deutlich unter den Werten der Verbrennungsmotoren. Dies wird bestätigt durch die Analyse der Key Performance Indicators (KPIs) wie dem Energy Performance Index (EPI) und dem Acceleration Performance Index (API), die die Effizienz und Leistung der Fahrzeuge vergleichbar machen. Die statistische Modellierung der Fahrdaten mit Methoden wie der Regressionsanalyse und Gradient Boosting Machines (GBM), XGBoost, Random Forests und ANOVA bestätigt diese Ergebnisse und zeigt signifikante Unterschiede zwischen Elektro- und Verbrennungsfahrzeugen.
Außerdem wurden signifikante Diskrepanzen zwischen den realen Fahrbedingungen und den WLTP-Normwerten festgestellt. Die realen Energieverbräuche der Fahrzeuge lagen in den meisten Fällen deutlich über den Normwerten, was auf die Unterschiede zwischen den Testbedingungen und den realen Fahrverhältnissen hinweist. Dies verdeutlicht die Notwendigkeit, Teststandards wie den WLTP weiter zu verbessern, um realistischere Verbrauchswerte zu erzielen.
== Limitation und Selbstkritik
Die Untersuchung ist durch bestimmte Limitationen gekennzeichnet:
- Stichprobengröße: Die Stichprobe von Fahrzeugen und Fahrbedingungen war begrenzt, was die Generalisierbarkeit der Ergebnisse einschränken könnte.
- Datenqualität: Trotz sorgfältiger Datenbereinigung könnten Messfehler und Datenverluste die Ergebnisse beeinflusst haben.
- Repräsentativität: Die ausgewählten Fahrzeuge und Fahrbedingungen repräsentieren möglicherweise nicht alle Fahrzeugtypen und Nutzungsszenarien.
- Externe Einflüsse: Externe Faktoren wie Wetterbedingungen und Verkehrssituationen könnten den Energieverbrauch der Fahrzeuge beeinflusst haben.
- Testverfahren: Die Untersuchung basierte auf realen Fahrdaten und nicht auf standardisierten Testverfahren, was die Vergleichbarkeit mit anderen Studien einschränken könnte.
== Einordung in bestehende Forschung
Die Ergebnisse dieser Untersuchung sind konsistent mit früheren Studien, die gezeigt haben, dass Elektrofahrzeuge im Vergleich zu Fahrzeugen mit Verbrennungsmotoren eine höhere Energieeffizienz aufweisen. Die Diskrepanzen zwischen den realen Fahrbedingungen und den WLTP-Normwerten sind ebenfalls ein bekanntes Problem, das die Genauigkeit der Verbrauchswerte beeinträchtigen kann.
Diese Erkenntnisse tragen dazu bei, das Verständnis der Vorteile von Elektrofahrzeugen zu vertiefen und die Notwendigkeit von realistischeren Teststandards zu unterstreichen.
== Implikation für den Praxisfall
Für das LCMM-Projekt (Low Carbon Mobility Management) und die TSI (T-Systems International GmbH) ergeben sich aus den Ergebnissen wichtige Implikationen:
- Die Ergebnisse können dazu beitragen, die Entwicklung und Implementierung von nachhaltigen Mobilitätslösungen zu unterstützen.
- Die Erkenntnisse können dazu beitragen, die Effizienz und Umweltfreundlichkeit von Fahrzeugflotten zu verbessern.
- Die Diskrepanzen zwischen realen Fahrbedingungen und Teststandards könnten dazu führen, dass die TSI ihre Testverfahren überdenkt und anpasst, um realistischere Verbrauchswerte zu erzielen.
- Die Ergebnisse könnten dazu beitragen, die Akzeptanz von Elektrofahrzeugen zu erhöhen und die Umstellung auf nachhaltige Mobilität zu beschleunigen.
- Die Erkenntnisse könnten dazu beitragen, die Forschung und Entwicklung von Elektrofahrzeugen und Ladeinfrastruktur voranzutreiben.
- Die Ergebnisse könnten dazu beitragen, die Politik und Regulierung im Bereich der Elektromobilität zu beeinflussen und die Einführung von Anreizen und Maßnahmen zur Förderung von Elektrofahrzeugen zu unterstützen.
== Selbstkritik und Limitationen der Arbeit
Obwohl die Untersuchung wichtige Erkenntnisse liefert, gibt es auch einige Limitationen, die beachtet werden sollten:
- Datenqualität: Trotz sorgfältiger Datenbereinigung könnten Messfehler und Datenverluste die Ergebnisse beeinflusst haben.
- Repräsentativität: Die ausgewählten Fahrzeuge und Fahrbedingungen repräsentieren möglicherweise nicht alle Fahrzeugtypen und Nutzungsszenarien .
= Fazit und Ausblick
== Zusammenfassung der zentralen Erkenntnisse
Die Untersuchung bestätigt, dass Elektrofahrzeuge effizienter und umweltfreundlicher sind als Fahrzeuge mit Verbrennungsmotoren. Die signifikanten Diskrepanzen zwischen den realen Fahrbedingungen und den WLTP-Normwerten verdeutlichen die Notwendigkeit, Teststandards weiter zu verbessern .
== Praktische Implikationen für Stakeholder
== Vorschläge für zukünftige Forschungen
Zukünftige Untersuchungen sollten eine größere Stichprobe von Fahrzeugen und Fahrbedingungen umfassen, um die Generalisierbarkeit der Ergebnisse zu erhöhen. Darüber hinaus könnten weitere Faktoren wie CO2-Emissionen und Betriebskosten in die Analyse einbezogen werden, um ein umfassenderes Bild der Vorteile von Elektrofahrzeugen zu erhalten . |
|
https://github.com/iMilesHo/resume-template-typst | https://raw.githubusercontent.com/iMilesHo/resume-template-typst/main/Resume_YourName.typ | typst | Apache License 2.0 | #import "template.typ": *
#show: resumeContent.with(
author: (
firstname: lorem(1),
lastname: lorem(1),
email: "<EMAIL>",
phone: "+1 9876543210",
github: "github.com/username",
linkedin: "linkedin.com/in/username",
)
)
== TECHNICAL SKILLS
- *Programming Languages*: Java, Python, C, C++, JavaScript, TypeScript
- *Tools&Platforms*: Git, Linux, Docker, Kubernetes, AWS, Azure, GCP
== Education
#experienceBlock(
title: "M.Eng. xxxxxxxx, GPA 4.0/4.0",
subtitle: "Xxxxxx University",
startDate: "Sep 2077",
endDate: "May 2028 (Expected)",
address: "Xxxxx, Xxxxx"
)[]
#experienceBlock(
title: "B.Eng. in Xxxxx, GPA 4.0/4.0",
subtitle: "Xxxxxxxxx University",
startDate: "Sep 2017",
endDate: "Jun 2021",
address: "Xxxxxxx, Xxxxx",
)[]
== Work Experience
#experienceBlock(
title: lorem(2),
titleLink: "https://www.google.com",
subtitle: "Software Engineer Intern; Java, Spring, MySQL, Git, Linux",
startDate: "Jan 2077",
endDate: "Apr 2077",
address: "Xxxxx, Xxxxx",
)[
- #lorem(30)
- #lorem(30)
- #lorem(30)
]
#experienceBlock(
title: lorem(2),
titleLink: "",
subtitle: "Software Engineer Intern; Java, Spring, MySQL, Git, Linux",
startDate: "Jan 2077",
endDate: "Apr 2077",
address: "Xxxxx, Xxxxx",
)[
- #lorem(30)
- #lorem(30)
- #lorem(30)
]
== Projects
#experienceBlock(
title: lorem(2),
titleLink: "",
subtitle: "Java, Spring, MySQL, Git, Linux",
startDate: "Jan 2077",
endDate: "Apr 2077",
address: "Xxxxx, Xxxxx",
)[
- #lorem(30)
- #lorem(30)
]
#experienceBlock(
title: lorem(2),
titleLink: "https://www.google.com",
subtitle: "Java, Spring, MySQL, Git, Linux",
startDate: "Jan 2077",
endDate: "Apr 2077",
address: "Xxxxx, Xxxxx",
)[
- #lorem(30)
- #lorem(30)
]
#experienceBlock(
title: lorem(2),
titleLink: "",
subtitle: "Java, Spring, MySQL, Git, Linux",
startDate: "Jan 2077",
endDate: "Apr 2077",
address: "Xxxxx, Xxxxx",
)[
- #lorem(30)
- #lorem(30)
]
#align(right, text(fill: gray)[Last Updated on #today()]) |
https://github.com/nikhilweee/nikipedia-typst | https://raw.githubusercontent.com/nikhilweee/nikipedia-typst/main/concepts/concepts.typ | typst | #import "../template/shorthands.typ": *
== Machine Learning
=== Parameterization
When someone says that a model is parameterized by parameters $theta$, they are
referring to the intrinsic parameters of the model. As an example, consider a
very simple linear model.
$ y = m x + c $
Here, the output of the model $y$ depends on not only the input $x$ but also on
the parameters $m$ and $c$ and therefore in this case, $theta = {m, c}$. Though
we discuss a very simple case here, the notion of parameterization equally
applies to larger models with billions of parameters.
=== Regularization
Regularization is the practise of adding additional error terms in the loss.
Popular choices are L1 regularization, which adds an additional penalty $|bw|$
to the loss term. Another choice is the L2 regularization, which adds a square
term $|bw|^2$ to the loss. Here $bw$ represents the weights of the network.
Essentially we are trying to prevent any one of these weights from blowing up.
Often times, fitting a model to a dataset is an ill posed problem. This means
that there may be more than one solutions to the problem, perhaps due to the
number of parameters of the model being more than the number of data points
available. In these cases, regularization can be seen as a way to introduce
additional constraints in order to get the desired solution.
=== Likelihood
The likelihood is the probability of the observed data as a function of the
model parameters.
$ cL(theta) = p(x; theta) $
The difference between likelihood and probability is subtle. When the model
parameters $theta$ are fixed, this notation represents the density function
whereas when the data $x$ is fixed, this represents the likelihood. In other
words, given a known model $theta$, the probability of observing some unknown
data $x$ is the density whereas the probability of observing known data $x$ when
we are still searching for the model parameters $theta$ is the likelihood.
=== Maximum Likelihood Estination
=== Bayes' Rule
Bayes' rule allows us to update our belief about a hypothesis in light of new
evidence.
$ P("Hypothesis"|"Evidence") = P("Hypothesis") times
P("Evidence"|"Hypothesis") / P("Evidence") $
Here, $P("Hypothesis")$ is also called the _prior probability_ and it represents
our initial estimate of the hypothesis. Similarly, $P("Hypothesis"|"Evidence")$ is
the updated belief, and is therefore called the _posterior probability_.
$P("Evidence"|"Hypothesis")$ the likelihood of the evidence given that the
hypothesis is true, and the last term $P("Evidence")$ is the probability of the
evidence regardless of the hypothesis. Taking this new terminology into account,
here is a more succint form of the Bayes' rule. As a shorthand, just remember
_"posterior is prior times likelihood"_.
$ "Posterior" = "Prior" times "Likelihood" / "Evidence" $
@bishop2006pattern is a good reference for Bayesian Methods and machine learning
in general.
== Large Language Models
=== Alignment
LLMs are trained on vast amounts of unsupervised data. Alignment is when we want
to steer the outputs of the LLM towards specific kinds of responses that we
prefer. Typically, this is done through a supervised fine tuning step followed
by RLHF (@concept-rhf) .
=== RLHF <concept-rhf>
Reinforcement Learning from Human Feedback is a technique used for aligning
LLMs. A reward model is trained using supervised fine tuning, which is used in
the next step to score responses from an LLM. |
|
https://github.com/Myriad-Dreamin/tinymist | https://raw.githubusercontent.com/Myriad-Dreamin/tinymist/main/crates/tinymist-query/src/fixtures/goto_definition/paren_lhs.typ | typst | Apache License 2.0 | #(let (x) = 2);
#(/* position after */ x);
|
https://github.com/xrarch/books | https://raw.githubusercontent.com/xrarch/books/main/xrcomputerbook/chapcitron.typ | typst | #import "@preview/tablex:0.0.6": tablex, cellx, colspanx, rowspanx
= Citron Interface
== Introduction
The Citron interface is a small memory-mapped region of 32-bit ports.#footnote([Historically, this was the port I/O space of a previous CISC processor architecture.]) Many of the integral devices of the XR/computer platform are exposed through this interface. It begins at the physical address 0xF8000000. For example, Citron Port 0x20 would be found at the offset 0x20 \* 4 = 0x80 within this space, or 0xF8000080.
=== Ports
Device ports have some standard behavior in order to simplify drivers somewhat. "Command ports" read zero if the device is completely idle and ready to accept any new command, and a non-zero value with device-specific meaning otherwise. When written, command ports cause the device to perform some action.
"Data ports" may have any device-specific action on reads and writes.
=== RTC
There is a simple Real Time Clock (RTC) that is responsible for tracking time and for asserting the interval timer interrupt. The time is tracked as a 32-bit Unix epoch timestamp, along with a millisecond part. The current time is stored persistently in a small battery-backed memory. The interval timer can be programmed to periodically interrupt at any 32-bit count of milliseconds.
The IRQ number for the interval timer is 0x02.
The RTC uses two Citron ports, a single command port (0x20) and a single data port (0x21). The data port is readable and writable as a 32-bit datum. The accepted commands are as follows:
#box([
#tablex(
columns: (1fr, 14fr),
cellx([
#set text(fill: white)
#set align(center)
*\#*
], fill: rgb(0,0,0,255)),
cellx([
#set text(fill: white)
#set align(center)
*Function*
], fill: rgb(0,0,0,255)),
[0x1], [Set the timer interval to the number of milliseconds specified in the data port. If zero, the timer interrupt is disabled.],
[0x2], [Reads the current epoch time seconds part into the data port.],
[0x3], [Reads the current epoch time milliseconds part into the data port.],
[0x4], [Sets the current epoch time seconds part from the contents of the data port.],
[0x5], [Sets the current epoch time milliseconds part from the contents of the data port.],
)
])
=== Serial Ports
The XR/computer platform supports two serial ports. They are conventionally labeled Serial Port A and Serial Port B.
Each serial port uses two Citron ports, one command port and one data port. The two serial ports are sequential in the Citron port space, beginning at 0x10. For Serial Port A, the command and data ports are 0x10 and 0x11 respectively. For Serial Port B, they are 0x12 and 0x13.
The serial controller collects incoming bytes in a 32-byte receive buffer, and accumulates outgoing characters in a 16-byte transmit buffer. The bytes in the transmit buffer are asynchronously transmitted at 9600 baud.
Reading from the data port will dequeue the next character from the receive buffer. If the receive buffer is empty, 0xFFFF is returned. There is an optional interrupt that is asserted by the serial controller when a character is received.
Writing to the data port will enqueue a character into the transmit buffer. If the transmit buffer is full, reading from the command port will yield a non-zero value. This should be done before attempting to push a character. There is an optional interrupt that is asserted by the serial controller when the transmit buffer has some space available.
The IRQ numbers for serial ports A and B are 0x04 and 0x05 respectively.
The accepted commands are as follows:
#box([
#tablex(
columns: (1fr, 14fr),
cellx([
#set text(fill: white)
#set align(center)
*\#*
], fill: rgb(0,0,0,255)),
cellx([
#set text(fill: white)
#set align(center)
*Function*
], fill: rgb(0,0,0,255)),
[0x3], [Enable the interrupt for this serial port.],
[0x4], [Disable the interrupt for this serial port.],
)
])
=== Disk Controller
The XR/computer platform supports up to 8 block addressable devices (such as hard disks) via a simple disk controller. The disk controller has one Citron command port (0x19), and two data ports, data port *A* (0x1A) and data port *B* (0x1B).
The controller performs transfers in units of sectors, which are 512 bytes. One transfer can be in progress to each attached disk simultaneously, and can be up to 8 sectors (4KB) in length. The transfers perform DMA to and from arbitrary sector-aligned physical addresses (i.e. the low 9 bits of the physical address are ignored).
Reading the command port yields a bit set of status bits. The Nth bit where N is a disk number of the range [0, 7] indicates whether that disk is busy or not. This can be used for polled operation of the disk controller. An interrupt can also be made to trigger when transfers complete.
The IRQ number for the disk controller is 0x03.
#box([
The accepted commands are as follows:
#tablex(
columns: (1fr, 14fr),
cellx([
#set text(fill: white)
#set align(center)
*\#*
], fill: rgb(0,0,0,255)),
cellx([
#set text(fill: white)
#set align(center)
*Function*
], fill: rgb(0,0,0,255)),
[0x1], [Select the disk number specified in data port *A*.],
[0x2], [Start a READ transfer from the selected disk beginning at the sector number specified in data port *A*.],
[0x3], [Start a WRITE transfer to the selected disk beginning at the sector number specified in data port *A*.],
[0x4], [Set data port *B* to a bit set of disks whose transfer has completed since the last time this port was read. Atomically clears the bit set.],
[0x5], [Read information about the disk whose number is in data port *A*. Data port *A* is set to 1 if the disk is present, 0 otherwise. Data port *B* is set to a 32 bit count of sectors in the disk.],
[0x6], [Enable the transfer completion interrupt.],
[0x7], [Disable the transfer completion interrupt.],
[0x8], [Set the sector length for the next transfer from the contents of data port *A*.],
[0x9], [Set the sector-aligned physical address for the next transfer from the contents of data port *A*.],
)
]) |
|
https://github.com/ClassicConor/UoKCSYear1ExamNotes2024 | https://raw.githubusercontent.com/ClassicConor/UoKCSYear1ExamNotes2024/master/Databases%20(With%20Exam%20Answers)/Databases%202021%20Paper/Databases%202021%20Answers.typ | typst | = 2023 Databases and the Web Exam
<databases-and-the-web-exam>
== Question 1
<question-1>
#block[
#set enum(numbering: "(1)", start: 1)
+ Inspect the following HTML code
]
```html
<html>
<head>
<title>Good Writing Style</title>
</head>
<body>
<div style="background:yellow; width:20% height:100px;">
<p style="color:green">CO323 Main Exam
<span style="color:black">Question 1</span>
</p>
</div>
<br><br/>
<div style="background:yellow; width:20%; height:300;">
<p style="color:green">CO323 Resit Exam
<ul>
<li><span style="color:blue">Question 1<li></span>
</li><span style="color:blue">Question 2</span></li>
</ul>
</p>
</div>
</body>
</html>
```
#quote(block: true)[
#block[
#set enum(numbering: "(a)", start: 1)
+ What are the problems with the above code? Consider the syntax,
structure, and writing style.
]
]
Code correctly formatted:
```html
<html>
<head>
<title>Good Writing Style</title>
</head>
<body>
<div style="background:yellow; width:20% height:100px;">
<p style="color:green">CO323 Main Exam
<span style="color:black">Question 1</span>
</p>
</div>
<br><br />
<div style="background:yellow; width:20%; height:300;">
<p style="color:green">CO323 Resit Exam
<ul>
<li><span style="color:blue">Question 1
<li></span>
</li><span style="color:blue">Question 2</span></li>
</ul>
</p>
</div>
</body>
</html>
```
Output of code:
#figure(image("Databases2021Question1HTMLPage.png"),
caption: [
Question 1 HTML output
]
)
Problems with the code:
- Using green text on a yellow background may not provide enough
contrast for comfortable reading
- The `<span>` block containing Question 1 should be on another line,
instead of right next to the text CO323 Main Exam
- The yellow background goes to the end of the page’s width, when really
it should instead have ended where the text ended
- There shouldn’t be as much a space/gap between the top title, and the
questions below.
- The second `<li>` item is completely blank with nothing on it.
- Question 2 doesn’t appear as a list item
- The entire unordered list is wthin a `<p>` tag, when really the `<p>`
tag should have ended at `CO323 Resit Exam`
- If there are going to be two different exams on a single page, it
would be preferable to separate these two with a horizontal line
instead of just blank space
- After width: 20%, it should have a semi-colon for the text, because
otherwise the height isn’t going to load properly.
#quote(block: true)[
#block[
#set enum(numbering: "(a)", start: 2)
+ Write CSS code that tidies up the above code. Your code should
minimise the use of inline style.
]
]
\[I don’t know what it’s asking here\]
#quote(block: true)[
#block[
#set enum(numbering: "(a)", start: 3)
+ Add a CSS selector for all paragraphs (p elements) under div elements
with class "exam" to make their background colour blue.
]
]
```css
div.exam p {
background-color: blue;
}
```
#pagebreak()
== Question 2
<question-2>
#quote(block: true)[
#block[
#set enum(numbering: "(1)", start: 2)
+ Inspect the following HTML code for displaying the result of the
"Wimbledon 2008 Men’s Final".
]
]
```html
<html>
<head>
<title>Wimbledon 2008 Men's Final</title>
</head>
<body>
<table>
<tr id="players">
<th>Federer</th><th>Sets</th><th>Nadal</th>
</tr>
<tr id="set1"><td>4</td><td>1</td><td>6</td></tr>
<tr id="set2"><td>4</td><td>2</td><td>6</td></tr>
<tr id="set3"><td>7</td><td>3</td><td>6</td></tr>
<tr id="set4"><td>7</td><td>4</td><td>6</td></tr>
<tr id="set5"><td>7</td><td>5</td><td>9</td></tr>
</table>
<p id="result"></p>
</body>
</html>
```
#quote(block: true)[
Write a JavaScript function to print "X won Y-Z in W sets" onto the HTML
element with id "result", where X is the winning player, Y-Z is the
score in sets, and W is the total number of sets played. Also, explain
where the function should be written within the HTML structure by
referring to the line number. Note that your code should work for any
result displayed in this way (not only for the above result). \[20
marks\]
]
Code correctly formatted:
```html
<html>
<head>
<title>Wimbledon 2008 Men's Final</title>
</head>
<body>
<table>
<tr id="players">
<th>Federer</th>
<th>Sets</th>
<th>Nadal</th>
</tr>
<tr id="set1">
<td>4</td>
<td>1</td>
<td>6</td>
</tr>
<tr id="set2">
<td>4</td>
<td>2</td>
<td>6</td>
</tr>
<tr id="set3">
<td>7</td>
<td>3</td>
<td>6</td>
</tr>
<tr id="set4">
<td>7</td>
<td>4</td>
<td>6</td>
</tr>
<tr id="set5">
<td>7</td>
<td>5</td>
<td>9</td>
</tr>
</table>
<p id="result"></p>
</body>
</html>
```
Initial output of code:
#figure(image("./Databases2021Question1InitialOutput.png"),
caption: [
Question 2 Initial output of code
]
)
Correct JavaSript code:
```javascript
function printResult() {
let p1ScoreCount = 0;
let p2ScoreCount = 0;
let tableLength = document.getElementsByTagName("table")[0].rows.length;
console.log(tableLength);
for (let i = 1; i < tableLength; i++) {
let p1Score = parseInt(document.getElementById("set" + i).getElementsByTagName("td")[0].textContent);
let p2Score = parseInt(document.getElementById("set" + i).getElementsByTagName("td")[2].textContent);
if (p1Score > p2Score) {
p1ScoreCount += 1;
} else {
p2ScoreCount += 1;
}
}
let resultHTML = document.getElementById("result");
let p1Name = document.getElementById("players").getElementsByTagName("th")[0].textContent;
let p2Name = document.getElementById("players").getElementsByTagName("th")[2].textContent;
if (p1ScoreCount > p2ScoreCount) {
resultHTML.innerHTML = p1Name + " won " + p1ScoreCount + "-" + p2ScoreCount + " in " + (tableLength - 1) + " sets.";
} else {
resultHTML.textContent = p1Name + " won " + p1ScoreCount + "-" + p2ScoreCount + " in " + (tableLength - 1) + " sets.";
console.log("yeah")
}
}
```
#pagebreak()
== Question 3
<question-3>
=== (a) Here is the definition of a PHP function
<a-here-is-the-definition-of-a-php-function>
```php
function test($arr) {
if ($arr[1]) {
echo "Blue";
}
else {
for ($k=0; $k <= $arr[2]; $k++) {
echo $arr[3][k];
}
}
}
```
Recall that array \$arr can be defined using a statement of the form:
`$arr = array(…);`
#quote(block: true)[
#block[
#set enum(numbering: "(i)", start: 1)
+ Give an array \$arr such that
]
```php
test($arr)
```
would print `Blue`.
]
```php
$arr = array("One", true);
```
#quote(block: true)[
#block[
#set enum(numbering: "(i)", start: 2)
+ Give an array `$arr` such that
]
```php
test($arr)
```
would print `Green`.
Note: the for loop must do three iterations in case (iii).
]
```php
$arr = array(
"One",
false,
1,
array("Gre", "en"));
```
#quote(block: true)[
#block[
#set enum(numbering: "(i)", start: 3)
+ Give an array `$arr` such that `test($arr)`
]
```php
test($arr)
```
would print `Pink Purple Violet`
Note: the for loop must do three iterations in case (iii).
]
```php
$arr = array("",false, 2, array("Pink ", "Purple ", "Violet"))
```
=== (b) Consider the following code fragment in a file index.php
<b-consider-the-following-code-fragment-in-a-file-index.php>
```php
<?php session_start();
$_SESSION[‘name’] = ‘Alice’;
setcookie(‘name’,‘Bob’,strtotime(“+1 month”));
?>
```
```html
<form action="next_page.php" method="post">
<input type="text" name="trainer"> <br>
<input type="radio" name="s1" value="Jog"> Jog <br>
<input type="radio" name="s1" value="Sleep"> Sleep <br>
<input type="submit">
</form>
```
Answer the following questions:
#quote(block: true)[
#block[
#set enum(numbering: "(i)", start: 1)
+ State which of the superglobal variables are certainly set in
next\_page.php, and which may be set or not depending on the user’s behaviour in index.php. Justify your answer.
]
]
- \$\_SESSION is certainly set because starting a session and setting a session variable does not depend on user behavior after the initial session_start() call.
- \$\_COOKIE depends on whether the user's browser accepts cookies and sends them back in subsequent requests.
- \$\_POST depends on whether the user submits the form in index.php.
#quote(block: true)[
#block[
#set enum(numbering: "(i)", start: 2)
+ Assume that all the superglobal variable(s) you mentioned in your answer to (i) are passed to next\_page.php. Complete the code fragment below (i.e., to be included in next\_page.php) so that all values of the superglobal variables are printed as a sequence of "echo" statements. Give a possible solution of printing all these variables using the sequence of echo statements you have given.
]
```php
session_start();
echo ...;
echo ...;
...
```
]
```php
<?php
session_start();
// Print the session variable
echo 'Session name: ' . $_SESSION['name'] . '<br>';
// Print the cookie variable
echo 'Cookie name: ' . $_COOKIE['name'] . '<br>';
// Print the POST variables
echo 'Trainer: ' . $_POST['trainer'] . '<br>';
echo 's1: ' . $_POST['s1'] . '<br>';
?>
```
#quote(block: true)[
#block[
#set enum(numbering: "(i)", start: 3)
+ Is method post the best method to be used in index.php? Justify your
answer.
]
]
The `POST` method may not be the best method to use for index.php. This
is because if we wanted to access the same information, it would have to
come with the request, and the user wouldn’t be able to bookmark the
page. If we used the `GET` method, it would provide a unique url, and
the user would be able to bookmark the page, and return to the page.
#pagebreak()
== Question 4
<question-4>
A database includes information on people and clubs. Each person is
identified by an integer and has their name, and phone number recorded.
Each club is identified by a name and the city it is located in. The
relationship between club and person is 1:N. A person must be a member
of only one club. A club may include zero or more people.
#quote(block: true)[
#block[
#set enum(numbering: "(a)", start: 1)
+ Write SQL CREATE TABLE statements for the tables in the problem
statement above. Justify your choices of primary and foreign keys.
]
]
Person table:
```sql
CREATE TABLE People (
PersonID INT PRIMARY KEY AUTO_INCREMENT,
FullName VARCHAR(255),
PhoneNumber VARCHAR(20),
ClubID INT,
FOREIGN KEY (ClubID) REFERENCES Club(ClubID)
);
```
Alternative method with shorter reference:
```sql
CREATE TABLE People (
PersonID INT PRIMARY KEY AUTO_INCREMENT,
FullName VARCHAR(255),
PhoneNumber VARCHAR(20),
ClubID INT REFERENCES Club(ClubID)
);
```
Club table:
```sql
CREATE TABLE Club (
ClubID INT PRIMARY KEY,
ClubName VARCHAR(255),
City VARCHAR(255),
);
```
We chose the PersonID as the primary key because it’s the only value
that is guaranteed to be unique. This applies to ClubID also.
=== (b) Write SQL statements to perform the following tasks
<b-write-sql-statements-to-perform-the-following-tasks>
#quote(block: true)[
#block[
#set enum(numbering: "(i)", start: 1)
+ Insert a new person as a member of a club.
]
]
```sql
INSERT INTO People (FullName, PhoneNumber, ClubID)
VALUES ("<NAME>", "+44 3322-183211", 3);
```
#quote(block: true)[
#block[
#set enum(numbering: "(i)", start: 2)
+ Retrieve the name, phone number and club name of all people whose club
is located in any city ending by "don".
]
]
```sql
SELECT p.FullName, p.PhoneNumber, c.ClubName
FROM People p
JOIN Club c ON p.ClubID = c.ClubID
WHERE RIGHT(City, 3) = "don";
```
#quote(block: true)[
#block[
#set enum(numbering: "(i)", start: 3)
+ Retrieve the number of members of each city (all in one query) and
return only the clubs with at least 1 member.
]
]
```sql
SELECT c.City, c.ClubName, COUNT(p.PersonID) AS NumberOfMembers
FROM Club c
LEFT JOIN People p ON c.ClubID = p.ClubID
GROUP BY c.City, c.ClubName
HAVING COUNT(p.PersonID) >= 1;
``` |
|
https://github.com/frectonz/the-pg-book | https://raw.githubusercontent.com/frectonz/the-pg-book/main/book/131.%20superangels.html.typ | typst | superangels.html
The New Funding Landscape
Want to start a startup? Get funded by
Y Combinator.
October 2010After barely changing at all for decades, the startup funding
business is now in what could, at least by comparison, be called
turmoil. At Y Combinator we've seen dramatic changes in the funding
environment for startups. Fortunately one of them is much higher
valuations.The trends we've been seeing are probably not YC-specific. I wish
I could say they were, but the main cause is probably just that we
see trends first—partly because the startups we fund are very
plugged into the Valley and are quick to take advantage of anything
new, and partly because we fund so many that we have enough data
points to see patterns clearly.What we're seeing now, everyone's probably going to be seeing in
the next couple years. So I'm going to explain what we're seeing,
and what that will mean for you if you try to raise money.Super-AngelsLet me start by describing what the world of startup funding used
to look like. There used to be two sharply differentiated types
of investors: angels and venture capitalists. Angels are individual
rich people who invest small amounts of their own money, while VCs
are employees of funds that invest large amounts of other people's.For decades there were just those two types of investors, but now
a third type has appeared halfway between them: the so-called
super-angels.
[1]
And VCs have been provoked by their arrival
into making a lot of angel-style investments themselves. So the
previously sharp line between angels and VCs has become hopelessly
blurred.There used to be a no man's land between angels and VCs. Angels
would invest $20k to $50k apiece, and VCs usually a million or more.
So an angel round meant a collection of angel investments that
combined to maybe $200k, and a VC round meant a series A round in
which a single VC fund (or occasionally two) invested $1-5 million.The no man's land between angels and VCs was a very inconvenient
one for startups, because it coincided with the amount many wanted
to raise. Most startups coming out of Demo Day wanted to raise
around $400k. But it was a pain to stitch together that much out
of angel investments, and most VCs weren't interested in investments
so small. That's the fundamental reason the super-angels have
appeared. They're responding to the market.The arrival of a new type of investor is big news for startups,
because there used to be only two and they rarely competed with one
another. Super-angels compete with both angels and VCs. That's
going to change the rules about how to raise money. I don't know
yet what the new rules will be, but it looks like most of the changes
will be for the better.A super-angel has some of the qualities of an angel, and some of
the qualities of a VC. They're usually individuals, like angels.
In fact many of the current super-angels were initially angels of
the classic type. But like VCs, they invest other people's money.
This allows them to invest larger amounts than angels: a typical
super-angel investment is currently about $100k. They make investment
decisions quickly, like angels. And they make a lot more investments
per partner than VCs—up to 10 times as many.The fact that super-angels invest other people's money makes them
doubly alarming to VCs. They don't just compete for startups; they
also compete for investors. What super-angels really are is a new
form of fast-moving, lightweight VC fund. And those of us in the
technology world know what usually happens when something comes
along that can be described in terms like that. Usually it's the
replacement.Will it be? As of now, few of the startups that take money from
super-angels are ruling out taking VC money. They're just postponing
it. But that's still a problem for VCs. Some of the startups that
postpone raising VC money may do so well on the angel money they
raise that they never bother to raise more. And those who do raise
VC rounds will be able to get higher valuations when they do. If
the best startups get 10x higher valuations when they raise series
A rounds, that would cut VCs' returns from winners at least tenfold.
[2]So I think VC funds are seriously threatened by the super-angels.
But one thing that may save them to some extent is the uneven
distribution of startup outcomes: practically all the returns are
concentrated in a few big successes. The expected value of a startup
is the percentage chance it's Google. So to the extent that winning
is a matter of absolute returns, the super-angels could win practically
all the battles for individual startups and yet lose the war, if
they merely failed to get those few big winners. And there's a
chance that could happen, because the top VC funds have better
brands, and can also do more for their portfolio companies.
[3]Because super-angels make more investments per partner, they have
less partner per investment. They can't pay as much attention to
you as a VC on your board could. How much is that extra attention
worth? It will vary enormously from one partner to another. There's
no consensus yet in the general case. So for now this is something
startups are deciding individually.Till now, VCs' claims about how much value they added were sort of
like the government's. Maybe they made you feel better, but you
had no choice in the matter, if you needed money on the scale only
VCs could supply. Now that VCs have competitors, that's going to
put a market price on the help they offer. The interesting thing
is, no one knows yet what it will be.Do startups that want to get really big need the sort of advice and
connections only the top VCs can supply? Or would super-angel money
do just as well? The VCs will say you need them, and the super-angels
will say you don't. But the truth is, no one knows yet, not even
the VCs and super-angels themselves. All the super-angels know
is that their new model seems promising enough to be worth trying,
and all the VCs know is that it seems promising enough to worry
about.RoundsWhatever the outcome, the conflict between VCs and super-angels is
good news for founders. And not just for the obvious reason that
more competition for deals means better terms. The whole shape of
deals is changing.One of the biggest differences between angels and VCs is the amount
of your company they want. VCs want a lot. In a series A round
they want a third of your company, if they can get it. They don't
care much how much they pay for it, but they want a lot because the
number of series A investments they can do is so small. In a
traditional series A investment, at least one partner from the VC
fund takes a seat on your board.
[4]
Since board seats last about
5 years and each partner can't handle more than about 10 at once,
that means a VC fund can only do about 2 series A deals per partner
per year. And that means they need to get as much of the company
as they can in each one. You'd have to be a very promising startup
indeed to get a VC to use up one of his 10 board seats for only a
few percent of you.Since angels generally don't take board seats, they don't have this
constraint. They're happy to buy only a few percent of you. And
although the super-angels are in most respects mini VC funds, they've
retained this critical property of angels. They don't take board
seats, so they don't need a big percentage of your company.Though that means you'll get correspondingly less attention from
them, it's good news in other respects. Founders never really liked
giving up as much equity as VCs wanted. It was a lot of the company
to give up in one shot. Most founders doing series A deals would
prefer to take half as much money for half as much stock, and then
see what valuation they could get for the second half of the stock
after using the first half of the money to increase its value. But
VCs never offered that option.Now startups have another alternative. Now it's easy to raise angel
rounds about half the size of series A rounds. Many of the startups
we fund are taking this route, and I predict that will be true of
startups in general.A typical big angel round might be $600k on a convertible note with
a valuation cap of $4 million premoney. Meaning that when the note
converts into stock (in a later round, or upon acquisition), the
investors in that round will get .6 / 4.6, or 13% of the company.
That's a lot less than the 30 to 40% of the company you usually
give up in a series A round if you do it so early.
[5]But the advantage of these medium-sized rounds is not just that
they cause less dilution. You also lose less control. After an
angel round, the founders almost always still have control of the
company, whereas after a series A round they often don't. The
traditional board structure after a series A round is two founders,
two VCs, and a (supposedly) neutral fifth person. Plus series A
terms usually give the investors a veto over various kinds of
important decisions, including selling the company. Founders usually
have a lot of de facto control after a series A, as long as things
are going well. But that's not the same as just being able to do
what you want, like you could before.A third and quite significant advantage of angel rounds is that
they're less stressful to raise. Raising a traditional series A
round has in the past taken weeks, if not months. When a VC firm
can only do 2 deals per partner per year, they're careful about
which they do. To get a traditional series A round you have to go
through a series of meetings, culminating in a full partner meeting
where the firm as a whole says yes or no. That's the really scary
part for founders: not just that series A rounds take so long, but
at the end of this long process the VCs might still say no. The
chance of getting rejected after the full partner meeting averages
about 25%. At some firms it's over 50%.Fortunately for founders, VCs have been getting a lot faster.
Nowadays Valley VCs are more likely to take 2 weeks than 2 months.
But they're still not as fast as angels and super-angels, the most
decisive of whom sometimes decide in hours.Raising an angel round is not only quicker, but you get feedback
as it progresses. An angel round is not an all or nothing thing
like a series A. It's composed of multiple investors with varying
degrees of seriousness, ranging from the upstanding ones who commit
unequivocally to the jerks who give you lines like "come back to
me to fill out the round." You usually start collecting money from
the most committed investors and work your way out toward the
ambivalent ones, whose interest increases as the round fills up.But at each point you know how you're doing. If investors turn
cold you may have to raise less, but when investors in an angel
round turn cold the process at least degrades gracefully, instead
of blowing up in your face and leaving you with nothing, as happens
if you get rejected by a VC fund after a full partner meeting.
Whereas if investors seem hot, you can not only close the round
faster, but now that convertible notes are becoming the norm,
actually raise the price to reflect demand.ValuationHowever, the VCs have a weapon they can use against the super-angels,
and they have started to use it. VCs have started making angel-sized
investments too. The term "angel round" doesn't mean that all the
investors in it are angels; it just describes the structure of the
round. Increasingly the participants include VCs making investments
of a hundred thousand or two. And when VCs invest in angel rounds
they can do things that super-angels don't like. VCs are quite
valuation-insensitive in angel rounds—partly because they are
in general, and partly because they don't care that much about the
returns on angel rounds, which they still view mostly as a way to
recruit startups for series A rounds later. So VCs who invest in
angel rounds can blow up the valuations for angels and super-angels
who invest in them.
[6]Some super-angels seem to care about valuations. Several turned
down YC-funded startups after Demo Day because their valuations
were too high. This was not a problem for the startups; by definition
a high valuation means enough investors were willing to accept it.
But it was mysterious to me that the super-angels would quibble
about valuations. Did they not understand that the big returns
come from a few big successes, and that it therefore mattered far
more which startups you picked than how much you paid for them?After thinking about it for a while and observing certain other
signs, I have a theory that explains why the super-angels may be
smarter than they seem. It would make sense for super-angels to
want low valuations if they're hoping to invest in startups that
get bought early. If you're hoping to hit the next Google, you
shouldn't care if the valuation is 20 million. But if you're looking
for companies that are going to get bought for 30 million, you care.
If you invest at 20 and the company gets bought for 30, you only
get 1.5x. You might as well buy Apple.So if some of the super-angels were looking for companies that could
get acquired quickly, that would explain why they'd care about
valuations. But why would they be looking for those? Because
depending on the meaning of "quickly," it could actually be very
profitable. A company that gets acquired for 30 million is a failure
to a VC, but it could be a 10x return for an angel, and moreover,
a quick 10x return. Rate of return is what matters in
investing—not the multiple you get, but the multiple per year.
If a super-angel gets 10x in one year, that's a higher rate of
return than a VC could ever hope to get from a company that took 6
years to go public. To get the same rate of return, the VC would
have to get a multiple of 10^6—one million x. Even Google
didn't come close to that.So I think at least some super-angels are looking for companies
that will get bought. That's the only rational explanation for
focusing on getting the right valuations, instead of the right
companies. And if so they'll be different to deal with than VCs.
They'll be tougher on valuations, but more accommodating if you want
to sell early.PrognosisWho will win, the super-angels or the VCs? I think the answer to
that is, some of each. They'll each become more like one another.
The super-angels will start to invest larger amounts, and the VCs
will gradually figure out ways to make more, smaller investments
faster. A decade from now the players will be hard to tell apart,
and there will probably be survivors from each group.What does that mean for founders? One thing it means is that the
high valuations startups are presently getting may not last forever.
To the extent that valuations are being driven up by price-insensitive
VCs, they'll fall again if VCs become more like super-angels and
start to become more miserly about valuations. Fortunately if this
does happen it will take years.The short term forecast is more competition between investors, which
is good news for you. The super-angels will try to undermine the
VCs by acting faster, and the VCs will try to undermine the
super-angels by driving up valuations. Which for founders will
result in the perfect combination: funding rounds that close fast,
with high valuations.But remember that to get that combination, your startup will have
to appeal to both super-angels and VCs. If you don't seem like you
have the potential to go public, you won't be able to use VCs to
drive up the valuation of an angel round.There is a danger of having VCs in an angel round: the so-called
signalling risk. If VCs are only doing it in the hope of investing
more later, what happens if they don't? That's a signal to everyone
else that they think you're lame.How much should you worry about that? The seriousness of signalling
risk depends on how far along you are. If by the next time you
need to raise money, you have graphs showing rising revenue or
traffic month after month, you don't have to worry about any signals
your existing investors are sending. Your results will speak for
themselves.
[7]Whereas if the next time you need to raise money you won't yet have
concrete results, you may need to think more about the message your
investors might send if they don't invest more. I'm not sure yet
how much you have to worry, because this whole phenomenon of VCs
doing angel investments is so new. But my instincts tell me you
don't have to worry much. Signalling risk smells like one of those
things founders worry about that's not a real problem. As a rule,
the only thing that can kill a good startup is the startup itself.
Startups hurt themselves way more often than competitors hurt them,
for example. I suspect signalling risk is in this category too.One thing YC-funded startups have been doing to mitigate the risk
of taking money from VCs in angel rounds is not to take too much
from any one VC. Maybe that will help, if you have the luxury of
turning down money.Fortunately, more and more startups will. After decades of competition
that could best be described as intramural, the startup funding
business is finally getting some real competition. That should
last several years at least, and maybe a lot longer. Unless there's
some huge market crash, the next couple years are going to be a
good time for startups to raise money. And that's exciting because
it means lots more startups will happen.
Notes[1]
I've also heard them called "Mini-VCs" and "Micro-VCs." I
don't know which name will stick.There were a couple predecessors. <NAME> had angel funds
starting in the 1990s, and in some ways First Round Capital is closer to a
super-angel than a VC fund.[2]
It wouldn't cut their overall returns tenfold, because investing
later would probably (a) cause them to lose less on investments
that failed, and (b) not allow them to get as large a percentage
of startups as they do now. So it's hard to predict precisely what
would happen to their returns.[3]
The brand of an investor derives mostly from the success of
their portfolio companies. The top VCs thus have a big brand
advantage over the super-angels. They could make it self-perpetuating
if they used it to get all the best new startups. But I don't think
they'll be able to. To get all the best startups, you have to do
more than make them want you. You also have to want them; you have
to recognize them when you see them, and that's much harder.
Super-angels will snap up stars that VCs miss. And that will cause
the brand gap between the top VCs and the super-angels gradually
to erode.[4]
Though in a traditional series A round VCs put two partners
on your board, there are signs now that VCs may begin to conserve
board seats by switching to what used to be considered an angel-round
board, consisting of two founders and one VC. Which is also to the
founders' advantage if it means they still control the company.[5]
In a series A round, you usually have to give up more than
the actual amount of stock the VCs buy, because they insist you
dilute yourselves to set aside an "option pool" as well. I predict
this practice will gradually disappear though.[6]
The best thing for founders, if they can get it, is a convertible
note with no valuation cap at all. In that case the money invested
in the angel round just converts into stock at the valuation of the
next round, no matter how large. Angels and super-angels tend not
to like uncapped notes. They have no idea how much of the company
they're buying. If the company does well and the valuation of the
next round is high, they may end up with only a sliver of it. So
by agreeing to uncapped notes, VCs who don't care about valuations
in angel rounds can make offers that super-angels hate to match.[7]
Obviously signalling risk is also not a problem if you'll
never need to raise more money. But startups are often mistaken
about that.Thanks to <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME> and <NAME>
for reading drafts
of this.
|
|
https://github.com/elteammate/typst-compiler | https://raw.githubusercontent.com/elteammate/typst-compiler/main/src/typesystem-def.typ | typst | #import "utils.typ": *
#let ptype = mk_enum(
debug: true,
"none_",
"content",
"string",
"float",
"int",
"any",
"bool",
"arguments",
"dictionary",
"function",
"array",
"tuple",
"object",
)
#let mk_type(base, ..args) = (base, args.pos(), args.named())
#let types = (
none_: mk_type(ptype.none_),
content: mk_type(ptype.content),
string: mk_type(ptype.string),
float: mk_type(ptype.float),
int: mk_type(ptype.int),
empty_tuple: mk_type(ptype.tuple),
any: mk_type(ptype.any),
bool: mk_type(ptype.bool),
)
#let type_of_join(ty1, ty2) = if ty1.at(0) == ptype.none_ {
ty2
} else if ty2.at(0) == ptype.none_ {
ty1
} else if ty1 == ty2 and ty1.at(0) in (
ptype.content,
ptype.string,
ptype.dictionary,
ptype.array,
) {
ty1
} else if ty1.at(0) == ptype.tuple and ty2.at(0) == ptype.tuple {
mk_type(ptype.tuple, ..ty1.slice(1), .. ty2.slice(1))
} else {
none
}
|
|
https://github.com/feiyangyy/Learning | https://raw.githubusercontent.com/feiyangyy/Learning/main/linear_algebra/矩阵的相抵和相似.typ | typst | #set text(
font: "New Computer Modern",
size: 6pt
)
#set page(
paper: "a5",
margin: (x: 1.8cm, y: 1.5cm),
)
#set par(
justify: true,
leading: 0.52em,
)
#set heading(numbering: "1.")
// 函数实例
#let Mab(body)={
$bold(#body)$
}
// 数学公式标号
#set math.equation(numbering: "(1)", supplement: [式])
= 笛卡尔积
== 定义
#let bs = Mab[S]; #let bm = Mab[M]; #let bsm = $bs times bm$
#let mx =$x$; #let my = $y$
设 #Mab[S] #Mab[M] 是两个集合,则从 #bs #bm 分别取一个元素,组成的集合称为#bs #bm 的笛卡尔积,记作$bs times bm$, 数学上的表示为:
$
bs times bm = {(a, b) | a in bs, b in bm}
$
如果 #bsm 中的两个元素$(a_1, b_1), (a_2, b_2)$ 满足$a_1 = b_1, a_2 = b_2$, 则称两者相等。
笛卡尔积最直接的例子是直角坐标系,我们从 #mx #my 轴上分别取值构成的有序数对$(x_0, y_0)$ 就是一个坐标,其刻画了一个平面的点的位置。
== 二元关系
#let mw = Mab[W]; #let bs = Mab[S]
设 #bs 是一个非空集合,如果有一个 #mw 是 $bs times bs$的非空子集,则称 #mw 是 #bs 上的一个二元关系。如果$a,b in bs; (a,b) in mw$, 则称$a,b$ 具有#mw 关系, 记作$a mw b$ 或者$a ~ b$。如果$a,b in bs; (a,b) in.not mw$, 则称$a,b$ 没有#mw 关系
== 等价关系
如果#bs 上的一个关系满足以下性质
=== 反身性 $a~a$
=== 对称性 $a~b => b ~ a$
=== 传递性 $a~b, b~c => a~c$
那么这样的关系称作等价关系
== 等价类
#let hov(b) = {
$macron(#b)$
}
#let ha = $#hov[a]$; #let hx = $#hov[x]$;#let hy = $#hov[y]$;
设 $~$ 是 #bs 上的一个等价关系,那么,令:
$
a in bs, macron(a) eq.def {x in bs | x ~ a}
$
称#highlight()[$macron(a)$ 是 #bs 上由 $a$ 确定的等价类], 由定义可知,$ha$ 是一个集合
=== 性质1. $a in ha$
=== 性质2. $x in ha <=> x ~ a$
=== 性质3. $hx = hy <=> x ~ y$
证明:
1. 必要性: 因为$hx = hy => x in hx => x in hy => x ~ y$ (性质1. 性质2.)
2. 充分性: 设$forall c in hx => c ~ x; x ~ y => c ~ y => c in hy => hx subset.eq hy$, 同理从$hy$ 任取元素可得$hy subset.eq hx$ 结合两者可得$hx = hy$
=== 定理 设$~$是#bs 上的一个等价关系,则任取$a,b in bs$, 有$#hov[a] = #hov[b]$ 或者$#hov[a] sect #hov[b] = emptyset$
1. 先证明$#hov[a] != #hov [b] => #hov[a] sect #hov[b] = emptyset$. 设$c in #hov[a] sect #hov[b] => c ~ a, c ~ b => a ~ b => #hov[a] = #hov[b] $ 与假设矛盾,因此其交集必为空集。 同理,当$#hov[a] sect #hov[b] != emptyset$ 时, 存在上述的$c$ 使得结果成立,从而必有$#hov[a] = #hov[b]$
== 定义#bs 的划分
设有I个#bs 的非空子集的并集$union S_i, i in I$, 并且满足$S_i sect S_j = emptyset, i != j$,则称${S_i, i in I}$是#bs 的一个划分,记作$pi(#bs)$
=== 定理 设$~$是#bs 上的一个等价关系,则所有等价类组成的集合是#bs 的一个划分,记作$pi_(~)(bs)$
证明:
$
forall a in bs, a in #hov[a] => bs = union_(a in bs){#hov[a]}, 又 a_i, a_j in bs, #hov[a_i] != #hov[a_j] => #hov[a_i] sect #hov[a_j]= emptyset => union_(a in bs){#hov[a]} 满 足 划 分 条 件
$
=== 商集
我们可以在整数集上定义这样的一个关系:
$
a ~ b eq.def a mod 7 = b mod 7
$
这个关系是否满足等价关系?
1. 反身:$a mod 7 = a mod 7$
2. 对称: $a mod 7 = b mod 7 <=> b mod 7 = a mod 7$
3. 传递: $a mod 7 = b mod 7, b mod 7 = c mod 7 <=> a mod 7 = c mod 7$ (mod 取得的是一个具体的数,因此是满足传递性质的)
从而模7同余关系是一个等价关系,易知#Mab[Z] 中有7个等价类${#hov[0],#hov[1],#hov[2],#hov[3],#hov[4],#hov[5], #hov[6]}$.
由此引入商集概念:
设$~$ 是#bs 上的一个等价关系,由所有等价类组成的集合称为#bs 对于$~$ 关系的商集,记作$bs \/~$。注意商集是一个集合,不是元素
= 矩阵相抵
#let Mkn = $bold(M)_(s times n)$; #let Mnn = $bold(M)_n$
#let M(body) = {
$body$
}
#Mab[K] 上的所有$s times n$的矩阵的集合记作#Mkn ,当$s = n$时,简记为#Mnn , 表示#Mab[K] 上所有n阶矩阵的集合。
== 相抵定义:
#Mkn 上的矩阵$A$ 经过一系列初等行列变换得到$B$, 则称$A, B$是相抵的,记作$A~^(相 抵)B$.
相抵是#Mkn 上的一个二元关系,容易验证,相抵满足等价关系的三条性质:
1. 反身: $A$ 和自身相抵
2. 对称: $A, B$ 相抵 等价于 $B, A$ 相抵
3. 传递: $A,B,C$, 如果$A~B, B~C => A~C$
相抵关系下,$A$的等价类称为其相抵类
回忆: 矩阵的初等行变换等价于, 矩阵左乘以一系列初等矩阵(矩阵被视作行向量组合);矩阵的初等列变换等价于矩阵右乘以一系列初等矩阵Q。从而矩阵的相抵关系可以表达为:
$
B = (Pi_k P_k) A (Pi_k Q_k) = P A Q
$ <aa>
@aa 中的 $P,Q$ 均是可逆矩阵
== 定理
#let rk = $r a n k$
设$A in Mkn, rk(A) = r$, 如果$r > 0$, 则A相抵于矩阵:$mat(#Mab[I]_r, bold(0); #Mab[0],#Mab[0])$ ,这个()矩阵称为$A$的相抵标准形。如果$r = 0$, 那么$A$ 相抵于0矩阵。
证明:
1. 如果$r > 0$, 那么矩阵$A$可以经过初等行变换为简化阶梯型$J$, 但是$J$的列分布不一定是连续的,我们可以通过初等列变换,将主元的列分布控制位连续的,其形式如下:
$
mat(1, 0, 0, ..., 0, c_(1, r+1), ..., c_(1, n); 0, 1, 0, ..., 0, c_(2, r+1), ..., c_(2, n); 0, 0, 1, ..., 0, c_(3, r+1), ..., c_(3, n); ...; 0, 0, 0, ..., 1, c_(r, r+1), ..., c_(r, n);0, 0, 0, ..., 0, 0, ..., 0; ...; 0, 0, 0, ..., 0, 0, ..., 0)
$
这个矩阵的前r行,可以通过初等列变换将后面的列全部消去(如同矩阵初等行变换生成阶梯型一样),从而最终就变成形如$mat(#Mab[I]_r, bold(0); #Mab[0],#Mab[0])$ 的矩阵。这个变换过程只涉及初等行变换和列变换,从而矩阵与之相抵
== 定理 矩阵相抵判定定理
设$A, B in Mkn$, $A, B$ 相抵的充要条件是$rk(A) = rk(B)$
()
证明:
1. 必要性,如果$A, B$ 相抵,根据定义,矩阵的初等行列变换不会改变矩阵的秩(注意不是行列式),从而$rk(A) = rk(B)$
2. 充分性, 如果$rk(A) = rk(B)$,则它们的标准型相等,再根据相抵的传递性可知,$A,B$ 相抵·
根据该定理,可以得知,对于$0 <= r <= min(s, n)$, $r$ 唯一决定了相抵类。这种称为相抵关系下的完全不变量。
== 定义 不变量与完全不变量
设$~$是#Mab[S]上的一个等价关系,一个量或者表达式对于等价类里的元素是相等的,则称该量或表达式是该关系下的一个不变量。如果能恰好完全决定等价类的一组不变量则称为完全不变量
结合以上信息,我们可以有以下推论:
$
A in Mkn,rk(A) != 0 => A = P mat(#Mab[I]_r, bold(0); #Mab[0],#Mab[0])Q
$
= 广义逆矩阵
#let inv(b) = [ $#b ^(-1)$]
如果$A$ 是一个可逆矩阵,那么$A X A = A$ 的一个解是$X = #inv[A]$. 当A不可逆时,这个方程是否有解呢?
== 定理
设$A in Mkn, rk(A) = r > 0$, 则矩阵方程:$A X A = A$ 一定有解。 设$A = P mat(#Mab[I]_r, bold(0); bold(0), bold(0))Q$, P 是 s 阶矩阵,Q 是n阶矩阵。则该矩阵方程的解为:$X = #inv[Q] mat(#Mab[I]_r, #Mab[B]; ; #Mab[C], #Mab[D])#inv[P]$. 其中$B in M_(r times (s - r)), C in M_((n-r) times r), D in M_((n-r) times (s-r))$, 矩阵$mat(#Mab[I]_r, #Mab[B]; ; #Mab[C], #Mab[D])$ 是一个$n times s$矩阵
证明:
$
A X A &= P mat(#Mab[I]_r, bold(0); bold(0), bold(0))Q #inv[Q] mat(#Mab[I]_r, #Mab[B]; ; #Mab[C], #Mab[D])#inv[P] A \
&= P mat(#Mab[I]_r, bold(0); bold(0), bold(0)) #Mab[I]_n mat(#Mab[I]_r, #Mab[B]; ; #Mab[C], #Mab[D])#inv[P] A \
&= P mat(#Mab[I]_r, bold(0); bold(0), bold(0)) mat(#Mab[I]_r, #Mab[B]; ; #Mab[C], #Mab[D])#inv[P] A \
&= P mat(#Mab[I]_r, bold(0); bold(0), bold(0)) mat(#Mab[I]_r, #Mab[B]; ; #Mab[C], #Mab[D]) mat(#Mab[I]_r, bold(0); bold(0), bold(0)) Q
$ <a1>
@a1 中的左侧矩阵$mat(#Mab[I]_r, bold(0); bold(0), bold(0))$ 的列划分是$(r, n-r)$, 右侧矩阵$mat(#Mab[I]_r, #Mab[B]; ; #Mab[C], #Mab[D])$的行划分是$(r, n-r)$,因此两者可以相乘(参考分块矩阵乘积,证明比较复杂), 其结果为:$mat(#Mab[I]_r, #Mab[B];;bold(0), bold(0))$, 从而:
@a1 就可写作:
$
P mat(#Mab[I]_r, #Mab[B];;bold(0), bold(0))mat(#Mab[I]_r, bold(0); bold(0), bold(0)) Q = P mat(#Mab[I]_r, bold(0); bold(0), bold(0)) Q = A
$
从而我们验证了这个定理,上面的定理中对$B C D$ 除了形状之外,没有特殊要求
== 广义逆
#let ginv(b) = { $#b ^(-)$;}
设$A in Mkn$, 矩阵方程$A X A = A$的每一个解都称为$A$的广义逆矩阵,简称$A$的广义逆, 记作$#ginv[A]$ 根据定义显然$A #ginv[A] A = A$. 同时根据上述定理,$rk(A)=r, A = P mat(#Mab[I]_r, bold(0); bold(0), bold(0))Q => X = #inv[Q] mat(#Mab[I]_r, #Mab[B]; ; #Mab[C], #Mab[D])#inv[P] = #ginv[A]$, 可见$#ginv[A]$通常是一个集合
对于$bold(0)_(s times n)$ 任意$B in M_(n times s) => bold(0) B bold(0) = bold(0)_(s times n) => B = #ginv[0]$
== 定理 非齐次线性方程组的相容性定理
非齐次线性方程组$A #Mab[x] = #Mab[$beta$]$ 有解的充要条件是$#Mab[$beta$] = A #ginv[A] #Mab[$beta$]$
证明:
#let bb = $bold(b)$;#let bx = $bold(x)$; #let bbeta = $bold(beta)$
1. 必要性:设$bb$ 是$A bx = bbeta$的解,那么$A bb = bbeta => A #ginv[A] (A bb) = bbeta, 又 A bb = bbeta => bbeta = A #ginv[A] bbeta$
2. 充分性:$ bbeta = A #ginv[A] bbeta = A (#ginv[A] bbeta) => A [#ginv[A]bbeta] = bbeta $<a4> 从而$#ginv[A] bbeta $是$A bx = bbeta$的一个解
== 定理 非齐次线性方程组的解的结构定理
如果$A bx = bbeta$ 有解,则其通解为
$
bx = #ginv[A] bbeta
$
证明:
#let bgm =$bold(gamma)$
设$bgm$ 是一个解,则$A bgm = bbeta$. 那么有:
$
P mat(#Mab[I]_r, bold(0); bold(0), bold(0)) Q bgm &= bbeta \
mat(#Mab[I]_r, bold(0); bold(0), bold(0)) Q bgm &= #inv[P] bbeta
$ <a3>
#let veca = $vec(#Mab[$Y_1$]_r, #Mab[$Y_2$]_(n - r))$
#let vecb = $vec(#Mab[$Z_1$]_r, #Mab[$Z_2$]_(s - r))$
#let matr = $mat(#Mab[I]_r, bold(0); bold(0), bold(0))$
@a3 中,$Q$ 是n阶可逆矩阵,$bgm$是一个$n times 1$的向量,从而$Q bgm$ 是一个$n times 1$的矩阵(向量),将$Q bgm$ 写作$Q bgm = vec(#Mab[$Y_1$]_r, #Mab[$Y_2$]_(n - r))$. 同理$#inv[P] bbeta = vec(#Mab[$Z_1$]_r, #Mab[$Z_2$]_(s - r))$
从而@a3 可以写作:
$
matr veca = vecb => #Mab[$Z_1$]_r = #Mab[$Y_1$]_r, #Mab[$Z_2$]_(s-r) = bold(0) => #inv[P] bbeta = vec(Z_1, bold(0))
$
#let b0 = $bold(0)$
这里要证明一个推论,就是$P_s$可逆时,$forall bx != bold(0), P bold(x) != bold(0)$. 设$exists bx != 0 s.t. P bx = b0$, 因为$P$是可逆矩阵$=>rk(P) = s => P bx = b0$ 只有0解,与假设矛盾,从而$P bx != b0$
#let BC = $bold(C)$;#let BZ = $bold(Z)$;#let BY = $bold(Y)$
从而$#inv[P] bbeta != b0 => #Mab[$Z_1$] != b0_r$, 因此设$#Mab[Z_1] = vec(k_1,k_2, ..., k_r), exists k_i != 0$; 根据前述广义逆定理,$#ginv[A] = #inv[Q] mat(#Mab[I]_r, bold(B); bold(C), bold(D)) #inv[P]$, 我们将$bold(C)_((n-r)times(r))$ 写作$bold(C) = (b0, b0, ..., k_i^(-1)bold(Y)_2, ..., b0)$,这里要注意$bold(Y)_2$ 是一个列向量. 那么$BC BZ_1 = (b0, b0, ..., k_i^(-1)bold(Y)_2, ..., b0) vec(k_1,k_2, ..., k_r) = BY_2$,那么:
$
Q bgm = vec(BY_1, BY_2) = vec(BZ_1, BC BZ_1) = mat(bold(I)_r, b0; BC, b0)vec(BZ_1, b0) => \
bgm = #inv[Q] mat(bold(I)_r, b0; BC, b0)vec(BZ_1, b0), because #inv[P] bbeta = vec(Z_1, bold(0)) => \
bgm = #inv[Q] mat(bold(I)_r, b0; BC, b0) #inv[P] bbeta = #ginv[A] bbeta
$
我们也可以反过来验证,对于$#ginv[A]$, 由3.3. 定理可知,$bbeta = A #ginv[A] bbeta$ , 从而$ #ginv[A] bbeta$ 一定是$A bx = bbeta$的解
综上,如果$A bx = bbeta$ 有解,则其解可表示为$x = #ginv[A] bbeta$
== 齐次线性方程组的解的结构定理:
$A bx = b0$ 的通解为:
$
bx = (I_n - #ginv[A]A)Z, Z in K^n
$<a5>
证明:
$
Z in K^n, A[(I_n - #ginv[A]A)Z] = A[(I_n - #ginv[A]A)]Z = (A - A#ginv[A]A) Z = b0
$
这里注意$#ginv[A] in M_(n times s)$, 同时这个证明只证明了$bx = (I_n - #ginv[A]A)Z, Z in K^n$ 是$A bx = b0$的解的一部分而不是全部,接下来要证明任意解的情况
$
bb s.t. A bb = b0, (I_n - #ginv[A] A) bb = bb - #ginv[A] (A bb) = bb - #ginv[A] b0 = bb => A (I_n - #ginv[A] A) bb = b0
$
综上, 定理得证
#highlight()[此处证明实际上有重复证明的情况,并且没有说明@a5 为何包含了全部解]
1. 重复证明$bb in K^n, s.t. A bb = b0$ 而第一步证明时取得向量$Z in K^n $ 一定包含$bb$
2. 没有包含全部情况$(I_n - #ginv[A]A)Z$ 会对$Z$ 做变换,验证全部情况,应当说明$A bx = b0$的解的空间和$(I_n - #ginv[A]A)Z$ 是同一个空间
== 推论
设$bbeta in K^n , bbeta != b0$, 则如果$A bx = bbeta$ 有解时,其通解为:
$
bx = #ginv[A] bbeta + (I_n - #ginv[A]A)Z, Z in K^n
$
证明:
由定理3.4. 知,$bx in {#ginv[A] bbeta}, s.t. A bx = bbeta$, 又$A bx = bbeta = bbeta + b0 = A bx + A bgm, A bgm = b0$, 由3.5. 知$bgm in {(I_n - #ginv[A]A)Z, Z in K^n}$ 从而$A bx + A bgm = #ginv[A]bbeta + (I_n - #ginv[A]A)Z, Z in k^n$
== (略)设A是复数域上的$s times n$ 矩阵,那么
$
cases(A X A = A, X A X = X, (A X)^* = A X, (X A)^* = X A)
$
称为A的#highlight(fill: green)[Penrose]方程组,他的解叫做$A$ 的#highlight(fill: green)[Moore-Penrose] 广义逆,记作$A^+$
= 矩阵的相似
#highlight[相似仅对方阵而言有意义]
== 相似定义
设#Mab[A],#Mab[B] 是 数域K上的两个$n 阶$矩阵,并且存在一个$P_n$ 满足:
$
#inv[P] A P = B
$<a6>
那么称#Mab[A] #Mab[B] 是相似的,记作$A~B$,注意@a6 中乘积顺序不可更改。
相似关系是一种等价关系:
1. 反身: #Mab[A] 和自身相似,因为$I_n -> #inv[$I_n$] A I_n = A$
2. 对称: $A~B -> B~A$, 因为$A~B <=> B=#inv[P]A P <=> P B #inv[P] = A(because (#inv[P]) ^(-1) = P ) => B~A $
3. 传递:$A~B, B~C => A~C$, 因为$C = #inv[Q]B Q = #inv[P]#inv[Q] A Q P = (Q P)^(-1) A (Q P) => A~C$
在相似关系下,$A$的等价类称为A的相似类
== 相似的性质
=== 1. 设$B_1 = #inv[P] A_1 P; B_2 = #inv[P] A_2 P$
那么
$
B_1 + B_2 = #inv[P] (A_1 + A_2) P, 证:B_1 + B_2 = #inv[P]{A_1 P + A_2 P} = #inv[P]{A_1+A_2} P \
B_1 B_2 = #inv[P] (A_1 A_2) P, 证:B_1 B_2 = #inv[P]A_1 P #inv[P] A_2 P = #inv[P] A_1 A_2 P \
B_1^m = #inv[P]A_1^m P, 证:B_1 B_1 = #inv[P] A_1^2 P ==>^(数 学 归 纳 法) B_1^m = #inv[P]A_1^m P
$
=== 2. 相似矩阵行列式相等
回忆矩阵的乘积的性质:
1. $|A B| = |A||B|$
那么$A~B => B = #inv[P] A P => |B| = |#inv[P]| |A P| =|#inv[P]| |A| |P| =^(数 值) |#inv[P]| |P| |A| = |#inv[P]P| |A| = |A|$
这个证明过程中,要注意矩阵乘积是不可随便交换位置的,但是矩阵的行列式的乘积是可以的(其实质就是一堆数值相乘)
=== 3. 相似的矩阵要么都可逆,要么都不可逆;可逆时,其逆矩阵也相似
1. 由性质2. 知,如果$A~B$, $A$ 不可逆,那么$|A| = 0 => |B| = 0$, 从而$B$不可逆
2. 如果$A~B$,$A$可逆,那么$|B| = |A| != 0$ ,从而$B$ 可逆
3. $A~B, |A| != 0, #inv[B] = (#inv[P]A P)^(-1) = #inv[P] #inv[A] P => #inv[A] ~ #inv[B]$
=== 4. $A~B => rk(A) = rk(B)$
因为$B = #inv[P] A P$ 相当于$B$ 由 $A$ 经过一系列初等行列变换得到,这个过程中不改变矩阵的秩
== 定义2. n阶矩阵$A_n$ 的主对角线上的元素之和称为$A$的迹,记作$tr(A)$
$
tr(A) = sum a_(i,i)
$
对于实数域上的矩阵,$tr(A) in RR$
=== 命题,矩阵的迹具有以下性质
1. 线性性质:
$
tr(A + B) = tr(A) + tr(B) \
tr(k A) = k tr(A)
$
证明略
2. 对称性质: $tr(A B) = tr(B A)$
证明:
$
tr(A B) = sum_k (A B)_(k, k) = sum_k {sum_l a_(k,l) b_(l, k)} \
tr(B A) = sum_k (B A)_(k, k) = sum_k {sum_l b_(k,l) a_(l, k)} = sum_l {sum_k a_(l, k) b_(k, l)} <=>^(l <-> k) sum_k {sum_l a_(k,l) b_(l,k)} = tr(A B)
$
这里注意下第二步的推导中交换求和顺序
一般来说$A B != B A$, 但是$tr(A B) = tr(B A)$
=== 相似的矩阵有相等的迹
设$A~B => tr(B) = tr(#inv[P] A P) = tr(#inv[P] (A P)) =^(数 值) tr((A P) #inv[P]) = tr(A)$
从而,矩阵的秩、行列式、迹 都是相似关系下的不变量,简称为#highlight()[相似不变量]
相似关系最主要的价值在于使用较为简单的相似矩阵,研究其性质,从而得出原矩阵的性质。
=== 可对角化定理
如何判定$A_n$是否可以找到$P s.t. A ~ D$($D$为对角矩阵), 如果有这样的矩阵,即$A ~ D$ 则称$A$是#highlight()[可对角化的]
#let ba = $bold(a)$; #let avecs = $(ba_1,ba_2, ..., ba_n)$; #let larr = $(lambda_1, lambda_2, ..., lambda_n)$
可对角化定理,$A_n$ 可对角化的充要条件是
$
exists avecs, larr, lambda_i in K s.t. A ba_i = lambda_i ba_i, 1 <= i <= n
$<a7>
#let diag = $d i a g$
此时,令$P = avecs$ 则 $#inv[P]A P = diag larr$
证明:
$
A~D=diag larr <=> #inv[P] A P = D => A P = P D => A avecs = avecs D => \
(A ba_1, A ba_2, ..., A ba_n) = (ba_1 lambda_1, ba_2 lambda_2, ..., ba_n lambda_n) <=> \
A ba_i = lambda_i ba_i
$
此处证明需要注意矩阵乘法时,将左右矩阵看做行列向量时,矩阵乘法的作用
= 矩阵的特征值和特征向量(IMPORTANT)
#let A = $A$
#let lam = $lambda$
#let idef = $bold(I)$
== 矩阵特征值定义
#let lam = $lambda$
对于数据K上的n阶方阵,如果存在一个数$lam_0 in K$, 存在一个向量$#ba in K^n, #ba != #b0$, 使得,$A #ba = lam_0 #ba$,则$lam_0$ 称为A的一个特征值, #ba 称为A的属于$lam_0$的一个特征向量
显然,如果#ba 是A的属于$lam_0$的一个特征向量,则$k ba, forall k!=0 => A(k#ba)= k (A #ba) = k (lam_0 #ba) = lam_0 (k #ba)$, 即$k ba$也是A的属于$lam_0$的一个特征向量。
我们把矩阵看做一种变换,特征向量和特征值的含义就是,特征向量在矩阵A的变换下,以特征值做尺度变换,变换前后一定是共线的。某些情况下,矩阵变换一定会使得向量不共线(比如不是$n pi$的旋转). 换句话说,矩阵的特征向量反映了矩阵在某些"方向上"的特殊作用.
矩阵的特征值、特征向量的概念十分重要,主成分分析、特征值分解等都需要利用特征向量。
== 矩阵特征值和特征向量的求解与判定
设#A 是一个n阶矩阵,#lam 是一个变量,则行列式$|lam idef - A| = mat(delim:"|", lam - a_11, -a_12, ..., -a_(1 n); ..., -a_(n 1), -a_(n 2), ..., lam - a_(n n))$ 称为#A 的#highlight()[特征多项式], 接下来说明如何求解或判定特征值以及特征向量
设$lam_0$是A的一个特征值,#ba 是A的属于$lam_0$的一个特征向量,从而:
$
A#ba = lam_0 #ba, lam_0 in K, #ba in K^n, #ba != #b0 =>^(两 边 同 减 去 A#ba) #b0 = lam_0#ba - A#ba = (lam_0 idef #ba - A#ba) = (lam_0 #idef - A)#ba = #b0 , #ba != #b0
$
从而#ba 是齐次方程组$(lam_0 idef - A)#bx =#b0$的一个非0解,这要求系数矩阵$(lam_0 idef - A)$的行列式必为0,这进一步要求$lam_0$是A的特征多项式$|lam idef - A| =0$的一个解。如果该多项式没有解,说明行列式必不为0,从而矩阵便不存在特征值和特征向量。
我们回忆齐次线性方程组的解集结构:将所有自由变量分别取1, 其余分量写成这些变量的表达式,这些解就构成了齐次线性方程组解的空间的一个基。
在$(lam_0 idef - A)#bx = #b0$ 有解的情况下,其解的空间的所有非0向量都是A 的属于$lam_0$的特征向量
这样可以总结求特征值和特征向量的步骤:
1. 求矩阵的特征多项式的根
2. 对于每一个根$lam_0$,求解其构成的齐次线性方程组的基础解系
3. 基础解系所张成的空间中的所有非0向量,都是矩阵的属于$lam_0$的特征向量
由步骤3.可知,从属于同一个特征值$lam_0$的特征向量,不一定就是共线的,齐次线性方程组的解的空间的基,是线性无关的,但是他们都是从属于$lam_0$的特征向量
= 矩阵对角化的条件
根据特征值定义,可以将@a7 表述为:$exists avecs$, 这是一个线性无关的向量组,使得$P=avecs, #inv[P]A P = diag{larr}$. 其中$lam_i 是 ba_i$所属的特征值。对角矩阵$diag{larr}$称为A的#highlight()[相似标准形],不考虑对角线元素的排列次序,$A$的相似标准形是唯一的
#let bb = $bold(b)$
#let bvecs = $(bb_1, bb_2, ..., bb_n)$
== 定理,设$lam_1 != lam_2$ 并且 $lam_1, lam_2$ 是$A_n$的特征值,$avecs, bvecs$分别是从属于$lam_1, lam_2$的向量,并且它们(向量组)线性无关。则$avecs, bvecs$ 线性无关
证明:
该定理是要证明以下等式:
$
avecs bold(k) + bvecs bold(l) = avecs vec(k_1, k_2, ..., k_n) + bvecs vec(l_1, l_2, ..., l_n) = b0
$ <a8>
中系数向量$bold(k), bold(l)$ 全为#b0. @a8 两侧同时左乘$A$:
$
A avecs bold(k) + A bvecs bold(l) = b0 =>\
lam_1 avecs bold(k) + lam_2 bvecs bold(l) = b0
$ <a9>
$because lam_1 != lam_2$, 故 $lam_1, lam_2$ 不会全为0,设$lam_2$ 不为0,则@a8 左侧同乘以$lam_2$:
$
lam_2 avecs bold(k) + lam_2 bvecs bold(l) = b0
$ <a10>
用@a10 - @a9 :
$
(lam_2 - lam_1)avecs bold(k) = b0 => \
(lam_2 - lam_1) k_1 ba_1 + (lam_2 - lam_1) k_2 ba_12 + ... + (lam_2 - lam_1) k_n ba_n
$
因为$avecs$ 线性无关 且 $lam_1 != lam_2 => bold(k) = b0$,将其代入@a8 中:
$
bvecs bold(l) = b0
$
因为$bvecs$线性无关,故而$bold(l) = b0$ 从而得出@a8 中各项系数均为0,从而$avecs, bvecs$ 中各向量线性无关 |
|
https://github.com/Kasci/LiturgicalBooks | https://raw.githubusercontent.com/Kasci/LiturgicalBooks/master/CSL_old/oktoich/Hlas4/2_Utorok.typ | typst | #let V = (
"HV": (
("", "Zvánnyj svýše", "Chananéji porevnovávši, dušé, prikosnísja Christú sozadí, i vzyváj čásťi: pomíluj mjá, o Vladýko! Ďítišče ímam, bisnújuščujusja plóť bezčínnuju, otžení razžžénije ot nejá, moľúsja, i utolív bezčínnaja vzyhránija, mértvu stráchom tvojím soverší, molítvami prečísto začénšija i róždšija ťá Christé, i vsích svjatých, blahodáteľu mnohomílostive."),
("", "", "Ninevíťanom inohdá sohrišívšym Jónu poslál jesí Christé propovídati sím, íže pokájavšesja, járosť v blahosérdije preložíša, izbavľájemi ot hubíteľnaho hňíva. Poslí úbo, čelovikoľúbče, i mňí nedostójnomu deržávnuju tvojú pómošč, da obraščúsja ot bezčíslennych mojích sohrišénij, i na stezjú pokajánija nastávlen búdu, i pláču steňá hórci, mnóhich mojích prehrišénij izbávitisja mílostiju tvojéju."),
("", "", "V mír prišédyj, vo jéže spastí čelovíki sohrišájuščyja, i k pokajániju sích prizváti, jáko blahoutróben, i mené, ščédre, páče vsích tebé prohňívavšaho uščédriv, spasí mja rádi bláhosti, i na púť pokajánija nastávi mjá, i pómysl dážď mí umilénija, utverdív sérdce smirénno, i prósto, i krótko, nekovárno, Spáse mój, bláhostiju tvojéju, jáko blahoutróben."),
("", "", "Imíjaj ko Hóspodu derznovénije, roždénnych ženámi vsích Predtéče prevoschoďáj, tohó molí neprestánno o víroju moľáščichsja tí, obraščénije nám dáti, i vinú pokajánija: jáko da ťá vospivájem spasájemi vsehdá."),
("", "", "Narečén býl jesí prorók ot ložésn, i ot utróby propovídnik, Predtéče i apóstole prišéstvija Hospódňa: bisóm úbo prédana mjá súšča, i hrichú rabá mnohoďíjstvenna, ot oboích mjá isprávi, jáko krípkij vójin, da tvojé skóroje propovíduju zastuplénije."),
("", "", "Lopáta sýj Dúcha božéstvennaho, plevovídnyja nrávy razvíj ot sérdca mojehó, ďijánija božéstvennaja ot mené sobirája, jáko pšenícu v žítnicu Bóžiju, jáko da píšča Vladýci blahopotrébna búdu, tobóju chodátajem obohaščájem, Christóv Krestíteľu blažénne."),
("Bohoródičen", "", "Slézy mí dážď ot sérdca, i vozdychánije iz hlubiný Otrokovíce, i duší sokrušénije, i ispovídanije, jáže v žitií soďíjannaja mnóju prehrišénija: da tvojéju pómoščiju vsečístaja, v pokajániji prejdú žízň mojú, i ulučú oslablénije."),
),
"S": (
("", "", "Choťích slezámi omýti mojích prehrišénij, Hóspodi, rukopisánije, i próčeje životá mojehó, pokajánijem blahouhodíti tebí: no vráh ľstít mjá, i bóret dúšu mojú. Hóspodi, préžde dáže do koncá ne pohíbnu, spasí mja."),
("", "", "Któ oburevájem, i pritekája ko pristánišču semú ne spasétsja? Ilí któ nedúhuja, i pripádaja ko vračevstvú semú, ne uvračújetsja, soďíteľu vsjáčeskich, i vračú nedúžnych? Hóspodi, préžde dáže do koncá ne pohíbnu, spasí mja."),
("", "", "Íže svjatých múčenik prijémyj terpínije, i ot nás prijimí pínije čelovikoľúbče: i dáruj nám ťích molítvami véliju mílosť."),
("Bohoródičen", "", "Izbávi nás ot núžd nášich, Máti Christá Bóha, róždšaja vsích tvorcá, da vsí vopijém tí: rádujsja jedíno predstáteľstvo dúš nášich."),
),
)
#let P = (
"1": (
("", "", "Mórja čermnúju pučínu nevlážnymi stopámi drévnij pišešéstvovav Izráiľ, krestoobráznyma Mojséjovyma rukáma, Amalíkovu sílu v pustýni pobidíl jésť."),
("", "", "Jáže jedína v napástech i skórbech zaščiščájuščaja, pod króv tvój prečístaja pribihájuščich tépľi, prijimí jáko preblahája, jáže ot sérdca nášeho molénija."),
("", "", "Pristánišče nevlájemoje obritóch ťá okajánnyj, napástnyja že i núždnyja prilóhi otrivája, blahodárnoje pojú ti vospivánije, Bohomúžnaja Bohorodíteľnice."),
("", "", "Mílostivnym i krótkim tvojím ókom Bohorodíteľnice, zrjášči mjá vo obstojániji i skórbi oderžíma, vskóri svobodí: ťá bo prizyváju na pómošč."),
("", "", "Jéva osuždénija izbávisja i Adám tobóju čístaja, s nímiže i áz pripádaju tí: pečáľnyja mí slézy nýňi na rádosť preloží, i ot napástej svobodí."),
),
"3": (
("", "", "Lúk síľnych iznemóže, i nemoščstvújuščiji prepojásašasja síloju: sehó rádi utverdísja v Hóspoďi sérdce mojé."),
("", "", "Orúžije krípko, i sťínu ťá sťažáv áz, pobiždáju soprotívnych polkí: i pojú velíčija tvojá, Bohoródice neiskusobráčnaja."),
("", "", "Péšč razorjáješi pečálej, i pohašáješi otčájanija znój: któ bo táko, jákože tý Ďívo Bohoródice, upovánije náše?"),
("", "", "Vnuší vópľ rabá tvojehó, tvojejá trébujuščaho pómošči Bohomáti: upovánije mojé, uslýši mjá, i potščísja spastí mja."),
("", "", "Prízri čístaja, spastí mja: nébo božéstvennym mánijem vsjá soderžáščaho voplotíla jesí, Bóžije Slóvo, páče slóva i smýsla."),
),
"4": (
("", "", "Vozneséna ťá víďivši cérkov na kresťí, sólnce právednoje, stá v číňi svojém, dostójno vzyvájušči: sláva síľi tvojéj Hóspodi."),
("", "", "Pobíždši vraždújuščich mňí vsúje, jáko dúšu mojú tščáščichsja ľúťi prijáti, sochraní mja Vladýčice nenavítna, da rádujasja slávľu ťá."),
("", "", "Izbavľájušči mjá ot jazýka ľstivohlahólivaho, jáko blahája predstáteľnica, bezpákostna pokaží ot žitéjskich ďijánij: mnóho bo móžeši, jáko Máti ziždíteľa súšči."),
("", "", "Bezboľíznenu vídyj ťá cilébnicu nemoščnýj, Dúchom i ustý zovú: iscilí mja Vladýčice, pomíluj i spasí mja, k tebí bo pribiháju ráb tvój."),
("", "", "Jáko pochvalú ánhelov i čelovíkov ťá vospivájem vsí Ďívo Maríje, i vírno mólimsja: molísja Vladýčice, ot vsjákija skórbi izbávitisja nám."),
),
"5": (
("", "", "Tý Hóspodi mój, svít v mír prišél jesí, svít svjatýj, obraščájaj iz mráčna nevíďinija, víroju vospivájuščyja ťá."),
("", "", "Isprávi čístaja, molítvu rabá tvojehó ko Hóspodu Sýnu tvojemú: da obrjášču razrišénije mnóhich prehrišénij."),
("", "", "Izbávi mjá strastéj i bíd Bohonevísto: ťá bo položí Bóh k nemú chodátaicu o mojém smiréniji."),
("", "", "Pokrovíteľnica mňí tý jesí i neprestánnoje chvalénije, o Vladýčice Bohoródice, ne prézriši bo nikákože oderžímaho v pečálech."),
("", "", "Nýňi isprosí nám prehrišénij ostavlénije, i izbávi ot napástej, i strastéj nečístych, molítvami tvojími prepítaja."),
),
"6": (
("", "", "Požrú ti so hlásom chvalénija Hóspodi, cérkov vopijét tí, ot bisóvskija króve očíščšisja, rádi mílosti ot rébr tvojích istékšeju króviju."),
("", "", "Kríposť mojá samá jesí prečístaja Vladýčice, vo obrítšich mjá ziló nenačájannych skórbech, i vopijú ti: jáko vélija jesí pomóščnica rabú tvojemú."),
("", "", "Iscilí dušévnyja mojá jázvy Vladýčice, zastupí mja Ďívo, i izbávi rabá tvojehó ot oklevetánija, navíta že i razvraščénija neprávedna."),
("", "", "Sokruší navítniki neprávednyja, íže na mjá, prísno pribihájuščaho k tebí čístaja, i ne ostávi mené pohíbnuti, jáko vsjá tebí vozmóžna, Bohootrokovíce."),
("", "", "Uspí duší mojejá svirípuju vólnu, jáko mnóžestvo prehrišénij, iskušénija i pečáli vostáša na mjá: no samá mja Vladýčice spasí."),
),
"S": (
("", "", "V króv tvój Ďívo, vsí pribihájušče vopijém tí: moľbú prijimí ot nás, i ne prestáj moľáščisja čelovikoľúbcu, spastísja rabóm tvojím."),
),
"7": (
("", "", "Spasýj vo ohní Avraámskija tvojá ótroki, i chaldéji ubív, jáže právda právedno ulovľáše, prepítyj Hóspodi Bóže otéc nášich, blahoslovén jesí."),
("", "", "Jéže ot Ahárjan nasílovanije skóro potréblši mečém molítv tvojích Maríje, ľúdi i stádo tvojé sochraní, Sýnu tvojemú zovúščeje: Bóže otéc nášich blahoslovén jesí."),
("", "", "Ravnoľípnaja skínije, prijimí mja k tebí pribihájuščaho, da ne priímet mjá vráh pohubíti izhoňája, pojúšča Sýnu tvojemú Bohomáti: otéc nášich Bóže blahoslovén jesí."),
("", "", "Bohorodíteľnice Maríje, predvarí rabá tvojehó vskóri, v trevolnénijich napástej potopľájemaho, i ne imúšča pómošči. K tebí bo zovú: upovánije mojé Bohoródice, pomíluj mjá."),
("", "", "Čelovíčeskija napásti, jáko hrichóm vinóvny, nýňi Bohoródice blahája, razorí božéstvennymi molítvami tvojími, i rabý tvojá izbávi boľíznennych prehrišénij i vsjákija napásti."),
),
"8": (
("", "", "Izbáviteľu vsích vsesíľne, posreďí plámene blahočéstvovavšyja, snizšéd orosíl jesí, i naučíl jesí píti: vsjá ďilá blahoslovíte , pójte Hóspoda."),
("", "", "Vostá na ný jazýk bezzakónen, chvaľásja pohubíti služíteli tvojá, jehóže potrébľši prečístaja, zovúščyja pokrýj: vsjá ďilá blahoslovíte Hospódňa Hóspoda."),
("", "", "Mnóhija tvojá ščedróty jedína Bohomáti, nás mílostivno spasájut ot hrichóvnaho sudá i razlíčnych napástej: tý bo róždši Bóha, i míluješi mír jehó."),
("", "", "Na molénije mojé nýňi umilosérdisja, i rádosť mí v pečáli místo dáruj, da pojú ťa Vladýčice, i vopijú Sýnu tvojemú: vsjá ďilá blahoslovíte Hospódňa Hóspoda."),
("", "", "Jáko tý mňí jesí kríposť i pomóščnica, ne ubojúsja vrahóv nehodovánija, no vospiváju ťá Vladýčice, i vopijú Sýnu tvojemú: vsjá ďilá blahoslovíte Hospódňa Hóspoda."),
),
"9": (
("", "", "Jéva úbo nedúhom preslušánija kľátvu vselíla jésť: tý že Ďívo Bohoródice, prozjabénijem črevonošénija, mírovi blahoslovénije procvilá jesí. Ťím ťá vsí veličájem."),
("", "", "Orúžije úbo na ný obostrív, soviščavájet ľstívyj arávľanin bezzakónnyj: tý že Ďívo Bohoródice, síloju krestá Sýna tvojehó, i molítv tvojích, vooružáješi na nehó rabý tvojá: ťímže propovídajem slávu tvojú."),
("", "", "Kríposť úbo tý mňí na vrahí dadésja, i izbavlénije v napástech: čtó že tí áz prinesú čístaja? Ne dovím. Obáče, jéže ímam, blahodarénije prinošú ti Vladýčice: prijimí sijé ot rabá tvojehó, i spasí mja."),
("", "", "O Máti vsjáčeskich tvorcá! O vsečístaja, skorbjáščich uťícho, potopľájemych predstáteľnice, i pobiždajémych zastúpnice, do životá mojehó tý mja sochraní."),
("", "", "Uťisňájem hrichí mnóhimi prepítaja, i napásťmi ľútymi, nýňi tebí chvalénija žértvu prinošú, i priľížno vzyváju tí: svjatája Bohoródice, pomozí mi, tebé bo slávja, písň skončaváju."),
),
)
#let U = (
"S1": (
("", "", "Smirénnuju mojú dúšu posití Hóspodi, vo hresích žitijé vsé iždívšuju: jákože bludnícu prijimí i mené, i spasí mja."),
("", "", "Preplávaja pučínu nastojáščaho žitijá, pomyšľáju bézdnu mnóhich mojích zól, i ne imíja kórmčija pomyšlénij, Petróv proviščaváju tí hlás: spasí mja Christé Bóže, spasí mja, jáko čelovikoľúbec."),
("Bohoródičen", "", "Jákože súščaja voístinnu Bohoródica, moľáščisja jáko Máti so derznovénijem Sýnu tvojemú i Bóhu nášemu, sochraňáj hrád izrjádno k pokróvu tvojemú pritekájuščij, o tebí deržávu imúščij, i k tebí pribihájuščij, pristánišču i sťiňí, jedíňij predstáteľnici róda čelovíčeskaho."),
),
"S2": (
("", "", "Mhlóju strastéj i žitéjskimi slasťmí, pomračájem úm okajánnyja mojejá duší, k pómyslu umilénija ne prichódit: no uščédri Spáse i mené okajánnaho, i dážď mí pómysl umilénija, da i áz préžde koncá vopijú blahoutróbiju tvojemú Hóspodi: Christé Spáse mój, otčájannaho spasí mja i nedostójnaho."),
("", "", "Skóro sovnídem v nevístnik Christóv, da vsí uslýšim blažénnyj hlás Christá Bóha nášeho: prijidíte ľúbjaščiji nebésnuju slávu, sopričástnicy bývše múdrym ďívam, prosvitívše sviščý náša víroju."),
("", "", "Krestóm vooružéni strástonóscy tvoí Christé Bóže náš, pobidíša koznovánija načalozlóbnaho vrahá, i vozsijáša jáko svitíla zemných nastavľájušče, i podajút iscilénija víroju prosjáščym: ťích molítvami spasí dúšy náša."),
("Bohoródičen", "", "Slóvo Ótčeje Christá Bóha nášeho, iz tebé voplotívšahosja, poznáchom Bohoródice Ďívo, jedína čístaja, jedína blahoslovénnaja: ťím neprestánno ťá vospivájušče veličájem."),
),
"S3": (
("", "", "Dušé, pokájsja préžde ischóda tvojehó, súd neumýtnyj sohrišájuščym jésť i nepostojánen, vozopíj ko Hóspodu umilénijem sérdca: sohriších v rázumi i nevíďiniji ščédre, molítvami Krestíteľa tvojehó, uščédri i spasí mja."),
("", "", "Hórlica pustynnoľúbnaja, svjáščénnyj Krestíteľ, propovídavyj pokajánije, i pokazávyj Christá bývša čelovíka, vsím sohrišájuščym býsť predstáteľ, i vsím oburevájemym pomóščnik byvája prísnyj: tohó molítvami Christé, spasí mír tvój."),
("Bohoródičen", "", "Obnovíla jesí čístaja, božéstvennym roždestvóm tvojím, istľívšeje vo strastéch zemnoródnych mértvennoje suščestvó, i vozdvíhla jesí vsjá ot smérti k životú netľínija: ťímže ťá po dólhu blažím vsí Ďívo preproslávlennaja, jákože proreklá jesí."),
),
"K": (
"P1": (
"1": (
("", "", "<NAME>, i faraóna mučíteľa pohruzívyj v móri, ľúdi spásl jesí iz rabóty, moiséjski pojúščyja písň pobídnuju : jáko proslávisja."),
("", "", "Sokrovénno ďíjuščaho ďilá ťmý, Hóspodi da ne jávi obličíši, ni posramíši pred vsími: no svítom prosvití ískrenňaho pokajánija Spáse, i Spasí mja."),
("", "", "Hrichí vsehdá na hrichí Vladýko, sovokupľáju blúdnyj, i ne čúvstvuju strácha tvojehó nikohdáže Hóspodi: ťímže préžde koncá spasí i uščédri mjá."),
("Múčeničen", "", "Ščitóm blahočéstija pokryvájemi svjatíji, deržášče jáko méč krestnoje orúžije, k boréniju vrahá slávniji izydóste, i tohó nizložíste."),
("Múčeničen", "", "Krovopíjic ľvóv, i mečá sikúščaho, i varénija konóbnaho, strohánija nohtéj, terzánija že i boľíznennaho mučénija, múčenicy božéstvenniji ne ubojášasja."),
("Bohoródičen", "", "Kovčéh božéstvennym Dúchom pozlaščénnyj, prečístaja, pokazásja: ne skrižáli nosjášč zakóna, no Christá Hóspoda, jehóže zakón i prorócy drévle predvozvistíša."),
),
"2": (
("", "", "Tristáty krípkija, roždéjsja ot Ďívy, bezstrástija vo hlubiňí, duší tričástnoje potopí, moľúsja: da tebí jáko v timpáňi, vo umerščvléniji ťilesé, pobídnoje vospojú pínije."),
("", "", "Jáko velíkaja zvizdá sólncu predtekíj, prosvitíl jesí zémľu svítlosťmi tvojími Krestíteľu. Ťímže zovú ti: prosvití mojé sérdce, oslepľínnoje ot bezčíslennych prehrišénij ľútymi omračéniji."),
("", "", "Razrišívyj inohdá blažénne, v roždéniji neplódstvija úzy, ťímže ťá moľú, bezplódstvijem zapusťívšuju dúšu mojú strastéj, pokaží molítvami tvojími plodíteľnu, dobroďítelej blahočádije prinosjáščuju."),
("", "", "Uhotóval jesí putí Izbáviteľu, predchoďáj v síľi Ilijiňí, prisnoslávne Krestíteľu: k nemúže mojejá duší dvižénije isprávi, soblázny vsjákija, i plámeň strastéj izimája molítvami tvojími."),
("Bohoródičen", "", "Óblače svítlyj, duší mojejá óblaki témnyja i ľútyja tvojími svítlymi chodátajstvy razorí: jáko da vížu zarjú iz tebé vozsijávšaho, i svítom svít prijimú nezachodímyj."),
),
),
"P3": (
"1": (
("", "", "Utverždájaj hróm, i sozidájaj dúch, utverdí mené Hóspodi, da ťá pojú ístinno, i tvorjú vóľu tvojú: jáko ňísť svját, jáko tý Bóže náš."),
("", "", "Íže sľipcév óči prosvitívyj, Christé, óči mojí prosvití omračénniji slasťmí, i žitéjskimi pečáľmi, i nikákože k suďbám tvojím vzirájuščiji."),
("", "", "Sé vrémja, vozníkni dušé mojá, ot zól, jáže soďíjala jesí, i Vladýci izbáviteľu vozopíj so stráchom: pokajánija Christé, dvéri otvérzi mí."),
("Múčeničen", "", "Othnán javísja Velijár božéstvennymi pódvihi strastotérpec, i ot ních popirájem zrítsja mértv i neďíjstven, íže drévle chvaľájsja."),
("Múčeničen", "", "Múčeničeski tečénije soveršívše svjatých soslóvije, i ťmý mýslennych múrinov, božéstvennoju síloju jáko voístinnu posičé, i slávu polučí."),
("Bohoródičen", "", "Práotcem razríšila jesí pečáľ, rádosť nám róždši žiznodávca, i izbáviteľa presvjatája Bohoródice: jehóže priľížno molí, spastí dúšy náša."),
),
"2": (
("", "", "Lúk síľnych iznemóže, i nemoščstvújuščiji prepojásašasja síloju: sehó rádi utverdísja v Hóspoďi sérdce mojé."),
("", "", "Vsjáku dobroďítel ispólnil jesí, vsjáku že zlóbu ot sérdca voznenavíďil jesí, i stezjú pokajánija čelovíkom blažénne, pokazál jesí."),
("", "", "Slóva voplóščšahosja Predtéča velíkij pokazálsja jesí. Sehó rádi moľúsja tí: bezslovésnych mjá strastéj izbávi, nastavľája mjá k bezstrástiju."),
("", "", "Ješčé žíteľstvuja v ťilesí, žitijé bezplótnych pokazál jesí Predtéče: jemúže upodóbitisja molítvami tvojími Bohonóse, i nás ukripí, mólimsja."),
("Bohoródičen", "", "Mír tobóju pomílovasja, íže prestuplénijem nepotrében býsť, Máti Ďívo: sehó rádi v pínijich pésnennych po dólhu ťá ublážájet."),
),
),
"P4": (
"1": (
("", "", "Uslýšach Bóže slúch tvój, i ubojáchsja, razumích ďilá tvojá, i užasóchsja Hóspodi: jáko tvojehó chvalénija ispólň zemľá."),
("", "", "Obnažén bých dobroďítelej, i zlóboju oblekóchsja, i sé studá ispólnichsja, Iisúse čelovikoľúbče: odéždami mjá božéstvennymi prosvití."),
("", "", "Preplávaja mirskáho mórja Slóve, vódu, ľínostiju v bidú istoplénija vpadóchsja slastéj ťilésnych: k pokajánija pristánišču naprávi mjá."),
("Múčeničen", "", "Očístivše voístinnu hnój vés hrichá terpínija božéstvennoju síloju dóbliji múčenicy, spasénije vsím podáša."),
("Múčeničen", "", "Vaľájemi po zemlí jákože kámenije strastotérpcy, prélesti tvérdyja do koncá nizverhóša, i k výšnemu hrádu dospíša: ťích molítvami Hóspodi spasí nás."),
("Bohoródičen", "", "Spasénije ťá na vsjákoje vrémja i místo prizyváju: ne prézri mené vseneporóčnaja, jáže Bóha róždšaja, Izbáviteľa vkúpi i Spása mojehó."),
),
"2": (
("", "", "Ľubvé rádi ščédre, tvojehó óbraza, na kresťí tvojém stál jesí i rastájašasja jazýcy: tý bo jesí čelovikoľúbče, kríposť mojá i chvalénije."),
("", "", "Jáko hórlicu ťá, vésnu ístinnuju, vseístinnymi slovesý predvozviščájuščuju mírovi, razumívše, ublážájem prísno, slávne Predtéče."),
("", "", "Sokrušénna mjá ľstívaho sokrušéňmi, vétchomu i nóvomu jáko sýj chodátaj, vsehó obnoví molítvami tvojími Predtéče."),
("", "", "Íže v pustýňu vselívyjsja neporóčnym žitijém, opusťívšij vsjákimi prestupléňmi úm mój, božéstvennymi molítvami tvojími obnoví Predtéče."),
("Bohoródičen", "", "Očiščénije nám i izbavlénije poznásja tvój Sýn Ďívo: jehóže molí spastí dúšy vo umiléniji ťá blažáščich."),
),
),
"P5": (
"1": (
("", "", "Vozsijáj mí Hóspodi, svít povelénij tvojích, jáko k tebé dúch mój útreňuet, i pojét ťá: tý bo jesí Bóh náš, i k tebí pribiháju carjú míra."),
("", "", "Unýnijem prechoďáščaho žitijé tľíjuščeje, i prélesťmi mjá omračájema ot preléstnika po vsjá dní, Iisúse uščédri, i k svítu pokajánija nastávi i žízni."),
("", "", "Voznesésja sérdce mojé prilóhmi zmíja, i nizpadésja padénijem vélijim: íže nizvéržennym Iisúse, ispravlénije, vozstávi i spasí mja, mnóhich tvojích rádi ščedrót."),
("Múčeničen", "", "Kápľami krovéj uhasíste mnohobóžija prélesti péšč, Bohoblažénniji, i túčami iscilénij plámeň utišíste strastéj vsehdá, Spásovy stradáľcy."),
("Múčeničen", "", "Stojášče pred sudíščem, i nohťmí strúžemi, i vo hlavý usekájemi múčenicy, i mnóžestvu primešájuščesja ľútych múk, nepreklónni prebýste manovénijem božéstvennym."),
("Bohoródičen", "", "Vozsijáj mí Vladýčice, zarjú mílosti tvojejá, íže vo mráci prehrišénij mojích súšču Ďívo: i k svítu pokajánija nastávi mjá prečístaja, da víroju ťá pojú."),
),
"2": (
("", "", "Prosviščénije tvojé Hóspodi, nizposlí nám, i ot mhlý prehrišénij razriší ný bláže, tvój mír dárujaj."),
("", "", "Pustýnnymi mjá úhľmi, strastéj nachoždéňmi raspalájema, pustýnnoje vospitánije, rosóju tvojích molítv, sích vréda sobľudí nevreždénna."),
("", "", "Ot tvojejá vseblažénne, svjatýja desnícy kreščájetsja Otcá božéstvennaja Desníca, spasájuščaja nás ot rukí ľstívaho, svjaščénnymi chodátajstvy tvojími."),
("", "", "Pribížišče ťá Predtéče, i pokróv deržáven, i velíkuju sťínu vés mír ímať: izbávi nás tvojími molítvami ot vsjákija ťisnotý."),
("Bohoródičen", "", "Dobrótu ťá Jákovľu vozľubí Bóh, Ďívo otrokovíce, ukrašájušč vsjá tobóju, omračívšyjasja prestuplénijem pérvije."),
),
),
"P6": (
"1": (
("", "", "Pučínoju žitéjskoju ďijáňmi mojími snidóch vo ád, no jáko ot kíta Jóna, táko vopijú: iz hlubiný zól vozvedí, moľúsja, Sýne Bóžij i Slóve."),
("", "", "Dremánijem nebrežénija oťahotích, okajánnyj, dúšu, i hrichá snóm nizložíchsja: k svítu pokajánija vozdvíhni mjá Hóspodi, i tvojím milosérdijem spasí mja."),
("", "", "Káko padóch okajánnyj? Káko udalíchsja Bóha preblaháho? Káko ne vnemľú v čúvstviji strášnoje sudíšče óno, na némže ímam sudítisja? Tvórče mój, uščédri mjá."),
("Múčeničen", "", "Civníca javístesja, voístinnu vozhlašájuščaja pínije spasíteľnoje prísno, i naslaždájuščaja vírnych serdcá, i pijánstvo prélesti do koncá ohoňájuščaja, stradáľcy presvítliji."),
("Múčeničen", "", "Prevozšédše preďíly čelovíčeskija múčenicy Christóvy k ziždíteľu vozniknovénijem božéstvennym, mučénija boľízni preterpíste rádujuščesja, jáko v ťilesích čuždích."),
("Bohoródičen", "", "Vsesvjatája Ďívo, predstáteľnice i pokróve vsích vírnych, predstáni i izbávi mjá preščénija búduščaho, i strášnaho sudíšča v čás súdnyj, da víroju prísno pojú ťá."),
),
"2": (
("", "", "Prijidóch vo hlubiný morskíja, i potopíla mjá jésť búrja mnóhich hrichóv: no jáko Bóh iz hlubiný vozvedí živót mój mnohomílostive."),
("", "", "Stojáše kreščája v bystrinách Vladýku, hrichí vsích čelovíkov vzémľuščaho: jehóže molíti ne prestáj Predtéče, uščédriti dúšy náša."),
("", "", "Propovídnik pokazálsja jesí pokajánija, v némže sobľudí Predtéče mojé sérdce, oskvernénnoje vrédnymi hrichí, i vozniknovénija ne imúščeje."),
("", "", "Vozhlasíl jesí blažénne, dušám v pustýňach neprochodímych, Slóva prišéstvije choťáščeje býti: ťímže hlásy nemólčnymi vsjákaja cérkov blážít ťá."),
("Bohoródičen", "", "Zakóna izjasníšasja óbrazy, tvojím strášnym roždestvóm Bohonevísto: íchže sbytijé mý nýňi zrjášče Vladýčice, po dostojániju ťá čtím."),
),
),
"P7": (
"1": (
("", "", "Óbrazu zlatómu ne poklonívšesja ótrocy avraámstiji, iskušáchusja jáko zláto v horníľi v peščí óhnenňij, jáko v čertózi svítľim likováchu, pojúšče: blahoslovén jesí Bóže otéc nášich."),
("", "", "Júno otročá javílsja jesí Christé, vétchaho osuždénija izbáviti choťá mír, jáko blahoutróben. Ťímže vopijú ti, obetšávšaho mjá hrichí mnóhimi nýňi obnoví ščédre, i spasí mja pojúšča: blahoslovén Bóh otéc nášich."),
("", "", "Íže inohdá Manassíju pokájavšasja spasýj, i uščédrivyj bludnícu proslezívšujusja, i razbójnika slóvom opravdávyj, mnóhaja i ľútaja sohrišívšaho tí, i mené Spáse prijimí vopijúšča: blahoslovén Bóh otéc nášich."),
("Múčeničen", "", "Búri ľúťij mnohobóžija obderžáščej vselénnuju, korábľ sotvórše blahočéstija strastotérpcy: okormlénijem že Christóvym, ko pristánišču žízni doplývše vopijéte: blahoslovén Bóh otéc nášich."),
("Múčeničen", "", "Prosviščéni bývše jávi, jákože zláto v horníľi, múkami iskušájemi stradáľcy, i pokazávšesja zapečátanija čestnája strástéj Christóvych, v sokróviščach nebésnych, vo utverždéniji mnózi sokrovéni býša nýňi."),
("Bohoródičen", "", "Spása i Bóha, i Izbáviteľa i Vladýku, plótiju róždši prečístaja Vladýčice, tomú prísno prečístaja, molísja, jáko da razrišénije ľútych i mnóhich hrichóv ostavlénije priímše, slavoslóvim tohó jáže páče umá ščedróty."),
),
"2": (
("", "", "Avraámstiji inohdá v Vavilóňi ótrocy, péščnyj plámeň popráša, písňmi vzyvájušče: otéc nášich Bóže blahoslovén jesí."),
("", "", "Bólšij vsích roždénnych javílsja jesí proróče, Bóhu veľmí sohrišájušča mjá, veličájšeju molítvoju tvojéju, plámene velíkaho izbávi, i víčnyja ťmý, jáko da ublážáju ťá."),
("", "", "Neplódnaja javíchsja smokóvnica, i posičénija bojúsja: utverdí mja chodátajstvom tvojím, Predtéče Spásov, i plodovíta sotvorí, jáko da ublažáju ťá."),
("", "", "Izbáviteľu vsích vsesíľne, posreďí plámene blahočéstvovavšyja, snizšéd orosíl jesí, i naučíl jesí píti: vsjá ďilá blahoslovíte , pójte Hóspoda."),
("Bohoródičen", "", "Nachoždénija lukávaho i části, Ďívo, i rabóty bisóvskija sochraní rabý tvojá, íže dušéju ťá i jazýkom prísno slávjaščyja."),
),
),
"P8": (
"1": (
("", "", "Vo ohní plámenňim predstoját tebí Cheruvími, Serafími , Hóspodi, i vsjá tvár písň tebí pojét krásnuju: pójte, blahoslovíte , ľúdije prevoznosíte Christá, jedínaho soďíteľa, vo vsjá víki."),
("", "", "Ne prebých vo strási tvojém, ne poslúšach zápovidej tvojích, i vóľu tvojú nikohdáže sotvorích: čtó búdu okajánnyj? Čelovikoľubív sýj, uščédri mjá túne, Spáse, i ne otvérži mené."),
("", "", "Ďílateľu dóbrych, vopijú ti: strácha tvojehó serpóm, požní iz kórene vsjá ternóvnaja pomyšlénija duší mojejá okajánnyja: i símenem pokajánija prozjabáti mí spodóbi Christé, spasíteľnyj klás."),
("Múčeničen", "", "Rasprostraníšasja blahodátiju, uťisňájemi v múkach mnóhich strastonóscy, i sťisníša vrahú putí própastej ispólneny, i nýňi nastavľájut nás k putém Bóžijim vo víri i ľubví."),
("Múčeničen", "", "Bidú priját ľstívyj, vpád vo hlubinú, múčenicy, terpínija i stradánija vášeho, i ležít ot vsích nasmivájem bezúmnyj: vý že pobídnymi vincý ukrašájetesja."),
("Bohoródičen", "", "Črévo tvojé vseneporóčnaja, stóh čestnáho humná javísja, míru nosjá pšenícu životá, pitájušču vsjáčeskaja. Ťímže ťá jáko vinóvnu vsích dóbrych, vírniji po dostojániju ublažájem."),
),
"2": (
("", "", "Izbáviteľu vsích vsesíľne, posreďí plámene blahočéstvovavšyja, snizšéd orosíl jesí, i naučíl jesí píti: vsjá ďilá blahoslovíte , pójte Hóspoda."),
("", "", "Unýnija mjá snóm oderžíma, i mhlóju zlóby pomračájema, svítloju molítvoju tvojéju isprávi Predtéče, i dážď jáko vo dní dobroďítelej blahoobrázno chodíti."),
("", "", "Iskušénij mjá búrja obderžít, i strastéj volná smuščájet mjá: rúku mí podážď Predtéče, vozvoďá ko pristánišču pokajánija, duší mojejá korábľ molítvami tvojími."),
("", "", "Íže vzémľuščaho míru prehrišénija, v ričných vodách krestíl jesí, zól mojích bézdnu izsuší strujámi molítv tvojích, blažénne Joánne Predtéče."),
("", "", "Víďiv Dúcha svjatáho, slýšal jesí hlás Rodítelev, sviďíteľstvujušč Predtéče, tobóju neizrečénno kreščájemomu Iisúsu: jehóže molí spastí nás."),
("Bohoródičen", "", "Jáko istóčnik nášeho obnovlénija, sokrušénnaho mjá priražéňmi zmíjevymi, vsehó obnoví: jáko da víroju i ľubóviju ťá ublážáju, Bohoródice Ďívo vseneporóčnaja."),
),
),
"P9": (
"1": (
("", "", "Sotvorí deržávu mýšceju svojéju, nizloží bo síľnyja so prestól, i voznesé smirénnyja Bóh Izráilev: v níchže posití nás vostók s vysotý, i naprávil ný jésť na púť míra."),
("", "", "Sé otvérzesja čertóh tájnyj, i múdriji ukrasívše sviščý svojá jeléjem dobroďítelej, vchóďat svítli. Otloží són unýnija, o dušé, jáko da vnídeši so Christóm sviščú nosjášči."),
("", "", "Jákože bludníca deržú nózi tvojí mýslenno, i slezámi omyváju sích Slóve. Omýj mjá Spáse, ot timínija strastéj: víra tvojá spásé ťa, nýňi i mňí prihlasív, jáko da tvojé bezčíslennoje pojú milosérdije."),
("Múčeničen", "", "Vesélym sérdcem i rádostnoju dušéju múčenicy vo výšnich živút, jázvy Christóvy jákože krasotú blahoľípija prísno imúšče: i nám míra isprošájut, i ľútych izbavlénije, i prehrišénij razrišénije."),
("Múčeničen", "", "Osvjatísja vsjáko místo, imúščeje božéstvenniji stradáľcy móšči váša, jákože druhíj kovčéh, íže vo Izráiľi izbavľájušč ľútych: rádujutsja nebésnaja, s čestnými ánhely, dúšy váša blažénniji sťažávša."),
("Bohoródičen", "", "Blahoľubívaja otrokovíce, blahoľubívaho Bóha róždšaja, vopijú ti: ubláží okajánnuju mojú dúšu, ozlóblennuju ľúťi strasťmí i prilóhmi lukávych bisóv, da víroju ťá pojú nadéždu vsích."),
),
"2": (
("", "", "Jéva úbo nedúhom preslušánija kľátvu vselíla jésť, tý že Ďívo Bohoródice, prozjabénijem črevonošénija mírovi blahoslovénije procvilá jesí: ťím ťá vsí veličájem."),
("", "", "Kríposť mojá i pénije <NAME>óď: jehóže molí blažénne Predtéče, na strásti mjá ukripíti, i na vsjákija prilóhi bisóvskija: i dážď božéstvennuju ďílati vóľu, jáko da ťá ľubóviju ublážáju prísno."),
("", "", "Krásnaja hórlica, i lástovica sladkohlahólivaja javílsja jesí božéstvennyj predtéče, vésnu vozviščájuščaja božéstvennuju Christá: jehóže molí, izbáviti mjá zimý dušetľínnyja i búri hrichóvnyja, moľúsja tí."),
("", "", "Vzyhrávsja v ložesnách máternich, vozvistíl jesí ot Ďívy vozsijávšaho: tohó molí, plotskája mojá dvizánija umertvíti, umerščvľájuščaja mjá, i ispólniti rádosti sérdce mojé, jáko da pojú ťa božéstvennyj Predtéče."),
("", "", "Súd nemílostiv dušé, mílosti ne tvorjáščym, zrí i vnimáj: jeléj prijimí, sviščú tvojú prosviščájuščij, i sobľudí neuhašénnu. Približájetsja ženích, bódrstvuj, da neuhašájemo ímaši proizvolénije."),
("Bohoródičen", "", "blahoľubívaho róždši Bóha, blahoľubívaja Bohoródice, tohó molí, vsjákija mjá izbáviti zlóby, i k tomú da sotvorít sérdce račíteľno, plotskóje sladostrástije voznenavíditi: da v písnech veličáju ťá."),
),
),
),
"ST": (
("", "", "Omýj mjá slezámi moími Spáse, jáko oskverníchsja mnóhimi hrichí. Ťímže i pripádaju tí: sohriších, Bóže, i pomíluj mjá."),
("", "", "Ovčá jésm slovésnaho tvojehó stáda, i k tebí pribiháju pástyrju dóbromu, vzyščí mené zablúždšaho, Bóže, i pomíluj mjá."),
("Múčeničen", "", "Ánhelom sopričástnicy býste svjatíji múčenicy, na sudíšči Christá múžeski propovídavše: vsjá bo jáže v míri ostáviste krásnaja, jáko ne súšča, víru že jáko nadéždu tvérdu uderžáste. Ťímže i lésť othnávše, istočájete vírnym iscilénij darovánija, neprestánno moľáščesja, spastísja dušám nášym."),
("Bohoródičen", "", "Ot vsích bíd rabý tvojá sochraňáj, blahoslovénnaja Bohoródice: da ťá slávim, nadéždu dúš nášich."),
)
)
#let L = (
"B": (
("", "", "Drévom Adám rajá býsť izselén: drévom že krestnym razbójnik v ráj vselísja. Óv úbo vkúš, zápoviď otvérže sotvóršaho: óv že sraspinájem, Bóha ispovída tajáščahosja, pomjaní mja, vopijá, vo cárstviji tvojém."),
("", "", "Íže Petróv pláč, i bludnícy slézy prijémyj Slóve, i mytarjá tóčiju vozdochnúvša, uščédril jesí Christé, jáko blahoutróben: i mené pripádajušča i prosjášča prehrišénij proščénija, pomíluj Hóspodi preblahíj, i izbávi víčnyja múki."),
("", "", "Íže neplódstvija úzy razrišívyj velíkij Predtéče, neplódije mojehó smirénnaho sérdca razriší: i prinosíti sotvorí dobroďítelnaja ďijánija chodátajstvom tvojím, ímiže vosprijimú píšču neiždivájemuju, vzyvája Christú: pomjaní mja Spáse, jehdá priídeši vo cárstviji tvojém."),
("", "", "Sokrušájemi múkami, i zvirém v sňíď vdavájemi múdriji, i ssicájemi, i vo hlubinú morskúju vmetájemi, vseslávniji múčenicy, ohném sožihájemi, i óstrymi orúžiji strúžemi, Bóha ne otverhóstesja: u nehóže isprosíte nám svjatíji míra, i prosviščénija, i vélija mílosti."),
("", "", "Otcá, i Sýna, i Dúcha svjatáho, vsí vírniji jedinomúdrenno mólim, slavoslóviti dostójno jedínstvo Božestvá, v trijéch súšče ipostásich, nesmísno prebyvájuščeje, prósto, nerazďíľno i nepristúpno: ímže izbavľájemsja óhnennaho mučénija."),
("", "", "Sobeznačáľnaho Otcú, i svjatómu Dúchu soprestóľna, priját vo utróbi, i páče umá i slóva rodilá jesí, bývša čelovíka, za blahoďíjanije čelovíčestvu, <NAME>vístnaja, vmistílišče prostránnoje Bóha nášeho: jehóže molí priľížno, spastísja rabóm tvojím."),
)
) |
|
https://github.com/name1e5s/typst-font-awesome | https://raw.githubusercontent.com/name1e5s/typst-font-awesome/main/fa.typ | typst | MIT License |
#let fa(name) = {
text(
font: "Font Awesome 6 Free Solid",
box[ #name ]
)
}
#let fa-0 = fa(symbol("\u{30}"))
#let fa-1 = fa(symbol("\u{31}"))
#let fa-2 = fa(symbol("\u{32}"))
#let fa-3 = fa(symbol("\u{33}"))
#let fa-4 = fa(symbol("\u{34}"))
#let fa-5 = fa(symbol("\u{35}"))
#let fa-6 = fa(symbol("\u{36}"))
#let fa-7 = fa(symbol("\u{37}"))
#let fa-8 = fa(symbol("\u{38}"))
#let fa-9 = fa(symbol("\u{39}"))
#let fa-42-group = fa(symbol("\u{e080}"))
#let fa-500px = fa(symbol("\u{f26e}"))
#let fa-a = fa(symbol("\u{41}"))
#let fa-accessible-icon = fa(symbol("\u{f368}"))
#let fa-accusoft = fa(symbol("\u{f369}"))
#let fa-address-book = fa(symbol("\u{f2b9}"))
#let fa-address-card = fa(symbol("\u{f2bb}"))
#let fa-adn = fa(symbol("\u{f170}"))
#let fa-adversal = fa(symbol("\u{f36a}"))
#let fa-affiliatetheme = fa(symbol("\u{f36b}"))
#let fa-airbnb = fa(symbol("\u{f834}"))
#let fa-algolia = fa(symbol("\u{f36c}"))
#let fa-align-center = fa(symbol("\u{f037}"))
#let fa-align-justify = fa(symbol("\u{f039}"))
#let fa-align-left = fa(symbol("\u{f036}"))
#let fa-align-right = fa(symbol("\u{f038}"))
#let fa-alipay = fa(symbol("\u{f642}"))
#let fa-amazon = fa(symbol("\u{f270}"))
#let fa-amazon-pay = fa(symbol("\u{f42c}"))
#let fa-amilia = fa(symbol("\u{f36d}"))
#let fa-anchor = fa(symbol("\u{f13d}"))
#let fa-anchor-circle-check = fa(symbol("\u{e4aa}"))
#let fa-anchor-circle-exclamation = fa(symbol("\u{e4ab}"))
#let fa-anchor-circle-xmark = fa(symbol("\u{e4ac}"))
#let fa-anchor-lock = fa(symbol("\u{e4ad}"))
#let fa-android = fa(symbol("\u{f17b}"))
#let fa-angellist = fa(symbol("\u{f209}"))
#let fa-angle-down = fa(symbol("\u{f107}"))
#let fa-angle-left = fa(symbol("\u{f104}"))
#let fa-angle-right = fa(symbol("\u{f105}"))
#let fa-angle-up = fa(symbol("\u{f106}"))
#let fa-angles-down = fa(symbol("\u{f103}"))
#let fa-angles-left = fa(symbol("\u{f100}"))
#let fa-angles-right = fa(symbol("\u{f101}"))
#let fa-angles-up = fa(symbol("\u{f102}"))
#let fa-angrycreative = fa(symbol("\u{f36e}"))
#let fa-angular = fa(symbol("\u{f420}"))
#let fa-ankh = fa(symbol("\u{f644}"))
#let fa-app-store = fa(symbol("\u{f36f}"))
#let fa-app-store-ios = fa(symbol("\u{f370}"))
#let fa-apper = fa(symbol("\u{f371}"))
#let fa-apple = fa(symbol("\u{f179}"))
#let fa-apple-pay = fa(symbol("\u{f415}"))
#let fa-apple-whole = fa(symbol("\u{f5d1}"))
#let fa-archway = fa(symbol("\u{f557}"))
#let fa-arrow-down = fa(symbol("\u{f063}"))
#let fa-arrow-down-1-9 = fa(symbol("\u{f162}"))
#let fa-arrow-down-9-1 = fa(symbol("\u{f886}"))
#let fa-arrow-down-a-z = fa(symbol("\u{f15d}"))
#let fa-arrow-down-long = fa(symbol("\u{f175}"))
#let fa-arrow-down-short-wide = fa(symbol("\u{f884}"))
#let fa-arrow-down-up-across-line = fa(symbol("\u{e4af}"))
#let fa-arrow-down-up-lock = fa(symbol("\u{e4b0}"))
#let fa-arrow-down-wide-short = fa(symbol("\u{f160}"))
#let fa-arrow-down-z-a = fa(symbol("\u{f881}"))
#let fa-arrow-left = fa(symbol("\u{f060}"))
#let fa-arrow-left-long = fa(symbol("\u{f177}"))
#let fa-arrow-pointer = fa(symbol("\u{f245}"))
#let fa-arrow-right = fa(symbol("\u{f061}"))
#let fa-arrow-right-arrow-left = fa(symbol("\u{f0ec}"))
#let fa-arrow-right-from-bracket = fa(symbol("\u{f08b}"))
#let fa-arrow-right-long = fa(symbol("\u{f178}"))
#let fa-arrow-right-to-bracket = fa(symbol("\u{f090}"))
#let fa-arrow-right-to-city = fa(symbol("\u{e4b3}"))
#let fa-arrow-rotate-left = fa(symbol("\u{f0e2}"))
#let fa-arrow-rotate-right = fa(symbol("\u{f01e}"))
#let fa-arrow-trend-down = fa(symbol("\u{e097}"))
#let fa-arrow-trend-up = fa(symbol("\u{e098}"))
#let fa-arrow-turn-down = fa(symbol("\u{f149}"))
#let fa-arrow-turn-up = fa(symbol("\u{f148}"))
#let fa-arrow-up = fa(symbol("\u{f062}"))
#let fa-arrow-up-1-9 = fa(symbol("\u{f163}"))
#let fa-arrow-up-9-1 = fa(symbol("\u{f887}"))
#let fa-arrow-up-a-z = fa(symbol("\u{f15e}"))
#let fa-arrow-up-from-bracket = fa(symbol("\u{e09a}"))
#let fa-arrow-up-from-ground-water = fa(symbol("\u{e4b5}"))
#let fa-arrow-up-from-water-pump = fa(symbol("\u{e4b6}"))
#let fa-arrow-up-long = fa(symbol("\u{f176}"))
#let fa-arrow-up-right-dots = fa(symbol("\u{e4b7}"))
#let fa-arrow-up-right-from-square = fa(symbol("\u{f08e}"))
#let fa-arrow-up-short-wide = fa(symbol("\u{f885}"))
#let fa-arrow-up-wide-short = fa(symbol("\u{f161}"))
#let fa-arrow-up-z-a = fa(symbol("\u{f882}"))
#let fa-arrows-down-to-line = fa(symbol("\u{e4b8}"))
#let fa-arrows-down-to-people = fa(symbol("\u{e4b9}"))
#let fa-arrows-left-right = fa(symbol("\u{f07e}"))
#let fa-arrows-left-right-to-line = fa(symbol("\u{e4ba}"))
#let fa-arrows-rotate = fa(symbol("\u{f021}"))
#let fa-arrows-spin = fa(symbol("\u{e4bb}"))
#let fa-arrows-split-up-and-left = fa(symbol("\u{e4bc}"))
#let fa-arrows-to-circle = fa(symbol("\u{e4bd}"))
#let fa-arrows-to-dot = fa(symbol("\u{e4be}"))
#let fa-arrows-to-eye = fa(symbol("\u{e4bf}"))
#let fa-arrows-turn-right = fa(symbol("\u{e4c0}"))
#let fa-arrows-turn-to-dots = fa(symbol("\u{e4c1}"))
#let fa-arrows-up-down = fa(symbol("\u{f07d}"))
#let fa-arrows-up-down-left-right = fa(symbol("\u{f047}"))
#let fa-arrows-up-to-line = fa(symbol("\u{e4c2}"))
#let fa-artstation = fa(symbol("\u{f77a}"))
#let fa-asterisk = fa(symbol("\u{2a}"))
#let fa-asymmetrik = fa(symbol("\u{f372}"))
#let fa-at = fa(symbol("\u{40}"))
#let fa-atlassian = fa(symbol("\u{f77b}"))
#let fa-atom = fa(symbol("\u{f5d2}"))
#let fa-audible = fa(symbol("\u{f373}"))
#let fa-audio-description = fa(symbol("\u{f29e}"))
#let fa-austral-sign = fa(symbol("\u{e0a9}"))
#let fa-autoprefixer = fa(symbol("\u{f41c}"))
#let fa-avianex = fa(symbol("\u{f374}"))
#let fa-aviato = fa(symbol("\u{f421}"))
#let fa-award = fa(symbol("\u{f559}"))
#let fa-aws = fa(symbol("\u{f375}"))
#let fa-b = fa(symbol("\u{42}"))
#let fa-baby = fa(symbol("\u{f77c}"))
#let fa-baby-carriage = fa(symbol("\u{f77d}"))
#let fa-backward = fa(symbol("\u{f04a}"))
#let fa-backward-fast = fa(symbol("\u{f049}"))
#let fa-backward-step = fa(symbol("\u{f048}"))
#let fa-bacon = fa(symbol("\u{f7e5}"))
#let fa-bacteria = fa(symbol("\u{e059}"))
#let fa-bacterium = fa(symbol("\u{e05a}"))
#let fa-bag-shopping = fa(symbol("\u{f290}"))
#let fa-bahai = fa(symbol("\u{f666}"))
#let fa-baht-sign = fa(symbol("\u{e0ac}"))
#let fa-ban = fa(symbol("\u{f05e}"))
#let fa-ban-smoking = fa(symbol("\u{f54d}"))
#let fa-bandage = fa(symbol("\u{f462}"))
#let fa-bandcamp = fa(symbol("\u{f2d5}"))
#let fa-bangladeshi-taka-sign = fa(symbol("\u{e2e6}"))
#let fa-barcode = fa(symbol("\u{f02a}"))
#let fa-bars = fa(symbol("\u{f0c9}"))
#let fa-bars-progress = fa(symbol("\u{f828}"))
#let fa-bars-staggered = fa(symbol("\u{f550}"))
#let fa-baseball = fa(symbol("\u{f433}"))
#let fa-baseball-bat-ball = fa(symbol("\u{f432}"))
#let fa-basket-shopping = fa(symbol("\u{f291}"))
#let fa-basketball = fa(symbol("\u{f434}"))
#let fa-bath = fa(symbol("\u{f2cd}"))
#let fa-battery-empty = fa(symbol("\u{f244}"))
#let fa-battery-full = fa(symbol("\u{f240}"))
#let fa-battery-half = fa(symbol("\u{f242}"))
#let fa-battery-quarter = fa(symbol("\u{f243}"))
#let fa-battery-three-quarters = fa(symbol("\u{f241}"))
#let fa-battle-net = fa(symbol("\u{f835}"))
#let fa-bed = fa(symbol("\u{f236}"))
#let fa-bed-pulse = fa(symbol("\u{f487}"))
#let fa-beer-mug-empty = fa(symbol("\u{f0fc}"))
#let fa-behance = fa(symbol("\u{f1b4}"))
#let fa-bell = fa(symbol("\u{f0f3}"))
#let fa-bell-concierge = fa(symbol("\u{f562}"))
#let fa-bell-slash = fa(symbol("\u{f1f6}"))
#let fa-bezier-curve = fa(symbol("\u{f55b}"))
#let fa-bicycle = fa(symbol("\u{f206}"))
#let fa-bilibili = fa(symbol("\u{e3d9}"))
#let fa-bimobject = fa(symbol("\u{f378}"))
#let fa-binoculars = fa(symbol("\u{f1e5}"))
#let fa-biohazard = fa(symbol("\u{f780}"))
#let fa-bitbucket = fa(symbol("\u{f171}"))
#let fa-bitcoin = fa(symbol("\u{f379}"))
#let fa-bitcoin-sign = fa(symbol("\u{e0b4}"))
#let fa-bity = fa(symbol("\u{f37a}"))
#let fa-black-tie = fa(symbol("\u{f27e}"))
#let fa-blackberry = fa(symbol("\u{f37b}"))
#let fa-blender = fa(symbol("\u{f517}"))
#let fa-blender-phone = fa(symbol("\u{f6b6}"))
#let fa-blog = fa(symbol("\u{f781}"))
#let fa-blogger = fa(symbol("\u{f37c}"))
#let fa-blogger-b = fa(symbol("\u{f37d}"))
#let fa-bluetooth = fa(symbol("\u{f293}"))
#let fa-bluetooth-b = fa(symbol("\u{f294}"))
#let fa-bold = fa(symbol("\u{f032}"))
#let fa-bolt = fa(symbol("\u{f0e7}"))
#let fa-bolt-lightning = fa(symbol("\u{e0b7}"))
#let fa-bomb = fa(symbol("\u{f1e2}"))
#let fa-bone = fa(symbol("\u{f5d7}"))
#let fa-bong = fa(symbol("\u{f55c}"))
#let fa-book = fa(symbol("\u{f02d}"))
#let fa-book-atlas = fa(symbol("\u{f558}"))
#let fa-book-bible = fa(symbol("\u{f647}"))
#let fa-book-bookmark = fa(symbol("\u{e0bb}"))
#let fa-book-journal-whills = fa(symbol("\u{f66a}"))
#let fa-book-medical = fa(symbol("\u{f7e6}"))
#let fa-book-open = fa(symbol("\u{f518}"))
#let fa-book-open-reader = fa(symbol("\u{f5da}"))
#let fa-book-quran = fa(symbol("\u{f687}"))
#let fa-book-skull = fa(symbol("\u{f6b7}"))
#let fa-book-tanakh = fa(symbol("\u{f827}"))
#let fa-bookmark = fa(symbol("\u{f02e}"))
#let fa-bootstrap = fa(symbol("\u{f836}"))
#let fa-border-all = fa(symbol("\u{f84c}"))
#let fa-border-none = fa(symbol("\u{f850}"))
#let fa-border-top-left = fa(symbol("\u{f853}"))
#let fa-bore-hole = fa(symbol("\u{e4c3}"))
#let fa-bots = fa(symbol("\u{e340}"))
#let fa-bottle-droplet = fa(symbol("\u{e4c4}"))
#let fa-bottle-water = fa(symbol("\u{e4c5}"))
#let fa-bowl-food = fa(symbol("\u{e4c6}"))
#let fa-bowl-rice = fa(symbol("\u{e2eb}"))
#let fa-bowling-ball = fa(symbol("\u{f436}"))
#let fa-box = fa(symbol("\u{f466}"))
#let fa-box-archive = fa(symbol("\u{f187}"))
#let fa-box-open = fa(symbol("\u{f49e}"))
#let fa-box-tissue = fa(symbol("\u{e05b}"))
#let fa-boxes-packing = fa(symbol("\u{e4c7}"))
#let fa-boxes-stacked = fa(symbol("\u{f468}"))
#let fa-braille = fa(symbol("\u{f2a1}"))
#let fa-brain = fa(symbol("\u{f5dc}"))
#let fa-brazilian-real-sign = fa(symbol("\u{e46c}"))
#let fa-bread-slice = fa(symbol("\u{f7ec}"))
#let fa-bridge = fa(symbol("\u{e4c8}"))
#let fa-bridge-circle-check = fa(symbol("\u{e4c9}"))
#let fa-bridge-circle-exclamation = fa(symbol("\u{e4ca}"))
#let fa-bridge-circle-xmark = fa(symbol("\u{e4cb}"))
#let fa-bridge-lock = fa(symbol("\u{e4cc}"))
#let fa-bridge-water = fa(symbol("\u{e4ce}"))
#let fa-briefcase = fa(symbol("\u{f0b1}"))
#let fa-briefcase-medical = fa(symbol("\u{f469}"))
#let fa-broom = fa(symbol("\u{f51a}"))
#let fa-broom-ball = fa(symbol("\u{f458}"))
#let fa-brush = fa(symbol("\u{f55d}"))
#let fa-btc = fa(symbol("\u{f15a}"))
#let fa-bucket = fa(symbol("\u{e4cf}"))
#let fa-buffer = fa(symbol("\u{f837}"))
#let fa-bug = fa(symbol("\u{f188}"))
#let fa-bug-slash = fa(symbol("\u{e490}"))
#let fa-bugs = fa(symbol("\u{e4d0}"))
#let fa-building = fa(symbol("\u{f1ad}"))
#let fa-building-circle-arrow-right = fa(symbol("\u{e4d1}"))
#let fa-building-circle-check = fa(symbol("\u{e4d2}"))
#let fa-building-circle-exclamation = fa(symbol("\u{e4d3}"))
#let fa-building-circle-xmark = fa(symbol("\u{e4d4}"))
#let fa-building-columns = fa(symbol("\u{f19c}"))
#let fa-building-flag = fa(symbol("\u{e4d5}"))
#let fa-building-lock = fa(symbol("\u{e4d6}"))
#let fa-building-ngo = fa(symbol("\u{e4d7}"))
#let fa-building-shield = fa(symbol("\u{e4d8}"))
#let fa-building-un = fa(symbol("\u{e4d9}"))
#let fa-building-user = fa(symbol("\u{e4da}"))
#let fa-building-wheat = fa(symbol("\u{e4db}"))
#let fa-bullhorn = fa(symbol("\u{f0a1}"))
#let fa-bullseye = fa(symbol("\u{f140}"))
#let fa-burger = fa(symbol("\u{f805}"))
#let fa-buromobelexperte = fa(symbol("\u{f37f}"))
#let fa-burst = fa(symbol("\u{e4dc}"))
#let fa-bus = fa(symbol("\u{f207}"))
#let fa-bus-simple = fa(symbol("\u{f55e}"))
#let fa-business-time = fa(symbol("\u{f64a}"))
#let fa-buy-n-large = fa(symbol("\u{f8a6}"))
#let fa-buysellads = fa(symbol("\u{f20d}"))
#let fa-c = fa(symbol("\u{43}"))
#let fa-cable-car = fa(symbol("\u{f7da}"))
#let fa-cake-candles = fa(symbol("\u{f1fd}"))
#let fa-calculator = fa(symbol("\u{f1ec}"))
#let fa-calendar = fa(symbol("\u{f133}"))
#let fa-calendar-check = fa(symbol("\u{f274}"))
#let fa-calendar-day = fa(symbol("\u{f783}"))
#let fa-calendar-days = fa(symbol("\u{f073}"))
#let fa-calendar-minus = fa(symbol("\u{f272}"))
#let fa-calendar-plus = fa(symbol("\u{f271}"))
#let fa-calendar-week = fa(symbol("\u{f784}"))
#let fa-calendar-xmark = fa(symbol("\u{f273}"))
#let fa-camera = fa(symbol("\u{f030}"))
#let fa-camera-retro = fa(symbol("\u{f083}"))
#let fa-camera-rotate = fa(symbol("\u{e0d8}"))
#let fa-campground = fa(symbol("\u{f6bb}"))
#let fa-canadian-maple-leaf = fa(symbol("\u{f785}"))
#let fa-candy-cane = fa(symbol("\u{f786}"))
#let fa-cannabis = fa(symbol("\u{f55f}"))
#let fa-capsules = fa(symbol("\u{f46b}"))
#let fa-car = fa(symbol("\u{f1b9}"))
#let fa-car-battery = fa(symbol("\u{f5df}"))
#let fa-car-burst = fa(symbol("\u{f5e1}"))
#let fa-car-on = fa(symbol("\u{e4dd}"))
#let fa-car-rear = fa(symbol("\u{f5de}"))
#let fa-car-side = fa(symbol("\u{f5e4}"))
#let fa-car-tunnel = fa(symbol("\u{e4de}"))
#let fa-caravan = fa(symbol("\u{f8ff}"))
#let fa-caret-down = fa(symbol("\u{f0d7}"))
#let fa-caret-left = fa(symbol("\u{f0d9}"))
#let fa-caret-right = fa(symbol("\u{f0da}"))
#let fa-caret-up = fa(symbol("\u{f0d8}"))
#let fa-carrot = fa(symbol("\u{f787}"))
#let fa-cart-arrow-down = fa(symbol("\u{f218}"))
#let fa-cart-flatbed = fa(symbol("\u{f474}"))
#let fa-cart-flatbed-suitcase = fa(symbol("\u{f59d}"))
#let fa-cart-plus = fa(symbol("\u{f217}"))
#let fa-cart-shopping = fa(symbol("\u{f07a}"))
#let fa-cash-register = fa(symbol("\u{f788}"))
#let fa-cat = fa(symbol("\u{f6be}"))
#let fa-cc-amazon-pay = fa(symbol("\u{f42d}"))
#let fa-cc-amex = fa(symbol("\u{f1f3}"))
#let fa-cc-apple-pay = fa(symbol("\u{f416}"))
#let fa-cc-diners-club = fa(symbol("\u{f24c}"))
#let fa-cc-discover = fa(symbol("\u{f1f2}"))
#let fa-cc-jcb = fa(symbol("\u{f24b}"))
#let fa-cc-mastercard = fa(symbol("\u{f1f1}"))
#let fa-cc-paypal = fa(symbol("\u{f1f4}"))
#let fa-cc-stripe = fa(symbol("\u{f1f5}"))
#let fa-cc-visa = fa(symbol("\u{f1f0}"))
#let fa-cedi-sign = fa(symbol("\u{e0df}"))
#let fa-cent-sign = fa(symbol("\u{e3f5}"))
#let fa-centercode = fa(symbol("\u{f380}"))
#let fa-centos = fa(symbol("\u{f789}"))
#let fa-certificate = fa(symbol("\u{f0a3}"))
#let fa-chair = fa(symbol("\u{f6c0}"))
#let fa-chalkboard = fa(symbol("\u{f51b}"))
#let fa-chalkboard-user = fa(symbol("\u{f51c}"))
#let fa-champagne-glasses = fa(symbol("\u{f79f}"))
#let fa-charging-station = fa(symbol("\u{f5e7}"))
#let fa-chart-area = fa(symbol("\u{f1fe}"))
#let fa-chart-bar = fa(symbol("\u{f080}"))
#let fa-chart-column = fa(symbol("\u{e0e3}"))
#let fa-chart-gantt = fa(symbol("\u{e0e4}"))
#let fa-chart-line = fa(symbol("\u{f201}"))
#let fa-chart-pie = fa(symbol("\u{f200}"))
#let fa-chart-simple = fa(symbol("\u{e473}"))
#let fa-check = fa(symbol("\u{f00c}"))
#let fa-check-double = fa(symbol("\u{f560}"))
#let fa-check-to-slot = fa(symbol("\u{f772}"))
#let fa-cheese = fa(symbol("\u{f7ef}"))
#let fa-chess = fa(symbol("\u{f439}"))
#let fa-chess-bishop = fa(symbol("\u{f43a}"))
#let fa-chess-board = fa(symbol("\u{f43c}"))
#let fa-chess-king = fa(symbol("\u{f43f}"))
#let fa-chess-knight = fa(symbol("\u{f441}"))
#let fa-chess-pawn = fa(symbol("\u{f443}"))
#let fa-chess-queen = fa(symbol("\u{f445}"))
#let fa-chess-rook = fa(symbol("\u{f447}"))
#let fa-chevron-down = fa(symbol("\u{f078}"))
#let fa-chevron-left = fa(symbol("\u{f053}"))
#let fa-chevron-right = fa(symbol("\u{f054}"))
#let fa-chevron-up = fa(symbol("\u{f077}"))
#let fa-child = fa(symbol("\u{f1ae}"))
#let fa-child-combatant = fa(symbol("\u{e4e0}"))
#let fa-child-dress = fa(symbol("\u{e59c}"))
#let fa-child-reaching = fa(symbol("\u{e59d}"))
#let fa-children = fa(symbol("\u{e4e1}"))
#let fa-chrome = fa(symbol("\u{f268}"))
#let fa-chromecast = fa(symbol("\u{f838}"))
#let fa-church = fa(symbol("\u{f51d}"))
#let fa-circle = fa(symbol("\u{f111}"))
#let fa-circle-arrow-down = fa(symbol("\u{f0ab}"))
#let fa-circle-arrow-left = fa(symbol("\u{f0a8}"))
#let fa-circle-arrow-right = fa(symbol("\u{f0a9}"))
#let fa-circle-arrow-up = fa(symbol("\u{f0aa}"))
#let fa-circle-check = fa(symbol("\u{f058}"))
#let fa-circle-chevron-down = fa(symbol("\u{f13a}"))
#let fa-circle-chevron-left = fa(symbol("\u{f137}"))
#let fa-circle-chevron-right = fa(symbol("\u{f138}"))
#let fa-circle-chevron-up = fa(symbol("\u{f139}"))
#let fa-circle-dollar-to-slot = fa(symbol("\u{f4b9}"))
#let fa-circle-dot = fa(symbol("\u{f192}"))
#let fa-circle-down = fa(symbol("\u{f358}"))
#let fa-circle-exclamation = fa(symbol("\u{f06a}"))
#let fa-circle-h = fa(symbol("\u{f47e}"))
#let fa-circle-half-stroke = fa(symbol("\u{f042}"))
#let fa-circle-info = fa(symbol("\u{f05a}"))
#let fa-circle-left = fa(symbol("\u{f359}"))
#let fa-circle-minus = fa(symbol("\u{f056}"))
#let fa-circle-nodes = fa(symbol("\u{e4e2}"))
#let fa-circle-notch = fa(symbol("\u{f1ce}"))
#let fa-circle-pause = fa(symbol("\u{f28b}"))
#let fa-circle-play = fa(symbol("\u{f144}"))
#let fa-circle-plus = fa(symbol("\u{f055}"))
#let fa-circle-question = fa(symbol("\u{f059}"))
#let fa-circle-radiation = fa(symbol("\u{f7ba}"))
#let fa-circle-right = fa(symbol("\u{f35a}"))
#let fa-circle-stop = fa(symbol("\u{f28d}"))
#let fa-circle-up = fa(symbol("\u{f35b}"))
#let fa-circle-user = fa(symbol("\u{f2bd}"))
#let fa-circle-xmark = fa(symbol("\u{f057}"))
#let fa-city = fa(symbol("\u{f64f}"))
#let fa-clapperboard = fa(symbol("\u{e131}"))
#let fa-clipboard = fa(symbol("\u{f328}"))
#let fa-clipboard-check = fa(symbol("\u{f46c}"))
#let fa-clipboard-list = fa(symbol("\u{f46d}"))
#let fa-clipboard-question = fa(symbol("\u{e4e3}"))
#let fa-clipboard-user = fa(symbol("\u{f7f3}"))
#let fa-clock = fa(symbol("\u{f017}"))
#let fa-clock-rotate-left = fa(symbol("\u{f1da}"))
#let fa-clone = fa(symbol("\u{f24d}"))
#let fa-closed-captioning = fa(symbol("\u{f20a}"))
#let fa-cloud = fa(symbol("\u{f0c2}"))
#let fa-cloud-arrow-down = fa(symbol("\u{f0ed}"))
#let fa-cloud-arrow-up = fa(symbol("\u{f0ee}"))
#let fa-cloud-bolt = fa(symbol("\u{f76c}"))
#let fa-cloud-meatball = fa(symbol("\u{f73b}"))
#let fa-cloud-moon = fa(symbol("\u{f6c3}"))
#let fa-cloud-moon-rain = fa(symbol("\u{f73c}"))
#let fa-cloud-rain = fa(symbol("\u{f73d}"))
#let fa-cloud-showers-heavy = fa(symbol("\u{f740}"))
#let fa-cloud-showers-water = fa(symbol("\u{e4e4}"))
#let fa-cloud-sun = fa(symbol("\u{f6c4}"))
#let fa-cloud-sun-rain = fa(symbol("\u{f743}"))
#let fa-cloudflare = fa(symbol("\u{e07d}"))
#let fa-cloudscale = fa(symbol("\u{f383}"))
#let fa-cloudsmith = fa(symbol("\u{f384}"))
#let fa-cloudversify = fa(symbol("\u{f385}"))
#let fa-clover = fa(symbol("\u{e139}"))
#let fa-cmplid = fa(symbol("\u{e360}"))
#let fa-code = fa(symbol("\u{f121}"))
#let fa-code-branch = fa(symbol("\u{f126}"))
#let fa-code-commit = fa(symbol("\u{f386}"))
#let fa-code-compare = fa(symbol("\u{e13a}"))
#let fa-code-fork = fa(symbol("\u{e13b}"))
#let fa-code-merge = fa(symbol("\u{f387}"))
#let fa-code-pull-request = fa(symbol("\u{e13c}"))
#let fa-codepen = fa(symbol("\u{f1cb}"))
#let fa-codiepie = fa(symbol("\u{f284}"))
#let fa-coins = fa(symbol("\u{f51e}"))
#let fa-colon-sign = fa(symbol("\u{e140}"))
#let fa-comment = fa(symbol("\u{f075}"))
#let fa-comment-dollar = fa(symbol("\u{f651}"))
#let fa-comment-dots = fa(symbol("\u{f4ad}"))
#let fa-comment-medical = fa(symbol("\u{f7f5}"))
#let fa-comment-slash = fa(symbol("\u{f4b3}"))
#let fa-comment-sms = fa(symbol("\u{f7cd}"))
#let fa-comments = fa(symbol("\u{f086}"))
#let fa-comments-dollar = fa(symbol("\u{f653}"))
#let fa-compact-disc = fa(symbol("\u{f51f}"))
#let fa-compass = fa(symbol("\u{f14e}"))
#let fa-compass-drafting = fa(symbol("\u{f568}"))
#let fa-compress = fa(symbol("\u{f066}"))
#let fa-computer = fa(symbol("\u{e4e5}"))
#let fa-computer-mouse = fa(symbol("\u{f8cc}"))
#let fa-confluence = fa(symbol("\u{f78d}"))
#let fa-connectdevelop = fa(symbol("\u{f20e}"))
#let fa-contao = fa(symbol("\u{f26d}"))
#let fa-cookie = fa(symbol("\u{f563}"))
#let fa-cookie-bite = fa(symbol("\u{f564}"))
#let fa-copy = fa(symbol("\u{f0c5}"))
#let fa-copyright = fa(symbol("\u{f1f9}"))
#let fa-cotton-bureau = fa(symbol("\u{f89e}"))
#let fa-couch = fa(symbol("\u{f4b8}"))
#let fa-cow = fa(symbol("\u{f6c8}"))
#let fa-cpanel = fa(symbol("\u{f388}"))
#let fa-creative-commons = fa(symbol("\u{f25e}"))
#let fa-creative-commons-by = fa(symbol("\u{f4e7}"))
#let fa-creative-commons-nc = fa(symbol("\u{f4e8}"))
#let fa-creative-commons-nc-eu = fa(symbol("\u{f4e9}"))
#let fa-creative-commons-nc-jp = fa(symbol("\u{f4ea}"))
#let fa-creative-commons-nd = fa(symbol("\u{f4eb}"))
#let fa-creative-commons-pd = fa(symbol("\u{f4ec}"))
#let fa-creative-commons-pd-alt = fa(symbol("\u{f4ed}"))
#let fa-creative-commons-remix = fa(symbol("\u{f4ee}"))
#let fa-creative-commons-sa = fa(symbol("\u{f4ef}"))
#let fa-creative-commons-sampling = fa(symbol("\u{f4f0}"))
#let fa-creative-commons-sampling-plus = fa(symbol("\u{f4f1}"))
#let fa-creative-commons-share = fa(symbol("\u{f4f2}"))
#let fa-creative-commons-zero = fa(symbol("\u{f4f3}"))
#let fa-credit-card = fa(symbol("\u{f09d}"))
#let fa-critical-role = fa(symbol("\u{f6c9}"))
#let fa-crop = fa(symbol("\u{f125}"))
#let fa-crop-simple = fa(symbol("\u{f565}"))
#let fa-cross = fa(symbol("\u{f654}"))
#let fa-crosshairs = fa(symbol("\u{f05b}"))
#let fa-crow = fa(symbol("\u{f520}"))
#let fa-crown = fa(symbol("\u{f521}"))
#let fa-crutch = fa(symbol("\u{f7f7}"))
#let fa-cruzeiro-sign = fa(symbol("\u{e152}"))
#let fa-css3 = fa(symbol("\u{f13c}"))
#let fa-css3-alt = fa(symbol("\u{f38b}"))
#let fa-cube = fa(symbol("\u{f1b2}"))
#let fa-cubes = fa(symbol("\u{f1b3}"))
#let fa-cubes-stacked = fa(symbol("\u{e4e6}"))
#let fa-cuttlefish = fa(symbol("\u{f38c}"))
#let fa-d = fa(symbol("\u{44}"))
#let fa-d-and-d = fa(symbol("\u{f38d}"))
#let fa-d-and-d-beyond = fa(symbol("\u{f6ca}"))
#let fa-dailymotion = fa(symbol("\u{e052}"))
#let fa-dashcube = fa(symbol("\u{f210}"))
#let fa-database = fa(symbol("\u{f1c0}"))
#let fa-deezer = fa(symbol("\u{e077}"))
#let fa-delete-left = fa(symbol("\u{f55a}"))
#let fa-delicious = fa(symbol("\u{f1a5}"))
#let fa-democrat = fa(symbol("\u{f747}"))
#let fa-deploydog = fa(symbol("\u{f38e}"))
#let fa-deskpro = fa(symbol("\u{f38f}"))
#let fa-desktop = fa(symbol("\u{f390}"))
#let fa-dev = fa(symbol("\u{f6cc}"))
#let fa-deviantart = fa(symbol("\u{f1bd}"))
#let fa-dharmachakra = fa(symbol("\u{f655}"))
#let fa-dhl = fa(symbol("\u{f790}"))
#let fa-diagram-next = fa(symbol("\u{e476}"))
#let fa-diagram-predecessor = fa(symbol("\u{e477}"))
#let fa-diagram-project = fa(symbol("\u{f542}"))
#let fa-diagram-successor = fa(symbol("\u{e47a}"))
#let fa-diamond = fa(symbol("\u{f219}"))
#let fa-diamond-turn-right = fa(symbol("\u{f5eb}"))
#let fa-diaspora = fa(symbol("\u{f791}"))
#let fa-dice = fa(symbol("\u{f522}"))
#let fa-dice-d20 = fa(symbol("\u{f6cf}"))
#let fa-dice-d6 = fa(symbol("\u{f6d1}"))
#let fa-dice-five = fa(symbol("\u{f523}"))
#let fa-dice-four = fa(symbol("\u{f524}"))
#let fa-dice-one = fa(symbol("\u{f525}"))
#let fa-dice-six = fa(symbol("\u{f526}"))
#let fa-dice-three = fa(symbol("\u{f527}"))
#let fa-dice-two = fa(symbol("\u{f528}"))
#let fa-digg = fa(symbol("\u{f1a6}"))
#let fa-digital-ocean = fa(symbol("\u{f391}"))
#let fa-discord = fa(symbol("\u{f392}"))
#let fa-discourse = fa(symbol("\u{f393}"))
#let fa-disease = fa(symbol("\u{f7fa}"))
#let fa-display = fa(symbol("\u{e163}"))
#let fa-divide = fa(symbol("\u{f529}"))
#let fa-dna = fa(symbol("\u{f471}"))
#let fa-dochub = fa(symbol("\u{f394}"))
#let fa-docker = fa(symbol("\u{f395}"))
#let fa-dog = fa(symbol("\u{f6d3}"))
#let fa-dollar-sign = fa(symbol("\u{24}"))
#let fa-dolly = fa(symbol("\u{f472}"))
#let fa-dong-sign = fa(symbol("\u{e169}"))
#let fa-door-closed = fa(symbol("\u{f52a}"))
#let fa-door-open = fa(symbol("\u{f52b}"))
#let fa-dove = fa(symbol("\u{f4ba}"))
#let fa-down-left-and-up-right-to-center = fa(symbol("\u{f422}"))
#let fa-down-long = fa(symbol("\u{f309}"))
#let fa-download = fa(symbol("\u{f019}"))
#let fa-draft2digital = fa(symbol("\u{f396}"))
#let fa-dragon = fa(symbol("\u{f6d5}"))
#let fa-draw-polygon = fa(symbol("\u{f5ee}"))
#let fa-dribbble = fa(symbol("\u{f17d}"))
#let fa-dropbox = fa(symbol("\u{f16b}"))
#let fa-droplet = fa(symbol("\u{f043}"))
#let fa-droplet-slash = fa(symbol("\u{f5c7}"))
#let fa-drum = fa(symbol("\u{f569}"))
#let fa-drum-steelpan = fa(symbol("\u{f56a}"))
#let fa-drumstick-bite = fa(symbol("\u{f6d7}"))
#let fa-drupal = fa(symbol("\u{f1a9}"))
#let fa-dumbbell = fa(symbol("\u{f44b}"))
#let fa-dumpster = fa(symbol("\u{f793}"))
#let fa-dumpster-fire = fa(symbol("\u{f794}"))
#let fa-dungeon = fa(symbol("\u{f6d9}"))
#let fa-dyalog = fa(symbol("\u{f399}"))
#let fa-e = fa(symbol("\u{45}"))
#let fa-ear-deaf = fa(symbol("\u{f2a4}"))
#let fa-ear-listen = fa(symbol("\u{f2a2}"))
#let fa-earlybirds = fa(symbol("\u{f39a}"))
#let fa-earth-africa = fa(symbol("\u{f57c}"))
#let fa-earth-americas = fa(symbol("\u{f57d}"))
#let fa-earth-asia = fa(symbol("\u{f57e}"))
#let fa-earth-europe = fa(symbol("\u{f7a2}"))
#let fa-earth-oceania = fa(symbol("\u{e47b}"))
#let fa-ebay = fa(symbol("\u{f4f4}"))
#let fa-edge = fa(symbol("\u{f282}"))
#let fa-edge-legacy = fa(symbol("\u{e078}"))
#let fa-egg = fa(symbol("\u{f7fb}"))
#let fa-eject = fa(symbol("\u{f052}"))
#let fa-elementor = fa(symbol("\u{f430}"))
#let fa-elevator = fa(symbol("\u{e16d}"))
#let fa-ellipsis = fa(symbol("\u{f141}"))
#let fa-ellipsis-vertical = fa(symbol("\u{f142}"))
#let fa-ello = fa(symbol("\u{f5f1}"))
#let fa-ember = fa(symbol("\u{f423}"))
#let fa-empire = fa(symbol("\u{f1d1}"))
#let fa-envelope = fa(symbol("\u{f0e0}"))
#let fa-envelope-circle-check = fa(symbol("\u{e4e8}"))
#let fa-envelope-open = fa(symbol("\u{f2b6}"))
#let fa-envelope-open-text = fa(symbol("\u{f658}"))
#let fa-envelopes-bulk = fa(symbol("\u{f674}"))
#let fa-envira = fa(symbol("\u{f299}"))
#let fa-equals = fa(symbol("\u{3d}"))
#let fa-eraser = fa(symbol("\u{f12d}"))
#let fa-erlang = fa(symbol("\u{f39d}"))
#let fa-ethereum = fa(symbol("\u{f42e}"))
#let fa-ethernet = fa(symbol("\u{f796}"))
#let fa-etsy = fa(symbol("\u{f2d7}"))
#let fa-euro-sign = fa(symbol("\u{f153}"))
#let fa-evernote = fa(symbol("\u{f839}"))
#let fa-exclamation = fa(symbol("\u{21}"))
#let fa-expand = fa(symbol("\u{f065}"))
#let fa-expeditedssl = fa(symbol("\u{f23e}"))
#let fa-explosion = fa(symbol("\u{e4e9}"))
#let fa-eye = fa(symbol("\u{f06e}"))
#let fa-eye-dropper = fa(symbol("\u{f1fb}"))
#let fa-eye-low-vision = fa(symbol("\u{f2a8}"))
#let fa-eye-slash = fa(symbol("\u{f070}"))
#let fa-f = fa(symbol("\u{46}"))
#let fa-face-angry = fa(symbol("\u{f556}"))
#let fa-face-dizzy = fa(symbol("\u{f567}"))
#let fa-face-flushed = fa(symbol("\u{f579}"))
#let fa-face-frown = fa(symbol("\u{f119}"))
#let fa-face-frown-open = fa(symbol("\u{f57a}"))
#let fa-face-grimace = fa(symbol("\u{f57f}"))
#let fa-face-grin = fa(symbol("\u{f580}"))
#let fa-face-grin-beam = fa(symbol("\u{f582}"))
#let fa-face-grin-beam-sweat = fa(symbol("\u{f583}"))
#let fa-face-grin-hearts = fa(symbol("\u{f584}"))
#let fa-face-grin-squint = fa(symbol("\u{f585}"))
#let fa-face-grin-squint-tears = fa(symbol("\u{f586}"))
#let fa-face-grin-stars = fa(symbol("\u{f587}"))
#let fa-face-grin-tears = fa(symbol("\u{f588}"))
#let fa-face-grin-tongue = fa(symbol("\u{f589}"))
#let fa-face-grin-tongue-squint = fa(symbol("\u{f58a}"))
#let fa-face-grin-tongue-wink = fa(symbol("\u{f58b}"))
#let fa-face-grin-wide = fa(symbol("\u{f581}"))
#let fa-face-grin-wink = fa(symbol("\u{f58c}"))
#let fa-face-kiss = fa(symbol("\u{f596}"))
#let fa-face-kiss-beam = fa(symbol("\u{f597}"))
#let fa-face-kiss-wink-heart = fa(symbol("\u{f598}"))
#let fa-face-laugh = fa(symbol("\u{f599}"))
#let fa-face-laugh-beam = fa(symbol("\u{f59a}"))
#let fa-face-laugh-squint = fa(symbol("\u{f59b}"))
#let fa-face-laugh-wink = fa(symbol("\u{f59c}"))
#let fa-face-meh = fa(symbol("\u{f11a}"))
#let fa-face-meh-blank = fa(symbol("\u{f5a4}"))
#let fa-face-rolling-eyes = fa(symbol("\u{f5a5}"))
#let fa-face-sad-cry = fa(symbol("\u{f5b3}"))
#let fa-face-sad-tear = fa(symbol("\u{f5b4}"))
#let fa-face-smile = fa(symbol("\u{f118}"))
#let fa-face-smile-beam = fa(symbol("\u{f5b8}"))
#let fa-face-smile-wink = fa(symbol("\u{f4da}"))
#let fa-face-surprise = fa(symbol("\u{f5c2}"))
#let fa-face-tired = fa(symbol("\u{f5c8}"))
#let fa-facebook = fa(symbol("\u{f09a}"))
#let fa-facebook-f = fa(symbol("\u{f39e}"))
#let fa-facebook-messenger = fa(symbol("\u{f39f}"))
#let fa-fan = fa(symbol("\u{f863}"))
#let fa-fantasy-flight-games = fa(symbol("\u{f6dc}"))
#let fa-faucet = fa(symbol("\u{e005}"))
#let fa-faucet-drip = fa(symbol("\u{e006}"))
#let fa-fax = fa(symbol("\u{f1ac}"))
#let fa-feather = fa(symbol("\u{f52d}"))
#let fa-feather-pointed = fa(symbol("\u{f56b}"))
#let fa-fedex = fa(symbol("\u{f797}"))
#let fa-fedora = fa(symbol("\u{f798}"))
#let fa-ferry = fa(symbol("\u{e4ea}"))
#let fa-figma = fa(symbol("\u{f799}"))
#let fa-file = fa(symbol("\u{f15b}"))
#let fa-file-arrow-down = fa(symbol("\u{f56d}"))
#let fa-file-arrow-up = fa(symbol("\u{f574}"))
#let fa-file-audio = fa(symbol("\u{f1c7}"))
#let fa-file-circle-check = fa(symbol("\u{e5a0}"))
#let fa-file-circle-exclamation = fa(symbol("\u{e4eb}"))
#let fa-file-circle-minus = fa(symbol("\u{e4ed}"))
#let fa-file-circle-plus = fa(symbol("\u{e494}"))
#let fa-file-circle-question = fa(symbol("\u{e4ef}"))
#let fa-file-circle-xmark = fa(symbol("\u{e5a1}"))
#let fa-file-code = fa(symbol("\u{f1c9}"))
#let fa-file-contract = fa(symbol("\u{f56c}"))
#let fa-file-csv = fa(symbol("\u{f6dd}"))
#let fa-file-excel = fa(symbol("\u{f1c3}"))
#let fa-file-export = fa(symbol("\u{f56e}"))
#let fa-file-image = fa(symbol("\u{f1c5}"))
#let fa-file-import = fa(symbol("\u{f56f}"))
#let fa-file-invoice = fa(symbol("\u{f570}"))
#let fa-file-invoice-dollar = fa(symbol("\u{f571}"))
#let fa-file-lines = fa(symbol("\u{f15c}"))
#let fa-file-medical = fa(symbol("\u{f477}"))
#let fa-file-pdf = fa(symbol("\u{f1c1}"))
#let fa-file-pen = fa(symbol("\u{f31c}"))
#let fa-file-powerpoint = fa(symbol("\u{f1c4}"))
#let fa-file-prescription = fa(symbol("\u{f572}"))
#let fa-file-shield = fa(symbol("\u{e4f0}"))
#let fa-file-signature = fa(symbol("\u{f573}"))
#let fa-file-video = fa(symbol("\u{f1c8}"))
#let fa-file-waveform = fa(symbol("\u{f478}"))
#let fa-file-word = fa(symbol("\u{f1c2}"))
#let fa-file-zipper = fa(symbol("\u{f1c6}"))
#let fa-fill = fa(symbol("\u{f575}"))
#let fa-fill-drip = fa(symbol("\u{f576}"))
#let fa-film = fa(symbol("\u{f008}"))
#let fa-filter = fa(symbol("\u{f0b0}"))
#let fa-filter-circle-dollar = fa(symbol("\u{f662}"))
#let fa-filter-circle-xmark = fa(symbol("\u{e17b}"))
#let fa-fingerprint = fa(symbol("\u{f577}"))
#let fa-fire = fa(symbol("\u{f06d}"))
#let fa-fire-burner = fa(symbol("\u{e4f1}"))
#let fa-fire-extinguisher = fa(symbol("\u{f134}"))
#let fa-fire-flame-curved = fa(symbol("\u{f7e4}"))
#let fa-fire-flame-simple = fa(symbol("\u{f46a}"))
#let fa-firefox = fa(symbol("\u{f269}"))
#let fa-firefox-browser = fa(symbol("\u{e007}"))
#let fa-first-order = fa(symbol("\u{f2b0}"))
#let fa-first-order-alt = fa(symbol("\u{f50a}"))
#let fa-firstdraft = fa(symbol("\u{f3a1}"))
#let fa-fish = fa(symbol("\u{f578}"))
#let fa-fish-fins = fa(symbol("\u{e4f2}"))
#let fa-flag = fa(symbol("\u{f024}"))
#let fa-flag-checkered = fa(symbol("\u{f11e}"))
#let fa-flag-usa = fa(symbol("\u{f74d}"))
#let fa-flask = fa(symbol("\u{f0c3}"))
#let fa-flask-vial = fa(symbol("\u{e4f3}"))
#let fa-flickr = fa(symbol("\u{f16e}"))
#let fa-flipboard = fa(symbol("\u{f44d}"))
#let fa-floppy-disk = fa(symbol("\u{f0c7}"))
#let fa-florin-sign = fa(symbol("\u{e184}"))
#let fa-fly = fa(symbol("\u{f417}"))
#let fa-folder = fa(symbol("\u{f07b}"))
#let fa-folder-closed = fa(symbol("\u{e185}"))
#let fa-folder-minus = fa(symbol("\u{f65d}"))
#let fa-folder-open = fa(symbol("\u{f07c}"))
#let fa-folder-plus = fa(symbol("\u{f65e}"))
#let fa-folder-tree = fa(symbol("\u{f802}"))
#let fa-font = fa(symbol("\u{f031}"))
#let fa-font-awesome = fa(symbol("\u{f2b4}"))
#let fa-fonticons = fa(symbol("\u{f280}"))
#let fa-fonticons-fi = fa(symbol("\u{f3a2}"))
#let fa-football = fa(symbol("\u{f44e}"))
#let fa-fort-awesome = fa(symbol("\u{f286}"))
#let fa-fort-awesome-alt = fa(symbol("\u{f3a3}"))
#let fa-forumbee = fa(symbol("\u{f211}"))
#let fa-forward = fa(symbol("\u{f04e}"))
#let fa-forward-fast = fa(symbol("\u{f050}"))
#let fa-forward-step = fa(symbol("\u{f051}"))
#let fa-foursquare = fa(symbol("\u{f180}"))
#let fa-franc-sign = fa(symbol("\u{e18f}"))
#let fa-free-code-camp = fa(symbol("\u{f2c5}"))
#let fa-freebsd = fa(symbol("\u{f3a4}"))
#let fa-frog = fa(symbol("\u{f52e}"))
#let fa-fulcrum = fa(symbol("\u{f50b}"))
#let fa-futbol = fa(symbol("\u{f1e3}"))
#let fa-g = fa(symbol("\u{47}"))
#let fa-galactic-republic = fa(symbol("\u{f50c}"))
#let fa-galactic-senate = fa(symbol("\u{f50d}"))
#let fa-gamepad = fa(symbol("\u{f11b}"))
#let fa-gas-pump = fa(symbol("\u{f52f}"))
#let fa-gauge = fa(symbol("\u{f624}"))
#let fa-gauge-high = fa(symbol("\u{f625}"))
#let fa-gauge-simple = fa(symbol("\u{f629}"))
#let fa-gauge-simple-high = fa(symbol("\u{f62a}"))
#let fa-gavel = fa(symbol("\u{f0e3}"))
#let fa-gear = fa(symbol("\u{f013}"))
#let fa-gears = fa(symbol("\u{f085}"))
#let fa-gem = fa(symbol("\u{f3a5}"))
#let fa-genderless = fa(symbol("\u{f22d}"))
#let fa-get-pocket = fa(symbol("\u{f265}"))
#let fa-gg = fa(symbol("\u{f260}"))
#let fa-gg-circle = fa(symbol("\u{f261}"))
#let fa-ghost = fa(symbol("\u{f6e2}"))
#let fa-gift = fa(symbol("\u{f06b}"))
#let fa-gifts = fa(symbol("\u{f79c}"))
#let fa-git = fa(symbol("\u{f1d3}"))
#let fa-git-alt = fa(symbol("\u{f841}"))
#let fa-github = fa(symbol("\u{f09b}"))
#let fa-github-alt = fa(symbol("\u{f113}"))
#let fa-gitkraken = fa(symbol("\u{f3a6}"))
#let fa-gitlab = fa(symbol("\u{f296}"))
#let fa-gitter = fa(symbol("\u{f426}"))
#let fa-glass-water = fa(symbol("\u{e4f4}"))
#let fa-glass-water-droplet = fa(symbol("\u{e4f5}"))
#let fa-glasses = fa(symbol("\u{f530}"))
#let fa-glide = fa(symbol("\u{f2a5}"))
#let fa-glide-g = fa(symbol("\u{f2a6}"))
#let fa-globe = fa(symbol("\u{f0ac}"))
#let fa-gofore = fa(symbol("\u{f3a7}"))
#let fa-golang = fa(symbol("\u{e40f}"))
#let fa-golf-ball-tee = fa(symbol("\u{f450}"))
#let fa-goodreads = fa(symbol("\u{f3a8}"))
#let fa-goodreads-g = fa(symbol("\u{f3a9}"))
#let fa-google = fa(symbol("\u{f1a0}"))
#let fa-google-drive = fa(symbol("\u{f3aa}"))
#let fa-google-pay = fa(symbol("\u{e079}"))
#let fa-google-play = fa(symbol("\u{f3ab}"))
#let fa-google-plus = fa(symbol("\u{f2b3}"))
#let fa-google-plus-g = fa(symbol("\u{f0d5}"))
#let fa-google-wallet = fa(symbol("\u{f1ee}"))
#let fa-gopuram = fa(symbol("\u{f664}"))
#let fa-graduation-cap = fa(symbol("\u{f19d}"))
#let fa-gratipay = fa(symbol("\u{f184}"))
#let fa-grav = fa(symbol("\u{f2d6}"))
#let fa-greater-than = fa(symbol("\u{3e}"))
#let fa-greater-than-equal = fa(symbol("\u{f532}"))
#let fa-grip = fa(symbol("\u{f58d}"))
#let fa-grip-lines = fa(symbol("\u{f7a4}"))
#let fa-grip-lines-vertical = fa(symbol("\u{f7a5}"))
#let fa-grip-vertical = fa(symbol("\u{f58e}"))
#let fa-gripfire = fa(symbol("\u{f3ac}"))
#let fa-group-arrows-rotate = fa(symbol("\u{e4f6}"))
#let fa-grunt = fa(symbol("\u{f3ad}"))
#let fa-guarani-sign = fa(symbol("\u{e19a}"))
#let fa-guilded = fa(symbol("\u{e07e}"))
#let fa-guitar = fa(symbol("\u{f7a6}"))
#let fa-gulp = fa(symbol("\u{f3ae}"))
#let fa-gun = fa(symbol("\u{e19b}"))
#let fa-h = fa(symbol("\u{48}"))
#let fa-hacker-news = fa(symbol("\u{f1d4}"))
#let fa-hackerrank = fa(symbol("\u{f5f7}"))
#let fa-hammer = fa(symbol("\u{f6e3}"))
#let fa-hamsa = fa(symbol("\u{f665}"))
#let fa-hand = fa(symbol("\u{f256}"))
#let fa-hand-back-fist = fa(symbol("\u{f255}"))
#let fa-hand-dots = fa(symbol("\u{f461}"))
#let fa-hand-fist = fa(symbol("\u{f6de}"))
#let fa-hand-holding = fa(symbol("\u{f4bd}"))
#let fa-hand-holding-dollar = fa(symbol("\u{f4c0}"))
#let fa-hand-holding-droplet = fa(symbol("\u{f4c1}"))
#let fa-hand-holding-hand = fa(symbol("\u{e4f7}"))
#let fa-hand-holding-heart = fa(symbol("\u{f4be}"))
#let fa-hand-holding-medical = fa(symbol("\u{e05c}"))
#let fa-hand-lizard = fa(symbol("\u{f258}"))
#let fa-hand-middle-finger = fa(symbol("\u{f806}"))
#let fa-hand-peace = fa(symbol("\u{f25b}"))
#let fa-hand-point-down = fa(symbol("\u{f0a7}"))
#let fa-hand-point-left = fa(symbol("\u{f0a5}"))
#let fa-hand-point-right = fa(symbol("\u{f0a4}"))
#let fa-hand-point-up = fa(symbol("\u{f0a6}"))
#let fa-hand-pointer = fa(symbol("\u{f25a}"))
#let fa-hand-scissors = fa(symbol("\u{f257}"))
#let fa-hand-sparkles = fa(symbol("\u{e05d}"))
#let fa-hand-spock = fa(symbol("\u{f259}"))
#let fa-handcuffs = fa(symbol("\u{e4f8}"))
#let fa-hands = fa(symbol("\u{f2a7}"))
#let fa-hands-asl-interpreting = fa(symbol("\u{f2a3}"))
#let fa-hands-bound = fa(symbol("\u{e4f9}"))
#let fa-hands-bubbles = fa(symbol("\u{e05e}"))
#let fa-hands-clapping = fa(symbol("\u{e1a8}"))
#let fa-hands-holding = fa(symbol("\u{f4c2}"))
#let fa-hands-holding-child = fa(symbol("\u{e4fa}"))
#let fa-hands-holding-circle = fa(symbol("\u{e4fb}"))
#let fa-hands-praying = fa(symbol("\u{f684}"))
#let fa-handshake = fa(symbol("\u{f2b5}"))
#let fa-handshake-angle = fa(symbol("\u{f4c4}"))
#let fa-handshake-simple = fa(symbol("\u{f4c6}"))
#let fa-handshake-simple-slash = fa(symbol("\u{e05f}"))
#let fa-handshake-slash = fa(symbol("\u{e060}"))
#let fa-hanukiah = fa(symbol("\u{f6e6}"))
#let fa-hard-drive = fa(symbol("\u{f0a0}"))
#let fa-hashnode = fa(symbol("\u{e499}"))
#let fa-hashtag = fa(symbol("\u{23}"))
#let fa-hat-cowboy = fa(symbol("\u{f8c0}"))
#let fa-hat-cowboy-side = fa(symbol("\u{f8c1}"))
#let fa-hat-wizard = fa(symbol("\u{f6e8}"))
#let fa-head-side-cough = fa(symbol("\u{e061}"))
#let fa-head-side-cough-slash = fa(symbol("\u{e062}"))
#let fa-head-side-mask = fa(symbol("\u{e063}"))
#let fa-head-side-virus = fa(symbol("\u{e064}"))
#let fa-heading = fa(symbol("\u{f1dc}"))
#let fa-headphones = fa(symbol("\u{f025}"))
#let fa-headphones-simple = fa(symbol("\u{f58f}"))
#let fa-headset = fa(symbol("\u{f590}"))
#let fa-heart = fa(symbol("\u{f004}"))
#let fa-heart-circle-bolt = fa(symbol("\u{e4fc}"))
#let fa-heart-circle-check = fa(symbol("\u{e4fd}"))
#let fa-heart-circle-exclamation = fa(symbol("\u{e4fe}"))
#let fa-heart-circle-minus = fa(symbol("\u{e4ff}"))
#let fa-heart-circle-plus = fa(symbol("\u{e500}"))
#let fa-heart-circle-xmark = fa(symbol("\u{e501}"))
#let fa-heart-crack = fa(symbol("\u{f7a9}"))
#let fa-heart-pulse = fa(symbol("\u{f21e}"))
#let fa-helicopter = fa(symbol("\u{f533}"))
#let fa-helicopter-symbol = fa(symbol("\u{e502}"))
#let fa-helmet-safety = fa(symbol("\u{f807}"))
#let fa-helmet-un = fa(symbol("\u{e503}"))
#let fa-highlighter = fa(symbol("\u{f591}"))
#let fa-hill-avalanche = fa(symbol("\u{e507}"))
#let fa-hill-rockslide = fa(symbol("\u{e508}"))
#let fa-hippo = fa(symbol("\u{f6ed}"))
#let fa-hips = fa(symbol("\u{f452}"))
#let fa-hire-a-helper = fa(symbol("\u{f3b0}"))
#let fa-hive = fa(symbol("\u{e07f}"))
#let fa-hockey-puck = fa(symbol("\u{f453}"))
#let fa-holly-berry = fa(symbol("\u{f7aa}"))
#let fa-hooli = fa(symbol("\u{f427}"))
#let fa-hornbill = fa(symbol("\u{f592}"))
#let fa-horse = fa(symbol("\u{f6f0}"))
#let fa-horse-head = fa(symbol("\u{f7ab}"))
#let fa-hospital = fa(symbol("\u{f0f8}"))
#let fa-hospital-user = fa(symbol("\u{f80d}"))
#let fa-hot-tub-person = fa(symbol("\u{f593}"))
#let fa-hotdog = fa(symbol("\u{f80f}"))
#let fa-hotel = fa(symbol("\u{f594}"))
#let fa-hotjar = fa(symbol("\u{f3b1}"))
#let fa-hourglass = fa(symbol("\u{f254}"))
#let fa-hourglass-end = fa(symbol("\u{f253}"))
#let fa-hourglass-half = fa(symbol("\u{f252}"))
#let fa-hourglass-start = fa(symbol("\u{f251}"))
#let fa-house = fa(symbol("\u{f015}"))
#let fa-house-chimney = fa(symbol("\u{e3af}"))
#let fa-house-chimney-crack = fa(symbol("\u{f6f1}"))
#let fa-house-chimney-medical = fa(symbol("\u{f7f2}"))
#let fa-house-chimney-user = fa(symbol("\u{e065}"))
#let fa-house-chimney-window = fa(symbol("\u{e00d}"))
#let fa-house-circle-check = fa(symbol("\u{e509}"))
#let fa-house-circle-exclamation = fa(symbol("\u{e50a}"))
#let fa-house-circle-xmark = fa(symbol("\u{e50b}"))
#let fa-house-crack = fa(symbol("\u{e3b1}"))
#let fa-house-fire = fa(symbol("\u{e50c}"))
#let fa-house-flag = fa(symbol("\u{e50d}"))
#let fa-house-flood-water = fa(symbol("\u{e50e}"))
#let fa-house-flood-water-circle-arrow-right = fa(symbol("\u{e50f}"))
#let fa-house-laptop = fa(symbol("\u{e066}"))
#let fa-house-lock = fa(symbol("\u{e510}"))
#let fa-house-medical = fa(symbol("\u{e3b2}"))
#let fa-house-medical-circle-check = fa(symbol("\u{e511}"))
#let fa-house-medical-circle-exclamation = fa(symbol("\u{e512}"))
#let fa-house-medical-circle-xmark = fa(symbol("\u{e513}"))
#let fa-house-medical-flag = fa(symbol("\u{e514}"))
#let fa-house-signal = fa(symbol("\u{e012}"))
#let fa-house-tsunami = fa(symbol("\u{e515}"))
#let fa-house-user = fa(symbol("\u{e1b0}"))
#let fa-houzz = fa(symbol("\u{f27c}"))
#let fa-hryvnia-sign = fa(symbol("\u{f6f2}"))
#let fa-html5 = fa(symbol("\u{f13b}"))
#let fa-hubspot = fa(symbol("\u{f3b2}"))
#let fa-hurricane = fa(symbol("\u{f751}"))
#let fa-i = fa(symbol("\u{49}"))
#let fa-i-cursor = fa(symbol("\u{f246}"))
#let fa-ice-cream = fa(symbol("\u{f810}"))
#let fa-icicles = fa(symbol("\u{f7ad}"))
#let fa-icons = fa(symbol("\u{f86d}"))
#let fa-id-badge = fa(symbol("\u{f2c1}"))
#let fa-id-card = fa(symbol("\u{f2c2}"))
#let fa-id-card-clip = fa(symbol("\u{f47f}"))
#let fa-ideal = fa(symbol("\u{e013}"))
#let fa-igloo = fa(symbol("\u{f7ae}"))
#let fa-image = fa(symbol("\u{f03e}"))
#let fa-image-portrait = fa(symbol("\u{f3e0}"))
#let fa-images = fa(symbol("\u{f302}"))
#let fa-imdb = fa(symbol("\u{f2d8}"))
#let fa-inbox = fa(symbol("\u{f01c}"))
#let fa-indent = fa(symbol("\u{f03c}"))
#let fa-indian-rupee-sign = fa(symbol("\u{e1bc}"))
#let fa-industry = fa(symbol("\u{f275}"))
#let fa-infinity = fa(symbol("\u{f534}"))
#let fa-info = fa(symbol("\u{f129}"))
#let fa-instagram = fa(symbol("\u{f16d}"))
#let fa-instalod = fa(symbol("\u{e081}"))
#let fa-intercom = fa(symbol("\u{f7af}"))
#let fa-internet-explorer = fa(symbol("\u{f26b}"))
#let fa-invision = fa(symbol("\u{f7b0}"))
#let fa-ioxhost = fa(symbol("\u{f208}"))
#let fa-italic = fa(symbol("\u{f033}"))
#let fa-itch-io = fa(symbol("\u{f83a}"))
#let fa-itunes = fa(symbol("\u{f3b4}"))
#let fa-itunes-note = fa(symbol("\u{f3b5}"))
#let fa-j = fa(symbol("\u{4a}"))
#let fa-jar = fa(symbol("\u{e516}"))
#let fa-jar-wheat = fa(symbol("\u{e517}"))
#let fa-java = fa(symbol("\u{f4e4}"))
#let fa-jedi = fa(symbol("\u{f669}"))
#let fa-jedi-order = fa(symbol("\u{f50e}"))
#let fa-jenkins = fa(symbol("\u{f3b6}"))
#let fa-jet-fighter = fa(symbol("\u{f0fb}"))
#let fa-jet-fighter-up = fa(symbol("\u{e518}"))
#let fa-jira = fa(symbol("\u{f7b1}"))
#let fa-joget = fa(symbol("\u{f3b7}"))
#let fa-joint = fa(symbol("\u{f595}"))
#let fa-joomla = fa(symbol("\u{f1aa}"))
#let fa-js = fa(symbol("\u{f3b8}"))
#let fa-jsfiddle = fa(symbol("\u{f1cc}"))
#let fa-jug-detergent = fa(symbol("\u{e519}"))
#let fa-k = fa(symbol("\u{4b}"))
#let fa-kaaba = fa(symbol("\u{f66b}"))
#let fa-kaggle = fa(symbol("\u{f5fa}"))
#let fa-key = fa(symbol("\u{f084}"))
#let fa-keybase = fa(symbol("\u{f4f5}"))
#let fa-keyboard = fa(symbol("\u{f11c}"))
#let fa-keycdn = fa(symbol("\u{f3ba}"))
#let fa-khanda = fa(symbol("\u{f66d}"))
#let fa-kickstarter = fa(symbol("\u{f3bb}"))
#let fa-kickstarter-k = fa(symbol("\u{f3bc}"))
#let fa-kip-sign = fa(symbol("\u{e1c4}"))
#let fa-kit-medical = fa(symbol("\u{f479}"))
#let fa-kitchen-set = fa(symbol("\u{e51a}"))
#let fa-kiwi-bird = fa(symbol("\u{f535}"))
#let fa-korvue = fa(symbol("\u{f42f}"))
#let fa-l = fa(symbol("\u{4c}"))
#let fa-land-mine-on = fa(symbol("\u{e51b}"))
#let fa-landmark = fa(symbol("\u{f66f}"))
#let fa-landmark-dome = fa(symbol("\u{f752}"))
#let fa-landmark-flag = fa(symbol("\u{e51c}"))
#let fa-language = fa(symbol("\u{f1ab}"))
#let fa-laptop = fa(symbol("\u{f109}"))
#let fa-laptop-code = fa(symbol("\u{f5fc}"))
#let fa-laptop-file = fa(symbol("\u{e51d}"))
#let fa-laptop-medical = fa(symbol("\u{f812}"))
#let fa-laravel = fa(symbol("\u{f3bd}"))
#let fa-lari-sign = fa(symbol("\u{e1c8}"))
#let fa-lastfm = fa(symbol("\u{f202}"))
#let fa-layer-group = fa(symbol("\u{f5fd}"))
#let fa-leaf = fa(symbol("\u{f06c}"))
#let fa-leanpub = fa(symbol("\u{f212}"))
#let fa-left-long = fa(symbol("\u{f30a}"))
#let fa-left-right = fa(symbol("\u{f337}"))
#let fa-lemon = fa(symbol("\u{f094}"))
#let fa-less = fa(symbol("\u{f41d}"))
#let fa-less-than = fa(symbol("\u{3c}"))
#let fa-less-than-equal = fa(symbol("\u{f537}"))
#let fa-life-ring = fa(symbol("\u{f1cd}"))
#let fa-lightbulb = fa(symbol("\u{f0eb}"))
#let fa-line = fa(symbol("\u{f3c0}"))
#let fa-lines-leaning = fa(symbol("\u{e51e}"))
#let fa-link = fa(symbol("\u{f0c1}"))
#let fa-link-slash = fa(symbol("\u{f127}"))
#let fa-linkedin = fa(symbol("\u{f08c}"))
#let fa-linkedin-in = fa(symbol("\u{f0e1}"))
#let fa-linode = fa(symbol("\u{f2b8}"))
#let fa-linux = fa(symbol("\u{f17c}"))
#let fa-lira-sign = fa(symbol("\u{f195}"))
#let fa-list = fa(symbol("\u{f03a}"))
#let fa-list-check = fa(symbol("\u{f0ae}"))
#let fa-list-ol = fa(symbol("\u{f0cb}"))
#let fa-list-ul = fa(symbol("\u{f0ca}"))
#let fa-litecoin-sign = fa(symbol("\u{e1d3}"))
#let fa-location-arrow = fa(symbol("\u{f124}"))
#let fa-location-crosshairs = fa(symbol("\u{f601}"))
#let fa-location-dot = fa(symbol("\u{f3c5}"))
#let fa-location-pin = fa(symbol("\u{f041}"))
#let fa-location-pin-lock = fa(symbol("\u{e51f}"))
#let fa-lock = fa(symbol("\u{f023}"))
#let fa-lock-open = fa(symbol("\u{f3c1}"))
#let fa-locust = fa(symbol("\u{e520}"))
#let fa-lungs = fa(symbol("\u{f604}"))
#let fa-lungs-virus = fa(symbol("\u{e067}"))
#let fa-lyft = fa(symbol("\u{f3c3}"))
#let fa-m = fa(symbol("\u{4d}"))
#let fa-magento = fa(symbol("\u{f3c4}"))
#let fa-magnet = fa(symbol("\u{f076}"))
#let fa-magnifying-glass = fa(symbol("\u{f002}"))
#let fa-magnifying-glass-arrow-right = fa(symbol("\u{e521}"))
#let fa-magnifying-glass-chart = fa(symbol("\u{e522}"))
#let fa-magnifying-glass-dollar = fa(symbol("\u{f688}"))
#let fa-magnifying-glass-location = fa(symbol("\u{f689}"))
#let fa-magnifying-glass-minus = fa(symbol("\u{f010}"))
#let fa-magnifying-glass-plus = fa(symbol("\u{f00e}"))
#let fa-mailchimp = fa(symbol("\u{f59e}"))
#let fa-manat-sign = fa(symbol("\u{e1d5}"))
#let fa-mandalorian = fa(symbol("\u{f50f}"))
#let fa-map = fa(symbol("\u{f279}"))
#let fa-map-location = fa(symbol("\u{f59f}"))
#let fa-map-location-dot = fa(symbol("\u{f5a0}"))
#let fa-map-pin = fa(symbol("\u{f276}"))
#let fa-markdown = fa(symbol("\u{f60f}"))
#let fa-marker = fa(symbol("\u{f5a1}"))
#let fa-mars = fa(symbol("\u{f222}"))
#let fa-mars-and-venus = fa(symbol("\u{f224}"))
#let fa-mars-and-venus-burst = fa(symbol("\u{e523}"))
#let fa-mars-double = fa(symbol("\u{f227}"))
#let fa-mars-stroke = fa(symbol("\u{f229}"))
#let fa-mars-stroke-right = fa(symbol("\u{f22b}"))
#let fa-mars-stroke-up = fa(symbol("\u{f22a}"))
#let fa-martini-glass = fa(symbol("\u{f57b}"))
#let fa-martini-glass-citrus = fa(symbol("\u{f561}"))
#let fa-martini-glass-empty = fa(symbol("\u{f000}"))
#let fa-mask = fa(symbol("\u{f6fa}"))
#let fa-mask-face = fa(symbol("\u{e1d7}"))
#let fa-mask-ventilator = fa(symbol("\u{e524}"))
#let fa-masks-theater = fa(symbol("\u{f630}"))
#let fa-mastodon = fa(symbol("\u{f4f6}"))
#let fa-mattress-pillow = fa(symbol("\u{e525}"))
#let fa-maxcdn = fa(symbol("\u{f136}"))
#let fa-maximize = fa(symbol("\u{f31e}"))
#let fa-mdb = fa(symbol("\u{f8ca}"))
#let fa-medal = fa(symbol("\u{f5a2}"))
#let fa-medapps = fa(symbol("\u{f3c6}"))
#let fa-medium = fa(symbol("\u{f23a}"))
#let fa-medrt = fa(symbol("\u{f3c8}"))
#let fa-meetup = fa(symbol("\u{f2e0}"))
#let fa-megaport = fa(symbol("\u{f5a3}"))
#let fa-memory = fa(symbol("\u{f538}"))
#let fa-mendeley = fa(symbol("\u{f7b3}"))
#let fa-menorah = fa(symbol("\u{f676}"))
#let fa-mercury = fa(symbol("\u{f223}"))
#let fa-message = fa(symbol("\u{f27a}"))
#let fa-meta = fa(symbol("\u{e49b}"))
#let fa-meteor = fa(symbol("\u{f753}"))
#let fa-microblog = fa(symbol("\u{e01a}"))
#let fa-microchip = fa(symbol("\u{f2db}"))
#let fa-microphone = fa(symbol("\u{f130}"))
#let fa-microphone-lines = fa(symbol("\u{f3c9}"))
#let fa-microphone-lines-slash = fa(symbol("\u{f539}"))
#let fa-microphone-slash = fa(symbol("\u{f131}"))
#let fa-microscope = fa(symbol("\u{f610}"))
#let fa-microsoft = fa(symbol("\u{f3ca}"))
#let fa-mill-sign = fa(symbol("\u{e1ed}"))
#let fa-minimize = fa(symbol("\u{f78c}"))
#let fa-minus = fa(symbol("\u{f068}"))
#let fa-mitten = fa(symbol("\u{f7b5}"))
#let fa-mix = fa(symbol("\u{f3cb}"))
#let fa-mixcloud = fa(symbol("\u{f289}"))
#let fa-mixer = fa(symbol("\u{e056}"))
#let fa-mizuni = fa(symbol("\u{f3cc}"))
#let fa-mobile = fa(symbol("\u{f3ce}"))
#let fa-mobile-button = fa(symbol("\u{f10b}"))
#let fa-mobile-retro = fa(symbol("\u{e527}"))
#let fa-mobile-screen = fa(symbol("\u{f3cf}"))
#let fa-mobile-screen-button = fa(symbol("\u{f3cd}"))
#let fa-modx = fa(symbol("\u{f285}"))
#let fa-monero = fa(symbol("\u{f3d0}"))
#let fa-money-bill = fa(symbol("\u{f0d6}"))
#let fa-money-bill-1 = fa(symbol("\u{f3d1}"))
#let fa-money-bill-1-wave = fa(symbol("\u{f53b}"))
#let fa-money-bill-transfer = fa(symbol("\u{e528}"))
#let fa-money-bill-trend-up = fa(symbol("\u{e529}"))
#let fa-money-bill-wave = fa(symbol("\u{f53a}"))
#let fa-money-bill-wheat = fa(symbol("\u{e52a}"))
#let fa-money-bills = fa(symbol("\u{e1f3}"))
#let fa-money-check = fa(symbol("\u{f53c}"))
#let fa-money-check-dollar = fa(symbol("\u{f53d}"))
#let fa-monument = fa(symbol("\u{f5a6}"))
#let fa-moon = fa(symbol("\u{f186}"))
#let fa-mortar-pestle = fa(symbol("\u{f5a7}"))
#let fa-mosque = fa(symbol("\u{f678}"))
#let fa-mosquito = fa(symbol("\u{e52b}"))
#let fa-mosquito-net = fa(symbol("\u{e52c}"))
#let fa-motorcycle = fa(symbol("\u{f21c}"))
#let fa-mound = fa(symbol("\u{e52d}"))
#let fa-mountain = fa(symbol("\u{f6fc}"))
#let fa-mountain-city = fa(symbol("\u{e52e}"))
#let fa-mountain-sun = fa(symbol("\u{e52f}"))
#let fa-mug-hot = fa(symbol("\u{f7b6}"))
#let fa-mug-saucer = fa(symbol("\u{f0f4}"))
#let fa-music = fa(symbol("\u{f001}"))
#let fa-n = fa(symbol("\u{4e}"))
#let fa-naira-sign = fa(symbol("\u{e1f6}"))
#let fa-napster = fa(symbol("\u{f3d2}"))
#let fa-neos = fa(symbol("\u{f612}"))
#let fa-network-wired = fa(symbol("\u{f6ff}"))
#let fa-neuter = fa(symbol("\u{f22c}"))
#let fa-newspaper = fa(symbol("\u{f1ea}"))
#let fa-nfc-directional = fa(symbol("\u{e530}"))
#let fa-nfc-symbol = fa(symbol("\u{e531}"))
#let fa-nimblr = fa(symbol("\u{f5a8}"))
#let fa-node = fa(symbol("\u{f419}"))
#let fa-node-js = fa(symbol("\u{f3d3}"))
#let fa-not-equal = fa(symbol("\u{f53e}"))
#let fa-notdef = fa(symbol("\u{e1fe}"))
#let fa-note-sticky = fa(symbol("\u{f249}"))
#let fa-notes-medical = fa(symbol("\u{f481}"))
#let fa-npm = fa(symbol("\u{f3d4}"))
#let fa-ns8 = fa(symbol("\u{f3d5}"))
#let fa-nutritionix = fa(symbol("\u{f3d6}"))
#let fa-o = fa(symbol("\u{4f}"))
#let fa-object-group = fa(symbol("\u{f247}"))
#let fa-object-ungroup = fa(symbol("\u{f248}"))
#let fa-octopus-deploy = fa(symbol("\u{e082}"))
#let fa-odnoklassniki = fa(symbol("\u{f263}"))
#let fa-odysee = fa(symbol("\u{e5c6}"))
#let fa-oil-can = fa(symbol("\u{f613}"))
#let fa-oil-well = fa(symbol("\u{e532}"))
#let fa-old-republic = fa(symbol("\u{f510}"))
#let fa-om = fa(symbol("\u{f679}"))
#let fa-opencart = fa(symbol("\u{f23d}"))
#let fa-openid = fa(symbol("\u{f19b}"))
#let fa-opera = fa(symbol("\u{f26a}"))
#let fa-optin-monster = fa(symbol("\u{f23c}"))
#let fa-orcid = fa(symbol("\u{f8d2}"))
#let fa-osi = fa(symbol("\u{f41a}"))
#let fa-otter = fa(symbol("\u{f700}"))
#let fa-outdent = fa(symbol("\u{f03b}"))
#let fa-p = fa(symbol("\u{50}"))
#let fa-padlet = fa(symbol("\u{e4a0}"))
#let fa-page4 = fa(symbol("\u{f3d7}"))
#let fa-pagelines = fa(symbol("\u{f18c}"))
#let fa-pager = fa(symbol("\u{f815}"))
#let fa-paint-roller = fa(symbol("\u{f5aa}"))
#let fa-paintbrush = fa(symbol("\u{f1fc}"))
#let fa-palette = fa(symbol("\u{f53f}"))
#let fa-palfed = fa(symbol("\u{f3d8}"))
#let fa-pallet = fa(symbol("\u{f482}"))
#let fa-panorama = fa(symbol("\u{e209}"))
#let fa-paper-plane = fa(symbol("\u{f1d8}"))
#let fa-paperclip = fa(symbol("\u{f0c6}"))
#let fa-parachute-box = fa(symbol("\u{f4cd}"))
#let fa-paragraph = fa(symbol("\u{f1dd}"))
#let fa-passport = fa(symbol("\u{f5ab}"))
#let fa-paste = fa(symbol("\u{f0ea}"))
#let fa-patreon = fa(symbol("\u{f3d9}"))
#let fa-pause = fa(symbol("\u{f04c}"))
#let fa-paw = fa(symbol("\u{f1b0}"))
#let fa-paypal = fa(symbol("\u{f1ed}"))
#let fa-peace = fa(symbol("\u{f67c}"))
#let fa-pen = fa(symbol("\u{f304}"))
#let fa-pen-clip = fa(symbol("\u{f305}"))
#let fa-pen-fancy = fa(symbol("\u{f5ac}"))
#let fa-pen-nib = fa(symbol("\u{f5ad}"))
#let fa-pen-ruler = fa(symbol("\u{f5ae}"))
#let fa-pen-to-square = fa(symbol("\u{f044}"))
#let fa-pencil = fa(symbol("\u{f303}"))
#let fa-people-arrows = fa(symbol("\u{e068}"))
#let fa-people-carry-box = fa(symbol("\u{f4ce}"))
#let fa-people-group = fa(symbol("\u{e533}"))
#let fa-people-line = fa(symbol("\u{e534}"))
#let fa-people-pulling = fa(symbol("\u{e535}"))
#let fa-people-robbery = fa(symbol("\u{e536}"))
#let fa-people-roof = fa(symbol("\u{e537}"))
#let fa-pepper-hot = fa(symbol("\u{f816}"))
#let fa-perbyte = fa(symbol("\u{e083}"))
#let fa-percent = fa(symbol("\u{25}"))
#let fa-periscope = fa(symbol("\u{f3da}"))
#let fa-person = fa(symbol("\u{f183}"))
#let fa-person-arrow-down-to-line = fa(symbol("\u{e538}"))
#let fa-person-arrow-up-from-line = fa(symbol("\u{e539}"))
#let fa-person-biking = fa(symbol("\u{f84a}"))
#let fa-person-booth = fa(symbol("\u{f756}"))
#let fa-person-breastfeeding = fa(symbol("\u{e53a}"))
#let fa-person-burst = fa(symbol("\u{e53b}"))
#let fa-person-cane = fa(symbol("\u{e53c}"))
#let fa-person-chalkboard = fa(symbol("\u{e53d}"))
#let fa-person-circle-check = fa(symbol("\u{e53e}"))
#let fa-person-circle-exclamation = fa(symbol("\u{e53f}"))
#let fa-person-circle-minus = fa(symbol("\u{e540}"))
#let fa-person-circle-plus = fa(symbol("\u{e541}"))
#let fa-person-circle-question = fa(symbol("\u{e542}"))
#let fa-person-circle-xmark = fa(symbol("\u{e543}"))
#let fa-person-digging = fa(symbol("\u{f85e}"))
#let fa-person-dots-from-line = fa(symbol("\u{f470}"))
#let fa-person-dress = fa(symbol("\u{f182}"))
#let fa-person-dress-burst = fa(symbol("\u{e544}"))
#let fa-person-drowning = fa(symbol("\u{e545}"))
#let fa-person-falling = fa(symbol("\u{e546}"))
#let fa-person-falling-burst = fa(symbol("\u{e547}"))
#let fa-person-half-dress = fa(symbol("\u{e548}"))
#let fa-person-harassing = fa(symbol("\u{e549}"))
#let fa-person-hiking = fa(symbol("\u{f6ec}"))
#let fa-person-military-pointing = fa(symbol("\u{e54a}"))
#let fa-person-military-rifle = fa(symbol("\u{e54b}"))
#let fa-person-military-to-person = fa(symbol("\u{e54c}"))
#let fa-person-praying = fa(symbol("\u{f683}"))
#let fa-person-pregnant = fa(symbol("\u{e31e}"))
#let fa-person-rays = fa(symbol("\u{e54d}"))
#let fa-person-rifle = fa(symbol("\u{e54e}"))
#let fa-person-running = fa(symbol("\u{f70c}"))
#let fa-person-shelter = fa(symbol("\u{e54f}"))
#let fa-person-skating = fa(symbol("\u{f7c5}"))
#let fa-person-skiing = fa(symbol("\u{f7c9}"))
#let fa-person-skiing-nordic = fa(symbol("\u{f7ca}"))
#let fa-person-snowboarding = fa(symbol("\u{f7ce}"))
#let fa-person-swimming = fa(symbol("\u{f5c4}"))
#let fa-person-through-window = fa(symbol("\u{e5a9}"))
#let fa-person-walking = fa(symbol("\u{f554}"))
#let fa-person-walking-arrow-loop-left = fa(symbol("\u{e551}"))
#let fa-person-walking-arrow-right = fa(symbol("\u{e552}"))
#let fa-person-walking-dashed-line-arrow-right = fa(symbol("\u{e553}"))
#let fa-person-walking-luggage = fa(symbol("\u{e554}"))
#let fa-person-walking-with-cane = fa(symbol("\u{f29d}"))
#let fa-peseta-sign = fa(symbol("\u{e221}"))
#let fa-peso-sign = fa(symbol("\u{e222}"))
#let fa-phabricator = fa(symbol("\u{f3db}"))
#let fa-phoenix-framework = fa(symbol("\u{f3dc}"))
#let fa-phoenix-squadron = fa(symbol("\u{f511}"))
#let fa-phone = fa(symbol("\u{f095}"))
#let fa-phone-flip = fa(symbol("\u{f879}"))
#let fa-phone-slash = fa(symbol("\u{f3dd}"))
#let fa-phone-volume = fa(symbol("\u{f2a0}"))
#let fa-photo-film = fa(symbol("\u{f87c}"))
#let fa-php = fa(symbol("\u{f457}"))
#let fa-pied-piper = fa(symbol("\u{f2ae}"))
#let fa-pied-piper-alt = fa(symbol("\u{f1a8}"))
#let fa-pied-piper-hat = fa(symbol("\u{f4e5}"))
#let fa-pied-piper-pp = fa(symbol("\u{f1a7}"))
#let fa-piggy-bank = fa(symbol("\u{f4d3}"))
#let fa-pills = fa(symbol("\u{f484}"))
#let fa-pinterest = fa(symbol("\u{f0d2}"))
#let fa-pinterest-p = fa(symbol("\u{f231}"))
#let fa-pix = fa(symbol("\u{e43a}"))
#let fa-pizza-slice = fa(symbol("\u{f818}"))
#let fa-place-of-worship = fa(symbol("\u{f67f}"))
#let fa-plane = fa(symbol("\u{f072}"))
#let fa-plane-arrival = fa(symbol("\u{f5af}"))
#let fa-plane-circle-check = fa(symbol("\u{e555}"))
#let fa-plane-circle-exclamation = fa(symbol("\u{e556}"))
#let fa-plane-circle-xmark = fa(symbol("\u{e557}"))
#let fa-plane-departure = fa(symbol("\u{f5b0}"))
#let fa-plane-lock = fa(symbol("\u{e558}"))
#let fa-plane-slash = fa(symbol("\u{e069}"))
#let fa-plane-up = fa(symbol("\u{e22d}"))
#let fa-plant-wilt = fa(symbol("\u{e5aa}"))
#let fa-plate-wheat = fa(symbol("\u{e55a}"))
#let fa-play = fa(symbol("\u{f04b}"))
#let fa-playstation = fa(symbol("\u{f3df}"))
#let fa-plug = fa(symbol("\u{f1e6}"))
#let fa-plug-circle-bolt = fa(symbol("\u{e55b}"))
#let fa-plug-circle-check = fa(symbol("\u{e55c}"))
#let fa-plug-circle-exclamation = fa(symbol("\u{e55d}"))
#let fa-plug-circle-minus = fa(symbol("\u{e55e}"))
#let fa-plug-circle-plus = fa(symbol("\u{e55f}"))
#let fa-plug-circle-xmark = fa(symbol("\u{e560}"))
#let fa-plus = fa(symbol("\u{2b}"))
#let fa-plus-minus = fa(symbol("\u{e43c}"))
#let fa-podcast = fa(symbol("\u{f2ce}"))
#let fa-poo = fa(symbol("\u{f2fe}"))
#let fa-poo-storm = fa(symbol("\u{f75a}"))
#let fa-poop = fa(symbol("\u{f619}"))
#let fa-power-off = fa(symbol("\u{f011}"))
#let fa-prescription = fa(symbol("\u{f5b1}"))
#let fa-prescription-bottle = fa(symbol("\u{f485}"))
#let fa-prescription-bottle-medical = fa(symbol("\u{f486}"))
#let fa-print = fa(symbol("\u{f02f}"))
#let fa-product-hunt = fa(symbol("\u{f288}"))
#let fa-pump-medical = fa(symbol("\u{e06a}"))
#let fa-pump-soap = fa(symbol("\u{e06b}"))
#let fa-pushed = fa(symbol("\u{f3e1}"))
#let fa-puzzle-piece = fa(symbol("\u{f12e}"))
#let fa-python = fa(symbol("\u{f3e2}"))
#let fa-q = fa(symbol("\u{51}"))
#let fa-qq = fa(symbol("\u{f1d6}"))
#let fa-qrcode = fa(symbol("\u{f029}"))
#let fa-question = fa(symbol("\u{3f}"))
#let fa-quinscape = fa(symbol("\u{f459}"))
#let fa-quora = fa(symbol("\u{f2c4}"))
#let fa-quote-left = fa(symbol("\u{f10d}"))
#let fa-quote-right = fa(symbol("\u{f10e}"))
#let fa-r = fa(symbol("\u{52}"))
#let fa-r-project = fa(symbol("\u{f4f7}"))
#let fa-radiation = fa(symbol("\u{f7b9}"))
#let fa-radio = fa(symbol("\u{f8d7}"))
#let fa-rainbow = fa(symbol("\u{f75b}"))
#let fa-ranking-star = fa(symbol("\u{e561}"))
#let fa-raspberry-pi = fa(symbol("\u{f7bb}"))
#let fa-ravelry = fa(symbol("\u{f2d9}"))
#let fa-react = fa(symbol("\u{f41b}"))
#let fa-reacteurope = fa(symbol("\u{f75d}"))
#let fa-readme = fa(symbol("\u{f4d5}"))
#let fa-rebel = fa(symbol("\u{f1d0}"))
#let fa-receipt = fa(symbol("\u{f543}"))
#let fa-record-vinyl = fa(symbol("\u{f8d9}"))
#let fa-rectangle-ad = fa(symbol("\u{f641}"))
#let fa-rectangle-list = fa(symbol("\u{f022}"))
#let fa-rectangle-xmark = fa(symbol("\u{f410}"))
#let fa-recycle = fa(symbol("\u{f1b8}"))
#let fa-red-river = fa(symbol("\u{f3e3}"))
#let fa-reddit = fa(symbol("\u{f1a1}"))
#let fa-reddit-alien = fa(symbol("\u{f281}"))
#let fa-redhat = fa(symbol("\u{f7bc}"))
#let fa-registered = fa(symbol("\u{f25d}"))
#let fa-renren = fa(symbol("\u{f18b}"))
#let fa-repeat = fa(symbol("\u{f363}"))
#let fa-reply = fa(symbol("\u{f3e5}"))
#let fa-reply-all = fa(symbol("\u{f122}"))
#let fa-replyd = fa(symbol("\u{f3e6}"))
#let fa-republican = fa(symbol("\u{f75e}"))
#let fa-researchgate = fa(symbol("\u{f4f8}"))
#let fa-resolving = fa(symbol("\u{f3e7}"))
#let fa-restroom = fa(symbol("\u{f7bd}"))
#let fa-retweet = fa(symbol("\u{f079}"))
#let fa-rev = fa(symbol("\u{f5b2}"))
#let fa-ribbon = fa(symbol("\u{f4d6}"))
#let fa-right-from-bracket = fa(symbol("\u{f2f5}"))
#let fa-right-left = fa(symbol("\u{f362}"))
#let fa-right-long = fa(symbol("\u{f30b}"))
#let fa-right-to-bracket = fa(symbol("\u{f2f6}"))
#let fa-ring = fa(symbol("\u{f70b}"))
#let fa-road = fa(symbol("\u{f018}"))
#let fa-road-barrier = fa(symbol("\u{e562}"))
#let fa-road-bridge = fa(symbol("\u{e563}"))
#let fa-road-circle-check = fa(symbol("\u{e564}"))
#let fa-road-circle-exclamation = fa(symbol("\u{e565}"))
#let fa-road-circle-xmark = fa(symbol("\u{e566}"))
#let fa-road-lock = fa(symbol("\u{e567}"))
#let fa-road-spikes = fa(symbol("\u{e568}"))
#let fa-robot = fa(symbol("\u{f544}"))
#let fa-rocket = fa(symbol("\u{f135}"))
#let fa-rocketchat = fa(symbol("\u{f3e8}"))
#let fa-rockrms = fa(symbol("\u{f3e9}"))
#let fa-rotate = fa(symbol("\u{f2f1}"))
#let fa-rotate-left = fa(symbol("\u{f2ea}"))
#let fa-rotate-right = fa(symbol("\u{f2f9}"))
#let fa-route = fa(symbol("\u{f4d7}"))
#let fa-rss = fa(symbol("\u{f09e}"))
#let fa-ruble-sign = fa(symbol("\u{f158}"))
#let fa-rug = fa(symbol("\u{e569}"))
#let fa-ruler = fa(symbol("\u{f545}"))
#let fa-ruler-combined = fa(symbol("\u{f546}"))
#let fa-ruler-horizontal = fa(symbol("\u{f547}"))
#let fa-ruler-vertical = fa(symbol("\u{f548}"))
#let fa-rupee-sign = fa(symbol("\u{f156}"))
#let fa-rupiah-sign = fa(symbol("\u{e23d}"))
#let fa-rust = fa(symbol("\u{e07a}"))
#let fa-s = fa(symbol("\u{53}"))
#let fa-sack-dollar = fa(symbol("\u{f81d}"))
#let fa-sack-xmark = fa(symbol("\u{e56a}"))
#let fa-safari = fa(symbol("\u{f267}"))
#let fa-sailboat = fa(symbol("\u{e445}"))
#let fa-salesforce = fa(symbol("\u{f83b}"))
#let fa-sass = fa(symbol("\u{f41e}"))
#let fa-satellite = fa(symbol("\u{f7bf}"))
#let fa-satellite-dish = fa(symbol("\u{f7c0}"))
#let fa-scale-balanced = fa(symbol("\u{f24e}"))
#let fa-scale-unbalanced = fa(symbol("\u{f515}"))
#let fa-scale-unbalanced-flip = fa(symbol("\u{f516}"))
#let fa-schlix = fa(symbol("\u{f3ea}"))
#let fa-school = fa(symbol("\u{f549}"))
#let fa-school-circle-check = fa(symbol("\u{e56b}"))
#let fa-school-circle-exclamation = fa(symbol("\u{e56c}"))
#let fa-school-circle-xmark = fa(symbol("\u{e56d}"))
#let fa-school-flag = fa(symbol("\u{e56e}"))
#let fa-school-lock = fa(symbol("\u{e56f}"))
#let fa-scissors = fa(symbol("\u{f0c4}"))
#let fa-screenpal = fa(symbol("\u{e570}"))
#let fa-screwdriver = fa(symbol("\u{f54a}"))
#let fa-screwdriver-wrench = fa(symbol("\u{f7d9}"))
#let fa-scribd = fa(symbol("\u{f28a}"))
#let fa-scroll = fa(symbol("\u{f70e}"))
#let fa-scroll-torah = fa(symbol("\u{f6a0}"))
#let fa-sd-card = fa(symbol("\u{f7c2}"))
#let fa-searchengin = fa(symbol("\u{f3eb}"))
#let fa-section = fa(symbol("\u{e447}"))
#let fa-seedling = fa(symbol("\u{f4d8}"))
#let fa-sellcast = fa(symbol("\u{f2da}"))
#let fa-sellsy = fa(symbol("\u{f213}"))
#let fa-server = fa(symbol("\u{f233}"))
#let fa-servicestack = fa(symbol("\u{f3ec}"))
#let fa-shapes = fa(symbol("\u{f61f}"))
#let fa-share = fa(symbol("\u{f064}"))
#let fa-share-from-square = fa(symbol("\u{f14d}"))
#let fa-share-nodes = fa(symbol("\u{f1e0}"))
#let fa-sheet-plastic = fa(symbol("\u{e571}"))
#let fa-shekel-sign = fa(symbol("\u{f20b}"))
#let fa-shield = fa(symbol("\u{f132}"))
#let fa-shield-cat = fa(symbol("\u{e572}"))
#let fa-shield-dog = fa(symbol("\u{e573}"))
#let fa-shield-halved = fa(symbol("\u{f3ed}"))
#let fa-shield-heart = fa(symbol("\u{e574}"))
#let fa-shield-virus = fa(symbol("\u{e06c}"))
#let fa-ship = fa(symbol("\u{f21a}"))
#let fa-shirt = fa(symbol("\u{f553}"))
#let fa-shirtsinbulk = fa(symbol("\u{f214}"))
#let fa-shoe-prints = fa(symbol("\u{f54b}"))
#let fa-shop = fa(symbol("\u{f54f}"))
#let fa-shop-lock = fa(symbol("\u{e4a5}"))
#let fa-shop-slash = fa(symbol("\u{e070}"))
#let fa-shopify = fa(symbol("\u{e057}"))
#let fa-shopware = fa(symbol("\u{f5b5}"))
#let fa-shower = fa(symbol("\u{f2cc}"))
#let fa-shrimp = fa(symbol("\u{e448}"))
#let fa-shuffle = fa(symbol("\u{f074}"))
#let fa-shuttle-space = fa(symbol("\u{f197}"))
#let fa-sign-hanging = fa(symbol("\u{f4d9}"))
#let fa-signal = fa(symbol("\u{f012}"))
#let fa-signature = fa(symbol("\u{f5b7}"))
#let fa-signs-post = fa(symbol("\u{f277}"))
#let fa-sim-card = fa(symbol("\u{f7c4}"))
#let fa-simplybuilt = fa(symbol("\u{f215}"))
#let fa-sink = fa(symbol("\u{e06d}"))
#let fa-sistrix = fa(symbol("\u{f3ee}"))
#let fa-sitemap = fa(symbol("\u{f0e8}"))
#let fa-sith = fa(symbol("\u{f512}"))
#let fa-sitrox = fa(symbol("\u{e44a}"))
#let fa-sketch = fa(symbol("\u{f7c6}"))
#let fa-skull = fa(symbol("\u{f54c}"))
#let fa-skull-crossbones = fa(symbol("\u{f714}"))
#let fa-skyatlas = fa(symbol("\u{f216}"))
#let fa-skype = fa(symbol("\u{f17e}"))
#let fa-slack = fa(symbol("\u{f198}"))
#let fa-slash = fa(symbol("\u{f715}"))
#let fa-sleigh = fa(symbol("\u{f7cc}"))
#let fa-sliders = fa(symbol("\u{f1de}"))
#let fa-slideshare = fa(symbol("\u{f1e7}"))
#let fa-smog = fa(symbol("\u{f75f}"))
#let fa-smoking = fa(symbol("\u{f48d}"))
#let fa-snapchat = fa(symbol("\u{f2ab}"))
#let fa-snowflake = fa(symbol("\u{f2dc}"))
#let fa-snowman = fa(symbol("\u{f7d0}"))
#let fa-snowplow = fa(symbol("\u{f7d2}"))
#let fa-soap = fa(symbol("\u{e06e}"))
#let fa-socks = fa(symbol("\u{f696}"))
#let fa-solar-panel = fa(symbol("\u{f5ba}"))
#let fa-sort = fa(symbol("\u{f0dc}"))
#let fa-sort-down = fa(symbol("\u{f0dd}"))
#let fa-sort-up = fa(symbol("\u{f0de}"))
#let fa-soundcloud = fa(symbol("\u{f1be}"))
#let fa-sourcetree = fa(symbol("\u{f7d3}"))
#let fa-spa = fa(symbol("\u{f5bb}"))
#let fa-space-awesome = fa(symbol("\u{e5ac}"))
#let fa-spaghetti-monster-flying = fa(symbol("\u{f67b}"))
#let fa-speakap = fa(symbol("\u{f3f3}"))
#let fa-speaker-deck = fa(symbol("\u{f83c}"))
#let fa-spell-check = fa(symbol("\u{f891}"))
#let fa-spider = fa(symbol("\u{f717}"))
#let fa-spinner = fa(symbol("\u{f110}"))
#let fa-splotch = fa(symbol("\u{f5bc}"))
#let fa-spoon = fa(symbol("\u{f2e5}"))
#let fa-spotify = fa(symbol("\u{f1bc}"))
#let fa-spray-can = fa(symbol("\u{f5bd}"))
#let fa-spray-can-sparkles = fa(symbol("\u{f5d0}"))
#let fa-square = fa(symbol("\u{f0c8}"))
#let fa-square-arrow-up-right = fa(symbol("\u{f14c}"))
#let fa-square-behance = fa(symbol("\u{f1b5}"))
#let fa-square-caret-down = fa(symbol("\u{f150}"))
#let fa-square-caret-left = fa(symbol("\u{f191}"))
#let fa-square-caret-right = fa(symbol("\u{f152}"))
#let fa-square-caret-up = fa(symbol("\u{f151}"))
#let fa-square-check = fa(symbol("\u{f14a}"))
#let fa-square-dribbble = fa(symbol("\u{f397}"))
#let fa-square-envelope = fa(symbol("\u{f199}"))
#let fa-square-facebook = fa(symbol("\u{f082}"))
#let fa-square-font-awesome = fa(symbol("\u{e5ad}"))
#let fa-square-font-awesome-stroke = fa(symbol("\u{f35c}"))
#let fa-square-full = fa(symbol("\u{f45c}"))
#let fa-square-git = fa(symbol("\u{f1d2}"))
#let fa-square-github = fa(symbol("\u{f092}"))
#let fa-square-gitlab = fa(symbol("\u{e5ae}"))
#let fa-square-google-plus = fa(symbol("\u{f0d4}"))
#let fa-square-h = fa(symbol("\u{f0fd}"))
#let fa-square-hacker-news = fa(symbol("\u{f3af}"))
#let fa-square-instagram = fa(symbol("\u{e055}"))
#let fa-square-js = fa(symbol("\u{f3b9}"))
#let fa-square-lastfm = fa(symbol("\u{f203}"))
#let fa-square-minus = fa(symbol("\u{f146}"))
#let fa-square-nfi = fa(symbol("\u{e576}"))
#let fa-square-odnoklassniki = fa(symbol("\u{f264}"))
#let fa-square-parking = fa(symbol("\u{f540}"))
#let fa-square-pen = fa(symbol("\u{f14b}"))
#let fa-square-person-confined = fa(symbol("\u{e577}"))
#let fa-square-phone = fa(symbol("\u{f098}"))
#let fa-square-phone-flip = fa(symbol("\u{f87b}"))
#let fa-square-pied-piper = fa(symbol("\u{e01e}"))
#let fa-square-pinterest = fa(symbol("\u{f0d3}"))
#let fa-square-plus = fa(symbol("\u{f0fe}"))
#let fa-square-poll-horizontal = fa(symbol("\u{f682}"))
#let fa-square-poll-vertical = fa(symbol("\u{f681}"))
#let fa-square-reddit = fa(symbol("\u{f1a2}"))
#let fa-square-root-variable = fa(symbol("\u{f698}"))
#let fa-square-rss = fa(symbol("\u{f143}"))
#let fa-square-share-nodes = fa(symbol("\u{f1e1}"))
#let fa-square-snapchat = fa(symbol("\u{f2ad}"))
#let fa-square-steam = fa(symbol("\u{f1b7}"))
#let fa-square-tumblr = fa(symbol("\u{f174}"))
#let fa-square-twitter = fa(symbol("\u{f081}"))
#let fa-square-up-right = fa(symbol("\u{f360}"))
#let fa-square-viadeo = fa(symbol("\u{f2aa}"))
#let fa-square-vimeo = fa(symbol("\u{f194}"))
#let fa-square-virus = fa(symbol("\u{e578}"))
#let fa-square-whatsapp = fa(symbol("\u{f40c}"))
#let fa-square-xing = fa(symbol("\u{f169}"))
#let fa-square-xmark = fa(symbol("\u{f2d3}"))
#let fa-square-youtube = fa(symbol("\u{f431}"))
#let fa-squarespace = fa(symbol("\u{f5be}"))
#let fa-stack-exchange = fa(symbol("\u{f18d}"))
#let fa-stack-overflow = fa(symbol("\u{f16c}"))
#let fa-stackpath = fa(symbol("\u{f842}"))
#let fa-staff-snake = fa(symbol("\u{e579}"))
#let fa-stairs = fa(symbol("\u{e289}"))
#let fa-stamp = fa(symbol("\u{f5bf}"))
#let fa-stapler = fa(symbol("\u{e5af}"))
#let fa-star = fa(symbol("\u{f005}"))
#let fa-star-and-crescent = fa(symbol("\u{f699}"))
#let fa-star-half = fa(symbol("\u{f089}"))
#let fa-star-half-stroke = fa(symbol("\u{f5c0}"))
#let fa-star-of-david = fa(symbol("\u{f69a}"))
#let fa-star-of-life = fa(symbol("\u{f621}"))
#let fa-staylinked = fa(symbol("\u{f3f5}"))
#let fa-steam = fa(symbol("\u{f1b6}"))
#let fa-steam-symbol = fa(symbol("\u{f3f6}"))
#let fa-sterling-sign = fa(symbol("\u{f154}"))
#let fa-stethoscope = fa(symbol("\u{f0f1}"))
#let fa-sticker-mule = fa(symbol("\u{f3f7}"))
#let fa-stop = fa(symbol("\u{f04d}"))
#let fa-stopwatch = fa(symbol("\u{f2f2}"))
#let fa-stopwatch-20 = fa(symbol("\u{e06f}"))
#let fa-store = fa(symbol("\u{f54e}"))
#let fa-store-slash = fa(symbol("\u{e071}"))
#let fa-strava = fa(symbol("\u{f428}"))
#let fa-street-view = fa(symbol("\u{f21d}"))
#let fa-strikethrough = fa(symbol("\u{f0cc}"))
#let fa-stripe = fa(symbol("\u{f429}"))
#let fa-stripe-s = fa(symbol("\u{f42a}"))
#let fa-stroopwafel = fa(symbol("\u{f551}"))
#let fa-stubber = fa(symbol("\u{e5c7}"))
#let fa-studiovinari = fa(symbol("\u{f3f8}"))
#let fa-stumbleupon = fa(symbol("\u{f1a4}"))
#let fa-stumbleupon-circle = fa(symbol("\u{f1a3}"))
#let fa-subscript = fa(symbol("\u{f12c}"))
#let fa-suitcase = fa(symbol("\u{f0f2}"))
#let fa-suitcase-medical = fa(symbol("\u{f0fa}"))
#let fa-suitcase-rolling = fa(symbol("\u{f5c1}"))
#let fa-sun = fa(symbol("\u{f185}"))
#let fa-sun-plant-wilt = fa(symbol("\u{e57a}"))
#let fa-superpowers = fa(symbol("\u{f2dd}"))
#let fa-superscript = fa(symbol("\u{f12b}"))
#let fa-supple = fa(symbol("\u{f3f9}"))
#let fa-suse = fa(symbol("\u{f7d6}"))
#let fa-swatchbook = fa(symbol("\u{f5c3}"))
#let fa-swift = fa(symbol("\u{f8e1}"))
#let fa-symfony = fa(symbol("\u{f83d}"))
#let fa-synagogue = fa(symbol("\u{f69b}"))
#let fa-syringe = fa(symbol("\u{f48e}"))
#let fa-t = fa(symbol("\u{54}"))
#let fa-table = fa(symbol("\u{f0ce}"))
#let fa-table-cells = fa(symbol("\u{f00a}"))
#let fa-table-cells-large = fa(symbol("\u{f009}"))
#let fa-table-columns = fa(symbol("\u{f0db}"))
#let fa-table-list = fa(symbol("\u{f00b}"))
#let fa-table-tennis-paddle-ball = fa(symbol("\u{f45d}"))
#let fa-tablet = fa(symbol("\u{f3fb}"))
#let fa-tablet-button = fa(symbol("\u{f10a}"))
#let fa-tablet-screen-button = fa(symbol("\u{f3fa}"))
#let fa-tablets = fa(symbol("\u{f490}"))
#let fa-tachograph-digital = fa(symbol("\u{f566}"))
#let fa-tag = fa(symbol("\u{f02b}"))
#let fa-tags = fa(symbol("\u{f02c}"))
#let fa-tape = fa(symbol("\u{f4db}"))
#let fa-tarp = fa(symbol("\u{e57b}"))
#let fa-tarp-droplet = fa(symbol("\u{e57c}"))
#let fa-taxi = fa(symbol("\u{f1ba}"))
#let fa-teamspeak = fa(symbol("\u{f4f9}"))
#let fa-teeth = fa(symbol("\u{f62e}"))
#let fa-teeth-open = fa(symbol("\u{f62f}"))
#let fa-telegram = fa(symbol("\u{f2c6}"))
#let fa-temperature-arrow-down = fa(symbol("\u{e03f}"))
#let fa-temperature-arrow-up = fa(symbol("\u{e040}"))
#let fa-temperature-empty = fa(symbol("\u{f2cb}"))
#let fa-temperature-full = fa(symbol("\u{f2c7}"))
#let fa-temperature-half = fa(symbol("\u{f2c9}"))
#let fa-temperature-high = fa(symbol("\u{f769}"))
#let fa-temperature-low = fa(symbol("\u{f76b}"))
#let fa-temperature-quarter = fa(symbol("\u{f2ca}"))
#let fa-temperature-three-quarters = fa(symbol("\u{f2c8}"))
#let fa-tencent-weibo = fa(symbol("\u{f1d5}"))
#let fa-tenge-sign = fa(symbol("\u{f7d7}"))
#let fa-tent = fa(symbol("\u{e57d}"))
#let fa-tent-arrow-down-to-line = fa(symbol("\u{e57e}"))
#let fa-tent-arrow-left-right = fa(symbol("\u{e57f}"))
#let fa-tent-arrow-turn-left = fa(symbol("\u{e580}"))
#let fa-tent-arrows-down = fa(symbol("\u{e581}"))
#let fa-tents = fa(symbol("\u{e582}"))
#let fa-terminal = fa(symbol("\u{f120}"))
#let fa-text-height = fa(symbol("\u{f034}"))
#let fa-text-slash = fa(symbol("\u{f87d}"))
#let fa-text-width = fa(symbol("\u{f035}"))
#let fa-the-red-yeti = fa(symbol("\u{f69d}"))
#let fa-themeco = fa(symbol("\u{f5c6}"))
#let fa-themeisle = fa(symbol("\u{f2b2}"))
#let fa-thermometer = fa(symbol("\u{f491}"))
#let fa-think-peaks = fa(symbol("\u{f731}"))
#let fa-thumbs-down = fa(symbol("\u{f165}"))
#let fa-thumbs-up = fa(symbol("\u{f164}"))
#let fa-thumbtack = fa(symbol("\u{f08d}"))
#let fa-ticket = fa(symbol("\u{f145}"))
#let fa-ticket-simple = fa(symbol("\u{f3ff}"))
#let fa-tiktok = fa(symbol("\u{e07b}"))
#let fa-timeline = fa(symbol("\u{e29c}"))
#let fa-toggle-off = fa(symbol("\u{f204}"))
#let fa-toggle-on = fa(symbol("\u{f205}"))
#let fa-toilet = fa(symbol("\u{f7d8}"))
#let fa-toilet-paper = fa(symbol("\u{f71e}"))
#let fa-toilet-paper-slash = fa(symbol("\u{e072}"))
#let fa-toilet-portable = fa(symbol("\u{e583}"))
#let fa-toilets-portable = fa(symbol("\u{e584}"))
#let fa-toolbox = fa(symbol("\u{f552}"))
#let fa-tooth = fa(symbol("\u{f5c9}"))
#let fa-torii-gate = fa(symbol("\u{f6a1}"))
#let fa-tornado = fa(symbol("\u{f76f}"))
#let fa-tower-broadcast = fa(symbol("\u{f519}"))
#let fa-tower-cell = fa(symbol("\u{e585}"))
#let fa-tower-observation = fa(symbol("\u{e586}"))
#let fa-tractor = fa(symbol("\u{f722}"))
#let fa-trade-federation = fa(symbol("\u{f513}"))
#let fa-trademark = fa(symbol("\u{f25c}"))
#let fa-traffic-light = fa(symbol("\u{f637}"))
#let fa-trailer = fa(symbol("\u{e041}"))
#let fa-train = fa(symbol("\u{f238}"))
#let fa-train-subway = fa(symbol("\u{f239}"))
#let fa-train-tram = fa(symbol("\u{e5b4}"))
#let fa-transgender = fa(symbol("\u{f225}"))
#let fa-trash = fa(symbol("\u{f1f8}"))
#let fa-trash-arrow-up = fa(symbol("\u{f829}"))
#let fa-trash-can = fa(symbol("\u{f2ed}"))
#let fa-trash-can-arrow-up = fa(symbol("\u{f82a}"))
#let fa-tree = fa(symbol("\u{f1bb}"))
#let fa-tree-city = fa(symbol("\u{e587}"))
#let fa-trello = fa(symbol("\u{f181}"))
#let fa-triangle-exclamation = fa(symbol("\u{f071}"))
#let fa-trophy = fa(symbol("\u{f091}"))
#let fa-trowel = fa(symbol("\u{e589}"))
#let fa-trowel-bricks = fa(symbol("\u{e58a}"))
#let fa-truck = fa(symbol("\u{f0d1}"))
#let fa-truck-arrow-right = fa(symbol("\u{e58b}"))
#let fa-truck-droplet = fa(symbol("\u{e58c}"))
#let fa-truck-fast = fa(symbol("\u{f48b}"))
#let fa-truck-field = fa(symbol("\u{e58d}"))
#let fa-truck-field-un = fa(symbol("\u{e58e}"))
#let fa-truck-front = fa(symbol("\u{e2b7}"))
#let fa-truck-medical = fa(symbol("\u{f0f9}"))
#let fa-truck-monster = fa(symbol("\u{f63b}"))
#let fa-truck-moving = fa(symbol("\u{f4df}"))
#let fa-truck-pickup = fa(symbol("\u{f63c}"))
#let fa-truck-plane = fa(symbol("\u{e58f}"))
#let fa-truck-ramp-box = fa(symbol("\u{f4de}"))
#let fa-tty = fa(symbol("\u{f1e4}"))
#let fa-tumblr = fa(symbol("\u{f173}"))
#let fa-turkish-lira-sign = fa(symbol("\u{e2bb}"))
#let fa-turn-down = fa(symbol("\u{f3be}"))
#let fa-turn-up = fa(symbol("\u{f3bf}"))
#let fa-tv = fa(symbol("\u{f26c}"))
#let fa-twitch = fa(symbol("\u{f1e8}"))
#let fa-twitter = fa(symbol("\u{f099}"))
#let fa-typo3 = fa(symbol("\u{f42b}"))
#let fa-u = fa(symbol("\u{55}"))
#let fa-uber = fa(symbol("\u{f402}"))
#let fa-ubuntu = fa(symbol("\u{f7df}"))
#let fa-uikit = fa(symbol("\u{f403}"))
#let fa-umbraco = fa(symbol("\u{f8e8}"))
#let fa-umbrella = fa(symbol("\u{f0e9}"))
#let fa-umbrella-beach = fa(symbol("\u{f5ca}"))
#let fa-uncharted = fa(symbol("\u{e084}"))
#let fa-underline = fa(symbol("\u{f0cd}"))
#let fa-uniregistry = fa(symbol("\u{f404}"))
#let fa-unity = fa(symbol("\u{e049}"))
#let fa-universal-access = fa(symbol("\u{f29a}"))
#let fa-unlock = fa(symbol("\u{f09c}"))
#let fa-unlock-keyhole = fa(symbol("\u{f13e}"))
#let fa-unsplash = fa(symbol("\u{e07c}"))
#let fa-untappd = fa(symbol("\u{f405}"))
#let fa-up-down = fa(symbol("\u{f338}"))
#let fa-up-down-left-right = fa(symbol("\u{f0b2}"))
#let fa-up-long = fa(symbol("\u{f30c}"))
#let fa-up-right-and-down-left-from-center = fa(symbol("\u{f424}"))
#let fa-up-right-from-square = fa(symbol("\u{f35d}"))
#let fa-upload = fa(symbol("\u{f093}"))
#let fa-ups = fa(symbol("\u{f7e0}"))
#let fa-usb = fa(symbol("\u{f287}"))
#let fa-user = fa(symbol("\u{f007}"))
#let fa-user-astronaut = fa(symbol("\u{f4fb}"))
#let fa-user-check = fa(symbol("\u{f4fc}"))
#let fa-user-clock = fa(symbol("\u{f4fd}"))
#let fa-user-doctor = fa(symbol("\u{f0f0}"))
#let fa-user-gear = fa(symbol("\u{f4fe}"))
#let fa-user-graduate = fa(symbol("\u{f501}"))
#let fa-user-group = fa(symbol("\u{f500}"))
#let fa-user-injured = fa(symbol("\u{f728}"))
#let fa-user-large = fa(symbol("\u{f406}"))
#let fa-user-large-slash = fa(symbol("\u{f4fa}"))
#let fa-user-lock = fa(symbol("\u{f502}"))
#let fa-user-minus = fa(symbol("\u{f503}"))
#let fa-user-ninja = fa(symbol("\u{f504}"))
#let fa-user-nurse = fa(symbol("\u{f82f}"))
#let fa-user-pen = fa(symbol("\u{f4ff}"))
#let fa-user-plus = fa(symbol("\u{f234}"))
#let fa-user-secret = fa(symbol("\u{f21b}"))
#let fa-user-shield = fa(symbol("\u{f505}"))
#let fa-user-slash = fa(symbol("\u{f506}"))
#let fa-user-tag = fa(symbol("\u{f507}"))
#let fa-user-tie = fa(symbol("\u{f508}"))
#let fa-user-xmark = fa(symbol("\u{f235}"))
#let fa-users = fa(symbol("\u{f0c0}"))
#let fa-users-between-lines = fa(symbol("\u{e591}"))
#let fa-users-gear = fa(symbol("\u{f509}"))
#let fa-users-line = fa(symbol("\u{e592}"))
#let fa-users-rays = fa(symbol("\u{e593}"))
#let fa-users-rectangle = fa(symbol("\u{e594}"))
#let fa-users-slash = fa(symbol("\u{e073}"))
#let fa-users-viewfinder = fa(symbol("\u{e595}"))
#let fa-usps = fa(symbol("\u{f7e1}"))
#let fa-ussunnah = fa(symbol("\u{f407}"))
#let fa-utensils = fa(symbol("\u{f2e7}"))
#let fa-v = fa(symbol("\u{56}"))
#let fa-vaadin = fa(symbol("\u{f408}"))
#let fa-van-shuttle = fa(symbol("\u{f5b6}"))
#let fa-vault = fa(symbol("\u{e2c5}"))
#let fa-vector-square = fa(symbol("\u{f5cb}"))
#let fa-venus = fa(symbol("\u{f221}"))
#let fa-venus-double = fa(symbol("\u{f226}"))
#let fa-venus-mars = fa(symbol("\u{f228}"))
#let fa-vest = fa(symbol("\u{e085}"))
#let fa-vest-patches = fa(symbol("\u{e086}"))
#let fa-viacoin = fa(symbol("\u{f237}"))
#let fa-viadeo = fa(symbol("\u{f2a9}"))
#let fa-vial = fa(symbol("\u{f492}"))
#let fa-vial-circle-check = fa(symbol("\u{e596}"))
#let fa-vial-virus = fa(symbol("\u{e597}"))
#let fa-vials = fa(symbol("\u{f493}"))
#let fa-viber = fa(symbol("\u{f409}"))
#let fa-video = fa(symbol("\u{f03d}"))
#let fa-video-slash = fa(symbol("\u{f4e2}"))
#let fa-vihara = fa(symbol("\u{f6a7}"))
#let fa-vimeo = fa(symbol("\u{f40a}"))
#let fa-vimeo-v = fa(symbol("\u{f27d}"))
#let fa-vine = fa(symbol("\u{f1ca}"))
#let fa-virus = fa(symbol("\u{e074}"))
#let fa-virus-covid = fa(symbol("\u{e4a8}"))
#let fa-virus-covid-slash = fa(symbol("\u{e4a9}"))
#let fa-virus-slash = fa(symbol("\u{e075}"))
#let fa-viruses = fa(symbol("\u{e076}"))
#let fa-vk = fa(symbol("\u{f189}"))
#let fa-vnv = fa(symbol("\u{f40b}"))
#let fa-voicemail = fa(symbol("\u{f897}"))
#let fa-volcano = fa(symbol("\u{f770}"))
#let fa-volleyball = fa(symbol("\u{f45f}"))
#let fa-volume-high = fa(symbol("\u{f028}"))
#let fa-volume-low = fa(symbol("\u{f027}"))
#let fa-volume-off = fa(symbol("\u{f026}"))
#let fa-volume-xmark = fa(symbol("\u{f6a9}"))
#let fa-vr-cardboard = fa(symbol("\u{f729}"))
#let fa-vuejs = fa(symbol("\u{f41f}"))
#let fa-w = fa(symbol("\u{57}"))
#let fa-walkie-talkie = fa(symbol("\u{f8ef}"))
#let fa-wallet = fa(symbol("\u{f555}"))
#let fa-wand-magic = fa(symbol("\u{f0d0}"))
#let fa-wand-magic-sparkles = fa(symbol("\u{e2ca}"))
#let fa-wand-sparkles = fa(symbol("\u{f72b}"))
#let fa-warehouse = fa(symbol("\u{f494}"))
#let fa-watchman-monitoring = fa(symbol("\u{e087}"))
#let fa-water = fa(symbol("\u{f773}"))
#let fa-water-ladder = fa(symbol("\u{f5c5}"))
#let fa-wave-square = fa(symbol("\u{f83e}"))
#let fa-waze = fa(symbol("\u{f83f}"))
#let fa-weebly = fa(symbol("\u{f5cc}"))
#let fa-weibo = fa(symbol("\u{f18a}"))
#let fa-weight-hanging = fa(symbol("\u{f5cd}"))
#let fa-weight-scale = fa(symbol("\u{f496}"))
#let fa-weixin = fa(symbol("\u{f1d7}"))
#let fa-whatsapp = fa(symbol("\u{f232}"))
#let fa-wheat-awn = fa(symbol("\u{e2cd}"))
#let fa-wheat-awn-circle-exclamation = fa(symbol("\u{e598}"))
#let fa-wheelchair = fa(symbol("\u{f193}"))
#let fa-wheelchair-move = fa(symbol("\u{e2ce}"))
#let fa-whiskey-glass = fa(symbol("\u{f7a0}"))
#let fa-whmcs = fa(symbol("\u{f40d}"))
#let fa-wifi = fa(symbol("\u{f1eb}"))
#let fa-wikipedia-w = fa(symbol("\u{f266}"))
#let fa-wind = fa(symbol("\u{f72e}"))
#let fa-window-maximize = fa(symbol("\u{f2d0}"))
#let fa-window-minimize = fa(symbol("\u{f2d1}"))
#let fa-window-restore = fa(symbol("\u{f2d2}"))
#let fa-windows = fa(symbol("\u{f17a}"))
#let fa-wine-bottle = fa(symbol("\u{f72f}"))
#let fa-wine-glass = fa(symbol("\u{f4e3}"))
#let fa-wine-glass-empty = fa(symbol("\u{f5ce}"))
#let fa-wirsindhandwerk = fa(symbol("\u{e2d0}"))
#let fa-wix = fa(symbol("\u{f5cf}"))
#let fa-wizards-of-the-coast = fa(symbol("\u{f730}"))
#let fa-wodu = fa(symbol("\u{e088}"))
#let fa-wolf-pack-battalion = fa(symbol("\u{f514}"))
#let fa-won-sign = fa(symbol("\u{f159}"))
#let fa-wordpress = fa(symbol("\u{f19a}"))
#let fa-wordpress-simple = fa(symbol("\u{f411}"))
#let fa-worm = fa(symbol("\u{e599}"))
#let fa-wpbeginner = fa(symbol("\u{f297}"))
#let fa-wpexplorer = fa(symbol("\u{f2de}"))
#let fa-wpforms = fa(symbol("\u{f298}"))
#let fa-wpressr = fa(symbol("\u{f3e4}"))
#let fa-wrench = fa(symbol("\u{f0ad}"))
#let fa-x = fa(symbol("\u{58}"))
#let fa-x-ray = fa(symbol("\u{f497}"))
#let fa-xbox = fa(symbol("\u{f412}"))
#let fa-xing = fa(symbol("\u{f168}"))
#let fa-xmark = fa(symbol("\u{f00d}"))
#let fa-xmarks-lines = fa(symbol("\u{e59a}"))
#let fa-y = fa(symbol("\u{59}"))
#let fa-y-combinator = fa(symbol("\u{f23b}"))
#let fa-yahoo = fa(symbol("\u{f19e}"))
#let fa-yammer = fa(symbol("\u{f840}"))
#let fa-yandex = fa(symbol("\u{f413}"))
#let fa-yandex-international = fa(symbol("\u{f414}"))
#let fa-yarn = fa(symbol("\u{f7e3}"))
#let fa-yelp = fa(symbol("\u{f1e9}"))
#let fa-yen-sign = fa(symbol("\u{f157}"))
#let fa-yin-yang = fa(symbol("\u{f6ad}"))
#let fa-yoast = fa(symbol("\u{f2b1}"))
#let fa-youtube = fa(symbol("\u{f167}"))
#let fa-z = fa(symbol("\u{5a}"))
#let fa-zhihu = fa(symbol("\u{f63f}"))
|
https://github.com/v0sem/sicp | https://raw.githubusercontent.com/v0sem/sicp/main/exercises.typ | typst | #import "@local/cetz:0.2.0"
= SICP Exercises
This is my solution to most of the exercises on the sicp book. The main difference with the book itself is that the book proposes using scheme and I solved them using common lisp, which has some different keywords and uses.
I will try to keep the code closer to scheme, keeping with the spirit of the chapter or exercise.
== Chapter 1: Building Abstractions with Procedures
=== Exercise 1.1
- `10`
- `(+ 5 3 4)` $->$ `12`
- `(- 9 1)` $->$ `8`
- `(/ 6 2)` $->$ `3`
- `(+ (* 2 4) (- 4 6))` $->$ `6`
- ```clj (define a 3) ``` $->$ Stores 3 into var _a_
- ```clj (define b (+ a 1)) ``` $->$ Stores 4 `(+ 3 1)` into var _b_
- `(+ a b (* a b))` $->$ `19`
- `(= a b)` $->$ `NIL`
- ```clj
(if (and (> b a) (< b (* a b)))
b
a)```
~~~~~~~~~$arrow.r.curve$ `4`
- ```clj
(cond ((= a 4) 6)
((= b 4) (+ 6 7 a)
(else 25)))```
~~~~~~~~~~~~$arrow.r.curve$ `16`
- `(+ 2 (if (> b a) b a))` $->$ `6`
- ```clj
(* (cond ((> a b) a)
((< a b) b)
(else -1))
(+ a 1))```
~~~~~~~~~$arrow.r.curve$ `16`
=== Exercise 1.2
```clj
(/ (+ 5 4 (- 2
(- 3
(+ 6
(/ 4 5)))))
(* 3
(- 6 2)
(- 2 7)))
```
#pagebreak()
=== Exercise 1.3
```clj
(define ex1.3 (x y z)
(cond ((> x y)
(if (> y z)
(+ (* x x) (* y y))
(+ (* x x) (* z z))))
(t
(if (> x z)
(+ (* y y) (* x x))
(+ (* y y) (* z z))))))
```
=== Exercise 1.4
The function `a-plus-abs-b` utilizes the if condition to change the operation to a sum if b is positive or a substraction otherwise, acting as $|b|$.
Mathematically:
#set math.cases(gap: 1em)
$"a-plus-abs-b"(a, b) = cases(
a + b "if" b > 0,
a - b "if" b < 0,
) eq.triple a + |b|$
=== Exercise 1.5
With an applicative order evaluation, the test function will not run properly because `(p)` will loop on itself, continiously running `(test 0 (p))`. Using normal order evaluation, because $y$ is not utilized on the `test` function, the `if` clause will be executed and resolve to $0$.
=== Exercise 1.6
The new if does not work in the `sqrt-iter` function, it throws a _stack overflow_ type error.
This is because the special form `if` runs in applicative order, thus evaluating the predicate and only running `then` or `else` when needed. In the case of `new-if`, because of the recursive call, it will be stuck evaluating that.
=== Exercise 1.7
Trying out the newton method, on very low numbers ($0.0001$) returns not very accurate results, compared to an actual square root method, comparing it with the common lisp `sqrt`:
- ```clj (sqrt 0.0001)``` $-> 0.01$
- ```clj (newton-sqrt 0.0001)``` $-> 0.032308448$
Now, with large numbers, what happens is that the number of operations exponentially increases and gets stuck evaluating. So, if we were to try and fix the first issue with smaller numbers, making our `good-enough?` function use a lower boundary, we would eventually reach the second problem, getting stuck in recursion.
Implementing the new `not-better?` function:
```clj
(defun not-better? (guess prev-guess)
(< (abs (/ (- guess prev-guess) guess)) 0.0000000001))
```
And changing `sqrt-iter` accordingly:
```clj
(defun sqrt-iter (guess x)
(if (not-better? (improve guess x) guess)
guess
(sqrt-iter (improve guess x)
x)))
```
Our results err much less _relative_ to the values, thus fixing our problems with disproportionately large and small numbers
=== Exercise 1.8
To change this we reimplement the functions, which are very similar. The only notable change is the new improve function:
```clj
(defun improve-cube (guess x)
(/ (+ (/ x (square guess)) (* 2 guess)) 3))
```
The rest of the `cube-iter` function is identical to sqrt-iter. #link("./code/newton-sqrt.lisp", "See code").
=== Exercise 1.9
The first implementation follows a recursive structure:
```clj
(+ 4 5)
(inc (+ 3 5))
(inc (inc (+ 2 5)))
(inc (inc (inc (+ 1 5))))
(inc (inc (inc (inc (+ 0 5)))))
(inc (inc (inc (inc 5))))
(inc (inc (inc 6)))
(inc (inc 7))
(inc 8)
9
```
Second implementation is an iterative process:
```clj
(+ 4 5)
(+ 3 6)
(+ 2 7)
(+ 1 8)
(+ 0 9)
9
```
=== Exercise 1.10
- ```clj (A 1 10)``` $-> 1024$
- ```clj (A 2 4)``` $-> 65536$
- ```clj (A 3 3)``` $-> 65536$
$------------------$
- ```clj (f n)``` $-> 2*n$
- ```clj (g n)``` $-> 2^n$
- ```clj (h n)``` $-> 2^(h(n-1))$
=== Exercise 1.11
Recursive version:
```clj
(defun f-1.11-rec (n)
(if (< n 3)
n
(+
(f-1.11-rec (- n 1))
(* 2 (f-1.11-rec (- n 2)))
(* 3 (f-1.11-rec (- n 3))))))
```
#pagebreak()
Iterative version:
```clj
(defun f-1.11 (n)
(f-1.11-iter 2 1 0 n))
(defun f-1.11-iter (a b c count)
(if (= count 0)
c
(f-1.11-iter (+ a (* 2 b) (* 3 c)) a b (- count 1))))
```
=== Exercise 1.12
I separated the code into rows and number calculation but the execution is still recursive.
```clj
(defun pasc-num (row col)
(cond ((< row 1) 1)
((or (<= col 1) (>= col row)) 1)
(T (+ (pasc-num (- row 1) (- col 1)) (pasc-num (- row 1) col)))))
(defun pasc-row (row)
(loop for item from 1 to row do
(write (pasc-num row item))
(write-char #\Space))
(write-char #\Newline))
(defun pasc (row)
(loop for i from 1 to row do
(pasc-row i)))
```
=== Exercise 1.14
#let data = ([11 - 50], ([11 - 25], ([11 - 10], ([11 - 5], ([11 - 1], ([11 - 0], [0]), ([10 - 1], ([...], [1]))), ([6 - 5], ([6 - 1], ([6 - 0], [0]), ([5 - 1], ([...], [1]), ([-4 -5], [0]))), ([1 - 5], ([1 - 1], ([1 - 0], [0]), ([0 - 1], [1])), ([-4 -5], [0])))), ([1 - 10], ([1 - 5], ([1 - 1], ([1 - 0], [0]), ([0 - 1], [1])), ([-4 - 5], [0])), ([-9 - 10], [0]))), ([-14 - 25], [0])), ([-39 - 50], [0]))
#cetz.canvas(length: .4cm, {
import cetz.draw: *
cetz.draw.set-style(content: (padding: .2),
fill: gray.lighten(70%),
stroke: gray)
cetz.tree.tree(data, spread: 2, grow: 3, draw-node: (node, ..) => {
circle((), radius: 1, stroke: none)
content((), node.content)
}, draw-edge: (from, to, ..) => {
line((a: from, number: .6, b: to), (a: to, number: .6, b: from), mark: (end: ">"))
}, name: "tree")
})
The amount of operations grows by one and then doubles every time a threshold is hit for every threshold.
Simplifying in big O notation, we can evaluate per number of types of coins.
For one type of coin we can see that it gets one deeper for every extra one value in the amount, for example $5 - 1$ takes $5$ steps to evaluate. In big O notation:
$Theta \(n\)$
For two types of coins, we add more depth every time we hit the threshold.
$n/5 + 1 + limits(sum)^(n/5)_(i=0) T (n-5i, 1)$
Which means the second tree gets a depth of $n/5$ and another smaller tree per time it has hit the $5$ coin threshold. For example in the 11 coins, you would get your normal depth _n_ tree for the 11 one cent coins, a tree for two 5 cent coins and one 1 cent coin, and another for one 5 cent and six 1 cent.
Simplified and reduced for big O notation:
$Theta (n^2)$
We could keep proving this upwards but with 5 types of coins we end up with:
$Theta (n^5)$
Which grows very big when _n_ is bigger.
=== Exercise 1.15
#set enum(numbering: "a.")
+ How many times is p applied when calling ```clj (sine 12.15)```
Appling trace to p, we can see:
```clj
|CL-USER> (trace p)
│(P)
│CL-USER> (sine 12.15)
│ 0: (P 0.049999997)
│ 0: P returned 0.1495
│ 0: (P 0.1495)
│ 0: P returned 0.43513453
│ 0: (P 0.43513453)
│ 0: P returned 0.9758465
│ 0: (P 0.9758465)
│ 0: P returned -0.7895632
│ 0: (P -0.7895632)
```
A total of 5 times (once per execution of `sine`)
+ The function grows in $O(log(x))$
=== Exercise 1.16 |
|
https://github.com/crd2333/crd2333.github.io | https://raw.githubusercontent.com/crd2333/crd2333.github.io/main/src/docs/Courses/计算机组成与设计/IO.typ | typst | ---
order: 6
---
#import "/src/components/TypstTemplate/lib.typ": *
#show: project.with(
title: "计算机组成与设计",
lang: "zh",
)
#let tbl_white(white_row: 1 , content_size: 9pt,..args) = align(center, block[
#show table.cell: it => if it.y <= white_row - 1 {
set text(fill: white, stroke: white)
it
} else {
set text(size: content_size)
it
}
#tbl(..args)
])
#counter(heading).update(5)
= Storage, Network and other I/O Topics
#info()[
+ Introduction
+ Disk Storage and Dependability
+ Networks (Skim)
+ Buses and Other Connections between Processors Memory, and I/O Devices
+ Interfacing I/O Devices to the Memory, Processor, and Operating System
+ I/O Performance Measures: Examples from Disk and File Systems
+ Designing an I/O system
+ Real Stuff: A Typical Desktop I/O System
]
== Introduction
- I/O 设计需要考虑可扩展性、可恢复性、性能
- 评估 I/O 设备的性能往往十分困难
- 其性能取决于
+ connection between devices and the system
+ the memory hierarchy
+ the operating system
- 从另一个角度来看
+ Throughput(吞吐量)
+ Response time(响应时间)
- Three characteristics
- Behavior: input, output, storage
- Partner: human, machine
- Data rate
== Disk Storage and Dependability
- 分为软盘(floppy disks)和硬盘(hard disks)
- Dependability Measures
- MTTF(Mean Time To Failure): 平均无故障时间
- 一个例子,如果有 100000 个硬盘,$"MTTF" approx 114"年"$,一年有 $1/144 times 100000 approx 876$ 个硬盘坏掉。也就是说,单看某一个硬盘坏掉的概率很低,但是很多硬盘坏掉其中几个是很常见的
- MTTR(Mean Time To Repair): 平均修复时间
- MTBF(Mean Time Between Failure) = MTTF + MTTR: 平均故障间隔时间
- Availability = MTTF / (MTTF + MTTR) = MTTF / MTBF: 可用性
- Improve MTTF
+ Fault avoidance
+ Fault tolerance
+ Fault forecasting
- The Hamming SEC Code
- 没懂,不考
- 磁盘的设计:使用小磁盘组成阵列以降低成本,但降低可靠性
- 比如用 $N$ 个盘组成一个大盘,MTTF 降低了 $N$ 倍
- 使用冗余信息来提高可靠性(RAID: Redundant Arrays of Inexpensive Disks),有 $7$ 个 level
- 这里很多图片,看 PPT 吧
- 一些论断
+ RAID systems rely on redundancy to achieve high availability.
+ RAID 1(mirroring)has the highest check disk overhead.
+ For small writes,RAID 3(bit-interleaved parity)has the worst throughput.
+ For large writes,RAID 3,4,and 5 have the same throughput.
== Networks
- skipped
== Buses and Other Connections between Processors Memory, and I/O Devices
- 包括两种线路:控制线路和数据线路
- 总线事务:input, output
- `output` operation
#fig("/public/assets/Courses/计组/img-2024-05-27-09-25-21.png")
- `input` operation
#fig("/public/assets/Courses/计组/img-2024-05-27-09-25-51.png")
- Types of buses:
- processor-memory (short, high speed, custom design)
- backplane (high speed, often standardized, e.g., PCI)
- I/O (lengthy, different devices, standardized, e.g., SCSI)
- 在最开始,Backplane bus 不仅控制 Processor 和 Memory,还要支持不同的 I/O 设备
#fig("/public/assets/Courses/计组/img-2024-05-27-09-29-53.png")
- ...
#fig("/public/assets/Courses/计组/img-2024-05-27-09-30-18.png")
- ...
#fig("/public/assets/Courses/计组/img-2024-05-27-09-30-39.png")
- Synchronous vs. Asynchronous
- Synchronization buses 使用同步时钟和同步协议,快且小但是需要不同设备工作速度一致,并且不适合长距离(clock skew)
- Asynchronous buses 使用 handshake 协议
- Handshaking protocol,握手协议
- ReadReq,读请求
- DataRdy,数据准备好
- Ack(acknowledge),接受信息的那一方给确认信号
- 一共七个步骤如下,红色线是接受方,黑色线是 memory
#fig("/public/assets/Courses/计组/img-2024-05-29-10-08-35.png")
- 使用 FSM 实现握手协议
#fig("/public/assets/Courses/计组/img-2024-05-29-10-13-36.png")
- Obtaining Access to the Bus
- 一般都是多个设备共享一条总线进行数据通信,其中如果多个设备同时发送接收数据的话,从而产生总线竞争,会导致通信冲突导致通信失败,所以在总线上要引入一个仲裁机制(Bus Arbitration)来决定什么时间谁来占用总线的通信
- 部分仲裁机制需要有一个 bus master 来控制总线的访问权,不然会产生混乱
- processor is always a bus master
- 从 buses 中细分出 bus request lines
- Bus Arbitration
- 常见四种仲裁机制,主要考量两点:bus priority、fairness
+ daisy chain arbitration: 菊花链,阻塞式级联(不是很公平)
- 有一种*计数器*的改进,起始查询的位置不固定
+ centralized, parallel arbitration (requires an arbiter), e.g., PCI
+ self selection, e.g., NuBus used in Macintosh(不需要 master,每个设备根据自己的优先级自行选择)
+ collision detection, e.g., Ethernet(如果碰撞了就都收回,过段时间再尝试)
- Bus Standards
- SCSI, PCI, IPI, USB, HDMI
== Interfacing I/O Devices to the Memory, Processor, and Operating System
- I/O 系统的三个特征
- shared by multiple programs using the processor.
- often use interrupts to communicate information about I/O operations.
- The low-level control of I/O devices is complex
- Three types of communication are required:
- OS 需要能对 I/O 设备发送控制信息
- I/O 设备需要能向 OS 回应
- Data must be transferred between memory and an I/O device
- Giving Commands to I/O Devices,两种方法来 address
- memory-mapped I/O,I/O 的地址与 memory 的地址统一(相当于把 memory 划一部分给 I/O),于是 lw, sw 等指令就可以直接访问 I/O 端口
- special I/O instructions,通过特殊的指令来访问 I/O 端口
- I/O 设备需要有命令端口、数据端口,命令寄存器、数据寄存器
- I/O system data transfer control mode
- Polling:processor 定期查看 status bit 来确定是否到下个 I/O 操作的时刻
- interrupt:用的最多,I/O 有需求的时候给 CPU 一个中断,CPU 处理完之后就可以去做自己的事情
#fig("/public/assets/Courses/计组/img-2024-05-29-10-56-39.png")
- DMA(direct memory access):适合高速的数据传输设备,需要三步
+ processor 启动 DMA
+ DMA 负责传输
+ DMA 做完之后请求 processor 中断,让其进行检查
#fig("/public/assets/Courses/计组/img-2024-05-29-11-00-19.png")
- compare:
+ polling:需要 processor 不停查看是否需要传输,浪费了 processor time,只适用于查询率较低的 I/O 设备
+ Interrupt:只在执行和检查的时候占用 processor time
+ DMA:执行时也不需要 processor 的控制
== I/O Performance Measures: Examples from Disk and File Systems
- 性能测量很复杂,一般就是运行几个基准程序来测量
- Supercomputer I/O Benchmarks
- Transaction Processing I/O Benchmarks
- File System I/O Benchmarks: MakeDir, Copy, ScanDir, ReadAll, Make
- Performance analysis of Synchronous versus Asynchronous buses
- Synchronization
#fig("/public/assets/Courses/计组/img-2024-05-29-11-14-28.png")
- Asynchronous
- 主要是说阶段 2,3,4 可以和 memory access time overlap
- 只快 20% 是因为(?)
#fig("/public/assets/Courses/计组/img-2024-05-29-11-14-58.png")
- Increasing the Bus Bandwidth 的计算
- polling, interrupt, DMA 的计算
== Designing an I/O system
- to be continued
|
|
https://github.com/Amelia-Mowers/typst-tabut | https://raw.githubusercontent.com/Amelia-Mowers/typst-tabut/main/doc/example-snippets/align-manual.typ | typst | MIT License | #import "@preview/tabut:<<VERSION>>": tabut
#import "usd.typ": usd
#import "example-data/supplies.typ": supplies
#tabut(
supplies,
(
(header: [*\#*], func: r => r._index),
(header: [*Name*], func: r => r.name),
(header: [*Price*], func: r => usd(r.price)),
(header: [*Quantity*], func: r => r.quantity),
),
align: (auto, right, right, right), // Alignment defined as in standard table function
fill: (_, row) => if calc.odd(row) { luma(240) } else { luma(220) },
stroke: none
) |
https://github.com/jamesrswift/dining-table | https://raw.githubusercontent.com/jamesrswift/dining-table/main/tests/topdown/ledger/test.typ | typst | The Unlicense | #import "../ledger.typ": *
#set text(size: 11pt)
#set page(height: auto, margin: 1em)
#dining-table.make(columns: example,
data: data,
notes: dining-table.note.display-list
) |
https://github.com/noahjutz/AD | https://raw.githubusercontent.com/noahjutz/AD/main/notizen/algorithmen/mts4.typ | typst | #import "@preview/cetz:0.2.2"
#import "/config.typ": theme
#let nums = (-13, 25, 34, 12, -3, 7, -87, 28, -77, 11)
#let split(nums) = {
let n = calc.div-euclid(nums.len(), 2)
return (
nums.slice(0, n),
nums.slice(n, nums.len())
)
}
#let div_tree(nums) = {
if nums.len() == 1 {return nums}
let (l, r) = split(nums)
(nums, div_tree(l), div_tree(r))
}
#let max_subarray_l(nums) = {
let mid = calc.div-euclid(nums.len(), 2)
let max = -calc.inf
let index = 0
for i in range(0, mid).rev() {
let sum = nums.slice(i, mid).sum()
if max < sum {
max = sum
index = i
}
}
return (index, mid)
}
#let max_subarray_r(nums) = {
let mid = calc.div-euclid(nums.len(), 2)
let max = -calc.inf
let index = 0
for i in range(mid+1, nums.len()+1) {
let sum = nums.slice(mid, i).sum()
if max < sum {
max = sum
index = i
}
}
return (mid, index)
}
#let row(nums) = {
let (l_start, l_end) = max_subarray_l(nums)
let (r_start, r_end) = max_subarray_r(nums)
stack(
dir: ltr,
..nums.enumerate().map(((i, n)) => {
box(
fill: if l_start <= i and i < l_end {
theme.primary_trans
} else if r_start <= i and i < r_end {
theme.secondary_trans
},
inset: (x: 2pt, y: 4pt),
str(n)
)
})
)
}
#let tree_to_content(tree) = {
if type(tree.at(0)) == int {
return row(tree)
}
return tree.map(tree_to_content)
}
#cetz.canvas({
import cetz.draw: *
import cetz.tree
set-style(content: (frame: "rect"))
tree.tree(
tree_to_content(div_tree(nums)),
spread: 0.75,
grow: 1.2,
draw-edge: (from, to, ..) => line(from, to, mark: (end: "straight"))
)
}) |
|
https://github.com/Kasci/LiturgicalBooks | https://raw.githubusercontent.com/Kasci/LiturgicalBooks/master/CSL_old/oktoich/Hlas7/1_Pondelok.typ | typst | #let V = (
"HV": (
("","<NAME>","Vozvedí tvojí óči, o dušé mojá! I na Bóžije vozzrí smotrénije i blahoutróbije, káko nebesá preklonív na zémľu sníde, da voznesét tebé ot okajánstva tvojích strastéj, i postávit ťá na kámeni víry. O dívstvo strášnaho čudesé! Sláva istoščániju tvojemú čelovikoľúbče."),
("","","Vížď tvojá prebezzakónnaja ďilá, o dušé mojá! i počudísja, káko ťá zemľá nósit? Káko ne razsídesja? Káko díviji zvírije ne sňidájut tebé? Káko že i sólnce nezachodímoje sijáti tebí ne prestá? Vostáni, pokájsja, i vozopíj ko Hóspodu: sohriších tí: sohriších, pomíluj mjá."),
("","","Imúšče na ťá upovánije vsesíľne Hóspodi, tebé mólim, vsjákich bíd, strastéj že i mjatéža nám izbávitisja: jáko da žízň nášu mírno préjdem, i v čistoťí požívše obrjáščem v déň súdnyj, blahopremínna tebé Vladýku i mílostiva."),
("","Ne ktomú vozbraňájemi","Zarjámi prosviščájemi Tróicy, íže víroju vás pojúščyja, prosvitíte archánheli."),
("","","Pričástijem svíti vtoríi, pokazújemi svíti soveršénni, predstáti nám svítu pérvomu molítesja."),
("","","Króvom kríl vášich sochraňájte vírnyja vsjá ot duchóv lukávstvija, ťmú razorjájušče."),
("Bohoródičen","","Vsí písňmi so ánhely Bohoródice vozopiím, jáko Spása míru rodilá jésť, po roždeství že páki prebýsť Ďíva, i mír izbávi ot prélesti roždestvóm svoím, i píšču podadé nám neiždivájemuju, mlekóm pitájuščaja svobodíteľa dúš nášich."),
),
"S": (
("","","Jáko blúdnyj sýn prijidóch áz ščédre, prijimí mja pripádajuščaho, jáko jedínaho ot najémnik tvojích Bóže i pomíluj mjá čelovikoľúbče."),
("","","Jáko vpadýj v razbójniki i ujázvlen: táko i áz vpadóch ot mnóhich hrichóv, i ujázvlena mí jésť dušá. Ko komú pribíhnu povínnyj áz? Tókmo k tebí blahoutróbnomu dušám vračú: izléj na mjá Bóže, velíkuju tvojú mílosť."),
("Múčeničen","","Sláva tebí Christé Bóže, apóstolov pochvaló, i múčenikov vesélije: íchže própoviď Tróica jedinosúščnaja."),
("Bohoródičen","","Jéže rádujsja, tebí zovém so ánhelom, Bohonevísto, čertóh i dvér, i prestól óhnennyj naricájušče tebé, i nesikómuju hóru, i kupinú neopalímuju."),
),
)
#let P = (
"1": (
("","","Mánijem tvojím na zemnýj óbraz preložísja, préžde udoborazlivájemoje vodnóje jestestvó Hóspodi: ťímže nemókrenno pišešéstvovav Izráiľ, pojét tebí písň pobídnuju."),
("","","Čínove ánhel jáko voístinnu i vrisnotú Máter ťá Bóha vsích čtút prečístaja: no i nýňi ot brénnych ustén mojích prijimí písň molébnuju."),
("","","Umertví plóti mojejá i ješčé živúščuju zlóbu, žízň ístinnuju róždšaja, prečístaja: i strastéj i prehrišénij podážď čístaja, tvojemú rabú izbavlénije."),
("","","Sólnce ot sólnca, bezľítnoje Slóvo nepostížno vozsijávšeje, vo vrémja vozsijá. Jehóže zarjámi prosvití Ďívo, dúšy náša, i vrazumí."),
("","","Podobájet tebí Bohoródice chvalénija slóvo vsehdá ďíjstvujemo: no mý mólim ťá čístaja, spasí ot vsjákija žitéjskija pečáli, k tebí pribihájuščich."),
),
"3": (
("","","V načáľi nebesá vsesíľnym slóvom tvojím utverždéj Hóspodi Spáse, i vseďíteľnym i Bóžijim Dúchom, vsjú sílu ích: na nedvížimim mjá kámeni ispovídanija tvojehó utverdí."),
("","","Otdáv dólhi raboľípno blahorazúmňi, tvojích blahodátej Vladýčice, tépľi vospiváju ťá prečístaja, Máti Slóva, i vsích izbáviteľa: no i nýňi izmí mja ot žitéjskich nastojánij."),
("","","Umerščvléna Adáma ot prestuplénija drévle, lúčšija prečístaja, žízni spodóbila jesí jávi, živonačáľnoje Vladýčice róždšaja Slóvo: no i nýňi mjá smértnaho hrichá svobodí."),
("","","Ožesťív plóti strastnýj zakón, i nýňi oskorbľájet, duchóvnyj, i k ľuťíjšym pochotém sovokupľájet úm mój prečístaja: no bezstrástija mír podážď mí vskóri tvojími molítvami."),
("","","Neskazánno vo utróbi prečístaja, začénši Christá soderžíteľa vsích, zemnoródnych suščestvó razrišíla jesí ot ádovych veréj: no i nýňi mnohopleténnyja plenícy tľíjuščyja mjá rastórhni."),
),
"4": (
("","","Ótča ňídra ne ostávľ, i sošéd na zémľu Christé Bóže, tájnu uslýšach smotrénija tvojehó, i proslávich ťá jedíne čelovikoľúbče."),
("","","Nóščiju borjúsja so ťmóju ľútych, omračív pómysl: dvéri svíta, tvojími lučámi ozarí mja, i hóresti izmí vskóri, i pečáli."),
("","","Hrichóv mnóžestvom sťáhnut, i plenícami napástej veľmí svjázan, tvojú Vladýčice, nýňi pómošč prizyváju, da izbávľusja vsjákija múki."),
("","","Sobórišča zlých i ľútych, i zavístnych i lukávych čelovík sovíty razorí vsepítaja, i vsjákija mjá izbávi pečáli žitijá i skórbi."),
("","","Vozvraščénija slovés lžívych i ďíjstv jáže na mjá, mečém tvojích molítv ssicý Vladýčice, i vskóri razruší, i vsjákija mjá izbávi pečáli."),
),
"5": (
("","","Nóšč ne svitlá nevírnym Christé, vírnym že prosviščénije v sládosti slovés tvojích: sehó rádi k tebí útreňuju, i vospiváju tvojé Božestvó."),
("","","Nepobidímaja sťiná súšči vírnym, i pokróv búdi rabú tvojemú Ďívo, i ot vsjákija núždnyja izbávi pečáli i ozloblénija."),
("","","Nedúhuju ziló, ľúťi ozlóblennyj ot obojú stranú prečístaja, dušévnuju sílu i ťilésnuju júže podjách, tvojími molítvami iscilí."),
("","","V pučínu Ďívo ščedrót tvojích nýňi pribiháju ráb tvój, ot oderžáščaho mjá sovíta neprávednaho da izbávľusja, i ozloblénija."),
("","","Prevoznosíma jésť sláva tvojích molítv vsjúdu, Ďívo Máti prečístaja: ímiže nýňi mjá vsjákaho izbávi žitéjskaho nastojánija."),
),
"6": (
("","","Plávajuščaho v molví žitéjskich popečénij, s korablém potopľájema hrichí, i dušetľínnomu zvírju primetájema, jáko <NAME>, vopijú ti: iz smertonósnyja hlubiný vozvedí mja."),
("","","Rečénija i slovesá vsích vírno voschvaľájut ťá čístaja, jáko vsích čelovík dólh roždestvóm tvojím jávi razrušísja: no i nýňi pivéc tvojích moľbú prijimí, i izbávi iskušénij i pečálej."),
("","","Boľášča mjá i strástnym hrichóvnym térnijem bodóma, íščušča júže ot tebé ciľbú prečístaja, ot vsjákija boľízni že i skórbi izmí, i izbávi ot napástej i pečálej."),
("","","Zemnoródnych jestestvó, na nébo Bohoródice projavlénno vozvelá jesí, bývši paláta carjá slávy: ťímže mjá ot bézdny mnóhich prehrišénij, i napástej, i strastéj vozvedí."),
("","","Voplóščšejesja Slóvo páče umá i slóva, Ďívo čístaja, rodilá jesí, bezslovésija nás izbávľšaho: ťímže ťá slovesý božéstvennymi neprestánno vospivájem, i vírno slávim."),
),
"S": (
("","","Vladýčice, prohňívasja Sýn tvój na hríšnyja rabý tvojá: ščédraho bo na hňív obratíchom mý, no na mílosť pretvorí jehó čístaja. umilosérdisja Máti Bóžija, umolí blahoutróbnaho moľbámi samodvížnymi, pľinényja izbávi."),
),
"7": (
("","","V péšč óhnennuju vvérženi prepodóbniji ótrocy, óhň v rósu preložíša, vospivánijem síce vopijúšče: blahoslovén jesí Hóspodi Bóže otéc nášich."),
("","","Ukrášena rjásnami čistotý, prečístaja otrokovíce: dúšu mojú nýňi pretvorí ot zlóby skvérnyja k božéstvenňij dobróťi, blahoslovénnaja Vladýčice, predstáteľnice róda nášeho."),
("","","Svirípejut nýňi zlóby bisóvskija ziló, i óhň strastéj mňí vozžihájut, no páče tvojími zarjámi, sích do koncá popalí ščedrótami tvojími, predstáteľnice róda nášeho."),
("","","O nás tvojehó Sýna moľášči prečístaja Máti Bóžija, ne prestáj otňúd molítvami tvojími, čelovíčeskich pečálej i bíd izimájušči rabý tvojá."),
("","","Presúščnyj Sýn ot tebé Ďívo, plóť priját neprelóžno, i čelovík býsť, da spásét pojúščyja: blahoslovén prečístaja, plód tvojehó čréva."),
),
"8": (
("","","Ótrocy zovjáchu v peščí orošéni: tvár da blahoslovít vsjáčeskaja slóvom sozdávšaho, i prevoznósit jehó vo víki."),
("","","Pážiti strastnýja, i mnohoobráznyja bidý okružájut voístinnu Vladýčice, tvojehó rabá: no izbávi mjá ťích vsjákaho iskušénija."),
("","","Da priídet nýňi na ný deržávnaja tvojá dláň Vladýčice, i čájemyja čelovíčeskija skórbi da izbávit nás."),
("","","Síti lukávych i zlosovítnych čelovík sokruší, čístaja Bohorodíteľnice: i tvojehó rabá izbávi ot vsjákija núždi."),
("","","Jedíno súščeje vírnych pristánišče božéstvenno, Ďívo čístaja, moľú ťa izbáviti mjá súščyja v móri žitijá búri hórkija."),
),
"9": (
("","","Rádujsja nevísto svítlaja, Máti svitodávca: rádujsja vmistívšaja nevmistímaho vo utróbi tvojéj: rádujsja samích Cheruvímov čéstňijšaja, róždšaja Spása dúš nášich."),
("","","Otihrásja jáko žrebéc ot zápovidej Vladýki, brozdámi tvojích molítv da vosťáhnusja prečístaja, k putí skóraho ustrojénija."),
("","","Nizvlekóm jésm ziló popolznovénijem nerazúmnym k ďijániju lukávaho hrichá mojehó: izbávi mjá Bóže, preložénija hóršaho."),
("","","Iscilénije pérvoje jávľšisja čelovíčeskaho suščestvá, iscilíla sokrušénije Adáma i Jévy: iscilí že i mené Bohoródice, tvojími moľbámi."),
("","","Cilomúdren úm podážď mí, i čísto sérdce, i rázum smotrilív: da sochraňú Vladýčice, prečístyja zápovidi Bóha mojehó."),
),
)
#let U = (
"S1": (
("","","Imúšči dušé mojá, vračevstvó pokajánija, pristupí pripádajušči, i vozdychánijem zovúšči: vračú dúš že i ťilés, čelovikoľúbče, svobodí mja ot mnóhich mojích sohrišénij: sopričtí mja bludníci, i razbójniku, i mytarjú, i dáruj mí Bóže, bezzakónij mojích proščénije, i spasí mja."),
("","","Íže Petróvo otveržénije slezámi očístivyj, i mytaréva sohrišénija vozdychánijem prostívyj čelovikoľúbče Hóspodi, pomíluj mjá."),
("Bohoródičen","","Prevozšlá jesí síly nebésnyja, zané chrám pokazálasja jesí božéstvennyj, blahoslovénnaja Bohoródice: jáko róždšaja Christá Spása dúš nášich."),
),
"S2": (
("","","Mytarévu pokajániju ne porevnovách, i bludnícy sléz ne sťažách: nedoumíjusja bo ot osľiplénija takováho ispravlénija. No tvojím blahoutróbijem Christé Bóže, spasí mja, jáko čelovikoľúbec."),
("","","Pučína žitéjskaja oburevájet mjá Hóspodi, volnénija bezzakónij mojích pohružájut mjá Vladýko: no prostrí tvojú rúku jákože Petróvi, i spasí mja čelovikoľúbče."),
("Múčeničen","","Svjatíji, molítesja ostavléniju dátisja nám prehrišénij nášich, i čájemych ľútych izbávitisja nám, i hórkija smérti, mólimsja."),
("Bohoródičen","","Čéstňíjši slávnych cheruvímov jesí presvjatája Ďívo, oní bo božéstvennyja ne terpjášče síly, kríly pokryvájušče líca slúžbu soveršájut: tý že voploščénno Slóvo samovídno zrjášči nósiši, jehóže neprestánno molí o dušách nášich."),
),
"S3": (
("","Plód čréva","Razlíčnych strastéj, i sohrišénij mojích búrja potopľájet mjá vo hlubinú otčájanija: no molítvami ánhel tvojích, Iisúse mnohomílostive, jáko blúdnaho spasí mja."),
("","","Hotóvisja dušé mojá, v živoťí tvojém, protívu búduščej žízni ne sumňítisja. Támo bo niktóže pomohájaj, ni bohátstvo, ni síla, ni drúzi, ni kňázi: no tókmo pokazánije ďíl i Bóžije čelovikoľúbije."),
("Bohoródičen","","Bohoródice Ďívo neskvérnaja, Sýna tvojehó molí s hórnimi sílami, proščéniju prehrišénij nám préžde koncá darovátisja, vírno ťá slávjaščym."),
),
"K": (
"P1": (
"1": (
("","","Pospíšestvovavšemu Bóhu vo Jehípťi Moiséjovi, izvestí Izráiľa, tomú jedínomu poím, jáko proslávisja."),
("","","V pučínu ľútych vpád, vopijú ti: rúku mí prostrí ščédre, i spasí mja jáko Petrá, čelovikoľúbče."),
("","","Mené kájuščahosja Christé, jákože bludnícu ot sohrišénij mnóhich omýj manovénijem mílosti tvojejá, da víroju slávľu ťá."),
("Múčeničen","","Íže svjatýja tvojá Christé, hornílom prosvitívyj mnohovídnych rán, ťích molénijem ot pomračénija strastéj izbávi mjá."),
("Múčeničen","","Terpínijem rán očístivšesja, sólnca mnóžaje oblistáša svjatíji múčenicy, i prélesť pomračíša."),
("Bohoródičen","","Jáže predstáteľnice vírnych, jáže sohrišájuščich obraščénije k Bóhu, Ďívo vsepítaja molítvami tvojími spasí mja."),
),
"2": (
("","","Istrjásšemu Bóhu faraóna v móri čermňím, písň pobídnuju poím, jáko proslávisja."),
("","","Neisčetnosíľne Christé, tvojím svítom ozarív mój úm, ánhely tvojá píti vdochní, jáko vsesílen."),
("","","Neisčetnosíľne Christé, tvojím svítom ozarív mój úm, ánhely tvojá píti vdochní, jáko vsesílen."),
("","","Krípkuju imúšče svítlosť, iz Bohonačáľnaho proischoďášču istóčnika, nebésniji lícy písňmi Christá počitájut."),
("Bohoródičen","","Ukrášenu ťá čístaja božéstvennymi svitlosťmí, vírniji vímy, jávi rádujsja tebí vsí zovém."),
),
),
"P3": (
"1": (
("","","Utverdísja sérdce mojé v Hóspoďi, voznesésja róh mój v Bózi mojém: razširíšasja na vrahí mojá ustá mojá, vozveselíchsja o spaséniji tvojém."),
("","","Nóščiju bezmístnymi soderžím bých hrichí, svítom mjá pokajánija nýňi ozarí, svitodáteľu čelovikoľúbče, da víroju slávľu ťá."),
("","","Putijé vsí, po níchže chodích v žitijí, v própasť slastéj mjá nizrínuša: Iisúse, pokajánija mí božéstvennyja putí pokaží."),
("Múčeničen","","Dóblestvennym nrávom skončávše pódvihi, vincév spodóbistesja nebésnych, vseslávniji múčenicy, o vsích moľáščesja."),
("Múčeničen","","Ťmý boľíznej preterpívše strastotérpcy, ťmámi blahích spodóbistesja, ťmám sovokupľájemi bezplótnych síl."),
("Bohoródičen","","Bóha róždši nebésnaho carjá Ďívo, vo mňí cárstvujuščij hrích nizloží, i uščédrivši spasí mja."),
),
"2": (
("","","Utverdísja víroju Christóva cérkov, íbo neprestánno písňmi vopijét pojúšči: svját jesí Hóspodi, i ťá pojét dúch mój."),
("","","Chodátaji bývše božéstvennaho javlénija lícy ánheľstiji, i neveščéstvenno zoveté neprestánno: svját jesí Hóspodi, spasája dúšy náša."),
("","","Ľubóviju zakónnoju drúh drúhu božéstvennaja sijánija otdajúšče, blahočínno Christú pojeté: svját jesí Hóspodi, jedíne mnohomílostive."),
("","","Pérvij zarí vtorýja svítlosti žitijú blahočéstvujuščiji porevnújim, Christú pojúšče: svját jesí Hóspodi, spasája dúšy náša."),
("Bohoródičen","","Íže ot ne súščich vsjá privedýj vóleju, ot tebé Ďívo, plóť vzajémlet Slóvo, čelovík býv, za milosérdije čelovikoľúbec."),
),
),
"P4": (
"1": (
("","","Pokrýla jésť nebesá Christé Bóže, smotrénijem tvojím, dobroďíteľ neizrečénnyja múdrosti tvojejá, čelovikoľúbče."),
("","","Choťáj vsím čelovíkom ščédre spastísja, spasí mja prestupívšaho tvojá poveľínija Slóve, i ne uničiží mené."),
("","","Podkloníchsja bezslovésnym strastém, i skotóm okajánnyj upodóbichsja, ščédre Slóve Bóžij, uščédriv spasí mja."),
("Múčeničen","","Vjážemi, i ohném podžihájemi, popalíste prélesť, vospaľájemi révnostiju blahočéstija múčenicy."),
("Múčeničen","","Ráj mýslennyj javístesja, posreďí imúšče drévo živótnoje blažénniji, Christá sadoďíteľa vsjáčeskich."),
("Bohoródičen","","Ďívo čístaja Bohoblahodátnaja, oblahodatívši úm mój omračénnyj, nevíďinija soveršénno svobodí."),
),
"2": (
("","","Uslýšach slúch tvój, i ubojáchsja, razumích ďilá tvojá, i užasóchsja Hóspodi."),
("","","Iscilíti dúši mojejá strúpy, predstojášče Christú jáko služíteli izbránniji, lícy ánheľstiji tomú pomolítesja."),
("","","Vójinstva bezplótnych Vladýko, tvój prestól blahohovíjno obstojášče, jásno prísno vopijút: sláva síľi tvojéj Hóspodi."),
("","","Udivíšasja ánheľstiji čínove, zrjášče tebé Christé, s plótiju na zemlí živúšča so smértnymi čelovíki."),
("Bohoródičen","","Vsepítaja, i Bohomáti prečístaja, róždšaja Bóha neskazánno plótiju, tebí mólimsja, molí spastísja nám."),
),
),
"P5": (
"1": (
("","","Útreňujušče, Slóve, v slávu tvojú i chvalú, voschvaľájem neprestánno óbraz krestá tvojehó, jehóže dál jesí nám orúžije v pómošč."),
("","","Ľínostiju žitijé iždích, i trepéšču neizbížnaho tvojehó sudíšča, na némže sudítisja choščú strástnyj áz, uščédri mjá Hóspodi."),
("","","Íže óči sľipcém prosvitívyj Slóve, duší mojejá zínicy ľúťi omračénnyja otvérzi, zríti svít poveľínij tvojích."),
("Múčeničen","","Krípkoju mýsliju Christá ispovídajušče, preterpíste rány vsjákaho mučénija, dóblestvenniji stradáľcy: ťímže blažími jesté."),
("Múčeničen","","Preplývše vsích mučénij trevolnénije, dostihóste k pristánišču výšňaho cárstvija, tišiný ístinnyja múčenicy ispolňájemi."),
("Bohoródičen","","Íže choťínijem vsjá sotvorívyj Bóh Slóvo, páče slóva Ďívo iz tebé voplotísja: tohó úbo priľížno o vsích molí."),
),
"2": (
("","","K tebí útreňuju, i tebí vopijú blahoutróbne Hóspodi: omračénnuju hrichmí dúšu mojú, svítom ozarív zápovidej tvojích, nastávi."),
("","","Svjaščénňijšimi i mnohoviščánnymi ustý pojút Serafími prebeznačáľnoje i prebožéstvennoje načálo, neveščéstvennymi svitolítiji prosviščájemi."),
("","","Svjaščénnymi i mnohosvítlymi kríly pokryvájutsja Cheruvími, k božéstvennomu sijániju ne smíjušče zríti, múdrosti prebožéstvennyja priviďínija."),
("","","Razúmno božéstvennaho i vsebohátnaho, prestóli slávniji, krasňíjšaho naslaždájuščesja blistánija, zríteli neizrečénnych premírno javľájutsja."),
("Bohoródičen","","Úm prebožéstvennyj, čelovíčeskomu prečístaja, primišájetsja v prečísťim i vsesvjaťím tvojém črévi, sojedinívsja neslijánno i neizmínno po ipostási."),
),
),
"P6": (
"1": (
("","","Jóna iz čréva ádova vopijáše: vozvedí ot tlí živót mój. Mý že tebí vopijém: vsesíľne Spáse, pomíluj nás."),
("","","Obýde mjá bézdna prehrišénij, snidóch vo hlubinú pohíbeli: vozvedí mja Slóve, jákože inohdá Jónu ot istľínija k žízni."),
("","","Oburevájet mjá pomyšlénij trevolnénije, ko pristánišču ístinnaho pokajánija isprávi mjá ščédre, v tišiňí sobľudája sérdce mojé."),
("Múčeničen","","Svjatíji múčenicy zaščitívšesja víroju, lóžnaho mučítelej laskánija ukloníšasja: i strilámi vrážijimi ne ujázvleni býša."),
("Múčeničen","","Voznošájemi k Bóhu v ľubví, i voznenavíďiša mirskúju ľubóv múčenicy, i drúzi vsjáčeskich tvorcú javíšasja."),
("Bohoródičen","","Pojém ťá prepítaja otrokovíce, róždšuju presvjatóje Slóvo, jehóže vsjá síly nebésnyja vospivájut nemólčnymi hlásy."),
),
"2": (
("","","Jóna iz čréva ádova vopijáše: vozvedí ot tlí živót mój. Mý že tebí vopijém: vsesíľne Spáse, pomíluj nás."),
("","","Júnošeski svitlosťmí Hóspodonačálija oblistájemi, i neizrečénnuju slávu tohó vospivájušče, Hospóďstvija prísno javľájutsja."),
("","","Júnošeski svitlosťmí Hóspodonačálija oblistájemi, i neizrečénnuju slávu tohó vospivájušče, Hospóďstvija prísno javľájutsja."),
("","","Ľubézno síľňi premohúščuju sílu, vzirájušče božéstvennyja síly, v kríposti prebyvájut jávi vozmohájemi."),
("Bohoródičen","","Ot cárska koľína proizšédši Ďívo, rodilá jesí páče jestestvá Slóvo vsích carjá, i Ďíva voístinnu soveršílasja jesí."),
),
),
"P7": (
"1": (
("","","Péšč horjáščuju orosíl jesí Spáse, ótroki spásl jesí pojúščyja i hlahóľuščyja: blahoslovén jesí vo víki Hóspodi Bóže, otéc nášich."),
("","","Požrí dušé, žértvu chvalénija Bóhu, potščísja i pokájsja, dóndeže tórh jésť žitéjskij: nýňi kúpľu ďíj dóbrych pridajánij."),
("","","Približájetsja dušé, smértnoje posičénije, plodý dostójny sotvorí: da ne jáko neplódnoje drévo vvéržešisja vo óhň hejénskij, i vospláčešisja neuťíšno."),
("Múčeničen","","Svjatíji múčenicy, péšč prélesti uhasívše króvnymi túčami, vopijáchu jákože ótrocy: otéc nášich Bóže blahoslovén jesí."),
("Múčeničen","","Sýnove svíta býste, svítu želájemomu primisívšesja múčenicy: i vsjá súščaja vo ťmí prosviščájete, i prélesti ťmú othoňájete."),
("Bohoródičen","","Kupiná ťá proobražáše čístaja, neopalímaja, óhň bo rodilá jesí nepostojánnyj Ďívo. Ťímže vopijú ti: popalí veščéstvennyja mojá strásti."),
),
"2": (
("","","V péšč óhnennuju vvérženi prepodóbniji ótrocy, óhň v rósu preložíša, vospivánijem síce vopijúšče: blahoslovén jesí Hóspodi Bóže otéc nášich."),
("","","Slavoslóvjat neuklónno, tvój prestól Christé jávi okružájušče, úmňi ánheľskaja likostojánija, blahoslovén jesí, zovúšče, Bóže otéc nášich."),
("","","Slavoslóvjat neuklónno, tvój prestól Christé jávi okružájušče, úmňi ánheľskaja likostojánija, blahoslovén jesí, zovúšče, Bóže otéc nášich."),
("","","Otonúdnymi ťá načála usérdiji, o jedínom načáľi neveščéstvenno obraščájemi, neprestánnymi slavoslovléňmi zovút: blahoslovén jesí Bóže otéc nášich."),
("Bohoródičen","","Jedínu ipostás vo dvojú suščestvú, Bohorodíteľnice, Christá jedínaho bez símene rodilá jesí, strášnoje soveršájušča smotrénije, Bóha otéc nášich."),
),
),
"P8": (
"1": (
("","","V peščí ótroki podražájušče, duchóvnuju rósu prijémšiji, víroju zovém: blahoslovíte ďilá Hospódňa Hóspoda."),
("","","Slóvo prijách jáko svíščnik sijájušč, no k bezslovésnym prekloníchsja okajánnyj strastém, i vo ťmí zlóbňij šéstvuju vsehdá."),
("","","Hospóď blíz, jákože vírujem: popecýsja dušé, i ne unyváj, pobdí i vozopíj bódrenno: ščédryj čelovikoľúbče, spasí mja."),
("Múčeničen","","Vkusívše božéstvennyja sládosti, hóresť boľíznennuju preterpíste, i nýňi naslaždájetesja božéstvenňijšich. Slóva pričaščénij, múčenicy."),
("Múčeničen","","Vnidóste k božéstvennomu pokóju, ulučíste dóbrych, íchže naďíjastesja, vsechváľniji múčenicy: sehó rádi dostójno vás ublažájem."),
("Bohoródičen","","Razrišísja ot kľátvy roždestvóm tvojím Ďívo, čelovíčeskoje smišénije: íbo vseblahoslovénnaho, blahoslovéňmi vsjá ukrašájuščaho rodilá jesí."),
),
"2": (
("","","Jedínaho beznačáľnaho carjá slávy, jehóže blahoslovját nebésnyja síly, i trepéščut číni ánheľstiji, pójte svjaščénnicy, ľúdije prevoznosíte jehó vo víki."),
("","","Íže vsé želánije k Bóhu prelóžše, jáže otonúdu naslaždájuščesja zarjámi archánheli, vás vospivájuščym izbávitisja napástej, Christá umolíte vsích carjá."),
("","","Íže vsé želánije k Bóhu prelóžše, jáže otonúdu naslaždájuščesja zarjámi archánheli, vás vospivájuščym izbávitisja napástej, Christá umolíte vsích carjá."),
("","","Úmove súšče čestňíjšiji, vsjákaho izminéni veščéstvennaho pristrástija, o ánheli! Spásíte vsích, ľubóviju s vámi Christá prevoznosjáščich vo vsjá víki."),
("Bohoródičen","","Svít nepristúpnyj Bohoródice Ďívo, vo črévi tvojém prijémši neizrečénno, prosvitíla jesí súščyja vo ťmé žitijá, sláviti blahočéstno Christá proizšédšaho iz tebé neskazánno."),
),
),
"P9": (
"1": (
("","","Páče jestestvá Máter, i po jestestvú Ďívu, jedínu v ženách blahoslovénnuju písňmi vírniji Bohoródicu veličájem."),
("","","Sé súd približájetsja, i osuždéniju ďilá imíja, sám otčajavájusja: právednyj sudijé Christé Bóže, ne osudí mené."),
("","","Jákože vírnaja chananéja, pomíluj mjá, vopijú tí: jákože pohorblénuju drévle isprávi mjá, jéže stupáti právo k stezjám tvojím čelovikoľúbče."),
("Múčeničen","","Sovlekóstesja vsjákija s rízami zlóby, i oďijáňmi zíľnych mučénij, slávy odéždu sebí stradáľcy ischodátaiste."),
("Múčeničen","","Božéstvenna straná živúščich, Sijón výšnij hrád, pervoródnyja vás priját, osijavájemych dobrótami pódvih stradáľcy."),
("Bohoródičen","","Prosvitíteľnymi lučámi vozsijávšaho Slóva iz tebé Ďívo čístaja, ozarí mja, hrichóv i strastéj vo ťmí pokryvájema."),
),
"2": (
("","","Vsepítaja nebés prevýššaja, beznačáľnoje Slóvo bezsímenno začénšaja, i voploščénnaho Bóha róždšaja čelovíkom: ťím ťá vsí veličájem."),
("","","Sijáňmi Bohonačáľnaho svitolítija naslaždájuščesja vsí lícy ánheľstiji, preproslávlennaho Bóha neprestánno vospivájut, i slávjat prísno veličájušče."),
("","","Sijáňmi Bohonačáľnaho svitolítija naslaždájuščesja vsí lícy ánheľstiji, preproslávlennaho Bóha neprestánno vospivájut, i slávjat prísno veličájušče."),
("","","Izbávitisja mňí strastéj obderžánija, o Cheruvími i Serafími, síly, vlásti, ánheli, archánheli, načála že i prestóli, i Hospóďstvija, Christá molíte priľížno."),
("Bohoródičen","","Jáko Máti nýňi k Sýnu tvojemú Bohoródice, derznovénije imúšči, ľubóviju pojúščich ťá izbávi ot prehrišénij ľútych, i nedúhov, i bíd, vsesvjatája: da vsí ťa prísno veličájem."),
),
),
),
"CH": (
("","","Jáko neplódnuju smokóvnicu, ne posicý mené Spáse, hríšnaho, no na mnóhaja ľíta poždánije mí dáruj, napajája dúšu mojú slezámi pokajánija, da plód prinesú tí mílostyni."),
("","","Jáko Sólnce sýj právednoje, prosvití serdcá pojúščich ťá: Hóspodi, sláva tebí."),
("","","Pámjať svjatých tvojích strastotérpec prázdnujušče, ťá poím: Hóspodi, sláva tebí."),
("Bohoródičen","","Umirí molítvami Bohoródicy žízň nášu, vopijúščich tí: mílostive Hóspodi, sláva tebí."),
),
)
#let L = (
"B": (
("","","Krasén bé i dóbr v sňíď, íže mené umertvívyj plód: Christós jésť drévo živótnoje, ot nehóže jadýj ne umiráju, no vopijú s razbójnikom: pomjaní mjá Hóspodi, vo cárstviji tvojém."),
("","","Jáko vírnaja chananéja zovú v boľízni sérdca mojehó: pomíluj mjá Spáse, jáko bláh: íbo dúšu ímam bídstvujuščuju vsjákimi kozňmí vrážijimi, i oburevájemu prísno."),
("","","Cheruvími, i Serafími, i prestóli, načála i síly, prísno archánheli, ánhelov vóinstva, i Hospóďstvija, i premúdrych vlastéj sobóri, tebé slávjat, blahoďíteľu Hóspodi."),
("","","Vrážija lukávaja voznošénija, k Bóhu vozvyšájemi nizverhóša soveršénno stradáľcy: i pobidíteli jávľšesja, v rádosti nýňi na nebesích živút, slávoju netľínnoju blistájušče."),
("","","Tróice nerazďíľnaja, jedínica jedinojestéstvenno, trilíčnoje suščestvó, poklaňájemsja tí s výšnimi sílami: Ótče, i Sýne, i Dúše svjatýj, jedínomu Bóžestvú, jedínoj síľi: jedín Bóh, Tróica jedinosúščnaja."),
("","","Slasťmí oskverníchsja žitéjskimi, k tebí neskvérňij pribihóch Ďívo: poróka vsjákaho i sohrišénij izbávi vseokajánnuju mojú dúšu, jáko da ublažáju ťá prisnoblažénnuju."),
),
)
|
|
https://github.com/ClazyChen/Table-Tennis-Rankings | https://raw.githubusercontent.com/ClazyChen/Table-Tennis-Rankings/main/MS-latest_CN.typ | typst |
#set text(font: ("Courier New", "NSimSun"))
#figure(
caption: "Men's Singles (1 - 32)",
table(
columns: 4,
[排名], [运动员], [国家/地区], [积分],
[1], [樊振东], [CHN], [3548],
[2], [王楚钦], [CHN], [3377],
[3], [马龙], [CHN], [3350],
[4], [林诗栋], [CHN], [3334],
[5], [菲利克斯 勒布伦], [FRA], [3285],
[6], [张本智和], [JPN], [3186],
[7], [林高远], [CHN], [3183],
[8], [特鲁斯 莫雷加德], [SWE], [3137],
[9], [雨果 卡尔德拉诺], [BRA], [3131],
[10], [梁靖崑], [CHN], [3126],
[11], [邱党], [GER], [3125],
[12], [周启豪], [CHN], [3123],
[13], [林昀儒], [TPE], [3109],
[14], [张禹珍], [KOR], [3081],
[15], [安东 卡尔伯格], [SWE], [3055],
[16], [向鹏], [CHN], [3040],
[17], [帕特里克 弗朗西斯卡], [GER], [3020],
[18], [户上隼辅], [JPN], [2997],
[19], [李尚洙], [KOR], [2993],
[20], [卡纳克 贾哈], [USA], [2991],
[21], [达科 约奇克], [SLO], [2982],
[22], [蒂姆 波尔], [GER], [2970],
[23], [迪米特里 奥恰洛夫], [GER], [2965],
[24], [薛飞], [CHN], [2959],
[25], [安德斯 林德], [DEN], [2951],
[26], [松岛辉空], [JPN], [2941],
[27], [高承睿], [TPE], [2940],
[28], [艾利克斯 勒布伦], [FRA], [2939],
[29], [林钟勋], [KOR], [2936],
[30], [克里斯坦 卡尔松], [SWE], [2936],
[31], [孙闻], [CHN], [2931],
[32], [篠塚大登], [JPN], [2931],
)
)#pagebreak()
#set text(font: ("Courier New", "NSimSun"))
#figure(
caption: "Men's Singles (33 - 64)",
table(
columns: 4,
[排名], [运动员], [国家/地区], [积分],
[33], [安宰贤], [KOR], [2917],
[34], [诺沙迪 阿拉米扬], [IRI], [2916],
[35], [于子洋], [CHN], [2914],
[36], [田中佑汰], [JPN], [2912],
[37], [刘丁硕], [CHN], [2910],
[38], [宇田幸矢], [JPN], [2904],
[39], [黄镇廷], [HKG], [2903],
[40], [乔纳森 格罗斯], [DEN], [2903],
[41], [梁俨苧], [CHN], [2902],
[42], [贝内迪克特 杜达], [GER], [2900],
[43], [赵大成], [KOR], [2875],
[44], [吉村真晴], [JPN], [2872],
[45], [奥马尔 阿萨尔], [EGY], [2871],
[46], [马蒂亚斯 法尔克], [SWE], [2869],
[47], [廖振珽], [TPE], [2861],
[48], [吴晙诚], [KOR], [2860],
[49], [曾蓓勋], [CHN], [2858],
[50], [斯蒂芬 门格尔], [GER], [2857],
[51], [西蒙 高兹], [FRA], [2854],
[52], [汪洋], [SVK], [2835],
[53], [周恺], [CHN], [2829],
[54], [马克斯 弗雷塔斯], [POR], [2822],
[55], [基里尔 格拉西缅科], [KAZ], [2820],
[56], [MA Jinbao], [USA], [2819],
[57], [庄智渊], [TPE], [2819],
[58], [赵子豪], [CHN], [2818],
[59], [徐瑛彬], [CHN], [2805],
[60], [徐海东], [CHN], [2803],
[61], [REDZIMSKI Milosz], [POL], [2801],
[62], [CHEN Yuanyu], [CHN], [2800],
[63], [WALTHER Ricardo], [GER], [2799],
[64], [<NAME>], [FRA], [2792],
)
)#pagebreak()
#set text(font: ("Courier New", "NSimSun"))
#figure(
caption: "Men's Singles (65 - 96)",
table(
columns: 4,
[排名], [运动员], [国家/地区], [积分],
[65], [ROBLES Alvaro], [ESP], [2792],
[66], [安德烈 加奇尼], [CRO], [2787],
[67], [上田仁], [JPN], [2784],
[68], [卢文 菲鲁斯], [GER], [2780],
[69], [CHAN Baldwin], [HKG], [2776],
[70], [ANDRAS Csaba], [HUN], [2773],
[71], [吉村和弘], [JPN], [2764],
[72], [托米斯拉夫 普卡], [CRO], [2764],
[73], [HUANG Yan-Cheng], [TPE], [2758],
[74], [MATSUDAIRA Kenji], [JPN], [2756],
[75], [SHAH Manush Utpalbhai], [IND], [2753],
[76], [PARK Gyuhyeon], [KOR], [2753],
[77], [木造勇人], [JPN], [2751],
[78], [帕纳吉奥迪斯 吉奥尼斯], [GRE], [2748],
[79], [夸德里 阿鲁纳], [NGR], [2746],
[80], [WEN Ruibo], [CHN], [2744],
[81], [袁励岑], [CHN], [2740],
[82], [神巧也], [JPN], [2736],
[83], [雅克布 迪亚斯], [POL], [2735],
[84], [KOJIC Frane], [CRO], [2734],
[85], [及川瑞基], [JPN], [2731],
[86], [牛冠凯], [CHN], [2726],
[87], [<NAME>], [NOR], [2726],
[88], [曹巍], [CHN], [2724],
[89], [<NAME>], [FRA], [2722],
[90], [<NAME>], [HUN], [2712],
[91], [赵胜敏], [KOR], [2708],
[92], [<NAME>], [FRA], [2708],
[93], [<NAME>], [FRA], [2706],
[94], [ZELJKO Filip], [CRO], [2704],
[95], [<NAME>], [KOR], [2703],
[96], [RANEFUR Elias], [SWE], [2700],
)
)#pagebreak()
#set text(font: ("Courier New", "NSimSun"))
#figure(
caption: "Men's Singles (97 - 128)",
table(
columns: 4,
[排名], [运动员], [国家/地区], [积分],
[97], [奥维迪乌 伊奥内斯库], [ROU], [2699],
[98], [艾曼纽 莱贝松], [FRA], [2692],
[99], [<NAME>], [SLO], [2691],
[100], [SIPOS Rares], [ROU], [2691],
[101], [吉山僚一], [JPN], [2690],
[102], [IONESCU Eduard], [ROU], [2689],
[103], [蒂亚戈 阿波罗尼亚], [POR], [2688],
[104], [<NAME>], [POR], [2682],
[105], [利亚姆 皮切福德], [ENG], [2681],
[106], [SEYFRIED Joe], [FRA], [2680],
[107], [郭勇], [SGP], [2679],
[108], [尼马 阿拉米安], [IRI], [2677],
[109], [雅罗斯列夫 扎姆登科], [UKR], [2674],
[110], [<NAME>], [ITA], [2666],
[111], [<NAME>], [FIN], [2665],
[112], [AKKUZU Can], [FRA], [2662],
[113], [MARTINKO Jiri], [CZE], [2653],
[114], [<NAME>], [ITA], [2651],
[115], [特里斯坦 弗洛雷], [FRA], [2649],
[116], [THAKKAR <NAME>], [IND], [2648],
[117], [MONTEIRO Joao], [POR], [2646],
[118], [KULCZYCKI Samuel], [POL], [2642],
[119], [<NAME>], [TPE], [2640],
[120], [CHANG Yu-An], [TPE], [2640],
[121], [陈建安], [TPE], [2639],
[122], [<NAME>], [AUT], [2638],
[123], [<NAME>], [FRA], [2637],
[124], [弗拉迪斯拉夫 乌尔苏], [MDA], [2636],
[125], [<NAME>], [KOR], [2636],
[126], [冯翊新], [TPE], [2633],
[127], [<NAME>], [HKG], [2633],
[128], [塞德里克 纽廷克], [BEL], [2628],
)
) |
|
https://github.com/hongjr03/shiroa-page | https://raw.githubusercontent.com/hongjr03/shiroa-page/main/DSA/chapters/4串.typ | typst |
#import "../template.typ": *
#import "@preview/pinit:0.1.4": *
#import "@preview/fletcher:0.5.0" as fletcher: diagram, node, edge
#import "/book.typ": book-page
#show: book-page.with(title: "串 | DSA")
= 串
<串>
#definition[
*串*:串是有限长的字符序列,由一对单引号相括,如: 'a string'。
]<串的基本概念>
== 基本操作
<串的基本操作>
- `StrAssign(&T, chars)`:生成一个其值等于字符串常量 chars 的串 T
- `DestroyString(&T)`:串 T 被销毁
- `StrCopy(&T, S)`:串 S 被复制到串 T
- `StrLength(S)`:返回串 S 的长度
- `StrCompare(S, T)`:若 S > T,则返回值 > 0;若 S = T,则返回值 = 0;若 S < T,则返回值 < 0
- `Concat(&T, S1, S2)`:用 T 返回由 S1 和 S2 连接而成的新串
- `SubString(&Sub, S, pos, len)`:用 Sub 返回串 S 的第 pos 个字符*起*长度为 len 的子串
- `ClearString(&S)`:串 S 清空
- `Index(S, T, pos)`:若主串 S 中存在和串 T 值相同的子串,则返回它在主串 S 中第一次出现的位置,否则返回 0
- `Replace(&S, T, V)`:用 V 替换主串 S 中出现的所有与 T 相等的不重叠的子串
- `StrInsert(&S, pos, T)`:在串 S 的第 pos 个字符之前插入串 T
- `StrDelete(&S, pos, len)`:从串 S 中删除第 pos 个字符起长度为 len 的子串
- `StrEmpty(S)`:若串 S 为空,则返回 true,否则返回 false
== 定长顺序存储
```c
#define MAXLEN 255
typedef unsigned char Sstring
[MAXSTRLEN + 1]; // 0 号单元存放串的长度
```
*特点*:
- 串的实际长度可在这个予定义长度的范围内随意设定,超过予定义长度的串值则被舍去,称之为“截断” 。
- 按这种串的表示方法实现的串的运算时,其基本操作为 “字符序列的复制”。
== 堆分配存储表示
```c
typedef struct {
char *ch; // 若是非空串,则按串长分配存储区,否则 ch 为 NULL
int length; // 串长度
} HString;
```
C语言中提供的串类型就是以这种存储方式实现的。
这里的堆指的是动态分配的存储空间,而不是数据结构中的堆。
|
|
https://github.com/yhtq/Notes | https://raw.githubusercontent.com/yhtq/Notes/main/数学模型/论文/pkuthss-typst/README.md | markdown | # 数学模型课程论文
模板来自于 https://github.com/pku-typst/pkuthss-typst |
|
https://github.com/Quaternijkon/notebook | https://raw.githubusercontent.com/Quaternijkon/notebook/main/content/数据结构与算法/.chapter-数据结构/链表/回文链表.typ | typst | #import "../../../../lib.typ":*
=== #Title(
title: [回文链表],
reflink: "https://leetcode.cn/problems/palindrome-linked-list/description/",
level: 1,
)<回文链表>
#note(
title: [
回文链表
],
description: [
给你一个单链表的头节点 head ,请你判断该链表是否为回文链表。如果是,返回 true ;否则,返回 false 。
],
examples: ([
输入:head = [1,2,2,1]
输出:true
],[
输入:head = [1,2]
输出:false
]
),
tips: [
链表中节点数目在范围[1, 105] 内
0 <= Node.val <= 9
],
solutions: (
( name:[反转一半链表],
text:[
1. **特殊情况处理**:
- 如果链表为空或者只有一个节点,则直接返回 `true`,因为空链表和单节点链表都是回文的。
2. **找到链表的中间节点**:
- 使用快慢指针法。快指针 `fast` 每次移动两步,慢指针 `slow` 每次移动一步。当快指针到达链表末尾时,慢指针正好到达链表中间。
3. **翻转链表的后半部分**:
- 从中间节点的下一个节点开始,将后半部分链表翻转。我们使用三个指针 `pre`、`cur` 和 `next` 依次指向前一个节点、当前节点和下一个节点,逐步翻转节点的 `next` 指针。
4. **比较两部分链表**:
- 将前半部分和翻转后的后半部分逐一比较,如果所有节点值都相等,则链表是回文的。
],code:[
```cpp
class Solution {
public:
bool isPalindrome(ListNode* head) {
if (!head || !head->next) {
return true;
}
ListNode* slow = head;
ListNode* fast = head;
while (fast->next && fast->next->next) {
slow = slow->next;
fast = fast->next->next;
}
ListNode* pre = nullptr;
ListNode* cur = slow->next;
ListNode* next = nullptr;
while (cur) {
next = cur->next;
cur->next = pre;
pre = cur;
cur = next;
}
slow->next = pre;
slow = slow->next;
while (slow) {
if (head->val != slow->val) {
return false;
}
head = head->next;
slow = slow->next;
}
return true;
}
};
```
]),
),
gain:none,
)
|
|
https://github.com/piggsoft/mdbook-typst-piggsoft | https://raw.githubusercontent.com/piggsoft/mdbook-typst-piggsoft/master/CHANGELOG.md | markdown | # Changelog
## [Unreleased]
## [0.1.2] - 2024-03-22
- bufix: 修复因typst升级后命令行参数变化导致的问题
## [0.1.1] - 2024-03-16
修复一些bug
- list -> item 没有换行导致列表显示有问题
- 将img的路径根修改为从配置文件读取
- 修复当head的label中有空格导致的异常问题
## [0.1.0] - 2024-03-15
- 修复${build_dir}/typst-piggsoft为空导致无法输出的问题
- 第一个版本
|
|
https://github.com/pluttan/asmlearning | https://raw.githubusercontent.com/pluttan/asmlearning/master/lab5/lab5.typ | typst | #import "@docs/bmstu:1.0.0":*
#show: student_work.with(
caf_name: "Компьютерные системы и сети",
faculty_name: "Информатика и системы управления",
work_type: "лабораторной работе",
work_num: "5",
discipline_name: "Машинно-зависимые языки и основы компиляции",
theme: "Связь разноязыковых модулей",
author: (group: "ИУ6-42Б", nwa: "<NAME>"),
adviser: (nwa: "<NAME>"),
city: "Москва",
table_of_contents: true,
)
= Выполнение лабораторной работы
== Цель работы
Изучение конвенций о способах передачи управления и данных при вызове из программы, написанной на языке высокого уровня, подпрограмм, написанных на ассемблере.
== Задание
Дан текст не более 255 символов. Слова отделяются друг от друга пробелами. Удалить из слов гласные буквы.
== Выполнение
=== Алгоритм
Первый модуль будет выводить диалоговое окно, в котором будет простой интерфейс с большим полем ввода и кнопкой для преобразования строки.
Второй модуль получает указатель на строку и преобразует ее до определенного символа. Символом остановки я выбрал обратную кавычку \` (ASCII 96).
Алгоритм удаления я выбрал такой: проходим 1 раз по всему массиву, причем заводим 2 счетчика: один для вскх букв (будет смещением на текущую букву). Один для согласных букв: если буква согласная прибавляем к счетчику еденицу и записываем букву на получившееся смещение. Таким образом мы получили продвинутый алгоритм удаления смещением, но при этом остается место, которое было использованно для хранения гласных букв. Поэтому для 3 модуля помимо указателя будем передавать еще целочисленное значение -- количество букв, необходимое для вывода.
В этом модуле будет реализована перезапись вводной строки получившейся.
#img(image("flow.svg", width: 30%), [Схема алгоритма])
=== Релизация 1-го и 3-го модуля на языке высокого уровня
Для реализации приложения на Qt необдодимо создать несколько файлов. Начнем с основного файла, в котором будет функция, вызывающая создание приложения -- `main.cpp`.
#code(read("qt/lab5/main.cpp"), "cpp", [Содержимое файла `main.cpp`])
Как видно в функции мы создаем приложение, после чего добавляем одно окно -- `MainWindow`. Напишем заголовочный и исполняемый файлы окна.
#code(read("qt/lab5/MainWindow.h"), "cpp", [Содержимое файла `MainWindow.h`])
#code(read("qt/lab5/MainWindow.cpp"), "cpp", [Содержимое файла `MainWindow.cpp`])
В заголовочном файле добавлено описание 3 наовых функций класса: ```cpp void on_pushButton_clicked()```, ```cpp void printstr(char* tx, int out)``` и ```cpp void parseasm(char* tx)```. ```cpp void on_pushButton_clicked()``` обрабатывает событие нажатия на конпку, т.е. готовит строку для вызова ассемблерной процедуры, поэтому эту процедуру можно назвать 1 модулем. ```cpp void printstr(char* tx, int out)``` получает строку на вход и количество букв, которые необходимо вывести, поэтому эта процедура будет 3 модулем.
Теперь необходимо подготовить .pro файл для компиляции Qt. В этот файл пишут все связи между файлами.
#code(read("qt/lab5/lab5.pro"), "make", [Содержимое файла `lab5.pro`])
Необходимо пояснить, что сам ассемблер мы компилируем вручную -- с помощью командной строки и утилиты `nasm`. А программе даем просто соединить линковщиком уже скомпилированный код. Но чтобы использовать ассемблерную процедуру необходимо соблюсти сигнатуру -- назвать метку так же, как назвается процедура после помпиляции заготовочного файла. Обычно это название содержит в себе имя процедуры и некоторые ее параметры.
#img(image("6.png", width: 100%), [Сигнатура `parseasm`])
Точно так же и в ассемблере, что бы использовать процедуру си необходимо найти название, присвоенное метке начала этой процедуры `gcc` и вызвать процедуру с помощью ```asm call```, при этом не стоит забывать подготовливать регистры.
#img(image("5.png", width: 100%), [Сигнатура `printstr`])
=== Реализация второго модуля на языке ассемблера
==== Начало
Для второго модуля напишем отдельную процедуру на ассемблере. Ее название обсуждалось ранее.
#let lab5 = parserasm(read("qt/lab5/lab5.asm"))
#code(funcstr(lab5, "_ZN10MainWindow8parseasmEPc:")+ funcstr(lab5, "txparser:"), "asm", [Начало 2 модуля])
В начале сгружаем используемые регистры. Си пытается передавать все аргументы в регистрах, поэтому вызовем отладку и посмотрим в каких регистрах нам передали ссылку на строку и `this`, так как эта процедура находится внутри класса.
#img(image("3.png", width: 100%), [Отладка Qt на уровне ассемблера])
Видно, что перед вызовом процедуры были помещены некоторые значения в регистры ```asm rsi``` и ```asm rdi```. Так как в c++ предполагается, что в первую очередь в процедуре будут использоваться значения передаваемые явно, то `this` всегда передается в последнюю очередь. Таким образом получаем, что в регистре ```asm rsi``` ссылка на первую букву текста, а в регистре ```asm rdi``` ссылка на ```asm this```.
Напишем цикл, который будет проходить по всем буквам массив
у и удалять гласные. Для 2 счетчиков, описанных ранее, будем использовать регистры ```asm rcx```(счетчик согласных) и ```asm rdx```(счетчик всех букв).
==== Цикл
#code(funcstr(lab5, "txparserl:"), "asm", [Начало цикла])
В начале цикла перемещаем следующую букву и проверяем условие выхода. Если условие не соблюдается начинаем работать методом исключения: перебираем все гласные, если есть совпадение переходим к следующей итерации цикла, если совпаданий нет прибавляем единицу в счетчик согласных и ставим букву на ее новое место.
#code(funcstr(lab5, "txparserln:"), "asm", [Обработка согласных])
После этого переходим на новую итерацию.
==== Конец
В конце, когда цикл завершит работу останется только вызвать 3 модуль для вывода результата. Для начала, чтобы точно убедтьься в какие регистры необходимо вводить значения проверим 3 модуль в отладчике.
#img(image("4.png", width: 100%), [Отладка Qt на уровне ассемблера])
Видно, что теперь изменяют значения 3 регистра: ```asm rsi``` -- ссылка на текст, ```asm edx``` -- количество букв, ```asm rdi``` -- `this`. ```asm rsi``` и ```asm rdi``` уже содержат значения, необходимые для передачи в функцию, необходимо положить в ```asm edx``` количество выводимых букв -- количество гласных и вызвать процедуру, после чего выйти из ассемблерной процедуры, не забыв вернуть остальные регистры в исходное состояние.
#code(funcstr(lab5, "txparsere:"), "asm", [Конец ассемблерной процедуры])
Это практически весь файл, осталось только добавить пару инструкция для ассемблера, чтобы он передал линкеровщику глобальные метку процедуры метода 2 и взял из скомпиллированного файла метрку процедуры метода 3.
#code("extern _ZN10MainWindow8printstrEPci
global _ZN10MainWindow8parseasmEPc", "asm", [Экспорт и импорт меток])
=== Тестирование
Тестровать будем на примере текста-рыбы Lorem. Просто вставим этот текст в окно.
#img(image("1.png", width: 70%), [Тестирование: вставляем текст])
После этого необходимо нажать на кнопку и текст в окне будет преобразован.
#img(image("2.png", width: 70%), [Тестирование: преобразованный текст])
== Код для формы
Тут представлен код для организации формы.
#let ui = read("qt/lab5/mainwindow.ui")
#raw(writeft(ui, 0, 43), lang:"xml")
#raw(writeft(ui, 44, 50), lang:"xml")
== Вывод
В процессе выполнения лабораторной работы были изучены конвенции о способах передачи управления и данных при вызове из программы, написанной на языке высокого уровня, подпрограмм, написанных на ассемблере.
== Контрольные вопросы
1. *Что такое «конвенции о связи»? В чем заключается конвенция register?* Конвенции о связи - ряд способов декларировать передачу параметров при организации связи разных модулей (вызывающей и вызываемой программы). При регистровой конвенции доступно 3 регистра при вызове подпрограммы: ```asm rax```, ```asm rdx```, ```asm rcx```, все остальные параметры хранятся в стеке.
2. *Что такое «пролог» и «эпилог»? Где располагается область локальных данных?* Пролог и эпилог - стандартное оформление входа и выхода программы соответственно. При вызове программы выполняется пролог, в ходе которого в стеке сохраняется значение ```asm rbp``` вызывающей программы, копии параметров и область локальных переменных подпрограммы.
3. *Как связана структура данных стека в момент передачи управления и текст программы и подпрограмм?* В момент получения управления подпрограммой в регистрах находятся до 6-ти параметров в виде значений или адресов (например, если передать указатель на начало строки), а в стеке – адрес возврата в вызывающую программу (адрес 64х разрядный для 64х разрядной системы).
4. *С какой целью применяют разноязыковые модули в одном проекте?* Разноязыковые модули позволяют дополнить функционал языка высокого уровня. Также возможна оптимизация высоконагруженных функций, которые возможно ускорить за счет замещения стандартныой функции или метода ассемблерной программой.Контрольные вопросы
|
|
https://github.com/xsro/xsro.github.io | https://raw.githubusercontent.com/xsro/xsro.github.io/zola/typst/nlct/solution/common.typ | typst | #let exercise(body,code:"1")={
rect(fill: gray.lighten(60%),inset:8pt,radius:4pt,
[
*Exercise #code*: #label(code) #metadata(code)<exercise>
#body
],)
}
#let solve(number) = {
[*Solution to #number*]
} |
|
https://github.com/LDemetrios/Typst4k | https://raw.githubusercontent.com/LDemetrios/Typst4k/master/src/test/resources/suite/layout/transform.typ | typst | // Test transformations.
--- transform-tex-logo ---
// Test creating the TeX and XeTeX logos.
#let size = 11pt
#let tex = {
[T]
h(-0.14 * size)
box(move(dy: 0.22 * size)[E])
h(-0.12 * size)
[X]
}
#let xetex = {
[X]
h(-0.14 * size)
box(scale(x: -100%, move(dy: 0.26 * size)[E]))
h(-0.14 * size)
[T]
h(-0.14 * size)
box(move(dy: 0.26 * size)[E])
h(-0.12 * size)
[X]
}
#set text(font: "New Computer Modern", size)
Neither #tex, \
nor #xetex!
--- transform-rotate-and-scale ---
// Test combination of scaling and rotation.
#set page(height: 80pt)
#align(center + horizon,
rotate(20deg, scale(70%, image("/assets/images/tiger.jpg")))
)
--- transform-rotate-origin ---
// Test setting rotation origin.
#rotate(10deg, origin: top + left,
image("/assets/images/tiger.jpg", width: 50%)
)
--- transform-scale-origin ---
// Test setting scaling origin.
#let r = rect(width: 100pt, height: 10pt, fill: forest)
#set page(height: 65pt)
#box(scale(r, x: 50%, y: 200%, origin: left + top))
#box(scale(r, x: 50%, origin: center))
#box(scale(r, x: 50%, y: 200%, origin: right + bottom))
--- transform-rotate ---
// Test that rotation impact layout.
#set page(width: 200pt)
#set rotate(reflow: true)
#let one(angle) = box(fill: aqua, rotate(angle)[Test Text])
#for angle in range(0, 360, step: 15) {
one(angle * 1deg)
}
--- transform-rotate-relative-sizing ---
// Test relative sizing in rotated boxes.
#set page(width: 200pt, height: 200pt)
#set text(size: 32pt)
#let rotated(body) = box(rotate(
90deg,
box(stroke: 0.5pt, height: 20%, clip: true, body)
))
#set rotate(reflow: false)
Hello #rotated[World]!\
#set rotate(reflow: true)
Hello #rotated[World]!
--- transform-scale ---
// Test that scaling impacts layout.
#set page(width: 200pt)
#set text(size: 32pt)
#let scaled(body) = box(scale(
x: 20%,
y: 40%,
body
))
#set scale(reflow: false)
Hello #scaled[World]!
#set scale(reflow: true)
Hello #scaled[World]!
--- transform-scale-relative-sizing ---
// Test relative sizing in scaled boxes.
#set page(width: 200pt, height: 200pt)
#set text(size: 32pt)
#let scaled(body) = box(scale(
x: 60%,
y: 40%,
box(stroke: 0.5pt, width: 30%, clip: true, body)
))
#set scale(reflow: false)
Hello #scaled[World]!\
#set scale(reflow: true)
Hello #scaled[World]!
--- transform-scale-abs-and-auto ---
// Test scaling by absolute lengths and auto.
#set page(width: 200pt, height: 200pt)
#let cylinder = image("/assets/images/cylinder.svg")
#cylinder
#scale(x: 100pt, y: 50pt, reflow: true, cylinder)
#scale(x: auto, y: 50pt, reflow: true, cylinder)
#scale(x: 100pt, y: auto, reflow: true, cylinder)
#scale(x: 150%, y: auto, reflow: true, cylinder)
--- transform-skew ---
// Test skewing along one axis.
#set page(width: 100pt, height: 60pt)
#set text(size: 12pt)
#let skewed(body) = box(skew(ax: -30deg, body))
#set skew(reflow: false)
Hello #skewed[World]!
#set skew(reflow: true)
Hello #skewed[World]!
--- transform-skew-both-axes ---
// Test skewing along both axes.
#set page(width: 100pt, height: 250pt)
#set text(size: 12pt)
#let skewed(angle) = box(skew(ax: 30deg, ay: angle)[Some Text])
#set skew(reflow: true)
#for angle in range(-30, 31, step: 10) {
skewed(angle * 1deg)
}
--- transform-skew-origin ---
// Test setting skewing origin.
#set page(width: 100pt, height:40pt)
#set text(spacing: 20pt)
#let square = square.with(width: 8pt)
#let skew-square(origin) = box(place(square(stroke: gray))
+ place(skew(ax: -30deg, ay: -30deg, origin: origin, square())))
#skew-square(center+horizon)
#skew-square(bottom+left)
#skew-square(top+right)
#skew-square(horizon+right)
--- transform-skew-relative-sizing ---
// Test relative sizing in skewed boxes.
#set page(width: 100pt, height: 60pt)
#set text(size: 12pt)
#let skewed(body) = box(skew(
ax: 30deg,
box(stroke: 0.5pt, width: 30%, clip: true, body)
))
#set skew(reflow: false)
Hello #skewed[World]!\
#set skew(reflow: true)
Hello #skewed[World]!
|
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/fletcher/0.4.0/src/marks.typ | typst | Apache License 2.0 | #import "@preview/cetz:0.1.2"
#import "utils.typ": *
#import calc: sqrt, abs, sin, cos, max, pow
#let EDGE_ARGUMENT_SHORTHANDS = (
"dashed": (dash: "dashed"),
"dotted": (dash: "dotted"),
"double": (extrude: (-2, +2)),
"triple": (extrude: (-4, 0, +4)),
"crossing": (crossing: true),
)
#let MARK_SYMBOL_ALIASES = (
(sym.arrow.r): "->",
(sym.arrow.l): "<-",
(sym.arrow.r.l): "<->",
(sym.arrow.long.r): "->",
(sym.arrow.long.l): "<-",
(sym.arrow.long.r.l): "<->",
(sym.arrow.double.r): "=>",
(sym.arrow.double.l): "<=",
(sym.arrow.double.r.l): "<=>",
(sym.arrow.double.long.r): "=>",
(sym.arrow.double.long.l): "<=",
(sym.arrow.double.long.r.l): "<=>",
(sym.arrow.r.tail): ">->",
(sym.arrow.l.tail): "<-<",
(sym.arrow.twohead): "->>",
(sym.arrow.twohead.r): "->>",
(sym.arrow.twohead.l): "<<-",
(sym.arrow.bar): "|->",
(sym.arrow.bar.double): "|=>",
(sym.arrow.hook.r): "hook->",
(sym.arrow.hook.l): "<-hook'",
)
#let MARK_DEFAULTS = (
head: (
size: 7, // radius of curvature, multiples of stroke thickness
sharpness: 24deg, // angle at vertex between central line and arrow's edge
delta: 54deg, // angle spanned by arc of curved arrow edge
outer-len: 4,
),
solid: (
size: 10,
sharpness: 19deg,
fill: true,
stealth: 0,
outer-len: mark => mark.size*calc.cos(mark.sharpness)*(1 - mark.stealth),
inner-len: mark => mark.outer-len/2,
),
bar: (size: 4.9, angle: 0deg),
circle: (size: 2, fill: false, outer-len: mark => 2*mark.size),
cross: (size: 4, angle: 45deg),
hook: (size: 2.88, rim: 0.85, outer-len: 3),
)
#{MARK_DEFAULTS.harpoon = MARK_DEFAULTS.head}
#let MARK_ALIASES = (
">": (kind: "head", rev: false),
"<": (kind: "head", rev: true),
">>": (kind: "head", rev: false, extrude: (-3, 0), inner-len: 3, outer-len: 7),
"<<": (kind: "head", rev: true, extrude: (-3, 0), inner-len: 3, outer-len: 7),
">>>": (kind: "head", rev: false, extrude: (-6, -3, 0), inner-len: 6, outer-len: 9),
"<<<": (kind: "head", rev: true, extrude: (-6, -3, 0), inner-len: 6, outer-len: 9),
"|>": (kind: "solid", rev: false),
"<|": (kind: "solid", rev: true),
"|": (kind: "bar"),
"||": (kind: "bar", extrude: (-3, 0), inner-len: 3),
"|||": (kind: "bar", extrude: (-6, -3, 0), inner-len: 4),
"/": (kind: "bar", angle: -30deg),
"\\": (kind: "bar", angle: +30deg),
"x": (kind: "cross"),
"X": (kind: "cross", size: 7),
"o": (kind: "circle"),
"O": (kind: "circle", size: 4),
"*": (kind: "circle", fill: true),
"@": (kind: "circle", size: 4, fill: true),
"}>": (kind: "solid", stealth: 0.25, rev: false),
"<{": (kind: "solid", stealth: 0.25, rev: true),
doublehead: (
kind: "head",
size: 9.6*1.1,
sharpness: 19deg,
delta: 43.7deg,
outer-len: 5.5,
),
triplehead: (
kind: "head",
size: 9*1.5,
sharpness: 25deg,
delta: 43deg,
outer-len: 6,
),
"hook'": (kind: "hook", flip: -1),
"harpoon'": (kind: "harpoon", flip: -1),
hooks: (kind: "hook", double: true),
)
/// Calculate cap offset of round-style arrow cap,
/// $r (sin θ - sqrt(1 - (cos θ - (|y|)/r)^2))$.
///
/// - r (length): Radius of curvature of arrow cap.
/// - θ (angle): Angle made at the the arrow's vertex, from the central stroke
/// line to the arrow's edge.
/// - y (length): Lateral offset from the central stroke line.
#let round-arrow-cap-offset(r, θ, y) = {
r*(sin(θ) - sqrt(1 - pow(cos(θ) - abs(y)/r, 2)))
}
#let cap-offset(mark, y) = {
if mark == none { return 0 }
if mark.kind == "head" {
round-arrow-cap-offset(mark.size, mark.sharpness, y)
}
else if mark.kind in ("hook", "hook'", "hooks") { -mark.outer-len }
else if mark.kind == "circle" {
let r = mark.size
-sqrt(max(0, r*r - y*y)) - r
} else if mark.kind == "solid" {
-mark.outer-len/4
} else if mark.kind == "bar" {
-calc.tan(mark.angle)*y
} else { 0 }
}
#let LINE_ALIASES = (
"-": (:),
"=": EDGE_ARGUMENT_SHORTHANDS.double,
"==": EDGE_ARGUMENT_SHORTHANDS.triple,
"--": EDGE_ARGUMENT_SHORTHANDS.dashed,
"..": EDGE_ARGUMENT_SHORTHANDS.dotted,
)
/// Take a string or dictionary specifying a mark and return a dictionary,
/// adding defaults for any necessary missing parameters.
///
/// Ensures all required parameters except `rev` and `pos` are present.
#let interpret-mark(mark, defaults: (:)) = {
if mark == none { return none }
if type(mark) == str { mark = (kind: mark) }
mark = defaults + mark
if mark.kind.at(-1) == "'" {
mark.flip = -mark.at("flip", default: +1)
mark.kind = mark.kind.slice(0, -1)
}
if mark.kind in MARK_ALIASES {
let new = MARK_ALIASES.at(mark.kind)
mark = new + mark
mark.kind = new.kind
}
if mark.kind in MARK_DEFAULTS {
mark = MARK_DEFAULTS.at(mark.kind) + mark
} else {
panic("Couldn't interpret mark:", mark)
}
// evaluate "lazy parameters" which are functions of the mark
for (key, val) in mark {
if type(val) == function {
mark.at(key) = val(mark)
}
}
assert(mark.kind in MARK_DEFAULTS, message: "Didn't work: " + repr(mark))
return mark
}
#let interpret-marks(marks) = {
marks = marks.enumerate().map(((i, mark)) => {
interpret-mark(mark, defaults: (
pos: i/calc.max(1, marks.len() - 1),
rev: i == 0,
))
}).filter(mark => mark != none) // drop empty marks
assert(type(marks) == array)
assert(marks.all(mark => type(mark) == dictionary), message: repr(marks))
marks
}
/// Parse and interpret the marks argument provided to `edge()`.
/// Returns a dictionary of processed `edge()` arguments.
///
/// - arg (string, array):
/// Can be a string, (e.g. `"->"`, `"<=>"`), etc, or an array of marks.
/// A mark can be a string (e.g., `">"` or `"head"`, `"x"` or `"cross"`) or a dictionary containing the keys:
/// - `kind` (required) the mark name, e.g. `"solid"` or `"bar"`
/// - `pos` the position along the edge to place the mark, from 0 to 1
/// - `rev` whether to reverse the direction
/// - `tail` the visual length of the mark's tail
/// - parameters specific to the kind of mark, e.g., `size` or `sharpness`
/// -> dictiony
#let interpret-marks-arg(arg) = {
if type(arg) == array { return (marks: interpret-marks(arg)) }
if type(arg) == symbol {
if str(arg) in MARK_SYMBOL_ALIASES { arg = MARK_SYMBOL_ALIASES.at(arg) }
else { panic("Unrecognised marks symbol '" + arg + "'.") }
}
assert(type(arg) == str)
let text = arg
let MARKS = (MARK_ALIASES.keys() + MARK_DEFAULTS.keys()).sorted(key: i => -i.len())
let LINES = LINE_ALIASES.keys().sorted(key: i => -i.len())
let eat(arg, options) = {
for option in options {
if arg.starts-with(option) {
return (arg.slice(option.len()), option)
}
}
return (arg, none)
}
let marks = ()
let lines = ()
let mark
let line
// first mark, [<]-x->>
(text, mark) = eat(text, MARKS)
marks.push(mark)
let parse-error(suggestion) = panic(
"Invalid marks shorthand '" + arg + "'. Try '" + suggestion + "'."
)
while true {
// line, <[-]x->>
(text, line) = eat(text, LINES)
if line == none {
let suggestion = arg.slice(0, -text.len()) + "-" + text
parse-error(suggestion)
}
lines.push(line)
// subsequent mark, <-[x]->>
(text, mark) = eat(text, MARKS)
marks.push(mark)
if text == "" { break }
if mark == none {
// text remains that was not recognised as mark
let suggestion = marks.intersperse(lines.at(0)).join()
parse-error(suggestion)
}
}
if lines.dedup().len() > 1 {
// different line styles were mixed
let suggestion = marks.intersperse(lines.at(0)).join()
parse-error(suggestion)
}
let line = lines.at(0)
marks = marks.map(interpret-mark)
// make classic math arrows slightly larger on double/triple stroked lines
if line == "=" {
marks = marks.map(mark => {
if mark != none and mark.kind == "head" {
mark += MARK_ALIASES.doublehead
}
mark
})
} else if line == "==" {
marks = marks.map(mark => {
if mark != none and mark.kind == "head" {
mark += MARK_ALIASES.triplehead
}
mark
})
}
return (
marks: interpret-marks(marks),
..LINE_ALIASES.at(lines.at(0))
)
}
#let draw-arrow-cap(p, θ, stroke, mark, debug: false) = {
mark = interpret-mark(mark)
let inner-len = stroke.thickness*mark.at("inner-len", default: 0)
let outer-len = stroke.thickness*mark.at("outer-len", default: 0)
if mark.at("rev", default: false) {
θ += 180deg
mark.rev = false
}
mark.flip = mark.at("flip", default: +1)
if debug {
let dir = if mark.rev {1} else {-1}
let normal = vector-polar(stroke.thickness, θ - 90deg)
cetz.draw.on-layer(1, (
cetz.draw.circle(
p,
radius: stroke.thickness,
stroke: none,
fill: rgb("0f0a"),
),
cetz.draw.line(
vector.add(p, vector-polar(-stroke.thickness*mark.at("body", default: 0), θ)),
vector.add(p, vector-polar(outer-len*dir, θ)),
stroke: rgb("0f0a") + stroke.thickness,
),
cetz.draw.line(
vector.add(p, vector-polar(-stroke.thickness*mark.at("body", default: 0), θ)),
vector.add(p, vector-polar(inner-len*dir, θ)),
stroke: rgb("0f0a") + stroke.thickness*2,
),
).join())
}
let shift(p, x) = vector.add(p, vector-polar(stroke.thickness*x, θ))
// extrude draws multiple copies of the mark
// at shifted positions
if "extrude" in mark {
for x in mark.extrude {
let mark = mark
let _ = mark.remove("extrude")
draw-arrow-cap(shift(p, x), θ, stroke, mark)
}
return
}
let stroke = (
thickness: if "thickness" in mark { mark.thickness} else { stroke.thickness },
paint: if "paint" in mark { mark.paint } else { stroke.paint },
cap: "round",
)
if mark.kind == "harpoon" {
cetz.draw.arc(
p,
radius: mark.size*stroke.thickness,
start: θ + mark.flip*(90deg + mark.sharpness),
delta: mark.flip*mark.delta,
stroke: stroke,
)
} else if mark.kind == "head" {
draw-arrow-cap(p, θ, stroke, mark + (kind: "harpoon"))
draw-arrow-cap(p, θ, stroke, mark + (kind: "harpoon'"))
} else if mark.kind == "hook" {
if mark.at("double", default: false) {
draw-arrow-cap(p, θ, stroke, mark + (double: false, flip: -1))
}
p = shift(p, -mark.outer-len)
cetz.draw.arc(
p,
radius: mark.size*stroke.thickness,
start: θ + mark.flip*90deg,
delta: -mark.flip*180deg,
stroke: stroke,
)
let q = vector.add(p, vector-polar(2*mark.size*stroke.thickness, θ - mark.flip*90deg))
let rim = vector-polar(-mark.rim*stroke.thickness, θ)
cetz.draw.line(
q,
(rel: rim, to: q),
stroke: stroke
)
} else if mark.kind == "bar" {
let v = vector-polar(mark.size*stroke.thickness, θ + 90deg + mark.angle)
cetz.draw.line(
(to: p, rel: v),
(to: p, rel: vector.scale(v, -1)),
stroke: stroke,
)
} else if mark.kind == "cross" {
draw-arrow-cap(p, θ, stroke, mark + (kind: "bar", angle: +mark.angle))
draw-arrow-cap(p, θ, stroke, mark + (kind: "bar", angle: -mark.angle))
} else if mark.kind == "circle" {
p = shift(p, -mark.size)
cetz.draw.circle(
p,
radius: mark.size*stroke.thickness,
stroke: stroke,
fill: if mark.fill { default(stroke.paint, black) }
)
} else if mark.kind == "solid" {
let d = mark.size*stroke.thickness
cetz.draw.line(
(to: p, rel: vector-polar(-d, θ + mark.sharpness)),
p,
(to: p, rel: vector-polar(-d, θ - mark.sharpness)),
(to: p, rel: vector-polar(-d*calc.cos(mark.sharpness)*(1 - mark.stealth), θ)),
fill: if mark.fill { default(stroke.paint, black) },
close: true,
stroke: if not mark.fill { stroke }
)
} else {
panic("unknown mark kind:", mark)
}
}
#let place-arrow-cap(path, stroke, mark, ..args) = {
let ε = 1e-4
// calculate velocity of parametrised path at point
let pt = path(mark.pos)
let pt-plus-ε = path(mark.pos + ε)
let grad = vector-len(vector.sub(pt-plus-ε, pt))/ε
if grad == 0pt { grad = ε*1pt }
let outer-len = mark.at("outer-len", default: 0)
let Δt = outer-len*stroke.thickness/grad
if Δt == 0 { Δt = ε } // avoid Δt = 0 so the two points are distinct
let t = lerp(Δt, 1, mark.pos)
let head-pt = path(t)
let tail-pt = path(t - Δt)
let origin-pt = if mark.rev { tail-pt } else { head-pt }
let θ = vector-angle(vector.sub(head-pt, tail-pt))
draw-arrow-cap(origin-pt, θ, stroke, mark, ..args)
} |
https://github.com/GuTaoZi/SUSTech-thesis-typst | https://raw.githubusercontent.com/GuTaoZi/SUSTech-thesis-typst/main/template/sections.typ | typst | MIT License | #import "@preview/anti-matter:0.1.1": set-numbering
let |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.