repo
stringlengths
26
115
file
stringlengths
54
212
language
stringclasses
2 values
license
stringclasses
16 values
content
stringlengths
19
1.07M
https://github.com/7sDream/fonts-and-layout-zhCN
https://raw.githubusercontent.com/7sDream/fonts-and-layout-zhCN/master/chapters/03-unicode/icu.typ
typst
Other
#import "/template/template.typ": web-page-template #import "/template/components.typ": note #import "/template/util.typ" #import "/lib/glossary.typ": tr #show: web-page-template // ## ICU == ICU 程序库 // For those of you reading this book because you're planning on developing applications or libraries to handle complex text layout, there's obviously a lot of things in this chapter that you need to implement: UTF-8 encoding and decoding, correct case conversion, decomposition, normalization, and so on. 如果你阅读本书的原因是想开发一个处理复杂文本布局的应用或程序库,可能会发现上面介绍的过的许多概念都需要实现。比如UTF-8的编解码,正确的大小写转换,字符串的#tr[decompose]和#tr[normalization]等等。 // The Unicode Standard (and its associated Unicode Standard Annexes, Unicode Technical Standards and Unicode Technical Reports) define algorithms for how to handle these things and much more: how to segment text into words and lines, how to ensure that left-to-right and right-to-left text work nicely together, how to handle regular expressions, and so on. It's good to be familiar with these resources, available from [the Unicode web site](http://unicode.org/reports/), so you know what the issues are, but you don't necessarily have to implement them yourself. Unicode标准(包括其所附带的附录、技术标准、技术报告等内容)中定义了许多算法,除了我们之前提到过的之外还有很多。例如如何将文本按词或行来分段,如何保证从左往右书写和从右往左书写的内容和谐共处,如何处理正则表达式等等。这些信息都能从Unicode技术报告#[@Unicode.UnicodeTechnical]中找到,你可以逐步探索并熟悉它们。现在你知道处理文本有多复杂了。但还好,这些内容你不需要全都自己实现。 // These days, most programming languages will have a standard set of routines to get you some of the way - at the least, you can expect UTF-8 encoding support. For the rest, the [ICU Project](http://site.icu-project.org) is a set of open-source libraries maintained by IBM (with contributions by many others, of course). Check to see if your preferred programming language has an extension which wraps the ICU library. If so, you will have access to well-tested and established implementations of all the standard algorithms used for Unicode text processing. 近些年,大多数编程语言对文本处理都有不错的支持,最差也会支持UTF-8编码。对于其他的高级功能,ICU 项目#[@UnicodeConsortium.ICU]提供了一系列开源库来处理。ICU项目由许多贡献者一起创造,现在由IBM公司进行维护。它实现了所有Unicode文本处理的标准算法,而且经过了非常全面的测试,被公认为质量上乘。你可以看看现在使用的编程语言是否有对ICU库的绑定或封装。如果有的话,那通过它你就能直接用上ICU提供的各种优良的算法实现了。
https://github.com/Myriad-Dreamin/tinymist
https://raw.githubusercontent.com/Myriad-Dreamin/tinymist/main/crates/tinymist-query/src/fixtures/lexical_hierarchy/destructing.typ
typst
Apache License 2.0
#let (a, b) = (1, 1); #let (a, b) = (b, a);
https://github.com/jneug/typst-tools4typst
https://raw.githubusercontent.com/jneug/typst-tools4typst/main/README.md
markdown
MIT License
# Tools for Typst (v0.3.2) > A utility package for typst package authors. **Tools for Typst** (`t4t` in short) is a utility package for [Typst](typst/typst) package and template authors. It provides solutions to some recurring tasks in package development. The package can be imported or any useful parts of it copied into a project. It is perfectly fine to treat `t4t` as a snippet collection and to pick and choose only some useful functions. For this reason, most functions are implemented without further dependencies. Hopefully, this collection will grow over time with *Typst* to provide solutions for common problems. ## Usage Either import the package from the Typst preview repository: ```js #import "@preview/t4t:0.3.2": * ``` If only a few functions from `t4t` are needed, simply copy the necessary code to the beginning of the document. ## Reference ---- **Note:** This reference might be out of date. Please refer to the manual for a complete overview of all functions. ---- The functions are categorized into different submodules that can be imported separately. The modules are: - `is` - `def` - `assert` - `alias` - `math` - `get` Any or all modules can be imported the usual way: ```js // Import as "t4t" #import "@preview/t4t:0.3.2" // Import all modules #import "@preview/t4t:0.3.2": * // Import specific modules #import "@preview/t4t:0.3.2": is, def ``` In general, the main value is passed last to the utility functions. `#def.if-none()`, for example, takes the default value first and the value to test second. This is somewhat counterintuitive at first, but allows the use of `.with()` to generate derivative functions: ```js #let is-foo = eq.with("foo") ``` ### Test functions ```js #import "@preview/t4t:0.3.2": is ``` These functions provide shortcuts to common tests like `#is.eq()`. Some of these are not shorter as writing pure Typst code (e.g. `a == b`), but can easily be used in `.any()` or `.find()` calls: ```js // check all values for none if some-array.any(is-none) { ... } // find first not none value let x = (none, none, 5, none).find(is.not-none) // find position of a value let pos-bar = args.pos().position(is.eq.with("|")) ``` There are two exceptions: `is-none` and `is-auto`. Since keywords can't be used as function names, the `is` module can't define a function to do `is.none()`. Therefore the methods `is-none` and `is-auto` are provided in the base module of `t4t`: ```js #import "@preview/t4t:0.3.2": is-none, is-auto ``` The `is` submodule still has these tests, but under different names (`is.n` and `is.non` for `none` and `is.a` and `is.aut` for `auto`). - `#is.neq( test )`: Creates a new test function that is `true` when `test` is `false`. Can be used to create negations of tests like `#let not-raw = is.neg(is.raw)`. - `#is.eq( a, b )`: Tests if values `a` and `b` are equal. - `#is.neq( a, b )`: Tests if values `a` and `b` are not equal. - `#is.n( ..values )`: Tests if any of the passed `values` is `none`. - `#is.non( ..values )`: Alias for `is.n`. - `#is.not-none( ..values )`: Tests if all of the passed `values` are not `none`. - `#is.not-n( ..values )`: Alias for `is.not-none`. - `#is.a( ..values )`: Tests if any of the passed `values` is `auto`. - `#is.aut( ..values )`: Alias for `is-a`. - `#is.not-auto( ..values )`: Tests if all of the passed `values` are not `auto`. - `#is.not-a( ..values )`: Alias for `is.not-auto`. - `#is.empty( value )`: Tests if `value` is _empty_. A value is considered _empty_ if it is an empty array, dictionary or string or `none` otherwise. - `#is.not-empty( value )`: Tests if `value` is not empty. - `#is.any( ..compare, value )`: Tests if `value` is equal to any one of the other passed-in values. - `#is.not-any( ..compare, value)`: Tests if `value` is not equal to any one of the other passed-in values. - `#is.has( ..keys, value )`: Tests if `value` contains all the passed `keys`. Either as keys in a dictionary or elements in an array. If `value` is neither of those types, `false` is returned. - `#is.type( t, value )`: Tests if `value` is of type `t`. - `#is.dict( value )`: Tests if `value` is a dictionary. - `#is.arr( value )`: Tests if `value` is an array. - `#is.content( value )`: Tests if `value` is of type content. - `#is.color( value )`: Tests if `value` is a color. - `#is.stroke( value )`: Tests if `value` is a stroke. - `#is.loc( value )`: Tests if `value` is a location. - `#is.bool( value )`: Tests if `value` is a boolean. - `#is.str( value )`: Tests if `value` is a string. - `#is.int( value )`: Tests if `value` is an integer. - `#is.float( value )`: Tests if `value` is a float. - `#is.num( value )`: Tests if `value` is a numeric value (`integer` or `float`). - `#is.frac( value )`: Tests if `value` is a fraction. - `#is.length( value )`: Tests if `value` is a length. - `#is.rlength( value )`: Tests if `value` is a relative length. - `#is.ratio( value )`: Tests if `value` is a ratio. - `#is.align( value )`: Tests if `value` is an alignment. - `#is.align2d( value )`: Tests if `value` is a 2d alignment. - `#is.func( value )`: Tests if `value` is a function. - `#is.any-type( ..types, value )`: Tests if `value` has any of the passed-in types. - `#is.same-type( ..values )`: Tests if all passed-in values have the same type. - `#is.all-of-type( t, ..values )`: Tests if all of the passed-in values have the type `t`. - `#is.none-of-type( t, ..values )`: Tests if none of the passed-in values has the type `t`. - `#is.one-not-none( ..values )`: Checks, if at least one value in `values` is not equal to `none`. Useful for checking multiple optional arguments for a valid value: `#if is.one-not-none(..args.pos()) [ #args.pos().find(is.not-none) ]` - `#is.elem( func, value )`: Tests if `value` is a content element with `value.func() == func`. If `func` is a string, `value` will be compared to `repr(value.func())` instead. Both of these effectively do the same: ```js #is.elem(raw, some_content) #is.elem("raw", some_content) ``` - `#is.sequence( value )`: Tests if `value` is a sequence of content. - `#is.raw( value )`: Tests if `value` is a raw element. - `#is.table( value )`: Tests if `value` is a table element. - `#is.list( value )`: Tests if `value` is a list element. - `#is.enum( value )`: Tests if `value` is an enum element. - `#is.terms( value )`: Tests if `value` is a terms element. - `#is.cols( value )`: Tests if `value` is a columns element. - `#is.grid( value )`: Tests if `value` is a grid element. - `#is.stack( value )`: Tests if `value` is a stack element. - `#is.label( value )`: Tests if `value` is of type `label`. ### Default values ```js #import "@preview/t4t:0.3.2": def ``` These functions perform a test to decide if a given `value` is _invalid_. If the test _passes_, the `default` is returned, the `value` otherwise. Almost all functions support an optional `do` argument, to be set to a function of one argument, that will be applied to the value if the test fails. For example: ```js // Sets date to a datetime from an optional // string argument in the format "YYYY-MM-DD" #let date = def.if-none( datetime.today(), // default passed_date, // passed-in argument do: (d) >= { // post-processor d = d.split("-") datetime(year=d[0], month=d[1], day=d[2]) } ) ``` - `#def.if-true( test, default, do:none, value )`: Returns `default` if `test` is `true`, `value` otherwise. - `#def.if-false( test, default, do:none, value )`: Returns `default` if `test` is `false`, `value` otherwise. - `#def.if-none( default, do:none, value )`: Returns `default` if `value` is `none`, `value` otherwise. - `#def.if-auto( default, do:none, value )`: Returns `default` if `value` is `auto`, `value` otherwise. - `#def.if-any( ..compare, default, do:none, value )`: Returns `default` if `value` is equal to any of the passed-in values, `value` otherwise. (`#def.if-any(none, auto, 1pt, width)`) - `#def.if-not-any( ..compare, default, do:none, value )`: Returns `default` if `value` is not equal to any of the passed-in values, `value` otherwise. (`#def.if-not-any(left, right, top, bottom, position)`) - `#def.if-empty( default, do:none, value )`: Returns `default` if `value` is _empty_, `value` otherwise. - `#def.as-arr( ..values )`: Always returns an array containing all `values`. Any arrays in `values` will be flattened into the result. This is useful for arguments, that can have one element or an array of elements: `#def.as-arr(author).join(", ")`. ### Assertions ```js #import "@preview/t4t:0.3.2": assert ``` This submodule overloads the default `assert` function and provides more asserts to quickly check if given values are valid. All functions use `assert` in the background. Since a module in Typst is not callable, the `assert` function is now available as `assert.that()`. `assert.eq` and `assert.ne` work as expected. All assert functions take an optional argument `message` to set the error message shown if the assert fails. - `#assert.that( test )`: Asserts that the passed `test` is `true`. - `#assert.that-not( test )`: Asserts that the passed `test` is `false`. - `#assert.eq( a, b )`: Asserts that `a` is equal to `b`. - `#assert.ne( a, b )`: Asserts that `a` is not equal to `b`. - `#assert.neq( a, b )`: Alias for `assert.ne`. - `#assert.not-none( value )`: Asserts that `value` is not equal to `none`. - `#assert.any( ..values, value )`: Asserts that `value` is one of the passed `values`. - `#assert.not-any( ..values, value )`: Asserts that `value` is not one of the passed `values`. - `#assert.any-type( ..types, value )`: Asserts that the type of `value` is one of the passed `types`. - `#assert.not-any-type( ..types, value )`: Asserts that the type of `value` is not one of the passed `types`. - `#assert.all-of-type( t, ..values )`: Asserts that the type of all passed `values` is equal to `t`. - `#assert.none-of-type( t, ..values )`: Asserts that the type of all passed `values` is not equal to `t`. - `#assert.not-empty( value )`: Asserts that `value` is not _empty_. - `#assert.new( test )`: Creates a new assert function that uses the passed `test`. `test` is a function with signature `(any) => boolean`. This is a quick way to create an assertion from any of the `is` functions: ```js #let assert-foo = assert.new(is.eq.with("foo")) #let assert-length = assert.new(is.length) ``` ## Element helpers ```js #import "@preview/t4t:0.3.2": get ``` This submodule is a collection of functions, that mostly deal with content elements and _get_ some information from them. Though some handle other types like dictionaries. - `#get.dict( ..values )`: Create a new dictionary from the passed `values`. All named arguments are stored in the new dictionary as is. All positional arguments are grouped in key-value pairs and inserted into the dictionary: ```js #get.dict("a", 1, "b", 2, "c", d:4, e:5) // (a:1, b:2, c:none, d:4, e:5) ``` - `#get.dict-merge( ..dicts )`: Recursively merges the passed-in dictionaries: ```js #get.dict-merge( (a: 1), (a: (one: 1, two:2)), (a: (two: 4, three:3)) ) // (a:(one:1, two:4, three:3)) ``` - `#get.args( args, prefix: "" )`: Creates a function to extract values from an argument sink `args`. The resulting function takes any number of positional and named arguments and creates a dictionary with values from `args.named()`. Positional arguments are present in the result if they are present in `args.named()`. Named arguments are always present, either with their value from `args.named()` or with the provided value. A `prefix` can be specified, to extract only specific arguments. The resulting dictionary will have all keys with the prefix removed, though. ```js #let my-func( ..options, title ) = block( ..get.args(options)( "spacing", "above", "below", width:100% ) )[ #text(..get.args(options, prefix:"text-")( fill:black, size:0.8em ), title) ] #my-func( width: 50%, text-fill: red, text-size: 1.2em )[#lorem(5)] ``` - `#get.text( element, sep: "" )`: Recursively extracts the text content of a content element. If present, all child elements are converted to text and joined with `sep`. - `#get.stroke-paint( stroke, default: black )`: Returns the color of `stroke`. If no color information is available, `default` is used. (Deprecated, use `stroke.paint` instead.) - `#get.stroke-thickness( stroke, default: 1pt )`: Returns the thickness of `stroke`. If no thickness information is available, `default` is used. (Deprecated, use `stroke.thickness` instead.) - `#get.stroke-dict( stroke, ..overrides )`: Creates a dictionary with the keys necessary for a stroke. The returned dictionary is guaranteed to have the keys `paint`, `thickness`, `dash`, `cap` and `join`. If `stroke` is a dictionary itself, all key-value pairs are copied to the resulting stroke. Any named arguments in `overrides` will override the previous value. - `#get.inset-at( direction, inset, default: 0pt )`: Returns the inset (or outset) in a given `direction`, ascertained from `inset`. - `#get.inset-dict( inset, ..overrides )`: Creates a dictionary usable as an inset (or outset) argument. The resulting dictionary is guaranteed to have the keys `top`, `left`, `bottom` and `right`. If `inset` is a dictionary itself, all key-value pairs are copied to the resulting stroke. Any named arguments in `overrides` will override the previous value. - `#get.x-align( align, default:left )`: Returns the alignment along the x-axis from the passed-in `align` value. If none is present, `default` is returned. (Deprecated, use `align.x` instead.) ```js #get.x-align(top + center) // center ``` - `#get.y-align( align, default:top )`: Returns the alignment along the y-axis from the passed-in `align` value. If none is present, `default` is returned. (Deprecated, use `align.y` instead.) ## Math functions ```js #import "@preview/t4t:0.3.2": math ``` Some functions to complement the native `calc` module. - `#math.minmax( a, b )`: Returns an array with the minimum of `a` and `b` as the first element and the maximum as the second: ```js #let (min, max) = math.minmax(a, b) ``` - `#math.clamp( min, max, value )`: Clamps a value between `min` and `max`. In contrast to `calc.clamp()` this function works for other values than numbers, as long as they are comparable. ```js text-size = math.clamp(0.8em, 1.2em, text-size) ``` - `#lerp( min, max, t )`: Calculates the linear interpolation of `t` between `min` and `max`. ```js #let width = math.lerp(0%, 100%, x) ``` `t` should be a value between 0 and 1, but the interpolation works with other values, too. To constrain the result into the given interval, use `math.clamp`: ```js #let width = math.lerp(0%, 100%, math.clamp(0, 1, x)) ``` - `#map( min, max, range-min, range-max, value )`: Maps a `value` from the interval `[min, max]` into the interval `[range-min, range-max]`: ```js #let text-weight = int(math.map(8pt, 16pt, 400, 800, text-size)) ``` ## Alias functions ```js #import "@preview/t4t:0.3.2": alias ``` Some of the native Typst function as aliases, to prevent collisions with some common argument names. For example using `numbering` as an argument is not possible if the value is supposed to be passed to the `numbering()` function. To still allow argument names that are in line with the common Typst names (like `numbering`, `align` ...), these alias functions can be used: ```js #let excercise( no, numbering: "1)" ) = [ Exercise #alias.numbering(numbering, no) ] ``` The following functions have aliases right now: - `numbering` - `align` - `type` - `label` - `text` - `raw` - `table` - `list` - `enum` - `terms` - `grid` - `stack` - `columns` ## Changelog ### Version 0.3.1 - Some fixes for message evaluation in `assert` module. ### Version 0.3.0 - Added a manual (build with [tidy](https://github.com/Mc-Zen/tidy) and [Mantys](https://github.com/jneug/typst-mantys)). - Added simple tests for all functions. - Fixed bug in `is.elem` (see #2). - Added `assert.has-pos`, `assert.no-pos`, `assert.has-named` and `assert.no-named`. - Added meaningful messages to asserts. - Asserts now support functions as message arguments that can dynamically build an error message from the arguments. - Improved spelling. (Thanks to @cherryblossom000 for proofreading.) ### Version 0.2.0 - Added `is.neg` function to negate a test function. - Added `alias.label`. - Added `is.label` test. - Added `def.as-arr` to create an array of the supplied values. Useful if an argument can be both a single value or an array. - Added `assert.that-not` for negated assertions. - Added `is.one-not-none` test to check multiple values, if at least one is not none. - Added `do` argument to all functions in `def`. - Allowed strings in `is.elem` (see #1). - Added `is.sequence` test. - Deprecated `get.stroke-paint`, `get.stroke-thickness`, `get.x-align` and `get.y-align` in favor of new Typst 0.7.0 features. ### Version 0.1.0 - Initial release
https://github.com/peng1999/typst-pyrunner
https://raw.githubusercontent.com/peng1999/typst-pyrunner/main/test/example.typ
typst
MIT License
#import "@local/pyrunner:0.0.1" as py #let compiled = py.compile( ```python def find_emails(string): import re return re.findall(r"\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}\b", string) def sum_all(*array): return sum(array) def add(a, b): return f'{a+b=}' ```) #let txt = "My email address is <EMAIL> and my friend's email address is <EMAIL>." #py.call(compiled, "find_emails", txt) #py.call(compiled, "sum_all", 1, 2, 3) #py.block(``` import sys sys.version, sys.path ```) #py.block( ```python [1, True, {"a": a, 5: "hello"}, None] ```, globals: (a: 3)) #py.call(compiled, "add", 1, 2) #py.call(compiled, "add", "1", "2") #let comp = py.compile( ```python def tai_ts(): import datetime n = datetime.datetime.now() return n def file_io(): try: open("test.txt", "w") except Exception as e: return f"Error: {e}" return 1 ```) #py.call(comp, "tai_ts") #py.call(comp, "file_io")
https://github.com/Meisenheimer/Notes
https://raw.githubusercontent.com/Meisenheimer/Notes/main/src/Combinatorics.typ
typst
MIT License
#import "@local/math:1.0.0": * = Combinatorics == Generating function == Inclusion–exclusion principle == Special Numbers === Catalan number === Stirling number
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compiler/hint-02.typ
typst
Other
#{ // Error: 3-6 unknown variable: a-1 – if you meant to use subtraction, try adding spaces around the minus sign. a-1 = 2 }
https://github.com/Myriad-Dreamin/typst.ts
https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/text/raw_06.typ
typst
Apache License 2.0
#import "/contrib/templates/std-tests/preset.typ": * #show: test-page // Single ticks should not have a language. `rust let`
https://github.com/saYmd-moe/note-for-statistical-mechanics
https://raw.githubusercontent.com/saYmd-moe/note-for-statistical-mechanics/main/contents/PartII/Chp07.typ
typst
#import "../../template.typ": * == 统计系综理论 === 系综 几率密度和刘维尔定理 ==== 系综和几率密度 一个自由度为 $s$ 的力学系统,其微观状态可以使用 $2 s$ 个变量($s$ 个广义坐标和 $s$ 个广义动量)来描述:$ q_1,dots.c,q_s,p_1,dots.c,p_s $在经典力学中,系统的一个微观状态由相空间中的一个点来表示,遵从正则方程;在量子力学中,系统的一个微观态就是一个量子态,遵从 _Schrödinger_ 方程。 接下来我们引入*系综*的概念。在统计力学中,我们认为对系统宏观量的一次测量所需的时间尺度远大于微观状态发生变化的时间尺度,因此对宏观量的测量结果实际上是测量过程中所测得的所有微观状态的平均值。 #highlight[假设我们把系统复制无数份,这些系统彼此独立并处于相同的宏观条件下,每个系统均处于某一个可能的微观态。这些系统的集合就叫做*统计系综*。]把系综中处于某个微观态的数目占系综中系统总数的比值,叫做*统计系综分布*,即可能的微观态的概率分布 $rho$,我们令:$ rho (q_1,dots.c,q_s,p_1,dots.c,p_s;t) dif q_1 dots.c dif q_s dif p_1 dots.c dif p_s = rho (q_1,dots.c,q_s,p_1,dots.c,p_s;t) dif Omega $代表 $t$ 时刻系统的微观态处于 $dif Omega$ 内的几率。我们把 $rho$ 称作系统微观态的*几率密度*,它满足归一化条件:$ integral rho (q_1,dots.c,q_s,p_1,dots.c,p_s;t) dif Omega = 1 \ sum_i rho_i = 1 $我们观测到的宏观量 $A(q,p;t) $ 就是观测过程中微观态的平均值:$ macron(A) (t) = integral rho (q,p;t) A(q,p;t) dif Omega\ expval(A) = sum_i rho_i bra(Psi^i (t)) hat(A) ket(Psi^i (t)) $下面分别讨论微正则系综 $(N,V,E)$,正则系综 $(N,V,T)$和巨正则系综 $(mu,V,T)$。 ==== 刘维尔定理 #text(red)[\#TODO刘维尔定理] === 微正则系综 #highlight[*微正则系综*是由大量相同的孤立系统组成的系综。]孤立系满足质量守恒 ($N$ 不变),体积不变 ($V$ 不变) 和能量守恒 ($E$ 不变)。 ==== 经典微正则系综 经典力学下,微正则系综的几率密度表示为:$ rho (q,p) = cases( display(C\, quad E lt.eq H(q,p) lt.eq E + Delta E\;), display(0\, quad #[_otherwise_.]) ) $常数 $C$ 由归一化条件确定:$ lim_(Delta E arrow 0) C integral_(Delta E) dif Omega = 1\ arrow.double.long C = 1/Omega $其中 $Omega$ 为能量区间 $(E,E+Delta E)$ 内的所有可能的微观状态数,有:$ Omega = 1/(h^(N r)) limits(integral)_(E lt.eq H(q,p) lt.eq E + Delta E) dif Omega $其中 $N$ 为系统的粒子数目,$r$ 为系统的维数。 另外对于全同粒子,还需要考虑全同粒子不可分辨,当满足非简并条件时:$ Omega = (Omega_(op("cl")))/(N!) = 1/(N! h^(N r)) limits(integral)_(E lt.eq H(q,p) lt.eq E + Delta E) dif Omega $如果系统由多种不同粒子组成,第 $i$ 种粒子的自由度为 $r_i$,粒子数为 $N_i$,那么有:$ Omega = product_i (Omega_(op("cl"),i))/(N_i !) = 1/(product_i N_i ! h^(N_i r_i)) limits(integral)_(E lt.eq H(q,p) lt.eq E + Delta E) dif Omega $ ==== 量子微正则系综 与上述内容相似,改写至量子力学体系下,首先是几率密度:$ rho_s = cases( display(C\, quad E lt.eq E_s lt.eq E + Delta E\;), display(0\, quad #[_otherwise_.]) ) $同样由归一化条件确定常数 $C$:$ attach(sum,b: s, tr: ') rho_s = C (attach(sum,b: s, tr: ') 1) = 1\ arrow.double.long C = 1/Omega(N,V,E) $其中 $display(attach(sum,b: s, tr: '))$ 表示在 $V,N$ 一定的条件下对能量区间 $(E,E+Delta E)$ 内的一切量子态求和,有该区间内的微观状态数:$ Omega(N,V,E) = (attach(sum,b: s, tr: ') 1) $ ==== 微正则系综计算热力学量 推导过程省略,直接给出结果:$ cases( display(S = k ln Omega(N,V,E)), display(((diff)/(diff N))_(V,E) ln Omega = alpha = - mu/(k T)), display(((diff)/(diff V))_(N,E) ln Omega = gamma = p/(k T)), display(((diff)/(diff E))_(N,V) ln Omega = beta = 1/(k T)) ) $ ==== $Omega$ 的计算 考虑三维空间中 ($r = 3$) 由 $N$ 个单原子分子理想气体组成的孤立系统。考虑能量区间 $(E,E+Delta E)$,系统的能量满足:$ H = sum_i p_i^2/(2m) $假设满足经典极限条件 (能级准连续) ,有:$ Omega(E) = 1/(N! h^(3 N)) limits(integral)_(E lt.eq H lt.eq E + Delta E) dif Omega\ $我们先考虑能量小于 $E$ 的微观状态数:$ Sigma(E) = 1/(N! h^(3 N)) limits(integral)_(H lt.eq E) dif Omega\ arrow.double.long Omega(E) = (diff Sigma(E))/(diff E) Delta E $现在只需要计算出 $Sigma(E)$ 即可得到 $Omega(E)$:$ Sigma(E) &= 1/(N! h^(3 N)) limits(integral)_(H lt.eq E) dif Omega\ &= 1/(N! h^(3 N)) integral dif q_1 dots.c dif q_(3 N) limits(integral)_(sum_i p_i^2 lt.eq 2 m E) dif p_1 dots.c dif p_(3 N)\ &= V^N/(N! h^(3 N)) limits(integral)_(sum_i p_i^2 lt.eq 2 m E) dif p_1 dots.c dif p_(3 N)\ &= V^N/(N! h^(3 N)) (2 m E)^(3N\/2) limits(integral)_(sum_i x_i^2 lt.eq 1) dif x_1 dots.c dif x_(3N) $最后一步做了无量纲化处理 $p_i = x_i sqrt(2 m E)$,我们令:$ K equiv limits(integral)_(sum_i x_i^2 lt.eq 1) dif x_1 dots.c dif x_(3N) $这个积分几何上表示 $3 N$ 维空间上的单位球体积, $K$ 是一个无量纲的常数,于是:$ Sigma(N,V,E) = K V^N/(N! h^(3 N)) (2 m E)^(3N\/2) $ $K$ 可以通过对整个相空间进行积分来确定,这里直接给出表达式:$ K = pi^(3N\/2)/(Gamma(3N\/2 + 1)) = pi^(3N\/2)/(3N\/2)! $于是有:$ Sigma(N,V,E) &= V^N/(N! h^(3N\/2) (3N\/2)!) (2 pi m E)^(3N\/2),\ Sigma'(N,V,E) &= V^N/(N! h^(3N\/2) (3N\/2)!) (2 pi m E)^(3N\/2) dot (3N)/2 dot 1/E,\ Omega(N,V,E) &= V^N/(N! h^(3N\/2) (3N\/2)!) (2 pi m E)^(3N\/2) dot (3N)/2 dot (Delta E)/E $使用 _Stirling_ 公式得:$ S = k ln Omega(N,V,E) = N k ln V/N + N k ln ((4 pi m E)/(3 h^2 N))^(3\/2) + 5/2 N k $由基本微分方程:$ dif S = 1/T dif E + p/T dif V - mu/T dif N $可以计算其他热力学量:$ cases( display((diff S)/(diff E) = 1/T &arrow.double.long E = 3/2 N k T), display((diff S)/(diff V) = p/T &arrow.double.long p V = N k T), display((diff S)/(diff N) = - mu/T &arrow.double.long mu = k T {ln N/V + ln ((h^2)/(2 pi m k T))^(3\/2)}) ) $可以更换变量写出 $S(N,V,T)$:$ S(N,V,T) = 3/2 N k ln T + N k ln V/N + 3/2 N k {5/3 + ln((2 pi m k)/h^2)} $注意到使用微正则系综求得的热力学量与使用_Maxwell-Boltzmann_分布得到的 @single-atom-gas-thermo 中一致 (取电子束缚能级的基态简并度 $g_0^e = 1$)。 === 正则系综 #highlight[*正则系综*是由大量相同的与大热源接触并达到平衡态的系统组成的系综。]与大热源接触并达到平衡态的系统满足质量守恒 ($N$ 不变),体积不变 ($V$ 不变) 和温度守恒 ($T$ 不变)。 ==== 从微正则系综导出正则系综 #grid( columns: 2, gutter: 5pt, box(width: 100%)[ #h(2em)我们将系统和大热源看作同一个系统,注意到这个复合系统是一个孤立系,因此我们可以复用微正则系综的结论。孤立系的总能量是一个定值:$ E = E_1 + E_2 $我们令系统处于能量为 $E_1$ 的某一特定量子态 $s$ 的几率为 $rho_(1s) (E_1)$,下面我们使用微正则系综求出 $rho_(1s)(E_1)$。 ], figure( caption: [将系统与大热源看作一个孤立系], image("../../assets/figures/canonical-ensemble.svg",width: 90%) ) ) #text(red)[\#TODO 推导过程省略。]可以几率密度:$ rho_(1s) (E_1) = 1/Z_N e^(-beta E_1) $其中 $beta$ 由大热源决定,与系统的性质无关 $beta = beta(T) = 1\/k T$;省略下标 $1$,用下标 $s$ 表示系统处于量子态 $s$:$ rho_s (E_s) = 1/Z_N e^(-beta E_s) $其中配分函数 $Z_N$ 由归一化条件确定:$ Z_N = sum_s e^(-beta E_s) $#text(red)[\#TODO实际上也可以从微正则系综出发,将系统看作子系,采用最可几分布法导出正则系综。] 同样有方便计算的经典极限形式:$ Z_N = 1/(N! h^(N r)) integral e^(-beta E) dif Omega $ ==== 正则系综计算热力学量 宏观内能 $macron(E)$ 是微观能量 $E_s$ 的统计平均:$ macron(E) &= sum_s E_s rho_s = 1/Z_N sum_s E_s e^(-beta E_s)\ &= 1/Z_N (-diff/(diff beta) sum_s e^(-beta E_s)) = -diff/(diff beta) ln Z_N $外界作用力与微观能量有关系式:$Y_l = diff E_s \/ diff y_l$,于是:$ macron(Y)_l = sum_s (diff E_s)/(diff y_l) rho_s = -1/beta diff/(diff y_l) ln Z_N $熵:$ S = k (ln Z_N - beta diff/(diff beta) ln Z_N) $通过内能、物态方程和熵,其他热力学函数也一并确定。 ==== 正则系综的能量涨落 系统与大热源平衡后,在宏观上没有能量交换,但是有微观上的能量交换,我们称之为*能量涨落*。用 $overline((E-macron(E))^2)$ 代表绝对涨落(方差),$sqrt(overline((E-macron(E))^2))\/macron(E)$ 或 $overline((E-macron(E))^2)\/macron(E)^2$ 代表相对涨落。数学上有:$ overline((E-macron(E))^2) = overline(E^2) - macron(E)^2 $有:$ overline(E^2) &= sum_s E_s^2 rho_s = 1/Z_N sum_s E_s^2 e^(-beta E_s)\ &= 1/Z_N (diff^2)/(diff beta^2) sum_s e^(-beta E_s) = 1/Z_N (diff^2)/(diff beta^2) Z_N \ &= 1/Z_N diff/(diff beta) (Z_N diff/(diff beta)ln Z_N) = macron(E)^2 - (diff macron(E))/(diff beta) $于是有:$ overline((E-macron(E))^2) = -(diff macron(E))/(diff beta) = k T^2 ((diff macron(E))/(diff T))_(V,N) = k T^2 C_V $相对涨落:$ overline((E-macron(E))^2)/macron(E)^2 = k T^2 C_V/macron(E)^2 prop 1/N $宏观系统的相对涨落很小,此时正则系综和微正则系综求得的系统平衡性质结果相同。 ==== 正则系综求解单原子分子理想气体 考虑满足经典极限条件的单原子分子理想气体,忽略分子内部的自由度(即忽略束缚电子能量 $E^e$),写出配分函数:$ Z_N = 1/(N! h^(3 N)) integral e^(-beta H) dif Omega $其中:$ H &= sum_(i = 1)^(N) (bold(p)_i^2)/(2m) = sum_i epsilon_i\ dif Omega &= product_(i=1)^N dif omega_i\ dif omega_i &= dif x_i dif y_i dif z_i dif p_(x_i) dif p_(y_i) dif p_(z_i) $于是有:$ Z_N &= 1/(N! h^(3 N)) integral dots.c integral e^(-beta sum_i epsilon_i) product_(i=1)^N dif omega_i\ &= 1/N! product_(i=1)^N {1/h^3 integral e^(-beta epsilon_i) dif omega_i}\ &= Z^N/N! $其中 $Z$ 为子系配分函数,@gas-partition-function 已经给出了单原子分子理想气体的子系配分函数:$ Z = 1/h^3 integral e^(-beta epsilon) dif omega = V/h^3 (2 pi m k T)^(3\/2) $系统配分函数 $Z_N$ 是子系配分函数的 $N$ 次方乘以 $1\/N!$,这个因子反映了全同粒子的不可分辨性。下面计算热力学量:$ ln Z_N = N ln Z - ln N! $$ macron(E) &= - diff/(diff beta) ln Z_N = -N diff/(diff beta) ln Z = 3/2 N k T\ p &= 1/beta diff/(diff V) ln Z_N = N/beta diff/(diff V)ln Z = (N k T)/V\ S &= N k (ln Z - beta diff/(diff beta) ln Z) - k ln N!\ &= 3/2 N k ln T + N k ln V/N + 3/2 N k {5/3 + ln((2 pi m k)/h^2)}\ F &= - k T ln Z_N = - N k T ln Z + k T ln N!\ $ === 巨正则系综 #highlight[*巨正则系综*是由大量相同的与大热源及大粒子源接触并达到平衡态的系统组成的系综。]与大热源和大粒子源接触并达到平衡的系统满足化学势守恒 ($mu$ 不变),体积不变 ($V$ 不变) 和温度守恒 ($T$ 不变)。 ==== 从微正则系综导出巨正则系综 #grid( columns: 2, gutter: 5pt, box(width: 100%)[ #h(2em)与从微正则系综导出正则系统的过程相同,孤立系满足:$ E &= E_1 + E_2\ N &= N_1 + N_2 $孤立系的总能量和总粒子数都是不变的,#text(red)[省略推导过程],直接给出几率密度:$ rho_(s) = 1/Xi e^(-alpha N - beta E_s) $ ], figure( caption: [将系统与大粒子源大热源看作一个孤立系], image("../../assets/figures/grand-canonical-ensemble.svg",width: 90%) ) ) 同样由归一化条件确定巨配分函数:$ Xi = sum_(N=0)^infinity sum_s e^(-alpha N - beta E_s) = sum_(N=0)^infinity e^(-alpha N) (sum_s e^(-beta E_s)) = sum_(N=0)^infinity e^(-alpha N) Z_N $其中 $Z_N=sum_s e^(-beta E_s)$ 是粒子数为 $N$ 的正则系综配分函数,所以可以把巨正则系综理解为*包含许多不同粒子数的正则系综的集合,不同粒子数 $N$ 受到因子 $e^(-alpha N)$ 和 $Z_N$ 的影响,对 $Xi$ 的贡献不同。* 我们同样可以给出巨正则分布的经典极限形式:$ rho_N dif Omega = 1/(N! h^(N r)) e^(-alpha N - beta E_s)/Xi dif Omega_N\ Xi = sum_(N=0)^infinity e^(-alpha N)/(N! h^(N r)) integral e^(-beta E) dif Omega_N $ ==== 巨正则系综计算热力学量 不难得到:$ macron(N) &= sum_N sum_s N rho_(N s) = 1/Xi sum_N sum_s N e^(-alpha N - beta E_s) \ &= - diff/(diff alpha) ln Xi\ macron(E) &= sum_N sum_s E_s rho_(N s) = 1/Xi sum_N sum_s E_s e^(-alpha N - beta E_s) \ &= - diff/(diff beta) ln Xi\ macron(Y)_l &= sum_N sum_s ((diff E_s)/(diff y_l)) rho_(N s) = 1/Xi sum_N sum_s (diff E_s)/(diff y_l) e^(-alpha N - beta E_s)\ &= -1/beta diff/(diff y_l) ln Xi\ S &= k (ln Xi - alpha diff/(diff alpha) ln Xi - beta diff/(diff beta) ln Xi)\ F &= E - T S = - k T ln Xi + k T alpha diff/(diff alpha) ln Xi \ Psi &= F - G = F - macron(N) mu = -k T ln Xi $ ==== 巨正则系综的粒子数涨落与能量涨落 与大粒子源大热源的接触中,系统会产生微观上的粒子数涨落和能量涨落,其中能量涨落计算结果与正则系综能量涨落相同:$ overline((Delta E)^2) &= k T^2 C_V\ overline((Delta E)^2)/macron(E)^2 &= k T^2 C_V/macron(E)^2 prop 1/N $下面计算粒子数涨落:$ overline((N-macron(N))^2) &= macron(N)^2 - overline(N^2)\ overline(N^2) &= sum_N sum_s N^2 rho_(N s) = 1/Xi (diff^2/(diff alpha^2) sum_N sum_s e^(-alpha N - beta E_s))\ &= 1/Xi diff^2/(diff alpha^2) Xi = macron(N)^2 - ((diff macron(N))/(diff alpha))_(beta, V) $进而得到粒子数涨落: $ overline((N-macron(N))^2) = -((diff macron(N))/(diff alpha))_(beta, V) = k T ((diff macron(N))/(diff mu))_(beta, V) $有:$ mu &= G/N = G(T,p(T,V,N),N)/N\ ((diff mu)/(diff macron(N)))_(beta, V) &= 1/N ((diff mu)/(diff G))_(N) dot ((diff G)/(diff p))_(T,N) dot ((diff p)/(diff N))_(T,V) \ &+ 1/N ((diff mu)/(diff G))_(N) dot ((diff G)/(diff N))_(T,p) \ &- 1/N^2 G\ &= V/(macron(N)^2 kappa_T) $进而有粒子数涨落和相对粒子数涨落:$ overline((Delta N)^2) &= k T macron(N)^2/V kappa_T\ overline((Delta N)^2)/macron(N)^2 &= (k T)/V kappa_T $ ==== 巨正则系综求解单原子分子理想气体 考虑满足经典极限条件的单原子分子理想气体,忽略分子内部的自由度(即忽略束缚电子能量 $E^e$),写出配分函数:$ &Xi = sum_(N=0)^infinity e^(-alpha N) Z_N\ &Z_N = 1/(N! h^(3 N)) integral e^(-beta E_N) dif Omega_N = Z^N/N!\ &Z = V/h^3 (2 pi m k T)^(3\/2) $代入,得:$ &Xi = sum_(N=0)^infinity (e^(-alpha) Z)^N/N! = exp(e^(-alpha) Z)\ &ln Xi = e^(-alpha) Z = V/h^3 (2 pi m k T)^(3\/2) e^(-alpha) $于是热力学量:$ macron(N) &= -diff/(diff alpha) ln Xi = e^(-alpha) Z arrow.double mu = - k T alpha = k T ln [(n h^3)/(2 pi m k T)^(3\/2)]\ macron(E) &= -diff/(diff beta) ln Xi = 3/2 macron(N) k T\ p &= 1/beta diff/(diff V) ln Xi = (macron(N) k T)/V = n k T\ S &= k (ln Xi - alpha diff/(diff alpha) ln Xi - beta diff/(diff beta) ln Xi)\ &= 3/2 macron(N) k ln T + macron(N) k ln V/macron(N) + 3/2 macron(N) k {5/3 + ln[(2 pi m k)/(h^2)]} $<gas-grand> ==== 巨正则系综求解固体表面吸附率 #h(2em)下面设一个固体的表面有 $N_0$ 个吸附中心,每个吸附中心最多吸附一个气体分子,被吸附的分子相比于自由态分子有能量 $-epsilon_0$。定义吸附率:$ theta equiv macron(N)/N_0 = #[被吸附分子平均数]/#[吸附中心总数] $设外部气体为处于室温的单原子分子理想气体,求当被吸附分子与外部气体达到平衡时的吸附率 $theta$。 使用巨正则系综,将被吸附的分子看作系统,外部气体看作大热源大粒子源,当达到热力学平衡时,被吸附的分子与外部气体有相同的 $(T,mu)$。当有 $N$ 个分子被吸附时,系统有能量:$ E_(N s) = - N epsilon_0 $被吸附分子的巨配分函数:$ Xi = sum_(N=0)^(N_0) sum_s e^(-alpha N - beta E_(N s)) = sum_(N=0)^(N_0) sum_s e^(beta (mu + epsilon_0) N) $对于同一个吸附分子数 $N$,系统的能量都是 $-N epsilon_0$,该能量对应的微观态数目为:$ C_(N_0)^N = N_0!/(N! (N_0 - N)!) $于是巨配分函数有:$ &Xi = sum_(N=0)^(N_0) N_0!/(N! (N_0 - N)!) [e^(beta (mu + epsilon_0) )]^N = [1 + e^(beta (mu + epsilon_0))]^(N_0)\ &ln Xi = N_0 ln[1 + e^(beta (mu + epsilon_0))] $于是被吸附分子的平均数为:$ macron(N) &= -diff/(diff alpha) ln Xi = 1/beta diff/(diff mu) ln Xi\ &= N_0/(1 + e^(-beta (mu + epsilon_0))) $吸附率为:$ theta equiv macron(N)/N_0 = 1/(1+e^(-beta (mu + epsilon_0))) $化学势由 @gas-grand 确定:$ mu = (2 pi m k T)^(3\/2)/(n h^3) = ((2pi m k T)^(3\/2) k T)/(p h^3) $其中有理想气体物态方程 $p = n k T$:$ theta = macron(N)/N_0 = p\/[p+ (2 pi m)^(3\/2)/h^3 (k T)^(5\/2) e^(-epsilon_0\/k T)] $ ==== 由巨正则系综推导_Fermi_分布和_Bose_分布 巨正则分布有几率密度:$ rho_(N s) = 1/Xi e^(-alpha N - beta E_(N s)) $代表系统处于总粒子数为 $N$,总能量为 $E_(N s)$ 的量子态 $s$ 的几率,有巨配分函数:$ Xi = sum_(N=0)^infinity sum_s e^(-alpha N - beta E_(N s)) $这里的求和 $sum_s$ 代表系统处于总量子数为 $N$ 的情况下,对所有可能的量子态 $s$ 求和。我们要将 $N,E_(N)$ 通过子系能级的分布 ${a_lambda}$ 表达,进一步将 $sum_s$ 拆分为给定 $N,E_N$ 的情况下,对所有可能的量子态的求和:$ Xi &= sum_(N=0)^infinity sum_s e^(-alpha N - beta E_(N s)) = sum_(N=0)^infinity sum_E_N attach(sum,b: s, tr: ') e^(-alpha N - beta E_(N s))\ &= sum_(N=0)^infinity sum_(E_N) attach(sum, b: {a_lambda}, tr: ' ) W({a_lambda}) e^(-alpha sum_lambda a_lambda - beta sum_lambda a_lambda epsilon_lambda) $其中有:$ N &= sum_lambda a_lambda\ E_N &= sum_lambda a_lambda epsilon_lambda $巨正则系综的粒子数和能量均可变,现在我们可以直接对所有 $N$ 和 $E_N$ 对应的分布求和:$ Xi = sum_({a_lambda}) W({a_lambda}) e^(-alpha sum_lambda a_lambda - beta sum_lambda a_lambda epsilon_lambda) $注意到有:$ W({a_lambda}) = product_lambda W_lambda\ W_lambda = cases( display((g_lambda !)/(a_lambda ! (g_lambda - a_lambda)!)\, quad #[_Fermi_]), display((g_lambda + a_lambda - 1)!/(a_lambda ! (g_lambda - 1)!)\, quad #[_Bose_]) ) $于是巨配分函数:$ Xi &= sum_{a_lambda} product_lambda [W_lambda e^(-(alpha + beta epsilon_lambda) a_lambda)]\ &= [sum_a_1 W_1 e^(-(alpha + beta epsilon_1) a_1)] times [sum_a_2 W_2 e^(-(alpha + beta epsilon_1) a_1)]\ &times dots.c times [sum_a_lambda W_lambda e^(-(alpha + beta epsilon_lambda) a_lambda)] times dots.c\ &= product_lambda [sum_a_lambda W_lambda e^(-(alpha + beta epsilon_lambda) a_lambda)]\ &= product_lambda Xi_lambda $其中有:$ Xi_lambda = sum_a_lambda W_lambda e^(-(alpha + beta epsilon_lambda) a_lambda) $#text(red)[\#TODO计算过程略],可以得到:$ Xi = product_lambda Xi_lambda = product_lambda (1 plus.minus e^(-alpha -beta epsilon_lambda))^(plus.minus g_lambda)\ ln Xi = plus.minus sum_lambda g_lambda ln(1 plus.minus e^(-alpha -beta epsilon_lambda)). quad cases( + #[_Fermi_], - #[_Bose_] ) $另外可以计算巨正则系综平均 $macron(a)_lambda$:$ macron(a)_k &= sum_N sum_s a_k rho_(N s)\ &= #text(rgb(0,155,255))[$1/Xi$] sum_N sum_(E_s) attach(sum, b: {a_lambda}, tr: ') a_k #text(rgb(0,155,255))[$W({a_lambda}) e^(-sum_lambda (alpha + beta epsilon_lambda) a_lambda)$] $其中蓝色部分代表分布 ${a_lambda}$ 出现的几率。有:$ macron(a)_k &= 1/Xi sum_{a_lambda} a_k product_lambda [W_lambda e^(-(alpha + beta epsilon_lambda) a_lambda)]\ &= 1/Xi_k [-diff/(diff alpha) sum_a_k W_k e^(-(alpha + beta epsilon_k) a_k)]\ = - diff/(diff alpha) Xi_k $于是:$ ln Xi_lambda = plus.minus g_lambda ln (1 plus.minus e^(-alpha - beta epsilon_lambda))\ macron(a)_lambda = - diff/(diff alpha) ln Xi_lambda = g_lambda/(e^(alpha + beta epsilon_lambda) plus.minus 1) $
https://github.com/morrisfeist/cvgen
https://raw.githubusercontent.com/morrisfeist/cvgen/master/template/sidebar.typ
typst
MIT License
#import "data.typ": data #import "theme.typ": theme #let photo = if data.photo != "" [ #image(data.photo, width: 100%) ] else [ #block( width: 100%, height: 25%, fill: gradient.linear(theme.primary, theme.secondary, angle: 305deg), )[ #align(center + horizon)[ #text(size: 16pt, fill: theme.crust)[PHOTO] ] ] ] #let progress(name, proficiency, percent) = { let bar_radius = 2pt let bar_overhang = bar_radius block[ #grid( columns: (1fr, auto), row-gutter: 4pt, strong[#name], text(fill: theme.primary)[#proficiency], grid.cell( colspan: 2, inset: (x: -bar_overhang, y: 0pt), block( fill: theme.surface0, width: 100%, height: 2 * bar_radius, radius: bar_radius, block( fill: gradient.linear(theme.primary, theme.secondary, relative: "parent"), width: percent, height: 100%, radius: bar_radius, ), ), ), ) ] } #let languages = [ #block[= #data.labels.languages] #stack( spacing: 14pt, ..data.languages.pairs().map(((k, v)) => progress(k, v.at(0), eval(v.at(1)))), ) ] #let skills = [ #block[= #data.labels.skills] #stack( spacing: 14pt, ..data.skills.pairs().map(((k, v)) => progress(k, v.at(0), eval(v.at(1)))), ) ] #let icon(str) = box( inset: (top: -1pt), )[ #text(10pt, font: "Font Awesome 6 Free Solid", fill: theme.primary, str) ] #let personal_details = [ #let content = () #if "name" in data.personal_details { content.push(icon[]) content.push(text(data.personal_details.name)) } #if "birthdate" in data.personal_details { content.push(icon[]) content.push(text(data.personal_details.birthdate)) } #if "website" in data.personal_details { content.push(icon[]) content.push(link( "https://" + data.personal_details.website, )[#data.personal_details.website]) } #if "permit" in data.personal_details { content.push(icon[]) content.push(text(data.personal_details.permit)) } #block[= #data.labels.personal_details] #grid( columns: (auto, auto), column-gutter: 8pt, row-gutter: 12pt, align: (center, start), ..content, ) ] #let contact = [ #let content = () #if "phone" in data.contact { content.push(icon[]) content.push(link("tel:" + data.contact.phone)) } #if "email" in data.contact { content.push(icon[]) content.push(link("mailto:" + data.contact.email)) } #if "github" in data.contact { content.push(icon[]) content.push( link("https://github.com/" + data.contact.github)[#data.contact.github], ) } #if "address" in data.contact { content.push(icon[]) content.push(text(data.contact.address)) } #block[= #data.labels.contact] #grid( columns: (auto, auto), column-gutter: 8pt, row-gutter: 12pt, align: (center, start), ..content, ) ] #block(fill: theme.crust, inset: 16pt, height: 100%, width: 100%)[ #let content = () #content.push(photo) #if data.languages.len() > 0 { content.push(languages) } #if data.skills.len() > 0 { content.push(skills) } #if data.personal_details.len() > 0 { content.push(personal_details) } #if data.contact.len() > 0 { content.push(contact) } #stack(spacing: 24pt, ..content) ]
https://github.com/kotfind/hse-se-2-notes
https://raw.githubusercontent.com/kotfind/hse-se-2-notes/master/prob/seminars/2024-09-16.typ
typst
= Условная вероятность Обозначение $A$ при $B$: $P(A|B)$ или $P_B (A)$ $ P(A) P(B|A) = P(A B) = P(B) P(A|B) $ = Гипотезы Формула полной вероятности: $ P(A) = sum^n_(j = 1) P(H_j) P(A|H_j) $ Формула Баеса: $ P(H_i|A) = (P(H_i)P(A|H_i)) / (sum^n_(j = 1) P(H_j) P(A|H_j)) = (P(H_i)P(A|H_i))/P(A) $ $H_i$ --- гипотезы $A$ --- событие = Задачи == Задача Два стрелка $P_1 = 0.8$ $P_2 = 0.7$ $A$ --- поражение цели хотя бы одним $A_1$ --- поражение цели первым $A_2$ --- поражение цели вторым Методы: + $P(A) = P(A_1) + P(A_2) - underbrace(P(A_1 A_2), P(A_1) P(A_2))$ + $P(A) = P(A_1) P(overline(A_2)) + P(A_2) P(overline(A_1)) + P(A_1) P(A_2)$ + $P(A) = 1 - P(overline(A_1)) P(overline(A_2))$ == Задача про Золушку $A$ --- достала хрустальную $H_i$ --- выбрала $i$-ую коробку $D_1$ --- утеряна хрустальная, $D_2$ --- утеряна серебряная $ P(D_1) = 3/5, P(D_2) = 2/5 $ $ P(A|H_1) = P(D_1) dot 2/4 + P(D_2) dot 3/4 = 3/5 dot 2/4 + 2/5 dot 3/4 = 3/5 $ $ P(A|H_2) = 2/6 $ $ P(A|H_3) = 1 $ $ P(A) = sum^3_i_1 P(H_i)P(A|H_i) = 1/3 dot (3/5 + 1/3 + 1) = 29/45 $ == Задача про Завод $ P(A) = 0.05 $ $ P(B|A) = 0.1 $ $ P(B|overline(A)) = 0.01 $ $ P(overline(B)) = ? $ $ P(B) = P(A) P(B|A) + P(overline(A)) P(overline(A)) = 0.05 dot 0.1 + 0.95 dot 0.01 = 0.0145 $ $ P(overline(B)) = 1 - P(B) = 0.9855 $ == Задача про схему #figure(image("./scheme.svg", height: 3cm)) $ P_1 = 0.8 $ $ P_2 = 0.7 $ $ P_3 = 0.6 $ $ P(A_1) = P_1 $ $ P(A) = P(A_1) dot [1 - (1 - P(A_2)) dot (1 - P(A_3))] $ == Задача 31 $A, B$ --- независимы $ P(A B) = P(B) = 1/4 $ $ P(A + B) = ? $ $ P(A) P(B) underbrace(=, "т.к. независимы") = P(A B) = 1/4 $ $ P(A + B) = P(A) + P(B) - P(A B) = ... $ == Задача 32 $ P(A) = 1/2, P(B) = 2/3, P(A + B) underbrace(>=, ?) 1/6 $ $ P(A + B) = P(A) + P(B) - P(A B) = 7/6 - underbrace(P(A B), <=1) >= 1/6 $ == Задача 22 $ 1 - (1 - p)^n >= 0.95 $ $ 1 - 0.99^n >= 0.95 $ $ 0.05 >= 0.99^n $ $ ln(0.05) >= n ln(0.99) $ $ ln(0.05)/ln(0.99) <= n $ $ 298.07... <= n $ $ n = 299 $ == Задача 23 $ 1 - (1 - 0.9)^n >= 0.999 $ $ 0.001 >= 0.1^n $ $ ln(0.001)/ln(0.1) <= n $ $ 3 <= n $ $ n = 3 $
https://github.com/DustVoice/dustypst
https://raw.githubusercontent.com/DustVoice/dustypst/main/lang_de.typ
typst
#import "langs.typ" #import "dustypst.typ" #let default_lang = langs.de #let pkgtable(core: "", extra: "", /*community: "",*/ aur: "", multilib: "", groups: "") = pkgtable_(lang: default_lang, core: "", extra: "", /*community: "",*/ aur: "", multilib: "", groups: "") #let note(content) = dustypst.note(lang: default_lang, content) #let tip(content) = dustypst.tip(lang: default_lang, content) #let important(content) = dustypst.important(lang: default_lang, content) #let warning(content) = dustypst.warning(lang: default_lang, content) #let caution(content) = dustypst.caution(lang: default_lang, content)
https://github.com/GolemT/BA-Template
https://raw.githubusercontent.com/GolemT/BA-Template/main/template.typ
typst
#import "lib/glossar-lib.typ": * #import "lib/acronym-lib.typ": * #import "glossar.typ": Glossar #import "acronyms.typ": Acronyms #import "lib/shared-lib.typ": comment, todo #let project( //Settings der Template title: "Projektarbeit an der Berufsakademie Rhein-Main", authors: ( (name: "Student", Matrikelnummer: "123456"), ), date: "01.01.2024", logo: image("images/BA_Logo.jpg", width: auto), modul: [Theorie-Praxis-Anwendung II], sperrvermerk: false, vorwort: false, genderhinweis: true, abbildungsverzeichnis: true, tabellenverzeichnis: true, codeverzeichnis: true, abkürzungsverzeichnis: true, glossar: true, literaturverzeichnis: true, //Vorgeschriebene Texte sperrvermerkText: [Die vorliegende Seminararbeit beinhaltet interne vertrauliche Informationen der DB Systel GmbH. Die Weitergabe des Inhaltes dieser Arbeit und eventuell beiliegender Zeichnungen und Daten im Gesamten oder in Teilen ist grundsätzlich untersagt. Es dürfen keinerlei Kopien oder Abschriften, auch nicht in digitaler Form, gefertigt werden. Ausnahmen bedürfen der schriftlichen Genehmigung durch die DB Systel GmbH.], vorwortText: [], genderhinweisText: [Zur besseren Lesbarkeit wird in dieser Ausarbeitung auf die gleichzeitige Verwendung geschlechtsspezifischer Sprachformen verzichtet. Sämtliche personenbezogenen Bezeichnungen gelten daher im Sinne der Gleichbehandlung für alle Geschlechter. Diese Vereinfachung dient ausschließlich der sprachlichen Klarheit und ist in keiner Weise als Wertung zu verstehen.], body, ) = { // Set the document's basic properties. set document(author: authors.map(a => a.name), title: title) set page( margin: (left: 25mm, right: 25mm, top: 25mm, bottom: 25mm), numbering: none, number-align: end, ) set cite(style: "chicago-author-date") set par(justify:true) set text( font: "<NAME>", lang: "de", hyphenate: false ) show math.equation: set text(weight: 400) show heading.where(level: 1): it => { pagebreak() + it + linebreak() } show heading.where(level: 2): it => { linebreak() + it + linebreak() } show heading.where(level: 3): it => { linebreak() + it + linebreak() } show heading.where(level: 4): it => { linebreak() + it + linebreak() } init-acronyms(Acronyms) init-glossary(Glossar) set heading(numbering: "1.1",) // Title page. v(0.6fr) // Titel align(center, text(2em, weight: 700, title)) v(1.2em, weak: true) if logo != none { align(center, image("images/BA_Logo.jpg", width: 60%)) } v(2.6fr) // Authoren. align(center, text(1.1em, weight: "bold", "Gruppen-Mitglieder")) pad( top: 0.7em, grid( columns: (1fr,), gutter: 1em, ..authors.map(author => align(center)[ *#author.name* - #author.Matrikelnummer ]), ), ) v(1.5fr) //Beschreibung align(center, text("Diese fachpraktische Ausarbeitung wurde erstellt im Rahmen der")) align(center, text(modul, weight: "bold")) v(1.5fr) //Datum align(center, text(1.1em, date)) v(2.4fr) if sperrvermerk == true { v(1fr) align(center)[ #heading( outlined: false, numbering: none, text(0.85em, smallcaps[Sperrvermerk]), ) #sperrvermerkText ] v(1.618fr) } if genderhinweis == true { v(1fr) align(center)[ #heading( outlined: false, numbering: none, text(0.85em, smallcaps[Gleichbehandlung der Geschlechter]), ) #genderhinweisText ] v(1.618fr) } if vorwort == true { v(1fr) align(center)[ #heading( outlined: false, numbering: none, text(0.85em, smallcaps[Vorwort / Danksagungen]), ) #vorwortText ] v(1.618fr) } // Table of contents. outline(depth: 3, indent: true) set page(numbering: "I") counter(page).update(1) let pagecounter = 0 if(abbildungsverzeichnis == true){ pagecounter += 1 outline(title: "Abbildungsverzeichnis" ,target: figure.where(kind: image)) } if(tabellenverzeichnis == true) { pagecounter += 1 outline(title: "Tabellenverzeichnis" ,target: figure.where(kind: table)) } if(codeverzeichnis == true) { pagecounter += 1 outline(title: "Codeverzeichnis" ,target: figure.where(kind: raw)) } if(abkürzungsverzeichnis == true) { pagecounter += 1 print-acronyms(title: "Abkürzungsverzeichnis", 1em) } // Main body. set par(justify: true) set page(numbering: "1") counter(page).update(1) body set page(numbering: "I") counter(page).update(pagecounter + 1) if(glossar == true){ print-glossary(title: "Glossar", 1em) } if(literaturverzeichnis == true){ bibliography(title: "Literaturverzeichnis", "literatur.bib") } set page(numbering: none) align(left)[ #heading( outlined: false, numbering: none, text("Eidesstattliche Erklärung") ) Hiermit erklären wir, dass diese Projektarbeit selbständig verfasst und keine anderen als die angegebenen Quellen und Hilfsmittel benutzt und die aus fremden Quellen direkt oder indirekt übernommenen Gedanken als solche kenntlich gemacht haben. Die Arbeit oder Teile hieraus wurde und wird keiner anderen Stelle oder anderen Person im Rahmen einer Prüfung vorgelegt. Wir versichern zudem, dass keine sachliche Übereinstimmung mit einer im Rahmen eines vorangegangenen Studiums angefertigten Seminar-, Diplom- oder Abschlussarbeit sowie Bachelorthesis besteht. ] grid( columns: (1fr), ..authors.map(author => { v(3.5em) line(length: 100%) "Datum, Unterschrift von " + author.name }) ) }
https://github.com/galaxia4Eva/galaxia4Eva
https://raw.githubusercontent.com/galaxia4Eva/galaxia4Eva/main/notes/reading-lists/Working%20Environment.md
markdown
#plugins #reading-list # Triage 1. https://twitter.com/amasad/status/1663332051582619648?s=12 2. https://twitter.com/lisperati/status/1671304178705248256?s=20 3. https://colemak.com/FAQ # tty 1. https://github.com/kovidgoyal/kitty # cli 1. [fish shell](https://fishshell.com/) 2. https://github.com/elves/elvish 3. [GitHub - jorgebucaran/fisher: A plugin manager for Fish](https://github.com/jorgebucaran/fisher) 1. [GitHub - jorgebucaran/awsm.fish: A curation of prompts, plugins & other Fish treasures 🐚💎](https://github.com/jorgebucaran/awsm.fish) 2. [GitHub - jorgebucaran/hydro: Ultra-pure, lag-free prompt with async Git status—just for Fish](https://github.com/jorgebucaran/hydro) 4. [GitHub - starship/starship: ☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!](https://github.com/starship/starship) 5. [GitHub - julienXX/terminal-notifier: Send User Notifications on macOS from the command-line.](https://github.com/julienXX/terminal-notifier) 6. [ogham (<NAME>) · GitHub](https://github.com/ogham) 7. https://github.com/agarrharr/awesome-cli-apps 8. https://github.com/lsd-rs/lsd 9. https://charm.sh/apps/ 11. diff - [ ] `port search dhex` - [ ] `port search diffoscope` - [ ] `port search diffutils` - [ ] `port search dwdiff` - [ ] `port search edelta` - [ ] `port search graphtage` - [ ] `port search hexdiff` - [ ] `port search kdiff3` - [ ] `port search libxmldiff` - [ ] `port search meld` - [ ] `port search riff` - [ ] `port search tardiff` - [ ] `port search vbindiff` - [ ] `port search wdiff` - [ ] `port search xdelta` - [ ] `port search ydiff` ## web–browsers [Comparison of lightweight web browsers - Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_lightweight_web_browsers) 1. amfora 2. browsh 3. edbrowse 4. elinks 1. elinks-devel 5. emacs-w3m 6. kristall-devel 7. lexbor 8. links 9. litebrowser 10. lynx 11. netrik 12. qutebrowser 13. retawq 14. [telescope](https://telescope.omarpolo.com) 15. [w3m](https://en.wikipedia.org/wiki/W3m) 16. [WWW - The Libwww Line Mode Browser](https://www.w3.org/LineMode/) 17. [GitHub - jansc/ncgopher: A gopher and gemini client for the modern internet](https://github.com/jansc/ncgopher) 18. [~julienxx/asuka - NCurses Gemini client - sourcehut git](https://git.sr.ht/~julienxx/asuka) 19. [acdw/bollux: a Gemini browser in like, idk, 96% pure Bash - bollux - tildegit](https://tildegit.org/acdw/bollux) 20. [Bombadillo: Home](https://bombadillo.colorfield.space/) 21. [Diohsc: Denotationally Intricate Obedient Haskell Smallnet Client](https://mbays.sdf.org/diohsc/) 22. [gmni: A gemini client](https://sr.ht/~sircmpwn/gmni/) 23. [ploum/offpunk: An Offline-First browser for the smolnet - NotABug.org: Free code hosting](https://notabug.org/ploum/offpunk) 24. [gemini protocol browser: VIRGIL99 - TI-99/4A Development - AtariAge Forums](https://forums.atariage.com/topic/326428-gemini-protocol-browser-virgil99/) # git 1. [GitHub - stefanha/git-publish: Prepare and store patch revisions as git tags](https://github.com/stefanha/git-publish) 2. https://github.com/nektos/act 3. lazygit 1. https://www.youtube.com/watch?v=CPLdltN7wgE 4. git-diff 1. `port search git-delta` 2. `port search git-latexdiff` 5. `port search reposurgeon` 6. multissh: https://gist.github.com/jexchan/2351996 7. https://lib.rs/crates/gitoxide 8. https://github.com/go-gitea/gitea # vim #vim 1. https://learnvimscriptthehardway.stevelosh.com/chapters/10.html 2. [Using coc extensions · neoclide/coc.nvim Wiki · GitHub](https://github.com/neoclide/coc.nvim/wiki/Using-coc-extensions#implemented-coc-extensions) 1. [Completion with sources · neoclide/coc.nvim Wiki · GitHub](https://github.com/neoclide/coc.nvim/wiki/Completion-with-sources#more-sources) 2. [Create coc.nvim extension to improve vim experience | by chemzqm | Medium](https://medium.com/@chemzqm/create-coc-nvim-extension-to-improve-vim-experience-4461df269173) 3. [How to write a coc.nvim extension | Sam's world](https://samroeca.com/coc-plugin.html) 3. [GitHub - lervag/vimtex: VimTeX: A modern Vim and neovim filetype plugin for LaTeX files.](https://github.com/lervag/vimtex) 4. https://github.com/helix-editor/helix 5. `port search nvimpager` 6. https://github.com/macvim-dev/macvim ## Interesting Plugins 1. https://github.com/neovim/nvim-lspconfig 2. https://github.com/puremourning/vimspector 1. https://puremourning.github.io/vimspector-web/ 2. https://www.reddit.com/r/vim/comments/mrdp69/debug_in_vim/ 3. [GitHub - lambdalisue/fern.vim: 🌿 General purpose asynchronous tree viewer written in Pure Vim script](https://github.com/lambdalisue/fern.vim) 4. [GitHub - yuki-yano/ai-review.nvim](https://github.com/yuki-yano/ai-review.nvim) 5. [GitHub - yuki-yano/fzf-preview.vim: The plugin that powerfully integrates fzf and (Neo)vim. It is also possible to integrate with coc.nvim.](https://github.com/yuki-yano/fzf-preview.vim) 6. [GitHub - Shougo/ddu.vim: Dark deno-powered UI framework for neovim/Vim8](https://github.com/Shougo/ddu.vim) 7. [GitHub - tyru/caw.vim: Vim comment plugin: supported operator/non-operator mappings, repeatable by dot-command, 300+ filetypes](https://github.com/tyru/caw.vim) 8. [GitHub - yuki-yano/lightline.vim: A light and configurable statusline/tabline plugin for Vim](https://github.com/yuki-yano/lightline.vim) 9. [GitHub - hrsh7th/vim-eft: enhanced f/t](https://github.com/hrsh7th/vim-eft) 10. [GitHub - hashue/Defie.vim: Vim/Neovim non-tree-view filer](https://github.com/hashue/Defie.vim) 11. [GitHub - RRethy/vim-illuminate: illuminate.vim - (Neo)Vim plugin for automatically highlighting other uses of the word under the cursor using either LSP, Tree-sitter, or regex matching.](https://github.com/RRethy/vim-illuminate) 12. [GitHub - rbtnn/vim-jumptoline: Jump to the line if cursorline includes a filename with lnum such as a line of build errors](https://github.com/rbtnn/vim-jumptoline) 13. [Timeplotters: two data visualization tools for analysis of logs and time series — timeplotters 1.0 documentation](http://jkff.info/software/timeplotters/) 14. [GitHub - rbtnn/vim-vimconsole: This is immediate-window for Vim script. It is like Google Chrome Developer Console.](https://github.com/rbtnn/vim-vimconsole) 15. [GitHub - gregsexton/VimCalc: A Vim plugin that provides a convenient interactive calculator inside a buffer.](https://github.com/gregsexton/VimCalc) 16. [GitHub - Zabanaa/neuromancer.vim: Cyberpunk themed vim colorscheme](https://github.com/Zabanaa/neuromancer.vim) 17. `port search paracode` 18. `port search plconv` # Sublime text 1. [GitHub - SublimeLinter/SublimeLinter: The code linting framework for Sublime Text](https://github.com/SublimeLinter/SublimeLinter) # md 1. [Obsidian community plugins](notes/reading-lists/Working%20Environment/Obsidian%20community%20plugins.md) 2. https://twitter.com/meekaale/status/1665055353384435714?s=20 3. [HackMD - Collaborative Markdown Knowledge Base](https://hackmd.io/) 4. [GitHub - Make-md/makemd](https://github.com/Make-md/makemd) 5. https://apps.apple.com/de/app/archimedes/id806601044?l=en&mt=12 # typesetting 1. [The Not So Short Introduction to LATEX](https://tobi.oetiker.ch/lshort/lshort.pdf) 1. [The Bates LaTeX Manual | Mathematics | Bates College](https://www.bates.edu/mathematics/resources/latex-manual/) 2. `port search latexdiff` 2. [GitHub - typst/typst: A new markup-based typesetting system that is powerful and easy to learn.](https://github.com/typst/typst) 1. [GitHub - jneug/typst-tools4typst: An utility package for typst package authors.](https://github.com/jneug/typst-tools4typst) 2. [GitHub - Cubxity/typstudio: A W.I.P desktop application for a new typesetting language, typst.](https://github.com/Cubxity/typstudio) 3. [GitHub - qjcg/awesome-typst: Awesome Typst Links](https://github.com/qjcg/awesome-typst) 4. [3d rendering in typst](https://gitlab.com/Gutawer/typst-3d) 5. [GitHub - pascal-huber/typst-letter-template: Extendable typst letter template with some standardized defaults.](https://github.com/pascal-huber/typst-letter-template) 6. https://github.com/Myriad-Dreamin/typst.ts/tree/main/packages/hexo-renderer-typst 7. https://github.com/jomaway/typst-teacher-templates 8. https://github.com/crdevio/typst-themes/tree/main/typing-course%20template 9. https://github.com/elteammate/typst-shell-escape 10. https://github.com/Mc-Zen/typst-doc 11. https://github.com/Swordfish90/cool-retro-term/blob/master/app/qml/fonts/1971-ibm-3278/README.md 12. CV Templates 1. https://github.com/ice-kylin/typst-cv-miku 2. https://github.com/skyzh/typst-cv-template 3. https://github.com/bamboovir/typst-resume-template 13. https://github.com/Cubxity/typstudio 14. https://github.com/MuShann/typst-graph 15. 4. [GitHub - byrongibson/fonts](https://github.com/byrongibson/fonts) 5. [Ansilove · GitHub](https://github.com/ansilove) 6. https://rentafont.com.ua/fonts/lugatype/regular 7. https://github.com/Twixes/SF-Mono-Powerline 8. https://twitter.com/viterzbayraku/status/1676341611792400384?s=20 1. https://alfabravo.design/ua/fonts/monofontis/#!/tab/236090603-1 2. https://minttype.com/monospaceland/ 3. https://minttype.com/ki 4. https://minttype.com/vin-mono-pro 9. https://vimeo.com/798919118 10. # pdf 1. [Download Xpdf and XpdfReader](https://www.xpdfreader.com/download.html)? 2. [Download - Okular](https://okular.kde.org/en-gb/download/)? 3. [poppler / poppler · GitLab](https://gitlab.freedesktop.org/poppler/poppler) # Publishing 1. https://github.com/tryghost 2. https://omeka.org/s/ ## Static file generators 1. https://github.com/myles/awesome-static-generators 2. https://about.gitlab.com/blog/2022/04/18/comparing-static-site-generators/ 3. https://github.com/typst/typst/discussions/197 4. https://notes.nicolevanderhoeven.com/Static+site+generator 5. https://jekyllrb.com/docs/ 6. https://forum.obsidian.md/t/static-site-generators-any-guides/8915 7. https://github.com/teesloane/esker 8. # scripting 1. [GitHub - raycast/script-commands: Script Commands let you tailor Raycast to your needs. Think of them as little productivity boosts throughout your day.](https://github.com/raycast/script-commands) # broadcasting 1. https://github.com/obsproject 2. https://github.com/keycastr/keycastr # macOS 1. [Hyperduck](https://apps.apple.com/app/id6444667067) 2. https://macreplacementkeys.com 3. https://keyshorts.com/collections/macbook-keyboard-decals 4. [GitHub - apple/fstools: The Filesystem Tools project is a place where the Apple filesystem teams will be publishing some of the tools we use to test the filesystems that are part of macOS. These tools will be useful to developers who are writing new macOS filesystems, or testing macOS network filesystems against their servers.](https://github.com/apple/fstools) 5. Window manager 1. [GitHub - rxhanson/Rectangle: Move and resize windows on macOS with keyboard shortcuts and snap areas](https://github.com/rxhanson/Rectangle) 2. [Amethyst | ianyh](https://ianyh.com/amethyst/) 3. [GitHub - koekeishiya/yabai: A tiling window manager for macOS based on binary space partitioning](https://github.com/koekeishiya/yabai) 4. [GitHub - jigish/slate: A window management application (replacement for Divvy/SizeUp/ShiftIt)](https://github.com/jigish/slate) 5. Tiling manager that allows Tile windows to left, right, bottom, top et cetera? #question 6. [macos - Where did Icon Composer go from Xcode? - Ask Different](https://apple.stackexchange.com/questions/59561/where-did-icon-composer-go-from-xcode) 7. [Apple Open Source](https://opensource.apple.com/releases/) 8. [Apple OSS Distributions · GitHub](https://github.com/apple-oss-distributions) 9. [Download HyperDock for Mac | MacUpdate](https://www.macupdate.com/app/mac/35317/hyperdock) 10. xen hypervisor on macOS? [How to install Xen on MacBookPro – Field Effect, LLC](https://fieldeffect.info/wp/frontpage/xenonmacbookpro/) 11. Winamp classic on macOS? #question 1. [Winamp CLASSIC on macOS Catalina - YouTube](https://youtu.be/tJpWG2YnOeM) 12. [GitHub - jaywcjlove/awesome-mac:  Now we have become very big, Different from the original idea. Collect premium software in various categories.](https://github.com/jaywcjlove/awesome-mac) 1. [GitHub - greenboxal/awesome-osx-command-line: Use your OS X terminal shell to do awesome things.](https://github.com/greenboxal/awesome-osx-command-line) 13. [GitHub - Carthage/Carthage: A simple, decentralized dependency manager for Cocoa](https://github.com/Carthage/Carthage) 14. [GitHub - apple/MaterialX: MaterialX is an open standard for the exchange of rich material and look-development content across applications and renderers.](https://github.com/apple/MaterialX) 15. [GitHub - munki/macadmin-scripts: Scripts of possible interest to macOS admins](https://github.com/munki/macadmin-scripts) 16. [GitHub - corpnewt/gibMacOS: Py2/py3 script that can download macOS components direct from Apple](https://github.com/corpnewt/gibMacOS) 17. [Introduction | GPU Buyers Guide](https://dortania.github.io/GPU-Buyers-Guide/#a-quick-refresher-with-nvidia-and-web-drivers) 18. [Sketch · Design, collaborate, prototype and handofficon-close](https://www.sketch.com/) 19. https://www.apple.com/newsroom/2023/06/apple-introduces-m2-ultra/ 20. https://apps.apple.com/app/serial/id877615577?l=en&mt=12 21. https://apps.apple.com/app/webssh-sysadmin-tools/id497714887?l=en 22. https://github.com/pascalpp/FreeRuler 1. https://xscopeapp.com 2. # Translation 1. https://keyshorts.com/products/ukrainian-keyboard-stickers 2. [Dictionaries for Mac](https://dictionaries.io/) 3. [GitHub - jjgod/mac-dictionary-kit: Dictionary conversion tool for Mac OS X 10.5 and above](https://github.com/jjgod/mac-dictionary-kit) 4. https://support.apple.com/lv-lv/guide/japanese-input-method/jpim10226/mac 5. https://superuser.com/q/136236 6. https://osxdaily.com/2022/12/15/how-to-edit-the-mac-dictionary/ 7. https://fmentzer.github.io/posts/2020/dictionary/ 1. https://github.com/fab-jul/parse_dictionaries 2. https://news.ycombinator.com/item?id=28505406 1. [GitHub - ReFirmLabs/binwalk: Firmware Analysis Tool](https://github.com/ReFirmLabs/binwalk) 2. https://github.com/phracker/MacOSX-SDKs/blob/master/MacOSX10.7.sdk/usr/include/IndexedSearch.h 3. https://github.com/takumakei/osx-dictionary 4. https://en.wikipedia.org/wiki/DICT 5. https://github.com/solarmist/apple-peeler 6. https://linux.die.net/man/1/dictfmt 7. http://www.catb.org/jargon/oldversions/jarg447.txt 8. https://github.com/nikvdp/dictionary-api/blob/master/convertDicts.js 8. [Корпус сучасної української мови (БрУК) · GitHub](https://github.com/brown-uk) 1. [GitHub - brown-uk/corpus: Браунський корпус української мови](https://github.com/brown-uk/corpus) 2. [GitHub - brown-uk/dict_uk: Project to generate POS tag dictionary for Ukrainian language](https://github.com/brown-uk/dict_uk) 3. [GitHub - brown-uk/e2u.org.ua: Англо-українські словники](https://github.com/brown-uk/e2u.org.ua) 9. https://github.com/apertium 10. # Collaboration 1. [matrix.org · GitHubMastodon](https://github.com/matrix-org) 2. [Zulip · GitHubTwitter](https://github.com/zulip) 3. [Collaborative Calculation and Data Science](https://cocalc.com/) 4. https://github.com/misskey-dev/misskey
https://github.com/ymgyt/techbook
https://raw.githubusercontent.com/ymgyt/techbook/master/programmings/js/typescript/specification/tuple.md
markdown
# Tuple ```typescript function tuple(): [number, string, boolean] { //... return [1, "ok", true]; } ``` * `[]`の中に型を書くと、tupleになる
https://github.com/huyufeifei/grad
https://raw.githubusercontent.com/huyufeifei/grad/master/docs/paper/src/ch1.typ
typst
= 引言 == 研究背景 操作系统的最初目的是调度硬件资源和促进计算机上多项任务的执行,而现在已经有了长足的发展。随着计算机硬件和软件的不断进步,出现了 Windows 和 Linux 等主流操作系统,其特点是包含了操作系统所需的大部分基本功能。然而,这种功能集成带来了潜在的安全漏洞,因为操作系统中的任何错误都可能导致整个系统崩溃。操作系统中错误的来源多样,可能由于用户的误操作带来负面影响,也可能有恶意攻击者对操作系统或其中的某些部分进行攻击。@y1 多用户操作系统的出现要求了操作系统对于用户进行的权限管理和隔离,以避免不同用户之间的相互影响。而多核处理器的出现与多线程操作系统又带来了新的攻击方式、新的安全问题和挑战。操作系统开发人员需要为系统设计管理和访问的权限,如强制访问控制(mandatory access control),并对其进行验证以确保其安全方案是正确的(如使用形式化验证@sel4),能够满足安全性需求。MAC架构可以对所有的下属对象(如用户和进程、内存、文件、设备、端口等)。现代处理器使用多特权级管理,把系统分为内核态(ring 0)和用户态(ring 3)。这一方案精细化了隔离的粒度大小,提供了硬件层面的保护机制,在不同特权级的切换之间需要进行权限验证,以此保护在复杂的计算机系统中保护内核和用户应用的正常运行。通常,一个进程无法修改属于更高权限的资源文件。ring0特权级中的代码将会被视为可信任的。@y2 开发安全内核的基本原则是使用经过形式化定义的安全模型,满足完全、强制化、安全需求被检验满足@form 等条件。之后,该模型需要被正确的使用编程语言实现出来。操作系统在任何计算机系统中都扮演着重要地位,因此任何在其中出现的问题都将会威胁到整个计算机系统和其上运行的所有软件。一个被入侵的应用可能导致另一个设备也被入侵。 在现代操作系统开发中,安全性的重要性日益突出。@safe 这促使开发人员寻求能最大限度减少操作系统出错的解决方案。在这种情况下,微内核的概念应运而生。微内核方法旨在通过将必要的功能(如文件系统和硬件驱动程序)委托给用户空间程序来简化操作系统本身的复杂性。微内核的主要优势在于该架构可以提供更安全和稳定的操作系统。这种降低复杂性和分离功能的做法降低了开发和维护的难度,同时也减少了出现漏洞的可能性。此外,在用户空间运行操作系统模块可降低其权限,从而减轻某些类型的攻击。因为只有必要的服务在内核空间中运行,微内核操作系统拥有更小的攻击面,让攻击者更难找到其中的漏洞。并且,一个用户级的进程的崩溃不会影响到整个操作系统,因为微内核只负责管理进程和内存。微内核架构的另一个优势是它使得操作系统更加灵活和模块化。@mkernel 在用户态运行的服务可以更容易的被替换、移除或者重置而不影响系统的其他部分。这令操作系统可定制化,可满足特定需要。微内核的缺点则在于内核态和用户态的分离带来了大量的特权级切换,这使得微内核系统比宏内核更慢,尤其是在对系统调用性能要求高的应用场景当中。@y3 现有的操作系统安全解决方案主要依赖于基于硬件的隔离,如 ARM TrustZone。这种方法定义了一个可信区,只有安全性要求高的程序才能在此执行,确保与普通区完全隔离。TrustZone最初在ARMv7发布时提出,并逐渐被加入到芯片中。该处可信区只能被可信的系统和软件读取,其他任何调试方法和硬件访问都会被阻止。对其的访问需要通过密钥验证,密钥被写入芯片中,使得后期的攻击无法成立。用VMFUNC切换页表、内存保护密钥、内存标签扩展等硬件隔离技术提供了一些低负载的硬件隔离机制,其负载量与函数调用时的开销相接近。 然而,目前的硬件隔离机制存在一定的局限性。首先,它们需要特定的硬件支持,因此成本较高,而且缺乏通用性。其次,基于硬件方法的实施缺陷可能会带来不易修改的漏洞。并且由于需要其保存通用与扩展寄存器,还要切换栈空间,就算在理想的地址空间切换不耗时时,其与基于Rust语言的隔离相比开销仍较大。Rust语言在实现隔离的同时避免了这两个开销,它的开销与函数调用相同。在实际的应用场景下,Rust只比C++实现慢4~8%。@y4 为了解决这些不足,人们正在考虑基于软件的安全隔离解决方案。基于软件的安全隔离解决方案有望提供更大的灵活性和适应性,而且可以在各种硬件平台上实施。这些技术的开发有望提高操作系统的安全性,降低与系统崩溃和漏洞相关的风险。Nooks提出了隔离域的思想,并给出了一些安全约束,如故障隔离的思想。奇点操作系统开创性地使用一种新的安全语言来开发操作系统内核,带来了编译器保证的系统安全研究方向。目前已有多个项目在开展操作系统层面提高系统隔离性和安全性的尝试,包括 J-Kernel、KaffeOS、红叶操作系统、Theseus OS 和 Asterinas 等。它们旨在通过软件层面的设计和实施、安全编程语言的使用来提高安全性。 == 国内外研究现状 J-Kernel @jkernel 认为仅靠语言安全不足以保证故障隔离和子系统更换,因此它基于Java语言实现了数据传输的接口和代理。其中的每个对象在传递时都会经由一层代理进行包装,并传递一个特殊的引用对象。该引用对象可以调用方法,该系统可以把各个隔离对象进行分割,但是这个过程中需要对非引用而是直接传输的参数进行深拷贝。由于内核的工作常见大量数据的处理传递,这种函数调用时增加的巨大开销是很难接受的。此外,由于其传递的引用没有做可用性检查,因此它的故障隔离是单向的:J-Kernel可以阻止调用者的崩溃影响到引用对象的创建者,但是当引用对象创建者本身崩溃时,其调用者之后的使用将也会崩溃,并未完全做到故障隔离。 KaffeOS @kaffeos 没有使用代理,而是使用了写屏障技术。在KaffeOS中存在两种堆对象,分别是私有堆和跨域共享堆。它对于共享堆上的对象设置了称为写屏障的约束,该约束管理所有隔离部分对其的引用与垃圾回收。然而,这个模型的缺陷在于当一个隔离部分在对共享堆上的数据修改到一半却崩溃了时,共享堆上的数据将可能保留在不合法的状态并就这样被其他的隔离部分所读取,此时故障将传递给这个正在执行读取操作的部分。此外,隔离对象也需要在跨域调用的时候进行深拷贝,并且动态检查指针和垃圾回收带来的开销也无法忽视。 奇点操作系统 @sing 使用了全新的模式来进行故障隔离。它重点使用了编译期即可确定的静态所有权来完成这一目标。类似KaffeOS,奇点也使用了交换堆和私有堆。它创新地为交换堆用于在各个隔离部分之间传递数据而无需深拷贝。这些约束实现的保证都在于其开发者发明的Sing\#语言:这种专门为安全隔离OS设计的语言使用了多种新颖的静态分析和验证技术,能够满足所有权约束系统。@sing2 奇点规定了每个交换堆上分配的对象只能拥有单一所有权,没有所有权的域不能对其进行访问。在跨域调用的时候,交换堆上的对象的所有权会被转移到被调用者所在的域。因此,崩溃的域无法影响到其他的部分,它不会让已经存在的引用消失(因为这样的引用根本就不允许被创建),也无法让正在被引用的交换堆对象处在不合法的状态中。此外,所有权的转移实现了零复制拷贝,减少了函数调用时数据传递所带来的开销。移动语义保证了该对象是当前域专有的,因此接受者可以随意对其进行修改。奇点的系统设计严重依赖于其开发的Sing\#语言,因此难以被广泛使用,但是其思想非常值得参考。 红叶操作系统 @redleaf 受到了J-Kernel、KaffeOS、奇点的启发,使用Rust语言原生的所有权系统和内存安全性来执行故障隔离。在数据保存和移动时,使用了KaffeOS和奇点的共享堆于私有堆,并且强制规定共享堆上的数据不能拥有可变引用,因此支持奇点的零拷贝通信。使用了J-Kernel的代理技术来规范跨域的函数调用,使用IDL来为各个隔离域设计接口。红叶的故障隔离规范并不依赖于Rust,而是被其独立出来,抽象为隔离规范的集合。在红叶中,跨域执行的函数调用无需进行线程的切换,而是直接把线程移动到了另一个域中。此方法可以减少系统中的线程上下文切换,同时提高了代码的自然性。 Theseus OS @theseus 是对操作系统模块化和动态更新进行尝试的一个操作系统。它致力于减少各个组件进行交互时所需的状态,对其进行了最小的、明确的定义,并构筑边界使得这些状态不会在运行时被其他组件进行修改。此外,它也使用了Rust语言,借助其强大的编译器与机制来确保一些操作系统中的概念正确实现。 Asterinas @asterinas 是一个用Rust编写的支持Linux适配的操作系统内核,这意味着它可以用于取代Linux,并伴随着内存安全语言带来的一系列好处。它限制了内核中不安全代码的使用,定义了一个最小的可信代码块(TCB)用于放置必须的不安全代码。该内核的framekernel架构将内核划分为TCB和剩余部分。其中TCB会包装内部的低级代码并对系统其余部分提供高级的交互编程接口,而其余部分则必须完全用安全代码写就,以阻止对内存的不安全操作,减少风险。TCB和其余部分运行在同一地址空间中,通过函数调用进行交互,因此其效率能做到与宏内核相近。微内核所提供的安全性保证则交由Rust编译器在编译期间完成检查。同时Asterinas提供了对开发者友好的工具OSDK,用于把其各个模块的开发过程规范化,提高效率。 受到红叶、Asterinas等系统的启发,Alien 操作系统的isolation版本(以下简称Alien)尝试实现一个基于Rust的安全性开发,在内核中使用多个隔离域封装内核各部分功能以实现故障隔离,使用TCB并限制不安全代码的使用以加强内存安全性,支持对各域进行任何时候的动态加载的操作系统。通过探索基于软件的安全隔离方法,本项目旨在为操作系统中的安全设备驱动程序领域做出贡献,并深入探讨与此类解决方案相关的潜在优势和挑战。 == 主要工作内容 为实现新提出的系统隔离约束,使用全部安全的Rust代码所编写的设备驱动是必不可少的。因此,把现有系统驱动和其中所有依赖的包中的不安全代码找出并且移除出驱动程序就是本工作的主要内容。通过与设备的官方文档对照,首先可以抽象出驱动与设备交互的方式,这也是驱动需要不安全代码的最主要处。通过寻找这些交互方式的共性,将所有的交互操作浓缩成寥寥数个所需的系统接口,就能确保交互过程通过接口能全部使用安全的代码实现。 在实现完成接口之后,能够创建出驱动结构的实例。接下来通过查看已有的不安全驱动所提供的功能和接口,尝试把安全驱动的接口和不安全驱动的接口统一。此操作能够降低用户迁移的难度,只需要更换依赖的驱动包就能对所使用的驱动程序进行替换,不需要修改其代码接口和逻辑。 对每个需要安全化的驱动分别进行如上工作,最后所得到的结果就是安全驱动的包。为了测试并且为Alien提供安全支持,驱动将被加入Alien中,并且成为其中的一个隔离域。这一步需要把驱动转化为隔离域的形式,以支持更多额外的特性,如崩溃后的故障隔离与透明恢复重启等。通过为驱动配置包装用的系统接口、代理调用域,恢复用的影子域,驱动能够在Alien中以隔离域的形式正常工作。 通过在多个不同环境下对安全与不安全的驱动进行对比测试,评估安全Rust代码对驱动性能可能产生的影响以及原因。根据测试的结果,安全驱动有充足的潜力和能力取代现有不安全驱动,其进一步发展空间很大。
https://github.com/frectonz/the-pg-book
https://raw.githubusercontent.com/frectonz/the-pg-book/main/book/123.%20organic.html.typ
typst
organic.html Organic Startup Ideas Want to start a startup? Get funded by Y Combinator. April 2010The best way to come up with startup ideas is to ask yourself the question: what do you wish someone would make for you?There are two types of startup ideas: those that grow organically out of your own life, and those that you decide, from afar, are going to be necessary to some class of users other than you. Apple was the first type. Apple happened because <NAME> wanted a computer. Unlike most people who wanted computers, he could design one, so he did. And since lots of other people wanted the same thing, Apple was able to sell enough of them to get the company rolling. They still rely on this principle today, incidentally. The iPhone is the phone <NAME> wants. [1]Our own startup, Viaweb, was of the second type. We made software for building online stores. We didn't need this software ourselves. We weren't direct marketers. We didn't even know when we started that our users were called "direct marketers." But we were comparatively old when we started the company (I was 30 and Robert Morris was 29), so we'd seen enough to know users would need this type of software. [2]There is no sharp line between the two types of ideas, but the most successful startups seem to be closer to the Apple type than the Viaweb type. When he was writing that first Basic interpreter for the Altair, <NAME> was writing something he would use, as were Larry and Sergey when they wrote the first versions of Google.Organic ideas are generally preferable to the made up kind, but particularly so when the founders are young. It takes experience to predict what other people will want. The worst ideas we see at Y Combinator are from young founders making things they think other people will want.So if you want to start a startup and don't know yet what you're going to do, I'd encourage you to focus initially on organic ideas. What's missing or broken in your daily life? Sometimes if you just ask that question you'll get immediate answers. It must have seemed obviously broken to <NAME> that you could only program the Altair in machine language.You may need to stand outside yourself a bit to see brokenness, because you tend to get used to it and take it for granted. You can be sure it's there, though. There are always great ideas sitting right under our noses. In 2004 it was ridiculous that Harvard undergrads were still using a Facebook printed on paper. Surely that sort of thing should have been online.There are ideas that obvious lying around now. The reason you're overlooking them is the same reason you'd have overlooked the idea of building Facebook in 2004: organic startup ideas usually don't seem like startup ideas at first. We know now that Facebook was very successful, but put yourself back in 2004. Putting undergraduates' profiles online wouldn't have seemed like much of a startup idea. And in fact, it wasn't initially a startup idea. When Mark spoke at a YC dinner this winter he said he wasn't trying to start a company when he wrote the first version of Facebook. It was just a project. So was the Apple I when Woz first started working on it. He didn't think he was starting a company. If these guys had thought they were starting companies, they might have been tempted to do something more "serious," and that would have been a mistake.So if you want to come up with organic startup ideas, I'd encourage you to focus more on the idea part and less on the startup part. Just fix things that seem broken, regardless of whether it seems like the problem is important enough to build a company on. If you keep pursuing such threads it would be hard not to end up making something of value to a lot of people, and when you do, surprise, you've got a company. [3]Don't be discouraged if what you produce initially is something other people dismiss as a toy. In fact, that's a good sign. That's probably why everyone else has been overlooking the idea. The first microcomputers were dismissed as toys. And the first planes, and the first cars. At this point, when someone comes to us with something that users like but that we could envision forum trolls dismissing as a toy, it makes us especially likely to invest.While young founders are at a disadvantage when coming up with made-up ideas, they're the best source of organic ones, because they're at the forefront of technology. They use the latest stuff. They only just decided what to use, so why wouldn't they? And because they use the latest stuff, they're in a position to discover valuable types of fixable brokenness first.There's nothing more valuable than an unmet need that is just becoming fixable. If you find something broken that you can fix for a lot of people, you've found a gold mine. As with an actual gold mine, you still have to work hard to get the gold out of it. But at least you know where the seam is, and that's the hard part.Notes[1] This suggests a way to predict areas where Apple will be weak: things <NAME> doesn't use. E.g. I doubt he is much into gaming. [2] In retrospect, we should have become direct marketers. If I were doing Viaweb again, I'd open our own online store. If we had, we'd have understood users a lot better. I'd encourage anyone starting a startup to become one of its users, however unnatural it seems.[3] Possible exception: It's hard to compete directly with open source software. You can build things for programmers, but there has to be some part you can charge for.Thanks to <NAME>, <NAME>, and <NAME> for reading drafts of this.
https://github.com/mschulist/typst-table
https://raw.githubusercontent.com/mschulist/typst-table/master/README.md
markdown
A small website that assists in making typst tables from a spreadsheet. Heavily inspired by [tablesgenerator.com](https://www.tablesgenerator.com/)
https://github.com/GYPpro/DS-Course-Report
https://raw.githubusercontent.com/GYPpro/DS-Course-Report/main/Rep/13.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)) ] ) /*----*/ = 线段树`segTree` \ #text( font:"KaiTi", size: 15pt )[ 课程名称#underline[#text(" 数据结构 ")]成绩评定#underline[#text(" ")]\ 实验项目名称#underline[#text(" ") 线段树`segTree` #text(" ")]指导老师#underline[#text(" 干晓聪 ")]\ 实验项目编号#underline[#text(" 13 ")]实验项目类型#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." ) = 实验目的 实现一个泛型线段树`segTree`库 = 实验环境 计算机:PC X64 操作系统:Windows + Ubuntu20.0LTS 编程语言:C++:GCC std20 IDE:Visual Studio Code = 程序原理 线段树可以在 $OO(log n)$ 的时间复杂度内实现单点修改、区间修改、区间查询等操作。 定义合并运算符 “$plus.circle$” 及其高阶运算 “$times.circle$” 对于一个连续的序列$a$递归地对连续两个区域进行合并,形成新序列$t $ $ s.t. forall i in t, s_i = s_(i*2) plus.circle s_(i*2 +1) $ 其中 $ forall i in a , exists f , s.t. s_(f+i) = a_i $ 则整个s序列形成二叉搜索树形结构。 定义运算符$a_i^T$为递归地向上访问所经过的所有节点集合, $s_i^L,s_i^R$分别为:$ s_i^L = "Val"^(a_i)min(i in NN s.t. s_i in a_i^T) $ $ s_i^R = "Val"^(a_i)max(i in NN s.t. s_i in a_i^T) $ 则可以描述: 对于区间求合并值:给定区间$[l,r]$ $ sum_(i in [l,r])^(plus.circle) a_i arrow.r.l.double sum_(k in {i | i in a_i^T})^(plus.circle)(s_k^R - s_k^L) times.circle s_k $ 易得上式$k$的规模为$OO(log_2 NN)$ 对于区间合并修改,保留懒惰标记$L_i$ 对于修改:区间$[l,r]$均$plus.circle c$ $ forall i in [l,r] , s_i plus.circle c \ arrow.r.l.double forall k in {a_i^T,i in [l,r]} s.t. [s_k^R,s_k^L] ,L_k plus.circle (s_k^R - s_k^L)times.circle c $ 则每次查询改为 $ sum_(i in [l,r])^(plus.circle) a_i arrow.r.l.double sum_(k in {i | i in a_i^T})^(plus.circle)((s_k^R - s_k^L) times.circle s_k + sum_(i in a_k^T) L_i) $ 易得两者规模均为$OO(log_2 NN)$ 在每次搜索时按$L_(i*2) times.circle (s_(i*2)^R - s_(i*2)^L) plus.circle L_(i*2+1) times.circle (s_(i*2 + 1)^R - s_(i*2 + 1)^L) = (s_i^R - s_i^L) $,则可以证明,维护懒惰标记的均摊复杂度为$OO(1)$ 具体实现参考代码,没这么复杂(只是用数学语言描述比较麻烦而已) #pagebreak() = 程序代码 == `segTree.h` #sourcecode[```cpp #include <template_overAll.h> // AC 带懒惰标记线段树 template <class TYPE_NAME> class lazyTree { /* * TYPE_NAME需要支持:+ += != 和自定义的合并运算符 * 实现了懒惰标记,仅支持区间批量增加 * 区间批量减需要TYPE_NAME支持-,且有-a = 0 - a * 额外处理了一个单点修改为对应值的函数,非原生实现,其复杂度为 4logn * 不提供在线 * 不提供持久化 */ private: vector<TYPE_NAME> d; vector<TYPE_NAME> a; vector<TYPE_NAME> b; int n; const TYPE_NAME INI = 0; // 不会影响合并运算的初始值,如max取INF,min取0,mti取1 void subbuild(int s, int t, int p) { if (s == t) { d[p] = a[s]; return; } int m = s + ((t - s) >> 1); // (s+t)/2 subbuild(s, m, p * 2); subbuild(m + 1, t, p * 2 + 1); d[p] = d[p * 2] + d[p * 2 + 1]; // 合并运算符 ↑ } TYPE_NAME subGetSum(int l, int r, int s, int t, int p) { if (l <= s && t <= r) return d[p]; int m = s + ((t - s) >> 1); if (b[p] != 0) { d[p * 2] += b[p] * (m - s + 1); // 合并运算符的高阶运算 此处运算为应用懒惰标记 d[p * 2 + 1] += b[p] * (t - m); // 合并运算符的高阶运算 此处运算为应用懒惰标记 b[p * 2] += b[p]; // 下传标记,无需修改 b[p * 2 + 1] += b[p]; // 下传标记,无需修改 b[p] = 0; } TYPE_NAME ansl = INI; TYPE_NAME ansr = INI; if (l <= m) ansl = subGetSum(l, r, s, m, p * 2); if (r > m) ansr = subGetSum(l, r, m + 1, t, p * 2 + 1); return ansl + ansr; // 合并运算符↑ } void subUpdate(int l, int r, TYPE_NAME c, int s, int t, int p) { if (l <= s && t <= r) { d[p] += (t - s + 1) * c; // 合并运算符的高阶运算 此处运算为修改整匹配区间值 b[p] += c; // 记录懒惰标记,无需修改 return; } int m = s + ((t - s) >> 1); if (b[p] != 0 && s != t) { d[p * 2] += b[p] * (m - s + 1); // 合并运算符的高阶运算 此处运算为应用懒惰标记 d[p * 2 + 1] += b[p] * (t - m); // 合并运算符的高阶运算 此处运算为应用懒惰标记 b[p * 2] += b[p]; // 下传标记,无需修改 b[p * 2 + 1] += b[p]; // 下传标记,无需修改 b[p] = 0; } if (l <= m) subUpdate(l, r, c, s, m, p * 2); if (r > m) subUpdate(l, r, c, m + 1, t, p * 2 + 1); d[p] = d[p * 2] + d[p * 2 + 1]; // 合并运算符 ↑ } public: lazyTree(TYPE_NAME _n) { n = _n; d.resize(4 * n + 5); a.resize(4 * n + 5); b.resize(4 * n + 5); } void build(vector<TYPE_NAME> _a) { a = _a; subbuild(1, n, 1); } TYPE_NAME getsum(int l, int r) { return subGetSum(l, r, 1, n, 1); } void update(int l, int r, TYPE_NAME c) // 修改区间 { subUpdate(l, r, c, 1, n, 1); } void update(int idx, TYPE_NAME tar) { // 修改单点,未测试 TYPE_NAME tmp = getsum(idx, idx); tar -= tmp; subUpdate(idx, idx, tar, 1, n, 1); } }; ```] == `template_overAll.h` #sourcecode[```cpp #include <vector> #include <map> #include <string> #include <string.h> #include <math.h> #include <set> #include <algorithm> #include <iostream> #include <queue> using namespace std; #define ll long long #define pb push_back #define ld long double const ll int maxn = 1E5+10; const ll int mod1 = 998244353; const ll int mod2 = 1E9+7; #define _IN_TEMPLATE_ ll int str2int(string s) { ll int rec = 0; ll int pw = 1; for(int i = s.length()-1;i >= 0;i --) { int gt = s[i] - '0'; if(gt < 0 || gt > 9) return INT64_MAX; rec += gt * pw; pw *= 10; } return rec; } vector<ll int> testReadLine() { string s; getline(cin,s); s.push_back(' '); vector<ll int> rearr; vector<string> substring; string ts; for(int i = 0;i < s.size();i ++) { if(s[i] == ' '){ substring.push_back(ts); ts.clear(); } else ts.push_back(s[i]); } for(int i = 0;i < substring.size();i ++)rearr.push_back(str2int(substring[i])); return rearr; } ```] = 测试数据与运行结果 代码通过在线平台`LUOGU.org`正确性测试 #image("13.png",width: 60%)
https://github.com/Myriad-Dreamin/typst.ts
https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/math/op_04.typ
typst
Apache License 2.0
#import "/contrib/templates/std-tests/preset.typ": * #show: test-page // Test styled operator. $ bold(op("bold", limits: #true))_x y $
https://github.com/npujol/chuli-cv
https://raw.githubusercontent.com/npujol/chuli-cv/main/modules/section.typ
typst
MIT License
#import "styles.typ": * #let create-section-title( title ) = { text( size: section-style.title.size, weight: section-style.title.weight, fill: section-style.title.font-color, title ) h(section-style.margins.right-to-hline) hline() }
https://github.com/pauladam94/curryst
https://raw.githubusercontent.com/pauladam94/curryst/main/README.md
markdown
MIT License
# Curryst A Typst package for typesetting proof trees. ## Import You can import the latest version of this package with: ```typst #import "@preview/curryst:0.3.0": rule, proof-tree ``` ## Basic usage To display a proof tree, you first need to create a tree, using the `rule` function. Its first argument is the conclusion, and the other positional arguments are the premises. It also accepts a `name` for the rule name, displayed on the right of the bar, as well as a `label`, displayed on the left of the bar. ```typ #let tree = rule( label: [Label], name: [Rule name], [Conclusion], [Premise 1], [Premise 2], [Premise 3] ) ``` Then, you can display the tree with the `proof-tree` function: ```typ #proof-tree(tree) ``` In this case, we get the following result: ![A proof tree with three premises, a conclusion, and a rule name.](examples/usage.svg) Proof trees can be part of mathematical formulas: ```typ Consider the following tree: $ Pi quad = quad #proof-tree( rule( $phi$, $Pi_1$, $Pi_2$, ) ) $ $Pi$ constitutes a derivation of $phi$. ``` ![The rendered document.](examples/math-formula.svg) You can specify a rule as the premises of a rule in order to create a tree: ```typ #proof-tree( rule( name: $R$, $C_1 or C_2 or C_3$, rule( name: $A$, $C_1 or C_2 or L$, rule( $C_1 or L$, $Pi_1$, ), ), rule( $C_2 or overline(L)$, $Pi_2$, ), ) ) ``` ![The rendered tree.](examples/rule-as-premise.svg) As an example, here is a natural deduction proof tree generated with Curryst: ![The rendered tree.](examples/natural-deduction.svg) <details> <summary>Show code</summary> ```typ #let ax = rule.with(name: [ax]) #let and-el = rule.with(name: $and_e^ell$) #let and-er = rule.with(name: $and_e^r$) #let impl-i = rule.with(name: $scripts(->)_i$) #let impl-e = rule.with(name: $scripts(->)_e$) #let not-i = rule.with(name: $not_i$) #let not-e = rule.with(name: $not_e$) #proof-tree( impl-i( $tack (p -> q) -> not (p and not q)$, not-i( $p -> q tack not (p and not q)$, not-e( $ underbrace(p -> q\, p and not q, Gamma) tack bot $, impl-e( $Gamma tack q$, ax($Gamma tack p -> q$), and-el( $Gamma tack p$, ax($Gamma tack p and not q$), ), ), and-er( $Gamma tack not q$, ax($Gamma tack p and not q$), ), ), ), ) ) ``` </details> ## Advanced usage The `proof-tree` function accepts multiple named arguments that let you customize the tree: <dl> <dt><code>prem-min-spacing</code></dt> <dd>The minimum amount of space between two premises.</dd> <dt><code>title-inset</code></dt> <dd>The amount width with which to extend the horizontal bar beyond the content. Also determines how far from the bar labels and names are displayed.</dd> <dt><code>stroke</code></dt> <dd>The stroke to use for the horizontal bars.</dd> <dt><code>horizontal-spacing</code></dt> <dd>The space between the bottom of the bar and the conclusion, and between the top of the bar and the premises.</dd> <dt><code>min-bar-height</code></dt> <dd>The minimum height of the box containing the horizontal bar.</dd> </dl> For more information, please refer to the documentation in [`curryst.typ`](curryst.typ).
https://github.com/name1e5s/typst-font-awesome
https://raw.githubusercontent.com/name1e5s/typst-font-awesome/main/README.md
markdown
MIT License
# Font Awesome with Typst ## Usage 1. Download the font files from [Font Awesome](https://use.fontawesome.com/releases/v6.4.0/fontawesome-free-6.4.0-desktop.zip). 2. Unzip the downloaded file and install the fonts in the `otfs` folder to your system. 3. Copy the `fa.typ` file in this repository to your typst project. 4. Use the icons in your project: ```typst import "fa.typ": * #fa-github ``` ## Build from source Just run: ```bash python3 process.py <path-to-font-awesome-folder/metadata/icons.json> > fa.typ ``` ## License The Font Awesome font files are licensed under the [SIL OFL 1.1](https://scripts.sil.org/OFL). This project is licensed under the [MIT License](https://opensource.org/license/mit/).
https://github.com/LDemetrios/Typst4k
https://raw.githubusercontent.com/LDemetrios/Typst4k/master/src/test/resources/suite/model/emph-strong.typ
typst
// Test emph and strong. --- emph-syntax --- // Basic. _Emphasized and *strong* words!_ // Inside of a word it's a normal underscore or star. hello_world Nutzer*innen // CJK characters will not need spaces. 中文一般使用*粗体*或者_楷体_来表示强调。 日本語では、*太字*や_斜体_を使って強調します。 中文中混有*Strong*和_Emphasis_。 // Can contain paragraph in nested content block. _Still #[ ] emphasized._ --- emph-and-strong-call-in-word --- // Inside of words can still use the functions. P#strong[art]ly em#emph[phas]ized. --- emph-empty-hint --- // Warning: 1-3 no text within underscores // Hint: 1-3 using multiple consecutive underscores (e.g. __) has no additional effect __ --- emph-double-underscore-empty-hint --- // Warning: 1-3 no text within underscores // Hint: 1-3 using multiple consecutive underscores (e.g. __) has no additional effect // Warning: 13-15 no text within underscores // Hint: 13-15 using multiple consecutive underscores (e.g. __) has no additional effect __not italic__ --- emph-unclosed --- // Error: 6-7 unclosed delimiter #box[_Scoped] to body. --- emph-ends-at-parbreak --- // Ends at paragraph break. // Error: 1-2 unclosed delimiter _Hello World --- emph-strong-unclosed-nested --- // Error: 11-12 unclosed delimiter // Error: 3-4 unclosed delimiter #[_Cannot *be interleaved] --- strong-delta --- // Adjusting the delta that strong applies on the weight. Normal #set strong(delta: 300) *Bold* #set strong(delta: 150) *Medium* and *#[*Bold*]* --- strong-empty-hint --- // Warning: 1-3 no text within stars // Hint: 1-3 using multiple consecutive stars (e.g. **) has no additional effect ** --- strong-double-star-empty-hint --- // Warning: 1-3 no text within stars // Hint: 1-3 using multiple consecutive stars (e.g. **) has no additional effect // Warning: 11-13 no text within stars // Hint: 11-13 using multiple consecutive stars (e.g. **) has no additional effect **not bold**
https://github.com/herbertskyper/HITsz_Proposal_report_Template
https://raw.githubusercontent.com/herbertskyper/HITsz_Proposal_report_Template/main/templates/thesis.typ
typst
MIT License
#import "../theme/type.typ": * #import "../utils/numbering.typ": * #import "../utils/counters.typ": cover_end_before_counter, cover_end_after_counter #let conf(content) = { let show_if_after_cover_end_before(content) = { locate(loc => { if cover_end_before_counter.at(loc).first() > 0 { content } }) } let show_if_after_cover_end_after(content) = { locate(loc => { if cover_end_after_counter.at(loc).first() > 0 { content } }) } set page( paper: "a4", margin: (top: 3.5cm, left: 3cm, right: 3cm, bottom: 3cm) ) set page( footer: { set align(center) locate(loc => { text()[ #counter(page).at(loc).first() ] }) } ) show heading: it => { let format_heading(it: none, font: none, size: none, display_numbering: true) = { set text(font: font, size: size) if display_numbering { text(weight: "bold")[ #counter(heading).display() ] } if it != none { text(weight: "bold")[ #it.body.text ] } v(0.2em) } set par(first-line-indent: 0em) if it.level == 1 { align(center)[ #format_heading(it: it, font: 字体.黑体, size: 字号.二号, display_numbering: false) ] } else if it.level == 2 { format_heading(it: it, font: 字体.黑体, size: 字号.三号) } else if it.level == 3 { format_heading(it: it, font: 字体.黑体, size: 字号.四号) } else if it.level == 4 { format_heading(it: it, font: 字体.黑体, size: 字号.四号) } else if it.level == 5 { format_heading(it: it, font: 字体.宋体, size: 字号.小四) } } set heading(numbering: heading_numbering) set par(first-line-indent: 2em, leading: 1em) set text(font: 字体.宋体, size: 字号.小四) content }
https://github.com/jijinbei/typst_template
https://raw.githubusercontent.com/jijinbei/typst_template/main/report/example/example.typ
typst
#import "../template.typ": * #import "@preview/physica:0.9.0": * #show: project.with( title: "シャルピー衝撃試験レポート", authors: ( "伊豆大学1年 今村 耕平", ), date: true, titlepage: true, ) = 目的 #cbox([目的])[ 本実験の主な目的は、特定の材料(例:鋼、アルミニウムなど)の衝撃エネルギー吸収能力を定量的に測定し、材料の特性を深く理解することです。 また、実験装置の安全性にも注目し、衝撃試験中の安全管理についての知見を深めることも目的としています。 ] = 背景 シャルピー衝撃試験は、材料の衝撃強度、特にその脆性または靭性を評価するために広く使用される試験方法です。この試験は、材料が急激な力や衝撃にどのように反応するかを理解する上で非常に重要です。 == 基本原理 シャルピー衝撃試験では、試験片に衝撃を加え、その際に吸収されるエネルギー量を測定します。 このエネルギー量は、材料が衝撃にどれだけ抵抗するか、つまりその靭性を示します。 試験は、重量のあるハンマーを一定の高さから振り下ろし、試験片に衝撃を与えることによって行われます。 衝撃によって試験片がどの程度のエネルギーを吸収するかを測定することで、材料の特性を評価します。 @シャルピー衝撃試験 のように変数を定義する。 重量のあるハンマーをある高さh' から振り下ろすと、ハンマーは切り込みをつけた試験片を破壊して再び高さh まで振り上がる。 この時の位置エネルギーの差 $ E & = m g (h' - h) \ & = m g l (cos beta - cos alpha) $ が、試験片を破壊する際の吸収エネルギーということになる。ここで、 - m :ハンマーの質量 - g :重力加速度 - l :ハンマー回転中心からハンマー重心までの距離 #figure( image("Charpy_impact_test_sketch.svg", width: 50%), caption: "シャルピー衝撃試験の概念図", )<シャルピー衝撃試験> == 試験装置 *振り子式衝撃試験機*: 試験は、振り子の重量を利用して試験片に衝撃を与える機械を使用して行われます。 振り子は一定の高さから解放され、試験片を打撃します。 *エネルギー計測*: 振り子は衝撃を与えた後も動き続け、その最高点での位置から衝撃によって吸収されたエネルギーが計算されます。 = 実験手順 試験片を機械に取り付け、規定の高さから振り子を落として衝撃を加える。 衝撃後の振り子の残存エネルギーを測定し、衝撃エネルギー吸収量を計算する。 + 試験片の準備: 適切な形状とサイズの試験片を準備します。 + 試験環境の設定: 必要に応じて、試験片を特定の温度に調整します。 + 衝撃の適用: 振り子を解放し、試験片に衝撃を与えます。 + データ記録: 振り子の残存エネルギーから、試験片が吸収したエネルギーを計算します。 = 結果 #figure( table( columns: 5, [試験], [1回目], [2回目], [3回目], [4回目], [角度$alpha$], $150 degree$, $138 degree$, $101 degree$, $133 degree$, ), caption: [試験結果], ) 本実験におけるシャルピー衝撃試験の結果は、多角的な視点から詳細に分析することが重要です。以下に、各試験の結果とその解釈を展開していきます。 試験結果は次のようになった == 一回目の試験結果(角度$alpha = 150 degree$) 初回の試験では、角度$alpha$を$150 degree$に設定し、試験片に最大限の衝撃を与えました。 この角度からの衝撃は、材料の最大靭性を評価するのに適していると考えられます。 試験片の反応としては、予想通りの破壊が確認されましたが、この結果は、試験片の靭性が想定よりも低い可能性を示唆しています。 == 二回目の試験結果(角度$alpha = 138 degree$) 第二回の試験では、角度$alpha$を$138 degree$に調整しました。 この調整は、試験片の靭性をさらに詳細に評価するためのものです。 結果として、試験片はやはり破壊されましたが、この破壊の様子から、試験片の脆弱性に関するさらなる情報を得ることができました。 == 三回目の試験結果(角度$alpha = 101 degree$) 三回目の試験では、角度$alpha$を$101 degree$に設定し、試験片に対する衝撃の強さを減少させました。 この試験では、試験片の靭性が以前の試験よりも高いことが示されましたが、依然として材料の脆弱性が問題となる結果が観察されました。 == 四回目の試験結果(角度$alpha = 133 degree$) 最後の試験では、角度$alpha$を$133 degree$に設定しました。 この角度での試験は、前回の結果を基に、さらに詳細な靭性の評価を目指して行われました。 結果として、試験片は再び破壊され、材料の特性に関して新たな知見を得ることができました。 = 結論 本実験を通じて、シャルピー衝撃試験による材料の靭性評価の重要性が再確認されました。 各試験の結果から、試験片の材料特性に関する貴重なデータが得られ、これらの情報は、今後の材料科学の分野において重要な参考となるでしょう。 さらに、試験過程での安全管理の重要性も浮き彫りになり、実験設備の改善や操作方法の見直しが必要であることが示されました。 = 参考文献 + ぐらんぶる 井上堅二 著 吉岡公威 漫画
https://github.com/EpicEricEE/typst-droplet
https://raw.githubusercontent.com/EpicEricEE/typst-droplet/master/src/util.typ
typst
MIT License
// Elements that can be split and have a 'body' field. #let splittable = (strong, emph, underline, stroke, overline, highlight) // Element function of spaces. #let space = [ ].func() // Converts the given content to a string. #let to-string(body) = { if type(body) == str { body } else if body.has("text") { to-string(body.text) } else if body.has("child") { to-string(body.child) } else if body.has("children") { body.children.map(to-string).join() } else if body.func() in splittable { to-string(body.body) } else if body.func() == smartquote { // Unfortunately, we can only use "dumb" quotes here. if body.double { "\"" } else { "'" } } else if body.func() == enum.item { if body.has("number") { str(body.number) + ". " + to-string(body.body) } else { "+ " + to-string(body.body) } } else if body.func() == space { " " } else if body.func() == super { let body-string = to-string(body.body) if body-string.match(regex("^[0-9+\-=\(\)ni\s]+$")) != none { body-string .replace("1", "¹") .replace("2", "²") .replace("3", "³") .replace(regex("[04-9]"), it => str.from-unicode(0x2070 + int(it.text))) .replace("+", "\u{207A}") .replace("-", "\u{207B}") .replace("=", "\u{207C}") .replace("(", "\u{207D}") .replace(")", "\u{207E}") .replace("n", "\u{207F}") .replace("i", "\u{2071}") } } else if body.func() == sub { let body-string = to-string(body.body) if body-string.match(regex("^[0-9+\-=\(\)aehk-pstx\s]+$")) != none { body-string .replace(regex("[0-9]"), it => str.from-unicode(0x2080 + int(it.text))) .replace("+", "\u{208A}") .replace("-", "\u{208B}") .replace("=", "\u{208C}") .replace("(", "\u{208D}") .replace(")", "\u{208E}") .replace("a", "\u{2090}") .replace("e", "\u{2091}") .replace("o", "\u{2092}") .replace("x", "\u{2093}") .replace("h", "\u{2095}") .replace("k", "\u{2096}") .replace("l", "\u{2097}") .replace("m", "\u{2098}") .replace("n", "\u{2099}") .replace("p", "\u{209A}") .replace("s", "\u{209B}") .replace("t", "\u{209C}") } } } // Attaches a label after the split elements. // // The label is only attached to one of the elements, preferring the second // one. If both elements are empty, the label is discarded. If the label is // empty, the elements remain unchanged. #let attach-label((first, second), label) = { if label == none { (first, second) } else if second != none { (first, [#second#label]) } else if first != none { ([#first#label], second) } else { (none, none) } } // Returns whether the element is displayed inline. // // Requires context. #let inline(element) = { element != none and measure(h(0.1pt) + element).width > measure(element).width }
https://github.com/sardorml/vantage-typst
https://raw.githubusercontent.com/sardorml/vantage-typst/main/README.md
markdown
MIT License
# Vantage Typst An ATS friendly simple Typst CV template, inspired by [alta-typst by <NAME>](https://github.com/GeorgeHoneywood/alta-typst). See [`example.pdf`](example.pdf) for the rendered PDF output. ![Preview](screenshot.png) ## Features - **Two-column layout**: Experience on the left and other important details on the right, organized for easy scanning. - **Customizable icons**: Add and replace icons to suit your personal style. - **Responsive design**: Adjusts well for various print formats. ## Usage ### Running Locally with Typst CLI 1. **Install Typst CLI**: Follow the installation instructions on the [Typst CLI GitHub page](https://github.com/typst/typst#installation) to set up Typst on your machine. 2. **Clone the repository**: ```bash git clone https://github.com/sardorml/vantage-typst.git cd vantage-typst ``` 3. **Run Typst**: Use the following command to render your CV: ```bash typst compile example.typ ``` This will generate a PDF output in the same directory. 4. **Edit your CV**: Open the `example.typ` file in your preferred text editor to customize the layout. ### Configuration You can easily customize your personal data by editing the `configuration.yaml` file. This file allows you to set your name, contact information, work experience, education, and skills. Here’s how to do it: 1. Open the `configuration.yaml` file in your text editor. 2. Update the fields with your personal information. 3. Save the file, and your CV will automatically reflect these changes when you compile it. ## Icons You can enhance your CV with additional icons by following these steps: 1. **Upload Icons**: Place your `.svg` files in the `icons/` folder. 2. **Reference Icons**: Modify the `links` array in the Typst file to include your new icons by referencing their filenames as the `name` values. Example: ```typst links: [ { name: "your-icon-name", url: "https://example.com" }, ] ``` For existing icons, the current selection is sourced from [Lucide Icons](https://lucide.dev/icons/). ## License This project is licensed under the [MIT License](./LICENSE). Icons are from Lucide Icons and are subject to [their terms](https://lucide.dev/license). ## Acknowledgments - Inspired by the work of [<NAME>](https://github.com/GeorgeHoneywood/alta-typst). - Thanks to [Lucide Icons](https://lucide.dev/icons/) for providing the icon library. For any questions or contributions, feel free to open an issue or submit a pull request!
https://github.com/thanhdxuan/dacn-report
https://raw.githubusercontent.com/thanhdxuan/dacn-report/master/report-week-5/contents/06-plan.typ
typst
= Tổng kết và kế hoạch tuần tới Trong tuần, nhóm đã thực hiện phân tích các yêu cầu cho website và tìm kiếm các nguồn dữ liệu đáng tin cậy cho mô hình, cùng với đó phác thảo sơ đồ use-case cho hệ thống và đặc tả các use-case quan trọng. Tuần tới, nhóm sẽ tiếp tục đặc tả các use-case còn lại để hoàn thiện phần phân tích hệ thống, đồng thời sẽ phác thảo cơ bản giao diện người dùng, cũng như chỉnh sửa theo sự hướng dẫn của GVHD.
https://github.com/El-Naizin/cv
https://raw.githubusercontent.com/El-Naizin/cv/main/modules_fr/professional.typ
typst
Apache License 2.0
#import "../brilliant-CV/template.typ": * #cvSection("Expérience Professionnelle") #cvEntry( title: [Directeur de la Science des Données], society: [XYZ Corporation], date: [2020 - Présent], location: [San Francisco, CA], description: list( [Diriger une équipe de scientifiques et d'analystes de données pour développer et mettre en œuvre des stratégies axées sur les données, développer des modèles prédictifs et des algorithmes pour soutenir la prise de décisions dans toute l'organisation], [Collaborer avec la direction pour identifier les opportunités d'affaires et stimuler la croissance, mettre en œuvre les meilleures pratiques en matière de gouvernance, de qualité et de sécurité des données], ) ) #cvEntry( title: [Analyste de Données], society: [ABC Company], date: [2017 - 2020], location: [New York, NY], description: list( [Analyser de grands ensembles de données à l'aide de SQL et Python, collaborer avec des équipes interfonctionnelles pour identifier des insights métier], [Créer des visualisations de données et des tableaux de bord à l'aide de Tableau, développer et maintenir des pipelines de données à l'aide d'AWS], ) ) #cvEntry( title: [Stagiaire en Analyse de Données], society: [PQR Corporation], date: [été 2017], location: [Chicago, IL], description: list( [Aider à la préparation, au traitement et à l'analyse de données à l'aide de Python et Excel, participer aux réunions d'équipe et contribuer à la planification et à l'exécution de projets], [Développer des visualisations et des rapports de données pour communiquer des insights aux parties prenantes, collaborer avec d'autres stagiaires et membres de l'équipe pour mener à bien les projets dans les délais impartis et avec une grande qualité], ) )
https://github.com/lucifer1004/leetcode.typ
https://raw.githubusercontent.com/lucifer1004/leetcode.typ/main/solutions/s0008.typ
typst
#import "../helpers.typ": * #let string-to-integer-ref(s) = { let numerics = "0123456789" let d = ("0": 0, "1": 1, "2": 2, "3": 3, "4": 4, "5": 5, "6": 6, "7": 7, "8": 8, "9": 9) let s = s.clusters() let n = s.len() let i = 0 let sign = 1 let ans = 0 while i < n and s.at(i) == " " { i += 1 } if i < n and s.at(i) == "-" { sign = -1 i += 1 } else if i < n and s.at(i) == "+" { i += 1 } while i < n and s.at(i) in numerics { if ans > 214748364 or (ans == 214748364 and d.at(s.at(i)) > 7) { if sign == 1 { return 2147483647 } else { return -2147483648 } } ans = ans * 10 + d.at(s.at(i)) i += 1 } ans * sign }
https://github.com/The-Notebookinator/notebookinator
https://raw.githubusercontent.com/The-Notebookinator/notebookinator/main/themes/linear/components/decision-matrix.typ
typst
The Unlicense
#import "../colors.typ": * #import "/utils.typ" #let decision-matrix = utils.make-decision-matrix((properties, data) => { let title-cell(body) = table.cell( fill: surface-2, inset: 0.8em, text(size: 13pt, body), ) let body-cell(total: false, highest: none, body) = table.cell( fill: if highest == none { white } else if highest { pro-green } else { white }, inset: 0.8em, text[#body], ) let table-height = data.len() + 2 let table-width = properties.len() + 2 set table.cell(align: center + horizon) table( stroke: none, columns: for _ in range(properties.len() + 2) { (1fr,) }, // draw the lines for the graph // draw vertical lines table.vline(start: 1, end: table-height - 1), ..for num in range(1, table-width + 1) { (table.vline(x: num, end: table-height - 1),) }, // draw horizontal lines table.hline(start: 1), ..for num in range(1, table-height) { (table.hline(y: num),) }, // draw weight lines ..for num in range(0, table-width) { (table.vline(stroke: gray, x: num, start: table-height - 1, end: table-height),) }, table.hline(stroke: gray,y: table-height, end: table-width - 1), // draw the actual graph // title row [], ..for property in properties { (title-cell(property.name),) }, title-cell[Total], // score rows ..for (index, result) in data { ( [#index], ..for property in properties { let value = result.at(property.name) (body-cell(highest: value.highest, value.weighted),) }, body-cell(highest: result.total.highest, result.total.weighted) ) }, // weights row text(fill: gray)[Weight], ..for property in properties { (body-cell[ #property.at("weight", default: 1)x ],) }, ) })
https://github.com/7sDream/fonts-and-layout-zhCN
https://raw.githubusercontent.com/7sDream/fonts-and-layout-zhCN/master/cover.typ
typst
Other
#import "template/consts.typ" #import "template/util.typ" #import "template/template.typ": web-page-template #show: web-page-template #set page(numbering: none) if util.is-pdf-target() #set page(paper: "a4") if util.is-web-target() #show: align.with(center) #v(1fr) #text(size: 3em, weight: "bold")[#consts.title] #v(1em) _一本关于字体设计、Unicode和计算机中复杂文本处理的免费书籍_ _#consts.author 著_ _#consts.translators.join("、") 译_ #v(3fr) #let info_table = info => context { let key_widths = info.keys().map(k => measure(emph(k)).width) let max_width = calc.max(..key_widths) let keys = for (key, width) in info.keys().zip(key_widths) { let chars = key.clusters() if chars.len() >= 2 and width < max_width { let space = (max_width - width).to-absolute() / (chars.len() - 1) let result = chars.join(h(space)) (result,) } else { ([#key],) } } let cells = keys.zip(info.values()).map(((k, v)) => (k, [:], v).map(emph)).flatten() table( columns: (auto, 1em, auto), align: left, stroke: none, inset: (x: 0pt, y: 5pt), ..cells, ) } #info_table(( 原书版本: consts.upstream-version, 翻译版本: sys.inputs.at("githash", default: "unknown"), 编译器版本: str(sys.version), 编译时间: sys.inputs.at("compile_time", default: "unknown"), )) #if util.is-pdf-target() { pagebreak(weak: true, to: "odd") }
https://github.com/MALossov/YunMo_Doc
https://raw.githubusercontent.com/MALossov/YunMo_Doc/main/template/appendix.typ
typst
Apache License 2.0
#import "font.typ": * #import "utils.typ": *
https://github.com/remigerme/typst-polytechnique
https://raw.githubusercontent.com/remigerme/typst-polytechnique/main/polytechnique.typ
typst
MIT License
#import "page.typ" #import "heading.typ" #import "outline.typ" #import "cover.typ" #let apply(doc, despair-mode: false) = { show: page.apply.with(despair-mode: despair-mode) show: heading.apply show: outline.apply doc }
https://github.com/yonatanmgr/university-notes
https://raw.githubusercontent.com/yonatanmgr/university-notes/main/README.md
markdown
# סיכומי הרצאות - אוניברסיטת תל אביב מוקלד ב-[Typst](https://typst.app).
https://github.com/weihanglo/weihanglo.github.io
https://raw.githubusercontent.com/weihanglo/weihanglo.github.io/sources/resume/template.typ
typst
Other
#let cv(author: "", img: "", contacts: (), body) = { set document(author: author, title: author) show heading: it => [ #pad(bottom: -10pt, [#smallcaps(it.body)]) #line(length: 100%, stroke: 1pt) ] if img.len() > 0 { align(center)[#image(img, height: 3em)] } // Author align(center)[ #block(text(weight: 700, 2em, author)) ] // Contact information. pad( top: 0.5em, bottom: 0.5em, x: 2em, align(center)[ #grid( columns: 4, gutter: 1em, ..contacts ) ], ) // Main body. set par(justify: true) body } #let exp(place, title, location, time, details) = { pad( grid( columns: (auto, 1fr), align(left)[ *#place* \ #emph[#title] ], align(right)[ #location \ #time ] ) ) pad(bottom: 5%, details) } #let ulink(url, name) = { underline(link(url, name)) }
https://github.com/Myriad-Dreamin/typst.ts
https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/math/cancel_00.typ
typst
Apache License 2.0
#import "/contrib/templates/std-tests/preset.typ": * #show: test-page // Inline $a + 5 + cancel(x) + b - cancel(x)$ $c + (a dot.c cancel(b dot.c c))/(cancel(b dot.c c))$
https://github.com/kdog3682/2024-typst
https://raw.githubusercontent.com/kdog3682/2024-typst/main/src/todo.typ
typst
#import "styles.typ" as sx #import "util.typ" as ux #let o = (0,0) #let p34 = (3, 4) #import "@preview/cetz:0.2.0" #import cetz.draw as draw #set text(size: 20pt) #let block-stack(n) = { box({ cetz.canvas({ let size = 20pt for i in range(-n, n) { draw.rect((0, i * size), (size, i * size)) } }) }) } #let inline-canvas(content, baseline: 50%) = { if type(baseline) == "none" { baseline = 0pt } box(baseline: baseline, inset: (x: 10%), { cetz.canvas({ content }) }) } #let block-stack2(n, baseline: 50%) = inline-canvas(baseline: baseline, { let size = 1 for i in range(n) { let start = (0, i * size) let end = (size, (i + 1) * size) draw.rect(start, end, fill: yellow) } }) // $#block-stack2(3) plus #block-stack2(3) = #block-stack2(8, baseline: 18.75%)$ // take the 50% baseline and cut it in half to makae it align // this works pretty well //$#block-stack(3) space + space #block-stack(3) space = space #block-stack(6)$ // it takes time #let artboard(frames, ..) = cetz.canvas({ // merge in styles // you can parse it ... via a string // you can also parse it via html ... // to create stringbuilder like shenannigans // calculations can be made before hand // coordinates // styles // shortcuts // to do everything thru it ... and update // collect all the various styles // it is an amazing product }) //#type(json("abc.json").a) //#artboard(1) #let block-math(integers) = { let store = () for (index, integer) in integers.enumerate() { let block = block-stack2(integer, baseline: none) store.push(block) if ux.is-last(index, integers) { let sum = block-stack2(ux.sum(..integers), baseline: none) store.push(box(baseline: -50%, $=$)) store.push(sum) } else { store.push(box(baseline: -50%, $+$)) } } return store } #block-math((1,1,3)).join(" ")
https://github.com/Myriad-Dreamin/typst.ts
https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/meta/bibliography_02.typ
typst
Apache License 2.0
#import "/contrib/templates/std-tests/preset.typ": * #show: test-page #set page(width: 200pt) #set heading(numbering: "1.") #show bibliography: set heading(numbering: "1.") = Multiple Bibs Now we have multiple bibliographies containing @glacier-melt @keshav2007read #bibliography(("/assets/files/works.bib", "/assets/files/works_too.bib"))
https://github.com/DashieTM/ost-5semester
https://raw.githubusercontent.com/DashieTM/ost-5semester/main/web3/weeks/week5.typ
typst
#import "../../utils.typ": * #section("JHipster") - Generator for complex applications - angular, react, vue supported - spring boot - maven/gradle, npm - postgres, mongodb, elasticsearch, cassandra, etc. - monolith or microservices - tsets, CI/CD, deployment - User Management, Login, Registration - CRUD for entities, pagination, etc. #subsection("JDL: JHipster Domain Language") //typstfmt::off ```rs // entity Employee { // firstName String, // lastName String, // } // relationship ManyToOne { // Employee{manager} to Employee // } ``` //typstfmt::on #subsection("Experiences") #columns(2, [ #text(green)[Benefits:] - fast setup - most CRUD programming is done automatically via entity definition - with JDL, you can have a prototyp within minutes #colbreak() #text(red)[Downsides:] - round-trip engineering is not supported - re-generating the app after JDL change is possible, but must be merged -> *conflicts!* - user interface only supports bootstrap, not very flexible ]) #section("Testing with React (Jest)") - comes with create-react-app - interactive watch mode - snapshot testing - code coverage - mocks for callbacks - expect methods(what a feature...) - with react testing library, you can test without browser - tests without needing a browser -> render and screen utilities included - also integrated into create-react-app #subsection("Example") //typstfmt::off ```tsx // example app function Fetch({url}) { const buttonText = buttonClicked ? 'Ok' : 'Load Greeting’ return ( <div> <button onClick={() => fetchGreeting(url)} disabled={buttonClicked}> {buttonText} </button> {greeting && <h1>{greeting}</h1>} {error && <p role="alert">Oops, failed to fetch!</p>} </div> ) } // Test for app import {render, screen} from '@testing-library/react' import userEvent from '@testing-library/user-event' test('loads and displays greeting', async () => { // ARRANGE // render the greeting page -> not really ofc render(<Fetch url="/greeting" />) // ACT // click the button, or rather simulate it await userEvent.click(screen.getByText('Load Greeting’)) await screen.findByRole('heading’) // ASSERT // check if whatever was supposed to happen actually did happen expect(screen.getByRole('heading')).toHaveTextContent('hello there’) expect(screen.getByRole('button')).toBeDisabled() }) ``` //typstfmt::on #text(teal)[End-to-End testing can be done with cypress.io -> (Jest and cypress.io)] #align(center, [#image("../../Screenshots/2023_10_19_08_35_08.png", width: 70%)])
https://github.com/daskol/typst-templates
https://raw.githubusercontent.com/daskol/typst-templates/main/tmlr/appendix.typ
typst
MIT License
= Appendix You may include other additional sections here.
https://github.com/chendaohan/bevy_tutorials_typ
https://raw.githubusercontent.com/chendaohan/bevy_tutorials_typ/main/09_commands/commands.typ
typst
#set page(fill: rgb(35, 35, 38, 255), height: auto, paper: "a3") #set text(fill: color.hsv(0deg, 0%, 90%, 100%), size: 22pt, font: "Microsoft YaHei") #set raw(theme: "themes/Material-Theme.tmTheme") = 1. Commands (命令) 使用 Commands 从系统中生成/删除实体,添加/删除实体上的组件,管理资源。 ```Rust fn change_player(mut commands: Commands, players: Query<Entity, With<Player>>) { let mut players = players.iter(); let player_1 = players.next().unwrap(); // 从实体中删除组件,向实体插入组件 commands.entity(player_1).remove::<Player>().insert(Enemy); let player_2 = players.next().unwrap(); // 保留实体中的部分组件 commands.entity(player_2).retain::<Level>(); let player_3 = players.next().unwrap(); // 删除实体 commands.entity(player_3).despawn(); } ``` = 2. 这些行为什么时候应用? Commands 不会立即生效,因为当其他系统可以并行运行时,修改内存中的数据布局是不安全的。当你使用 Commands 执行的任何操作,都会排队等待稍后安全时应用。 在同一个 Schedule 中,你可以向系统添加 .before() / .after() 排序约束,Bevy 将自动确保在必要时应用 Commands ,以便第二个系统可以看到第一个系统中 Commands 应用后的情况。 ```Rust .add_systems( Startup, ( spawn_players, change_player, ).chain(), ) ``` 否则,命令通常在每个 Schedule 结束时被应用。处于不同 Schedule 的系统将会看到变化。例如,Startup 中生成的实体,可以在 Update 中看到。 ```Rust .add_systems(Startup, spawn_players) .add_systems(Update, complete_player_count) ``` = 3. 自定义 Commands Commands 还可以作为一种便捷的方式来执行任何需要完全访问 ECS World 的自定义操作。你可以将任何自定义操作以延迟排队的方式运行,这与标准命令的工作方式相同。 ```Rust fn custom_commands_spawn_player(mut commands: Commands) { commands.add(|world: &mut World| { world.spawn((Player, Level(45), Health(236))); }); } ``` = 4. 扩展 Commands API 如果你想要更集成的东西,就像 Bevy 的 Commands API 一样。你可以创建自定义类型并实现 Command Trait : ```Rust struct AddEnemyCommand { level: u32, health: u32, } impl Command for AddEnemyCommand { fn apply(self, world: &mut World) { world.spawn(( Enemy, Level(self.level), Health(self.health), )); } } fn use_add_enemy_command(mut commands: Commands) { commands.add(AddEnemyCommand { level: 5, health: 28, }); } ``` 如果你想让他更加好用,你可以创建一个扩展 Trait 来向 Commands 添加额外的方法: ```Rust trait AddEnemyCommandExt { fn add_enemy(&mut self, level: u32, health: u32); } impl<'w, 's> AddEnemyCommandExt for Commands<'w, 's> { fn add_enemy(&mut self, level: u32, health: u32) { self.add(AddEnemyCommand { level, health, }); } } fn use_add_enemy_command_ext(mut commands: Commands) { commands.add_enemy(34, 356); } ```
https://github.com/LDemetrios/Typst4k
https://raw.githubusercontent.com/LDemetrios/Typst4k/master/src/test/resources/suite/layout/layout.typ
typst
--- layout-in-fixed-size-block --- // Layout inside a block with certain dimensions should provide those dimensions. #set page(height: 120pt) #block(width: 60pt, height: 80pt, layout(size => [ This block has a width of #size.width and height of #size.height ])) --- layout-in-page-call --- // Layout without any container should provide the page's dimensions, minus its margins. #page(width: 100pt, height: 100pt, { layout(size => [This page has a width of #size.width and height of #size.height ]) h(1em) place(left, rect(width: 80pt, stroke: blue)) })
https://github.com/Myriad-Dreamin/typst.ts
https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/crates/reflexo-typst/README.md
markdown
Apache License 2.0
# reflexo-typst Bridge Typst to Web Rendering, with power of typst. See [Typst.ts](https://github.com/Myriad-Dreamin/typst.ts)
https://github.com/qujihan/typst-book-template
https://raw.githubusercontent.com/qujihan/typst-book-template/main/example/README.md
markdown
# Quick Start ```shell cd typst-book-template/example typst c main.typ main.pdf --font-path ../fonts --root ../../ ```
https://github.com/rabotaem-incorporated/algebra-conspect-1course
https://raw.githubusercontent.com/rabotaem-incorporated/algebra-conspect-1course/master/sections/05-group-theory/02-related-classes.typ
typst
Other
#import "../../utils/core.typ": * == Смежные классы #ticket(step-fn: x => x + 2)[Левые и правые смежные классы. Индекс подгруппы] #denote[ Пусть $H < G$. Будем писать $g_1 sim g_2$ для $g_1, g_2 in G$, если $g_2 = g_1 h$, где $h in H$. Равносильно, если $g_1^(-1) g_2 in H$. ] #lemma[ $sim$ --- отношение эквивалентности на $G$ ] #proof[ + $g = g e, e in H$ + $g_2 = g_1 mul h ==> g_1 = g_2 mul h^(-1), h^(-1) in H$ + $g_2 = g_1 h, space g_3 = g_2 h', space h, h' in H$. Тогда $g_3 = g_1 underbrace(h h', in H)$ ] #def[ Класс эквивалентности по $sim$, содержащий элемент $g in G$ называется _левым смежным классом $g$ по подгруппе $H$_, или _левым классом смежности $g$ по подгруппе $H$_: $ {g' bar g' sim g} = {g h bar h in H} = g H $ Аналогично определяются правые смежные классы. Множество левых смежных классов $G$ по $H$: $G fg H$, множество правых смежных классов $G$ по $H$: $H \\ G$. ] #example[ Пусть $G = S_3$, $H = gen((1 2)) = {e, (1 2)}$. $ G fg H = { e H, (1 3)H, (2 3)H } = { H, {(1 3), (1 2 3)}, {(2 3), (1 3 2)} } \ H \\ G = { H e, H(1 3), H(2 3) } = { H, {(1 3), (1 3 2)}, {(2 3), (1 2 3)} } $ ] #def[ _Индексом_ подгруппы $G$ называют $(G : H) = abs(G fg H)$ ] #example[ + $(S_3 : gen((1 2))) = 3$. + $(ZZ : n ZZ) = n$, для $n in NN$. ] #pr[ Существует биекция: $ G fg H &limits(-->)^(alpha) H \\ G \ M &maps M^(-1) $ Это означает, что $abs(G fg H) = abs(H \\ G)$, поэтому "левый" и "правый" индексы подгруппы --- одно и тоже. ] #proof[ $M = g H$ $ M^(-1) = {(g h)^(-1) bar h in H} = {h^(-1)g^(-1) bar h in H} = H^(-1)g^(-1) = H g^(-1) $ Рассмотрим отображение $beta$: $ H \\ G &limits(-->)^(beta) G fg H\ M &maps M^(-1)\ $ тогда: $ beta compose alpha = id_(G fg H), space alpha compose beta = id_(H \\ G) $ ] #ticket[Теорема Лагранжа и следствия из неё] #denote[ Если $G$ конечная группа, то будем на это указывать так: $abs(G) < oo$. ] #th(name: [Лагранжа])[ Пусть $abs(G) < oo$, $H < G$. Тогда $ abs(G) = abs(H) mul (G : H). $ ] #proof[ $ abs(G) = limits(sum)_(M in G fg H) abs(M) = (G : H) abs(H). $ Пояснение: $ M = g H, space H &--> g H space #[--- биекция] \ h &maps g h $ $ g h_1 = g h_2 ==> h_1 = h_2 ==> abs(M) = abs(H) $ ] #follow(plural: true)[ + Если $abs(G) < oo$ и $H < G$, то $abs(G) space dots.v space abs(H)$. + Если $abs(G) < oo$ и $g in G$, то $abs(G) space dots.v space abs(gen(g))$. + Если $abs(G) < oo$ и $g in G$, то $g^(abs(G)) = e$. + #[ <NAME>. Пусть $(a, m) = 1, m in NN, a in ZZ$. Тогда $ a^(phi(m)) equiv_(m) 1. $ ] + #[ Пусть $abs(G) = p$ --- простое число. Тогда $G$ --- циклическая. ] ] #proof[ 4. #[ Можно рассмотреть циклическую подгруппу $gen(a)$, тогда $abs(gen(a)) = phi(m)$. По предыдущему следствию получаем то что надо. ] 5. #[ $g in G, space g != e$\ $ord(g) bar p, ord g != 1 ==> ord g = p ==> abs(gen(g)) = p ==> gen(g) = G$ ] ]
https://github.com/Myriad-Dreamin/typst.ts
https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/meta/bibliography-ordering_00.typ
typst
Apache License 2.0
#import "/contrib/templates/std-tests/preset.typ": * #show: test-page #set page(width: 300pt) @mcintosh_anxiety @psychology25 @netwok @issue201 @arrgh @quark @distress, @glacier-melt @issue201 @tolkien54 @sharing @restful #bibliography("/assets/files/works.bib")
https://github.com/pryhodkin/cv
https://raw.githubusercontent.com/pryhodkin/cv/master/cv.typ
typst
#import "template.typ": cv_heading, cv_section, cv_skillset, cv_entry #set page( paper: "a4", margin: (top: 1.5cm, right: 1.5cm, bottom: 1cm, left: 1.5cm), // fill: rgb("#e0e0e0"), ) #set text( font: ("CMU Serif"), size: 0.8em, ) #let author = "<NAME>" #let title = "DevOps Engineer" #let github = "pryhodkin" #let email = "<EMAIL>" #let linkedin = "pryhodkin" #cv_heading(author, title, linkedin, email, github) #cv_section("Work Experience") #cv_entry([ My responsibility is to setup and support the reliable cloud environment using various of technologies such as Azure Kubernenes Service, Prometheus, Grafana and others with industry best practices such as security care using Hashicorp Vault, Certificate Manager etc. Also I build pipelines to build, test, deploy and deliver to customer main company product - CompatibL Risk Platform. Based on customer needs I customize the external software configurations to make it fit requirements. - For some customers I worked with a specific requirements to deploy the product on their cloud provider/technology including AWS ECS, AKS, ACA. - I have an enperience working with different teams with their own workflows moving from chaos hand made deployments to automated solutions. - Designed and developed some modules of a risk management platform. - Optimized applications for CI/CD, containers, and cloud deployments, working with a broad range of technologies outside typical DevOps scope to ensure smooth integration and deployment across development and operations teams. ], role: "DevOps Engineer, Software Developer", start: (month: "June", year: 2021), end: (month: "", year: "Present"), place: "CompatibL", icon: "compatibl.png" ) #v(1em) #cv_entry([ - Informatics, physics, math olympiad instructor, member of the jury. Supervisor of informatics room equipment. ], role: "Laboratory assistant", start: (month: "Ferbuary", year: 2020), end: (month: "May", year: 2020), place: "Ukrainian Physical and Mathematical Lyceum of Taras Shevchenko National University", icon: "upml-knu.png" ) #cv_section("Education") #cv_entry("", role: "M.Sc. in Computer Science", start: (month: "September", year: 2023), end: (month: "June", year: 2025), place: "Taras Shevchenko National University of Kyiv", icon: "knu.png" ) #cv_entry("", role: "B.Sc. in Computer Science", start: (month: "September", year: 2019), end: (month: "June", year: 2023), place: "Taras Shevchenko National University of Kyiv", icon: "knu.png" ) #cv_entry([ A few times winner of the 3rd stage of the All-Ukrainian Olympiads in mathematics, physics, web design. ], role: "High School Diploma", start: (month: "September", year: 2015), end: (month: "June", year: 2019), place: "Ukrainian Physical and Mathematical Lyceum of Taras Shevchenko National University", icon: "upml-knu.png" ) #cv_section("Soft skills") #cv_skillset("Communication" , skills: ("I can communicate with people of different levels of technical knowledge",)) #cv_skillset("Problem-solving", skills: ("I can solve problems quickly and efficiently",)) #cv_skillset("Adaptability" , skills: ("I can adapt to new environments and learn new technologies quickly",)) #cv_skillset("Teamwork" , skills: ("I am a team player with leadership experience, capable of both contributing to and leading teams.",)) #cv_skillset("Spoken languages", skills: ("Ukrainian (native)", "English (B2)")) #cv_section("Hard skills") #cv_skillset("Languages", skills: ("C#", "Bash", "Python", "JavaScript/TypeScript", "Go", "Make", "HCL")) #cv_skillset("CI/CD", skills: ("TeamCity", "GitHub Actions")) #cv_skillset("Infrastrusture as code", skills: ("Terraform",)) #cv_skillset("Reverse proxy and web servers", skills: ("Nginx", "Traefik")) #cv_skillset("Databases", skills: ("PostgreSQL", "MySQL", "MongoDB", "Redis")) #cv_skillset("Cloud providers", skills: ("AWS","Azure")) #cv_skillset("Container Orchestration", skills: ("Docker", "Kubernetes")) #cv_skillset("Azure-based technologies", skills: ("AKS", "DNS Zones", "Service Principal")) #cv_skillset("AWS-based technologies", skills: ("IAM", "VPC", "Lambda", "S3", "ECS", "ECR", "CloudWatch")) #cv_skillset("Kubernenes-based technologies", skills: ("Helm", "ArgoCD", "Cert-Manager", "HashiCorp Vault", "Keda")) #cv_skillset("Networking", skills: ("TCP/IP", "DNS", "HTTP", "HTTPS", "CIDR", "Subnetting")) #cv_skillset("Monitoring", skills: ("Prometheus", "Grafana", "Loki", "Fluentd")) #cv_skillset("Others", skills: ("A plenty of tools common for python and dotnet ecosystems",))
https://github.com/tony-rsa/thonifho.muhali.cv
https://raw.githubusercontent.com/tony-rsa/thonifho.muhali.cv/main/src/template.typ
typst
MIT License
#import "@preview/fontawesome:0.1.0": * // Personal Information #let firstName = ( "en": "Georgii (Jora)", "ru": "Георгий (Жора)", ) #let lastName = ( "en": "Troosh", "ru": "Труш", ) #let handle = "tensorush" #let personalInfo = ( site: handle, email: handle, github: handle, telegram: handle, linkedin: handle, mastodon: handle, xtwitter: handle, discourse: handle, ) #let headerSummary = ( "en": "Open to remote Go Developer positions, especially working on distributed systems.", "ru": "Готов к удаленной работе на Go, особенно в контексте распределенных систем.", ) // Colors #let colors = ( teal: rgb("#008080"), iris: rgb("#5D3FD3"), amber: rgb("#FFBF00"), coral: rgb("#FF7F50"), linen: rgb("#E9DCC9"), mauve: rgb("#E0B0FF"), salmon: rgb("#FA8072"), crimson: rgb("#DC143C"), amaranth: rgb("#9F2B68"), charcoal: rgb("#36454F"), cornsilk: rgb("#FFF8DC"), platinum: rgb("#E5E4E2"), sky_blue: rgb("#87CEEB"), dark_gray: rgb("#A9A9A9"), jet_black: rgb("#343434"), light_gray: rgb("#D3D3D3"), royal_blue: rgb("#4169E1"), matte_black: rgb("#28282B"), midnight_blue: rgb("#191970"), cadmium_orange: rgb("#F28C28"), shamrock_green: rgb("#009E60"), ) // Header Info Icons #let ln = fa-link() #let ws = fa-globe() #let gh = fa-github() #let tg = fa-telegram() #let li = fa-linkedin() #let mt = fa-mastodon() #let dc = fa-discourse() #let em = fa-square-envelope() #let xt = fa-icon("square-x-twitter", fa-set: "Brands") // Tech Skill Icons #let aw = fa-aws() #let zg = fa-bolt() #let lx = fa-linux() #let dk = fa-docker() #let go = fa-golang() #let gt = fa-git-alt() #let db = fa-database() #let nx = fa-snowflake() #let ga = fa-github-alt() #let rs = fa-rust(fa-set: "Brands") // Layout Settings #let headerFont = "Roboto" #let titleColor = colors.linen #let dateColor = colors.dark_gray #let descColor = colors.light_gray #let pageColor = colors.matte_black #let accentColor = colors.shamrock_green #let profilePhoto = "assets/photo.png" // Layout #let afterHeaderSkip = -9pt #let beforeEntrySkip = 1pt #let beforeSectionSkip = 1pt #let beforeEntryDescSkip = 1pt #let layout(doc) = { set text(font: ("Roboto", "Noto Emoji"), weight: "regular", size: 9pt) set align(left) set page(paper: "a4", fill: pageColor, margin: (left: .5in, right: .5in, top: .15in, bottom: .15in)) doc } // Utility Functions #let hSpc() = [ #h(2pt) ] #let hBar() = [ #hSpc() | #hSpc() ] #let hDot() = [ #hSpc() · #hSpc() ] #let autoImport(file, lang) = { include { "sections/" + lang + "/" + file + ".typ" } } // Styles #let headerFirstNameStyle(str) = { text(font: headerFont, size: 32pt, fill: titleColor, weight: "light", str) } #let headerLastNameStyle(str) = { text(font: headerFont, size: 32pt, fill: titleColor, weight: "bold", str) } #let headerInfoStyle(str) = { text(size: 10pt, fill: accentColor, str) } #let headerSummaryStyle(str) = { text(size: 10pt, weight: "medium", style: "italic", fill: descColor, str) } #let sectionTitleStyle(str, color: titleColor) = { text(size: 16pt, weight: "bold", fill: color, str) } #let entryTitleStyle(str) = { text(size: 10pt, fill: titleColor, weight: "bold", str) } #let entryHostStyle(str) = { text(size: 8pt, fill: accentColor, weight: "medium", smallcaps(str)) } #let entryDateStyle(str) = { align(right, text(weight: "medium", fill: accentColor, style: "oblique", str)) } #let entryModeStyle(str) = { align(right, text(size: 8pt, weight: "medium", fill: dateColor, style: "oblique", str)) } #let entryDescStyle(str) = { text(fill: descColor, { v(beforeEntryDescSkip) str }) } #let skillTypeStyle(str) = { align(right, text(size: 10pt, fill: titleColor, weight: "bold", str)) } #let skillInfoStyle(str) = { text(fill: descColor, str) } // Functions #let makeHeaderInfo() = { let n = 1 for (k, v) in personalInfo { if v != "" { if n > 1 { hBar() } if k == "site" { link("https://" + v + ".github.io/about/")[#ws Site] } else if k == "email" { link("mailto:" + v + "@gmail.com")[#em Email] } else if k == "github" { link("https://github.com/" + v)[#gh GitHub] } else if k == "telegram" { link("https://t.me/" + v)[#tg Telegram] } else if k == "linkedin" { link("https://www.linkedin.com/in/" + v)[#li LinkedIn] } else if k == "mastodon" { link("https://fosstodon.org/@" + v)[#mt Mastodon] } else if k == "xtwitter" { link("https://twitter.com/" + v)[#xt X] } else if k == "discourse" { link("https://ziggit.dev/u/" + v)[#dc Ziggit] } else { v } } n += 1 } } #let makeHeaderNameSection(lang) = table( columns: 1fr, inset: 0pt, stroke: none, row-gutter: 6mm, [#headerFirstNameStyle(firstName.at(lang)) #h(5pt) #headerLastNameStyle(lastName.at(lang))], [#headerInfoStyle(makeHeaderInfo())], if headerSummary.at(lang) != "" { [#headerSummaryStyle(headerSummary.at(lang))] }, ) #let makeHeaderPhotoSection() = { if profilePhoto != "" { image(profilePhoto, height: 1.4in) } else { v(1.4in) } } #let cvHeader(align: left, hasPhoto: true, lang) = { let makeHeader(leftComp, rightComp, columns, align) = table( columns: columns, inset: 0pt, stroke: none, column-gutter: 15pt, align: align + horizon, { leftComp }, { rightComp }, ) if hasPhoto { makeHeader(makeHeaderNameSection(lang), makeHeaderPhotoSection(), (auto, 20%), align) } else { makeHeader(makeHeaderNameSection(lang), makeHeaderPhotoSection(), (auto, 0%), align) } v(afterHeaderSkip) } #let cvSection(title) = { let highlightText = title.slice(0) v(beforeSectionSkip) sectionTitleStyle(highlightText, color: accentColor) h(2pt) box(width: 1fr, line(stroke: 0.9pt + descColor, length: 100%)) } #let cvEntry(title: "Title", host: "Host", date: "Date", mode: "Mode", logo: "", desc: "Desc") = { v(beforeEntrySkip) table( columns: (4%, 1fr), inset: 0pt, stroke: none, align: horizon, column-gutter: 4pt, image(logo, width: 100%), table( columns: (1fr, auto), inset: 0pt, stroke: none, row-gutter: 6pt, align: auto, { entryTitleStyle(title) }, { entryDateStyle(date) }, { entryHostStyle(host) }, { entryModeStyle(mode) }, ), ) entryDescStyle(desc) } #let cvSkill(type: "Type", info: "Info") = { table( columns: (16%, 1fr), inset: 0pt, column-gutter: 10pt, stroke: none, skillTypeStyle(type), skillInfoStyle(info), ) } #let techSkills = [ #go #hSpc() Go #hBar() #rs #hSpc() Rust #hBar() #zg #hSpc() Zig #hBar() #db #hSpc() DBMS #hBar() #aw #hSpc() AWS #hBar() #dk #hSpc() Docker #hBar() #lx #hSpc() Linux #hBar() #nx #hSpc() Nix #hBar() #ga #hSpc() GitHub #hBar() #gt #hSpc() Git ]
https://github.com/tingerrr/masters-thesis
https://raw.githubusercontent.com/tingerrr/masters-thesis/main/src/figures/listings.typ
typst
#import "util.typ": * // // t4gl // #let t4gl-ex-array1 = ```t4gl String[Integer] map map[42] = "Hello World!" String[Integer, Integer] nested nested[-1, 37] = "T4gl is wacky!" String[10] staticArray staticArray[9] = "Truly wacky!" ``` #let t4gl-ex-array2 = ```t4gl String[10] a1 String[10] a2 = a1 array1[0] = "Hello World!" // array1[0] == array2[0] ``` // // vector // #let vector-ex = ```cpp #import <vector> int main() { std::vector<int> vec; vec.push_back(3); vec.push_back(2); vec.push_back(1); std::vector<int> other = vec; return 0; } ``` // // finger tree // #let finger-tree-def-old = ```cpp using T = ...; using M = ...; class Node {}; class NodeDeep : public Node<M, T> { M measure; std::array<Node*, 3> children; // 2..3 children }; class NodeLeaf : public Node<M, T> { T value; }; class Digits { M measure; std::array<Node*, 4> children; // 1..4 digits }; class FingerTree { M measure; }; class Shallow : public FingerTree<M, T> { Node* digit; // 0..1 digits }; class Deep : public FingerTree<M, T> { Digits<M, T> left; // 1..4 digits FingerTree<M, T>* middle; Digits<M, T> right; // 1..4 digits }; ``` #let finger-tree-def-new = ```cpp using V = ...; using K = ...; class Node { K key; }; class Internal : public Node<K, V> { std::vector<Node*> children; // k_min..k_max children }; class Leaf : public Node<K, V> { V val; }; class Digits { K key; std::vector<Node<K, V>*> children; }; class FingerTree { K key; }; class Shallow : public FingerTree<K, V> { std::vector<Node*> digits; // 0..2d_min digits }; class Deep : public FingerTree<K, V> { Digits<K, V> left; // d_min..d_max digits FingerTre<K, V>* middle; Digits<K, V> right; // d_min..d_max digits }; ``` #let finger-tree-def-illegal = ```cpp template <typename T> class Node {}; template <typename T> class Node2 : public Node<T> { T a; T b; }; template <typename T> class Node3 : public Node<T> { T a; T b; T c; }; template <typename T> class Digits : { std::vector<T> digits; }; template <typename T> class FingerTree {}; template <typename T> class Empty : public FingerTree<T> {}; template <typename T> class Single : public FingerTree<T> { T node; }; template <typename T> class Deep : public FingerTree { Digits<T> left; FingerTree<Node<T>> middle; Digits<T> right; }; ``` #let finger-tree-def-node = ```cpp enum class Kind { Deep, Leaf }; class NodeBase {}; class Node { Kind _kind; std::shared_ptr<NodeBase<K, V>> _repr; }; class NodeDeep : public NodeBase<K, V> { uint _size; K _key; std::vector<Node<K, V>> _children; }; class NodeLeaf : public NodeBase<K, V> { K _key; V _val; }; ``` #let finger-tree-def-digits = ```cpp class DigitsBase { uint _size; K _key; std::vector<Node<K, V>> _digits; }; class Digits { std::shared_ptr<DigitsBase<K, V>> _repr; }; ``` #let finger-tree-def-self = ```cpp enum class Kind { Empty, Single, Deep }; class FingerTreeBase {}; class FingerTree { Kind _kind; std::shared_ptr<FingerTreeBase<K, V>> _repr; }; class FingerTreeEmpty : public FingerTreeBase<K, V> {}; class FingerTreeSingle : public FingerTreeBase<K, V> { Node<K, V> _node; }; class FingerTreeDeep : public FingerTreeBase<K, V> { Digits<K, V> _left; FingerTree<K, V> _middle; Digits<K, V> _right; }; ```
https://github.com/ludwig-austermann/modpattern
https://raw.githubusercontent.com/ludwig-austermann/modpattern/main/main.typ
typst
MIT License
/// currently the only function which creates the corresponding pattern /// - size is the as size for patterns /// - body is the inside/body/content of the pattern /// - dx, dy allow for translations /// - background allows any type allowed in the box fill argument. It gets applied first #let modpattern(size, body, dx: 0pt, dy: 0pt, background: none) = pattern( size: size, { if background != none { place(box(width: 100%, height: 100%, fill: background)) } move(dx: -size.at(0) + dx, dy: -size.at(1) + dy, grid( columns: 3*(size.at(0),), rows: 3*(size.at(1),), body, body, body, body, body, body, body, body, body )) } )
https://github.com/jneug/typst-codetastic
https://raw.githubusercontent.com/jneug/typst-codetastic/main/codetastic.typ
typst
MIT License
#import "bits.typ" #import "bitfield.typ" #import "util.typ" #import "checksum.typ" #import "ecc.typ" /// Encode a digit into seven bits according to the /// EAN-13 standard. /// Each digit is encoded into seven bits via one /// of three encoding tables, determined by /// #arg[i] and #arg[odd]. #let ean13-encode( i, number, odd:none ) = { // Get code A codeword let code = bits.from-str(( "0001101", "0011001", "0010011", "0111101", "0100011", "0110001", "0101111", "0111011", "0110111", "0001011" ).at(number)) if i >= 6 { // Get code C codewort (right side) return bits.inv(code) } else if not odd { // Get code B codewort (left side, even) return bits.inv(code).rev() } else { // Get code A codewort (left side, odd) return code } } /// Create an EAN-5 barcode. /// /// #example(side-by-side: true, `#codetastic.ean5(12345)`) /// /// The #arg[code] can be given as a five digit number in integer /// or string format, or as an array with five integer digits. /// /// The size of the barcode can be scaled down to 80% and up to 200%. The height of the bars /// can be trimmed down to 50%. /// #example(side-by-side: true, ```#codetastic.ean5( /// scale:(1.8, .5), "90000") /// ```) /// /// EAN-5 codes are usually added to ean-13 codes as add-ons: /// #example(``` /// #grid(columns:2, row-gutter: 2pt, /// align(center, text(6pt, font:"Arial", "ISBN: 978-1-123-12345-6")), [], /// codetastic.ean13("9781123123456"), codetastic.ean5(scale:.9, "90000") /// ) /// ```) /// /// #text(.88em)[See #link("https://www.softmatic.com/barcode-ean-13.html#ean-add-on") for more /// information about EAN-5 codes.] /// /// - code (integer,string,array): A five digit number as integer or string, or an array with five integers. /// - scale (float): Scale of the code between #value(.8) and #value(2). /// - colors (array): An array with exactly two colors: background and foreground. #let ean5( code, scale: 1, colors: (white, black) ) = { if type(scale) != "array" { scale = (scale, scale) } let (scale-x, scale-y) = ( calc.clamp(scale.at(0), .8, 2), calc.clamp(scale.at(1), .5, 1) ) let (bg, fg) = colors code = util.to-int-arr(code) let checksum = checksum.ean5(code) let parities = bits.from-str(( "00111", "01011", "01101", "01110", "10011", "11001", "11100", "10101", "10110", "11010" ).at(checksum)) // Do the encoding let encoded = bits.from-str("01011") for (i, n) in code.enumerate() { encoded += ean13-encode(i, n, odd:parities.at(i)) encoded += (false, true) } // Prepare styles and canvas let width = 0.264mm * scale-x let height = 18.28mm * scale-x * scale-y let font-size = 8pt * scale-x let txt = text.with( font: "Arial", size: font-size, fill: fg, tracking: font-size * .25 ) util.place-code({ util.draw-bars( encoded, bar-width:width, bar-height:height, fg:fg, bg:bg ) util.place-content( 0pt, -height - font-size, width * encoded.len(), font-size, txt(code.map(str).join()) ) }) } /// Create an EAN-8 barcode. /// /// #example(side-by-side: true, `#codetastic.ean8(2903370)`) /// /// The #arg[code] can be given as a seven or eight digit number in integer /// or string format, or as an array with seven or eight integer digits. /// Codes with seven digits will have the checksum value appended to the code, while /// for eight digit codes the given checksum is validated. /// /// The size of the barcode can be scaled down to 80% and up to 200%. The height of the bars /// can be trimmed down to 50%. /// #example(side-by-side: true, ```#codetastic.ean8( /// scale:(1.8, .5), "29033706") /// ```) /// /// #text(.88em)[See #link("https://www.softmatic.com/barcode-ean-8.html") for more /// information about EAN-8 codes.] /// /// - code (integer,string,array): Either a seven or eight digit number as integer or string, or an array with seven or eight integers. /// - scale (float): Scale of the code between #value(.8) and #value(2). /// - colors (array): An array with exactly two colors: background and foreground. /// - lmi (boolean): If #value(true), _ light margin indicators_ will be shown. /// #example(side-by-side: true, `#codetastic.ean8(lmi:true, 29033706)`) #let ean8( code, scale: 1, colors: (white, black), lmi: false ) = { if type(scale) != "array" { scale = (scale, scale) } let (scale-x, scale-y) = ( calc.clamp(scale.at(0), .8, 2), calc.clamp(scale.at(1), .5, 1) ) let (bg, fg) = colors code = util.to-int-arr(code) if code.len() < 7 { code = (0,) * (7 - code.len()) + code } code = util.check-code( code, 8, checksum.ean8, checksum.ean8-test ) // Do the encoding let encoded = bits.from-str("00000000000101") for (i, n) in code.slice(0,4).enumerate() { encoded += ean13-encode(0, n, odd:true) } encoded += bits.from-str("01010") for (i,n) in code.slice(4).enumerate() { encoded += ean13-encode(6, n) } encoded += bits.from-str("1010000000") // Prepare styles and canvas let width = 0.264mm * scale-x let height = 18.28mm * scale-x * scale-y let font-size = 6pt * scale-x let txt = text.with( font: "Arial", size: font-size, fill: fg, tracking: font-size * .25 ) util.place-code({ util.draw-bars( encoded, bar-width:width, bar-height:height, fg:fg, bg:bg ) util.place-content( 14 * width, -font-size, 28 * width, font-size, fill:bg, txt(code.slice(0,4).map(str).join()) ) util.place-content( 47 * width, -font-size, 28 * width, font-size, fill:bg, txt(code.slice(4).map(str).join()) ) if lmi { util.place-content( 0 * width, -font-size, 11 * width, font-size, fill:bg, txt(sym.lt) ) util.place-content( 78 * width, -font-size, 7 * width, font-size, fill:bg, txt(sym.gt) ) } }) } /// Create an EAN-13 barcode. /// /// #example(side-by-side: true, `#codetastic.ean13(240701400194)`) /// /// The #arg[code] can be given as a 12 or 13 digit number in integer /// or string format, or as an array with 12 or 13 integer digits. /// Codes with 12 digits will have the checksum value appended to the code, while /// for 13 digit codes the given checksum is validated. /// /// The size of the barcode can be scaled down to 80% and up to 200%. The height of the bars /// can be trimmed down to 50%. /// #example(side-by-side: true, ```#codetastic.ean13( /// scale:(1.8, .5), "2407014001944") /// ```) /// /// #text(.88em)[See #link("https://www.softmatic.com/barcode-ean-13.html") for more /// information about EAN-13 codes.] /// /// - code (integer,string,array): Either a 12 or eight 13 number as integer or string, or an array with 12 or 13 integers. /// - scale (float): Scale of the code between #value(.8) and #value(2). /// - colors (array): An array with exactly two colors: background and foreground. /// - lmi (boolean): If #value(true), a _light margin indicator_ will be shown. /// #example(side-by-side: true, `#codetastic.ean13(lmi:true, 9781234567897)`) #let ean13( code, scale: 1, colors: (white, black), lmi: false ) = { if type(scale) != "array" { scale = (scale, scale) } let (scale-x, scale-y) = ( calc.clamp(scale.at(0), .8, 2), calc.clamp(scale.at(1), .5, 1) ) let (bg, fg) = colors code = util.to-int-arr(code) if code.len() < 12 { code = (0,) * (12 - code.len()) + code } code = util.check-code( code, 13, checksum.ean13, checksum.ean13-test ) let first = code.remove(0) let parities = bits.from-str(( "111111", "110100", "110010", "110001", "101100", "100110", "100011", "101010", "101001", "100101" ).at(first)) // Do the encoding let encoded = bits.from-str("00000000000101") for (i, n) in code.slice(0,6).enumerate() { encoded += ean13-encode(i, n, odd:parities.at(i)) } encoded += bits.from-str("01010") for (i,n) in code.slice(6).enumerate() { encoded += ean13-encode(6 + i, n) } encoded += bits.from-str("1010000000") // Prepare styles and canvas let width = 0.264mm * scale-x let height = 18.28mm * scale-x * scale-y let font-size = 6pt * scale-x let txt = text.with( font: "Arial", size: font-size, fill: fg, tracking: font-size * .25 ) util.place-code({ util.draw-bars( encoded, bar-width:width, bar-height:height, fg:fg, bg:bg ) util.place-content( 0 * width, -font-size, 11 * width, font-size, fill:bg, txt(str(first)) ) util.place-content( 14 * width, -font-size, 42 * width, font-size, fill:bg, txt(code.slice(0, 6).map(str).join()) ) util.place-content( 61 * width, -font-size, 42 * width, font-size, fill:bg, txt(code.slice(6).map(str).join()) ) if lmi { util.place-content( 106 * width, -font-size, 7 * width, font-size, fill:bg, txt(sym.gt) ) } }) } /// Create an UPC-A barcode. /// /// #example(side-by-side: true, `#codetastic.upc-a("03600029145")`) /// /// The #arg[code] can be given as a 11 or 12 digit number in integer /// or string format, or as an array with 11 or 12 integer digits. /// Codes with 11 digits will have the checksum value appended to the code, while /// for 12 digit codes the given checksum is validated. /// /// The size of the barcode can be scaled down to 80% and up to 200%. The height of the bars /// can be trimmed down to 50%. /// #example(side-by-side: true, ```#codetastic.upc-a( /// scale:(1.8, .5), "03600029145") /// ```) /// /// #text(.88em)[See #link("https://www.softmatic.com/barcode-upc-a.html") for more /// information about UPC-A codes.] /// /// - code (integer,string,array): Either a 11 or eight 12 number as integer or string, or an array with 11 or 12 integers. /// - scale (float): Scale of the code between #value(.8) and #value(2). /// - colors (array): An array with exactly two colors: background and foreground. /// - lmi (boolean): If #value(true), a _light margin indicator_ will be shown. /// #example(side-by-side: true, `#codetastic.upc-a(lmi:true, "03600029145")`) #let upc-a( code, scale: 1, colors: (white, black), lmi: false ) = { if type(scale) != "array" { scale = (scale, scale) } let (scale-x, scale-y) = ( calc.clamp(scale.at(0), .8, 2), calc.clamp(scale.at(1), .5, 1) ) let (bg, fg) = colors code = util.to-int-arr(code) code = util.check-code( code, 12, checksum.upc-a, checksum.upc-a-test ) // Do the encoding let encoded = bits.from-str("000000000101") for n in code.slice(0,6) { encoded += ean13-encode(0, n, odd:true) } encoded += bits.from-str("01010") for n in code.slice(6) { encoded += ean13-encode(6, n) } encoded += bits.from-str("101000000000") // Prepare styles and canvas let width = 0.33mm * scale-x let height = 25.9mm * scale-x * scale-y + 5 * width let font-size = 5 * width let txt = text.with( font: "Arial", size: font-size, fill: fg, tracking: font-size * .25 ) util.place-code({ util.draw-bars( encoded, bar-width:width, bar-height:height, fg:fg, bg:bg ) util.place-content( 0 * width, -font-size, 9 * width, font-size, fill:bg, txt(str(code.first())) ) util.place-content( 12 * width, -font-size, 42 * width, font-size, fill:bg, txt(code.slice(1, 6).map(str).join()) ) util.place-content( 59 * width, -font-size, 42 * width, font-size, fill:bg, txt(code.slice(6, -1).map(str).join()) ) if lmi { util.place-content( 104 * width, -font-size, 9 * width, font-size, fill:bg, txt(str(code.last())) ) } }) } // #let upc-e( // code, // scale: 1, // colors: (white, black), // lmi: false // ) = {} // #let data-matrix( data, size: 14, quiet-zone: 1 ) = { // // Create matrix with timing and alignment patterns // let field = bitfield.new( // 14, 14, // init: (i,j) => { // i == 0 or j == 0 or (j == 13 and calc.even(i)) or (i == 13 and calc.even(j)) // } // ) // util.place-code({ // util.draw-modules(field) // }) // } /// Draws a QR-Code encoding #arg[data]. /// /// #example(`#codetastic.qrcode("https://qrcode.com/en")`) /// /// #wbox[*Some caveats*:\ /// - The generation of larger codes can take quit some time. /// - To speed-up compilation times, calculations for the optimal masking patterns don't /// the same approach as defined in the qr-code documentation. Codes will still be valid, /// but might look differnt than the output of other generators. /// - Kanji and ECI encodings are not yet supported. Maybe they will be in the future. /// - UTF-8 is not supported.] /// #ibox[*Improving speed for larger code versions*:\ /// Generating qr-codes with large amount of data can take long. Calculating the best /// masking pattern to produce the most readable code is currently one of the most /// expensive calculations in code creation. This can be mitigated by manually setting /// the mask to use. To do so, follow these steps: /// - Compile your document while passing #arg(debug: true) to #cmd-[qrcode]. /// - After compilation finished, look for the code in your output and note the mask /// number shown above the code. /// - Remove the #arg[debug] argument and set #arg[mask] to the mask number. /// Now the code creation will skip detection of the optimal mask and use the passed in /// mask. This should speed-up compilation times considerably.] /// /// - data (string): The data to encode. /// - quiet-zone (integer): Whitespace around the code in number of modules. The qr-code standard /// suggests a quiet zone of at least four modules. /// - min-version (integer): Minimum version for the code. A number between 1 and 40. If #arg[data] /// is to large for the minimum code verison, the next larger verison that fits the data is selected. /// - ecl (string): Error correction level. One of #value("l"), #value("m"), #value("q") or #value("h"). /// - mask (auto, integer): Forces a mask to apply to the code. Number between (0 and 7). /// // For #value(auto) the best mask is selected according to the qr-code standard. /// For #value(auto) the best mask is selected similar to the qr-code standard, but with /// some speed improvements, sacrificing accuracy. /// - size (auto, length): Size of a modules square. /// - width (auto, length): If set to a length, the module size will be adjusted to create a qr-code /// with the given width. Will overwrite any setting for #arg[size]. /// - colors (array): An array with exactly two colors: background and foreground. #let qrcode( data, quiet-zone: 4, min-version: 1, ecl: "l", mask: auto, size: auto, width: auto, colors: (white, black), debug: false ) = { import "qrutil.typ" assert(qrutil.check-ecl(ecl), message:"Error correction level need to be one of l,m,q or h. Got " + repr(ecl)) let module-size = size let (bg, fg) = colors // prepare encoding method // (numeric, alphanumeric, byte or kanji) let mode = qrutil.best-mode(data) if mode == none { panic("Supplied data contains characters that can't be encoded with one of the supported methods numeric, alphanumeric or byte (iso-8859-1).") } // determine final qr-code version from // data size and min-version argument min-version = if min-version == auto {1} else {calc.clamp(min-version, 1, 40)} let version = calc.max(min-version, qrutil.best-version( data.len(), ecl, mode) ) // encode data let encoded = qrutil.encode(data, version, ecl, mode:mode) // interleave data codewords and error correction encoded = qrutil.generate-blocks(encoded, version, ecl) assert.eq(encoded.len(), qrutil.total-codewords(version)) // Create empty matrix let size = qrutil.size(version) let field = bitfield.new(size, size) // Reserve bits field = qrutil.reserve-bits(field, version) // Add data in zig-zag pattern let dir = -1 let (i, j) = (size - 1, size - 1) for codeword in array(encoded) { let b = bits.from-int(codeword, pad:8) let x = 0 while x < 8 { if not field.at(i).at(j) { field.at(i).at(j) = b.at(x) x += 1 } if (j > 6 and calc.even(j)) or (j < 6 and calc.odd(j)) { j -= 1 } else { i += dir j += 1 } if i < 0 or i >= size { dir *= -1 if dir == 1 { (i, j) = (0, j - 2) } else { (i, j) = (size - 1, j - 2) } if j == 6 { j -= 1 } } } } // Masking if mask == auto { // compute best mask for this code (mask, field) = qrutil.best-mask(field, version) } else if mask != none { // use given mask mask = calc.clamp(mask, 0, 7) for i in range(size) { for j in range(size) { field.at(i).at(j) = qrutil.apply-mask( i, j, field.at(i).at(j), mask ) } } } else { // TODO: Remove! // Dummy mask number for adding format information. // Just for debugging! mask = 0 } field = qrutil.set-reserved-bits(field, version, ecl, mask) // calculate module size if width != auto { module-size = width / (size + 2 * quiet-zone) } else if module-size == auto { // TODO: calculate reasonable module size from version module-size = 2mm } // Draw modules util.place-code({ util.draw-modules( field, quiet-zone: quiet-zone, size: module-size, bg: bg, fg: fg ) if debug { let font-size = module-size * 2 let abs-size = (size + 2*quiet-zone) * module-size util.place-content( 0%, -abs-size, auto, font-size, text(font-size, fg.lighten(80%), [version: #version, ecl: #ecl, mode: #mode, mask: #mask, size: #{size}x#size, module size: #repr(module-size), quiet zone: #quiet-zone]) ) } }) } // #let micro-qrcode( // data, // quiet-zone: 4, // min-version: 1, // ecl: "l", // mask: auto, // size: auto, // width: auto, // colors: (white, black), // debug: false // ) = {}
https://github.com/peterw16/da_typst_vorlage
https://raw.githubusercontent.com/peterw16/da_typst_vorlage/main/main.typ
typst
#import "template/template.typ": * #show: diplomarbeit.with( title: "Hunting Shadows", aufgabenstellungen: ( // infos <NAME> ( schüler: "<NAME>", betreuer: "Prof. Dr.DI <NAME>, Prof. DI <NAME>, MBA", aufgabe: "Web-Development3, Frontend, Backend, Produktvideo", arbeitsaufteilung: [ Hier kann genauso content stehen wie sonst auch. Z.B. kann man listen machen: - Entweder bullet 1. Oder numerierte + Wie z.b. hier ] ), // infos <NAME> ( schüler: "<NAME>", betreuer: "Prof. DI <NAME>, MBA", aufgabe: "Musikproduktion, Soundeffekte", arbeitsaufteilung: [ === Es sind auch headings möglich #lorem(20) ] ), // infos <NAME> ( schüler: "<NAME>", betreuer: "Prof. Dr.DI <NAME>", aufgabe: "Web-Development, Frontend, Backend, Produktvideo", arbeitsaufteilung: [ Hier kann genauso content stehen wie sonst auch. Z.B. kann man listen machen: - Entweder bullet 1. Oder numerierte + Wie z.b. hier ] ) ), kurzfassung: [ Wie oben erwähnt, führt eine genauere, wissenschaftliche Betrachtung zu komplexeren Definitions- und Beschreibungsversuchen. Die Eigenschaft des „Text-Seins“ bezeichnet man als Textualität, die sprachwissenschaftliche Untersuchung von Texten ist die Textlinguistik. Diese Disziplin stellt verschiedene Textualitätskriterien zur Verfügung. <NAME> und Wolfgang <NAME> stellten 1981 eine Reihe solcher Kriterien vor. Diese Kriterien beziehen sich einerseits auf die Merkmale des Textes selbst (Kohäsion, also formaler Zusammenhalt und Kohärenz, also inhaltlicher Zusammenhalt), andererseits auf die Merkmale einer Kommunikations­situation, aus der der betreffende Text entsteht bzw. in der er eingesetzt wird (Intentionalität, Akzeptabilität, Informativität, Situationalität). Kohäsion und Kohärenz gehören zu den am weitesten akzeptierten Textualitätskriterien, aber auch hier gibt es Abweichungen: Es gibt durchaus Texte, welche aus zusammenhanglosen Worten oder gar Lauten, zum Teil auch aus bis zu bloßen Geräuschen reduzierten Klangmalereien bestehen, und die, im Ganzen dennoch vielschichtig interpretierbar, eine eigene Art von Textualität erreichen (zum Beispiel Dada-Gedichte). Hier kommen die situationsbezogenen Textualitätskriterien ins Spiel: Texte sind auch dadurch bestimmt, dass ein Sender sie mit einer bestimmten Absicht (Intention) produziert und/oder ein Empfänger sie als solche akzeptiert. Ob ein Text für einen bestimmten Empfänger akzeptabel ist, hängt wiederum stark davon ab, ob dieser einen Zusammenhang der empfangenen Äußerung mit seiner Situation herstellen, den Text also in seine Vorstellungswelt „einbauen“ kann (Situationalität), und ob der Text für ihn informativ ist, also in einem bestimmten Verhältnis erwartete und unerwartete, bekannte und neue Elemente enthält. Um auf das Beispiel des Dada-Gedichtes zurückzukommen: Ein nicht offensichtlich kohäsiver oder kohärenter Text kann als solcher akzeptabel sein, wenn der Empfänger davon ausgeht, dass die Intention des Senders ein hohes Maß an überraschenden oder von der Norm abweichenden Elementen im Text erfordert. ], abstract: [ #lorem(300) ] ) // ---------------- Hauptdokument ------------------ = Einleitung #lorem(200) = Code Snippets ```java public class QuotientRemainder { public static void main(String[] args) { int dividend = 25, divisor = 4; int quotient = dividend / divisor; int remainder = dividend % divisor; System.out.println("Quotient = " + quotient); System.out.println("Remainder = " + remainder); } } ``` = Abbildungen == New one #figure( image("./images/Bild_1.JPG", width: 80%), caption: [Tiefpassfilter 1. Ordnung], supplement: [Abb.] ) == Better one Hellow #figure( image("./images/Bild_1.JPG", width: 80%), caption: [ Tiefpassfilter 2. Ordnung ], supplement: [Abb.] ) === Third one #figure( image("./images/Bild_1.JPG", width: 80%), caption: [ Tiefpassfilter 3. Ordnung ], supplement: [Abb.] ) = Tabellenansichten == Tabelle neu #figure( table( inset: 10pt, columns: 4, [t], [1], [2], [3], [y], [0.3s], [0.4s], [0.8s], ), caption: [Zeit Resultate], supplement: [Tabelle] ) == Tabelle neu_2 #figure( table( inset: 20pt, columns: 4, [t], [1], [2], [3], [y], [0.3s], [0.4s], [0.8s], ), caption: [Zeit Resultate 2], supplement: [Tabelle] ) @CACAO Some other website @WinNT states that ....
https://github.com/storopoli/Bayesian-Statistics
https://raw.githubusercontent.com/storopoli/Bayesian-Statistics/main/slides/backup_slides.typ
typst
Creative Commons Attribution Share Alike 4.0 International
#import "@preview/polylux:0.3.1": * #import themes.clean: * #import "utils.typ": * #new-section-slide("Backup Slides") #slide(title: [How the Normal distribution arose #footnote[Origins can be traced back to Abraham de Moivre in 1738. A better explanation can be found by #link( "http://www.stat.yale.edu/~pollard/Courses/241.fall2014/notes2014/Bin.Normal.pdf", )[clicking here].]])[ #text(size: 16pt)[ $ "Binomial"(n, k) &= binom(n, k) p^k (1-p)^(n-k) \ n! &≈ sqrt(2 π n) (n / e)^n \ lim_(n → oo) binom(n, k) p^k (1-p)^(n-k) &= 1 / (sqrt(2 π n p q)) e^(-((k - n p)^2) / (2 n p q)) $ We know that in the binomial: $op("E") = n p$ and $op("Var") = n p q$; hence replacing $op("E")$ by $μ$ and $op("Var")$ by $σ^2$: $ lim_(n → oo) binom(n, k) p^k (1-p)^(n-k) = 1 / (σ sqrt(2 π)) e^(-(( k - μ )^2) / (σ^2)) $ ] ] #slide(title: [QR Decomposition])[ #text(size: 13pt)[ In Linear Algebra 101, we learn that any matrix (even non-square ones) can be decomposed into a product of two matrices: - $bold(Q)$: an orthogonal matrix (its columns are orthogonal unit vectors, i.e. $bold(Q)^T = bold(Q)^(-1)$) - $bold(R)$: an upper-triangular matrix Now, we incorporate the QR decomposition into the linear regression model. Here, I am going to use the "thin" QR instead of the "fat", which scales $bold(Q)$ and $bold(R)$ matrices by a factor of $sqrt(n - 1)$ where $n$ is the number of rows in $bold(X)$. In practice, it is better to implement the thin QR, than the fat QR decomposition. It is more numerical stable. Mathematically speaking, the thing QR decomposition is: $ bold(X) &= bold(Q)^* bold(R)^* \ bold(Q)^* &= bold(Q) dot sqrt(n - 1) \ bold(R)^* &= 1 / (sqrt(n - 1)) dot bold(R) \ bold(μ) &= α + bold(X) dot bold(β) + σ \ &= α + bold(Q)^* dot bold(R)^* dot bold(β) + σ \ &= α + bold(Q)^* dot (bold(R)^* dot bold(β)) + σ \ &= α + bold(Q)^* dot tilde(bold(β)) + σ $ ] ]
https://github.com/frectonz/the-pg-book
https://raw.githubusercontent.com/frectonz/the-pg-book/main/book/148.%20hw.html.typ
typst
hw.html The Hardware Renaissance Want to start a startup? Get funded by Y Combinator. October 2012One advantage of Y Combinator's early, broad focus is that we see trends before most other people. And one of the most conspicuous trends in the last batch was the large number of hardware startups. Out of 84 companies, 7 were making hardware. On the whole they've done better than the companies that weren't.They've faced resistance from investors of course. Investors have a deep-seated bias against hardware. But investors' opinions are a trailing indicator. The best founders are better at seeing the future than the best investors, because the best founders are making it.There is no one single force driving this trend. Hardware does well on crowdfunding sites. The spread of tablets makes it possible to build new things controlled by and even incorporating them. Electric motors have improved. Wireless connectivity of various types can now be taken for granted. It's getting more straightforward to get things manufactured. Arduinos, 3D printing, laser cutters, and more accessible CNC milling are making hardware easier to prototype. Retailers are less of a bottleneck as customers increasingly buy online.One question I can answer is why hardware is suddenly cool. It always was cool. Physical things are great. They just haven't been as great a way to start a rapidly growing business as software. But that rule may not be permanent. It's not even that old; it only dates from about 1990. Maybe the advantage of software will turn out to have been temporary. Hackers love to build hardware, and customers love to buy it. So if the ease of shipping hardware even approached the ease of shipping software, we'd see a lot more hardware startups.It wouldn't be the first time something was a bad idea till it wasn't. And it wouldn't be the first time investors learned that lesson from founders.So if you want to work on hardware, don't be deterred from doing it because you worry investors will discriminate against you. And in particular, don't be deterred from applying to Y Combinator with a hardware idea, because we're especially interested in hardware startups.We know there's room for the next Steve Jobs. But there's almost certainly also room for the first <Your Name Here>. Thanks to <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, and <NAME> for reading drafts of this.A Hardware Renaissance while �Software Eats the World�?
https://github.com/boladouro/ME
https://raw.githubusercontent.com/boladouro/ME/main/2/relatorio/relatorio.typ
typst
// Falta o cabeçalho #import "template.typ": * #show: project #v(20pt) #align(center, text(17pt)[ *Passeio Aleatório: Comentário Curto* ]) #grid( columns: (1fr, 1fr), align(center)[ <NAME> \ 105289, CDC2 \ #link("mailto:<EMAIL>") ], align(center)[ Dr. <NAME> \ Artos Institute \ #link("mailto:<EMAIL>") ] ) #v(15pt) O algoritmo de Passeio Aleatório (PA) é um método de MCCM de classe de algoritmos _Metropolis-Hastings_, onde o próximo valor na cadeia $X_t = X_(t-1) + epsilon_t$, tendo $e_t$ uma distribuição simétrica; e.g. $X_(t+1) tilde cal(U)(X_t - lambda, X_t + lambda)$ ou $X_(t+1) tilde cal(N)(X_t, sigma^2)$. #footnote[<NAME>., & <NAME>. (2010). Introducing Monte Carlo Methods with R. Em _Springer eBooks_. https://doi.org/10.1007/978-1-4419-1576-4] O PA consiste no seguinte: 1. Escolher $x_0$ de $D(f(x)), f(x) prop P(x)$, 2. Escolher uma distribuição candidata $G$ com $D(g(x_t | x_(t-1))) = D(f(x))$. \ 3. Gerar um $x^*_t tilde G$. 4. Gerar $u tilde cal(U)(0,1)$ (Monte Carlo). 5. Calcular $alpha = f(x^*_t)/f(x_(t-1)) g(x_(t-1)|x^*_t)/g(x^*_t|x_(t-1))$.\ // = (f(x^*_t)\/g(x^*_t|x_(t-1)))/(f(x_(t-1))\/g(x_(t-1)|x^*_t)) Como a distribuição candidata é simétrica, $g(x_(t-1)|x^*_t)/g(x^*_t|x_(t-1)) = 1 => alpha = f(x^*_t)/f(x_(t-1))$. 6. Se $alpha > u$, então $x_(t) = x^*_t$ \ Se não, $x_(t) = x_(t-1)$ 7. $t$ é incrementado, e o algoritmo repete a partir de 3. Como isto é uma CM, há uma convergência para a distribuição $f(x)$. //TODO ver se e preciso tirar Podemos observar que embora $G$ não terá influência em $alpha$, terá influência na velocidade de convergência e na autocorrelação dos pontos. Isto está refletido na Figura 1. Ela apresenta evolução de várias cadeias geradas com o PA com uma $chi^2_2$ como distribuição objetivo, usando uma $cal(N)(0, sigma^2)$ como distribuição candidata, sendo a principal diferença entre as cadeias o $sigma$ escolhido. Nas cadeias _rw.1_ e _rw.2_, podemos obersvar que embora os pontos sejam quase todos aceites, elas não se aproximam a $chi^2_2$, principalmente em _rw.1_ que nem parece convergir. Isto é porque $sigma$ é um valor demasiado baixo, tornando todos os valores de $alpha$ demasiado altos. A cadeia _rw.4_ parece observar-se o contrário, onde embora a cadeia se aproxima ao alvo, demasiados pontos são rejeitados devido ao número elevado de baixos $alpha$, devido a $sigma = 16$. Finalmente, _rw.3_ parece um bom compromisso, levando a uma aproximação à distribuição alvo que raramente rejeita pontos.
https://github.com/jneug/typst-mantys
https://raw.githubusercontent.com/jneug/typst-mantys/main/src/mantys.typ
typst
MIT License
#import "@preview/hydra:0.4.0": hydra // Import main library functions #import "./mty.typ" // Import t4t functions #import "./mty.typ": is-none, is-auto, is, def // Import main user api #import "api.typ" #import "./api.typ": * #import "./theme.typ" // Import tidy theme #import "./mty-tidy.typ" /// Generate the default titlepage for the manual. /// /// - name (string): Name for the package. /// - title (string, content): The title for the manual (may differ from #arg[name]). /// - subtitle (string, content): A subtitle shown below the title. /// - description (string, content): A short description for the package (like the on ein `typst.toml`). /// - authors (string, array): Authors for the package. /// - urls (string, array): urls /// - version (string, array): /// - date (datetime): /// - abstract (string, content): /// - license (string, content): /// - toc (boolean): /// -> content #let titlepage( name, title, subtitle, description, authors, urls, version, date, abstract, license, toc: true ) = [ #set align(center) #set block(spacing: 2em) #block(text(fill:theme.colors.primary, size:2.5em, mty.def.if-none(name, title) )) #if is.not-none(subtitle) { block(above:1em)[ #set text(size:1.2em) #subtitle ] } #if (version, date, license).any((v) => v != none) { block({ set text(size:1.2em) ( if is.not-none(version) [ v#version ], if is.not-none(version) { mty.date(date) }, if is.not-none(version) { license } ).join(h(4em)) }) } #if is.not-none(description) { block(description) } #block( def.as-arr(authors).map(mty.author).join( linebreak() ) ) #if is.not-none(urls) { block(def.as-arr(urls).map(link).join(linebreak())) } #if is.not-none(abstract) { block(width:75%)[ #set align(left) //#set par(first-line-indent: .65em, hanging-indent: 0pt) #set par(justify: true) #show par: set block(spacing: 1.3em) #abstract ] } #if toc [ #set align(left) #set block(spacing: 0.65em) #show outline.entry.where(level: 1): it => { v(0.85em, weak:true) strong(link(it.element.location(), it.body)) } #text(size:1.4em, [*Table of contents*]) #columns(2, outline( title: none, indent: auto )) ] #pagebreak() ] /// Main entrypoint for Mantys to use in a global show-rule. /// #let mantys( // Package info name: none, description: none, authors: (), repository: none, version: none, license: none, package: none, // loaded toml file // Additional info title: none, subtitle: none, url: none, date: none, abstract: [], titlepage: titlepage, index: auto, examples-scope: (:), ..args, body ) = { mty.assert.that( is.not-none(name) or is.not-none(package), message:"You need to specifiy the package name or load the package info via ..toml(\"typst.toml\")." ) if is-none(name) { ( name, description, authors, repository, version, license ) = ( "name", "description", "authors", "repository", "version", "license").map( (k) => package.at(k, default:none) ) } set document( title: mty.get.text( mty.def.if-none(name, title) ), author: def.as-arr(mty.def.if-none(authors, "")).map((a) => if is.dict(a) { a.name } else { a }).first() ) set page( ..theme.page, header: context { let section = context hydra(2, display: (_, it) => { numbering("1.1", ..counter(heading).at(it.location())) [ ] it.body }) align(center, emph(section)) }, footer: align(center, counter(page).display("1")) ) set text( font: theme.fonts.text, size: theme.font-sizes.text, lang: "en", region: "EN", fill: theme.colors.text ) set par( justify:true, ) set heading(numbering: "I.1.") show heading: it => block([ #v(0.3em) #text(fill:theme.colors.primary, counter(heading).display()) #it.body #v(0.8em) ]) show heading.where(level: 1): it => { pagebreak(weak: true) block([ #text(fill:theme.colors.primary, [Part #counter(heading).display()])\ #it.body #v(1em) ]) } show heading: it => { set text( font:theme.fonts.headings, size://calc.max(theme.font.sizes.text, theme.font-sizes.headings * ( it.level)) mty.math.map(4, 1, theme.font-sizes.text, theme.font-sizes.headings * 1.4, it.level) ) it } // TODO: This would be a nice short way to set examples, but will // have weird formatting due to raw text having set the default // font and size before the show rule takes effect. // show raw.where(block:true, lang:"example"): it => mty.code-example(imports:example-imports, it) // show raw.where(block:true, lang:"side-by-side"): it => mty.code-example(side-by-side:true, imports:example-imports, it) show raw: set text(font:theme.fonts.code, size:theme.font-sizes.code) state("@mty-imports-scope").update(examples-scope) // Some common replacements show upper(name): mty.package(name) show "Mantys": mty.package // show "Typst": it => text(font: "Liberation Sans", weight: "semibold", fill: eastern)[typst] // smallcaps(strong(it)) show figure.where(kind: raw): set block(breakable: true) titlepage(name, title, subtitle, description, authors, (url,repository).filter(is.not-none), version, date, abstract, license) body if index != none and index != () and index != (:) { [= Index] set text(.88em) if type(index) == "array" or type(index) == "string" { mty.make-index(kind:(index,).flatten()) } else if type(index) == "dictionary" { for (header, kind) in index { [== #header] mty.make-index(kind:(kind,).flatten()) } } else { mty.make-index() } } } #let tidyref(module, name) = { link(cmd-label(name, module:module), cmd-(name, module:module)) } /// Show a module with #TIDY. /// Wrapper for #cmd-[tidy.show-module]. #let tidy-module(data, ..args, include-examples-scope: false, extract-headings: 2, tidy: none ) = { mty.assert.not-none(args.named().at("name", default:none), message: "you have to provide a name for the tidy module, got \"none\"") let _tidy = tidy if is-none(_tidy) { import("@preview/tidy:0.2.0") _tidy = tidy } state("@mty-imports-scope").display( (imports) => { let scope = ("tidyref": tidyref) + api.__all__ + args.named().at("scope", default:(:)) if include-examples-scope { scope += imports } let module-doc = _tidy.parse-module( data, ..mty.get.args(args)("name"), scope: scope ) _tidy.show-module( module-doc, ..mty.get.args(args)( style: ( get-type-color: mty-tidy.get-type-color, show-outline: mty-tidy.show-outline, show-parameter-list: mty-tidy.show-parameter-list, show-parameter-block: mty-tidy.show-parameter-block, show-function: mty-tidy.show-function.with(tidy: _tidy, extract-headings: extract-headings), show-variable: mty-tidy.show-variable.with(tidy: tidy), show-example: mty-tidy.show-example, show-reference: mty-tidy.show-reference ), first-heading-level: 2, show-module-name: false, sort-functions: false, show-outline: true ) ) } ) }
https://github.com/ClazyChen/Table-Tennis-Rankings
https://raw.githubusercontent.com/ClazyChen/Table-Tennis-Rankings/main/history/2015/MS-11.typ
typst
#set text(font: ("Courier New", "NSimSun")) #figure( caption: "Men's Singles (1 - 32)", table( columns: 4, [Ranking], [Player], [Country/Region], [Rating], [1], [<NAME>], [CHN], [3625], [2], [<NAME>], [CHN], [3404], [3], [XU Xin], [CHN], [3345], [4], [OVTCHAROV Dimitrij], [GER], [3233], [5], [<NAME>], [CHN], [3197], [6], [FANG Bo], [CHN], [3154], [7], [#text(gray, "WANG Hao")], [CHN], [3147], [8], [YAN An], [CHN], [3096], [9], [MIZUTANI Jun], [JPN], [3094], [10], [CHUANG Chih-Yuan], [TPE], [3051], [11], [<NAME>], [AUT], [3045], [12], [WONG Chun Ting], [HKG], [3003], [13], [JOO Saehyuk], [KOR], [2996], [14], [BOLL Timo], [GER], [2975], [15], [YOSHIMURA Maharu], [JPN], [2973], [16], [JANG Woojin], [KOR], [2970], [17], [<NAME>], [POR], [2961], [18], [<NAME>], [CRO], [2957], [19], [JEOUNG Youngsik], [KOR], [2949], [20], [<NAME>], [BLR], [2945], [21], [YU Ziyang], [CHN], [2932], [22], [ZHOU Yu], [CHN], [2922], [23], [WANG Yang], [SVK], [2914], [24], [<NAME>], [SWE], [2907], [25], [SHIBAEV Alexander], [RUS], [2898], [26], [NIWA Koki], [JPN], [2890], [27], [TANG Peng], [HKG], [2888], [28], [LIANG Jingkun], [CHN], [2888], [29], [OSHIMA Yuya], [JPN], [2877], [30], [LEE Sang Su], [KOR], [2865], [31], [GERELL Par], [SWE], [2863], [32], [<NAME>], [AUT], [2854], ) )#pagebreak() #set text(font: ("Courier New", "NSimSun")) #figure( caption: "Men's Singles (33 - 64)", table( columns: 4, [Ranking], [Player], [Country/Region], [Rating], [33], [GIONIS Panagiotis], [GRE], [2852], [34], [GAO Ning], [SGP], [2849], [35], [XU Chenhao], [CHN], [2844], [36], [GAUZY Simon], [FRA], [2834], [37], [SHIONO Masato], [JPN], [2832], [38], [CHEN Weixing], [AUT], [2832], [39], [YOSHIDA Kaii], [JPN], [2829], [40], [MONTEIRO Joao], [POR], [2826], [41], [<NAME>], [GER], [2824], [42], [<NAME>], [GER], [2822], [43], [<NAME>], [TPE], [2820], [44], [<NAME>], [DEN], [2808], [45], [<NAME>], [KOR], [2800], [46], [<NAME>], [POL], [2798], [47], [<NAME>], [FRA], [2792], [48], [<NAME>], [FRA], [2791], [49], [<NAME>], [JPN], [2789], [50], [<NAME>], [JPN], [2789], [51], [<NAME>], [BRA], [2788], [52], [PITCHFORD Liam], [ENG], [2788], [53], [<NAME>], [KOR], [2787], [54], [<NAME>], [SGP], [2781], [55], [<NAME>], [CHN], [2774], [56], [#text(gray, "<NAME>")], [CHN], [2763], [57], [<NAME>], [ESP], [2758], [58], [<NAME>], [EGY], [2755], [59], [<NAME>], [GER], [2751], [60], [<NAME>], [SGP], [2750], [61], [<NAME>], [NGR], [2745], [62], [MURAMATSU Yuto], [JPN], [2744], [63], [<NAME>], [BRA], [2743], [64], [<NAME>], [ENG], [2742], ) )#pagebreak() #set text(font: ("Courier New", "NSimSun")) #figure( caption: "Men's Singles (65 - 96)", table( columns: 4, [Ranking], [Player], [Country/Region], [Rating], [65], [LI Ping], [QAT], [2741], [66], [APOLONIA Tiago], [POR], [2738], [67], [HO Kwan Kit], [HKG], [2736], [68], [KOU Lei], [UKR], [2735], [69], [ZHOU Kai], [CHN], [2733], [70], [PAK Sin Hyok], [PRK], [2724], [71], [<NAME>], [CHN], [2722], [72], [ZHOU Qihao], [CHN], [2722], [73], [<NAME>], [KOR], [2722], [74], [JIANG Tianyi], [HKG], [2722], [75], [KONECNY Tomas], [CZE], [2718], [76], [<NAME>], [JPN], [2717], [77], [<NAME>], [SRB], [2712], [78], [<NAME>], [TUR], [2709], [79], [<NAME>], [AUT], [2705], [80], [<NAME>], [SWE], [2704], [81], [TOKIC Bojan], [SLO], [2698], [82], [KIM Minseok], [KOR], [2697], [83], [WANG Eugene], [CAN], [2694], [84], [CHEN Chien-An], [TPE], [2689], [85], [<NAME>], [SVK], [2684], [86], [<NAME>], [CZE], [2684], [87], [<NAME>], [JPN], [2683], [88], [<NAME>], [GER], [2682], [89], [<NAME>], [SWE], [2682], [90], [<NAME>], [JPN], [2682], [91], [<NAME>], [CZE], [2681], [92], [<NAME>], [KOR], [2679], [93], [<NAME>], [POR], [2677], [94], [<NAME>], [SWE], [2676], [95], [<NAME>], [GER], [2673], [96], [<NAME>], [POL], [2667], ) )#pagebreak() #set text(font: ("Courier New", "NSimSun")) #figure( caption: "Men's Singles (97 - 128)", table( columns: 4, [Ranking], [Player], [Country/Region], [Rating], [97], [#text(gray, "KIM Hy<NAME>ong")], [PRK], [2664], [98], [<NAME>], [FRA], [2663], [99], [<NAME>], [HUN], [2658], [100], [<NAME>], [KOR], [2657], [101], [<NAME>-Ting], [TPE], [2656], [102], [<NAME>], [RUS], [2656], [103], [<NAME>], [GER], [2655], [104], [<NAME>], [JPN], [2654], [105], [#text(gray, "<NAME>")], [SWE], [2652], [106], [<NAME>], [FRA], [2652], [107], [KIM Minhyeok], [KOR], [2646], [108], [#text(gray, "CHAN Kazuhiro")], [JPN], [2645], [109], [<NAME>], [IND], [2644], [110], [<NAME>], [BEL], [2643], [111], [<NAME>], [IRI], [2641], [112], [<NAME>], [ALG], [2640], [113], [<NAME>], [ROU], [2639], [114], [<NAME>], [DEN], [2638], [115], [<NAME>], [AUT], [2637], [116], [<NAME>], [GER], [2637], [117], [MONTEIRO Thiago], [BRA], [2634], [118], [VLASOV Grigory], [RUS], [2634], [119], [XUE Fei], [CHN], [2631], [120], [SEO Hyundeok], [KOR], [2630], [121], [SAKAI Asuka], [JPN], [2629], [122], [DYJAS Jakub], [POL], [2625], [123], [MAZE Michael], [DEN], [2622], [124], [OIKAWA Mizuki], [JPN], [2618], [125], [#text(gray, "OYA Hidetoshi")], [JPN], [2616], [126], [TAN Ruiwu], [CRO], [2616], [127], [CHO Eonrae], [KOR], [2613], [128], [#text(gray, "WU Zhikang")], [SGP], [2611], ) )
https://github.com/stuxf/basic-typst-resume-template
https://raw.githubusercontent.com/stuxf/basic-typst-resume-template/main/src/resume.typ
typst
The Unlicense
#let resume( author: "", pronouns: "", location: "", email: "", github: "", linkedin: "", phone: "", personal-site: "", accent-color: "#000000", font: "New Computer Modern", body, ) = { // Sets document metadata set document(author: author, title: author) // Document-wide formatting, including font and margins set text( // LaTeX style font font: font, size: 10pt, lang: "en", // Disable ligatures so ATS systems do not get confused when parsing fonts. ligatures: false ) // Reccomended to have 0.5in margin on all sides set page( margin: (0.5in), "us-letter", ) // Link styles show link: underline // Small caps for section titles show heading.where(level: 2): it => [ #pad(top: 0pt, bottom: -10pt, [#smallcaps(it.body)]) #line(length: 100%, stroke: 1pt) ] // Accent Color Styling show heading: set text( fill: rgb(accent-color), ) show link: set text( fill: rgb(accent-color), ) // Name will be aligned left, bold and big show heading.where(level: 1): it => [ #set align(left) #set text( weight: 700, size: 20pt, ) #it.body ] // Level 1 Heading [= #(author)] // Personal Info pad( top: 0.25em, align(left)[ #( ( if pronouns != "" { pronouns }, if phone != "" { phone }, if location != "" { location }, if email != "" { link("mailto:" + email)[#email] }, if github != "" { link("https://" + github)[#github] }, if linkedin != "" { link("https://" + linkedin)[#linkedin] }, if personal-site != "" { link("https://" + personal-site)[#personal-site] }, ).filter(x => x != none).join(" | ") ) ], ) // Main body. set par(justify: true) body } // Generic two by two component for resume #let generic-two-by-two( top-left: "", top-right: "", bottom-left: "", bottom-right: "", ) = { pad[ #top-left #h(1fr) #top-right \ #bottom-left #h(1fr) #bottom-right ] } // Generic one by two component for resume #let generic-one-by-two( left: "", right: "", ) = { pad[ #left #h(1fr) #right ] } // Cannot just use normal --- ligature becuase ligatures are disabled for good reasons #let dates-helper( start-date: "", end-date: "", ) = { start-date + " " + $dash.em$ + " " + end-date } // Section components below #let edu( institution: "", dates: "", degree: "", gpa: "", location: "", ) = { generic-two-by-two( top-left: strong(institution), top-right: location, bottom-left: emph(degree), bottom-right: emph(dates), ) } #let work( title: "", dates: "", company: "", location: "", ) = { generic-two-by-two( top-left: strong(title), top-right: dates, bottom-left: company, bottom-right: emph(location), ) } #let project( role: "", name: "", url: "", dates: "", ) = { pad[ *#role*, #name (#link("https://" + url)[#url]) #h(1fr) #dates ] } #let certificates( name: "", issuer: "", url: "", date: "", ) = { pad[ *#name*, #issuer (#link("https://" + url)[#url]) #h(1fr) #date ] } #let extracurriculars( activity: "", dates: "", ) = { generic-one-by-two( left: strong(activity), right: dates, ) }
https://github.com/kadykov/tagsnuage
https://raw.githubusercontent.com/kadykov/tagsnuage/main/README.md
markdown
MIT License
# tagsnuage Tag cloud for typst
https://github.com/typst/packages
https://raw.githubusercontent.com/typst/packages/main/packages/preview/modern-russian-dissertation/0.0.1/template/parts/intro.typ
typst
Apache License 2.0
#import "@preview/modern-russian-dissertation:0.0.1": * #set heading(numbering: none) = Введение <intro> // Название и ссылка на него *Актуальность* Обзор, введение в тему, место в мировой науке. Данные для диссертации и автореферата берутся из файла `common/data.typ`. *Целью* данной работы является ... Для достижения цели необходимо было решить следующие *задачи*: + Исследовать, разработать, вычислить ... + Исследовать, разработать, вычислить ... + Исследовать, разработать, вычислить ... + Исследовать, разработать, вычислить ... *Научная новизна* исследования состоит в: + Впервые ... + Впервые ... + Было выполнено оригинальное исследование ... *Практическая значимость* *Методы* *Основные положения, выносимые на защиту* + Положение ... + Положение ... + Положение ... + Положение ... *Достоверность* полученных результатов обеспечивается ... Результаты находятся в соответствии с результатами, полученными другими авторами. *Апробация работы.* Основные результаты работы докладывались на: ... *Личный вклад.* Все результаты исследований были получены автором лично. *Публикации.* Основные результаты по теме исследования изложены в ... печатных изданиях, ... из которых в журналах ВАК. // здесь нужно дополнить автоматически создаваемым списком публикаций автора. *Объем и структура работы*. Диссертация состоит из введения, #total_part глав, заключения и #total_appendix приложений. Полный объем диссертации составляет #total_page страниц, включая #total_fig рисунков, #total_table таблиц. Список литературы содержит #total_bib наименований.
https://github.com/kpindur/rinko.typst
https://raw.githubusercontent.com/kpindur/rinko.typst/main/rinko.typ
typst
MIT License
#let maketitle( title: [Default Title], title_fontsize: 17pt, corners: () ) = { let top-left = corners.at(0) let top-right = corners.at(1) let bot-left = corners.at(2) let bot-right = corners.at(3) rect()[ #align( left + horizon, [ #top-left #h(1fr) #top-right] ) #set align(center) #text(title_fontsize, title) #align( left + horizon, [ #bot-left #h(1fr) #bot-right ] ) ] } #set heading(numbering: "1.1.1)") #let abstract( abstract: [], keywords: () ) = { par(justify: false)[ *Abstract* \ #abstract ] } #let conf( body ) = { maketitle(title: [Rinko paper], title_fontsize: 17pt, corners: ("test1", "test2", "test3", "test4")) columns(2, [#body]) }
https://github.com/Kasci/LiturgicalBooks
https://raw.githubusercontent.com/Kasci/LiturgicalBooks/master/CSL_old/oktoich/Hlas6/6_Sobota.typ
typst
#let V = ( "HV": ( ("","Vsjú otložívše","Christóvych strastéj po stopám choďá vsé múčeničeskoje soslóvije, krípko zájde k podvihóm mnóhim, i tohó pred nečestívymi mučíteli, i bezzakónnymi carí Bóha propovídaša, i mnóhi múki preterpíša, póčesti čájušče nebésnyja vosprijáti. íchže nýňi víďašče rádujutsja, i so vsími líki bezplótnych síl Hóspodevi predstoját."), ("","","Stádo Bohoizbránnoje, Christá pérvaho pástyrja podóbnicy býste pástyrije vsesvjaščénniji: sochraníste nevrédno do koncá, blahočéstija božéstvennaja sokróvišča, othnávše dívija vólki: tóže vo ohrádu nebésnuju dóbri vozvedóste. iďíže úbo nýňi vodvorjájemi, pominájte ľubóviju vás voschvaľájuščich, i Christú so derznovénijem molítesja o dušách nášich."), ("","","Prepodóbno požívše otcý prepodóbniji vsí, bísy pobidíste, i sóvistnaja mučénija strastéj uhasívše, razžžénija dóblestvenňi preterpíste blažénniji, i rádujetesja nýňi s nebésnymi sílami: jáko upodóbistesja žitijú v plóti ťích bezplótnych. S nímiže molíte Christá preblaháho Bóha, izbavlénije obristí padénij, vás počitájuščym."), ("Múčeničen","Vsjú otložívše","Múčenicy tvoí Hóspodi, ne otverhóšasja tebé, ni otstupíša ot zápovidej tvojích. Ťích molítvami pomíluj nás."), ("Múčeničen","","Múčenicy tvoí Hóspodi, ne otverhóšasja tebé, ni otstupíša ot zápovidej tvojích. Ťích molítvami pomíluj nás."), ("","","Strástotérpcy múčenicy, nebésniji hráždane, na zemlí postradávše, mnóhija múki terpíša. molítvami ích Hóspodi, i molénijem vsích nás sochraní."), ("Bohoródičen","","Któ tebé ne ublažít presvjatája Ďívo? Któ li ne vospojét tvojehó prečístaho roždestvá? Bezľítno bo ot Otcá vozsijávyj Sýn jedinoródnyj, tójže ot tebé čístyja prójde, neizrečénno voplóščsja: jestestvóm Bóh sýj, i jestestvóm býv čelovík nás rádi, ne vo dvojú licú razďiľájemyj, no vo dvojú jestestvú neslítno poznavájemyj. Tohó molí čístaja vseblažénnaja, pomílovatisja dušám nášym."), ), "S": ( ("","","Stradávšiji tebé rádi Christé, mnóhija múki preterpíša, i soveršénnyja vincý prijáša na nebesích, da móľatsja o dušách nášich."), ("","","Krest tvój Hóspodi, múčenikom býsť orúžije nepobidímoje: víďachu bo predležáščuju smérť, i predzrjášče búduščuju žízň, upovánijem jéže na ťá ukripľáchusja: ťích molítvami pomíluj nás."), ("Mértven","","Načátok mí i sostáv ziždíteľnoje tvojé býsť poveľínije: voschoťív bo ot nevídimaho i vídimaho jestestvá, žíva mjá sostáviti, ot zemlí úbo ťílo sozdáv, dál že mí jesí, dúšu, božéstvennym tvojím i životvorjáščim vdochnovénijem. Ťímže Spáse, rabý tvojá vo straňí živých, i v króvich právednych upokój."), ("Bohoródičen","","Molítvami róždšija ťá Christé, múčenik tvojích, i apóstol, i prorók, i svjatítelej, prepodóbnych, i právednych, i vsích svjatých, usópšyja rabý tvojá upokój."), ), ) #let P = ( "1": ( ("","","Pomóščnik i pokrovíteľ býsť mňí vo spasénije, séj mój Bóh, i proslávľu jehó, Bóh otcá mojehó, i voznesú jehó: slávno bo proslávisja."), ("","","Ne otríni blahája, ne omerzí mené, ne prézri mené pod tvojé milosérdije čístaja, tépľi pritékšaho: no dážď mí jéže v tebí napitátisja blahodátiju ."), ("","","Bohoródice blahája, skorbjáščich zastúpnice, prijimí mojé ot duší stenánije: i izbávi mjá ot vsích bezmírnych zól, jáže ľúťi soďíjach."), ("","","Tebí pripádaju blahája, skórbnych predstáteľnice: izbávi mjá ohňá víčnujuščaho, i ťmý i própasti, vo vsjákom žitijí zľí požívšaho."), ("","","Uvý mňí! káko ťá izbáviteľu umoľú Iisúse mój, bezmírno k tebí sohrišív? Próčeje chodátaicu tí prinošáju róždšuju ťá čístuju, pomíluj i spasí mja."), ), "3": ( ("","","Utverdí Hóspodi, na kámeni zápovidej tvojích podvíhšejesja sérdce mojé, jáko jedín svját jesí i Hospóď."), ("","","Pripádaju tí Máti Slóva, prijimí mja ščedrótami tvojími: prosjáščemu že prehrišénij proščénije podážď, téplymi molítvami tvojími."), ("","","Pomíluj mjá Vladýčice, pomíluj, i izbávi ot vsjákaho lukávstvija, i ozloblénija bisóv, i víčnaho mučénija."), ("","","Ukrotí Vladýčice, slastéj mojích hórkoje pijánstvo, trezvénije božéstvennoje mí podajúšči pokajánija, i obraščénije spasíteľnoje."), ("","","Vsjáčeskich Hóspoda i soderžíteľa, Bohorodíteľnice, neizhlahólanno róždši, umolí sehó, jéže spastí stádo tvojé."), ), "4": ( ("","","Uslýša prorók prišéstvije tvojé Hóspodi, i ubojásja, jáko chóščeši ot Ďívy rodítisja, i čelovíkom javítisja i hlahólaše: uslýšach slúch tvój, i ubojáchsja: sláva síľi tvojéj Hóspodi."), ("","","Jázvy duší mojejá ne prestajá češú ľuboslásťmi, i priložíšasja mňí strúpov boľízni, i prebyváju nečúvstven i neiscilím: pomíluj Bohorodíteľnice, i iscilí, i spasí mja molítvami tvojími."), ("","","Ťmá hrichóvnaja pokrý dúšu mojú Bohorodíteľnice, jáko v noščí síce choždú vo svíťi, ne vídyj Christóvy zápovidi. Svít róždšaja božéstvennyj, pomíluj mjá i prosvití, moľúsja."), ("","","Slóvo Bóha živáho sníde vo utróbu tvojú Máti Ďívo, i prijém ot tvojích krovéj prečístych vsé mojé smišénije, prichódit suhúb vo jedínoj ipostási, jehóže molí spastí dúšy náša."), ("","","Ťilésnaja choťínija priľížno preidóch, i slásti vsjá, i rastľín bých vés, i skvérnen i mérzok: prečístaja Bohorodíteľnice, pomíluj, i spasí mja milosérdijem tvojím."), ), "5": ( ("","","Ot nóšči útreňujušča, čelovikoľúbče prosvití, moľúsja, i nastávi i mené na poveľínija tvojá, i naučí mja Spáse, tvoríti vóľu tvojú."), ("","","Óhň hejénskij sebí razžehóch, ďíja nepodóbnaja, i hňív Bóžij ľúťi privlekóch: pomozí mi čístaja, i ne ostávi mené."), ("","","Prehrišénij ostavlénija prosjá prísno, ďíjati ne prestajú prebezzakónnaja, i tebé prečístaja, ohorčeváju: očiščénije vírnych, uščédri mjá."), ("","","Jehóže ot tvojích krovéj rodilá jesí čístaja, soveršénna čelovíka, i Bóha ístinna Iisúsa, umolí tohó izbávitisja nám ohňá víčnaho."), ("","","Dvére neprochodímaja, moľúsja, otvérzi mí dvéri pokajánija ístinnaho, i pokaží mi stezí pokajánija čístaja, jáže vsích nastávnica."), ), "6": ( ("","","Vozopích vsím sérdcem mojím k ščédromu Bóhu, i uslýša mjá ot áda preispódňaho, i vozvedé ot tlí živót mój."), ("","","Vólny nepodóbnych pomyšlénij pohružájut mjá nýňi: no tý Vladýčice, k tíchomu pristánišču nastávi pokajánija ístinnaho tvojím milosérdijem."), ("","","Nadéždu i sťínu neoborímuju, i predstáteľnicu tvérdu sťažávše ťá otrokovíce, izbavľájemsja prehrišénij i strastéj ľútych, i vsjákaho vréda."), ("","","Pripádaju tí čístaja Ďívo, i vopijú s pláčem, Bohoródice: izbávi dúšu mojú okajánnuju búduščaho sudá, i ohňá víčnaho."), ("","","Kríposť tý jesí prečístaja, nemoščných dušéju, tvojími moľbámi: ťímže mjá jáko boľášča dušéju ne prézri, no iscilí."), ), "S": ( ("","","Za milosérdije ščedrót Christé, sošél jesí na zémľu, i ot Ďívy voplóščsja, vsjá osvjatíl jesí, jáže ot zemlí, i k nebesí vsích prizvál jesí. Ťímže upovájušče na ťá, nikohdáže pohriším, no izbavľájemsja tobóju nastojánij: tý bo jesí Spás náš, sozdáteľu Bóže náš."), ), "7": ( ("","","Sohrišíchom, bezzakónnovachom, neprávdovachom pred tobóju: nižé sobľudóchom, nižé sotvoríchom, jákože zapovídal jesí nám: no ne predážď nás do koncá, otcév Bóže."), ("","","Jehdá dušá okajánnaja mojá ot ťilesé sterpíti chóščet razlučénije, i ne búdet izbavľájaj jú, ilí uťišájaj jú: tohdá Vladýčice predstáni, i izbávi mjá bisóv ozloblénija."), ("","","Pripádaju tí, i prinošú sléz téplyja kápli: vím tvojé čelovikoľúbnoje, vím dolhoterpínije i nezlóbije. Tý mja nýňi pomíluj čístaja, prostí i spasí mja."), ("","","Pomíluj Ďívo, strástnuju i okajánnuju mojú dúšu, vížď strastéj smuščénije, vížď i razhorínije plóti nepostojánnoje: i pómošč dážď mí spasíteľnuju, i izbavlénije."), ("","","Otcú jedinosúščnyj, sobeznačáľnyj Sýn i Slóvo, plóť ot tebé priját rávnu, úmnu, i oduševlénnu neprelóžno, jáko vísť sám: i jestestvó náše obnoví v néj lúčše, Ďívo čístaja."), ), "8": ( ("","","Jehóže vóinstva nebésnaja slávjat, i trepéščut Cheruvími i Serafími, vsjáko dychánije i tvár, pójte, blahoslovíte , i prevoznosíte vo vsjá víki."), ("","","Nedoumíju pomyšľája ďijánija mojá, i trepéšču Sudijí strášnaho sudíšča: kíj otvít okajánnyj prinesú tohdá: Vladýčice míra, búdi mí zastúpnica."), ("","","Ne otvérži úbo mené samá Vladýčice, ot licá tvojehó, jehdá k tvojemú vozzrjú óbrazu: no mílostiva búdi mí, i nastojáščaho preminí mja osuždénija."), ("","","Nevísto Bóžija, Maríje beznevístnaja, ot vsjákaho lukávaho vréda izbávi mjá, vopijú tí, tvojehó rabá: i v búduščej prí predstáni mí, jedína christiján predstáteľnice."), ("","","Da čelovíki Sýn tvój Vladýčice, obožít, javísja iz tebé soveršén čelovík: sehó úbo molí, soveršénno očíščšasja pokazáti pričástnika mjá božéstvennomu jehó cárstviju."), ), "9": ( ("","","Jéže rádujsja ot ánhela priímšaja, i róždšaja sozdáteľa tvojehó, Ďívo, spasí ťa veličájuščyja."), ("","","Tý jedína predstáteľnice čelovíkov jesí prečístaja, tý jesí sťiná christiján čístaja, ťá nýňi predlaháju ko Christú chodátaicu o mňí smirénnom, da tvojími molítvami pomílujet mjá okajánnaho."), ("","","Nóšči ďilá soďílach, i nóšč mučénija chóščet mjá nýňi pokrýti právedno sújetnaho, i vsjáko tomlénije prijáti ádovo: no róždšaja sudijú, i Bóha čístaja Ďívo, izbávi mjá vsjákaho mučénija."), ("","","Vrémja životá mojehó vo zlých izžích, i k dvérem áda priblížichsja, i vés ne hotóv idú támo: pomozí mi blahája. Bohoródice, na ťá bo nadéždu vozložích."), ("","","Blahoľubívaja Vladýčice, ánhelov ukrašénije, múčenikov slávo, s sími pomolísja obristí nám mílosť, i razrišénije dolhóv, i vozmoščí vsím dóbri žízni nášeja tečénije skončáti, božéstvennaja ďíjuščym."), ), ) #let U = ( "S1": ( ("","","Svít právednym vsehdá tý Hóspodi: svjatíji bo o tebí prosvitívšesja, sijájut prísno jáko svitíla, svitíľnik nečestívych uhasívše: íchže molítvami Spáse náš, tý prosvití svitíľnik mój, i spasí mja."), ("","","Stradáľčeskij pódvih preterpívše svjatíji, i póčesti pobídnyja ot tebé prijáša, uprazdníša pomyšlénija bezzakónnych, i prijáša vincý netľínnyja. Ťími Bóže umolén byvája, dáruj nám véliju mílosť."), ("Bohoródičen","","Íže blahoslovénnuju narekíj tvojú Máter, prišél jesí na strásť vóľnym choťínijem, vozsijáv na kresťí, vzyskáti choťá Adáma, hlahóľa ánhelom: srádujtesja mňí, jáko obrítesja pohíbšaja dráchma. Vsjá múdri ustróivyj Bóže náš, sláva tebí."), ), "S2": ( ("","","Stradáľčeskoje stojánije v pódvizi, i mučíteľskija rány na múčenicich: i stojáchu lícy bezplótnych, póčesti deržášče pobídnyja: udivíša múdriji mučítelej, i caréj premúdriji: nizložíša otstúpnika ispovídanijem Christóvym. Ukripívyj ích Hóspodi, sláva tebí."), ("","","Hóspodi, svjatých tvojích pámjať dnés pokazásja, jáko ráj, íže vo Jedémi, v néj bo rádujetsja vsjá tvár: i podajéši nám ťích moľbámi mír i véliju mílosť."), ("Mértven","","Voístinnu sujetá vsjáčeskaja, žitijé že síň i són: íbo vsúje mjatétsja vsják zemnoródnyj, jákože rečé pisánije: jehdá mír priobrjáščem, tohdá vo hrób vselímsja, iďíže vkúpi cárije i ubóziji. Ťímže Christé Bóže, prestávlennyja upokój: jáko čelovikoľúbec."), ("Bohoródičen","","Ot sérdca vozdychánija i ot utróby prinošú ti, tvojé vseneporóčnaja, moľú blahopreminíteľnoje zastuplénije: pomíluj vsestrástnuju mojú dúšu, umolí mnohomílostivaho Bóha izbáviti mjá sudá, i jézera óhnennaho, jedína blahoslovénnaja."), ), "K": ( "P1": ( "1": ( ("","","Čúvstvennyj faraón potoplén býsť so vsevóinstvom, Izrájiľ že prošéd posreďí mórja, vopijáše: Hóspodevi Bóhu nášemu poím, jáko proslávisja."), ("","","Svítlym umóm témnyja osvitívše, zločestívyja že mučíteli múčenicy posramívše, pobidonóscy býša jávi, i k nevečérnemu svítu preidóša."), ("","","Svjatítelije Christóvy, i prepodóbnych lík, i prorók, i právednych vsích jedínstvennoje toržestvó, dobroďítelnymi krasotámi blistájuščesja, vnidóša k nebésnym selénijem."), ("","","Žén vsjáko mnóžestvo prisvóivšesja Christóvi, Jévu ľútym preľščénijem umorívšaho popráša trudý múžeskimi, ublažájutsja božéstvennymi písňmi."), ("Pokóin","","Íže ot zemlí v načáľi sozdáv čelovíka Christé, dúšy tvojích ráb upokój, mólimsja, vo obítelech právednych i v mísťich oslablénija, jáko prebláh."), ("Bohoródičen","","Svjaščénňijši čístaja Cheruvím, i Serafím, javílasja jesí róždši tvorcá tvári. Jehóže neprestánno molí, uščédriti rabý tvojá tebé slávjaščyja."), ), "2": ( ("","","Jáko po súchu pišešéstvovav Izráiľ, po bézdňi stopámi, honíteľa faraóna víďa potopľájema, Bóhu pobídnuju písň pojím, vopijáše."), ("","","V nebésnych čertózich, vsehdá dóbliji múčenicy móľat ťá Christé: íchže ot zemlí prestávil jesí vírnyja, víčnych bláh polučíti spodóbi."), ("","","Ukrasívyj vsjáčeskaja, živótnoje smišénnoje mjá čelovíka, posreďí smirénija že vkúpi i velíčestva sozdál jesí: ťímže ráb tvojích dúšy Spáse, upokój."), ("","","Rajá žíteľa, i ďílateľa v načáľi mjá učiníl jesí: prestupívša že tvojú zápoviď izrínul jesí. Ťímže rabóv tvojích dúšy Spáse, upokój."), ("Bohoródičen","","Íže ot rebrá sozdávyj Jévu pérvije nášu pramáter, iz prečístaho tvojehó čréva v plóť oďivájetsja: jéjuže smérti kríposť čístaja, razrušíl jésť."), ), ), "P3": ( "1": ( ("","","Na tvérďim víry tvojejá kámeni pomyšlénije utverdív duší mojejá, utverdí Hóspodi: ťá bo ímam bláže, pribížišče i utverždénije."), ("","","Ťilésnym primisívšesja boľíznem stradáľcy, na neboľíznennoje vziráchu vozdajánije rádujuščesja: i nýňi utoľájet náša boľízni mnóhija blahodátiju ."), ("","","Rázumom tvérdym othoňájušče zvíri lukávyja, božéstvenniji svjatítelije, izbáviša nevreždénny ot zlób ťích, Christóva božéstvennaja vospitánija."), ("","","Vóleju íhu Hospódňu podvozšédyj lík prepodóbnych, umertvív mudrovánije plotskóje, i živót víčnyj vospriját."), ("","","Izbávi Christé ohňá víčnaho, blahočéstno ot žitijá prestávľšyjasja, i ostavlénije dážď dolhóv ích bláže, i víčnoje naslaždénije."), ("","","Jáže Christá vozľubívšyja žený, tebé tohó neizrečénno róždšuju, vsesvjatája Vladýčice, rádostnoju mýsliju obstojášče likovstvújut."), ), "2": ( ("","","Ňísť svját, jákože tý Hóspodi Bóže mój, voznesýj róh vírnych tvojích bláže, i utverdívyj nás na kámeni ispovídanija tvojehó."), ("","","Zakónno postradávše tvojí múčenicy žiznodávče, i vincý pobídy ukrasívšesja ot tebé, priľížno prestávľšymsja vírnym víčnoje chodátajstvujut počéstije."), ("","","Nakazáv préžde mnóhimi čudesý i známeňmi mené zablúždšaho, naposľídok samohó sebé istoščíl jesí, jáko sostradátelen: i poiskáv obríl, i spásl jesí."), ("","","Ot tekúščaho nepostojáteľnyja tlí, k tebí prišédšyja, v selénijich víčnych vselítisja rádostno spodóbi bláže, opravdáv víroju že i blahodátiju ."), ("","","Ňísť neporóčny, jákože tý prečístaja Bohomáti: jedína bo ot víka ístinnaho Bóha začalá jesí vo črévi smérti razrušívšaho sílu."), ), ), "P4": ( "1": ( ("","","Uslýšach slúch tvój, i ubojáchsja, razumích ďilá tvojá, i užasóchsja: sláva síľi tvojéj Hóspodi."), ("","","Stojášče zrjáchu hórdaho strastotérpcy, pred nohámi ích popirájema: i vsjáčeskich ziždíteľa blahodárstvenno slávľachu."), ("","","Hlahól svitlosťmí svjatítelije vooružívšesja, k svítu razumínija, čelovíki ot ťmý jereséj spasóša."), ("","","Jáko úhlije javíšasja, k Bóhu téplym razumínijem, i strásti popalívše veščéstvennyja prepodóbniji, veľmí proslavľájutsja."), ("","","Živými tý Hóspodi, i mértvymi obladája, íchže prestávil jesí. Upokój so vsími blahouhodívšimi tebé Vladýko."), ("","","Hospóď, prečístaja, iz tebé neizrečénno v plóť oblekíjsja, žén soslóvije múžestvenňi podvizávšichsja priját."), ), "2": ( ("","","Christós mojá síla, Bóh i Hospóď, čestnája cérkov Bohoľípno pojét vzyvájušči, ot smýsla čísta, o Hóspoďi prázdnujušči."), ("","","Premúdrosti bóľšeje javľája poznánije, i o darích mnohosoveršénnuju Vladýko, blahostýňu, múčeničeskija líki ánhelom sočetál jesí."), ("","","Prečístuju slávu tvojú polučíti spodóbi k tebí prestávlennym, iďíže Christé, veseľáščichsja jésť žilíšče, i hlás čístaho rádovanija."), ("","","Pojúščyja prijimí božéstvennoju deržávoju tvojéju, íchže ot zemlí priját, čáda svítu ťích soďílav, hrichóvnuju mhlú očiščája mnohomílostive."), ("","","Prijátelišče prečístoje, cérkov neporóčnuju, kovčéh vsesvját, ďívstvennoje místo svjaščénija, tebé dobrótu Jákovľu Vladýka izbrál jésť."), ), ), "P5": ( "1": ( ("","","Svít vozsijávyj míru Christé, prosvití sérdce mojé ot nóšči tebí zovúšča, i spasí mja."), ("","","Istkánuju ot výšnija blahodáti, oblékšesja vo odéždu, stradáľcy, vrahá obnažíste."), ("","","So svjatými proróki počtím pervosvjaščénniki Bohomúdryja, i prepodóbnyja Bóhu blahouhodívšyja."), ("","","Vo psalmích i písnech voschválim žén soslóvije: jáko Bóhu dóbre uhodívšyja."), ("","","V selénijich právednych tvojích Hóspodi, tvojá rabý učiní, prezirája ťích, jáže v žitijí sohrišénija."), ("","","Izbavľájušči nás vsjákaho vrážija vréda, javílasja jesí Vladýčice, moľášči Christá jedínaho blahoutróbnaho."), ), "2": ( ("","","Bóžijim svítom tvojím bláže, útreňujuščich tí dúšy ľubóviju ozarí, moľúsja: ťá víďiti Slóve Bóžij, ístinnaho Bóha, ot mráka hrichóvnaho vzyvájušča."), ("","","Jáko vseplódije svjaščénnoje, i jáko načátok čelovíčeskaho jestestvá múčenicy, proslávlennomu prinésšesja Bóhu, nám spasénije prísno chodátajstvujut."), ("","","Nebésnaho prebyvánija, i razdajánija darovánij spodóbi Hóspodi, préžde usópšyja vírnyja rabý tvojá, podajá prehrišénij izbavlénije."), ("","","Íže jedín jestestvóm životvórec, íže bláhosti voístinnu neizsľídimaja pučína, skončávšyjasja cárstvija tvojehó spodóbi ščédre, jedíne bezsmértne."), ("","","Kríposť i pínije, íže iz tebé Vladýčice míru roždéjsja, i spasénije býsť pohíbšym, íže ot ádovych vrát izbavľája víroju tebé blažáščyja."), ), ), "P6": ( "1": ( ("","","Kítom požrén hrichóvnym, vopijú tebí Christé: jáko proróka iz istľínija mjá svobodí."), ("","","Krovéj božéstvennych tečénijem mýslennyja vrahí pohruzíste: vírnych že serdcá strastotérpcy napoíste."), ("","","Raspénše sebé míru i strastém, prepodóbniji, i premúdriji svjatítelije, božéstvennyja slávy spodóbistesja."), ("","","Prorókov lík, i čéstných žén sobór, dóbri podvizávšichsja po dólhu ublažájem."), ("","","Pokój Bóže, preždeusópšich dúšy so izbránnymi tvojími, prezirája ťích prehrišénija."), ("","","Plótiju rodívšaja Christá, plóti mojejá strásti umertví, i oživí Ďívo, dúšu mojú chodátajstvom tvojím."), ), "2": ( ("","","Žitéjskoje móre vozdvizájemoje zrjá napástej búreju, k tíchomu pristánišču tvojemú priték vopijú ti: vozvedí ot tlí živót mój, mnohomílostive."), ("","","Na kresťí prihvoždájem, múčeničeskija líki k sebí sobrál jesí, podóbjaščyjasja strásti tvojéj bláže. Ťímže ťá mólim: k tebí prestávlennyja upokój."), ("","","Neizrečénnoju slávoju tvojéju, jehdá priídeši strášno sudíti míru vsemú na óblacich, blahovolí izbáviteľu, svítlo srísti tebé, jáže ot zemlí prijál jesí vírnyja rabý tvojá."), ("","","Istóčnik žízni sýj Vladýko, v múžestvi božéstvenňim, okovánnyja izvoďá rabý tvojá jáže k tebí vírno otšédšyja, v píšči rájsťij vselí."), ("","","V zémľu vozvratíchomsja, prestupívše Bóžiju zápoviď: tebé že rádi Ďívo, na nebesá ot zemlí voznesóchomsja, tľú smértnuju ottrjásše."), ), ), "P7": ( "1": ( ("","","Prepodóbnych tvojích otrokóv písň uslýšavyj i péšč horjáščuju orosívyj, blahoslovén jesí Hóspodi Bóže otéc nášich."), ("","","Christóvy strastotérpcy, uhasívšyja plámeň ľútaho bezbóžija túčami krovéj, písňmi počtím."), ("","","Blahoslávniji jerársi, zímu jereséj razrušívše, i k vesňí božéstvenňij rádujuščesja prijidóša."), ("","","Terpínijem bohátuju Dúcha blahodáť nasľídovaste póstnicy, i mnóžestvo bisóv pohubíste."), ("","","Rajá píšči tvojejá nasľídovati spodóbi ščédre, víroju prestávlennyja ot žitijá, mnohomílostive."), ("","","Íže tebé Ďívu pokazávyj čístaja i po roždeství, svjatých žén líki tebí naslédovavšyja spásl jésť."), ), "2": ( ("","","Rosodáteľnu úbo péšč soďíla ánhel prepodóbnym otrokóm, chaldéji že opaľájuščeje veľínije Bóžije mučíteľa uviščá vopíti: blahoslovén jesí Bóže otéc nášich."), ("","","Izbávľšijisja tvojéju króviju múčenicy, pérvaho prestuplénija, okropívšesja že svojéju króviju, proobrazújut jávi tvojé zakolénije, blahoslovén jesí Bóže otéc nášich."), ("","","Svirípijuščuju smérť umertvíl jesí, Slóve živonačáľňijšij, vo víri že tvojéj usópšyja prijimí tebé pojúščyja Christé, i hlahóľuščyja: blahoslovén Bóh otéc nášich."), ("","","Voodušív mjá čelovíka vdochnovénijem božéstvennym Bohonačáľňijšij Vladýko, prestávlennyja cárstvija tvojehó spodóbi, píti tebí Spáse: blahoslovén Bóh otéc nášich."), ("","","Prevýšši vsích tvárej, preneporóčnaja bylá jesí, začénši Bóha sokrušívšaho smértnaja vratá, i vereí stéršaho. Ťímže ťá čístaja, pisnoslóvim vírniji, jáko Bohomáter."), ), ), "P8": ( "1": ( ("","","Prepodóbniji tvoí ótrocy v peščí Cheruvímy podražáchu, trisvjatúju písň vospivájušče, blahoslovíte, pójte, i prevoznosíte vo vsjá víki."), ("","","Dóblestvenňi mučénij trevolnénijem uraňájemi, božéstvenniji múčenicy, blahodátiju prošédše v tišinú hlubókuju, výšňaho cárstvija dostihóša."), ("","","Prepodóbniji, vsemúdriji svjatítelije, prosijávše jáko sólnce, prosviščájut vselénnuju učénij lučámi, i iscilénij svitlosťmí."), ("","","Slávniji prorócy, i pervosvjaščénnicy, prepodóbniji vsí, i právedniji, múčenik mnóžestva, i žén, stádo váše vsé sochraníte ot bisóv nepokolebímo."), ("","","Vospojém jáže ot víka právednyja, i Bohohlahólivyja proróki, i vozopijém so umilénijem: ťích Slóve, molítvami vo víri usópšyja upokój."), ("","","Vsjú ťa blížňuju dobrótu Bóha Ďívo, lík žénskij vozľubí, i vo sľíd tebé privedóšasja Vladýci vsích, sohlásno blažášče ťá prečístaja."), ), "2": ( ("","","Iz plámene prepodóbnym rósu istočíl jesí, i právednaho žértvu vodóju popalíl jesí: vsjá bo tvoríši Christé, tókmo jéže choťíti, ťá prevoznósim vo vsjá víki."), ("","","Krípko pódvihi pokazújušče, pobídy vincý prijáste, múčenicy strastotérpcy, Christóvi zovúšče: ťá prevoznósim Hóspoda vo víki."), ("","","Svjáščénno vírnyja žitéjskaja ostávľšyja, i k tebí Vladýce otlučívšyjasja prijimí krótko, i upokój, jáko milosérd, ťá prevoznosjáščich Hóspoda vo víki."), ("","","Nýňi v zemlí krótkich, vséím vodvorjátisja préžde usópšym Spáse, blahovolí, víroju tvojéju opravdáv i blahodátiju , ťá prevoznosjáščich Hóspoda vo víki."), ("","","Blažím ťá vsí preblažénnaja, jáko Slóvo voístinnu súščeje blažénnoje róždšuju, plóť bývšeje nás rádi. Jehóže prevoznósim vo vsjá víki."), ), ), "P9": ( "1": ( ("","","Jéže rádujsja, ot ánhela priímšaja, i róždšaja sozdáteľa tvojehó, Ďívo, spasí ťa veličájuščyja."), ("","","Ovčáta čístaja privedóstesja ko Vladýci strastotérpcy múčenicy, tohó molíte spastí dúšy náša."), ("","","Jáko pástyrije na zláci blahočéstija svjatítelije, vírnyja upasóste, i nýňi vo ohrádu božéstvennuju vselístesja."), ("","","So svjatými svjatíteli, i proróki, i so ženámi krípko postradávšimi, i prepodóbnych líki da ublažím."), ("","","Jemúže pričaščájutsja veséliju prisnosúščnomu svjatých sobóri, spodóbi prestávlennych ulučíti mnohomílostive."), ("","","Svít róždšaja Ďívo, prosvití dúšu mojú, ťmú othoňájušči hrichá i ľínosti mojejá."), ), "2": ( ("","","Bóha čelovíkom ne vozmóžno víďiti, na nehóže ne smíjut číni ánheľstiji vziráti: tobóju že vsečístaja, javísja čelovíkom slóvo voploščénno, jehóže veličájušče, s nebésnymi vóji ťá ublážájem."), ("","","Nadéžda múčenikov líki ukripí, i k tvojéj ľubví raspalénijem vperí, búduščij sím predvoobrazívše nepokolebímyj voístinnu pokój: jehóže prestávlennyja bláže, vírnyja spodóbi."), ("","","Svítloje tvojé Christé, i božéstvennoje ulučíti sijánije víroju prestávlennym blahovolí, íže v lóňich Avraámovech pokój, jáko jedín mílostiv ťím dáruja, i víčnaho spodobľája blažénstva."), ("","","Íže sýj jestestvóm bláh i milosérd, i chotíteľ mílostej, i blahoutróbija pučína, íchže ot místa sehó ozloblénija, i síni smértnyja prestávil jesí, iďíže sijájet tvój svít, Spáse ťích učiní."), ("","","Síň svjatúju čístaja, vímy ťá, i kovčéh, i skrižáli, zakóna i blahodáti: tebé bo rádi ostavlénije darovásja, opravdánym króviju voploščénnaho iz tvojehó čréva, vseneporóčnaja."), ), ), ), "CH": ( ("","","Hóspodi, v pámjať svjatých tvojích, vsjá tvár prázdnujet, nebesá rádujutsja so ánhely, i zemľá veselítsja s čelovíki. Ťích molítvami pomíluj nás."), ("","","Hóspodi, ášče ne býchom svjatýja tvojá imíli molítvenniki, i blahostýňu tvojú mílujuščuju nás: káko smíli býchom Spáse, píti ťá, jehóže slavoslóvjat neprestánno ánheli? Serdcevídče, poščadí dúšy náša."), ("","","Pámjať múčenik, rádosť bojáščymsja Hóspoda: postradávše bo Christá rádi, vincý ot nehó prijáša: i nýňi so derznovénijem móľatsja o dušách nášich."), ("","","Izbránnyja udiví svjatýja Bóh náš, rádujtesja i veselítesja vsí rabí jehó, vám bo uhotóval jésť vincý i cárstvije svojé: no mólim vý, i nás ne zabúdite."), ("Mértven","","Boľízň Adámu býsť, dréva vkušénije drévle vo Jedémi, jehdá zmíj jád otrýhnu: tohó bo rádi vníde smérť vseródnaja sňidájušči čelovíka. No prišéd Vladýka, nizloží zmíja, i voskresénije nám darová. K nemúže úbo vozopijím: poščadí Spáse, i íchže prijál jesí, so svjatými upokój, jáko čelovikoľúbec."), ("Bohoródičen","","Bóha iz tebé voplotívšahosja razumíchom, Bohoródice Ďívo: tohó molí o spáséniji dúš nášich."), ), "ST": ( ("","Vsjú otložívše","Imíjaj nepostižímoje jéže o nás blahoutróbije, i istóčnik neistoščímyj božéstvennyja bláhosti, mnohomílostive, íže k tebí Vladýko, prešédšyja, na zemlí živých vselí, v selénija vozľúblennaja i želájemaja, oderžánije dáruja, vsehdá prebyvájuščeje. Tý bo za vsích prolijál jesí króv tvojú Sspáse, i živonósnoju cinóju mír iskupíl jesí."), ("","","Umerščvlénije preterpíl jesí životvorjáščeje vóleju i živót istočíl jesí, i píšču prisnosúščnuju vírnym dál jesí, v néjže učiní usópšyja o upovániji voskresénija, ťích sohrišénija vsjá proščája blahodátiju jáko jedín bezhríšen, i jedín bláh i čelovikoľúbec: da vsími pojétsja tvojé ímja Christé, spasíteľnoje slávim čelovikoľúbije tvojé."), ("","","Živými Hospóďstvujušča, Bohonačáľnoju vlástiju, i mértvymi Vladýčestvujušča, tebé Christé, znájušče mólimsja, vírnyja rabý tvojá, k tebí jedínomu blahodáteľu otšédšyja, ťích upokój so izbránnymi tvojími čelovikoľúbče, na mísťi uťišénija, vo svjatých svítlostech: volíteľ bo mílosti jesí, i spasáješi jáko Bóh, íchže po óbrazu tvojemú sozdál jesí, jedíne mnohomílostive."), ("Bohoródičen","","Javílasja jesí prebyválišče Bohoľípno prečístaja: Bóha bo vmistíla jesí, i Christá rodilá jesí, neiskusobráčnaja Máti Ďívo, vo dvojú suščestvú, vo jedínoj že ipostási. tohó umolí čístaja, jedinoródnaho pérvenca, ťá Ďívu neporóčnuju, i po roždeství sochránšaho, dúšy upokóiti víroju usópšich vo svíťi, i v netľínňim blažénstvi."), ), ) #let L = ( "B": ( ("","","Pomjaní mja Bóže Spáse mój, jehdá priídeši vo cárstviji tvojém: i spasí mja, jáko jedín čelovikoľúbec."), ("","","Ohňá i mečá, i zviréj dívijich ustremlénija svirípaho, strastotérpcy slávniji ne ubojávšesja, prisnosúščnaho životá spodóbistesja."), ("","","Íže proróki i učíteli, i prepodóbnyja i právednyja proslávivyj čelovikoľúbče: ťích molítvami spasí dúšy náša."), ("","","So vsími svjatými i právednymi učiní Slóve, íchže vo víri prestávil jesí ot vrémennych, jáko da slávim ťá."), ("","","Otcá i Sýna slavoslóvim, i svjatáho Dúcha, hlahóľušče: Tróice svjatája, spasí dúšy náša."), ("","","Blažénna v roďích vsích javílasja jesí: Bóha bo voístinnu blažénnaho neskazánno rodilá jesí prečístaja."), ), )
https://github.com/kokkonisd/typst-phd-template
https://raw.githubusercontent.com/kokkonisd/typst-phd-template/main/src/fonts.typ
typst
The Unlicense
#let MAIN_FONT = "Albert Sans" #let CODE_FONT = "Inconsolata"
https://github.com/FlyinPancake/bsc-thesis
https://raw.githubusercontent.com/FlyinPancake/bsc-thesis/main/thesis/pages/glossary.typ
typst
#import "@preview/glossarium:0.2.4": print-glossary #page[ = Glossary #print-glossary( ( ( key: "crd", short: "CRD", long: "Custom Resource Definition", desc: [A CRD is a Kubernetes resource that allows you to define your own custom resources. Kubernetes operators use CRDs to extend the functionality of the Kubernetes API.], ), ( key: "persistentvolume", short: "PV", long: "Persistent Volume", desc: [A `PersistentVolume` is a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes.], ), ( key: "olm", short: "OLM", long: "Operator Lifecycle Manager", desc: [The Operator Lifecycle Manager facilitates the management of operators in the Kubernetes Cluster.], ), ( key: "tps", short: "TPS", long: "Transactions Per Second", desc: [Transactions per second (TPS) is an indication of how many database transactions a system can process per second.], ), ( key: "ro", short: "RO", long: "Read Only", desc: [A test is Read-only (RO) if it does not modify the state of the system under test.], ), ( key: "rw", short: "R/W", long: "Read/Write", desc: [A test is Read/Write (R/W) if it modifies the state of the system under test.], ), ( key: "sf", short: "SF", long: "Scale Factor", desc: [The scale factor (SF) is the ratio of the size of a data set to the size of its original source data set.], ), ), ) ]
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/regression/issue17.typ
typst
Other
$n(a)^(b)$ $a_1(x)$ $a_f(x)$ $sum_(j = 0)^3$ $sum^3_(j = 0)$ $sum_3^(j = 0)$ $sum^(j=0)_3$ $sum_(j=0)^pi$ $sum^pi_(j=0)$
https://github.com/catg-umag/inach-workshop-2024
https://raw.githubusercontent.com/catg-umag/inach-workshop-2024/main/document/sections/3_quality.typ
typst
#import "@preview/gentle-clues:1.0.0": * #import "../catgconf.typ": cmd, github-pill, doi-pill = Control y Filtros de Calidad El control de calidad es una fase fundamental en el análisis de datos de secuenciación, especialmente en tecnologías de tercera generación debido a su mayor tasa de error. Entre las tareas más comunes de esta etapa se incluyen la eliminación de secuencias de baja calidad, eliminación de adaptadores, filtro de secuencias cortas y descontaminación. La calidad de las lecturas se codifica en los archivos FASTQ generados por los dispositivos de secuenciación, y en el caso de Oxford Nanopore son resultado del proceso de basecalling. Contienen tanto la información de la secuencia como la calidad asociada a cada base. Un ejemplo de lectura en formato FASTQ se presenta a continuación: #figure( ``` @NB551068:9:HK5NLBGXX:1:11101:12901:1044 1:N:0:ATCACG GATCGGAAGAGCACACGTCTGAACTCCAGTCACATCGTCTGAGGCTGCTGAACCGCTCTTCCGATCTTCTGCTTGAAA + IIIIHHHHHHHHHGGGGGGGGGGFFFFFEEEEEEEEDDDDDCCCCCCCBBBBBBBBBAAAAAAAA@@@@@@@###### ```, caption: [ Ejemplo de lectura en formato FASTQ. La primera línea contiene el identificador de la secuencia, la segunda línea la secuencia de nucleótidos, la tercera línea un carácter `+` y la cuarta línea la calidad de la secuencia. ], ) <fastq_example> Los valores de calidad Q-Score están codificados en formato ASCII, donde cada carácter corresponde a un valor numérico. A partir de este valor, se puede calcular la probabilidad de error asociada a la base con la fórmula $P = 10^frac(-Q,10)$, donde $Q$ es el Q-Score. En la @tab:quality se presentan las equivalencias entre los códigos ASCII y los Q-Scores. #context [ #show table.cell: set text(size: 0.85em) #set table(inset: (y: 4pt)) #figure( grid( columns: 3, gutter: 0.5em, table( columns: 3, align: (center, center, center), table.header([Símbolo], [Q-Score], [Precisión]), [!], [0], [0%], [\"], [1], [20.0%], [\#], [2], [36.9%], [\$], [3], [50.0%], [%], [4], [60.0%], [&], [5], [68.4%], ['], [6], [75.0%], [(], [7], [80.0%], [)], [8], [84.1%], [\*], [9], [87.5%], [+], [10], [90.0%], [,], [11], [92.1%], [-], [12], [93.7%], [.], [13], [95.0%], ), table( columns: 3, align: (center, center, center), table.header([Símbolo], [Q-Score], [Precisión]), [/], [14], [96.0%], [0], [15], [96.8%], [1], [16], [97.5%], [2], [17], [98.0%], [3], [18], [98.4%], [4], [19], [98.7%], [5], [20], [99.0%], [6], [21], [99.2%], [7], [22], [99.4%], [8], [23], [99.5%], [9], [24], [99.6%], [:], [25], [99.7%], [;], [26], [99.8%], [<], [27], [99.8%], ), table( columns: 3, align: (center, center, center), table.header([Símbolo], [Q-Score], [Precisión]), [=], [28], [99.84%], [>], [29], [99.87%], [?], [30], [99.90%], [\@], [31], [99.92%], [A], [32], [99.94%], [B], [33], [99.95%], [C], [34], [99.96%], [D], [35], [99.97%], [E], [36], [99.98%], [F], [37], [99.98%], [G], [38], [99.99%], [H], [39], [99.99%], [I], [40], [99.99%], ), ), caption: [ Codificación de calidad en archivos FASTQ para Q-Score 1 a 40. ], placement: auto, ) <tab:quality> ] == FastQC #github-pill("s-andrews/FastQC") FastQC es una herramienta ampliamente utilizada para realizar el control de calidad de datos de secuenciación. Permite evaluar la calidad de las secuencias, identificar adaptadores, secuencias repetitivas y otros problemas comunes. Los resultados de las métricas evaluadas son presentadas en un reporte en formato HTML. Para ejecutar FastQC se debe indicar el o los archivos de entrada como argumentos al comando. Otros parámetros relevantes son: - #cmd(`--outdir / -o`): Almacena los reportes generados en un directorio específico (debe estar creado). - #cmd(`--threads / -t`): Número de hilos a utilizar, lo que permite acelerar el proceso. - #cmd(`--memory`): Cantidad de memoria RAM (en MB) a utilizar por hilo de ejecución. A continuación se presentan algunos ejemplos de ejecución: ```sh # Ejecuta FastQC en el archivo 'sample1.fastq.gz' fastqc sample1.fastq.gz # Ejecuta FastQC en múltiples archivos, con 4 hilos, almacenando los reportes en 'reports' fastqc -t 4 -o reports/ sample1.fastq.gz sample2.fastq.gz ``` == nanoq #github-pill("esteinig/nanoq") #h(3pt) #doi-pill("10.21105/joss.02991") Nanoq es una herramienta para realizar control y filtros de calidad diseñada especialmente para trabajar con datos de Oxford Nanopore. #heading([Control de calidad], level: 3, numbering: none) Para obtener métricas de calidad se utiliza el parámetro #cmd(`-s / --stats`). Esto genera una tabla con cantidad de secuencias, número total de bases, tamaño y calidad promedio. Se puede usar #cmd(`--report`) para guardar la información generada en un archivo. Existen opciones que permiten obtener información adicional, las cuales son: - #cmd(`-v`) : Información básica en formato extendido. - #cmd(`-vv`): Similar a #cmd(`-v`), pero incluye una compartimentación de la calidad y tamaño de las secuencias. - #cmd(`-vvv`): Similar a #cmd(`-vv`), pero incluye un ranking de las cinco secuencias con mejor calidad y mayor largo. El archivo de entrada debe indicarse mediante el parámtero #cmd(`-i / --input`). Ejemplo de uso para control de calidad: ```sh nanoq -i barcode01.fastq.gz -svv -r bacorde01_stats.txt ``` #pagebreak() #heading([Filtros de calidad], level: 3, numbering: none) Al usar nanoq para realizar filtros de calidad, los parámetros más relevantes son #cmd(`--min-len / -l`), #cmd(`--max-len / -m`), #cmd(`--min-qual / -q`) y #cmd(`--max-qual / -w`). Mediante el parámetro #cmd(`--output / -o`) se indica el archivo que va a almacenar los datos filtrados. En el siguiente ejemplo se filtra con calidad mínima 15 y tamaño entre 1.000 y 2.000 pares de bases: ```sh nanoq -i barcode01.fastq.gz -q 15 -l 1000 -m 2000 -o barcode01_filtered.fastq.gz ``` Al usar filtros de calidad, se puede utilizar la opción `--report` para generar el reporte de estadísticas del archivo filtrado: ```sh nanoq --input barcode01.fastq.gz --output barcode01_filtered.fastq.gz \ --min-qual 15 --min-len 1000 --max-len 2000 \ -vv --report barcode01_filtered_stats.txt ``` == MultiQC #github-pill("MultiQC/MultiQC") MultiQC permite integrar resultados de reportes de múltiples herramientas y múltiples muestras en un único reporte HTML. Soporta un gran cantidad herramientas bioinformáticas como FastQC, nanoq, fastp, cutadapt y NanoPlot. La lista de herramientas soportadas se puede encontrar en la sección #link("https://multiqc.info/docs/#multiqc-modules")[MultiQC modules] de la documentación. MultiQC requiere como argumento el directorio donde se encuentren los reportes generados por las herramientas. Si se indica #cmd(`.`), MultiQC buscará los reportes en el directorio actual. Ejemplo: ```sh multiqc reports/ ``` Por defecto el nombre del reporte será `multiqc_report.html`, pero se puede indicar con #cmd(`--filename`): ```sh multiqc --filename multiqc_raw.html reports/ ```
https://github.com/qujihan/typst-book-template
https://raw.githubusercontent.com/qujihan/typst-book-template/main/template/parts/cover.typ
typst
#import "../params.typ": * #let show-cover(book-title, author) = [ #set page( paper: "a4", margin: (x: 0pt, y: 0pt), header: none, footer: none, background: none, fill: white, ) #align( center + horizon, block(width: 100%, height: 30%, fill: gray.transparentize(40%))[ #text(size: 2em, weight: "bold")[#book-title] #v(3em) #text(size: 1.5em, weight: "bold")[#author] #v(1em) ], ) ]
https://github.com/Ombrelin/adv-java
https://raw.githubusercontent.com/Ombrelin/adv-java/master/Slides/0-intro.typ
typst
#import "@preview/polylux:0.3.1": * #import themes.clean: * #show: clean-theme.with( logo: image("images/efrei.jpg"), footer: [<NAME>, EFREI Paris], short-title: [EFREI LSI L3 ALSI62-CTP : Java Avancé], color: rgb("#EB6237") ) #title-slide( title: [Java Avancé], subtitle: [Cours 0 : Présentation], authors: ([<NAME>]), date: [19 Janvier 2024], ) #slide(title: [Qui suis-je ?])[ - <NAME> - Ingénieur en développement logiciel chez KDS (éditeur, voyage d'affaire) - EFREI LSI P2022 - <EMAIL> #text(style: "italic", [1ère année en tant qu'enseignant (n'hésitez pas à me faire des retours pour m'aider à m'améliorer !)]) ] #slide(title: [Et vous ?])[ Mettez un message dans le chat avec : 1. Votre métier en alternance 2. Langage de programmation préféré 3. Système d'exploitation préféré 4. Aisance avec Java (entre : largué, bof, ok/20 et goat) 5. Aisance avec Git (entre : jamais utilisé, largué, bof, ok/20 et goat) ] #slide(title: [Objectifs du module])[ 1. Professionaliser la pratique du développement logiciel - Tests - Qualité logicielle 2. Concepts avancés en Java - Programmation orientée fonction - Threads - Programmation réseau ] #slide(title: [Vos attentes pour ce module ?])[ Dites moi ! Ecrivez vos attentes en vrac dans le chat. ] #slide(title: [Retard])[ - Tant que vous dérangez pas en arrivant (s'installer discrètement sans interrompre) je vous accepterai quel que soit le retard - Venez juste me voir à la pause pour que je vous mette présent sur SoWeSign ] #slide(title: [Dites moi quand quelque chose ne va pas !])[ - Ca va trop/pas assez vite - C'est pas clair - Vous avez une question A haute voix ou par chat Teams à tout moment. ] #slide(title: [Evaluations])[ 1. Projet - En binôme - Revue de code - Découpés en plusieurs livrables 2. Devoir Ecrit - 21 Mars 2023 - Questions de cours + Exercice d'analyse avec code fourni - Pas d'écriture de code sur papier ] #slide(title: [Séance type])[ Chez vous, avant la séance : lire le cours sur le support principal du cours : *#link("https://ombrelin.github.io/adv-java")* Pendant la séance : 1. Récap du cours 2. Questions & Réponses sur le cours 3. Travail autonome sur le projet, je suis dispo pour aider en cas de bloquage ] #slide(title: [Prérequis])[ - Programmation impérative (variables, conditions, boucles, fonctions) - Base de la programmation objet en Java (classese, encapsulation de données, interfaces, classes abstraites) ] #focus-slide(background: rgb("#EB6237"))[ Des questions ? ]
https://github.com/SkiFire13/master-thesis
https://raw.githubusercontent.com/SkiFire13/master-thesis/master/chapters/background/3-fixpoint-system.typ
typst
#import "../../config/common.typ": * == Systems of fixpoint equations We will now define what is a system of fixpoint equations and what is its solution, following the definition given in @baldan_games. Intuitively this will be very similar to a normal system of equations, except for the fact that each equation is interpreted as a fixpoint equation. Since there can be more than one fixpoint we will also need to specify which kind of fixpoint the equation refers to, which we will do by using respectively the symbols $lfp$ and $gfp$ in subscript after the equal sign to denote the fact that we refer to the least or greatest fixpoint, respectively. #definition("system of fixpoint equation")[ Let $(L, sub)$ be a complete lattice. A system of fixpoint equations $E$ over $L$ is a system of the following shape: $ syseq( x_1 &feq_eta_1 &f_1 &(x_1, ..., x_n) \ x_2 &feq_eta_2 &f_2 &(x_1, ..., x_n) \ &#h(0.3em)dots.v \ x_n &feq_eta_n &f_n &(x_1, ..., x_n) \ ) $ where $forall i in range(n)$, $f_i : L^n -> L$ is a monotone function and $x_i$ ranges over $L$. Each subscript $eta_i$ must be either $mu$ or $nu$, representing respectively a least or a greatest fixpoint equation. ] #notation("system of fixpoint equations as tuple")[ The above system of fixpoint equations can be written as $tup(x) feq_tup(eta) tup(f)(tup(x))$, where: - $tup(x) = (x_1, ..., x_n)$; - $tup(eta) = (eta_1, ..., eta_n)$; - $tup(f) = (f_1, ..., f_n)$ but can also be seen as $tup(f): L^n -> L^n$ with $tup(f)(x_1, ..., x_n) = (f_1 (x_1), ..., f_n (x_n))$. ] #notation("empty system of fixpoint equations")[ A system of equations with no equations or variables is conveniently written as $varempty$. ] #definition("substitution")[ Let $(L, sub)$ be a complete lattice and $E$ be a system of $n$ fixpoint equations over $L$ and variables $x_i$ for $i in range(n)$. Let $j in range(n)$ and $l in L$. The substitution $E[x_j := l]$ is a new system of equation where the $j$-th equation is removed and any occurrence of the variable $x_j$ in the other equations is replaced with the element $l$. ] We can now define the solution for a system of fixpoint equations recursively, starting from the last variable, which is replaced in the rest of the system by a free variable representing the fixed parameter. Then one obtains a parametric system with one equation less. This is inductively solved and its solution, which is a function of the parameter, is replaced in the last equation. This produces a fixpoint equation with a single variable, which can be solved to determine the value of the last variable. #definition("solution")[ Let $(L, sub)$ be a complete lattice and $E$ be a system of $n$ fixpoint equations over $L$ and variables $x_i$ for $i in range(n)$. The solution of $E$ is $s = sol(E)$, with $s in L^n$ inductively defined as follows: $ sol(varempty) &= () \ sol(E) &= (sol(E[x_n := s_n]), s_n) $ where $s_n = eta_n (lambda x. f_n (sol(E[x_n := x]), x))$. ] #example("solving a fixpoint system", label: <system-example>)[ Consider the following system of fixpoint equations $E$ over the boolean lattice $bb(B)$: $ syseq( x_1 &feq_mu x_1 or x_2 \ x_2 &feq_nu x_1 and x_2 \ ) $ To solve this system of fixpoint equations we apply the definition of its solution, getting $sol(E) = (sol(E[x_2 := s_2]), s_2)$ with $s_2 = nu(lambda x. sol(E[x_2 := x]) and x)$. In order to find $s_2$ we will need to solve $E[x_2 := x]$, that is the system of the single fixpoint equation $x_1 feq_mu x_1 or x$ and parameterized over $x$. To do this we apply the definition again, getting $sol(E[x_2 := x]) = (sol(varempty), s_1)$ with $s_1 = mu(lambda x'. x' or x)$. At this point we have hit the base case with $sol(varempty)$, which is just $()$, while we can find $s_1$ by solving the given fixpoint equation, getting $s_1 = x$ because $x$ is the smallest value that is equal to itself when joined with $x$. We thus get $sol(E[x_2 := x]) = (x)$, and we are back to find $s_2$, whose definition can now be simplified to $nu(lambda x. x and x)$. Thus fixpoint equation can now be solved, getting $s_2 = tt$ because $tt$ is the greatest element of $bb(B)$ that also satisfies the given equation. Finally, we can get $sol(E[x_2 := s_2]) = s_2 = tt$ by substituting $s_2$ in place of $x$ in $sol(E[x_2 := x])$, and with this we get $sol(E) = (tt, tt)$. To recap, the steps performed were: - $sol(E) = (sol(E[x_2 := s_2]), s_2)$ with $s_2 = nu(lambda x. sol(E[x_2 := x]) and x)$ - $sol(E[x_2 := x]) = (sol(varempty), s_1)$ with $s_1 = mu(lambda x'. x' or x)$ - solving $s_1$ gives $s_1 = x$ - solving $s_2$ gives $s_2 = nu(lambda x. x and x) = tt$ - $sol(E) = (tt, tt)$ ] Notice that the way the solution of a system of fixpoint equations is defined depends on the order of the equations. Indeed different orders can result in different solutions. #example("different order of equations", label: <order-equations>)[ Consider a system of equations $E'$ containing the same fixpoint equations as $E$ from @system-example, but with their order swapped: $ syseq( x_1 &feq_nu x_1 and x_2 \ x_2 &feq_mu x_1 or x_2 \ ) $ This time the steps needed will be the following: - $sol(E') = (sol(E'[x_2 := s_2]), s_2)$ with $s_2 = mu(lambda x. sol(E'[x_2 := x]) or x)$ - $sol(E'[x_2 := x]) = (sol(varempty), s_1)$ with $s_1 = nu(lambda x'. x' and x)$ - solving $s_1$ gives $s_1 = x$ - solving $s_2$ gives $s_2 = mu(lambda x. x and x) = ff$ - $sol(E') = (ff, ff)$ Notice that $sol(E) = (tt, tt) != (ff, ff) = sol(E')$, meaning that the different order of the equations in the two systems does indeed influence the solution. ]
https://github.com/stuPETER12138/Tymplates
https://raw.githubusercontent.com/stuPETER12138/Tymplates/main/just_for_fun/simpleone.typ
typst
MIT License
// a simple template for 劳动教育(或其他 #let indent = h(2em) #let sb = bibliography #let conf( title: none, author: (), abstract: [], doc, bibliography: none, ) = { set page( paper: "a4", numbering: "1", ) set par(justify: true) set text( font: "SimSun", // 宋体 size: 12pt, // 小四号字 ) set align(center) text( font: "SimHei", // 黑体 size: 16pt, // 三号字 [*#title*]) grid( columns: (1fr), align(center)[ #author.name \ #author.affiliation \ #author.class ], ) // show heading: block.with(inset: (left: 2em)) // 标题缩进。block 用法,有待深入学习 show heading: it => { if it.level == 1 { set text(14pt) it } else { set text(12pt) it } } set par(first-line-indent: 2em) set align(left) columns(2, { align(center, text(size: 14pt)[*摘要*]) abstract doc if bibliography != none { set sb( title: [*参考文献*], style: "gb-7714-2005-numeric" ) show sb: set text( size: 12pt ) bibliography } }) }
https://github.com/3w36zj6/textlint-plugin-typst
https://raw.githubusercontent.com/3w36zj6/textlint-plugin-typst/main/test/fixtures/Emphasis/input.typ
typst
MIT License
_emphasis_ _ a b c _ \ This is _emphasized_.
https://github.com/cs-24-sw-3-01/typst-documents
https://raw.githubusercontent.com/cs-24-sw-3-01/typst-documents/main/planning/main.typ
typst
#import "@preview/grape-suite:1.0.0": exercise #import exercise: project, task, subtask #show: project.with( title: "Project Planning P3", university: [Aalborg University], institute: [Datalogiske Institut], seminar: [3. Semester], author: "", show-solutions: false ) = Gruppekontrakt == Mødetider - Vi møder op hver dag bortset fra fredag fra 09:00 til 16:00. - Det er forventet at selvom man ikke møder fysisk op, så bliver det nødvendige arbejde stadig udført. - Man giver besked om man møder/ikke møder fysisk (ASAPIP) - Fast spisepause fra 12:00 til 12:30 uden forventing til fagligt arbejde. - Ellers kan man tage pauser som det passer en individuelt. == Planlægning - Til at starte med bruges github issues til rapporten hvor pull requests linkes til issues - Indtil videre bestemmer vi individuelt om vi laver opgaver i gruppen eller individuelt - Dagsplan i starten af hver dag i README'en på typst repoet == Det Sociale - Vi laver ryst-sammen til at starte med - Vi holder følertorsdag - Hvordan har man det? - Utilfreds? - _Walk and talks_ for at hygge sammen - Gensidig respekt - *Jantelov* == Konflikthåndtering - Intet er for småt til at snakke om - Flertallet bestemmer. *Demokrati* == Regelbrud - Der overholdes intervention ved gengangende regelbrud. Hvis dette fortsætter indblandes vejleder, eller medlemmet kan blive smidt ud == Forventningsafstemning - Vi gør vores bedste. Vi vil naturligvis gerne have høj karakter, men så længe all gør deres bedste er alt godt #pagebreak() = ToDo til 18/09/2024 \ - Kig på brainstorm i 15-20 minutter og lav spørgsmål til interview - Discord møde kl 11:00
https://github.com/Myriad-Dreamin/tinymist
https://raw.githubusercontent.com/Myriad-Dreamin/tinymist/main/docs/tinymist/feature/language.typ
typst
Apache License 2.0
#import "mod.typ": * #show: book-page.with(title: "Tinymist Language and Editor Features") #include "language-content.typ"
https://github.com/AU-Master-Thesis/thesis
https://raw.githubusercontent.com/AU-Master-Thesis/thesis/main/sections/3-methodology/mod.typ
typst
MIT License
#import "../../lib/mod.typ": * = Methodology <methodology> This section covers the methodology and work produced as part of the thesis. The different work items related to each hypothesis in @intro-research-hypothesis, will be presented in turn. All work on the reproduction part is done by assessment of the openly available material i.e. the paper@gbpplanner and available source code distributed along with it@gbpplanner-code. Where certain parts of the algorithm are stated in an ambiguous way in the available material an argument for the chosen interpretation will be made. // Where ambiguities arise, explanations or arguments for the chosen interpretations are provided. // Where behaviour is not self evident, and not described in both the paper@gbpplanner and the source code@gbpplanner-code a point will be made with a clear reference to the source from which the knowledge was derived from. // No communication exchange has been made with the authors // #todo[ // Talk about the reproduction aspects, what methodologies have we used to reproduce the paper? // ] // #jonas[This section is more WIP than background, as not everything is here yet. However the overall structure and content layout it here, so do not spend too much time going too deep into the details. Just look more at the flow of information.] // #jonas[The hypothesis 1 and 4 and study 1 and 4 have been merged] #include "study-1/mod.typ" #include "study-2/mod.typ" #include "study-3/mod.typ" // #include "study-4/mod.typ"
https://github.com/noahjutz/AD
https://raw.githubusercontent.com/noahjutz/AD/main/notizen/mathe/main.typ
typst
= Mathematische Grundlagen == Fibonacci-Folge Eine _Differenzengleichung_ der Ordnung $k$ definiert jedes Glied $x_n$ einer Folge in Abhängigkeit der Vorgänger $x_(n-1), x_(n-2), ..., x_(n-k)$. Es müssen $k$ Initialwerte definiert werden, sodass die Rekursion beendet werden kann. $ x_n = f(n, x_(n-1), x_(n-2), ..., x_(n-k)) $ Eine _lineare_ Differenzengleichung fordert, dass die Funktion ein lineares Polynom ist. $ x_n = a_1x_(n-1) + a_2x_(n-2) + ... + a_n x_(n-k) + b $ Man nennt man diese _homogen_, wenn sie keinen konstanten Term $b$ hat. === Definition Die Fibonacci-Folge erfüllt eine _homogene lineare Differenzengleichung_ der Ordnung $k=2$. $ x_n = a_1x_(n-1) + a_2x_(n-2) $ Die Koeffizienten sind definiert als $a_1=a_2=1$, und die Initialwerte als $x_0=0$ und $x_1=1$. Die Fibonacci-Folge ist also definiert als: $ f_n = cases( 0 "falls" n = 0, 1 "falls" n = 1, f_(n-1) + f_(n-2) "sonst" ) $ Die ersten 10 Fibonacci-Zahlen sind: #{ show table.cell.where(y: 0): set text(fill: gray) table(columns: (1fr,) * 10, align: center, stroke: none, ..range(10).map(i => $f_#i$), ..range(10).map(i => calc.pow(1.618, i) / calc.sqrt(5)) .map(i => [#calc.round(i)]) ) } === Fibonaccis Kaninchen Wie viele Kaninchen gibt es nach $n$ Monaten, wenn jedes erwachsene Kaninchen (mindestens 1 Monat alt) jeden Monat ein Nachkommen produziert, und niemals stirbt? #include "fib_tree.typ" Die Anzahl an Kaninchen in einem Monat $n$ sind zunächst alle Kaninchen, die es im Monat davor schon gibt ($f_(n-1)$). Es kommen $f_(n-2)$ neue Kaninchen dazu, weil jedes erwachsene Kaninchen ein neues zeugt. Um erwachsen zu sein, muss es schon zwei Monate zuvor existiert haben. Daraus ergibt sich die Fibonacci-Folge. @bib-fibonaccis-rabbits $ f_n = f_(n-1) + f_(n-2) $ === Iterative Lösung #include "fib_plot.typ" Es gibt eine Funktion $f(n)$, welche die $n$-te Fibonacci-Zahl ohne Rekursion berechnet. Für diese Funktion muss gelten: $ f(n) = f(n-1) + f(n-2) $ Das Verhältnis zwischen zwei Fibonacci-Zahlen $f_n/f_(n-1)$ konvergiert für $n -> infinity$ gegen einen konstanten Wert $phi approx 1.618$. Beweis: @proof-fib-limit. Die Fibonacci-Folge nähert sich einer geometrischen Folge an. $ x_n = x_0 dot phi^n $ == Charakteristisches Polynom Jede quadratische Matrix $A$ hat genau ein charakteristisches Polynom @bib-3b1b-eigenvalues. $ p_A (lambda) = det(A - lambda I) $ Die Nullstellen dieses Polynoms sind die Eigenwerte von $A$. Die Eigenvektoren mit Eigenwert $lambda$ sind die Lösung der Gleichung $ (A - lambda I) dot arrow(v) = arrow(0) $ == Strukturelle Induktion Verallgemeinerung der vollständigen Induktion; siehe #link("https://de.wikipedia.org/wiki/Strukturelle_Induktion")[Wikipedia].
https://github.com/An-314/typst-templates
https://raw.githubusercontent.com/An-314/typst-templates/main/README.md
markdown
这是AnZrew的typst模板,希望能够涵盖一般作业、实验、笔记等的需求。 # 使用方法 ## 放在同一文件夹下 将`template.typ`放入同文件夹,并且在撰写的文档中使用 ```typst #import "template.typ": * ``` 即可使用模板。 ## 放置本地的Local packages中 也可以将改文件配置到本地的packages仓库中,参考[官方文档](https://github.com/typst/packages?tab=readme-ov-file#local-packages)。放置在`%APPDATA%\typst\packages\local\mytemplate\1.0.0`文件夹下,然后在文件夹中加入`typst.toml`文件,内容如下: ```toml [package] name = "mytemplate" version = "1.0.0" entrypoint = "template.typ" authors = ["AnZreww"] description = "AnZrew's typst template" ``` 以使得编译器能够识别该模板。然后在文档中使用 ```typst #import "@local/mytemplate:1.0.0": * ``` 来使用该模板。 # 模板 `project`函数是一个简单的模板函数,用来选择模板并生成标题页。 ```typst #show: project.with( template: "article", title: "", info:"", authors: (), time: "", abstract: none, keywords: (), preface: none, contents: false, content_depth: 2, font_size: 11pt, body ) ``` 这是函数的参数和默认值。这些参数的含义: ```typst template: str //选择模板,目前支持article、report、book title: str //标题 info: str //信息,例如副标题、课程名、教师名等(可选) authors: arr(str) //作者() time: str //时间 abstract: str //摘要(可选) keywords: arr(str) //关键词(可选) preface: str //前言(可选) contents: bool //是否生成目录(缺省值,可以不写) content_depth: int //目录深度(缺省值,可以不写) font_size: lengt //字体大小(缺省值,可以不写) ``` 目前支持: - article:一般文档 - report:实验报告 - book:笔记、书籍 具体使用方法如下。 ## article 有效的参数有: ```typst template: "article",//(缺省值,可以不写) title: "", info:"", //(可选) authors: (), time: "", abstract: none, //(可选) keywords: (), //(可选) contents: false, //(缺省值,可以不写) content_depth: 2, //(缺省值,可以不写) font_size: 11pt, //(缺省值,可以不写) ``` 标题、(信息、)作者、时间、(摘要、关键词、目录)会依次写在标题页上。 具体效果详见[demo](demo/article.pdf)。 ## report 有效的参数有: ```typst template: "report", //(需要声明) title: "", info:"", //(可选) authors: (), time: "", abstract: none, //(可选) keywords: (), //(可选) contents: false, //(缺省值,可以不写) content_depth: 2, //(缺省值,可以不写) font_size: 11pt, //(缺省值,可以不写) ``` 标题、(信息、)作者、时间,作为封面;(摘要、关键词、目录)会生成在目录页上。 具体效果详见[demo](demo/report.pdf)。 ## book 有效的参数有: ```typst template: "book", //(需要声明) title: "", info:"", //(可选) authors: (), time: "", preface: none, //(可选) contents: false, //(缺省值,可以不写) content_depth: 2, //(缺省值,可以不写) font_size: 11pt, //(缺省值,可以不写) ``` 标题、(信息、)作者、时间,作为封面;(前言)会生成在前言页上;(目录)会生成在目录页上。 具体效果详见[demo](demo/book.pdf)。 # 其他模块 针对于其他问题,`template.typ`中还包含了一些其他的模块。 - `newpara()` 针对于数学公式块、代码块后的段落缩进问题,可以使用`newpara()`函数。如果需要另起一段,可以使用`#newpara()`调用即可。 - 表格 得益于`tablem`与`tablex`两个package,可以使用简单的markdown语法来编写表格。例如: ```typst #tablem[ | *Name* | *Location* | *Height* | *Score* | | ------ | ---------- | -------- | ------- | | John | Second St. | 180 cm | 5 | | Wally | Third Av. | 160 cm | 10 | ] #three-line-table[ | *Name* | *Location* | *Height* | *Score* | | ------ | ---------- | -------- | ------- | | John | Second St. | 180 cm | 5 | | Wally | Third Av. | 160 cm | 10 | ] ``` 其中`tablem`是普通的表格,`three-line-table`是三线表。参见[官方文档](https://typst.app/universe/package/tablem)。 # TODO - [x] 解决公式编号问题:默认有编号,可以通过`#set math.equation(numbering: none)`来取消公式的编号 - [x] 添加模板:Report - [x] 添加模板:Notes - [x] report的页眉无法正常显示章节名:由于作用域的原因,解决方法不是很优雅,哭 - [ ] 添加更多的模块,例如:定理证明等等
https://github.com/hyskr/touying-bjtu
https://raw.githubusercontent.com/hyskr/touying-bjtu/main/examples/main.typ
typst
MIT License
#import "@preview/cetz:0.2.2" #import "@preview/fletcher:0.4.5" as fletcher: node, edge #import "@preview/touying:0.4.2": * #import "../lib.typ" as bjtu-theme // cetz 和 fletcher 绑定到 touying #let cetz-canvas = touying-reducer.with(reduce: cetz.canvas, cover: cetz.draw.hide.with(bounds: true)) #let fletcher-diagram = touying-reducer.with(reduce: fletcher.diagram, cover: fletcher.hide) // 注册北交通主题 // 您可以将其替换为其他主题,它仍然可以正常工作 #let s = bjtu-theme.register() // 设置章节和小节的编号 #let s = (s.methods.numbering)(self: s, section: "1.", "1.1") // 设置演讲者备注配置,可以通过 pympress 显示 // #let s = (s.methods.show-notes-on-second-screen)(self: s, right) // 全局信息配置 #let s = (s.methods.info)( self: s, title: [基于 Touying 的北交通 Typst 幻灯片模板], subtitle: [基于 Touying 的北京交通大学 Typst 幻灯片模板], author: [Heziah], date: datetime.today(), institution: [北京交通大学], ) // Pdfpc 配置 #let s = (s.methods.append-preamble)(self: s, pdfpc.config( duration-minutes: 30, start-time: datetime(hour: 14, minute: 00, second: 0), end-time: datetime(hour: 14, minute: 30, 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", ), )) // 提取方法 #let (init, slides, touying-outline, alert, speaker-note, tblock) = utils.methods(s) #show: init.with( lang: "zh", font: ("Linux Libertine", "Source Han Sans SC", "Source Han Sans"), ) #show strong: alert // 提取幻灯片功能 #let (slide, empty-slide, title-slide, outline-slide, new-section-slide, ending-slide) = utils.slides(s) #show: slides.with() #outline-slide() = Typst 与 Touying #tblock(title: [Typst])[ Typst 是一门新的基于标记的排版系统,它强大且易于学习。本演示文稿不详细介绍 Typst 的使用,你可以在 Typst 的#link("https://typst.app/docs")[文档]中找到更多信息。 ] #tblock(title: [Touying])[ Touying 是为 Typst 开发的幻灯片/演示文稿包。Touying 也类似于 LaTeX 的 Beamer,但是得益于 Typst,你可以拥有更快的渲染速度与更简洁的语法。你可以在 Touying 的#link("https://touying-typ.github.io/touying/zh/docs/intro")[文档]中详细了解 Touying。 Touying 取自中文里的「投影」,在英文中意为 project。相较而言,LaTeX 中的 beamer 就是德文的投影仪的意思。 ] = Touying 幻灯片动画 == 简单动画 使用 ```typ #pause``` #pause 暂缓显示内容。 #pause 就像这样。 #meanwhile 同时,#pause 我们可以使用 ```typ #meanwhile``` 来 #pause 显示同时其他内容。 #speaker-note[ 使用 ```typ #let s = (s.math.show-notes-on-second-screen)(self: s, right)``` 来启用演讲提示,否则将不会显示。 ] == 复杂动画 - Mark-Style 在子幻灯片 #utils.touying-wrapper((self: none) => str(self.subslide)) 中,我们可以: 使用 #uncover("2-")[```typ #uncover``` 函数](预留空间) 使用 #only("2-")[```typ #only``` 函数](不预留空间) #alternatives[多次调用 ```typ #only``` 函数 \u{2717}][使用 ```typ #alternatives``` 函数 #sym.checkmark] 从多个备选项中选择一个。 == 复杂动画 - Callback-Style #slide(repeat: 3, self => [ #let (uncover, only, alternatives) = utils.methods(self) 在子幻灯片 #self.subslide 中,我们可以: 使用 #uncover("2-")[```typ #uncover``` 函数](预留空间) 使用 #only("2-")[```typ #only``` 函数](不预留空间) #alternatives[多次调用 ```typ #only``` 函数 \u{2717}][使用 ```typ #alternatives``` 函数 #sym.checkmark] 从多个备选项中选择一个。 ]) == 数学公式动画 在 Touying 数学公式中使用 `pause`: #touying-equation(` f(x) &= pause x^2 + 2x + 1 \ &= pause (x + 1)^2 \ `) #meanwhile 如您所见,#pause 这是 $f(x)$ 的表达式。 #pause 通过因式分解,我们得到了结果。 = 与其他 Typst 包集成 == CeTZ 动画 在 Touying 中集成 CeTZ 动画: #cetz-canvas({ import cetz.draw: * rect((0,0), (5,5)) (pause,) rect((0,0), (1,1)) rect((1,1), (2,2)) rect((2,2), (3,3)) (pause,) line((0,0), (2.5, 2.5), name: "line") }) == Fletcher 动画 在 Touying 中集成 Fletcher 动画: #fletcher-diagram( node-stroke: .1em, node-fill: gradient.radial(blue.lighten(80%), blue, center: (30%, 20%), radius: 80%), spacing: 4em, edge((-1,0), "r", "-|>", `open(path)`, label-pos: 0, label-side: center), node((0,0), `reading`, radius: 2em), edge((0,0), (0,0), `read()`, "--|>", bend: 130deg), pause, edge(`read()`, "-|>"), node((1,0), `eof`, radius: 2em), pause, edge(`close()`, "-|>"), node((2,0), `closed`, radius: 2em, extrude: (-2.5, 0)), edge((0,0), (2,0), `close()`, "-|>", bend: -40deg), ) == 其他例子 #tblock(title: [Pinit, MiTeX, Codly, Ctheorems...])[ Touying 社区正在探索与更多 Typst 包的集成,详细情况可查阅#link("https://touying-typ.github.io/touying/zh/docs/category/package-integration")[文档]。 ] = 其他功能 == 双栏布局 #slide(composer: (1fr, 1fr))[ 我仰望星空, 它是那样辽阔而深邃; 那无穷的真理, 让我苦苦地求索、追随。 我仰望星空, 它是那样庄严而圣洁; 那凛然的正义, 让我充满热爱、感到敬畏。 ][ 我仰望星空, 它是那样自由而宁静; 那博大的胸怀, 让我的心灵栖息、依偎。 我仰望星空, 它是那样壮丽而光辉; 那永恒的炽热, 让我心中燃起希望的烈焰、响起春雷。 ] == 内容跨页 豫章故郡,洪都新府。星分翼轸,地接衡庐。襟三江而带五湖,控蛮荆而引瓯越。物华天宝,龙光射牛斗之墟;人杰地灵,徐孺下陈蕃之榻。雄州雾列,俊采星驰。台隍枕夷夏之交,宾主尽东南之美。都督阎公之雅望,棨戟遥临;宇文新州之懿范,襜帷暂驻。十旬休假,胜友如云;千里逢迎,高朋满座。腾蛟起凤,孟学士之词宗;紫电青霜,王将军之武库。家君作宰,路出名区;童子何知,躬逢胜饯。 时维九月,序属三秋。潦水尽而寒潭清,烟光凝而暮山紫。俨骖騑于上路,访风景于崇阿。临帝子之长洲,得天人之旧馆。层峦耸翠,上出重霄;飞阁流丹,下临无地。鹤汀凫渚,穷岛屿之萦回;桂殿兰宫,即冈峦之体势。 披绣闼,俯雕甍,山原旷其盈视,川泽纡其骇瞩。闾阎扑地,钟鸣鼎食之家;舸舰弥津,青雀黄龙之舳。云销雨霁,彩彻区明。落霞与孤鹜齐飞,秋水共长天一色。渔舟唱晚,响穷彭蠡之滨,雁阵惊寒,声断衡阳之浦。 遥襟甫畅,逸兴遄飞。爽籁发而清风生,纤歌凝而白云遏。睢园绿竹,气凌彭泽之樽;邺水朱华,光照临川之笔。四美具,二难并。穷睇眄于中天,极娱游于暇日。天高地迥,觉宇宙之无穷;兴尽悲来,识盈虚之有数。望长安于日下,目吴会于云间。地势极而南溟深,天柱高而北辰远。关山难越,谁悲失路之人;萍水相逢,尽是他乡之客。怀帝阍而不见,奉宣室以何年? 嗟乎!时运不齐,命途多舛。冯唐易老,李广难封。屈贾谊于长沙,非无圣主;窜梁鸿于海曲,岂乏明时?所赖君子见机,达人知命。老当益壮,宁移白首之心?穷且益坚,不坠青云之志。酌贪泉而觉爽,处涸辙以犹欢。北海虽赊,扶摇可接;东隅已逝,桑榆非晚。孟尝高洁,空余报国之情;阮籍猖狂,岂效穷途之哭! 勃,三尺微命,一介书生。无路请缨,等终军之弱冠;有怀投笔,慕宗悫之长风。舍簪笏于百龄,奉晨昏于万里。非谢家之宝树,接孟氏之芳邻。他日趋庭,叨陪鲤对;今兹捧袂,喜托龙门。杨意不逢,抚凌云而自惜;钟期既遇,奏流水以何惭? 呜呼!胜地不常,盛筵难再;兰亭已矣,梓泽丘墟。临别赠言,幸承恩于伟饯;登高作赋,是所望于群公。敢竭鄙怀,恭疏短引;一言均赋,四韵俱成。请洒潘江,各倾陆海云尔。 #align(center)[ 滕王高阁临江渚,佩玉鸣鸾罢歌舞。\ 画栋朝飞南浦云,珠帘暮卷西山雨。\ 闲云潭影日悠悠,物换星移几度秋。\ 阁中帝子今何在?槛外长江空自流。 ] // 附录通过冻结最后一张幻灯片的编号 #let s = (s.methods.appendix)(self: s) #let (slide, empty-slide) = utils.slides(s) == 附注 #slide[ - 您可以使用: ```sh typst init @preview/touying-buaa ``` 来创建基于本模板的演示文稿项目。 - 本模板仓库位于 #link("https://github.com/Coekjan/touying-buaa"),欢迎关注与贡献。 ]
https://github.com/QuadnucYard/pavemat
https://raw.githubusercontent.com/QuadnucYard/pavemat/main/examples/logo.typ
typst
MIT License
#import "../src/lib.typ": pavemat #let logo = { set math.mat(row-gap: 0.25em, column-gap: 0.1em) set text(size: 2em) pavemat( pave: ( "SDS(dash: 'solid')DDD]WW", (path: "sdDDD", stroke: aqua.darken(30%)) ), stroke: (dash: "dashed", thickness: 1pt, paint: red), fills: ( "0-0": green.transparentize(80%), "1-1": blue.transparentize(80%), "[0-0]": green.transparentize(60%), "[1-1]": blue.transparentize(60%), ), delim: "[", )[$mat(P, a, v, e; "", m, a, t)$] } #set page(width: auto, height: auto, margin: 0.5em, fill: white) #logo
https://github.com/7sDream/fonts-and-layout-zhCN
https://raw.githubusercontent.com/7sDream/fonts-and-layout-zhCN/master/chapters/04-opentype/collection.typ
typst
Other
#import "/template/template.typ": web-page-template #import "/template/components.typ": note #import "/lib/glossary.typ": tr #show: web-page-template // ## Font Collections == 字体集 // In OpenType, each instance of a font's family lives in its own file. So <NAME>'s Minion Pro family - available in two widths, four weights, four optical sizes, and roman and italic styles - ships as $$ 2 * 4 * 4 * 2 = 64 $$ separate `.otf` files. In many cases, some of the information contained in the font will be the same in each file - the character maps, the ligature and other substitution features, and so on. 在 OpenType 中,字体家族中的每一个字体实例都分别储存在独立的文件中。比如由 <NAME> 制作的,拥有两种宽度、四个字重、四个大小、罗马体和意大利体两种样式的 Minbion Pro 字体家族,就被分成了共计 $2*4*4*2 = 64$ 个`otf`文件。在大多数情况下,这些字体文件中的某些信息会是相同的,比如#tr[character]映射表、#tr[ligature]和其他#tr[character]#tr[substitution]特性等。 // Font collections provide a way of both sharing this common information and packaging families more conveniently to the user. Originally called TrueType Collections, a font collection is a single file (with the extension `.ttc`) containing multiple fonts. Each font within the collection has its own Offset Table, and this naturally allows it to share tables. For instance, a collection might share a `GSUB` table between family members; in this case, the `GSUB` entry in each member's Offset Table would point to the same location in the file. 源自TrueType的字体集则是一种便于相同信息共享和字体家族打包的储存方式。字体集使用单个文件(后缀名为`ttc`)来储存多个字体。每个字体有自己的偏移量表,这样就天然的支持了数据表的共享。比如,只需将所有字体偏移量表中的`GSUB`条目指向文件中的同一位置,就可以让字体家族成员都使用同一个`GSUB`表。 // A collection is, then, a bunch of TrueType fonts all welded together, with a header on top telling you where to locate the Offset Table of each font. Here's the start of Helvetica Neue: 字体集中的TrueType字体连续储存,在整个文件的开始处则又有一个偏移量表,来指明每个字体的位置。如下是 Helvetica Neue 字体集的起始数据: ``` 00000000: 7474 6366 0002 0000 0000 000b 0000 0044 ttcf...........D 00000010: 0000 0170 0000 029c 0000 03c8 0000 04f4 ...p............ ``` // `ttcf` tells us that this is a TrueType collection, then the next four bytes tell us this is using version 2.0 of the TTC file format. After that we get the number of fonts in the collection (`0x0000000b` = 11), followed by 11 offsets: the Offset Table of the first font starts at byte 0x44 of this file, the next at 0x170, and so on. `ttcf`文件头告诉我们这是一个TrueType字体集文件,接下来的四个字节表示这是TTC文件格式的2.0版。之后的 `0x0000000b = 11` 则是集合中的字体数量,再后面 11 个字节就是这些字体在文件中的位置。比如这里显示第一个字体在`0x44`,第二个在`0x170`等。
https://github.com/a-kkiri/CUMCM-typst-template
https://raw.githubusercontent.com/a-kkiri/CUMCM-typst-template/main/template/main.typ
typst
Apache License 2.0
#import "../lib.typ": * #show: thmrules #show: cumcm.with( title: "全国大学生数学建模竞赛 Typst 模板", problem-chosen: "A", team-number: "1234", college-name: " ", member: ( A: " ", B: " ", C: " ", ), advisor: " ", date: datetime(year: 2024, month: 9, day: 8), cover-display: true, abstract: [ #link("https://github.com/a-kkiri/CUMCM-typst-template")[本文档]是为全国大学生数学建模竞赛编写的 Typst 模板,旨在让大家专注于论文的内容写作,,而不用花费过多精力在格式的定制和调整上。本文档默认页边距为2.5cm,本模板使用的字体如下:中易宋体(SimSun),中易黑体(SimHei),中易楷体(SimKai),Times New Romans,字号为12pt(小四),Windows 系统自带这些字体,但是对于 WebAPP/Linux/MacOS 使用者请到仓库自行获取这些字体。 本模板文件由主要以下六部分组成: #list(indent:4em, [main.typ 主文件], [template.typ 文档格式控制,包括一些基础的设置、函数], [refs.bib 参考文献], [fonts 字体文件夹], [figures 图片文件夹] )\ #v(-16pt) ], keywords: ("Typst", "模板", "数学建模"), ) = 模板的基本使用 使用本模板之前,请阅读模板的使用说明文档。下面是本模板使用的基本样式: #figure( block(inset: 8pt, stroke: 0.5pt, radius: 3pt)[ ```typ #import "@preview/cumcm-muban:0.1.0": * #show: thmrules #show: cumcm.with( title: "论文的标题", problem-chosen: "A", // 选择的题目 team-number: "1234", // 团队的编号 college-name: "高校的名称", member: ( A: "成员A", B: "成员B", C: "成员C", ), advisor: " ", // 指导教师 date: datetime(year: 2023, month: 9, day: 8), // 日期 cover-display: true, // 是否显示封面以及编号页 abstract: [ 此处填写摘要内容 ], keywords: ("关键字1", "关键字2", "关键字3"), ) // 正文内容 // 参考文献 #bib(bibliography("refs.bib")) // 附录 = 附录 A ```], caption: "基本样式") \ 根据要求,电子版论文提交时需去掉封面和编号页。可以将 `cover-display` 设置为 false 来实现,即: #block(inset: 8pt, stroke: 0.5pt, radius: 3pt, width: 100%)[```typ cover-display: false, // 是否显示封面与编号页 ```] 这样就能实现了。 请确保你的论文内容符合要求,包括但不限于页数、格式、内容等。 下面给出写作与排版上的一些示例。 = 图片 在数学建模中,我们经常需要插入图片。Typst 支持的图片格式有 "png", "jepg", ""gif"", "svg",其他类型的图片无法插入文档。我们可以通过改变参数 `width` 来改变图片的大小,详见#link("https://typst.app/docs/reference/visualize/image/")[typst/docs/image]。下面是一些图片插入的示例: #figure( image("./figures/f2.svg", width: 70%), caption: [ 单图示例 ], ) #figure( grid( columns: 2, gutter: 2pt, image("./figures/f1.png"), image("./figures/f1.png"), text("(a)venn 图", size: 10pt), text("(b)venn 图", size: 10pt) ), caption: [ 多图并排示例 ], ) = 表格 数学建模中表格有助于数据的整理与展示。Typst 支持使用 `table` 来插入表格,详见 #link("https://typst.app/docs/reference/model/table/")[typst/docs/table]。下面是一些表格插入的示例: #figure( table( columns: (auto, auto, auto), inset: 10pt, align: horizon, table.header( [], [*Area*], [*Parameters*], ), [*Cylinder*], [$pi h (D^2 - d^2) / 4$], [ $h$: height \ $D$: outer radius \ $d$: inner radius ], [*Tetrahedron*], [$sqrt(2) / 12 a^3$], [$a$: edge length] ), caption: "表格示例" ) #figure( table( columns: 4, align: center + horizon, stroke: none, table.hline(), table.header( table.cell(rowspan: 2, [*Names*]), table.cell(colspan: 2,[*Properties*],), table.hline(stroke: 0.6pt), table.cell(rowspan: 2, [*Creators*]), [*Type*], [*Size*], ), table.hline(stroke: 0.4pt), [Machine], [Steel], [5 $"cm"^3$], [John p& Kate], [Frog], [Animal], [6 $"cm"^3$], [Robert], [Frog], [Animal], [6 $"cm"^3$], [Robert], table.hline() ), caption: "三线表示例" ) #figure( block(inset: 8pt, stroke: 0.5pt, radius: 3pt)[ ```typ #figure( table( columns: 4, align: center + horizon, stroke: none, table.hline(), table.header( table.cell(rowspan: 2, [*Names*]), table.cell(colspan: 2,[*Properties*],), table.hline(stroke: 0.6pt), table.cell(rowspan: 2, [*Creators*]), [*Type*], [*Size*], ), table.hline(stroke: 0.4pt), [Machine], [Steel], [5 $"cm"^3$], [John p& Kate], [Frog], [Animal], [6 $"cm"^3$], [Robert], [Frog], [Animal], [6 $"cm"^3$], [Robert], table.hline() ), caption: "表格示例" ) ```] ) 更多使用方法可以查看 #link("https://typst.app/docs/reference/model/table/")[typst/docs/table]。 = 公式 数学建模中,公式的使用是必不可少的。Typst 可以使用 Typst 原生语法插入公式,参考 #link("https://typst.app/docs/reference/math/")[typst/docs/math]。下面是一些公式插入的示例: 首先是行内公式,例如 $a^2 + b^2 = c^2$。行内公式使用 `$$` 包裹,公式和两端的 `$$` 之间没有空格。 其次是行间公式,例如:$ integral.triple_(Omega)\(frac(diff P, diff x) + frac(diff Q, diff y) + frac(diff R, diff z)\)d v = integral.surf_(Sigma)P d y d z + Q d z d x + R d x d y $ 式(1)是高斯公式。行间公式使用 `$$` 环境包裹,公式和两端的 `$$` 之间至少有一个空格。 公式内可以使用换行符 `\` 换行。若需要对齐,每行可以包含一个或多个对齐点 `&` 对其进行对齐。例如: $ sum_i b_i &= sum_i sum_(h,j != i) frac(sigma_(h j) (i), sigma_(h j)) \ &= sum_(h != j) frac(1, sigma_(h j)) sum_(i != h,j) sigma_(h j)(i) $ `&` 是对齐的位置,`&` 可以有多个,但是每行的个数要相同。 矩阵输入示例: $ A = mat( a_(1 1), a_(1 2), ..., a_(1 n); a_(2 1), a_(2 2), ..., a_(2 n); dots.v, dots.v, dots.down, dots.v; a_(n 1), a_(n 2), ..., a_(n n); ) $ \ 分段函数可以使用 `case` 环境: $ f\(x\)= cases( 0 #h(1em) x text("为无理数,") , 1 #h(1em) x text("为有理数.") ) $ 假如要公式里面有个别文字,需要把这部分放在 text 环境里面,即 `text[文本内容]` 。 如果公式中有个别需要加粗的字母,可以使用 `bold()` 进行加粗。如,$alpha a bold(alpha a)$。 以上仅为一些简单的公式示例,更多的公式使用方法可以查看 #link("https://typst.app/docs/reference/math/")[typst/docs/math] 另外,如果需要插入 LaTeX 公式可以使用外部包 #link("https://typst.app/universe/package/mitex")[mitex]。 = 定理环境 在本模板中,我们定义了一些常用的定理环境,包括 theorem 、 lemma、corollary、 assumption、 conjecture、axiom、principle、problem、example、proof、solution。可以根据论文的实际需求合理使用。 #definition[这是一个定义] #lemma[这是一个引理] #corollary[这是一个推论] #assumption[这是一个假设] #conjecture[这是一个猜想] #axiom[这是一个公理] #principle[这是一个定律] #problem[这是一个问题] #example[这是一个例子] #proof[这是一个证明] #solution[这是一个解] = 其他功能 == 脚注 利用 `#footnote(脚注内容)`可以生产脚注 #footnote("脚注例") == 无序列表与有序列表 无序列表例: #list( [元素1], [元素2], [...] ) \ 有序列表例: #enum( [元素1], [元素2], [...] ) == 字体粗体与斜体 如果想强调部分内容,可以使用加粗的手段来实现。加粗字体可以用 `*需要加粗的内容*` 或 `#strong[需要加粗的内容]` 来实现。例如:*这是加粗的字体,This is bold fonts*。 中文字体没有斜体设计,但是英文字体有。_斜体 Italics_。 = 参考文献与引用 参考文献对于一篇正式的论文来说是必不可的,在建模中重要的参考文献当然应该列出。Typst 支持使用 BibTeX 来管理参考文献。在 `refs.bib` 文件中添加参考文献的信息,然后在正文中使用 `#cite(<引用的文献的 key>)` 来引用文献。例如:#cite(<netwok2020>)。最后通过 `#bib(bibliography("refs.bib"))` 来生成参考文献列表。 #bib(bibliography("refs.bib")) #pagebreak() #appendix("线性规划 - Python 源程序", ```py import numpy as np from scipy.optimize import linprog c = np.array([2, 3, 1]) A_up = np.array([[-1, -4, -2], [-3, -2, 0]]) b_up = np.array([-8, -6]) r = linprog(c, A_ub=A_up, b_ub=b_up, bounds=((0, None), (0, None), (0, None))) print(r) ```) #appendix("非线性规划 - Python 源程序", ```py from scipy import optimize as opt import numpy as np from scipy.optimize import minimize # 目标函数 def objective(x): return x[0] ** 2 + x[1] ** 2 + x[2] ** 2 + 8 # 约束条件 def constraint1(x): return x[0] ** 2 - x[1] + x[2] ** 2 # 不等约束 def constraint2(x): return -(x[0] + x[1] ** 2 + x[2] ** 2 - 20) # 不等约束 def constraint3(x): return -x[0] - x[1] ** 2 + 2 def constraint4(x): return x[1] + 2 * x[2] ** 2 - 3 # 不等约束 # 边界约束 b = (0.0, None) bnds = (b, b, b) con1 = {'type': 'ineq', 'fun': constraint1} con2 = {'type': 'ineq', 'fun': constraint2} con3 = {'type': 'eq', 'fun': constraint3} con4 = {'type': 'eq', 'fun': constraint4} cons = ([con1, con2, con3, con4]) # 4个约束条件 x0 = np.array([0, 0, 0]) # 计算 solution = minimize(objective, x0, method='SLSQP', bounds=bnds, constraints=cons) x = solution.x print('目标值: ' + str(objective(x))) print('答案为') print('x1 = ' + str(x[0])) print('x2 = ' + str(x[1])) ```)
https://github.com/WinstonMDP/math
https://raw.githubusercontent.com/WinstonMDP/math/main/knowledge/groups.typ
typst
#import "../cfg.typ": cfg #show: cfg = Groups A group $:=$ a monoid where all elements are invertible. A group is abelian $:=$ it's commutative. A general linear group over a ring $R$ of an order $n := op("GL"_n) R := {A in op(L_n) R mid(|) det A != 0}$. A special linear group over a ring $R$ of an order $n := op("SL"_n) R := {A in op(L_n) R mid(|) det A = 1}$. A cyclic group generated by an element $a := angle.l a angle.r := {a^z mid(|) z}$. An integer $z$ is a finite order of an element $a := a^z = 1$. An element $a$ has an infinite order $:= exists.not$ a finite order of it. *Cayley's theorem:* A finite group of an order $n$ is isomorphic to a subgroup of $S_n$. $op("Aut") G :=$ a set of automorphisms of the group G. A group of inner automorphisms of a group $G := op("Inn") G := {g |-> a g a^(-1) mid(|) a in G}$. A kernel of a homomorphism $f in G'^G := {g mid(|) op(f) g = 1}$. A monomorphism $:=$ an injective homomorphism. An epimorphism $:=$ an surjective homomorphism.
https://github.com/typst/packages
https://raw.githubusercontent.com/typst/packages/main/packages/preview/board-n-pieces/0.1.0/chess-sym.typ
typst
Apache License 2.0
#let pawn = symbol( ("filled", "♟"), ("stroked", "♙"), ("white", "♙"), ("black", "♟"), ) #let knight = symbol( ("filled", "♞"), ("stroked", "♘"), ("white", "♘"), ("black", "♞"), ) #let bishop = symbol( ("filled", "♝"), ("stroked", "♗"), ("white", "♗"), ("black", "♝"), ) #let rook = symbol( ("filled", "♜"), ("stroked", "♖"), ("white", "♖"), ("black", "♜"), ) #let queen = symbol( ("filled", "♛"), ("stroked", "♕"), ("white", "♕"), ("black", "♛"), ) #let king = symbol( ("filled", "♚"), ("stroked", "♔"), ("white", "♔"), ("black", "♚"), )
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compiler/array-18.typ
typst
Other
// Error: 2-24 array index out of bounds (index: -4, len: 3) #(1, 2, 3).slice(0, -4)
https://github.com/jxpeng98/typst-coverletter
https://raw.githubusercontent.com/jxpeng98/typst-coverletter/main/CHANGELOG.md
markdown
MIT License
## Update - Update typst-fontawesome to 0.5.0 - Work with Typst 0.12.0
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/text/features-07.typ
typst
Other
// Test raw features. #text(features: ("smcp",))[Smcp] \ fi vs. #text(features: (liga: 0))[No fi]
https://github.com/typst/packages
https://raw.githubusercontent.com/typst/packages/main/packages/preview/yagenda/0.1.0/template/main.typ
typst
Apache License 2.0
#import "@preview/yagenda:0.1.0": * #show: agenda.with( name: "Pumpkins and peanuts committee", date: "03/01/2000", time: "2 pm", location: "baseball field", invited: [Sally, Shroeder, Pig-pen, Marcie] ) // load external yaml #let topics = yaml("agenda.yaml") // alternative: embed yaml in-place // #let tmp = ` // "linus blanket workshop": // Topic: Linus and his blanket // Time: 20 mins // Lead: Lucy // Purpose: Understand, *Support* // Preparation: | // - Bring your own security blanket (optional) // - Reflect on the significance of Linus's blanket // Process: | // - Discuss the history and symbolism of Linus's security blanket // - Explore ways to help both Linus and Snoopy // - Release a blanket statement // "snoopy plane fights": // Topic: Snoopy vs the Baron // Time: 10 mins // Lead: Woodstock // Purpose: Support // Preparation: | // - Bring your favorite Snoopy flying ace memory // - Reflect on Snoopy's aerial prowess // Process: | // - Share anecdotes from Snoopy's battles // - Discuss the psychological implications of Snoopy's dogging of bullets`.text // #let topics = yaml.decode(tmp) #agenda-table(topics) #set page(flipped: false) == Appendix #lorem(120)
https://github.com/ckunte/m-one
https://raw.githubusercontent.com/ckunte/m-one/master/inc/unconditional.typ
typst
= Unconditional Some years ago, while fixing an _UnboundLocalError_ in my code, I realised that I tint my scripts unconsciously with cyclomatic complexity --- an avoidable habit I picked up as a young engineer. Back then, time-sharing was still very much a necessity, and so I would spend much of my time buckling-down and performing hand-calculations instead. Conditional problems worsened this, like for instance, referring to a table to pick an option, and then use its data to perform specific calculations. Also, results for ten options when I needed for one or two, at the time felt both repetitive as well as unnecessary. Scripts produced from thinking linearly tend to grow verbose is what I've come to realise. Whereas knowing results for the cases (or ranges) that I may not readily be interested-in offers new insights, sans extra labour. And so, running with an entire dataset instead of one value contained within, gives me a high now. To echo the words of Dr Richard Hamming@hamming_insight, _"The purpose of computing is insight, not numbers."_~ Here in examples below, I am trying to calculate bending stresses in piles hung over the aft of a transport vessel. In the first example, I front-load a range of motions for each of which I get to map corresponding bending stresses in a pile section with a certain fixed pile length. See @u1. In the second, I nail down a motion set (e.g., large barge criteria, but can be anything specific), and map acceptable length of overhang. See @u2. Shaded area indicates exceeding strength limits. #figure( image("/img/unconditional-1.png", width: 100%), caption: [ Generating bending stress in overhung pile for a range of vessel motions (left:from pitch; right:from roll) ], ) <u1> #figure( image("/img/unconditional-2.png", width: 100%), caption: [ Generating bending stress for a range of pile overhang for specific vessel motions (left:from pitch; right:from roll) ], ) <u2> Code for @u1 is as follows. #let ptow = read("/src/ptow.py") #{linebreak();raw(ptow, lang: "python")} Code for @u2 is as follows. #let ptow-ls = read("/src/ptow-ls.py") #{linebreak();raw(ptow-ls, lang: "python")} $ - * - $
https://github.com/ashl3y-v/cv
https://raw.githubusercontent.com/ashl3y-v/cv/main/cv.typ
typst
#show text: set text(font: "EB Garamond") #show link: underline #show link: set text(fill: rgb("#318CE7")) #set list(indent: 4pt, marker: [--]) = <NAME> #link("mailto:<EMAIL>")[`<EMAIL>`] | #link("mailto:<EMAIL>")[`<EMAIL>`] | `480-869-2096` | #link("https://github.com/ashl3y-v")[`ashl3y-v`] on Github == Education #line(length: 100%) - Carnegie Mellon University - School of Computer Science #h(1fr) August 2024 -- Present\ Bachelors in Computer Science #h(1fr) Pittsburgh, PA\ Relevant classses: 15-122 (imperative computation), 21-242 (matrix theory),\ 15-151 (mathematical foundations for CS) - MIT Lincoln Labs BeaverWorks Summer Institute (BWSI) #h(1fr) July 2023 -- August 2023\ Embedded security and hardware hacking course (in C) #h(1fr) Virtual\ Learning about embedded systems, cryptography, side-channel analysis, and other vulnerabilities == Skills #line(length: 100%) - Languages: Rust, C, and Python - Programming language theory and type theory\ - Type systems' safety and effects on performance and parallelism (e.g. substructural type systems, compiler optimizations and analysis) - Theorem proving and formalization, Lean, type theoretic foundations for mathematics (e.g. Homotopy Type Theory) - Security (encryption, common software vulnerabilities) - Linux and Bash (Arch Linux as primary OS for >2 years) - Machine learning (Pytorch, architecture and efficiency of various models and algorithms) == Awards #line(length: 100%) - Team #link("https://github.com/ashl3y-v/obsidian")[Obsidian] #h(1fr) August 2023\ Designed a firmware update system for an embedded device\ Won the MIT BWSI design challenge/CTF - National Spanish Exam Gold Medal #h(1fr) 2022 == Interests #line(length: 100%) - Theoretical Computer Science - Algorithms and complexity theory - Mathematics - Abstract algebra, graph theory, category theory, linear algebra - CMU Math Club - Various projects in mathematics, algorithms, and other miscellaneous areas (#link("https://github.com/ashl3y-v/thoughts/")[Blog]) - Ethics and Philosophy - Fencing (Sabre)
https://github.com/soul667/typst
https://raw.githubusercontent.com/soul667/typst/main/保研/PPT(16-9)/main.typ
typst
#import "@preview/touying:0.4.0": * #import "university.typ" #import "@preview/pinit:0.1.4": * // #import "@preview/grayness:0.1.0":* #let data=yaml("./example.yml") // 设置16比9的幻灯片 #let s = university.register(aspect-ratio: "16-9") #let s = (s.methods.info)( self: s, title: [#data.标题页.主标题 ], subtitle: [#data.标题页.副标题], author: [#data.标题页.姓名], date: datetime.today(), institution: [#data.标题页.学校], ) #let (init, slides, touying-outline, alert) = utils.methods(s) #show: init #let themeColor=rgb("#19448e") #let (slide, title-slide, focus-slide, matrix-slide) = utils.slides(s) #show: slides #slide(header:"目录 CONTENTS")[ == Table of contents // #set text(size: 1.2em) + 基本信息 + 获得荣誉 + 竞赛获奖 + 科研/项目经历 + 其他影响 // #set text(size: 1em) // #touying-outline() ] // #heading(level: 1,[课题研究]) = 1 基本介绍 #slide(header:"1.1 基本信息",now_light:"0")[ // == 1111222222 // 11 #place(left,dy:0.7em,dx:2em,[ #image(data.第一页.照片链接,width: 6.5em) ]) // 左边放你的大头照 #place(left,dx:11em,dy:0.7em,[ #text(size: 32pt, fill: rgb("#19448e"), weight: "bold",[古翱翔]) #text(size: 17pt, fill: rgb("#19448e"), font:"FangSong",weight: "bold",[#data.第一页.描述]) #v(-0.6em) // #university.basic_info("本科院校",) #let size_=0.8em; #text(size: size_, fill: rgb("#19448e"), ([#data.标题页.学校 / #data.标题页.专业])) #v(-0.4em) // #line( color: rgb("#19448e")) #line(length: 60%, stroke: 1pt + themeColor) // #university.basic_info("本科专业",) #let edu=data.第一页.成绩; #let grade=str(edu.成绩)+" ("+str(edu.排名)+"/"+str(edu.总人数)+" , "+str({calc.round(edu.排名/edu.总人数*100,digits: 2)})+ "%"+")" // #let edu-items = "" // #let 综合排名= " "+" 综合成绩预计"+str(edu.综合排名)+"/"+ str(edu.总人数)+" ("+str({calc.round(edu.综合排名/edu.总人数*100,digits: 2)})+ "%)" // edu-items = edu-items + "- *学业成绩*: " + str(edu.成绩)+" , "+str(edu.排名)+"/"+ str(edu.总人数)+" ("+str({calc.round(edu.排名/edu.总人数*100,digits: 2)})+ "%)" #v(-0.5em) #university.basic_info("出生年月",[2003年10月2日]) #university.basic_info("专业成绩",strong([#grade])) #university.basic_info("英语成绩",edu.英语成绩) #university.basic_info("任职经历",data.第一页.任职经历) #text(size: size_, fill: rgb("#19448e"), weight: "bold",font:("Times New Roman","Source Han Serif"), "已确定拿到推免资格") // #university.basic_info("","") // #university.big_small("95","数字图像处理",25pt,15pt) // #university.big_small("88.9","均分",25pt,15pt) // #university.big_small("88.9","均分",25pt,15pt) // 在某个地方放置分列 // #place(left,dy:35pt,dx:1pt,[ ]) #place(left,dx:1em,dy:11.7em,[ #line(length: 90%, stroke: 1pt + themeColor) #v(-0.7em) #set rect( inset: 8pt, fill: rgb("e4e5ea"), width: 100%, ) #let rect_size=4.5em #grid( columns: (rect_size,rect_size,rect_size,rect_size,rect_size,rect_size), rows: (auto), gutter: 3pt, rect[#university.big_small("6.4%","RANK",25pt,15pt) ], rect[#university.big_small("135","已修学分",25pt,15pt)], rect[#university.big_small("99","线性代数",25pt,15pt)], rect[#university.big_small("98","概率论",25pt,15pt)], rect[#university.big_small("95","光电系统设计",25pt,15pt)], rect[#university.big_small("95","数字图像处理",25pt,15pt)], ) // ]) ]) ] // = 2获得荣誉 #let 文字22=[ // 第十八届挑战杯特等奖 // #text(size: 0.8em, fill: black, weight: "bold", // "RoboMaster") #text(size: 0.6em, fill: rgb("#19448e"), weight: "bold", "物理与光电工程学院院长特别奖学金") // #text(size: 0.8em, fill: black, "(2/7)") ] #let 文字23=[ // 第十八届挑战杯特等奖 // #text(size: 0.8em, fill: black, weight: "bold", // "RoboMaster") #text(size: 0.6em, fill: rgb("#19448e"), weight: "bold", "2023-2024年度学生创新创业先进个人") // #text(size: 0.8em, fill: black, "(2/7)") ] // #slide(header:"2 获得荣誉")[ // // #university.basic_info("物理与光电工程学院院长特别奖学金","本硕博同评、本科仅一") // // #university.basic_info("校优秀奖学金","多次") // // #university.big_small1("物理与光电工程学院院长特别奖学金","本硕博同评、本科仅一",25pt,15pt) // // #university.big_small1("2023-2024年度“五四”评比表彰“学生创新创业先进个人","表彰在学校创新创业工作中做出突出贡献的学生",25pt,15pt) // #v(1em) // #align( // center, // [ // #university.荣誉表_名称("物理与光电工程学院院长特别奖学金","本硕博同评、本科仅一") // // #university.荣誉表_名称("校优秀奖学金","多次") // #university.荣誉表_名称("2023-2024年度“五四”评比表彰“学生创新创业先进个人","表彰在学校创新创业工作中做出突出贡献的学生") // #university.荣誉表_名称("校优秀奖学金","多次") // ] // ) // ] #slide(header:"1.2 获得荣誉")[ #place(left,dy:0.7em,dx:2em, university.竞赛获奖("11",文字22,"./img/院长特别奖学金.jpg",7.9em,42%)) #place(left,dy:0.7em,dx:17em, university.竞赛获奖("11",文字23,"./img/先进个人.jpg",7.9em,42%)) // #place(left,dy:0.7em,dx:19em, university.竞赛获奖("11",文字2_,"./img/RoboMaster全国赛获奖证书.jpg",7.2em,38%)) ] = 3 竞赛获奖 #let 文字2=[ // 第十八届挑战杯特等奖 #text(size: 0.8em, fill: black, weight: "bold", "第十八届挑战杯全国") #text(size: 1.1em, fill: rgb("#19448e"), weight: "bold", "特等奖") #text(size: 0.8em, fill: black, "(2/7)") ] #let 文字2_=[ // 第十八届挑战杯特等奖 #text(size: 0.8em, fill: black, weight: "bold", "RoboMaster") #text(size: 0.8em, fill: rgb("#19448e"), weight: "bold", "全国二等奖") // #text(size: 0.8em, fill: black, "(2/7)") ] #let 文字21=[ #text(size: 0.8em, fill: black, weight: "bold", "RoboMaster") #text(size: 0.8em, fill: rgb("#19448e"), weight: "bold", "北部亚军") ] #let 文字24=[ #text(size: 1.3em, fill: rgb("#19448e"), weight: "bold", "竞赛经历及任职") ] #let 文字专利=[ #text(size: 0.7em, fill: rgb("#19448e"), weight: "bold", "第一作者发表发明专利一项") #text(size: 0.3em, "(未授权)") ] #let 文字25=[ #text(size: 0.7em, fill: rgb("#19448e"), weight: "bold", "被黑龙江新闻联播采访") // #text(size: 0.3em, "(未授权)") ] #slide(header:"3.1 比赛任职经历")[ #place(left,dy:0.7em,dx:1.7em, university.竞赛获奖("11",文字24,"./img/竞赛经历v1.0.drawio.svg",17.2em,65%)) #place(left,dy:2.5em,dx:22.2em, image("img/创梦之翼介绍.drawio.svg",width: 8em)) ] #slide(header:"3.1 比赛任职经历")[ #place(left,dy:0.5em,dx:-1.2em, university.竞赛获奖("11",[ #text(size: 0.6em, fill: rgb("#19448e"), weight: "bold", "RoboMaster 2024 区域赛合照(武汉)") ],"./img/武汉参赛照片.jpg",14.2em,51%)) // #place(left,dy:2.1em,dx:23.7em, image("img/创梦之翼介绍.drawio.svg",width: 6em)) #place(left,dy:0.5em,dx:15.2em, university.竞赛获奖("11",[ #text(size: 0.6em, fill: rgb("#19448e"), weight: "bold", "第十八届挑战杯合照(贵州)") ],"./img/挑战杯合照.jpg",14.2em,51%)) ] #slide(header:"3.2 获得国家级特等奖一项,二等奖一项")[ #place(left,dy:0.7em,dx:2em, university.竞赛获奖("11",文字2,"./img/面向核电领域高性能智能检测获奖证书.png",15em,51%)) #place(left,dy:0.7em,dx:19em, university.竞赛获奖("11",文字2_,"./img/RoboMaster全国赛获奖证书.jpg",7.2em,38%)) ] #slide(header:"3.3 省奖2 项,第一作者发表发明专利一项.")[ // #place(left,dy:0.7em,dx:2em, university.竞赛获奖("11",文字2,"./img/面向核电领域高性能智能检测获奖证书.png",15em,51%)) #place(left,dy:0.7em,dx:-1em, university.竞赛获奖("11",文字21,"./img/RoboMaster区域赛获奖证书.jpg",7.2em,35%)) #place(left,dy:0.7em,dx:12em, university.竞赛获奖("11",文字专利,"./img/一种轮足式机器人腿部结构-受通.jpg",7.2em,45%)) // #place(left,dy:0.7em,dx:11em, university.专利_两个图片("11",文字专利,"./img/一种轮足式机器人腿部结构-受通.jpg","./img/一种轮足切换式机器人-受通.jpg",0em,7.5em,65%)) // #place(left,dy:0.7em,dx:11em, university.竞赛获奖("11",文字24,"./img/竞赛经历v1.0.drawio.svg",17.2em,65%)) ] = 4 科研/项目经历 #slide(header:"4.0 概览")[ // #grid( // columns: (auto,auto,auto), // rows: (auto), // gutter: 3pt, // [ // #university.分类("①视觉算法",("能量机关自动瞄准系统","装甲板自动瞄准系统","轮腿机器人仪表监测和导航"),8em,1) // ],[ // #university.分类("②嵌入式",("能量机关嵌入式部分","海洋水质监测系统嵌入式部分"),8em,1) // ], // [ // #university.分类("③软件/其他",("海洋水质监测系统后台系统"),8em,0) // ] // ) #place(left,dx:2.8em,dy:0.4em,[ #image("./img/项目概述.drawio.svg",width: 23em) ]) ] #import "@preview/showybox:2.0.1": showybox #import "@preview/tablex:0.0.8": tablex, rowspanx, colspanx #slide(header:"4.1 RoboMaster-自动瞄准系统")[ // #v(-1em) #place(right+bottom,dx:1.6em,dy:-1.1em,[ #tablex( columns: 2, align: left + horizon, auto-vlines: false, header-rows: 2, [*参数*], [*值*], [*工作距离*], [1-10m], // [稳定工作], [超], [*帧率*],[约230fps], [*语言*],[C++], [*代码量*],[约2700行], ) ]) // #h(5em) #place(left,dx:-1.2em,[ #image("./img/自瞄系统示意图-修正.drawio.svg",width: 31em) ]) ] #slide(header:"4.1 RoboMaster-自动瞄准系统-展示")[ // #v(-1em) // #h(5em) #place(left,dx:-1.2em,dy:1.3em,[ // #image("./img/自瞄视频1.png",width: 15em) #university.竞赛获奖("11",[ #text(size: 0.7em, fill: rgb("#19448e"), weight: "bold", "自瞄系统场上效果") ],"./img/白色.png",14.9em,54%) ]) #place(left,dx:15em,dy:1.3em,[ // #image("./img/自瞄视频1.png",width: 15em) #university.竞赛获奖("11",[ #text(size: 0.7em, fill: rgb("#19448e"), weight: "bold", "自瞄系统仿真测试") ],"./img/白色.png",14.9em,54%) ]) ] #slide(header:"4.2 RoboMaster-能量机关击打系统")[ #image("./img/能量机关击打系统.drawio.svg",width: 27em) #place(right+bottom,dx:0.6em,dy:-0.8em,[ #tablex( columns: 2, align: left + horizon, auto-vlines: false, header-rows: 2, [*参数*], [*值*], // [稳定工作], [超], [*工作距离*], [8-10m], [*帧率*],[约120fps], [*语言*],[C++], [*代码量*],[约1900行], ) ]) ] #slide(header:"4.2 RoboMaster-能量机关击打系统-展示")[ // #v(-1em) // #h(5em) #place(left,dx:-1.2em,dy:1.3em,[ // #image("./img/自瞄视频1.png",width: 15em) #university.竞赛获奖("11",[ #text(size: 0.7em, fill: rgb("#19448e"), weight: "bold", "能量机关击打测试") ],"./img/白色.png",14.9em,54%) ]) #place(left,dx:15em,dy:1.3em,[ // #image("./img/自瞄视频1.png",width: 15em) #university.竞赛获奖("11",[ #text(size: 0.7em, fill: rgb("#19448e"), weight: "bold", "算法效果展示") ],"./img/白色.png",14.9em,54%) ]) ] #slide(header:"4.3 RoboMaster-能量机关系统(嵌入式部分)")[ // 11 #image("./img/能量机关嵌入式部分.drawio.svg",width: 27em) #place(right+bottom,dx:0.6em,dy:-2.8em,[ #tablex( columns: 2, align: left + horizon, auto-vlines: false, header-rows: 2, [*参数*], [*值*], // [稳定工作], [超], [*语言*], [C], [*使用库*],[HAL库], // [*语言*],[C++], [*代码量*],[约1100行], [*EDA*],[嘉立创], ) ]) ] #slide(header:"4.4 面向核电领域高性能智能检测轮腿机器人")[ #image("./img/挑战杯项目.drawio.svg",width: 30em) ] #slide(header:"4.5 海洋水质监测系统-电控+机械(课程设计)")[ #image("./img/海洋水质监测系统-嵌入式.drawio.svg",width: 28em) ] #slide(header:"4.6 海洋水质监测系统-后台(课程设计)")[ #image("./img/海洋水质监测系统-后台系统.drawio.svg",width: 30em) ] = 5 其他影响 #slide(header:"5 其他影响")[ // #align( // left, // [ // 获黑龙江省新闻联播报道。 // 多次被校级媒体报道、采访。 // // #university.竞赛表_名称("全国大学生数学建模竞赛","二等奖") // ] // ) #place(left,dy:0.7em,dx:-1em, university.竞赛获奖("11",文字25,"./img/黑龙江省新闻联播2.png",15.2em,55%)) #place(left,dy:0.7em,dx:17em, university.竞赛获奖("11", [ #text(size: 0.7em, fill: rgb("#19448e"), weight: "bold", "学校官方公众号报道") ],"./img/官号报道1.png",11.2em,44%)) ] // = 05 研究生规划
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/visualize/shape-rect-03.typ
typst
Other
// Error: 15-21 expected length, color, dictionary, stroke, none, or auto, found array #rect(stroke: (1, 2))
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compute/construct-08.typ
typst
Other
// Error: 8-10 expected at least one variant #symbol()
https://github.com/DashieTM/ost-5semester
https://raw.githubusercontent.com/DashieTM/ost-5semester/main/web3/weeks/week11.typ
typst
#import "../../utils.typ": * #section("PWA") - "native" applications on the web - cross platform, obviously #subsection("Firebase") - from google - serverless stuff - E2E testing with cypress #align( center, [#image("../../Screenshots/2023_11_30_06_42_09.png", width: 80%)], ) #columns(2, [ #text(green)[Benefits] - cross platform - "easy" to create -> this is debatable #colbreak() #text(red)[Downsides] - web... - "cross" platform... -> firefox? Do ALL features work everywhere? - speed -> single threaded ]) #subsection("Mobx") #align( center, [#image("../../Screenshots/2023_11_30_06_52_29.png", width: 100%)], ) #align( center, [#image("../../Screenshots/2023_11_30_06_52_49.png", width: 100%)], ) #align( center, [#image("../../Screenshots/2023_11_30_06_53_11.png", width: 100%)], )
https://github.com/polarkac/MTG-Stories
https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/056%20-%20Outlaws%20of%20Thunder%20Junction/008_A%20Pleasant%20Family%20Outing.typ
typst
#import "@local/mtgstory:0.2.0": conf #show: doc => conf( "A Pleasant Family Outing", set_name: "Outlaws of Thunder Junction", story_date: datetime(day: 21, month: 03, year: 2024), author: "<NAME>", doc ) THE EFFECTS OF TRANS-PLANAR RELOCATION ON INDIVIDUAL MAGICAL MANIFESTATIONS: #linebreak() A MONOGRAPH BY GERALF CECANI The recent discovery of trans-planar arteries, commonly termed "Omenpaths," following a natural phenomenon on the plane of Kaldheim, has reinvented and revived metamechanical studies in a way we will be grappling with for generations to come. Prior to these "Omenpaths," only individuals known as "Planeswalkers" were able to survive trans-planar travel, leading some to theorize that the Multiverse was flat, and that all planes of reality outside of Innistrad itself had been destroyed at some point in the distant past. As this is obviously no longer the case, scholarship surrounding the planes must be resurrected to help us better understand the cosmological forces around us. It is my belief that every plane of existence has its own rules of magic, a theory which was proven to my satisfaction by the Phyrexian invasion, in which their forces were unable to adjust to Innistrad's natural magic. We are not the only plane to play home to zombies and spirits, yet these fierce invaders were too slow to change their tactics and could not penetrate our magical defenses. They were still carrying the magic of their homeworld, a place whose name has been given multiple ways in the scholarship, and it was not compatible with the magic of our home. The second part of proving this theory is removing myself and my sister from Innistrad's embrace long enough for our magic to begin adapting itself to the natural rules of another plane. Through this process of "naturalization," I will be able to determine the safe duration of any such journey, before we begin to lose connection to our roots … #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) GERALF, YOU SELF-ABSORBED CORPSE-CATCHER! WE WON'T ADJUST TO OTHER PLANES! OTHER PLANES WILL ADJUST TO #emph[US] ! HOW COULD YOU EVEN THINK THAT OUR POWER WOULDN'T BE GREATER THAN WHATEVER PASSES FOR YOUR SO-CALLED NATURAL RULES! NO WONDER NO ONE LIKES YOU! #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) #figure(image("008_A Pleasant Family Outing/01.png", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) It was hard to say who was more surprised by the Cecani siblings' willingness to undertake the side mission to Thief's Folly—Oko, or Geralf. To Oko, Gisa's excitement about all those beautiful bones no doubt seemed like just another piece of the dizzy chaos she presented to the world, the woman who had never worried about consequences in her corpse-centric life. To Geralf, her excitement made sense, but not when it came with the potential for hard labor, and more, not when it came with the prospect of spending time alone with her brother. Geralf had his own reasons to accept the mission. Geralf always had his own reasons. And he tried to keep them firmly in mind as he followed his cackling, spinning sister behind the stable, to the soft, spongy ground created by mucking out the stalls and dumping the rain barrels. Most of this land is acrid and dry, but people have a way of creating softness wherever they go. And Gisa has a gift for finding corpses, whatever species they may be. She hunches down, hands on her knees, tattered skirt dragging in the muck, and whistles a cheery little tune, something high and trilling in a major key that makes his ears hurt and his flesh crawl. He learned long ago not to listen too closely when his sister started to whistle. She didn't compose her tunes as much as channel them, and they weren't meant for the living. The ground in front of her began to heave, pulsing like some horrible, half-rotten heart. Gisa stood, still whistling, and the creature she'd been calling ripped itself out of the earth. It looked like a griffin, if a griffin could be made from the front end of an eagle and the back end of a manticore. Its tail waved in the air, rotting stinger still wickedly sharp and oozing a curdled, doubtless lethal poison. Gisa went to the creature, stroking its beak lovingly. It nuzzled into her hand as she cast a venomous smile at Geralf. "All right, brother#emph[ dear] , your turn," she said. "Or did you forget the conducting wires?" "You know I've used my stock of victus vitae," he said, refusing to rise to her bait. "I'll have to obtain a mount via more mundane methods." "You're going to #emph[buy] one?" She made the word sound obscene. "No," he said and walked through the back door of the stable, returning a moment later leading a massive draft jackalope by the reins. He stepped into the stirrup and swung himself up onto the saddle, smiling at his sister and her scorpion. "Now we should be off, before someone notices I've borrowed their bunny." "Your powers are useless here. I don't understand why you're trying. #emph[My] magic works exactly as it always has." "That may not always be the case, sister, #emph[dear] . If I'm correct, your time is running short." Gisa huffed, glaring at him as she climbed onto her griffin creature, and the two of them were off, riding across the wide-open plains of Thunder Junction toward their distant, unpleasant destination. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Even as an emptied wine bottle will have traces of wine remaining on to flavor the next liquid it contains, it is my belief that those who tap into planar energies are vessels of a kind. We are filled with the power of the planes where we are born, and while on those planes, we renew that power regularly, preventing it from becoming dilute. Should we leave our original domains, we will begin to "water down" the energies we contain, diluting it, until one day, the original magic can no longer be detected and has been entirely replaced by the energy around us. To travel too long between planes is to risk the loss of your original alignment and acquire something new … #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Are you saying my zombies are going to change to be whatever kind of zombies this place has normally? Don't be such a liver-sucker! I would never let that happen! My zombies are the #emph[best] kind of zombies, and they're what I'm always, always going to call, and you can tell your stupid theories to stay away from me! #figure(image("008_A Pleasant Family Outing/02.png", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) They rode without interruption or distraction until the sun began going down, and even Gisa was forced to acknowledge that trying to follow the map to Thief's Folly in the dark was a terrible idea. They made camp near a large rock formation, building their fire where it was least likely to attract attention, and seeing to their steeds before settling to a rough meal of bread, cheese, and dried meat. Gisa's manticore-griffin didn't seem to care whether it was running or resting, while Geralf's jackalope was clearly relieved to be hitched away from her abomination. The living could have such delicate sensibilities. Geralf was pleased to see Gisa eat without prompting. She sometimes seemed so removed from the experiences of the living that he worried he'd eventually find her shambling with her own hoard, having starved and risen again out of sheer stubbornness. She would do well as a revenant, but a living sister was easier to maintain a rivalry against without the other stitchers making fun of him for it. He settled with his back to the stone, withdrawing his monograph from the pouch where he kept it and flipping to where he'd left off. Across the fire, Gisa perked up. "What's that?" "A work of signature scholarship, and none of your concern," he replied. "I'm simply documenting my observations on the differences in planar energies between our home and Thunder Junction." "Sounds boring," she said, wrinkling her nose. "To you, I'm sure it would be. For me, it's enthralling." "I'm smart enough to understand it!" "I'm sure." "I just don't want to right now!" "Of course not, dear sister. I need to note down some observations; I'll take the first watch. Get some beauty sleep. You clearly need it." Gisa wrinkled her nose at him but stopped arguing as she turned and flopped down on her bedroll, back to both him and the fire. He waited for her breath to even out, then looked to the shape of her mount, which was still standing. Fascinating. Her wellspring of Innistrad energy had yet to run dry. Everyone he'd spoken to whose planar origins were different from his own described zombies as temporary creatures, shambling things that collapsed as soon as the necromancer who'd called them was distracted. Only on Innistrad did they seem to play by the rule of perpetual motion. Wouldn't Gisa be offended when her beloved dead began to topple over if not attended? The thought was a pleasant enough diversion to focus on as the hours counted down to midnight that by the time he had to wake his sister for second watch, he was in quite good spirits. Gisa, naturally, viewed this with suspicion. "What are you smiling about?" she asked. "Just the future, sister dear. Just the future." He slept peacefully after that. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Morning found their fire burnt to embers and Gisa gently snoring as she cradled her beloved shovel. An assortment of Thunder Junction's wildlife teemed around her feet, bones showing in patches through their decayed flesh. She'd been busy before she fell asleep, and Geralf couldn't even find it in himself to be angry with her; the small force of animal zombies would have provided sufficient warning had anything come to attack them in the night, and the fact that she'd called them before passing out meant that they'd technically been guarded the whole time. He still planted the toe of his boot squarely in her ribs, startling her awake. "Sister! You can sleep when you're dead!" Gisa woke like an angry badger, already snarling as she lunged to her feet. "Sleep is for the #emph[living] , flesh-fixer! The dead endure in glorious restlessness!" "Whichever you prefer, you fell asleep when you were meant to be on watch!" "Nothing attacked us." "Luck is not a plan." He moved to his own mount and stepped up into the saddle. "Come. Thief's Folly is waiting for us." "All those glorious corpses," she said, almost dreamily, and climbed onto her griffin. They rode off into the dawn, Gisa's mismatched zombie army hopping, scurrying, and slithering after them. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) I have been watching my primary subject (<NAME>, Ghoulcaller, Innistrad) closely for signs of her exhausting her original magical reserves. As yet, they have remained undiluted, her workings continuing to adhere to the natural laws of her homeworld. I remain convinced that this will change, given a sufficiently lengthy exposure to Thunder Junction and the powerful elemental magic of the place. Once her workings begin to warp, I will return her to her original environment and document how long it takes for her internal reservoir to restore itself to an Innistradi baseline … #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) I AM NOT A PRIMARY SUBJECT. YOU TAKE THAT BACK RIGHT NOW OR I WILL BURY YOU IN EIGHT SEPARATE GRAVES SO THAT EVEN YOUR STUPID STITCHING WON'T BE ENOUGH TO PUT YOU BACK TOGETHER AGAIN. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Several hours' hard ride brought them to the top of a bluff, below which sprawled the necropolis of Thief's Folly. In some ways, it looked like any other necropolis: a high stone and iron wall around fields of tombs, graves, and mausoleums. Someone had gone to the trouble of planting trees but hadn't gone to the trouble of watering them. They were long dead, their branches reaching bare and blackened toward the cloudless sky. The architecture of the tombs and design of the grave markers were a patchwork amalgam of dozens of planes, some which Geralf recognized, others which were a mystery even to his curious, information-oriented mind. The siblings gazed out over the graveyard for a long and silent while before Gisa, inevitably, shattered the moment beyond repair. "This doesn't make any #emph[sense] ," she objected, voice sharp and shrill. "You're not one to define sense," said Geralf. "What about it do you have a problem with?" "Thunder Junction was uninhabited before the Omenpaths, and those didn't happen until after the invasion, so how can this place be so built-up and so #emph[big] ? Why? I don't think this whole plane has made this many corpses." She folded her arms, seemingly determined to sulk. "I don't like it when people play silly games with dead things, unless 'people' means 'me.'" "It's odd …" allowed Geralf. "But we know people have been hiding things here. Perhaps they felt the need for set dressing to complete their masquerade. Let's find the map and get back to Oko before we borrow any more problems." The path down to the graveyard gates was smooth, easy to follow, and there were hitching posts outside the wall, unoccupied save for a distant riding lizard that had been tied by one corner, well away from where they were going. Gisa and Geralf both tied their steeds to keep them from wandering off, then turned and stepped at the same time through the open gateway into Thief's Folly. Gisa practically purred as they moved into the presence of so many dead, looking almost obscenely at ease. She spun a circle, arms spread wide. "Can't you feel them, <NAME>?" she asked. "So #emph[many] , and so peaceful in their slumber! Well, we can fix that for them soon enough, can't we? Oh, and so many flavors! Like a candy shop full of corpses, each one more delicious than the last." Geralf frowned, looking at the nearest grave markers. "Some of these bodies were brought here from off-plane," he said. "These dates don't make sense otherwise." "Oh, a lot of my new friends are too old to be here, and some of them were buried elsewhere, then moved. They're not all happy about that." Gisa's smile sharpened. "They'd like to have #emph[words] with the people who held the shovels." "Why would someone do that?" "Does it matter?" Gisa went traipsing off into the field of graves, whistling a happy little song. Geralf frowned after her, then went back to studying the nearby grave markers, trying to understand what they weren't telling him. Most were written in the way of the corpse's homeworld, with a line of clarifying text in the simplified script that was commonly used for signage in Thunder Junction. The majority also had small sigils etched into the corners of the marker, symbols he didn't know and didn't fully understand. Looking at them logically, they could almost be read as an equation— Or an incantation. "Gisa!" He turned as he shouted, scanning the nearby graves for his sister. He found her some six rows in, shovel in hand, whistling away. If he was reading the sigils correctly, by the time she was that deep, the incantation would be #emph[very] well developed. "Stop! Back away!" She shot him a sour look and kept digging, whistle growing insistent. The ground heaved. Geralf began to run toward her. The ground heaved again, harder, pulsing with sickly energy. Gisa cackled. Geralf wrapped an arm around her waist as he ran by, jerking her away from the grave. She shouted something he couldn't quite make out, flailing to break his hold, but stopped fighting him as the grave erupted, expelling not the single corpse she'd been trying to animate but what looked like a centipede made from hundreds of bodies fused together, flailing and squirming, writhing as it lifted the first thirty bodies or so of its length into the air. Its many arms grabbed for Gisa. She smacked them away with her shovel, beginning to run alongside Geralf. "Did you do this?" she demanded. "I'm not the one who decided to trigger a necromantic time bomb! Run now, blame later!" "Blame later," Gisa grimly agreed, and they fled deeper into the necropolis, the unspeakable corpsipede following behind. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) The Slickshot Gang encouraged loyalty if not close friendship among its members. They were meant to have each other's backs when trouble arose, and a transgression against one of them might as well have been a transgression against all of them. They fought together, but for all that, they, like everyone else on Thunder Junction, died alone. <NAME> had been fond of <NAME> and had missed her funeral due to a job that couldn't be cut short when she got news of the other woman's death. It was a tragedy, but she reckoned the dead didn't have very full schedules, and so it was two weeks after the burial, and she had just now come to show her respects. Her riding lizard was tied safely outside the gate, and there'd been no one else in sight when she showed up, which was a surprising bit of grace for the world to give—Annie had warned her that there might be an ambush if one of their rivals caught wind of the fact that she was out there on her own—and now here she was, confronted by the grave of what had been a laughing, living woman not long before. "You always said you'd die before you went back," she said, awkwardly setting her flowers on the headstone. "Well, suppose this means you got your way. Look, Lucy, I know this ain't the time to say anything—" A sudden commotion in the graves off to the east had her tense and reaching for the whip at her belt, ready to defend herself. Ready to defend her friend's grave, if it came to that. Thief's Folly had its own defenses against graverobbers, according to the stories she'd heard, but people seemed to take that as an invitation to bury all manner of precious things alongside their dearly departed, and that just meant the thieves kept coming back, looking for an easy score. Cautiously, she moved toward the sound. It distinguished itself into two voices, male and female, yelling at each other for all that they were worth. "—weren't so #emph[useless] , we wouldn't be in this situation!" shouted the woman. "What good is all your science if you can't stop some stupid #emph[worm] !" "If I had an angel available, I'd show you what useless is!" yelled the man. "I'm not the one who went poking around a grave that had been sealed against necromantic interference! Just couldn't keep your hands to yourself for a minute, could you?" "Oh, wah, wah. I need my angel blood or I'm useless. Wah, wah!" mocked the woman. "A #emph[real] ghoulcaller doesn't need that sort of thing! We just need the shovel and the song, and everything works!" "Which is why your aforementioned 'stupid worm' is determined to #emph[swallow] us!" "It feels like I'm still singing, like it still has my song." The woman's voice dropped for a moment, hurt and unhappiness overtaking mockery. "It #emph[hurts] ." Stella stepped around a crypt, and found herself looking at two pale, dark-haired people in tattered clothing. The woman held a shovel; the man wore a monocle. They were quite clearly related, and just as clearly on the verge of attacking one another. "What's this I hear about angel's blood?" she asked, hand still on her whip. Before either of the startled siblings could reply, a vast amalgamate worm that appeared to have been made by fusing hundreds of dead bodies into a single entity reared up from the crypts behind them. It came crashing down, smashing grave markers and sending bits of broken stone in all direction. Stella blinked. "That is #emph[not] something you see every day," she said. "Not unless you're really, really lucky," said the woman. "Run," said the man, grabbing the woman by the arm and charging straight toward Stella. Recognizing a good idea when she heard one, she spun on her heel and ran with them, back toward Lucy's grave and past it to the necropolis wall. The corpsipede followed, stopping at the wall to rear up and roar, then slinking away, apparently patrolling the limits of its range. Stella breathed heavily, leaning forward with hands on knees, and focused on the disheveled, angry man in front of her. "What #emph[is] that thing?" "Big," he said. The woman scowled, breaking free of the man's hold. "Annoying. I #emph[wanted] that corpse! One of my verses is still caught in it, and it won't let go." Stella had no idea what that meant, and so she let it go, focusing on the man. "That thing going to stop any time soon?" "I doubt it." Meaning they would lose Thief's Folly, and all their resting dead. They would lose #emph[Lucy] , who deserved better. Stella sighed and straightened. "You said angel's blood?" "Yes," he snapped. "What of it?" "You need anything else?" That seemed to give him pause. He gave her a thoughtful look, then asked, "Lamp oil?" "I think I can help you out." She gestured for the pair to follow as she turned toward her lizard. The woman scoffed, twirling her shovel like a baton, and didn't budge until the man grabbed her arm and hauled her along with him as he followed Stella to her steed. "My gang's been running a lot of medicinals lately," she said, opening one of her saddlebags and beginning to rummage through it. "Nostrums and the like that may or may not help with what ails you, but sure do sound impressive. This one's made with angel's blood. We get it off a supplier from—well, never you mind where we get it. Trade secret." She twinkled as she held up the bottle. "Normally this stuff comes pretty dear, but for you, I could be persuaded to cut a deal—" The corpsipede roared again. Stella winced. "You know what that thing is?" "No," said the man, eyes locked on the bottle in her hand. "But it's getting bigger." "It's using my song to suck the bodies out of their graves," said the woman petulantly. "Those are #emph[mine] ." "I got friends in this boneyard. You going to stop that thing?" "Yes," said the man. "Then it's on the house." Stella tossed him the bottle, following it with her backup supply of lamp oil. "Luck's my game, and it looks like today, you're my ace in the hole." The man's eyes lit up as he caught the two bottles, filling with captive lightning. He looked to the woman. "Let your griffin go," he said. "I need it." The woman made a huffing sound, and he gestured roughly toward the necropolis wall. She sighed and nodded, and he turned, running off into the distance. "He gonna come back?" asked Stella. "My corpse-coddling brother? Not likely," said the woman. "You know how this happened?" "Not a clue." "You lying?" "To the living?" The woman snorted, seemingly offended. "Mm," said Stella. She produced two bottles of birch beer from her saddlebag, tossing one to the woman. "Might as well pass the time until your brother doesn't come back. I'm <NAME>, by the way." "Gisa," said the woman, eyes narrowed. "Cecani." "I may have heard that name before," said Stella. "Maybe," agreed Gisa. They stood there, listening to the corpsipede roaring inside the necropolis, and waited to see what was going to happen next. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) What happened was the corpsipede tested the wall but came no farther, forcing them both to move about ten feet away. Gisa looked unnervingly serene when this happened. Stella kept the woman between her and the creature, preferring to be eaten #emph[last] . Wild laughter rose in the distance, followed by Geralf walking back into view, leading a horrifying construct behind him. It had the wings and stinger of a manticore but with a broad chest formed by stitching at least four smaller bodies together. It stood on multiple legs, and its head was a terrible combination of fleshy and bony bits. The beak was really an unnecessary final touch. It looked at the two women, making a curious clucking sound. Gisa looked back, unimpressed, while Stella took a step behind her. "What's that going to do?" Gisa asked. "Peck it back into the grave?" "Something like that," said Geralf. He clapped his hands, and the thing took to the air, soaring over the necropolis walls. "Now, while the beast's distracted, we move." He spun and ran through the doorway back into the necropolis. Laughing wildly, Gisa followed. Stella blinked, tossed her empty bottle aside, and followed them. She couldn't leave Lucy and the other Slickshots who'd gone to the ground for this thing to harvest. It simply wasn't done. Loyalty had to go past the grave, especially in a world where the dead didn't always go to their final rest. So, they ran, past the specter of Geralf's terrible creation flying circles around the roaring corpsipede, deeper into the necropolis. "Gisa!" snapped Geralf. "You need to find out what's twisting your magic. It's #emph[stealing] from you. Take back what's yours!" Gisa nodded and stopped running, starting to whistle. It was a jaunty, ear-splitting tune; Stella wanted to listen and wanted to cover her ears at the same time. It went on and on, and in the distance, the corpsipede shuddered, bodies dropping away from the central mass with every note. The thing was getting smaller. It was still more than large enough to slaughter them all. "Gisa …" She whistled a long, trilling note, then stopped. "There," she said. "I've taken back what's mine." "Now, find the magic that #emph[isn't] yours," he said imperiously. For a moment, it looked like Gisa was going to argue. For a moment, Stella was direly afraid that was the case, and they were all going to die because of some pointless sibling spat that had been here long before she was, and would doubtless be ongoing long after she was dead. "Please," she added with a note of desperation. Gisa, who had been inhaling to object, stopped. Then she began to hum. This was a lower note than her whistling, and it made Stella's bones ache. Geralf grimaced, apparently no more comfortable than she was. Seemingly unconcerned by the still massive corpsipede behind them, Gisa began walking serenely between the graves, still humming to herself. The corpsipede had been knocked off balance by the loss of much of its mass, but it was recovering quickly and began staggering after them, even as Geralf's beast attacked again and again. Gisa continued to hum and walk, sometimes spinning in place, apparently lost in a dream. Stella started to step toward her, but Geralf cut her off with a gesture, shaking his head. Stella quieted, frowning, and they followed Gisa through the necropolis, not looking back. Gisa stopped when she reached an above-ground crypt whose design was comfortingly familiar to Geralf's eye, seemingly Innistradi. He stepped past her to the crypt door, pressing a hand flat against it. "I can feel the necromancy coming from inside," he said. "It tingles." He tried the door only to find it securely padlocked shut. "But how are we supposed to get in?" "I've always found violence an excellent answer to that sort of question," said Stella, finally pulling the whip from her belt, uncoiling it. "Step back, science boy. This would sting." Geralf stepped back. She cracked the whip at the door, blue lightning dancing along the length of it. When it struck the padlock, the shackle popped open and the lock fell away, leaving the door easy for Geralf to open. Stella shrugged. "Just lucky that way," she said. Geralf opened the door, but it was Gisa who shoved her way inside, knocking him out of the way in her hurry. "Steal #emph[my] magic, will you?" she muttered. "Thief. Robber." "Ain't the two of you graverobbers?" asked Stella, following Gisa in. "Can't steal what's been abandoned to rot," said Gisa. "Do you say an apple farmer is robbing the trees?" She kept moving around the crypt as she spoke, poking into corners, as intent as a bird dog on the hunt. "Gonna say the answer you're looking for is 'no,'" said Stella. "Exactly. We don't rob graves. We respectfully harvest them. We're the good guys here." Stella didn't dignify that with a response. "Got you!" crowed Gisa. She grabbed a Canopic jar from a small table in one corner, hefting it over her head before smashing it to the floor. The sound made both Geralf and Stella jump. Gisa ignored them, crouching to sweep the shards aside. This revealed a heart, greenish and clearly decayed, but still beating in a slow, terrible rhythm, and a desiccated centipede that writhed as she got close to it. Outside the crypt, they could hear the corpsipede growing closer, still roaring. Geralf's creation didn't make a sound, making it clear how the fight had ended. "Hurry, sister, #emph[dear] ," said Geralf. "Grow up," snapped Gisa, and drove her shovel into the heart, splitting it cleanly in two. The centipede kept writhing, and outside, the corpsipede kept coming. Gisa straightened and stomped on the centipede, grinding it under her toe. There was a terrible squelching sound from outside. Stella moved to the crypt door and peered out. "That thing's collapsed," she reported. "Geralf, #emph[your] thing's missing an arm, and it looks like it's picking itself a new one out of the mess." "I'll sew it on before we leave," said Geralf. He pushed back the stone lid covering the crypt's occupant and reached inside the sarcophagus, rooting around until he came up with a map. "And fortunately for us, whoever thought booby-trapping a necropolis was a good idea was exactly the sort of person who'd be trying to conceal something. Gisa, we can go." "Good. I don't like this graveyard," said Gisa, wrinkling her nose. "It's boring." "You two aren't exactly on the up-and-up, are you?" asked Stella. "Is anyone in Thunder Junction?" asked Geralf. "There a reward for your capture?" "I don't know. Shall we ask my reanimated friend?" Outside the crypt, Geralf's creation screeched. Stella sighed and sagged. "I suppose there's no captures between friends." "A wise choice," said Geralf. He and Gisa left the crypt together, picking their way through bits of the collapsed corpsipede back to the wall. Geralf's jackalope was still tethered to the hitching post, and so after he had given his creature—and the new guardian of Thief's Folly—a new arm, they mounted up and rode off, their voices drifting behind them as they resumed their eternal argument. "You're taking up too much of the saddle!" "If you don't like it, you can walk." "I wouldn't #emph[need] to walk if you hadn't taken my #emph[horse] apart." "Lazy." "Smelly." "Rotten." "Boring." "YOU TAKE THAT BACK!" Some things never change. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) It's unclear how long this "planar acclimatization" might take. It's entirely possible that for most people, it will never be a concern, as few are likely to travel outside their homeworld for extended periods of time, and even those who do may return home when they feel themselves changing, believing it to be a sign of illness rather than adaptation. It may also be a matter of training and inclination. A ghoulcaller is a ghoulcaller wherever they go, but necromancers may use the same energies in different ways. Laying traps, for example, which requires a silence beyond the ghoulcaller's nature. This does raise the possibility of powerful new magical forms brought about by combining planar energies, and hitherto unknown magical forms that were previously beyond imagination and are now within our grasp … #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) This is you: BLAH, BLAH, I AM <NAME>, AND I HAVE TINY LITTLE MOLE EYES I CAN'T EVEN SEE MY PAPER WITHOUT MY GLASSES AND MY SISTER IS SO MUCH BETTER THAN ME THAT I HAVE TO MAKE UP STORIES TO EVEN FEEL LIKE I CAN COMPARE. Stop being silly, Geralf. This is beneath you. We have power, and we can go wherever we want. We just need to fill the Multiverse with zombies, and everything will be wonderful. You'll see.
https://github.com/Myriad-Dreamin/shiroa
https://raw.githubusercontent.com/Myriad-Dreamin/shiroa/main/packages/shiroa/meta-and-state.typ
typst
Apache License 2.0
#import "sys.typ": target, page-width // Export typst.ts variables again, don't use sys arguments directly /// The default target is _pdf_. /// `typst.ts` will set it to _web_ when rendering a dynamic layout. /// /// Example: /// ```typc /// #let is-web-target() = target.starts-with("web") /// #let is-pdf-target() = target.starts-with("pdf") /// ``` #let target = target /// The default page width is A4 paper's width (21cm). /// /// Example: /// ```typc /// set page( /// width: page-width, /// height: auto, // Also, for a website, we don't need pagination. /// ) if is-web-target; /// ``` #let get-page-width() = page-width /// Whether the current compilation is for _web_ #let is-web-target() = target.starts-with("web") /// Whether the current compilation is for _pdf_ #let is-pdf-target() = target.starts-with("pdf") /// Derived book variables from `sys.args` #let book-sys = ( target: target, page-width: page-width, is-web-target: is-web-target(), is-pdf-target: is-pdf-target(), ) /// Store the calculated metadata of the book. #let book-meta-state = state("book-meta", none)
https://github.com/marcantoinem/CV
https://raw.githubusercontent.com/marcantoinem/CV/main/cv-marcantoinem.typ
typst
#import "src/style.typ": conf, name, contacts #import "en/work-experience.typ" #import "en/education.typ" #import "en/awards.typ" #import "en/project.typ" #conf( "en", [ #name("<NAME>") #contacts(( link("mailto:<EMAIL>", "<EMAIL>"), link("https://github.com/marcantoinem", "github.com/marcantoinem"), link("https://linkedin.com/in/marcantoinem", "linkedin.com/in/marcantoinem"), link("tel:438-507-7844", "438-507-7844"), )) = Work Experience #work-experience.nuvu #work-experience.charge #work-experience.lainco = Education #education.polytechnique = Projects #project.generateur = Awards #awards.csgame2024 = Skills, languages, and interests - *Programming languages:* Rust, Python, C/C++, JavaScript/Typescript, VHDL, Verilog - *Technology*: Docker, STM32, FPGA, FreeRTOS, Node.js, Cargo, CMake, Makefile, RTIC, Embassy-rs, Linux, VUnit, OpenGL, WebGPU, WebAssembly, TailwindCSS - *Languages*: English, French ], )
https://github.com/claudiomattera/typst-modern-cv
https://raw.githubusercontent.com/claudiomattera/typst-modern-cv/master/src/icon.typ
typst
MIT License
// Copyright <NAME> 2023-2024. // // Distributed under the MIT License. // See accompanying file License.txt, or online at // https://opensource.org/licenses/MIT /// House icon. #let house = text(font: "Font Awesome 6 Free", str.from-unicode(0xf015)) /// Phone icon. #let phone = text(font: "Font Awesome 6 Free", str.from-unicode(0xf3cf)) /// Mail icon. #let mail = text(font: "Font Awesome 6 Free", []) /// World icon. #let world = text(font: "Font Awesome 6 Free", []) /// LinkedIn icon. #let linkedin = text(font: "Font Awesome 6 Brands", []) /// GitHub icon. #let github = text(font: "Font Awesome 6 Brands", []) /// OrcID icon. #let orcid = text(font: "Font Awesome 6 Brands", [])
https://github.com/Origami404/kaoyan-shuxueyi
https://raw.githubusercontent.com/Origami404/kaoyan-shuxueyi/main/线性代数.typ
typst
#import "./template.typ": sectionline, gray_table, colored = 线性代数 == 行列式 #set list(marker: ([★], [⤥], [›])) - 基本算法 - 上下三角直接主对角线之积 - 对于非主对角线 (另一个方向的对角线), 需要对应乘以 $(-1)^((n-1) + (n-2) + ... + 0)$ 次方 - 二阶行列式交叉算, 三阶行列式往旁边写两行算 - 变换法 - 交换行乘 $-1$, 行乘 $k$ 行列式要乘 $1/k$ - $|k A| = colored(k^n) |A|$, 尤其注意 $k = -1$ 的情况, 如 $|-E|$ - 如果一行可以写成两行之和, 那行列式可以拆开成两个 - 整行相加减的时候要额外注意行里唯一不同的那个元素的情况 - 展开法 - 代数余子式: $A_(i j) = colored((-1)^(i+j)) M_(i j)$ - 范德蒙行列式 - 同一列数字, 从 $0$ 次方一直到 $n-1$ 次方, 行列式是 $n(n-1)/2$ 个数字之差乘起来 - 如 $(a_4 - a_3)(a_4 - a_2)(a_4 - a_1) quad (a_3 - a_2)(a_3 - a_1) quad (a_2 - a_1)$ - 变种一: 破坏 0 次方那行, 直接提取公因式变换即可 - 变种二: 缺少某一个次方的行 - 将缺失的行补上, 然后再补上一列 "$1, x, x^2, ..., x^(n-1)$" 保持方阵 - 用范德蒙行列式计算补足后的行列式, 得到一个关于 $x$ 的多项式 - 将补足后的行列式按 $x$ 列余子式展开, 则原行列式必定是某个 $x^k$ 的系数 - 利用二系数相等即可得到原行列式的值 - 特殊高阶行列式 - 一行一列一对角: 用对角线消去行即可得到上三角 - 一行两对角: 余子式展开一次就可以变 $D_n = f(D_(n-1))$ 递推 - 三对角: 余子式展开两次就可以变 $D_n = f(D_(n-1), D_(n-2))$ 递推, 用 $D_1$, $D_2$, $D_3$ 找找规律后装模做样归纳法证明即可 == 矩阵与线性方程组 - 基本操作 - 右上角 - 逆矩阵 $A^(-1)$ - 转置矩阵 $A^T$ - 伴随矩阵 $A^*$: $a^*_(i j) = A_colored(j i)$, 注意代数余子式行列是反的 - 前边 - 迹 $tr(A)$: $A$ 对角线元素之和 - 秩 $r(A)$: $A$ 中最大非零子行列式的阶 - 多项式 $f(A)$ - 行列式 $det(A)$ 或 $|A|$ - 关系 - 等价 $A tilde.equiv B$: 可以通过初等变换变过去. 存在可逆 $P, Q$ 使得 $P A Q = B$ - 相似 $A tilde B$: 保特征. 存在可逆 $P$ 使得 $P^(-1) A P = B$ - 合同 $A tilde.eq B$: 保二次型惯性. 存在可逆 $C$ 使得 $C^T A C = B$ - 矩阵分块 - 一般就分四块, 或者按行/列向量拆分 - $mat(delim: "|", A, O; C, B) = |A| |B|$, $mat(A, O; O, B)^(-1) = mat(A^(-1), O; O, B^(-1))$ - 伴随矩阵 - 可用于快速求 (二阶矩阵) 逆: $A A^* = |A|E$ - 在把伴随矩阵和逆矩阵相互代换的时候, 一定要手动写出上边的恒等式推一遍, 很容易写错 - $|A^*| = |A|^(n - 1)$ - $A^n$ - 主对角线全为 $0$ 的方阵 $A$, $A^n = 0$ - 因此上三角矩阵的 $n$ 次方可以单独把对角线拿出来用二项式定理: $(A + lambda E)^n$ - 迹 - 多用于向量张成的矩阵上. 对两个向量 $alpha, beta$, 有 $alpha^T beta = tr(alpha beta^T)$ - 当一个矩阵各行各列成比例的时候, 它必定是两个向量的张起来的 - $(alpha beta^T)^n = alpha (beta^T alpha)^(n-1) beta^T = [tr(alpha beta^T)]^(n-1) alpha beta^T$ - 秩 - 基本情况: 阶梯型矩阵的秩等于非零行/列的数量 - 等价即同秩: $A = B <=> r(A) = r(B)$ - $r(A) = r(A^T) = r(k A) <= min{m, n}$ - $r(A B) <= min{r(A), r(B)}$, 推论: 乘可逆矩阵不改变秩 - $A B = O => r(A) + r(B) <= n$ - $r(A) + r(B) >= r(A + B)$ - $r(A^*)$ 分类讨论如下 - $r(A) = n quad => quad r(A^*) = n$ - $r(A) = n-1 quad => quad r(A^*) = 1$ - $r(A) < n-1 quad => quad r(A^*) = 0$ - 特征值与特征向量 - 求特征值: 解特征方程 $|lambda E - A| = 0$ - 求特征值对应的特征向量: 线性方程组 $(lambda E - A) alpha = 0$ 的非零解 - (有 $k$ 的要多写一行 "$k_i$ 不全为 $0$") - 对任意多项式, $f(A)$ 的特征值是 $f(lambda)$ - 比如 $A + 2E$ 的各个特征值是 $lambda_i + 2$ - 比如若 $A^2 + A = O$, 则特征值必须满足 $lambda^2 + lambda = 0$ - #colored[矩阵多项式条件就是矩阵特征值的条件] - $tr(A) = sum lambda_i$, $|A| = product lambda_i$ - 相似 - $A tilde B$: 秩相同, 特征相同, 行列式相同, 迹相同. 存在可逆 $P$ 使得 $P^(-1) A P = B$ - 相似无法证明, 只能用必要条件尝试证否 - 相似对角化: 找对角矩阵 $Lambda$ 使得 $P^(-1) A P = Lambda$ - 能相似对角化 $<=>$ $A$ 有 $n$ 个线性无关的特征向量 - 这意味着 $A P = P Lambda$, 其中 $P$ 是各个特征向量组成的矩阵, $Lambda$ 是对应的特征值组成的对角矩阵 - 相似对角化出来的 $P$ 中的特征向量的顺序要和 $Lambda$ 中的特征值的顺序对应 - 实对称矩阵必可相似对角化 == 线性方程组的解 - 齐次线性方程 $A x = 0$ - 基础解系中有 $n - r(A)$ 个线性无关向量 - 由此可得 $A B = O <=> A beta_i = 0$, 即 $colored(A B = O => r(A) + r(B) <= n)$ - 线性方程组 $A x = b$ 解的情况 - 无解: $r(A) < r(A;b)$ - 唯一解: $r(A) = r(A;b) = n$ - 无穷解: $r(A) = r(A;b) < n$ - 由于 $r(A)$ 可以很容易地从 $r(A;b)$ 中看出来, 实践上只需要写出 $A;b$ 然后开始行变换即可 - #colored[切记不能进行列变换] - 向量组线性相关 - 一组向量 $bold(alpha_i)$ 线性无关 $<=>$ $(bold(alpha_i)) x = 0$ 仅有零解 - 只需要求 $bold(alpha_i)$ 是否满秩即可 - 向量线性可表 - $b$ 可被 $alpha_i$ 表示 $<=>$ $(alpha_i) x = b$ 有非零解 - 这类题目同时还需要写出 $b = sum x_i alpha_i$ 的表达式, 即需要把解系求出来 - 求极大线性无关组 - 对 $(alpha_i)$ 做行变换成阶梯型, 然后取每行的第一个非零元素所在的列对应的向量 == 二次型 - 定义 - 二次型是一个实对称矩阵, 每一个元素对应 $f(x_i) = sum sum a_(i j) x_i x_j$ 的系数 - 标准型: 对角的二次型 - 规范性: 元素只为 $+1, 0, -1$ 的标准型 - 合同 - $A tilde.eq B$: 保二次型正负惯性指数. 存在可逆 $C$ 使得 $C^T A C = B$ - 正交变换法求合同标准型 - 如果给的 $A$ 不是对称的, 那必须先写成对称的再进行下一步 - 先求出 $A$ 的特征值和特征向量 - 对 $A$ 的特征向量作正交化 - 特征向量拼起来就是 $C$, 特征值拼起来就是标准型 - 惯性定理 - 两个合同矩阵, 它们各自的标准型中正的元素数量和负的元素数量各自相等 - (即它们的正/负特征值数量相同) - 正定二次型: 标准型中所有元素都是正的 #pagebreak()
https://github.com/SeniorMars/tree-sitter-typst
https://raw.githubusercontent.com/SeniorMars/tree-sitter-typst/main/examples/compute/data.typ
typst
MIT License
// Test reading structured data and files. // Ref: false --- // Test reading plain text files #let data = read("/hello.txt") #test(data, "Hello, world!") --- // Error: 18-32 file not found (searched at /missing.txt) #let data = read("/missing.txt") --- // Error: 18-28 file is not valid utf-8 #let data = read("/bad.txt") --- // Test reading CSV data. // Ref: true #set page(width: auto) #let data = csv("/zoo.csv") #let cells = data.at(0).map(strong) + data.slice(1).flatten() #table(columns: data.at(0).len(), ..cells) --- // Error: 6-16 file not found (searched at typ/compute/nope.csv) #csv("nope.csv") --- // Error: 6-16 failed to parse csv file: found 3 instead of 2 fields in line 3 #csv("/bad.csv") --- // Test reading JSON data. #let data = json("/zoo.json") #test(data.len(), 3) #test(data.at(0).name, "Debby") #test(data.at(2).weight, 150) --- // Error: 7-18 failed to parse json file: syntax error in line 3 #json("/bad.json") --- // Test reading XML data. #let data = xml("/data.xml") #test(data, (( tag: "data", attrs: (:), children: ( "\n ", (tag: "hello", attrs: (name: "hi"), children: ("1",)), "\n ", ( tag: "data", attrs: (:), children: ( "\n ", (tag: "hello", attrs: (:), children: ("World",)), "\n ", (tag: "hello", attrs: (:), children: ("World",)), "\n ", ), ), "\n", ), ),)) --- // Error: 6-16 failed to parse xml file: found closing tag 'data' instead of 'hello' in line 3 #xml("/bad.xml")
https://github.com/frectonz/the-pg-book
https://raw.githubusercontent.com/frectonz/the-pg-book/main/book/156.%20mean.html.typ
typst
mean.html Mean People Fail November 2014It struck me recently how few of the most successful people I know are mean. There are exceptions, but remarkably few.Meanness isn't rare. In fact, one of the things the internet has shown us is how mean people can be. A few decades ago, only famous people and professional writers got to publish their opinions. Now everyone can, and we can all see the long tail of meanness that had previously been hidden.And yet while there are clearly a lot of mean people out there, there are next to none among the most successful people I know. What's going on here? Are meanness and success inversely correlated?Part of what's going on, of course, is selection bias. I only know people who work in certain fields: startup founders, programmers, professors. I'm willing to believe that successful people in other fields are mean. Maybe successful hedge fund managers are mean; I don't know enough to say. It seems quite likely that most successful drug lords are mean. But there are at least big chunks of the world that mean people don't rule, and that territory seems to be growing.My wife and Y Combinator cofounder Jessica is one of those rare people who have x-ray vision for character. Being married to her is like standing next to an airport baggage scanner. She came to the startup world from investment banking, and she has always been struck both by how consistently successful startup founders turn out to be good people, and how consistently bad people fail as startup founders.Why? I think there are several reasons. One is that being mean makes you stupid. That's why I hate fights. You never do your best work in a fight, because fights are not sufficiently general. Winning is always a function of the situation and the people involved. You don't win fights by thinking of big ideas but by thinking of tricks that work in one particular case. And yet fighting is just as much work as thinking about real problems. Which is particularly painful to someone who cares how their brain is used: your brain goes fast but you get nowhere, like a car spinning its wheels.Startups don't win by attacking. They win by transcending. There are exceptions of course, but usually the way to win is to race ahead, not to stop and fight.Another reason mean founders lose is that they can't get the best people to work for them. They can hire people who will put up with them because they need a job. But the best people have other options. A mean person can't convince the best people to work for him unless he is super convincing. And while having the best people helps any organization, it's critical for startups.There is also a complementary force at work: if you want to build great things, it helps to be driven by a spirit of benevolence. The startup founders who end up richest are not the ones driven by money. The ones driven by money take the big acquisition offer that nearly every successful startup gets en route. [1] The ones who keep going are driven by something else. They may not say so explicitly, but they're usually trying to improve the world. Which means people with a desire to improve the world have a natural advantage. [2]The exciting thing is that startups are not just one random type of work in which meanness and success are inversely correlated. This kind of work is the future.For most of history success meant control of scarce resources. One got that by fighting, whether literally in the case of pastoral nomads driving hunter-gatherers into marginal lands, or metaphorically in the case of Gilded Age financiers contending with one another to assemble railroad monopolies. For most of history, success meant success at zero-sum games. And in most of them meanness was not a handicap but probably an advantage.That is changing. Increasingly the games that matter are not zero-sum. Increasingly you win not by fighting to get control of a scarce resource, but by having new ideas and building new things. [3]There have long been games where you won by having new ideas. In the third century BC, Archimedes won by doing that. At least until an invading Roman army killed him. Which illustrates why this change is happening: for new ideas to matter, you need a certain degree of civil order. And not just not being at war. You also need to prevent the sort of economic violence that nineteenth century magnates practiced against one another and communist countries practiced against their citizens. People need to feel that what they create can't be stolen. [4]That has always been the case for thinkers, which is why this trend began with them. When you think of successful people from history who weren't ruthless, you get mathematicians and writers and artists. The exciting thing is that their m.o. seems to be spreading. The games played by intellectuals are leaking into the real world, and this is reversing the historical polarity of the relationship between meanness and success.So I'm really glad I stopped to think about this. Jessica and I have always worked hard to teach our kids not to be mean. We tolerate noise and mess and junk food, but not meanness. And now I have both an additional reason to crack down on it, and an additional argument to use when I do: that being mean makes you fail. Notes[1] I'm not saying all founders who take big acquisition offers are driven only by money, but rather that those who don't aren't. Plus one can have benevolent motives for being driven by money — for example, to take care of one's family, or to be free to work on projects that improve the world.[2] It's unlikely that every successful startup improves the world. But their founders, like parents, truly believe they do. Successful founders are in love with their companies. And while this sort of love is as blind as the love people have for one another, it is genuine.[3] Peter Thiel would point out that successful founders still get rich from controlling monopolies, just monopolies they create rather than ones they capture. And while this is largely true, it means a big change in the sort of person who wins.[4] To be fair, the Romans didn't mean to kill Archimedes. The Roman commander specifically ordered that he be spared. But he got killed in the chaos anyway.In sufficiently disordered times, even thinking requires control of scarce resources, because living at all is a scarce resource.Thanks to <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, and <NAME> for reading drafts of this.Portuguese TranslationJapanese TranslationArabic Translation