{"id":13525328,"url":"https://github.com/touying-typ/touying","last_synced_at":"2026-03-06T05:24:25.562Z","repository":{"id":216356808,"uuid":"740802677","full_name":"touying-typ/touying","owner":"touying-typ","description":"Touying is a powerful package for creating presentation slides in Typst.","archived":false,"fork":false,"pushed_at":"2025-09-24T14:57:04.000Z","size":36678,"stargazers_count":1612,"open_issues_count":51,"forks_count":40,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-09-24T16:38:51.023Z","etag":null,"topics":["presentation","presentation-slides","slides","touying","typst","typst-package"],"latest_commit_sha":null,"homepage":"https://touying-typ.github.io/","language":"Typst","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/touying-typ.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-09T05:09:57.000Z","updated_at":"2025-09-24T05:23:49.000Z","dependencies_parsed_at":"2024-01-20T08:25:08.284Z","dependency_job_id":"ae75d6e4-9ed7-42b3-83a5-152d404aea35","html_url":"https://github.com/touying-typ/touying","commit_stats":null,"previous_names":["touying-typ/touying"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/touying-typ/touying","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touying-typ%2Ftouying","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touying-typ%2Ftouying/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touying-typ%2Ftouying/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touying-typ%2Ftouying/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/touying-typ","download_url":"https://codeload.github.com/touying-typ/touying/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touying-typ%2Ftouying/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["presentation","presentation-slides","slides","touying","typst","typst-package"],"created_at":"2024-08-01T06:01:17.745Z","updated_at":"2026-03-06T05:24:25.542Z","avatar_url":"https://github.com/touying-typ.png","language":"Typst","funding_links":[],"categories":["Typst","Templates \u0026 Libraries","🧮 模板与写作工具"],"sub_categories":["Slides","PPT/Slides"],"readme":"# ![logo](https://github.com/user-attachments/assets/58a91b14-ae1a-49e2-a3e7-5e3a148e2ba5)\n\n[Touying](https://github.com/touying-typ/touying) (投影 in chinese, /tóuyǐng/, meaning projection) is a user-friendly, powerful and efficient package for creating presentation slides in Typst.\n\nIf you like it, consider [giving a star on GitHub](https://github.com/touying-typ/touying). Touying is a community-driven project, feel free to suggest any ideas and contribute.\n\n[![Typst Universe](https://img.shields.io/badge/dynamic/xml?url=https%3A%2F%2Ftypst.app%2Funiverse%2Fpackage%2Ftouying\u0026query=%2Fhtml%2Fbody%2Fdiv%2Fmain%2Fdiv%5B2%5D%2Faside%2Fsection%5B2%5D%2Fdl%2Fdd%5B3%5D\u0026logo=typst\u0026label=universe\u0026color=%2339cccc)](https://typst.app/universe/package/touying)\n[![Book badge](https://img.shields.io/badge/docs-book-green)](https://touying-typ.github.io/)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/touying-typ/touying)\n[![zread](https://img.shields.io/badge/Ask_Zread-_.svg?style=flat\u0026color=00b0aa\u0026labelColor=000000\u0026logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuOTYxNTYgMS42MDAxSDIuMjQxNTZDMS44ODgxIDEuNjAwMSAxLjYwMTU2IDEuODg2NjQgMS42MDE1NiAyLjI0MDFWNC45NjAxQzEuNjAxNTYgNS4zMTM1NiAxLjg4ODEgNS42MDAxIDIuMjQxNTYgNS42MDAxSDQuOTYxNTZDNS4zMTUwMiA1LjYwMDEgNS42MDE1NiA1LjMxMzU2IDUuNjAxNTYgNC45NjAxVjIuMjQwMUM1LjYwMTU2IDEuODg2NjQgNS4zMTUwMiAxLjYwMDEgNC45NjE1NiAxLjYwMDFaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00Ljk2MTU2IDEwLjM5OTlIMi4yNDE1NkMxLjg4ODEgMTAuMzk5OSAxLjYwMTU2IDEwLjY4NjQgMS42MDE1NiAxMS4wMzk5VjEzLjc1OTlDMS42MDE1NiAxNC4xMTM0IDEuODg4MSAxNC4zOTk5IDIuMjQxNTYgMTQuMzk5OUg0Ljk2MTU2QzUuMzE1MDIgMTQuMzk5OSA1LjYwMTU2IDE0LjExMzQgNS42MDE1NiAxMy43NTk5VjExLjAzOTlDNS42MDE1NiAxMC42ODY0IDUuMzE1MDIgMTAuMzk5OSA0Ljk2MTU2IDEwLjM5OTlaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik0xMy43NTg0IDEuNjAwMUgxMS4wMzg0QzEwLjY4NSAxLjYwMDEgMTAuMzk4NCAxLjg4NjY0IDEwLjM5ODQgMi4yNDAxVjQuOTYwMUMxMC4zOTg0IDUuMzEzNTYgMTAuNjg1IDUuNjAwMSAxMS4wMzg0IDUuNjAwMUgxMy43NTg0QzE0LjExMTkgNS42MDAxIDE0LjM5ODQgNS4zMTM1NiAxNC4zOTg0IDQuOTYwMVYyLjI0MDFDMTQuMzk4NCAxLjg4NjY0IDE0LjExMTkgMS42MDAxIDEzLjc1ODQgMS42MDAxWiIgZmlsbD0iI2ZmZiIvPgo8cGF0aCBkPSJNNCAxMkwxMiA0TDQgMTJaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00IDEyTDEyIDQiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4K\u0026logoColor=ffffff)](https://zread.ai/touying-typ/touying)\n[![Gallery badge](https://img.shields.io/badge/demo-gallery-red)](https://github.com/touying-typ/touying/wiki)\n![GitHub](https://img.shields.io/github/license/touying-typ/touying)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/touying-typ/touying)\n![GitHub Repo stars](https://img.shields.io/github/stars/touying-typ/touying)\n![Themes badge](https://img.shields.io/badge/themes-6-aqua)\n\n\n## Document\nRead [touying documentation](https://touying-typ.github.io/) to learn all about Touying. If you have any questions, you can also ask on [DeepWiki](https://deepwiki.com/touying-typ/touying) or [Zread](https://zread.ai/touying-typ/touying) for AI help.\n\nWe will maintain **English** and **Chinese** versions of the documentation for Touying, and for each major version, we will maintain a documentation copy. This allows you to easily refer to old versions of the Touying documentation and migrate to new versions.\n\n**Note that the documentation may be outdated, and you can also use Tinymist to view Touying's annotated documentation by hovering over the code.**\n\n## Gallery\n\nTouying offers [a gallery page](https://github.com/touying-typ/touying/wiki) via wiki, where you can browse elegant slides created by Touying users. You're also encouraged to contribute your own beautiful slides here!\n\n## Special Features\n\n1. Split slides by headings [document](https://touying-typ.github.io/docs/sections)\n\n```typst\n= Section\n\n== Subsection\n\n=== First Slide\n\nHello, Touying!\n\n=== Second Slide\n\nHello, Typst!\n```\n\n2. `#pause` and `#meanwhile` animations [document](https://touying-typ.github.io/docs/dynamic/simple)\n\n```typst\n#slide[\n  First\n\n  #pause\n\n  Second\n\n  #meanwhile\n\n  Third\n\n  #pause\n\n  Fourth\n]\n```\n\n![image](https://github.com/touying-typ/touying/assets/34951714/24ca19a3-b27c-4d31-ab75-09c37911e6ac)\n\n3. Math Equation Animation [document](https://touying-typ.github.io/docs/dynamic/equation)\n\n![image](https://github.com/touying-typ/touying/assets/34951714/8640fe0a-95e4-46ac-b570-c8c79f993de4)\n\n4. `touying-reducer` Cetz and Fletcher Animations [document](https://touying-typ.github.io/docs/dynamic/other)\n\n![image](https://github.com/touying-typ/touying/assets/34951714/9ba71f54-2a5d-4144-996c-4a42833cc5cc)\n\n5. Correct outline and bookmark (no duplicate and correct page number)\n\n![image](https://github.com/touying-typ/touying/assets/34951714/7b62fcaf-6342-4dba-901b-818c16682529)\n\n6. Dewdrop Theme Navigation Bar [document](https://touying-typ.github.io/docs/themes/dewdrop)\n\n![image](https://github.com/touying-typ/touying/assets/34951714/0426516d-aa3c-4b7a-b7b6-2d5d276fb971)\n\n7. Semi-transparent cover mode [document](https://touying-typ.github.io/docs/dynamic/cover)\n\n![image](https://github.com/touying-typ/touying/assets/34951714/22a9ea66-c8b5-431e-a52c-2c8ca3f18e49)\n\n8. Speaker notes for dual-screen [document](https://touying-typ.github.io/docs/external/pympress)\n\n![image](https://github.com/touying-typ/touying/assets/34951714/afbe17cb-46d4-4507-90e8-959c53de95d5)\n\n9. Export slides to PPTX and HTML formats and show presentation online. [touying-exporter](https://github.com/touying-typ/touying-exporter) [touying-template](https://github.com/touying-typ/touying-template) [online](https://touying-typ.github.io/touying-template/)\n\n![image](https://github.com/touying-typ/touying-exporter/assets/34951714/207ddffc-87c8-4976-9bf4-4c6c5e2573ea)\n\n10. Instantly share touying slides on git, [example](https://gistd.myriad-dreamin.com/touying-typ/touying/blob/main/examples/simple.typ?g-mode=slide) with [gistd](https://github.com/Myriad-Dreamin/gistd)\n\n\n## Quick start\n\nBefore you begin, make sure you have installed the Typst environment. If not, you can use the [Web App](https://typst.app/) or the [Tinymist LSP](https://marketplace.visualstudio.com/items?itemName=myriad-dreamin.tinymist) extensions for VS Code.\n\nTo use Touying, you only need to include the following code in your document:\n\n```typst\n#import \"@preview/touying:0.6.2\": *\n#import themes.simple: *\n\n#show: simple-theme.with(aspect-ratio: \"16-9\")\n\n= Title\n\n== First Slide\n\nHello, Touying!\n\n#pause\n\nHello, Typst!\n```\n\n![image](https://github.com/touying-typ/touying/assets/34951714/f5bdbf8f-7bf9-45fd-9923-0fa5d66450b2)\n\nIt's simple. Congratulations on creating your first Touying slide! 🎉\n\n**Tip:** You can use Typst syntax like `#import \"config.typ\": *` or `#include \"content.typ\"` to implement Touying's multi-file architecture.\n\n\n## More Complex Examples\n\nIn fact, Touying provides various styles for writing slides. For example, the above example uses first-level and second-level titles to create new slides. However, you can also use the `#slide[..]` format to access more powerful features provided by Touying.\n\n```typst\n#import \"@preview/touying:0.6.2\": *\n#import themes.university: *\n#import \"@preview/cetz:0.4.2\"\n#import \"@preview/fletcher:0.5.8\" as fletcher: node, edge\n#import \"@preview/numbly:0.1.0\": numbly\n#import \"@preview/theorion:0.4.1\": *\n#import cosmos.clouds: *\n#show: show-theorion\n\n// cetz and fletcher bindings for touying\n#let cetz-canvas = touying-reducer.with(reduce: cetz.canvas, cover: cetz.draw.hide.with(bounds: true))\n#let fletcher-diagram = touying-reducer.with(reduce: fletcher.diagram, cover: fletcher.hide)\n\n#show: university-theme.with(\n  aspect-ratio: \"16-9\",\n  // align: horizon,\n  // config-common(handout: true),\n  config-common(frozen-counters: (theorem-counter,)),  // freeze theorem counter for animation\n  config-info(\n    title: [Title],\n    subtitle: [Subtitle],\n    author: [Authors],\n    date: datetime.today(),\n    institution: [Institution],\n    logo: emoji.school,\n  ),\n)\n\n#set heading(numbering: numbly(\"{1}.\", default: \"1.1\"))\n\n#title-slide()\n\n== Outline \u003ctouying:hidden\u003e\n\n#components.adaptive-columns(outline(title: none, indent: 1em))\n\n= Animation\n\n== Simple Animation\n\nWe can use `#pause` to #pause display something later.\n\n#pause\n\nJust like this.\n\n#meanwhile\n\nMeanwhile, #pause we can also use `#meanwhile` to #pause display other content synchronously.\n\n#speaker-note[\n  + This is a speaker note.\n  + You won't see it unless you use `config-common(show-notes-on-second-screen: right)`\n]\n\n\n== Complex Animation\n\nAt subslide #touying-fn-wrapper((self: none) =\u003e str(self.subslide)), we can\n\nuse #uncover(\"2-\")[`#uncover` function] for reserving space,\n\nuse #only(\"2-\")[`#only` function] for not reserving space,\n\n#alternatives[call `#only` multiple times \\u{2717}][use `#alternatives` function #sym.checkmark] for choosing one of the alternatives.\n\n\n== Callback Style Animation\n\n#slide(\n  repeat: 3,\n  self =\u003e [\n    #let (uncover, only, alternatives) = utils.methods(self)\n\n    At subslide #self.subslide, we can\n\n    use #uncover(\"2-\")[`#uncover` function] for reserving space,\n\n    use #only(\"2-\")[`#only` function] for not reserving space,\n\n    #alternatives[call `#only` multiple times \\u{2717}][use `#alternatives` function #sym.checkmark] for choosing one of the alternatives.\n  ],\n)\n\n\n== Math Equation Animation\n\nEquation with `pause`:\n\n$\n  f(x) \u0026= pause x^2 + 2x + 1 \\\n  \u0026= pause (x + 1)^2 \\\n$\n\n#meanwhile\n\nHere, #pause we have the expression of $f(x)$.\n\n#pause\n\nBy factorizing, we can obtain this result.\n\n\n== CeTZ Animation\n\nCeTZ Animation in Touying:\n\n#cetz-canvas({\n  import cetz.draw: *\n\n  rect((0, 0), (5, 5))\n\n  (pause,)\n\n  rect((0, 0), (1, 1))\n  rect((1, 1), (2, 2))\n  rect((2, 2), (3, 3))\n\n  (pause,)\n\n  line((0, 0), (2.5, 2.5), name: \"line\")\n})\n\n\n== Fletcher Animation\n\nFletcher Animation in Touying:\n\n#fletcher-diagram(\n  node-stroke: .1em,\n  node-fill: gradient.radial(blue.lighten(80%), blue, center: (30%, 20%), radius: 80%),\n  spacing: 4em,\n  edge((-1, 0), \"r\", \"-|\u003e\", `open(path)`, label-pos: 0, label-side: center),\n  node((0, 0), `reading`, radius: 2em),\n  edge((0, 0), (0, 0), `read()`, \"--|\u003e\", bend: 130deg),\n  pause,\n  edge(`read()`, \"-|\u003e\"),\n  node((1, 0), `eof`, radius: 2em),\n  pause,\n  edge(`close()`, \"-|\u003e\"),\n  node((2, 0), `closed`, radius: 2em, extrude: (-2.5, 0)),\n  edge((0, 0), (2, 0), `close()`, \"-|\u003e\", bend: -40deg),\n)\n\n\n= Theorems\n\n== Prime numbers\n\n#definition[\n  A natural number is called a #highlight[_prime number_] if it is greater\n  than 1 and cannot be written as the product of two smaller natural numbers.\n]\n#example[\n  The numbers $2$, $3$, and $17$ are prime.\n  @cor_largest_prime shows that this list is not exhaustive!\n]\n\n#theorem(title: \"Euclid\")[\n  There are infinitely many primes.\n]\n#pagebreak(weak: true)\n#proof[\n  Suppose to the contrary that $p_1, p_2, dots, p_n$ is a finite enumeration\n  of all primes. Set $P = p_1 p_2 dots p_n$. Since $P + 1$ is not in our list,\n  it cannot be prime. Thus, some prime factor $p_j$ divides $P + 1$. Since\n  $p_j$ also divides $P$, it must divide the difference $(P + 1) - P = 1$, a\n  contradiction.\n]\n\n#corollary[\n  There is no largest prime number.\n] \u003ccor_largest_prime\u003e\n#corollary[\n  There are infinitely many composite numbers.\n]\n\n#theorem[\n  There are arbitrarily long stretches of composite numbers.\n]\n\n#proof[\n  For any $n \u003e 2$, consider $\n    n! + 2, quad n! + 3, quad ..., quad n! + n\n  $\n]\n\n\n= Others\n\n== Side-by-side\n\n#slide(composer: (1fr, 1fr))[\n  First column.\n][\n  Second column.\n]\n\n\n== Multiple Pages\n\n#lorem(200)\n\n\n#show: appendix\n\n= Appendix\n\n== Appendix\n\nPlease pay attention to the current slide number.\n```\n\n![image](https://github.com/user-attachments/assets/b1dfc4d9-e263-46ff-8588-a0635870e370)\n\n\n## Acknowledgements\n\nThanks to...\n\n- [@andreasKroepelin](https://github.com/andreasKroepelin) for the `polylux` package\n- [@enklht](https://github.com/enklht) for many fixes and improvements\n- [@Enivex](https://github.com/Enivex) for the `metropolis` theme\n- [@drupol](https://github.com/drupol) for the `university` theme\n- [@pride7](https://github.com/pride7) for the `aqua` theme\n- [@Coekjan](https://github.com/Coekjan) and [@QuadnucYard](https://github.com/QuadnucYard) for the `stargazer` theme\n- [@ntjess](https://github.com/ntjess) for contributing to `fit-to-height`, `fit-to-width` and `cover-with-rect`\n\n## Poster\n\n![poster](https://github.com/user-attachments/assets/e1ddb672-8e8f-472d-b364-b8caed1da16b)\n\n\n[View Code](https://github.com/touying-typ/touying-poster)\n\n## Star History\n\n\u003ca href=\"https://star-history.com/#touying-typ/touying\u0026Date\"\u003e\n \u003cpicture\u003e\n   \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=touying-typ/touying\u0026type=Date\u0026theme=dark\" /\u003e\n   \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=touying-typ/touying\u0026type=Date\" /\u003e\n   \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=touying-typ/touying\u0026type=Date\" /\u003e\n \u003c/picture\u003e\n\u003c/a\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftouying-typ%2Ftouying","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftouying-typ%2Ftouying","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftouying-typ%2Ftouying/lists"}