Changelog
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
 
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.6.1": *
#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 
utils.display-current-heading(). 
 - 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
 - feat: touying offers a gallery page via wiki
 
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.