.
This commit is contained in:
66
Toolbox/docs/examples/sample-typst.typ
Normal file
66
Toolbox/docs/examples/sample-typst.typ
Normal file
@@ -0,0 +1,66 @@
|
||||
// Sample Typst document to demonstrate typesetting capabilities
|
||||
|
||||
#set page(width: 12cm, height: 16cm, margin: 2cm)
|
||||
#set text(family: "Linux Libertine", size: 11pt)
|
||||
|
||||
= TSYS Documentation & Diagrams
|
||||
A Typst Sample Document
|
||||
|
||||
#lorem(30)
|
||||
|
||||
== Introduction
|
||||
#lorem(50)
|
||||
|
||||
== Features of Typst
|
||||
|
||||
Typst offers many advantages for document creation:
|
||||
|
||||
- #h(0.3em) *Fast and Modern* - Built for efficiency and speed
|
||||
- #h(0.3em) *Markup-based* - Clean, semantic syntax
|
||||
- #h(0.3em) *Powerful Typesetting* - Professional output quality
|
||||
|
||||
#lorem(40)
|
||||
|
||||
== Code Example
|
||||
|
||||
Here's how to write code in Typst:
|
||||
|
||||
```
|
||||
#let greet(name) = [
|
||||
Hello, #name!
|
||||
]
|
||||
|
||||
#greet("World")
|
||||
```
|
||||
|
||||
== Mathematical Expressions
|
||||
|
||||
Typst has excellent support for mathematical expressions:
|
||||
|
||||
- Inline math: #math.equation( sum_(i=0)^n i^2 = (n(n+1)(2n+1))/6 )
|
||||
- Block equations:
|
||||
$
|
||||
f(x) = int_-∞^∞ hat f(xi),e^2 pi i xi x dxi
|
||||
$
|
||||
|
||||
== Table Example
|
||||
|
||||
#table(
|
||||
columns: 3,
|
||||
[Column 1], [Column 2], [Column 3],
|
||||
[Item 1], [Value 1], [Status 1],
|
||||
[Item 2], [Value 2], [Status 2],
|
||||
[Item 3], [Value 3], [Status 3],
|
||||
)
|
||||
|
||||
== Conclusion
|
||||
|
||||
#lorem(40)
|
||||
|
||||
= References
|
||||
|
||||
#let reference(title, author, year) = [
|
||||
#h(1.5em) #author (#year). #title.
|
||||
]
|
||||
|
||||
#reference("Typst: A New Markup-Based Typesetting System", "Typst Team", 2023)
|
||||
Reference in New Issue
Block a user