Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change strings to content where possible #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ This is a template for creating slides in [Typst](https://typst.app/).
#import "slides.typ": *

#show: slides.with(
authors: "Names of author(s)",
short-authors: "Shorter author for slide footer",
title: "Title of the presentation",
subtitle: "Subtitle of the presentation",
short-title: "Shorter title for slide footer",
date: "March 2023",
authors: [Names of author(s)],
short-authors: [Shorter author for slide footer],
title: [Title of the presentation],
subtitle: [Subtitle of the presentation],
short-title: [Shorter title for slide footer],
date: [March 2023],
)

#set text(font: "Inria Sans", size: 25pt)

#slide(theme-variant: "title slide")

#new-section("My section name")
#new-section([My section name])

#slide(title: "A boring static slide")[
#slide(title: [A boring static slide])[
Some boring static text.

#lorem(20)
Expand All @@ -40,9 +40,9 @@ This is a template for creating slides in [Typst](https://typst.app/).
Focus!
]

#new-section("Conclusion")
#new-section([Conclusion])

#slide(title: "Take home message")[
#slide(title: [Take home message])[
Read the book!

Try it out!
Expand Down
2 changes: 1 addition & 1 deletion book/src/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ don't have to) provide the following arguments in the form of
```typ
#show: slides.with(
title: "some string",
subtitle: [contents are also possible],
subtitle: [*content* is also valid here],
// ...
)
```
Expand Down
17 changes: 10 additions & 7 deletions book/src/theme-gallery/bipartite.typ
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@
#import "../../../themes/bipartite.typ": *

#show: slides.with(
authors: ("Author A", "Author B"), short-authors: "Short author",
title: "Title", short-title: "Short title", subtitle: "Subtitle",
date: "Date",
authors: ([Author A], [Author B]),
short-authors: [Short author],
title: [Title],
short-title: [Short title],
subtitle: [Subtitle],
date: [Date],
theme: bipartite-theme(),
)

#slide(theme-variant: "title slide")

#new-section("section name")
#new-section([section name])

#slide(title: "A longer slide title")[
#slide(title: [A longer slide title])[
#lorem(40)
]

#slide(theme-variant: "east", title: "On the right!")[
#slide(theme-variant: "east", title: [On the right!])[
#lorem(40)
]

#slide(theme-variant: "center split")[
#slide(theme-variant: [center split])[
#lorem(40)
][
#lorem(40)
Expand Down
19 changes: 11 additions & 8 deletions book/src/theme-gallery/bristol.typ
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,30 @@
#import "../../../themes/bristol.typ": *

#show: slides.with(
authors: ("Author A", "Author B"), short-authors: "Short author",
title: "Title", short-title: "Short title", subtitle: "Subtitle",
date: "Date",
authors: ([Author A], [Author B]),
short-authors: [Short author],
title: [Title],
short-title: [Short title],
subtitle: [Subtitle],
date: [Date],
theme: bristol-theme(),
)

#slide(theme-variant: "title slide")

#new-section("section name")
#new-section([section name])

#slide(title: "Slide title")[
#slide(title: [Slide title])[
A slide
]

#slide(title: "Two column")[
#slide(title: [Two column])[
Column A goes on the left...
][
And column B goes on the right!
]

#slide(title: "Variable column sizes", colwidths: (2fr, 1fr, 3fr))[
#slide(title: [Variable column sizes], colwidths: (2fr, 1fr, 3fr))[
This is a medium-width column
][
This is a rather narrow column
Expand All @@ -32,4 +35,4 @@ This is a quite a wide column

#slide(theme-variant: "wake up")[
Wake up!
]
]
13 changes: 8 additions & 5 deletions book/src/theme-gallery/default.typ
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
#import "../../../slides.typ": *

#show: slides.with(
authors: ("Author A", "Author B"), short-authors: "Short author",
title: "Title", short-title: "Short title", subtitle: "Subtitle",
date: "Date",
authors: ([Author A], [Author B]),
short-authors: [Short author],
title: [Title],
short-title: [Short title],
subtitle: [Subtitle],
date: [Date],
)

#slide(theme-variant: "title slide")

#new-section("section name")
#new-section([section name])

#slide(title: "Slide title")[
#slide(title: [Slide title])[
A slide
]

Expand Down
45 changes: 27 additions & 18 deletions book/src/theme-gallery/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,19 @@ You can specify it explicitly by referring to `slides-default-theme`:
#import "slides.typ": *

#show: slides.with(
authors: ("Author A", "Author B"), short-authors: "Short author",
title: "Title", short-title: "Short title", subtitle: "Subtitle",
date: "Date",
authors: ("Author A (eg. string)", [Author B (eg. content)]),
short-authors: [Short author],
title: [Title],
short-title: [Short title],
subtitle: [Subtitle],
date: [Date],
)

#slide(theme-variant: "title slide")

#new-section("section name")
#new-section([section name])

#slide(title: "Slide title")[
#slide(title: [Slide title])[
A slide
]

Expand Down Expand Up @@ -89,21 +92,24 @@ It features a dominant partition of space into a bright and a dark side.
#import "themes/bipartite.typ": *

#show: slides.with(
authors: ("Author A", "Author B"), short-authors: "Short author",
title: "Title", short-title: "Short title", subtitle: "Subtitle",
date: "Date",
authors: ("Author A (eg. string)", [Author B (eg. content)]),
short-authors: [Short author],
title: [Title],
short-title: [Short title],
subtitle: [Subtitle],
date: [Date],
theme: bipartite-theme(),
)

#slide(theme-variant: "title slide")

#new-section("section name")
#new-section([section name])

#slide(title: "A longer slide title")[
#slide(title: [A longer slide title])[
#lorem(40)
]

#slide(theme-variant: "east", title: "On the right!")[
#slide(theme-variant: "east", title: [On the right!])[
#lorem(40)
]

Expand Down Expand Up @@ -152,27 +158,30 @@ Default logos are shipped with the theme, however they can be swapped out for an
#import "themes/bristol.typ": *

#show: slides.with(
authors: ("Author A", "Author B"), short-authors: "Short author",
title: "Title", short-title: "Short title", subtitle: "Subtitle",
date: "Date",
authors: ("Author A (eg. string)", [Author B (eg. content)]),
short-authors: [Short author],
title: [Title],
short-title: [Short title],
subtitle: [Subtitle],
date: [Date],
theme: bristol-theme(),
)

#slide(theme-variant: "title")

#new-section("section name")
#new-section([section name])

#slide(title: "Slide title")[
#slide(title: [Slide title])[
A slide
]

#slide(title: "Two column", gutter: .5em)[
#slide(title: [Two column], gutter: .5em)[
Column A goes on the left...
][
And column B goes on the right!
]

#slide(title: "Variable column sizes", colwidths: (2fr, 1fr, 3fr))[
#slide(title: [Variable column sizes], colwidths: (2fr, 1fr, 3fr))[
This is a medium-width column
][
This is a rather narrow column
Expand Down
42 changes: 21 additions & 21 deletions examples/demo.typ
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#import "../slides.typ": *

#show: slides.with(
authors: "Andreas Kröpelin",
short-authors: "A. Kröpelin",
authors: [Andreas Kröpelin],
short-authors: [A. Kröpelin],
title: [`typst-slides`: Easily creating slides in Typst ],
subtitle: "An overview over all the features",
short-title: "Slides template demo",
date: "April 2023",
subtitle: [An overview over all the features],
short-title: [Slides template demo],
date: [April 2023],
)

#show link: set text(blue)
Expand All @@ -16,24 +16,24 @@

#slide(theme-variant: "title slide")

#new-section("Introduction")
#new-section([Introduction])

#slide(title: "About this presentation")[
#slide(title: [About this presentation])[
This presentation is supposed to briefly showcase what you can do with this
template.

For a full documentation, read the
#link("https://andreaskroepelin.github.io/typst-slides/book/")[online book].
]

#slide(title: "A title")[
#slide(title: [A title])[
Let's explore what we have here.

On the top of this slide, you can see the slide title.

We used the `title` argument of the `#slide` function for that:
```typ
#slide(title: "First slide")[
#slide(title: [First slide])[
...
]
```
Expand All @@ -51,7 +51,7 @@
This helps our audience with not getting lost after a microsleep.
]

#slide(title: "The bottom of the slide")[
#slide(title: [The bottom of the slide])[
Now, look down!

There we have some general info for the audience about what talk they are
Expand All @@ -60,7 +60,7 @@
You can also see the slide number there.
]

#new-section("Dynamic content")
#new-section([Dynamic content])

#slide(title: [A dynamic slide with `pause`s])[
Sometimes we don't want to display everything at once.
Expand All @@ -79,7 +79,7 @@
#text(.6em)[(Also note that the slide number does not change while we are here.)]
]

#slide(title: "Fine-grained control")[
#slide(title: [Fine-grained control])[
When `#pause` does not suffice, you can use more advanced commands to show
or hide content.

Expand Down Expand Up @@ -116,7 +116,7 @@
]
]

#slide(title: "Complex display rules")[
#slide(title: [Complex display rules])[
So far, we only used single subslide indices to define when to show something.

We can also use arrays of numbers...
Expand All @@ -136,7 +136,7 @@
]
]

#slide(title: "Convenient rules as strings")[
#slide(title: [Convenient rules as strings])[
As as short hand option, you can also specify rules as strings in a special
syntax.

Expand Down Expand Up @@ -246,7 +246,7 @@
`start` is again optional and defaults to `1`.
]

#slide(title: "Different ways of covering content")[
#slide(title: [Different ways of covering content])[
When content is covered, it is completely invisible by default.

However, you can also just display it in light gray by using the
Expand All @@ -266,7 +266,7 @@

#new-section("Themes")

#slide(title: "How a slide looks...")[
#slide(title: [How a slide looks...])[
... is defined by the _theme_ of the presentation.

This demo uses the default theme.
Expand All @@ -277,26 +277,26 @@
Themes can also provide variants, for example ...
]

#slide(theme-variant: "wake up")[
#slide(theme-variant: [wake up])[
... this one!

It's very minimalist and helps the audience focus on an important point.
]

#slide(title: "Your own theme?")[
#slide(title: [Your own theme?])[
If you want to create your own design for slides, you can define custom
themes!

#link("https://andreaskroepelin.github.io/typst-slides/book/themes.html#create-your-own-theme")[The book]
explains how to do so.
]

#new-section("Conclusion")
#new-section([Conclusion])

#slide(title: "That's it!")[
#slide(title: [That's it!])[
Hopefully you now have some kind of idea what you can do with this template.

Consider giving it
#link("https://github.com/andreasKroepelin/typst-slides")[a GitHub star #text(font: "OpenMoji")[#emoji.star]]
or open an issue if you run into bugs or have feature requests.
]
]
Loading