Skip to content

Commit 5c77bb8

Browse files
Merge pull request #59 from andreasKroepelin/prepare-package
Prepare package
2 parents 8021eda + 9184eef commit 5c77bb8

File tree

120 files changed

+4766
-1830
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+4766
-1830
lines changed

README.md

Lines changed: 98 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,127 @@
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/).
33

4-
[![Book badge](https://img.shields.io/badge/docs-book-green)](https://andreaskroepelin.github.io/typst-slides/book)
5-
![GitHub](https://img.shields.io/github/license/andreasKroepelin/typst-slides)
6-
![GitHub release (latest by date)](https://img.shields.io/github/v/release/andreasKroepelin/typst-slides)
7-
[![Demo badge](https://img.shields.io/badge/demo-pdf-blue)](https://github.com/andreasKroepelin/typst-slides/releases/latest/download/demo.pdf)
4+
[![Book badge](https://img.shields.io/badge/docs-book-green)](https://andreaskroepelin.github.io/polylux/book)
5+
![GitHub](https://img.shields.io/github/license/andreasKroepelin/polylux)
6+
![GitHub release (latest by date)](https://img.shields.io/github/v/release/andreasKroepelin/polylux)
7+
[![Demo badge](https://img.shields.io/badge/demo-pdf-blue)](https://github.com/andreasKroepelin/polylux/releases/latest/download/demo.pdf)
8+
![Themes badge](https://img.shields.io/badge/themes-5-aqua)
89

910
## Quickstart
11+
For the bare-bones, do-it-yourself experience, all you need is:
1012
```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)
2119
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
2324
24-
#slide(theme-variant: "title slide")
25+
A lazy author
2526
26-
#new-section("My section name")
27+
July 23, 2023
28+
]
29+
]
2730
28-
#slide(title: "A boring static slide")[
29-
Some boring static text.
31+
#polylux-slide[
32+
== First slide
3033
31-
#lorem(20)
34+
Some static text on this slide.
3235
]
3336
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+
![minimal example](assets/minimal.png)
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
3772
]
3873
39-
#slide(theme-variant: "wake up")[
40-
Focus!
74+
#slide[
75+
== First slide
76+
77+
#lorem(20)
4178
]
4279
43-
#new-section("Conclusion")
80+
#focus-slide[
81+
_Focus!_
4482
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+
]
4789
48-
Try it out!
90+
#slide[
91+
== Dynamic slide
92+
Did you know that...
4993
50-
Create themes!
94+
#uncover(2)[
95+
...you can see the current section at the top of the slide?
96+
]
5197
]
5298
```
53-
This code produces these PDF pages:
54-
![title slide](assets/simple.png)
99+
This time, we obtain these PDF pages:
100+
![simple example](assets/simple.png)
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.
55106

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)!)
61107

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).
64110

65111
Visit the
66-
[book](https://andreaskroepelin.github.io/typst-slides/book)
112+
[book](https://andreaskroepelin.github.io/polylux/book)
67113
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)
69115
where you can see the features of this template in action.
70116

71-
**⚠ This template is in active development.
117+
**⚠ This package is under active development.
72118
While I try to make sure that the `main`-branch always is in a usable state,
73119
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

assets/Makefile

Lines changed: 0 additions & 4 deletions
This file was deleted.

assets/logo.png

20.5 KB
Loading

assets/logo2.png

31.1 KB
Loading

assets/minimal.png

59.2 KB
Loading

assets/simple.png

-8.63 KB
Loading

book/book.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ authors = ["Andreas Kröpelin"]
33
language = "en"
44
multilingual = false
55
src = "src"
6-
title = "Slides in Typst"
6+
title = "Polylux"
77

88
[output.html]
9-
site-url = "/typst-slides/book/"
9+
site-url = "/polylux/book/"
10+
11+
[output.html.code.hidelines]
12+
typ = "~"
13+

book/src/SUMMARY.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
# Summary
22

3-
- [Basics](./basics.md)
4-
- [Configuration](./config.md)
5-
- [Creating slides](./slide.md)
6-
- [Sections](./section.md)
7-
- [Dynamic slides](./dynamic.md)
8-
- [Themes](./themes.md)
9-
- [Gallery](./theme-gallery/index.md)
3+
[Polylux](./polylux.md)
4+
- [Getting started](./getting-started.md)
5+
- [Do it yourself](./diy/diy.md)
6+
- [Dynamic slides](./dynamic/dynamic.md)
7+
- [Reserving space: only and uncover](./dynamic/reserve.md)
8+
- [General syntax](./dynamic/syntax.md)
9+
- [Complex rules](./dynamic/complex.md)
10+
- [Helper functions](./dynamic/helper.md)
11+
- [one-by-one and line-by-line](./dynamic/obo-lbl.md)
12+
- [pause](./dynamic/pause.md)
13+
- [alternatives](./dynamic/alternatives.md)
14+
- [Cover mode](./dynamic/cover.md)
15+
- [Handout mode](./dynamic/handout.md)
16+
- [Internals](./dynamic/internals.md)
17+
- [Themes](./themes/themes.md)
18+
- [Gallery](./themes/gallery/index.md)
19+
- [Simple](./themes/gallery/simple.md)
20+
- [Clean](./themes/gallery/clean.md)
21+
- [Metropolis](./themes/gallery/metropolis.md)
22+
- [University](./themes/gallery/university.md)
23+
- [Bipartite](./themes/gallery/bipartite.md)
24+
- [Build your own](./themes/your-own.md)
25+
- [Helpers for theme authors](./themes/helpers.md)

book/src/basics.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

book/src/config.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)