diff --git a/README.md b/README.md index 421abb8..d680ce2 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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! diff --git a/book/src/config.md b/book/src/config.md index de8d6e6..1cd0d5b 100644 --- a/book/src/config.md +++ b/book/src/config.md @@ -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], // ... ) ``` diff --git a/book/src/theme-gallery/bipartite.typ b/book/src/theme-gallery/bipartite.typ index d5dd4ea..1310734 100644 --- a/book/src/theme-gallery/bipartite.typ +++ b/book/src/theme-gallery/bipartite.typ @@ -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) diff --git a/book/src/theme-gallery/bristol.typ b/book/src/theme-gallery/bristol.typ index 540b88e..2835a1b 100644 --- a/book/src/theme-gallery/bristol.typ +++ b/book/src/theme-gallery/bristol.typ @@ -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 @@ -32,4 +35,4 @@ This is a quite a wide column #slide(theme-variant: "wake up")[ Wake up! -] \ No newline at end of file +] diff --git a/book/src/theme-gallery/default.typ b/book/src/theme-gallery/default.typ index 77c5e84..e07b6ec 100644 --- a/book/src/theme-gallery/default.typ +++ b/book/src/theme-gallery/default.typ @@ -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 ] diff --git a/book/src/theme-gallery/index.md b/book/src/theme-gallery/index.md index 7881c15..b3d5424 100644 --- a/book/src/theme-gallery/index.md +++ b/book/src/theme-gallery/index.md @@ -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 ] @@ -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) ] @@ -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 diff --git a/examples/demo.typ b/examples/demo.typ index a0799f1..85ed7ee 100644 --- a/examples/demo.typ +++ b/examples/demo.typ @@ -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) @@ -16,9 +16,9 @@ #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. @@ -26,14 +26,14 @@ #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])[ ... ] ``` @@ -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 @@ -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. @@ -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. @@ -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... @@ -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. @@ -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 @@ -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. @@ -277,13 +277,13 @@ 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! @@ -291,12 +291,12 @@ 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. -] \ No newline at end of file +] diff --git a/examples/gauss.typ b/examples/gauss.typ index 03ed6aa..a4edb3a 100644 --- a/examples/gauss.typ +++ b/examples/gauss.typ @@ -2,12 +2,12 @@ #show: slides.with( - authors: "Carl Friedrich Gauß", - short-authors: "CF Gauß", - title: "On a revolutionary way to sum up natural numbers", - subtitle: "What they won't teach you in school", - short-title: "Sum of natural numbers", - date: "1784", + authors: [Carl Friedrich Gauß], + short-authors: [CF Gauß], + title: [On a revolutionary way to sum up natural numbers], + subtitle: [What they won't teach you in school], + short-title: [Sum of natural numbers], + date: [1784], ) #set text(font: "GFS Neohellenic") @@ -15,15 +15,15 @@ #slide(theme-variant: "title slide") -#new-section("Introduction") +#new-section([Introduction]) -#slide(title: "Problem statement")[ +#slide(title: [Problem statement])[ Let $n in NN$. We are interested in sums of the form $ 1 + ... + n = sum_(i=1)^n i $ ] -#slide(title: "The theorem")[ +#slide(title: [The theorem])[ I discovered that $ sum_(i=1)^n i = n(n+1)/2 $ @@ -31,9 +31,9 @@ Let's prove that! ] -#new-section("Proof") +#new-section([Proof]) -#slide(title: "Method of proof")[ +#slide(title: [Method of proof])[ We will prove the theorem by induction, following these steps: + base case @@ -41,7 +41,7 @@ + induction step ] -#slide(title: "Proof")[ +#slide(title: [Proof])[ #set text(.7em) #one-by-one[ @@ -65,13 +65,13 @@ ] ] -#slide(theme-variant: "wake up")[ +#slide(theme-variant: [wake up])[ = Proof is over, wake up! ] -#new-section("Conclusion") +#new-section([Conclusion]) -#slide(title: "That's it!")[ +#slide(title: [That's it!])[ Now you know how to calculate those sums more quickly, nice! ] diff --git a/examples/override-theme.typ b/examples/override-theme.typ index de9c990..5eb0ca1 100644 --- a/examples/override-theme.typ +++ b/examples/override-theme.typ @@ -1,17 +1,17 @@ #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], ) -#new-section("My section name") +#new-section([My section name]) -#slide(title: "Slide title")[ +#slide(title: [Slide title])[ #lorem(40) ] @@ -19,6 +19,6 @@ #rotate(45deg, heading(level: 2, slide-info.title)) #scale(x: -100%, bodies.first()) ] -#slide(override-theme: special-purpose-theme, title: "This is rotated")[ +#slide(override-theme: special-purpose-theme, title: [This is rotated])[ #lorem(40) ] diff --git a/examples/simple.typ b/examples/simple.typ index 53de656..3f90628 100644 --- a/examples/simple.typ +++ b/examples/simple.typ @@ -1,21 +1,21 @@ #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") #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) @@ -30,9 +30,9 @@ Focus! ] -#new-section("Conclusion") +#new-section([Conclusion]) -#slide(title: "Take home message")[ +#slide(title: [Take home message])[ Read the book! Try it out!