Changelog
v0.8.1
A patch release with fixes and a few corrections to behaviour that 0.8.0 introduced.
Behaviour changes
-
An em dash between inline content no longer splits slides
A
—or---with inline content on both sides, such asText —code``, stays part of the sentence. Before, it was read as a horizontal line, which started a new slide and dropped the dash. Inline content is text, symbols such as~, raw, math, emphasis, links, references, citations, footnotes, boxes and similar. A dash next to a blank line, a heading, any other block or a touying marker or wrapper such as#pauseor#alert[..]still splits slides.Migration: where a break is wanted, put a blank line or a heading around
---. -
A bare waypoint label picks its last subslide in three places
A bare label in
handout-subslideskeeps the last subslide of the waypoint, as the label oftouying-recallon labelled content does.measuretakes the largest size over the waypoint's range. The range markersfrom-wp,until-wpandnot-wpkeep every subslide they span, sonot-wp(not-wp(<a>))is exactly the range of<a>.handout-subslides: "waypoints"selects the last subslide of every waypoint.Migration: where you need other subslides than the last one, use a range marker such as
from-wp,until-wpornot-wp. -
Footnote numbering restarts per slide, not per page
reset-footnote-number-per-slidenow restarts the numbering only at the start of a slide, andcounter(footnote)is one of the default frozen counters, so the numbers stay the same on every subslide. Before, the counter was reset on every page. A breakable slide that overflowed onto a second page restarted at 1 there, and withreset-footnote-number-per-slide: falsethe numbers of a slide ran ahead from one subslide to the next. Now overflow pages keep counting, and withfalsethe numbering continues across slides while staying identical across the subslides of one slide. -
touying-reduceworks with alchemist 0.2.0A package's own
touying-reducer-bindingsare used whenreduceandcoverare both functions. Otherwise touying uses the bindings it has for the package'sname. -
Slide Preambles are now called again and preambles will be reworked soon together with more external hooks
slide-preambleanddefault-slide-preambleare called again (they were silently dropped in March 2026). A slide now starts withpreamble(first slide only), thenslide-preamble, then the content a deferred config change collected in front of the slide, which used to run first. And finally the subslide preamble. These all run after the header is constructed, only thepage-preambleis run before the header (old behaviour).Bc preambles were not easy to use for external packages they will be reworked soon in a rework that aims to allow better 3rd party package integration. The touying-reducer-bindings will stay, but other hooks will be added.
Fixes
#heading[..]outside a slide call no longer fails withfield "depth" in heading is not known at this point(#434, #437).- A
#figurewithout a caption that is hidden by a#pauseno longer fails withfield "caption" in figure is not known at this point(#437). animate,animate-hidden,animate-removedanditem-by-item-fnare now listed in default methods throughself.methodsandutils.methods(self)just likeuncoverandonly.capitalizeandtitlecasework on non-ASCII input (#436).- Reducers announce the inner minimum repetitions and function wrappers of their content (#431).
- Aligned content no longer shifts when paused list items are revealed (#442).
measureof a list applies the row gap, so show-set rules take effect (#443).- The numbers of an enum with a
#pausestay aligned: the covered and the visible part get the same number column width, so items no longer move sideways when the covered part is revealed (#438). touying-mitexkeeps the height of a line break that is still hidden, so the visible lines no longer move sideways when the next line is revealed.- A
#meanwhilebetween list items after an earlier#pauseno longer splits the list, so the rows no longer move when the next subslide is shown (#439). - The ctheorems 2.x states are frozen across subslides (#452, #454). Support for ctheorems 1.x is deprecated and will be removed in v0.9.0.
- The documentation of
until-wpandfrom-wpnow says what they do:until-wpstops before the first subslide of the waypoint,from-wpincludes it and runs to the end. - The API reference lists the functions of
src/core/*.typandtouying-slides, and the documentation of each release is published by the newdocs-releaseworkflow.
v0.8.0
A big release, and the first that requires Typst 0.15.
The main new feature is article mode: the same source file compiles either to slides or to a flowing prose document, with animations collapsed to their final state and images optionally floated to the side. Two new animation entry points come with it. touying-render renders a piece of content at chosen animation stages, and animate combines visibility and styling on one piece of content. touying-recall was extended from whole slides to any labelled element. touying-fn-wrapper-raw now parses and nests its body, so #alert[.. #pause ..] works, and much more besides. .pdfpc files can be written directly as bundle assets instead of through a separate typst query step. The footnote bibliography was rebuilt on real Typst bibliographies, and the speaker-note panel is now a theme-supplied function with documentation to match. Internally, src/core.typ (6288 lines) was split into modules and the content handling was unified and several functions (mainly out of utils) moved places.
Things to watch when upgrading: a #pause after uncover/only/alternatives no longer skips the subslides they reserve (they wrongfully did so with v0.7.0), the footnote-bibliography config changed shape, semi-transparent-cover is deprecated, and on a second screen the page background is confined to the slide half. There is a migration guide below, and a separate one for theme authors at the end. Most documentation pages were rewritten or corrected.
Breaking Changes
-
feat!: Touying now requires Typst 0.15.0
typst.toml'scompilerfield goes from0.12.0to0.15.0. Bundle export for.pdfpcassets and the reworked cover methods both need it. All reference renders were regenerated against Typst 0.15 / tytanic 0.4. -
fix!: a
#pauseafteruncover/only/alternativesno longer skips the subslides they reserve#uncover("2")[Only on subslide 2]
On subslide one
#pause
On subslide two // v0.7.0-v0.7.4: on subslide *three*Up to v0.6.x a relative jump advanced the counter by one. v0.7.0 changed it to snap past the highest subslide any preceding fn-wrapper had reserved. That was meant for
item-by-item, which stands in for a run of pauses and should push a later#pausepast its whole animation. Butitem-by-itemreports its extent through the same channel as every other wrapper, so the change caughtuncover,onlyandalternativesas well. No test asserted it and it slipped past. Reserving subslides and consuming them are separate things again.Waypoint placement gets the same correction.
#waypoint(<w>)after an#uncover("5")now lands one past the current flow position, not one past subslide 5.Migration: if you relied on the snap, add the extra
#pause(or#jump(n, relative: true)or waypoints) yourself.item-by-itemanditem-by-item-fnare unaffected. They still push later pauses past their last item, and they now match the hand-written#pausesequence they abbreviate, including for content that follows them without any#pause. -
feat!:
show-bibliography-as-footnoteis a boolean, andmagic.bibliography()is goneThe old mechanism took the bibliography element itself, as
config-common(show-bibliography-as-footnote: bibliography("ref.bib")), hid it in the preamble, collected the entries into a state, and re-rendered them throughmagic.bibliography(). That state is gone. Set the flag and call a real#bibliography(..)in the presentation:#show: simple-theme.with(
config-common(show-bibliography-as-footnote: true),
)
== References
#bibliography("ref.bib")The bibliography has to be part of the document for the footnote citations to resolve. Use
hide(bibliography(..))if you do not want the reference list shown. Multiple bibliographies work now, and #395, where a footnote bibliography that overflowed its slide stopped the document converging, is fixed as a result. If your citation style already produces notes, such as"chicago-notes", leave the flag atfalse. See the FAQ.magic.bibliography-as-footnoteloses itsbibliographyparameter and gainsfootnote-style, a dictionary ofsuperproperties for the citation markers. The default(typographic: false, baseline: 0em, size: 1em)makes them read as normal text. -
feat!: the speaker-note panel is customizable through
config-common(notes-fn: ..); theconfig-methods(show-only-notes: ..)renderer is removed (#353)show-only-noteswas two separate options in v0.7.4 and only one of them changes.config-common(show-only-notes: true), the flag that turns on presenter view, works as before, and is documented for the first time in Speaker Notes. What is gone isconfig-methods(show-only-notes: ..), the function that drew the panel. Only theme authors ever overrode it.The panel is now produced by a theme-supplied function, the way slides are produced by
slide-fn.notes-fn(self: none, note: none, slide-preview: none) -> contentmirrorsslide-fn, andtouying-notesis the counterpart oftouying-slide: it owns the rough layout, the theme passes colours and arranges the content. All six bundled themes register their own, so the notes panel matches the deck in spirit. Some alignment bugs will be fixed later.show-only-notesmode was restructured along with it. The slide's parts, previously shown on the top right, are reassembled into one page-sized box and handed to the theme asslide-previewcontent to place where and scale how it likes. The oldcutout/cutout-height/(background, foreground)return protocol is gone, andslide-preview: nonetells a theme it is on a second screen. This also fixes #281: the panel background was placed from the page header and nearly all of it fell off-page, so the declared#CCCCCC/#E6E6E6colours never rendered.See Customizing the Speaker-Note Panel and Build Your Own Theme.
-
fix!: the page background and foreground are confined to the slide half on a second screen (#219)
With
show-notes-on-second-screen, Touying doubles the page along one axis and pushes the extra half into the margin (Now all four alignments are supported).page(background: ..)covers the whole page, so a background sized100%, or an image withfit: "cover", was stretched across the slide and the notes half together.backgroundandforegroundare now each placed in a box the size of one slide, on the slide's own half, so percentage sizes andfit: "cover"behave as they do without a second screen. -
feat!:
touying-recall'ssubslide:parameter becomessubslides:, and itsnone/autovalues swapThe parameter is now plural because it takes ranges (since v0.6.3) rather than a single subslide, matching
visible-subslidesonuncover/only/effect. It accepts a superset of the old values.subslides: autois the new default. It recalls all subslides of a whole-slide target, or the final animation state of a labelled element.subslides: nonerecalls only the last subslide. v0.7.4 had these the other way round, withnoneas the default, so the default behaviour is unchanged. Only code that passed either value explicitly needs the value swapped as well as the key renamed.
Minor Breaking Changes
-
feat!:
utils.semi-transparent-coveris deprecated — useutils.alpha-changing-coverorutils.color-changing-coverIt worked by overlaying a semi-transparent rectangle on the covered content, which does not hold up in general: the overlay dims the slide background along with the content, and it stacks where covered regions overlap. It still renders, (slightly worse than the last iterations) so presentations keep compiling. Builds that use
--warnings promotewill however fail.// Before
config-methods(cover: utils.semi-transparent-cover)
// After: a real alpha cover, with an automatic fallback for content it cannot recolour
config-methods(cover: utils.alpha-changing-cover)
// Or, cheaper to compile, flattening everything to one colour
config-methods(cover: utils.color-changing-cover.with(color: gray))Passing it as another cover method's
fallback-hidefunction is still fine and does not warn.utils.cover-with-rectdoes also not warn. -
fix!:
utils.handout-onlyis removed — use the top-level#handout-only[..]. It is a parser mark rather than a callback, so it can contain slide-breaking content. See Handout Mode. -
fix!: negative subslide indices now panic on the animation functions instead of silently doing the wrong thing.
A negative index means "counted back from the last subslide", which only has a stable meaning once the subslide count is fixed.
config-common(handout-subslides: -1),#touying-recall(.., subslides: -1)and#touying-render(.., subslides: -1)resolve their spec after parsing has settled the count, so they accept negatives.#only,#uncover,#effect,#alternatives,#alternatives-match,#alternatives-cases,#animateand#item-by-itemare parsed as part of the flow they sit in, and now a negative index is panicked on, not ignored. Use waypoints if you need such behaviour.// Before: rendered nothing, silently
#only(-1)[Last]
// After: a waypoint names the position and keeps naming it
A #pause B #waypoint(<end>) C
#only(get-last(<end>))[Last]#waypoint(start:)is restricted the same way and now requires a position>= 1. Reference another waypoint by label to position one relative to another.Note: Negative numbers in a string spec are a different notation and are unaffected:
"-2"is the open range "up to subslide 2", not "second from last". -
fix: overflow detection also checks width. It only ever compared height, so an element too wide to fit, a fixed-width block level element did not trigger an overflow warning.
-
feat!:
touying-equationis finally deprecated. All its uses are superseded through other means and the normal equation animations are even more capable now allowing you to write animation functions all math layout function likematorfrac. -
feat!:
config-common(detect-overflow:)defaults toauto(wastrue). This is the opposite of what is set forbreakableand in case both aretruea warning is emitted that no overflow can be detected. -
feat!:
#measureshadowsstd.measureand also measures animated content properly It still works as expected, needing a surroundinglayoutorcontext, and in addition to awidthandheightoptionally supports an integersubslideand an integerbasewhich set the subslide and subslide base to render the content at before it is measured. -
feat!: reducer bindings are lambdas taking the package module, instead of a path spelled as an array of strings with optional trailing
arguments(..).// Before
#let touying-reducer-bindings = (
reduce: ("canvas",),
cover: ("draw", "hide", arguments(bounds: true)),
)
// After
#let touying-reducer-bindings = (
reduce: module => module.canvas,
cover: module => module.draw.hide.with(bounds: true),
)The old no longer works and this is also the shape
touying-reducenow expects.
Migration Guide
- Bump your compiler to Typst 0.15.0 or newer.
- Bibliography: replace
config-common(show-bibliography-as-footnote: bibliography("ref.bib"))withconfig-common(show-bibliography-as-footnote: true)and put a real#bibliography("ref.bib")in the presentation. Delete any#magic.bibliography(..)call. If the bibliography sits on a slide with more than one subslide, wrap it asonly("h", bibliography("ref.bib"))so it is instantiated once. Otherwise each subslide creates a fresh instance and the citation numbering restarts (#415). - Speaker notes: if you overrode the
config-methods(show-only-notes: ..)renderer, rewrite it asconfig-common(notes-fn: ..)built on top oftouying-notes.config-common(show-only-notes: true)needs no change. - Second screen: if a theme painted behind the notes half through
config-page(background: ..), move that styling into itsnotes-fn(fill/header-fillontouying-notes). touying-recall: renamesubslide:tosubslides:. If you passednoneorautoexplicitly, swap it for the other one. If you relied on the default, nothing changes.- Covers: replace
config-methods(cover: utils.semi-transparent-cover)withutils.alpha-changing-coverorutils.color-changing-cover. Leaving it is a warning rather than an error, unless you build with--warnings promote. - Pause flow: see the first breaking entry. Add an explicit
#pauseor#jump, or use waypoints, where you relied on a fn-wrapper snapping the counter forward.
Features
-
feat: article mode, one source file for slides or a flowing article
Compiling with
config-common(export-mode: "article"), or withtypst compile slides.typ --input export-mode=article, renders the whole deck as a continuous document instead of pages: no slide breaks, animations collapsed to their final state, images optionally floated to the side.export-modeaccepts"slides"(the default, where thehandoutflag decides),"presentation","handout"and"article".config-common(article-mode: true)is the raw switch behind it.Article mode linearizes a deck rather than carrying its layout over, so a composer's columns become flowing text and a floated element takes
config-article(wrap: (width: ..))of the text width, 50% by default, whatever width it was written at for the slide. See Article Mode.#show: simple-theme.with(
config-common(
export-mode: "article",
article-theme: themes.article.article-theme.with(numbering: "1.1"),
),
config-article(
wrap: (image: true),
available-fields: (title: "info.title"),
),
)Two markers let you write for the article target.
#article-text[..]replaces the content of the slide it is written in, wherever in that slide you write it, so you can give a prose paragraph instead of bullet points.#article-only[..]adds content that appears only in the article (for more see mode-only content below). The newconfig-article(..)group covers article-side layout:wrapfor side-floating (done withmeander) of certain elements;linearizefor how much of the deck's layout comes apart (by default a#columns(..), a composer and aside-by-sidedo; atableorgridonly until it declares a header or footer),#article-linearize[..]/#article-keep-layout[..]mark this per element; plus an optionaltitle-block-fn, and lastlyavailable-fields: a mapping that hands configuration values such asinfo.titlethrough to the article theme's own parameters. See Docs/Article Mode for more details. -
feat:
themes.article, a plain A4 article themeThe default target of
article-theme: auto. It does not depend on the presentation framework, so it also works standalone for papers and reports. It is meant as an example; any article-like theme can be used instead. -
feat: animations work inside math elements —
frac,mat,vec,cases,binom,root,attach,accent,cancel,lrand the brace family.#pause,#uncover,#onlyand#alternativesinside one of these used to abort the compile withUnsupported mark, claiming the mark was somewhere the walk could not enter. It was reachable all along: these elements keep their sub-content in named fields of their own (frac'snum/denom,mat'srows,attach's scripts) rather than inbodyorchildren, and the content walk only knew the latter two, so it treated them as leaves.$ frac(a #pause + b, c) $
$ mat(a, #pause b; c, d) $
$ a^(2 #pause + 1) $Styling fields are untouched by this: an animated
matkeeps itsdelimandrow-gap, anaccentitssizeanddotless. The one thing that cannot animate is an accent's accent argument, which Typst stores as a single symbol rather than as content — swap the whole element with#alternativesinstead. -
feat: mode-only content and mode labels
Four inline markers select content by output target:
#article-only[..],#handout-only[..],#presentation-only[..]and#slides-only[..], the last meaning both slide modes but not the article. Hidden content is removed entirely and reserves no space, and the body can contain slide-breaking elements, so a heading inside#handout-only[..]really does start a new slide in handout mode.A marker works inside a slide's body as well as around the call, and which one you write decides what it covers:
#slide[a #slides-only[b] c]keepsbout of the article and leaves the rest, while#slides-only(slide[a b c])keeps the whole slide out.#article-text[..]inside a slide stands in for that slide, matching what it does at document level. See Output Modes.The same choice exists per slide as heading and slide labels:
<touying:presentation>,<touying:handout>,<touying:slides>and<touying:article>, combinable with hyphens, where<touying:presentation-article>means "or". The new<touying:never>is the Typst equivalent of\iffalse. It parks a slide out of every render without you having to comment out markup. See Handout Mode and Sections and Headings. -
feat:
touying-recallrecalls any labelled element, not just whole slidesBesides a whole slide,
#touying-recall(<lbl>)now takes a labelled reducer, a labelled diagram, or any labelled animated content as well, and replays it at a chosen stage:#touying-recall(<my-slide>, subslides: "waypoints") // one subslide per waypoint
#touying-recall(<my-diagram>, subslides: 1) // a reducer at stage 1
#touying-recall(<my-table>) // plain labelled contentSubslide selection accepts ints, including negative indices counted back from the last subslide, waypoint labels, and waypoint markers (
get-first,get-last,prev-wp,next-wp), resolved against the recalled content's own waypoints. Recalling an element places it inline; only recalling a whole slide starts a new page. And a recall can sit inside#only/#uncover/#alternativesanywhere in their body, not just as the whole body, andbase:sets the starting repetition counter for content with its own numbered steps. -
feat:
touying-renderrenders content at a chosen animation stage, or steps through a rangeWhere
touying-recalllooks up previous content by label,touying-rendertakes the content value directly. It is useful for miniature previews or for showing a diagram's intermediate state in the article output and probably much more. You can even render entire slide contents with it.#touying-render(body, subslides: "2-4") // steps through 2, 3 and 4
#touying-render(body, subslides: "!2-3") // skips 2-3, collapsing the gap
#touying-render(body, subslides: <wp>) // the waypoint's whole rangeA single-point spec, such as a plain int,
get-firstorget-last, freezes one stage.subslides: autofollows the enclosing slide's own progression.base:offsets the content's internal pause numbering,start:sets where in the enclosing slide the first subslide rendered begins, andrepeat-last:controls whether the content holds at its final stage (the default) or disappears again. -
feat:
animate, for combining visibility and styling on one piece of content#animate(
[The original],
effects: (
(effect: "cover", subslides: "-2"),
(effect: swap[Something else], subslides: 3),
(effect: (body, ..) => text(red, body), subslides: "4-", priority: 2),
),
)Placements (
"show","cover","remove",swap(..)) resolve to a single winner per subslide. They cannot be composed: the only cover method ishide, which is not a style node, and"remove"drops the content outright, so neither can be undone from inside. If you need alpha-changed covered content use styling effect functions instead. Styling functions do compose and nest. Priority picks the winning placement and orders the nesting, and ties break consistently in both classes: the last effect you wrote wins. For a placement that means it is the one used; for a style it means it ends up innermost, so it wins any property both of them set.swaptakesstretch, likealternativesdoes: without it the layout reflows while the swap is shown, with it the swap joins the reserved space and the block keeps one size. Measuring only happens if some swap setsstretch, and each distinct combination of placement and styles is measured once.animate-hiddenandanimate-removedare the same function starting from"cover"and"remove", respectively, instead of"show", so effects by default say when thebodyappears rather than when it disappears. You can of course override this in any case, these are just shorthands. -
feat:
advances-flowontouying-fn-wrapper, for wrappers that stand in for a run of pausesThe flag that keeps
item-by-itempushing later pauses past its last item is an ordinary parameter, so your own wrappers can opt in:#let reveal-lines(body) = touying-fn-wrapper(
(self: none, body) => /* ... */ body,
last-subslide: repetitions => (repetitions + count-lines(body) - 1, (:)),
advances-flow: true, // a following #pause continues after the last line
body,
)It defaults to
false, which is what you want for anything that only animates its own body. Such a wrapper reserves the subslides it needs without moving the pause cursor. -
feat:
touying-fn-wrapper-rawparses its body nests recursively, whiletouying-fn-wrapperallows raw variants inside itself#alert[This is important, #only("2-")[easter egg] don't miss it!]used to panic with Unsupported mark. A raw wrapper handed its positional arguments straight to the wrapped function, so any animation marker inside survived as unresolved metadata. Those arguments now go through the parser like ordinary slide content, so#pause,#meanwhileand every fn-wrapper behave inside a raw wrapper as they do anywhere else, and the wrapper's content counts towards the slide's subslide total. Nested raw wrappers resolve recursively, so#uncover[#alert[a #alert[b #alert[c]]]]works all the way down.This makes
touying-fn-wrapper-rawthe better default for reachingselffrom markup, and the docs and themes now say so. Stargazer'stblockwas switched over so it can be used with the normal animation functions. The body has to be a positional argument for any of this to apply; baking it in with.with(..)hides it from the parser. See Complex Animations. -
feat: export
.pdfpcfiles as bundle assets, one per document (#408)Typst 0.15's bundle export can emit arbitrary files, so the separate
typst query .. > example.pdfpcstep is no longer needed (you can still use it and the docs have transitioned totypst evalnow). Put#pdfpc.bundle-assets()at the top level, outside every#document(..):typst compile --features bundle --format bundle --root . ./example.typ ./out
# => ./out/deck.pdf and ./out/deck.pdfpcEvery PDF document in the bundle that carries pdfpc metadata gets its own
.pdfpcnext to it, with slide labels numbered from that document's own first slide and only that document's notes, markers and configuration in it. The call is inert in every other target, so it can stay in a file you also compile to a plain PDF. See pdfpc. -
feat: several documents in one source file (#406, thanks @mxmerz)
Typst 0.15's bundle export lets a single file emit more than one PDF through
#document("name.pdf", [..]), and a deck can now live in each of them. Heading lookups are scoped to the document they are in, soutils.current-headingand everything built on it (slide headers, the notes panel, progressive outlines) no longer pick up headings from a neighbouring deck. pdfpc metadata is scoped the same way, see the bundle-asset entry above.#document("deck-a.pdf", [
#show: simple-theme
== Deck A
])
#document("deck-b.pdf", [
#show: simple-theme
== Deck B
]) -
feat: themes style the speaker-note panel through
touying-notestouying-notestakesheader,header-fill,fill,note-settingandpreview-setting; a theme may use thenote-settingto style the page and content.header-heightcollapses to its content by default, andheader: nonedrops the strip entirely.preview-settingreceives the full-size slide preview, so a theme can scale and place it freely, for examplepreview => place(bottom + right, box(scale(x: 30%, y: 15%, reflow: true, preview))). All six bundled themes ship one. See Speaker Notes. -
feat:
show-notes-on-second-screenacceptstopandleftas well asbottomandright. The page is doubled along the corresponding axis and the extra half pushed into the margin, so the slide keeps its own dimensions in all four directions. -
feat: better covering, with
alpha-changing-coverandcolor-changing-coverreworked (#112)utils.alpha-changing-coveris now the recommended semi-transparent cover, replacing the deprecatedsemi-transparent-coverabove. It governs every stylable colour, inherits the outer scope's colour when an element declares none, understands gradients and tilings, and converts spot colours to Oklch before opacifying. Its automatic fallback alpha depends on the lightness of the colour it is dimming, and the fallback path is used far more sparingly, so images and diagrams no longer turn into grey blocks.utils.color-changing-coverremains the compile-cheap alternative that flattens everything to one colour: it overwrites colours instead of reading them, so it makes nocontextcall. Both walk the same tree, so they treat strokes, table cells and the bodies ofunderline,highlightandstrikealike, and neither moves the content it covers. Where an element paints its own background, flattening it together with the content on top would leave that unreadable, socolor-changing-cover(hide-filled: true)(the default) hands those tofallback-hide, which now defaults toautoand dims them to match the recoloured text. See Cover Function. -
feat:
components.left-mid-rightplaces content in three columns (#397, thanks @thomas-saigre) -
feat:
utils.get-inputfor reading command-line inputsEverything passed through
--input key=valuereaches Typst as a string.utils.get-inputparses each value as Typst first, soaccent=redis a colour,count=3an integer andflag=truea boolean, while a bare word Typst does not know comes back as a string. That last part is what makes--input export-mode=handoutwork without shell quoting. Rn we only depend on it for export-mode, but we might support more commandline customizability later. Pass no key to get the whole parsed dictionary. See touying-exporter. -
feat/fix:
touying-get-configexposescommonas a real categorytouying-get-config("common.handout")resolves now, andtouying-get-config().commonreturns the flat top-level keys as a subtree, which is what the docstring always claimed. Naming a category under it, such ascommon.store, panics with a clear message instead of silently missing. -
feat: waypoints now emit a globally linkable anchor
<slide.waypoint>for a slide labelled<slide>and a waypoint named<waypoint>. You can use this to create links that refer to the last subslide of a waypoint. The anchor is placed best possible: If the last waypoint subslide is rendered, it is emitted there (the default in presentation mode), otherwise as close after as possible, otherwise as late inside it as possible. If all rendered subslides are before the waypoint's range it is not emitted into the document. -
feat: new utilities.
tree.is-math-symbolandtree.sequence-to-arrayin the newcore/tree.typ,subslides.resolve-negative-subslides(negative subslide indices resolved against a repeat count and an optional non-1 base) incore/subslides.typ, andutils.rescale-image. -
fix: a labelled
#place,#rotate,#columnsor#terms.itemin a slideThe parser rebuilt those four by hand and passed the label straight into the constructor, so a labelled
#place(top + right)[..] <lbl>was a hard compile error and a labelled#columns(2)[..] <lbl>silently lost its label. They go through the shared reconstruction now and keep it. -
fix:
#item-by-itemno longer collapses when its body starts with a#setThree separate copies of "count the items" could not see through the
stylednode a#setor#showcreates, so#item-by-item[#set text(..) \ - one \ - two]rendered one subslide instead of three. -
fix:
magic.nontighton a labelled listIt splatted the element's
labelinto the constructor, which rejects it, so#list([a], [b]) <lbl>was a hard error undernontight-list-enum-and-terms. -
fix: speaker notes no longer lose styled content
utils.markup-textdropped everystyledsubtree, so[a #text(red)[b] c]reached the.pdfpcfile as "a c". It feeds the pdfpc export, so notes were silently incomplete. -
fix: waypoints inside a
terms.itemor a figure captionThe waypoint pre-pass walked neither, while the main parse walked both, so every waypoint after one landed on the wrong subslide.
-
fix: special slides announce their title as a hidden heading
An outline slide's title never became a heading, so nothing reading the current heading could see it. The slide header worked only because the title was passed in explicitly, and the notes panel showed nothing at all. The affected slides now emit
place(hide(heading(level: self.slide-level, ..))).placekeeps it out of the flow, since a plainhidestill pushed the outline's contents down by about 16pt, andlevel: self.slide-levelkeepscustom-progressive-outlinefrom mistaking "Outline" for the current section and dimming every entry. Applied tooutline-slidein aqua, dewdrop, metropolis and stargazer, plus stargazer'sending-slide. Title slides are left alone for now. -
fix: a citation covered by a visual-only method stays a real citation
color-changing-coversent citations to thehidefallback, so the marker vanished while the bibliography entry it queues stayed behind.@keyis arefin the content tree and only becomes aciteduring layout, so neither func was in the recolourable set. Both are now, and a citation is recoloured likerawrather than hidden. Separately,magic.bibliography-as-footnotedecided whether to draw a width-reserving placeholder by looking for ahideelement instead of askingutils.cover-hides-footnote. It asks the config now, so it agrees with the parser's own footnote branch.Still open: an opaque cover that is not
hide, such ascover-with-rect, together withcover-hides-footnote: trueleaks the entry. -
fix: a note-style citation after a
#pauseno longer leaks its footnote onto the earlier subslides (#414, thanks @SchrodingerBlume)#399 fixed a literal
#footnoteshown before its#pause, but a citation in a CSL note style such aschicago-notesstill leaked. Such a citation only becomes a footnote during the layout pass, after the body scancover-hides-footnoterelies on, sohide()suppressed the marker while the entry it had queued still rendered at the bottom of the page.citeandrefnow follow the same three-way branch asfootnote: under a genuinely hiding cover the citation is not rendered at all, so no entry is created, and it appears normally once revealed. This also fixes packages that emit footnotes through ashow std.citerule. -
fix: a footnote bibliography no longer prevents convergence (#395) — fixed by the bibliography rework above. Verified across 30 size × breakable/detect-overflow combinations that previously warned document did not converge within five attempts. A CI step runs the regression with
--warnings promote. -
fix:
#uncover,#onlyand the other fn-wrappers stay visible inside agridortablethat sits behind a#pause. A fn-wrapper decides its own visibility, so it escapes the surrounding pause zone, but a table-like container worked out whether it would be hidden before re-parsing its cells and then reused that stale answer, covering a wrapper that had already revealed itself. Nesting made no difference: agridinside ablockwas affected too -
fix: a bibliography no longer needs a preceding
pagebreak()to render.---slide breaks inside mode-only content are handled as slide breaks, whilepagebreak()stays a page break -
fix:
touying-get-config'sdefault:sentinel is a private marker instead of thetypebuiltin, sodefault: typeis no longer a magic value, and passing a key both positionally and by name is rejected rather than silently ignored -
fix: footnotes are no longer shown before the
#pausethat reveals them (#399, thanks @RivinHD for the initial contribution) -
fix:
hidden-partsare flushed in the right order when atouying-fn-wrapperfollows paused content, so a fn-wrapper no longer renders ahead of content written before it (#400) -
fix: reducer elements are covered individually rather than as one block (#371, #381)
-
fix:
touying-reducerhandsreduceandcoverthe element shape the package itself uses, so a package whose drawing function takes..argsrather than one array now binds without any adapter.A package's element is whatever its element constructor returns, and that differs: a CeTZ
rect(..)and an alchemistmolecule(..)are each a one-element array, while a fletchernode(..)is content and a lilaqplot(..)is a dictionary. Writing the body as a code block (#cetz-canvas({ rect(..); circle(..) })) makes Typst join those arrays into one, so the reducer received the elements already unpacked and had to guess how to put one back together when covering it. It always wrapped, which is right for CeTZ and alchemist and wrong for everything else.The two call styles are distinguishable where the arguments arrive, before any flattening: a code block is a single array-typed positional argument, while elements passed directly are separate arguments. The reducer now records that per item and gives each side back what it started with —
covergets a whole element, andreducegets one array for a block body or spread arguments for a variadic one such aslq.diagram(..plots).// lilaq, whose plots are dictionaries and whose diagram takes `..plots`
#let lq-diagram = touying-reducer.with(
reduce: lq.diagram,
cover: plot => plot + (x: (), y: (), label: none),
) -
fix: empty output slides are no longer indexed when adding last-page metadata (#382)
-
fix: wrong type in pdfpc commands (#407, thanks @vilaureu)
-
fix:
touying-diagrambinding and the CeTZ docs example repaired (#389) -
i18n: French translation for the outline (#396, thanks @tarikgraba)
-
theme(dewdrop):
outline-titleis gone from the theme's documented parameter list. It was never an actual parameter ofdewdrop-theme; the outline slide's title is itstitleargument -
theme(stargazer): list markers are positioned correctly (#393, thanks @joseph-tao)
-
theme(stargazer): it also documented
footerandfooter-rightwhen never using those.
Documentation
Almost every page was touched. The largest items:
-
docs: new Article Mode tutorial under Integration, since its main use is pairing an article theme with a slide theme.
-
docs: new Speaker Notes tutorial (English and Chinese), covering where notes attach, the second screen, presenter view, per-subslide notes, markdown notes for pdfpc, exporting, and styling the panel.
-
docs: Custom Themes gains sections on customizing the speaker-note panel, making a special slide's title discoverable with a hidden heading, and why helper components should use
touying-fn-wrapper-raw. Build Your Own Theme gains a matching "Customizing the Notes" section. -
docs: Cover Function rewritten around
alpha-changing-coverandcolor-changing-cover, with a new section oncover-hides-footnoteexplaining whyautorecognises a hiding cover by identity, so a hand-written(self: none, body) => hide(body)is classified visual-only and its footnotes appear before the reveal. -
docs: Sections and Headings now separates the labels that change how a heading is presented from the labels that filter by output mode, and warns that
<touying:hidden>does not suppress the slide or its number, whichconfig-common(freeze-slide-counter: true)does. -
docs: Counters and the sections page corrected on
appendix, which freezes only the denominator (utils.last-slide-number) whileutils.slide-counterkeeps advancing, so an appendix footer reads4 / 2. -
docs: Complex Animations explains what can be nested inside
touying-fn-wrapper-rawversustouying-fn-wrapper, including the.with(..)trap for theme authors. -
docs: Waypoints documents hierarchical labels, where
<part:intro>and<part:main>combine under<part>, and correctsstart, which belongs on#waypointrather than on#uncover. -
docs: Fit To brought in line with the real signatures of
fit-to-heightandfit-to-width, whereheight/widthare named with a1frdefault, positional is still accepted, andreflowandforce-heightexist. -
docs: Layout and the FAQ corrected.
detect-overflowemits a warning and compilation continues; it does notpanic(). -
docs: pdfpc documents
end-slide,save-slideandhidden-slidealongside speaker notes, plus bundle export. touying-exporter documentsutils.get-input. -
docs: CeTZ integration drops the stale
(uncover(..),)array syntax from the callback-style example, and the FAQ's fletcher example likewise. -
docs: the FAQ was substantially reworked, covering the bibliography, section-slide bodies,
touying-fn-wrapper-raw, the cover methods,"h"and"!"subslide specs, second-screen alignments, and Tinymist in place of the discontinued Typst Preview extension. -
docs: new Article Mode page covering the export modes, article themes and
available-fields, writing for both outputs, recalling animated content, and floating images. -
docs: new Output Modes page gathering the four export modes, the four mode markers and the
<touying:..>section labels in one place. The handout page keeps handout mode itself and links to it. -
docs: Complex Animations documents
animate(placement versus styling, priority, and that the last effect written wins),swapand itsstretch,animate-hidden/animate-removed,touying-render,touying-recall, and the callback-style variants. -
docs: large Chinese translation pass covering the theme pages, FAQ, settings, sections, navigation, and the new speaker-notes page. The Chinese
settingsandcustompages document article mode.
Miscellaneous
- refactor:
src/core.typis split into modules. The 6288-line file becomessrc/core/parser.typ,src/core/animation.typ,src/core/slides.typ,src/core/blocks.typ,src/core/waypoints.typand additionallysrc/core/article.typ, withsrc/slides.typreplaced bysrc/entrypoint.typand the newsrc/bundle.typholding the bundle-export helpers.src/exports.typis reorganised along the same lines. The public API is unaffected except where noted above, but anything importingtouying/src/core.typdirectly has to be updated. - refactor: content-tree handling is one layer,
src/core/tree.typ. Recognising what a piece of content is, taking it apart and putting it back together was written out in about thirty places, which had drifted apart: label handling differed per call site, and several walks could not see through astylednode, so a#setor#showrule in force made them miss what they were looking for. The new module knows nothing about touying and imports nothing, so anything can use it.shape-ofclassifies how a node holds its sub-content,children-ofandrebuildare guaranteed to round-trip it, andmap-treewalks with an identity short-circuit. Moved out ofutils: theis-*predicates, thetypst-builtin-*handles,reconstruct*,trim,label-it.core/subslides.typtakes visibility-spec resolution (check-visible,resolve-negative-subslides,last-required-subslide, …) andresolve-waypointsjoinscore/waypoints.typ. The old names stay inutils: the ones returning content forward with a deprecation warning, the rest panic naming the new module. - refactor: block rendering, waypoint-to-integer resolution, the equation/mitex/raw paths and the article-mode scanning functions were each unified into one implementation rather than several near-duplicates.
- test: reference renders regenerated for Typst 0.15.0 / tytanic 0.4.0 layout drift. New suites for article mode (presentation, handout and article variants of one source),
recall-content,render-subslides,mode-never,notes-second-screen,pdfpc,cover-citation, and the #395, #408 and #415 regressions.
Theme Migration Guide
For theme developers upgrading to v0.8.0:
- Style the body through
setting:, not by wrapping it. All bundled themes now pass their alignment and decoration astouying-slide(setting: ..)rather than wrapping the body inalign(..)or a block. Wrapping hides the body from the parser, which breaks animation counting and article-mode linearization:// Before
touying-slide(self: self, config: config, align(center + horizon, body))
// After
touying-slide(self: self, config: config, setting: align.with(center + horizon), body) - Register a
notes-fn. Replace anyconfig-methods(show-only-notes: ..)renderer override withconfig-common(notes-fn: ..)built ontouying-notes; roughly ten lines of colours per theme. Theconfig-common(show-only-notes: ..)flag is a separate option and is unchanged. - Give special slides a hidden heading so their title is discoverable by
utils.display-current-heading. Both the slide header and the notes panel read from it:place(hide(heading(
level: self.slide-level, title,
bookmarked: false, outlined: false, numbering: none,
))) - Prefer
touying-fn-wrapper-rawfor helper components that needself, and pass the body as a positional argument so animations inside it are parsed:#let tblock(title: none, it) = touying-fn-wrapper-raw(_tblock.with(title: title), it) - Do not paint behind the notes half through
config-page(background: ..). Usetouying-notes'fillandheader-fill.
v0.7.4
Features
- feat: adds
touying-reducewhich automatically looks up reducer bindings given a package (#363) - feat(i18n): add Polish locale for outline message (#372)
- feat: Left/Right keyboard navigation support (#352)
- feat: add
grid-sizeparameter tolazy-layoutfor quantized position grouping, improving robustness of column/row detection - feat: add
components.full-width-blockcomponent that spans the full page width by cancelling horizontal margins
Fixes
- fix (minor breaking change): set
lazy-layoutdefault tofalseforcols - fix: handle missing
fnfield in mark warning message gracefully - fix:
hidedoing unexpected things to headings (#366) - fix: export
touying-fn-wrapper-rawas part of the public API (#362) - fix: improved mark-warning, now also displayed as
magic.warningwhenenable-mark-warningisfalse(#348) - fix: warnings now emitted via
uniwarn(#359)
v0.7.3
Minor Breaking Changes
- feat!: always attach
#speaker-note[]to the previous slide & defaultreceive-body-for-new-*-slide-fntofalse(#354)#speaker-note[]now always attaches to the slide above it, regardless of how that slide was created (explicit slide calls, heading-triggered section slides, or normal content slides). This eliminates the common pitfall where a#speaker-note[]placed after a slide would silently create an unwanted empty "ghost" slide.receive-body-for-new-section-slide-fnand its variants are now defaulted tofalse(previouslytrue).
Migration Guide
If you relied on content after = Section headings being absorbed into the section slide body, explicitly set receive-body-for-new-section-slide-fn: true in your config-common(...).
Features
- feat:
item-by-item-fnand presets for it (#347) - feat: improved
custom-progressive-outlineand newsection-relationshipand some other things (#345) - feat: better lazy-layout for mixed layouts (#355)
- feat: add
colsas alias ofside-by-sideand export some componentscols,lazy-xxxto outside (#356) - theme(metropolis): add outline-slide for metropolis (#349)
- feat: add warning for empty slide content height detection
Documentation
- docs: add multiple columns example and improve docs structure
v0.7.1
Features
- feat(agents):
breakableandclipoptions to avoid slide overflow (#336) - feat(components): add
lazy-v(lazy-h) andlazy-layoutfor equalizing multi-column (-row) block heights (widths) (#339) - feat: additional
contactandextrafield inconfig-info(#342) - feat:
touying-get-configfunction (#333)
Fixes
v0.7.0
Features
- major feature: a named waypoint feature (#298)
- feat(waypoint): start param and Waypoints in handout-subslides (#304)
- feat: auto, "h"-here string and inverse function for string subslide-numbers and waypoints (#301)
- feat: implicitly allow fn-wrapper based animation functions via reducer (#300)
Fixes
- fix: fix cover-with-rect breaking long lines of text when partially hidden and fallback functions for color/alpha cover (#328)
- fix: using explicit numbering in display-current-heading when style=auto (#329)
- fix: fix ghost slides with show rules. Fix proper consistent handling of show rules and defer keyword (#317)
- fix: alert not delayed (#316)
- fix: remove redundant nested text call (#324)
- fix: function alternatives-match takes into account parameter stretch (#320)
- fix: correctly handle page margin merge/precedence (#322)
- fix: fix cover spacing issues surrounding lists (#303)
- fix: correctly parses negative subslide indices (ints, arrays) for handout-subslides (#307)
- fix: slide function does not update via scoped import (#310)
Thanks for the contributions from @zral0kh, @Andrew15-5, @navdeeprana, and @Cemoixerestre.
v0.6.3
A major bugfix release, fixing many long-standing bugs and introducing many practical features.
Features
- feat: add
#jump(n, relative: bool)as unified animation control; redefine#pause/#meanwhileas sugar - feat: add
#handout-onlyfor inline content and<touying:handout>label for handout-exclusive slides (#286) - feat: add
handout-subslidesto control which subslides appear in handout mode (#288) - feat: add
#touying-rawfor animated code block reveals (#283) - feat: add full-screen speaker notes mode with slide thumbnail (
show-only-notes) (#281) - feat: support arbitrary aspect ratios (e.g. 16-10) across all themes and speaker-note second screen (#280)
- feat: add
#item-by-itemanimation for list, enum, and terms (#278) - feat(recall): add subslide parameter to
#touying-recall(#285) - feat: add
default-composerto config-common for global slide layout configuration (#284) - feat: add
cover-fnparameter touncoverfor external package integration (e.g. Fletcher) (#267) - feat: minislides can be displayed inline (#228)
- theme: improve appearance of long author lists in university and stargazer theme (#242)
- theme(simple): make simple-theme respect color configuration for deco-format (#252)
- theme(aqua,stargazer): add extra parameter to title-slide (#291)
Fixes
- fix: prevent ghost-slide blank pages from
touying-set-configanchor regression (#289) - fix: styled content on first slide no longer creates extra slides (#287)
- fix: remove unoutlined headings from navigation
- fix: fix
#meanwhilebeing ignored inside grid cells, boxes, and other containers (#274) - fix: fix
config: parametersilently ignored across all themes (#273) - fix: fix slides after
#show/#setrules not rendering subsequent slides (#268) - fix: fix title page PDF page label causing pdfpc presenter notes mismatch (#277)
- fix: fix duplicate label error for labeled footnotes with
#pauseanimations (#275) - fix: fix
#pauseinside#speaker-notebody (nested list items) (#282) - theme(dewdrop): fix body content under level-1 heading was silently dropped (#279)
- theme(stargazer): update stargazer theme margins and fix #259
Documentation
- docs(BIG CHANGE): refactor docs website and add references page
- docs: reduce README noise, improve first impression (#297)
- docs: restructure docs + add docs-preview CI for PRs (#296)
- docs: comprehensive docstring improvements across all source files (#294)
Miscellaneous
- chore: add
copilot-setup-steps.ymland improvecopilot-instructions.md(#292)
Theme Migration Guide
For theme developers upgrading to v0.6.3:
-
Move
configto the last position inutils.merge-dictsto allow user overrides:// Before
self = utils.merge-dicts(self, config, config-page(...))
// After
self = utils.merge-dicts(self, config-page(...), config) -
Replace
paperwithutils.page-args-from-aspect-ratioto support arbitrary aspect ratios:// Before
config-page(paper: "presentation-" + aspect-ratio, ...)
// After
config-page(..utils.page-args-from-aspect-ratio(aspect-ratio), ...)
v0.6.2
Features
- feat: allow customisation of
components.checkerboard(#161)
Fixes
- fix: support ratio and relative margins for full-width headers (#256)
- fix: fix
magic.bibliography-as-footnotein Typst 0.14 (#249) - fix: theorion package is broken with Typst 0.14.0 (#237)
- fix: update
components.typand pass named arguments to grid (#207) - fix: fix
#meanwhilein cetz (#205) - fix: documentation contains unclosed raw text error (#187)
- fix: use correct circle symbol (#171)
- fix: use regex to override colors of equations (#167)
- fix:
show-hide-set-list-marker-nonewith full enum (#157) - fix: remove dump and label-it function for better cache
Miscellaneous
- docs: update README, bump versions of deps, and fix comment docs
- ci: add more tests, bump versions of
tytanic, and update typstyle workflow (#221, #261)
v0.6.1
Added support for the theorion package, and used it as the default math theorem environment.
v0.6.0
It's not a big update, but it's the first touying release since typst 0.13 was released.
Features
- feat: add auto style for display-current-heading.
- For users, you can use
show heading: set text(blue)to change color for heading in some themes likedewdrop. - For theme creator, you can use syntax like
utils.display-current-heading(level: 1, style: auto)to achieve the same result.
- For users, you can use
- feat: apply config-info information to
set document. - feat: set
stretch: falseby default foralternativesfunctions. This is a minor breaking change, but I think it would be more intuitive: no auto empty space.
Fixes
- fix: fix error with uncover using semi-transparent-cover
- fix: fix type string comparison https://github.com/touying-typ/touying/pull/153
- fix: fix horizontal-line bug in typst 0.13.0
- refactor: fix display-current-short-heading
v0.5.4 & v0.5.5
Features
- docs: improve param documentation and we have better hints for tinymist https://github.com/touying-typ/touying/pull/98
- feat: fake frozon states support for
headinghttps://github.com/touying-typ/touying/pull/124 - feat: add alpha-changing-cover and color-changing-cover https://github.com/touying-typ/touying/pull/129
- feat: add effect function https://github.com/touying-typ/touying/issues/111
- Example:
#effect(text.with(fill: red), "2-")[Something]will display[Something]if the current slide is 2 or later.
- Example:
- feat: add argument
config: (..)forxxx-slidefunctions - feat: add
alignargument for university theme
Fixes
- fix: also hide enum numbers with show-hide-set-list-marker-none https://github.com/touying-typ/touying/pull/114
- fix: fixed progress bar not to break apart when global figure gutter is set nonzero https://github.com/touying-typ/touying/pull/120
- fix: fixed frozen-counters bug with multiple #pause commands https://github.com/touying-typ/touying/pull/124
- fix: fixed incorrect page num when draft is true https://github.com/touying-typ/touying/pull/125
- fix: fix behaviors of fit-to-height and fit-to-width partially https://github.com/touying-typ/touying/pull/131
- fix: duplicated footnotes in headings https://github.com/touying-typ/touying/pull/132
- fix: do not hardcode page sizes https://github.com/touying-typ/touying/pull/134
- fix: add default numbering for page https://github.com/touying-typ/touying/issues/100
- refactor: move show-strong-with-alert to per-slide level https://github.com/touying-typ/touying/issues/123
- refactor: remove unnecessary
config-page(fill: ...) - theme(metropolis): fix color of title page and fix https://github.com/touying-typ/touying/issues/103
- theme(metropolis): fixed metropolis slide's header to return content if title is specified https://github.com/touying-typ/touying/pull/126
- theme(metropolis): respect colors dict in metropolis theme https://github.com/touying-typ/touying/pull/133
- fix: fix bug of
#effectfunction
Thanks for the contributions from @enklht.
v0.5.3
Features
- feat: add
stretchparameter for#alternatives[]function class. This allows us to handle cases where the internal element is a context expression. - feat: add
config-common(align-enum-marker-with-baseline: true)for aligning the enum marker with the baseline. - feat: add
linebreaksoption tocomponents.mini-slides. https://github.com/touying-typ/touying/pull/96 - feat: add
<touying:skip>label to skip a new-section-slide. - feat: add
config-common(show-hide-set-list-marker-none: true)to make the markers oflistandenuminvisible after#pause. - feat: add
config-common(bibliography-as-footnote: bibliography(title: none, "ref.bib"))to display the bibliography in footnotes. - refactor: add
config-common(show-strong-with-alert: true)configuration to display strong text with an alert. (small breaking change for some themes) - refactor: refactor
display-current-headingfor preserving heading style in title and subtitle. https://github.com/touying-typ/touying/issues/71 - refactor: make
new-section-slide-fnfunction class can receivebodyparameter. We can usereceive-body-for-new-section-slide-fnto control it. (Breaking change)- For example, you can add
#speaker-note[]for a new section slide, like= Section Title \ #speaker-note[]. - If you don't want to append content to the body of the new section slide, you can use
---after the section title.
- For example, you can add
Fixes
- fix outdated documentation.
- fix bug of
enable-frozen-states-and-countersin handout mode. - fix unusable
square()function. https://github.com/touying-typ/touying/issues/73 - fix hidden footer for
show-notes-on-second-screen: bottom. https://github.com/touying-typ/touying/issues/89 - fix metadata element in table cells. https://github.com/touying-typ/touying/issues/77 https://github.com/touying-typ/touying/issues/95
- fix
auto-offset-for-headingtofalseby default. - fix uncover/only hides more content than it should. https://github.com/touying-typ/touying/issues/85
- theme(simple): fix wrong title and subtitle. https://github.com/touying-typ/touying/issues/70
v0.5.1 & v0.5.2
- Fix somg bugs.
v0.5.0
This is a significant disruptive version update. Touying has removed many mistakes that resulted from incorrect decisions. We have redesigned numerous features. The goal of this version is to make Touying more user-friendly, more flexible, and more powerful.
Major changes include:
- Avoiding closures and OOP syntax, which makes Touying's configuration simpler and allows for the use of document comments to provide more auto-completion information for the slide function.
- The existing
#let slide(self: none, ..args) = { .. }is now#let slide(..args) = touying-slide-wrapper(self => { .. }), whereselfis automatically injected. - We can use
config-xxxsyntax to configure Touying, for example,#show: university-theme.with(aspect-ratio: "16-9", config-colors(primary: blue)).
- The existing
- The
touying-slidefunction no longer includes parameters likesection,subsection, andtitle. These will be automatically inserted into the slide as invisible level 1, 2, or 3 headings viaself.headings(controlled by theslide-levelconfiguration).- We can leverage the powerful headings provided by Typst to support numbering, outlines, and bookmarks.
- Headings within the
#slide[= XXX]function will be adjusted to levelslide-level + 1using theoffsetparameter. - We can use labels on headings to control many aspects, such as supporting the
<touying:hidden>and other special labels, implementing short headings, or recalling a slide with#touying-recall().
- Touying now supports the normal use of
setandshowrules at any position, without requiring them to be in specific locations.
A simple usage example is shown below, and more examples can be found in the examples directory:
#import "@preview/touying:0.5.0": *
#import themes.university: *
#show: university-theme.with(
aspect-ratio: "16-9",
config-info(
title: [Title],
subtitle: [Subtitle],
author: [Authors],
date: datetime.today(),
institution: [Institution],
logo: emoji.school,
),
)
#set heading(numbering: "1.1")
#title-slide()
= The Section
== Slide Title
#lorem(40)
Theme Migration Guide:
For detailed changes to specific themes, you can refer to the themes directory. Generally, if you want to migrate an existing theme, you should:
- Rename the
registerfunction toxxx-themeand remove theselfparameter. - Add a
show: touying-slides.with(..)configuration.- Change
self.methods.colorstoconfig-colors(primary: rgb("#xxxxxx")). - Change
self.page-argstoconfig-page(). - Change
self.methods.slide = slidetoconfig-methods(slide: slide). - Change
self.methods.new-section-slide = new-section-slidetoconfig-methods(new-section-slide: new-section-slide). - Change private theme variables like
self.xxx-footertoconfig-store(footer: [..]), which you can access throughself.store.footer. - Move the configuration of headers and footers into the
slidefunction rather than in thexxx-themefunction. - You can directly use
setorshowrules inxxx-themeor configure them throughconfig-methods(init: (self: none, body) => { .. })to fully utilize theselfparameter.
- Change
- For
states.current-section-with-numbering, you can useutils.display-current-heading(level: 1)instead.- If you only need the previous heading regardless of whether it is a section or a subsection, use
self => utils.display-current-heading(depth: self.slide-level).
- If you only need the previous heading regardless of whether it is a section or a subsection, use
- The
alertfunction can be replaced withconfig-methods(alert: utils.alert-with-primary-color). - The
touying-outline()function is no longer needed; you can usecomponents.adaptive-columns(outline())instead. Consider usingcomponents.progressive-outline()orcomponents.custom-progressive-outline(). - Replace
states.slide-counter.display() + " / " + states.last-slide-numberwithcontext utils.slide-counter.display() + " / " + utils.last-slide-number. That is, we no longer usestatesbututils. - Remove the
slidesfunction; we no longer need this function. Instead of implicitly injectingtitle-slide(), explicitly use#title-slide(). If necessary, consider adding it in thexxx-themefunction. - Change
#let slide(self: none, ..args) = { .. }to#let slide(..args) = touying-slide-wrapper(self => { .. }), whereselfis automatically injected.- Change specific parameter configurations to
self = utils.merge-dicts(self, config-page(fill: self.colors.neutral-lightest)). - Remove
self = utils.empty-page(self)and useconfig-common(freeze-slide-counter: true)andconfig-page(margin: 0em)instead. - Change
(self.methods.touying-slide)()totouying-slide().
- Change specific parameter configurations to
- You can insert visible headings into slides by configuring
config-common(subslide-preamble: self => text(1.2em, weight: "bold", utils.display-current-heading(depth: self.slide-level))). - Finally, don't forget to add document comments to your functions so your users can get better auto-completion hints, especially when using the Tinymist plugin.
Other Changes:
- theme(stargazer): new stargazer theme modified from Coekjan/touying-buaa.
- feat: implemented fake frozen states support, allowing you to use numbering and
#pausenormally. This behavior can be controlled withenable-frozen-states-and-counters,frozen-states, andfrozen-countersinconfig-common(). - feat: implemented
label-only-on-last-subslidefunctionality to prevent non-unique label warnings when working with@equationand@figurein conjunction with#pauseanimations. - feat: added the
touying-recall(<label>)function to replay a specific slide. - feat: implemented
nontight-list-enum-and-terms, which defaults totrueand forceslist,enum, andtermsto have theirtightparameter set tofalse. You can control spacing size with#set list(spacing: 1em). - feat: replaced
listwithtermsimplementation to achievealign-list-marker-with-baseline, which is off by default. - feat: implemented
scale-list-items, scaling list items by a factor, e.g.,scale-list-items: 0.8scales list items by 0.8. - feat: supported direct use of
#pauseand#meanwhilein math expressions, such as$x + pause y$. - feat: provided
#pauseand#meanwhilesupport for most layout functions, such asgridandtable. - feat: added
#show: appendixsupport, essentially equivalent to#show: touying-set-config.with((appendix: true)). - feat: Introduced special labels
<touying:hidden>,<touying:unnumbered>,<touying:unoutlined>,<touying:unbookmarked>to simplify control over heading behavior. - feat: added basic
utils.short-headingsupport to display short headings using labels, such as displaying<sec:my-section>as "My Section". - feat: added
#components.adaptive-columns()to achieve adaptive columns that span a page, typically used with theoutline()function. - feat: added
#show: magic.bibliography-as-footnote.with(bibliography("ref.bib"))to display the bibliography in footnotes. - feat: added components like
custom-progressive-outline,mini-slides. - feat: removed
touying-outline(), which can be directly replaced withoutline(). - fix: replaced potentially incompatible code, such as
type(s) == "string"andlocate(loc => { .. }). - fix: Fixed some bugs.
v0.4.2
- theme(metropolis): decoupled text color with
neutral-dark(Breaking change) - feat: add mark-style uncover, only and alternatives
- feat: add warning for styled block for slides
- feat: add warning for touying-temporary-mark
- feat: add markup-text for speaker-note
- fix: fix bug of slides
v0.4.1
Features
- feat: support builtin outline and bookmark
- feat: support speaker note for dual-screen
- feat: add touying-mitex function
Fixes
- fix: add outline-slide for dewdrop theme
- fix: fix regression of default value "auto" for repeat
Miscellaneous Improvements
- feat: add list support for
touying-outlinefunction - feat: add auto-reset-footnote
- feat: add
freeze-in-empty-pagefor better page counter - feat: add
..argsfor register method to capture unused arguments
v0.4.0
Features
- feat: support
#footnote[]for all themes. - feat: access subslide and repeat in footer and header by
self => self.subslide. - feat: support numbered theorem environments by ctheorems.
- feat: support numbering for sections and subsections.
Fixes
- fix: make nested includes work correctly.
- fix: disable multi-page slides from creating the same section multiple times.
Breaking changes
- refactor: remove
self.paddingand addself.full-headerself.full-footerconfig.
v0.3.3
- template: move template to
touying-aquapackage, make Touying searchable in Typst Universe Packages - themes: fix bugs in university and dewdrop theme
- feat: make set-show rule work without
settingparameter - feat: make
composerparameter more simpler - feat: add
empty-slidefunction
v0.3.2
- fix critical bug: fix
is-sequencefunction, makegridandtablework correctly in touying - theme: add aqua theme, thanks for pride7
- theme: make university theme more configurable
- refactor: don't export variable
sby default anymore, it will be extracted byregisterfunction (Breaking Change) - meta: add
categoriesandtemplateconfig totypst.tomlfor Typst 0.11
v0.3.1
- fix some typos
- fix slide-level bug
- fix bug of pdfpc label
v0.3.0
Features
- better show-slides mode.
- support align and pad.
Documentation
- Add more detailed documentation.
Refactor
- simplify theme.
Fix
- fix many bugs.
v0.2.1
Features
- Touying-reducer: support cetz and fletcher animation
- university theme: add university theme
Fix
- fix footer progress in metropolis theme
- fix some bugs in simple and dewdrop themes
- fix bug that outline does not display more than 4 sections
v0.2.0
- Object-oriented programming: Singleton
s, binding methodsutils.methods(s)and(self: obj, ..) => {..}methods. - Page arguments management: Instead of using
#set page(..), you should useself.page-argsto retrieve or set page parameters, thereby avoiding unnecessary creation of new pages. #pausefor sequence content: You can use #pause at the outermost level of a slide, including inline and list.#pausefor layout functions: You can use thecomposerparameter to add yourself layout function likeutils.side-by-side, and simply use multiple pos parameters like#slide[..][..].#meanwhilefor synchronous display: Provide a#meanwhilefor resetting subslides counter.#pauseand#meanwhilefor math equation: Provide a#touying-equation("x + y pause + z")for math equation animations.- Slides: Create simple slides using standard headings.
- Callback-style
uncover,onlyandalternatives: Based on the concise syntax provided by Polylux, allow precise control of the timing for displaying content.- You should manually control the number of subslides using the
repeatparameter.
- You should manually control the number of subslides using the
- Transparent cover: Enable transparent cover using oop syntax like
#let s = (s.methods.enable-transparent-cover)(self: s). - Handout mode: enable handout mode by
#let s = (s.methods.enable-handout-mode)(self: s). - Fit-to-width and fit-to-height: Fit-to-width for title in header and fit-to-height for image.
utils.fit-to-width(grow: true, shrink: true, width, body)utils.fit-to-height(width: none, prescale-width: none, grow: true, shrink: true, height, body)
- Slides counter:
states.slide-counter.display() + " / " + states.last-slide-numberandstates.touying-progress(ratio => ..). - Appendix: Freeze the
last-slide-numberto prevent the slide number from increasing further. - Sections: Touying's built-in section support can be used to display the current section title and show progress.
sectionandsubsectionparameter in#slideto register a new section or subsection.states.current-section-titleto get the current section.states.touying-outlineors.methods.touying-outlineto display a outline of sections.states.touying-final-sections(sections => ..)for custom outline display.states.touying-progress-with-sections((current-sections: .., final-sections: .., current-slide-number: .., last-slide-number: ..) => ..)for powerful progress display.
- Navigation bar: Navigation bar like here by
states.touying-progress-with-sections(..), indewdroptheme. - Pdfpc: pdfpc support and export
.pdfpcfile without external tool bytypst querycommand simply.