- install vscode
- add
vscode-pdfandTypst LSPextensions - modify the Typst template and split plane the PDF preview
winget install --id Typst.Typst
brew install typst
typst compile path/to/source.typ path/to/output.pdf
typst watch file.typ
| #set document(title: "title", author: "author") | |
| #set par(justify: true) | |
| #let today = datetime.today() | |
| #set page(margin: (left: 2in)) | |
| #set quote(block: true) | |
| #line(start: (0%, 5%), end: (8.5in, 5%), stroke: (thickness: 2pt)) | |
| #align(horizon + left)[ | |
| #text(size: 24pt, [StudySubject \ DocumentTitle]) | |
| Author // Change Author | |
| your\@email.com // Change Email | |
| Location, #today.display("[month repr:long] [day], [year]") // Change Lcoation | |
| ] | |
| #set heading(numbering: "1.") | |
| #set page(fill: white, margin: (auto)) | |
| #pagebreak() | |
| #outline() | |
| #pagebreak() | |
| #set page( | |
| numbering: "1", | |
| header: context { | |
| if counter(page).get().first() > 1 [ | |
| _DocumentTitle_ | |
| #h(1fr) | |
| Author | |
| ] | |
| }) | |
| #counter(page).update(1) | |
| // Content Starts here | |
| = First title here | |
| == Subtitle | |
| = Simple equation | |
| == Potents | |
| $ a^2 + b^2 = c^2 $ | |
| == Pi | |
| $ d = 2r*pi $ | |
| == Division and Closures | |
| $ x = (2pi*d) / 10 $ | |
| == Code Blocks | |
| ```rs | |
| fn main() { | |
| println!("Hello, world from Typst!") | |
| } | |
| ``` | |
| == Footnotes | |
| Check the docs for more details. | |
| #footnote[https://typst.app/docs] | |
| == Quotes | |
| #quote(attribution: [Plato])[ | |
| ... ἔοικα γοῦν τούτου γε σμικρῷ τινι αὐτῷ τούτῳ σοφώτερος εἶναι, ὅτι | |
| ἃ μὴ οἶδα οὐδὲ οἴομαι εἰδέναι. | |
| ] | |
| #lorem(200) |
vscode-pdf and Typst LSP extensionswinget install --id Typst.Typst
brew install typst
typst compile path/to/source.typ path/to/output.pdf
typst watch file.typ