parent
926fc0d50b
commit
5347a9aabd
|
@ -17,6 +17,6 @@ When there will be updates, run `git pull`.
|
||||||
|
|
||||||
## How to get started
|
## How to get started
|
||||||
|
|
||||||
See the `source/example.typ` file for an example of it's usage.
|
See the `source/manual.typ` file for an example of it's usage.
|
||||||
|
|
||||||
Run `make example` to compile it.
|
Run `make manual` to compile it.
|
||||||
|
|
6
makefile
6
makefile
|
@ -1,6 +1,6 @@
|
||||||
TARGET := ./main.pdf
|
TARGET := ./main.pdf
|
||||||
SOURCE := ./source/user/main.typ
|
SOURCE := ./source/user/main.typ
|
||||||
EXAMPLE := ./source/example.typ
|
MANUAL := ./source/manual.typ
|
||||||
PDF_VIEWER := zathura
|
PDF_VIEWER := zathura
|
||||||
TYPST_FLAGS := --root ./source
|
TYPST_FLAGS := --root ./source
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ clean:
|
||||||
watch:
|
watch:
|
||||||
@typst w $(TYPST_FLAGS) $(SOURCE) $(TARGET) &> /dev/null &
|
@typst w $(TYPST_FLAGS) $(SOURCE) $(TARGET) &> /dev/null &
|
||||||
|
|
||||||
example: $(EXAMPLE)
|
manual: $(MANUAL)
|
||||||
@typst c $(TYPST_FLAGS) $< $(TARGET)
|
@typst c $(TYPST_FLAGS) $< $(TARGET)
|
||||||
|
|
||||||
.PHONY: build view clean watch example
|
.PHONY: build view clean watch manual
|
||||||
|
|
|
@ -1,91 +0,0 @@
|
||||||
#import "template/template.typ": *
|
|
||||||
|
|
||||||
#show: paper => configuration(
|
|
||||||
title: lorem(5),
|
|
||||||
authors: (
|
|
||||||
(
|
|
||||||
name: "Lorem ipsum.",
|
|
||||||
affiliation: "Lorem institute",
|
|
||||||
email: "lorem.ipsum@example.org",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
abstract: lorem(35),
|
|
||||||
paper
|
|
||||||
)
|
|
||||||
|
|
||||||
= #lorem(6)
|
|
||||||
|
|
||||||
#lorem(70)
|
|
||||||
|
|
||||||
= #lorem(5)
|
|
||||||
#lorem(30)
|
|
||||||
|
|
||||||
#definition(name: lorem(2))[
|
|
||||||
#lorem(5)
|
|
||||||
|
|
||||||
#lorem(18)
|
|
||||||
]
|
|
||||||
|
|
||||||
== #lorem(4)
|
|
||||||
|
|
||||||
#lorem(50)
|
|
||||||
|
|
||||||
#theorem(name: lorem(1))[
|
|
||||||
#lorem(4)
|
|
||||||
|
|
||||||
#lorem(20)
|
|
||||||
|
|
||||||
#numbered-equation[
|
|
||||||
$ integral.double_S arrow(A) dot arrow(dif S) $
|
|
||||||
]
|
|
||||||
|
|
||||||
#lorem(7)
|
|
||||||
]
|
|
||||||
|
|
||||||
== #lorem(4)
|
|
||||||
|
|
||||||
#lorem(40)
|
|
||||||
|
|
||||||
#proposition[
|
|
||||||
#lorem(10)
|
|
||||||
|
|
||||||
$ integral_(a)^(+ oo) f(x) dif x $
|
|
||||||
|
|
||||||
#lorem(6)
|
|
||||||
|
|
||||||
$ sum f(n) $
|
|
||||||
|
|
||||||
#lorem(12)
|
|
||||||
]
|
|
||||||
|
|
||||||
#lorem(30)
|
|
||||||
|
|
||||||
= #lorem(4)
|
|
||||||
|
|
||||||
#lorem(20)
|
|
||||||
|
|
||||||
== #lorem(7)
|
|
||||||
|
|
||||||
#lorem(20)
|
|
||||||
|
|
||||||
#remark(name: lorem(2))[
|
|
||||||
#lorem(30)
|
|
||||||
]
|
|
||||||
|
|
||||||
#lorem(10)
|
|
||||||
|
|
||||||
#lemma[
|
|
||||||
#lorem(13)
|
|
||||||
]
|
|
||||||
|
|
||||||
#proof[
|
|
||||||
#lorem(25)
|
|
||||||
]
|
|
||||||
|
|
||||||
#example[
|
|
||||||
#lorem(30)
|
|
||||||
]
|
|
||||||
|
|
||||||
#exercise()[
|
|
||||||
#lorem(10)
|
|
||||||
]
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
#import "template/template.typ": *
|
||||||
|
|
||||||
|
#show: paper => configuration(
|
||||||
|
title: "Short guide to math-typst.",
|
||||||
|
authors: (
|
||||||
|
(
|
||||||
|
name: "Orca",
|
||||||
|
affiliation: "git.disroot.org/orca/math-typst",
|
||||||
|
email: "orcinus_orca@disroot.org",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
abstract: "This PDF explains how to use math-typst.",
|
||||||
|
paper
|
||||||
|
)
|
||||||
|
|
||||||
|
= Introduction
|
||||||
|
|
||||||
|
This packages aims to provide a good enough interface for writing a mathematical course in it.
|
||||||
|
|
||||||
|
As of now, it consists of the most used mathematical environments in courses #footnote[The environments provided are: `proposition`, `lemma`, `theorem`, `corollary`,
|
||||||
|
`definition`, `remark`, `example`, `exercise`, `proof`, and `numbered-equation`.].
|
||||||
|
|
||||||
|
= How to use
|
||||||
|
|
||||||
|
With the exception of `proof`, environments behave like `theorem`. Simply type the environment name followed by it's body
|
||||||
|
in square brackets. You may name the particular environment by appending `(name: "The name")` after the environment name.
|
||||||
|
|
||||||
|
== Example
|
||||||
|
|
||||||
|
#theorem(name: "Orca")[
|
||||||
|
Let $P in ZZ[X]$ and $N in NN^*$ be such that for all $n in NN$, if $n >= N$, then $P(n)$ is prime.
|
||||||
|
We have that $P$ is constant.
|
||||||
|
] <orca>
|
||||||
|
|
||||||
|
#proof[
|
||||||
|
Let's consider
|
||||||
|
|
||||||
|
$ P: x |-> sum_(i = 0)^(deg P) a_i x^i, " with " a_i in ZZ " for " i in [|0, deg P|]. $
|
||||||
|
|
||||||
|
Suppose there exists $N in NN^*$ such that for all $n >= N$, $P(n)$ is prime.
|
||||||
|
|
||||||
|
We have, for $alpha, beta in NN^*$,
|
||||||
|
|
||||||
|
#numbered-equation(name: "E")[
|
||||||
|
$ P(alpha + beta) = P(alpha) + k beta, " with " k in ZZ $
|
||||||
|
] <eq>
|
||||||
|
|
||||||
|
The equation @eq follows from the definition of $P$ and the binomial theorem.
|
||||||
|
|
||||||
|
In particular, if $alpha >= N$ and $beta = n abs(P(alpha))$ with $n in NN^*$, then $P(alpha)$ divides $P(alpha + beta)$.
|
||||||
|
|
||||||
|
Since they're both primes, we have $epsilon P(alpha) = P(alpha + beta)$, with $epsilon in {-1, 1}$ and $n$ a variable.
|
||||||
|
|
||||||
|
We then find that $P - epsilon P(alpha)$ cancels an infinite amount of times, showing that $P$ is constant.
|
||||||
|
]
|
||||||
|
|
||||||
|
Unfortunately, it seems like the theorem @orca is not useful at all.
|
Loading…
Reference in New Issue