|
1 |
| -# Slides in Typst |
2 |
| -This is a template for creating slides in [Typst](https://typst.app/). |
| 1 | +# Polylux <img src="assets/logo.png" style="width: 3em;"></img> |
| 2 | +This is a package for creating presentation slides in [Typst](https://typst.app/). |
3 | 3 |
|
4 |
| -[](https://andreaskroepelin.github.io/typst-slides/book) |
5 |
| - |
6 |
| - |
7 |
| -[](https://github.com/andreasKroepelin/typst-slides/releases/latest/download/demo.pdf) |
| 4 | +[](https://andreaskroepelin.github.io/polylux/book) |
| 5 | + |
| 6 | + |
| 7 | +[](https://github.com/andreasKroepelin/polylux/releases/latest/download/demo.pdf) |
| 8 | + |
8 | 9 |
|
9 | 10 | ## Quickstart
|
| 11 | +For the bare-bones, do-it-yourself experience, all you need is: |
10 | 12 | ```typ
|
11 |
| -#import "slides.typ": * |
12 |
| -
|
13 |
| -#show: slides.with( |
14 |
| - authors: "Names of author(s)", |
15 |
| - short-authors: "Shorter author for slide footer", |
16 |
| - title: "Title of the presentation", |
17 |
| - subtitle: "Subtitle of the presentation", |
18 |
| - short-title: "Shorter title for slide footer", |
19 |
| - date: "March 2023", |
20 |
| -) |
| 13 | +// Get polylux from the official package repository |
| 14 | +#import "@preview/polylux:0.2.0": * |
| 15 | +
|
| 16 | +// Make the paper dimensions fit for a presentation and the text larger |
| 17 | +#set page(paper: "presentation-16-9") |
| 18 | +#set text(size: 25pt) |
21 | 19 |
|
22 |
| -#set text(font: "Inria Sans", size: 25pt) |
| 20 | +// Use #polylux-slide to create a slide and style it using your favourite Typst functions |
| 21 | +#polylux-slide[ |
| 22 | + #align(horizon + center)[ |
| 23 | + = Very minimalist slides |
23 | 24 |
|
24 |
| -#slide(theme-variant: "title slide") |
| 25 | + A lazy author |
25 | 26 |
|
26 |
| -#new-section("My section name") |
| 27 | + July 23, 2023 |
| 28 | + ] |
| 29 | +] |
27 | 30 |
|
28 |
| -#slide(title: "A boring static slide")[ |
29 |
| - Some boring static text. |
| 31 | +#polylux-slide[ |
| 32 | + == First slide |
30 | 33 |
|
31 |
| - #lorem(20) |
| 34 | + Some static text on this slide. |
32 | 35 | ]
|
33 | 36 |
|
34 |
| -#slide[ |
35 |
| - A fancy dynamic slide without a title. |
36 |
| - #uncover("2-")[This appears later!] |
| 37 | +#polylux-slide[ |
| 38 | + == This slide changes! |
| 39 | +
|
| 40 | + You can always see this. |
| 41 | + // Make use of features like #uncover, #only, and others to create dynamic content |
| 42 | + #uncover(2)[But this appears later!] |
| 43 | +] |
| 44 | +``` |
| 45 | +This code produces these PDF pages: |
| 46 | + |
| 47 | + |
| 48 | +From there, you can either start creatively adapting the looks to your likings |
| 49 | +or you can use one of the provided themes. |
| 50 | +The simplest one of them is called `simple` (what a coincidence!). |
| 51 | +It is still very unintrusive but gives you some sensible defaults: |
| 52 | +```typ |
| 53 | +#import "@preview/polylux:0.2.0": * |
| 54 | +
|
| 55 | +#import themes.simple: * |
| 56 | +
|
| 57 | +#set text(font: "Inria Sans") |
| 58 | +
|
| 59 | +#show: simple-theme.with( |
| 60 | + footer: [Simple slides], |
| 61 | +) |
| 62 | +
|
| 63 | +#title-slide[ |
| 64 | + = Keep it simple! |
| 65 | + #v(2em) |
| 66 | +
|
| 67 | + Alpha #footnote[Uni Augsburg] #h(1em) |
| 68 | + Bravo #footnote[Uni Bayreuth] #h(1em) |
| 69 | + Charlie #footnote[Uni Chemnitz] #h(1em) |
| 70 | +
|
| 71 | + July 23 |
37 | 72 | ]
|
38 | 73 |
|
39 |
| -#slide(theme-variant: "wake up")[ |
40 |
| - Focus! |
| 74 | +#slide[ |
| 75 | + == First slide |
| 76 | +
|
| 77 | + #lorem(20) |
41 | 78 | ]
|
42 | 79 |
|
43 |
| -#new-section("Conclusion") |
| 80 | +#focus-slide[ |
| 81 | + _Focus!_ |
44 | 82 |
|
45 |
| -#slide(title: "Take home message")[ |
46 |
| - Read the book! |
| 83 | + This is very important. |
| 84 | +] |
| 85 | +
|
| 86 | +#centered-slide[ |
| 87 | + = Let's start a new section! |
| 88 | +] |
47 | 89 |
|
48 |
| - Try it out! |
| 90 | +#slide[ |
| 91 | + == Dynamic slide |
| 92 | + Did you know that... |
49 | 93 |
|
50 |
| - Create themes! |
| 94 | + #uncover(2)[ |
| 95 | + ...you can see the current section at the top of the slide? |
| 96 | + ] |
51 | 97 | ]
|
52 | 98 | ```
|
53 |
| -This code produces these PDF pages: |
54 |
| - |
| 99 | +This time, we obtain these PDF pages: |
| 100 | + |
| 101 | + |
| 102 | +As you can see, a theme can introduce its own types of slides (here: `title-slide`, |
| 103 | +`slide`, `focus-slide`, `centered-slide`) to let you quickly switch between |
| 104 | +different layouts. |
| 105 | +The book (**TODO**) has more infos on how to use (and create your own) themes. |
55 | 106 |
|
56 |
| -As you can see, creating slides is as simple as using the `#slide` function. |
57 |
| -You can also use different |
58 |
| -[themes](https://andreaskroepelin.github.io/typst-slides/book/theme-gallery/index.html) |
59 |
| -(contributions welcome if you happen to |
60 |
| -[create your own](https://andreaskroepelin.github.io/typst-slides/book/themes.html#create-your-own-theme)!) |
61 | 107 |
|
62 |
| -For dynamic content, the template also provides [a convenient API for complex |
63 |
| -overlays](https://andreaskroepelin.github.io/typst-slides/book/dynamic.html). |
| 108 | +For dynamic content, polylux also provides [a convenient API for complex |
| 109 | +overlays](https://andreaskroepelin.github.io/polylux/book/dynamic.html). |
64 | 110 |
|
65 | 111 | Visit the
|
66 |
| -[book](https://andreaskroepelin.github.io/typst-slides/book) |
| 112 | +[book](https://andreaskroepelin.github.io/polylux/book) |
67 | 113 | for more details or take a look at the
|
68 |
| -[demo PDF](https://github.com/andreasKroepelin/typst-slides/releases/latest/download/demo.pdf) |
| 114 | +[demo PDF](https://github.com/andreasKroepelin/polylux/releases/latest/download/demo.pdf) |
69 | 115 | where you can see the features of this template in action.
|
70 | 116 |
|
71 |
| -**⚠ This template is in active development. |
| 117 | +**⚠ This package is under active development. |
72 | 118 | While I try to make sure that the `main`-branch always is in a usable state,
|
73 | 119 | there are no compatibility guarantees!**
|
| 120 | + |
| 121 | +## Acknowledgements |
| 122 | +Thank you to... |
| 123 | +- [@drupol](https://github.com/drupol) for the `university` theme |
| 124 | +- [@Enivex](https://github.com/Enivex) for the `metropolis` theme |
| 125 | +- [@MarkBlyth](https://github.com/MarkBlyth) for contributing to the `clean` theme |
| 126 | +- [@fncnt](https://github.com/fncnt) for coming up with the name "polylux" |
| 127 | +- the Typst authors and contributors for this refreshing piece of software |
0 commit comments