Transcript#

This transcript was generated automatically and may contain errors.

Okay, today I am so excited to introduce our featured Lab Manager who is a two-time guest he's in the Leaderboard for repeat guests at the Data Science Lab, Emil Hvitfeldt. Thank you so much for being here. Would you like to introduce yourself?

Thank you for having me. So I'm Emil Hvitfeldt. I'm on the Tidy Models team, trying to make modeling better. And in my spare time, I do a little bit of slide art, which is what we'll be talking about today.

It's his secret passion. We're going to talk all about that today. I'm also joined by Isabella Velasquez. She is here. Would you like to say hello?

Hi, everyone. Thanks so much for joining.

All right. I say let's go ahead and get started. So Emil, today we are going to be talking about slide crafting in Quarto. And slide crafting, I feel like, is a word that you use a lot. I like it. What we're really talking about is the output format of Reveal.js and all of the magical extensions that you have been working on over the years, including very recently, to make slides better. Would you like to share your screen and give us a little bit of a primer?

Yes. Before we dig in. OK, awesome.

Quarto and Reveal.js basics

Moving everything away. All right. So everything we'll be doing today is Quarto-related. So it's how you would expect everything to be. So you do Quarto, and you put a format. But we're doing slide crafting, or making slides, presentations.

And the main difference here is we're setting a different format. So here is an example of where we create an HTML page and also make PDFs in different ways. But by setting this format to Reveal.js, we are getting something that looks like this.

So now everything is in a non-scrollable format, and we can advance and see how you would expect slides to be in a presentation format. And you can do most everything you can do in a normal Quarto document.

So we have a whole chunk highlighting, a little animation highlighting. You can basically do everything you expect and a couple of things that are specific to slides.

So one of the things, which we'll get to later, is normally you press the arrows to advance to the next slide. But sometimes you also want something to happen within the slide itself. And that's in Reveal.js terminology called a fragment.

So you have the whole slide, but you're turning it into fragments. So an easy way of this is just the idea of an instrumental list. So here we are not actually creating three or four different slides, each with one more element. They're all happening on the same page.

But when we press Next, it just modifies the slide itself instead of creating copies over. And it can do all the little things like zoom in, fades in, and what have you. And this is all just built into Quarto. No extension needed. This is default behavior.

All of it, yeah. And just a few more things. There's a little menu where you can see the slides. And there's some tools, too, which I think is very nice. And you can also see it says what they are, but it's also a little... If you look at the top, it's full screen, but it's also an F. So if you press F, it full screens as well.

Yeah, my favorite one is E. If you're ever like, I'm looking at this, but I just want to print this out as a PDF. Just hit the E key, and it will turn into a PDF for you to print out.

Yeah. So if you press E, it turns into a scrollable thing, which doesn't seem useful. But if you line it up and try to print it, it prints in how you would expect it to print. So as long as you're not doing anything crazy or have videos, you now have something that you can turn into a PDF.

But this is technically a website that is being hosted. This one is being hosted online, using local hosted as yourself.

Gregory is asking, does that PDF export still use Pandoc, or is there an option of exporting via Typed?

So none of this uses Pandoc, technically. I'm pretty sure, and I might be wrong, because I'm not that deep in the portal. But I'm pretty sure Reveal.js is one of our non-Pandoc paths.

So we're just turning something into something that Reveal.js understands. And then Reveal.js does a thing. And then this PDF export mode is just basically fancy CSS that makes it so when you try to print it, everything aligns how you would expect it to align. So I'm pretty sure it doesn't do it.

There's other ways, too. I found a way where you can use the Office Libre CLI that can turn things around. So a bunch of different things. And this also doesn't use Typed, because this is technically an HTML format, first and foremost.

Audio check and setup

All right, I'm going to pause for two quick seconds and ask you if you might change your mic to your laptop. I think we are having some Bluetooth connectivity issues.

If you go down to your audio in Zoom. So you might need to stop sharing. Yeah, in Zoom. Go down to audio in the little arrow next to your audio button. And then change your mic at the top to be your laptop. Let's see if that sounds a little bit better.

Wait, I have an audio button? You might need to stop sharing. Oh, stop sharing. And at the bottom left, you'll have an audio button. Yes. Sorry, sound engineer Libby is making us stop for two seconds. We should have done this beforehand.

Everybody, if you use AirPods as your microphone on your Zoom calls, I want you to know that the sound is probably not as good as you think it is. All right, what about now? Oh, so much better. We have thumbs up from Gregory. Okay, amazing.

Creating slides in Positron

As we said, everything is just an HTML format. And Reveal.js is its own thing. And so Quarto is just creating something that Reveal.js understands.

All right, so let's see how it actually looks on our end. So, I always like to be on the desktop, at least for demos, because I have a lot of different things in here. So, you can create actually many things. New file.

If you're in Positron and have the Quarto extension installed, which I will show in just a little bit. Oh, we don't have. We don't have a slide deck project template, but we can just change our format.

So, if you just do nothing. When we went on save. So, the way you normally do it is you have a section. And new slide text.

All right, so we added. So, the way it works is if you have a title, it will show up. And if you do a subtitle, it will show up. I don't really use the title and subtitle because the styling is weird and very esoteric and specific only to the title slide. And if you just remove it, it just go directly to the first section.

So, you can note each new slide with like a level two heading. So, there's like these two hashtags. And that denotes a new slide. So, we have the text here. We advance over. And we're putting in the plot by itself.

There's technically also a level one heading that also does something. So, that's the idea of technically a section. So, here we have our slide. And then this level one heading here is like slightly differently styled to be like down in the middle. And it doesn't really mean much, but it has this like nested idea in it.

I don't really think it's that important, but I sometimes use it if you imagine you have a slide that reflects three parts of like idea, implementation, results. You could have those as level one headings to give a little bit of a different vibe and sort things by, but you don't actually do much.

Template and YAML settings

There's a million little settings. The YAML doesn't always do what I want it to do. It doesn't for me either. And that will be improved a little bit later.

So, if you have Quarto, you probably also have it installed as a CLI tool. So, you can use Quarto use template, and then you can put in like a GitHub name of something. So, I have a template. So, if you use Quarto use template and then Emil Hvitfeldt Quarto revealjs template, we say I trust myself and I want it as a subdirectory. Yes. And we just call it demo. And then we can open it.

So, this is a very small demo, or the template I use for all my slides. And it doesn't have a lot, but it has enough of the things you need to remember. So, the slides look the same as how they did before. But I added a couple of things I never remember.

So, I'm setting a different width and height to everything. The aspect ratio is fine in the other one. But if you do any total slides with a font size big enough that people can read it, I find that this aspect ratio is slightly better. Because otherwise, you can only really put like 40 characters in it before it starts wrapping, and then it's not nice.

This page title here is kind of weird. Because what this actually means is the name of the tab in the browser of this specific page. Because otherwise, I think it's untitled or just index. So, if you're giving a talk, you can put the name of the talk here, and then it actually shows up in the browser totally when other people read it. I really like that.

And I don't remember what all of this is. I have them here. I don't like total line numbers. So, if you have a total chart, if we set echo to true here, we see that it's not that style that last right here. But the 1 plus 1 is being shown, but it's being shown without the numbers. But if we add the numbers back in, it's just like a little 1. I don't really care for that. So, in my default, I turn it off.

I like this, too. This leads us into Raha's question, actually, which is, this UI that you're using for slide generation, is this exclusive to Positron? No. This should work anywhere, really. Because we're in Positron, we have some affordances. And that's why we have the preview button and the random save and some little niceties like that. But you can also do everything like this by just going.

A lot of this is just that Positron's UI is just really, really changeable and customizable. So, what Emil has is a side-by-side view where his source is on the left and his terminal and viewer and everything else is on the right. And he also has render on save on. So, every time he makes a change, he's just going back to the viewer and it's listening for his changes constantly. He saves, and then that change is just showing up in the viewer. Yes.

And then the last two things I have in my template is I already have preset up a slot, like some very light CSS.

And it's already put into the theme, and I know this is the syntax I need for it.

Another thing is if you do anything where you need JavaScript, you need to put it under include after body. So, I already have just an empty HTML file with a strip tag in there. So, if I need to add some JavaScript somehow, it's already lined up how it needs to be.

And it doesn't hurt right now. So, if you use this and don't use that file, it's fine. But I never remember where to put it, if it's include after, before, whatever. So, this is just everything I need.

Fenced divs and columns

So, one last thing before we move on is there's this idea in, I want to say it's in PaintDrop, but it might just be a Markdown thing. But this idea of a nest. Oh, no. Actually, before we do any of that, let's quickly do extensions.

So, if you go to the extension marketplace, I'm pretty sure you already have Quarto installed. That was my question. I was just putting in the Discord. I think it's bundled with Positron. I know at one point it wasn't, and at one point it was, but I don't know where we are now. Okay. It might depend on when you install Positron, then.

Yes. But it's easy to install. You just type Quarto. It should pop up fairly high, and then you just press install, and it reloads. And that gives us a bunch. Well, that gives us all of the preview, render, and save. That's how all of that has happened, I think, is through the extension. But it also gives us a couple of other little niceties.

One of them is this idea of short codes, I think it's called. So, if I do columns, I get these two little insert things.

So, this is what we call a fenced div. In... I want to say Mac.id is Quarto. So, on a slide, we typically want to put things side by side. And since all of this is HTML, CSS, things that sometimes can be a little bit annoying to deal with, we have this built-in thing called columns.

So, we start with just like this. This is a div, which is HTML, like container of content. And we add on. This syntax here means divit the class name columns. And then this is a nested structure. So, inside of it, we are putting two columns in it. And then inside those, and then we put content. So, this is a way of us to make sure we have things that happen side by side.

You can do with here to be... Yeah. So, you can also set the width. So, we can technically put like five. I'm glad that you're adding more. Because Andrew had just asked, is there a maximum number of columns you can have? So, there's technically... Like, functionally, there's not a match. But visually, you're going to run out of space real fast. Right. Yeah. Visually, it's going to push you off the margins after a little bit.

And this is some CSS that I think... This is a bundle with reveal.js itself or something that Quarto added on top. But this is how we can add a div and we can ship some CSS with it.

But the exciting part is, since all of this is just HTML and CSS, we as the users of this can do the same things. So, in here... So, let's just do... So, if I do a thing called read... So, I'm making a CSS class called read. And I'm saying the color should be red. So, I just created a little CSS class here called read. If I now add that in here, it now turns everything in that one column red. Or the text inside that column red. So, this is obviously not the best example. But imagine that this expands out of different things. And this is basically how all the slide works in here.

Quarto extensions explained

So, let's look at one extension I know. Wait, no. Let's look at one extension that I made recently that, in a way, showcases a similar thing to this. I'm so excited about extensions. If you don't know what an extension is, it's not a package. It's a little bit different. So, Emil's going to talk a little bit about how they differ.

So, here's that one extension. So, the important thing is we first look in and see how do we install it. And most extensions have an installation link. So, we just look in. And this is a piece of terminal code that you're running. It's not in your R console. Yes. And I will show a different way to install it to the read and use. But I'm partial to the terminal.

So, we then say, yes, I trust myself. And then, basically, this. We would like to continue. So, basically, it first asks, do you trust this person to download these files? Essentially, the total add command is a very fancy copy-paste. So, it looks at the repo and then copy-pastes a folder into your working directory.

Essentially, the total add command is a very fancy copy-paste. So, it looks at the repo and then copy-pastes a folder into your working directory.

There's a couple of things. So, you can exclude things. But essentially, just copy-paste over. And at the end, it also asks, hey, do you want to open the documentation? But since I wrote it, I know what happens.

So, what really happened is it added this understore extensions folder, if it wasn't already there. And then it added this extension called chatbubbles, which we'll see. And it has some information about what happens. And then it bundles some CSS and some JavaScript. So, it's just functionally copied over some CSS and some JavaScript that we can now use.

Should we answer some of the questions about extensions before we move on? Yes. I was just going to say, do you want to pause for a second? Because extensions can kind of be confusing.

This is a weird thing. It's in the terminal. I'm not calling something. I'm not using library. So, let's start with Gregory's question, which is one that I don't exactly know the answer to. Gregory said, I saw in the release notes from Positron 179 that the extensions will default to using the Posit public package manager. Do we know if extensions will still be submitted to the OpenVSX marketplace still?

Yes. So, that is a great question. It's a little bit different. So, this is a question about VS Code extensions. But we'll still cover it because I'm showing that too. So, because names are hard. So, we're using extension both to encompass things like the Quarto extension and all these other extensions that you can install on your Positron or VS Code. But we're also using it for these add-ins that you can add to your Quarto projects.

So, all the Quarto extensions don't go on any marketplace because they're just mostly on GitHub. But you can also have them on a file on desk or whatever. But they don't have anything to do with the OpenVSX marketplace at all. Correct.

For Positron, just to round it up, Positron can only install extensions that are on the OpenVSX marketplace. So, if you have an extension and publish it, a VS Code extension and publish it, it by default don't go to the OpenVSX. You need to do that separately. So, if you want to make an extension that works on Positron, you need to publish both places, which I've done and it isn't terribly hard. But it is another set of domains you need to do.

Okay, great. We have one more extension question and then we have a couple that are about styling. So, Hubert asked, are these Quarto extensions global or are they per project? Great question. So, they work within the project itself, right? So, you could have, which is not super recommended, but you could have multiple projects nested, but that becomes really messy. So, you can have an underscore Quarto YAML file and that denotes its project. But if it isn't there, it just assumes that it's within the folder you're in. But yeah, all these extensions are just within their folder that they're being used in.

But they're also not that heavy. Like, I feel most of them are fairly small. So, it isn't. I find that they don't bloat your project. Yeah. And the thing that I have been helping or trying to explain is, like, since it's not a package and you're not calling it, the version changes aren't as big of a problem. Like, you've downloaded this thing that is now sort of static, for the most part. I mean, for most extensions. I'm not going to say for all of them. I think there are some more complex ones. But for the most part, you are downloading assets that then you can use in your project. And you don't have to worry so much about whether or not that GitHub repo that contains that extension that you downloaded at one time changes. It's not as big of a problem.

It's just a copy-paste of a folder, essentially. And because one of the problems you can get a little bit if you worry about problems like this is dependent extensions, which doesn't actually happen in Quarto. Most people have looked at it a little bit because it's kind of useful sometimes. But basically, all Quarto extensions are separate. Very few of them, if any, install other things. So, it is the version that it is when you download it. There's no compile thing. There's no, oh, let me find the most recent thing of all the dependencies. No, it's whatever is in the repo of the time that you did it. Yes, it's a snapshot in time copy-paste.

Okay, we have one from Zach that said, when you change those text fonts inside of those columns, could you do it for all the columns at once? Maybe by changing the top div? Yes. I'm going to demonstrate that real quick. If we change the red up to all of them. And this is where you need to know just how CSS works because we have the specificity in here. So, if we want to change all of them except the inside one. So, we can set the outside one to red, but then one of the inside ones to blue. And then the blue wins because it's more specific.

Right. And these are also just variables, right? So, this .red is a variable that's representing a hex value inside of that .scss file, which stands for sassy CSS. So, Emile could go into that .scss file and he could define blue as whatever hex code he wanted to.

That might not show that well. The darker red, yeah. Yeah. And so, you can do a lot of neat things with that. And honestly, not to turn this into an AI lab, but AI is really good at CSS. Yes. CSS is a very well-documented thing, which is great.

We have one more question, if we could get to it really quickly. And then we can move on to showing these amazing extensions because we only have like 25 minutes left. Notobeco had asked, do you also get grid logic like you have with CSS Grid? I don't know anything about CSS Grid. We don't, but it's a great idea and I might look into that. The problem is the way the slides work is the width really easy to define, but it's just like from left to right. The height of the slide is really hard to define. Because, and if I can... So, if we go into...

I can't move in this one anymore.

So, in this slide, you have everything looks nice and you can imagine what the height is. But because of the way the styling is done, things move around according to the width. So, now suddenly, if we wanted to break our slide into a 4x4 grid of values, how do we do it here? When does it stop? When do we do off the page? So, you need to do some annoying math based on what it looks like underneath.

So, here, technically, this is the slide area of where everything is. But it's kind of hard to fetch in a way where things don't just go off the page. So, width-based calculations in revealjs, really easy. Height-based stuff, hard. But it's not a bad idea and I might try some of that.

Quarto VS Code extensions

Community-driven development. All right, let's talk about some of the amazing extensions. So, we know what Quarto can do right out of the box, which is a lot. There are so many things that it would be cool if Quarto could do. And let me tell you, Emil has been making them.

So, I'm actually swapping quickly just into auto-related VS Code extensions. So, one of them is just a little one I wrote about things that happen. It does a lot of neat, mostly auto-complete things.

Oh my gosh, I love this. Oh my gosh, how did I not know about this? So, one of them is this thing called a short code of the meta tag. So, basically anything that's in the YAML, you can reuse in the document. But there's no auto-complete in it. So, this extension adds auto-complete on it. If you have a short code, it also auto-completes on all your short codes. So, you don't need to remember all the names.

So, it just adds a lot of little things that are kind of nice. Oh, another thing. So, here we're adding width and everything, but you can also add style tags directly. So, you just add CSS inline. The extension adds the auto-complete for that here. So, we can say background color, and I want it to be green, which is a bad idea.

And now we messed up something here. Oh boy, not accessible at all. But you can add style inline, but it's easy to do now because the Quarto extension helper does that.

Another really useful extension is Quarto Wizard, which does a lot of things, which I feel like we don't have time to do. But this is an alternative way of installing extensions. So, it has a UI, but why I just wanted to mention it real quick was that I'm tapping into a thing that Quarto Wizard does in my extensions.

So, I know that I'm adding new syntax and whatever when I make these extensions. So, I did the chat bubbles, right?

Chat bubbles extension

So, here it adds these. So, let's just... Oh no, that's not good. This should work. Oh no. Oh no. It doesn't work. Someone forgot to light a candle somewhere. Yeah. Well, I'll fix that.

But essentially, what we have is I'm tapping in. In my extension, I'm tapping in and adding shortcodes to the extension. So, you don't necessarily have to remember all the new syntax in all the new extensions. Because if you have Quarto Wizard installed, all the tab completion and all of that is just built in.

Anyway, let's look at it. We can just find it. We'll just have to do it. Let's look at it. We can just find it. We'll just have to do it in the example itself.

The syntax was like how we saw it before. Instead of doing tolems and tolem, we call it the Bit 1 Chat. We either put bubbleLeft and bubbleRight as the inside names. Here we're also adding fragments so it shows incrementally. Then we put in text inside.

Now it basically looks like we're sending chats on a phone. We can just go forward. It does this annoying math that no one else wants to do. When we advance far enough, it pushes things up and down, which took a while to do.

This is using the exact same idea as the tolems and tolem idea. But now it's just slightly differently formatted. You can change it. This is where we're also saying instead of bubbleLeft, we have bubbleLeft2 and 3 to give the illusion of there's different people talking here.

This is just a little fun thing that isn't useful. It's essentially just a JavaScript file that helps push the bubbles up when it detects that we're filling the page too much. And then the CSS to do the rounding and the colors. But now that we have that, we just fill it in like this.

I love this so much. I feel like somebody has to interject here and say how cool this is because we're all silently saying it on Discord and it needs to be documented on YouTube Live, that it's so cool. Rahat had said, you said this is a funny little thing that isn't useful. It's very useful. And I feel like everybody who teaches could find a use for this.

And anybody who wants to get everybody's attention in a meeting by showing them something that they don't expect to see. This is a super, super fun thing.

And I feel like everybody who teaches could find a use for this. And anybody who wants to get everybody's attention in a meeting by showing them something that they don't expect to see. This is a super, super fun thing.

Rough notation fragment extension

Another one. I'm just doing a little showcase right now of various different things. So one thing I really think fragments are useful for is for highlighting a word or a sentence. So if you want to put emphasis or something, obviously you can bold it. And you can bold it as a fragment.

So a fragment has three stages. So it's before the fragment is being treated as the fragment is being treated, and after. And the simplest form of fragment just adds different CSS styling to different ones. So that's also how you can make text appear as a fragment because you just say made it invisible before and made it visible after.

And you can do a lot with that. But there's also this JavaScript library that's been around for a while called Rough Notation.

Where's my basic usage? So the way you use it is you have some text you want to highlight and then you put on it .rnFragment. So that's Rough Notation fragment. I maybe should have used a different syntax for this. But basically you do that.

And then when you extend, you have this highlighter thing. So it pretends to paint over it. But it also has other modes. But it has this handwritten feel to it. So it has a little bit of noise in it. And you can just add all of that in here.

And since it's a fragment, it's like an extra step in your slides. It doesn't show and then you hit the next on your slide and it's sort of an animation that it's highlighting and underlining. And it's just a way of emphasizing a thing that happens. And there's a bunch of different types that you can do. And you can change the colors. And there's a bunch of different arguments. You can change color and whatever. All of them just happen with the inline.

So this doesn't work here. Can you see all the reaction emojis that are happening? No, they're not popping out. I don't know if you can. They're all like, we're mind-blown. And I spent some time trying to make it as usable as possible. You can set colors in different ways and whatever.

Oh, and one thing. It took a long time to work. So there's a different extension. This is not my extension.

So this extension right here solves another problem. That is, if you have code... So you can add fragments and styling to text itself. But it's really hard to do it in the code chunks that happen. Because of various reasons, that's what's really hard to do. So Flourish is an extension that allows you to make fragments happen on your code itself.

I was able to line it up. In code chunks? Yeah. Okay. So here we have a code chunk. But let's say we want to highlight a word here. We'll obviously highlight the word up here. But we can also... This was just a box around ggplot2. Or ggplot. We can use the Flourish syntax with the rough notation if they're both installed at the same time. It will note, hey, I've seen both. And then there's a thing around it. So you can also do the rough notation in code chunks which before wasn't a thing. Because I'm doing things weirdly to make things happen here.

All right.

This is so cool. I wanted to ask. The rough notation is like a JavaScript library on its own, right? Yeah. So this is under bundling it in. And I'm technically bundling in something that happened in a branch. Because I wanted the animation to also work in reverse. And the project is basically abandoned. But someone did a PR to make animations happen in reverse. And I'm stealing that too. Well, with attribution. But it's happening.

Editable extension

One thing that I'm actively working on right now but also is public is... Let's go into the sample slide.

So one of the issues when you're writing slides is that you might think, oh, I kind of don't... Like the image here is fine. But I want to move it just a little bit. And the normal approach to do that is... Here I set it with absolute. So adding this absolute class to basically anything but really with images. You're specifying the position with left, right, top, and bottom. And you specify the widths. And it moves around.

But let's say I kind of want this to be a little bit more to the right. You can go in here and change it to be 10 pixels to the left. And then you render. And it moves over a little bit, or maybe a little more. And you do 20. And it moves over just a little bit by a little bit. But this can just take a while to do.

And so where this extension comes in... You install the editable extension the way you would all the other ones. And you add little things to the YAML. Sometimes you need to add things. Oh, that's probably why the chat thing didn't work. Because I didn't finish installation. But you need to add it as probably a filter in the YAML to activate it. But all of that is on the README. So if you follow the README, it should just work.

But if you have the editable extension installed... You will see that in the slide area, there's also a little bit of a menu at the top. So if you click on the modify... This looks kind of weird. But essentially, clicking on the modify... I can click on a thing like this text field over here. And I can move it a little bit around.

Oh, that doesn't work yet. Shoot. If we add another text field down here... And modify it, I can say, like, hello, data science lab. And I want data science to be purple.

But I'm also moving the image around a little bit. This is a bad idea, right? Anybody who has not worked in Quarto Slides... You might not realize that clicking and dragging things like this... In a visual editor mode is not possible. This is completely only made possible by Emil's extension.

So it's still a little slow. So as you saw, you modify some things. You click save, and then you find where it isn't overrided. You can also copy it and paste it in. But then hopefully, it's still very well in progress, some of these new things.

Oh, so the image disappeared. Oh, we lost it somehow. But it basically moves things around. And when it releases, it doesn't have these issues. So it basically allows you to modify things on the slide side.

And this is a work-in-progress version that Emil is using. Like, this should work. The ones you download should work. But I'm adding a lot of... Basically, the modify button doesn't work yet.

How the editable extension works

But the way you have to do things before was you put an editable class to something. So you have to specify the source document. Hey, I want editable on this image. And then we can modify it over. If you hold shift, it understands the ratios. You can set opacity or flip things around. And then when we save it, it overwrites. It updates over here. So now when we re-render it, now it's no longer editable. But it remembered everything we did.

Andrew says, this is magic. So this will get better over time. Surely, but slowly. It will be faster for many things. And there's a lot of code to make this happen. Because I'm technically parsing the Quarto document in JavaScript with regular expressions, which you shouldn't do.

Because I'm technically parsing the Quarto document in JavaScript with regular expressions, which you shouldn't do.

But that will be... With the Quarto2, that can be linked somewhere. They're rewriting Quarto in Rust from the ground up. And that is improving speeds a lot. And once we have that with this, then suddenly we have a much faster feedback loop.

But the problem is, here's a slide. It's one slide. It doesn't take any time. But the re-render still takes a couple of seconds, depending on how long your slides are. So modifying something, pressing preview, then modifying it on the right-hand side, clicking save. And then have to re-wait for the render again. Even if it takes a couple of seconds, that becomes quite a slow loop. Where the new render is so much faster. So it will feel instantaneously once we have it set up with Quarto2.

Quarto slide themes

Amazing. Okay. So we have five to six minutes left. We have a couple of questions that we could get to. And also, is there any other extension that you are burning to show us that's very cool? Or should we go to questions? Think of the Maya one.

So this is slightly different than extensions. It was a Quarto theme. And then you install it. So here is the Quarto use template and then the revealjs, Sync to the Maya. It also topics a whole bunch of things. But it is this Sync to the Maya theme that I was working on. So it's just fun and happy.

I think the concept of this translates really well into just, you can create themes for slide decks if you want to. And we might want to talk about more of that later in the future if people are interested. But a lot of the hard work with setting up slides can be the first time. And if you're doing it in a corporate setting, you don't want all your people to redo all this work all the time. So you can have one person or a group of people make your theme and then make it into a Quarto theme. And then people just have to import it once. It copies all the things over. And then you just fill in content. You don't have to worry about, oh, are the colors correct? Are the sizing right?

You can do little neat things like here. So I called this a slide theme. So basically for each slide, I have a theme dash and then a name. So title one, title two, section, and whatever. And obviously, they're all similar in vibe of fonts and colors and sizes. But also this one, I know that, hey, we have some flourish here on the right-hand side of the slide. So we are constraining everything to be the left-hand side. So you can have just nice little things like this.

But I highly recommend it. And then this is just a copy-paste. If you use this, it just copies over this template file that just kind of has all the things, the CSS file. And yeah, so it's very light in what it actually does.

Questions and wrap-up

Very cool. Okay. Well, we have a poll going in Discord asking, do we want Emil to come back and talk about slide themes so that we can deep dive into it? And so far, it is exclusively yes votes, and it's climbing. So I think that Emil might be at the top of the leaderboard very soon for repeat data science lab leaders.

We have a couple of questions. One is from Raha, and she was asking if there is a Quarto extension that can help dynamically create tabs or chunks. And this might be something that Raha needs to explain herself. But she says, say I'm working on a Quarto report, and I want to create a series of tabs, but the name and the number of the tabs is not something I know in advance, and I figure it out in the report based on my data. So I basically write code to write the code and render it so it looks like tabs and chunks, but it's messy and it takes a lot of work.

Oh, yeah. She did put an example of her code, by the way, which is like looping over and creating the right number for the right number of variables that she's got. Yeah. So I'll have to look at that, and I can get back into the – because this is Discord, right? Yes, in Discord. Yeah. So I'll loop around and see.

So my first instinct is – so since everything here is based on HTML, there's this HTML tools package that you can use to help put things in, and you just have to make sure styling works with it. So I think I'll be better helped by just looking at the example and the more precise feedback here. Okay, great. We will continue talking about this. Maybe it doesn't exist yet, but maybe it could exist.

And then Andrew had asked about seeing some slides at a conference and seeing that they were highlighting code chunks, so certain sections of the code were more prominent or emphasized, and I wanted to let everybody know that that is actually a default capability in Quarto, is code highlighting. So you can make it so that your code chunks have highlighting in them. Yeah. There we go. That's a great example. So we have that here with the code highlighting. Like code line numbers, you pass in a range. You can also do – if you pass in a range, here it says, like, 6 to 8. It highlights line 6 to 8.

Well, it actually doesn't highlight. It actually hides everything else by fading it out. If you Thomas separate them, it's not a list. If you do the virtual bar, it basically turns into fragments by first not highlighting anything, then highlighting 6, then highlighting 9. So, yeah, this is a default thing that we can do in. Yeah. Yeah. And there's more types of highlighting. So, yeah, go take a look at the Quarto documentation to look at all the different types of highlighting. It's very cool.

Okay. We have reached the top of the hour. Colin had a question that's in the Discord about getting clarity on how to embed a Reveal.js site into another Quarto document. Colin, we will hop in the Discord and help with that. Yes.

Okay. Amazing. Thank you so much, Emil, for hanging out with us, teaching us so much. Thank you for having me. Yes. We're all clapping. Camera on Clue is clapping. You're getting tons of reactions and thank yous in Discord. We will find a time for you to come back and talk to us about creating themes for Slido Reveal. Not Slido. Slides. We're using Reveal.js. Slido is something different.

Okay, everybody, this was so much fun. I'll see you in Discord with more questions. Thank you for voting in our polls, and I will see you on Thursday at the Data Science Hangout, perhaps. Thank you for hanging out with us, everybody.