- 3 Minutes Wednesdays
- Posts
- 3MW (Custom Styles with Typst and Quarto)
3MW (Custom Styles with Typst and Quarto)
Enjoy 3 Minute Wednesdays at no cost.
This newsletter is brought to you for free. If you want to advance your R skills and support my work at the same time, then you will like my paid offerings:
Or use my affiliate code “RAPP10” to get 10% off the fantastic data science courses from Athlyticz:
Guten Tag!
Many greetings from Munich, Germany. In this week’s newsletter, we’re continuing our journey with Typst + Quarto. As promised, we’re taking our PDF reports to the next level with some visual polish.
Today, I want to show you how to:
Add a vertical color bar along the left margin of every page
Wrap your main title in a colored box and shift it slightly to the left for a bold visual effect
These small touches can improve the look and feel of your report. And once you know how these things work, you can work out how to add more visual elements with Typst.
Add a Vertical Color Bar to the Left Margin
Let’s start by giving all pages a distinctive look using a colored stripe along the left-hand side. To do this, we modify the set page()
section of our Typst template. You know, this part here:

Here, we can use the background
property with the place()
function to overlay a rectangle:

And with this simple change, we’ve added a vertical splash of color to every page.

Style the Main Title with a Colored Box
Next, let us give our report title more visual weight. Instead of plain text, we’ll wrap it in a colored box. We do so by wrapping our text()
function into a box()
function. That way, our previous pages specification

becomes

Now, our document looks like this:

Shift the title box
Finally, we can shift the title box slightly to the left by adding a bit of negative horizontal space.


With just a few small tweaks, we now have a PDF report that is not only parameterized with different inputs but it also looks polished and professional.
And as always, if you have any questions, or just want to reach out, feel free to contact me by replying to this mail or finding me on LinkedIn or on Bluesky.
See you next week,
Albert 👋
Enjoyed this newsletter? Here are other ways I can help you:
Reply