Repository navigation
How to present code
Code blocks keep indentation and add syntax highlighting. Step highlights let you draw attention to different lines as you explain them, without duplicating the slide.
Code is inserted from the toolbar and edited in Format > Code. The screenshot also marks the step-highlighting field used in the next section.

- Click Code in the toolbar to insert a code object.
- Paste or type the code in the source field.
Choose its Language and Size, and turn on Line numbers if they help the explanation. Optionally set a Title, such as a file name or caption.
For example, use this short Python function:
def water_for(coffee_grams):
ratio = 16
water_grams = coffee_grams * ratio
return water_gramsThe code is displayed, not executed. Resize the object and adjust the text size until every line fits comfortably.
In Step highlights (marked 3 in the screenshot), enter 1|2-3|4. The line groups are separated by |, ranges use -, and individual lines within a group use commas, such as 2,4.
- Press Shift+F5 to start from this slide.
- The first group highlights line 1. Advance to highlight lines 2–3, then advance again for line 4.
- Go back through the builds to revisit a group.
Leave Step highlights empty for ordinary syntax highlighting. You can also give the whole code object a Build in effect in the Animate inspector. Rehearse the combination so the block appears before you discuss its individual lines.
Document > Code Blocks > Highlighting chooses Monokai or Zenburn for the presentation's code blocks. This is separate from the slide theme.
Step highlights work in web exports. A PDF shows a static slide; use a web export when readers need to follow the steps. See How to export and share a presentation.
Cadenza · Home
Start a presentation
- How to install and update Cadenza
- How to make your first presentation
- How to import a Markdown presentation
Design and edit
- How to choose fonts and make a theme
- How to customize slide backgrounds
- How to organize slides
- How to arrange objects with guides
- How to add a table
- How to present code
- How to make presentations more accessible
- How to customize a presentation with CSS
Add data and media
- Chart gallery and data recipes
- How to make a chart from a CSV file
- How to customize chart axes and labels
- How to make a map
- How to add images and videos
- How to add a diagram
- How to write equations
Animate
- How to build a slide step by step
- How to animate a chart
- How to use Magic Move
- How to move an object along a path
Present and share
- How to present with the presenter display
- How to make a presentation play automatically
- How to export and share a presentation
Find help