commit 38d2c0ce4fd52e271832e885c29667788116258e Author: chn Date: Mon Aug 4 15:06:13 2025 +0800 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b2be92b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +result diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..6e88299 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1753939845, + "narHash": "sha256-K2ViRJfdVGE8tpJejs8Qpvvejks1+A4GQej/lBk5y7I=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "94def634a20494ee057c76998843c015909d6311", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..6895f1d --- /dev/null +++ b/flake.nix @@ -0,0 +1,16 @@ +{ + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + outputs = inputs: + let + pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; + typst = pkgs.typst.withPackages (ps: with ps; [ minimal-presentation ]); + in + { + packages.x86_64-linux.default = pkgs.runCommand "presentation" { nativeBuildInputs = [ typst ]; src = ./.; } + '' + mkdir -p $out + typst compile $src/main.typ $out/main.pdf + ''; + }; +} diff --git a/main.typ b/main.typ new file mode 100644 index 0000000..83377b8 --- /dev/null +++ b/main.typ @@ -0,0 +1,122 @@ +#import "@preview/minimal-presentation:0.6.0": * + +//#set text(font: "Lato") +//#show math.equation: set text(font: "Lato Math") +//#show raw: set text(font: "Fira Code") + +#show: project.with( + title: "Minimalist presentation template", + sub-title: "This is where your presentation begins", + author: "Flavio Barisi", + date: "10/08/2023", + index-title: "Contents", + // logo: image("./logo.svg"), + // logo-light: image("./logo_light.svg"), + // cover: image("./image_1.jpg"), + main-color: rgb("#5ec7a7"), + lang: "it", +) + += This is a section + +== This is a slide title + +#lorem(10) + +- #lorem(10) + - #lorem(10) + - #lorem(10) +// - #lorem(10) @harry @electronic. + + +== One column image + +// #figure( +// image("image_1.jpg", height: 10.5cm), +// caption: [An image], +// ) + +== Two columns image + +// #columns-content()[ +// #figure( +// image("image_1.jpg", width: 100%), +// caption: [An image], +// ) +// ][ +// #figure( +// image("image_1.jpg", width: 100%), +// caption: [An image], +// ) +// ] + +== Two columns + +// #columns-content()[ +// - #lorem(10) +// - #lorem(10) +// - #lorem(10) +// ][ +// #figure( +// image("image_1.jpg", width: 100%), +// caption: [An image], +// ) +// ] + += This is a section + +== This is a slide title + +#lorem(10) + += This is a section + +== This is a slide title + +#lorem(10) + += This is a section + +== This is a slide title + +#lorem(10) + += This is a very v v v v v v v v v v v v v v v v v v v v long section + +== This is a very v v v v v v v v v v v v v v v v v v v v long slide title + += Subtitle test + +== Slide title + +#lorem(50) + +=== Slide subtitle 1 + +#lorem(50) + +=== Slide subtitle 2 + +#lorem(50) + +== Slide title 2 + +#lorem(50) + +=== Slide subtitle 3 + +#lorem(50) + +=== Slide subtitle 4 + +#lorem(50) + +#set-main-color(blue) + += You can change color + +== Slide title + +#lorem(50) + +// #bibliography("bibliography.yaml")