From ceb41a178d4086871339a68112e61dd878ce09a2 Mon Sep 17 00:00:00 2001 From: OrangeX4 <34951714+OrangeX4@users.noreply.github.com> Date: Wed, 27 Mar 2024 05:59:22 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20touying-?= =?UTF-8?q?typ/touying@6a8785d67b579eec2170de2c812bb233c9028a2c=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 2 +- assets/js/{2553c37c.1ca5755f.js => 2553c37c.b398ce38.js} | 2 +- assets/js/{5670b452.4fce949b.js => 5670b452.9a520563.js} | 2 +- .../js/{runtime~main.dcd4d528.js => runtime~main.ca8b8749.js} | 2 +- blog/archive/index.html | 2 +- blog/index.html | 2 +- blog/tags/development/index.html | 2 +- blog/tags/index.html | 2 +- blog/touying-0-2-0/index.html | 2 +- docs/0.2.x/build-your-own-theme/index.html | 2 +- docs/0.2.x/category/dynamic-slides/index.html | 2 +- docs/0.2.x/category/external-tools/index.html | 2 +- docs/0.2.x/category/progress/index.html | 2 +- docs/0.2.x/category/themes/index.html | 2 +- docs/0.2.x/category/utilities/index.html | 2 +- docs/0.2.x/changelog/index.html | 2 +- docs/0.2.x/dynamic/complex/index.html | 2 +- docs/0.2.x/dynamic/cover/index.html | 2 +- docs/0.2.x/dynamic/equation/index.html | 2 +- docs/0.2.x/dynamic/handout/index.html | 2 +- docs/0.2.x/dynamic/other/index.html | 2 +- docs/0.2.x/dynamic/simple/index.html | 2 +- docs/0.2.x/external/pdfpc/index.html | 2 +- docs/0.2.x/external/typst-preview/index.html | 2 +- docs/0.2.x/intro/index.html | 2 +- docs/0.2.x/layout/index.html | 2 +- docs/0.2.x/progress/counters/index.html | 2 +- docs/0.2.x/progress/sections/index.html | 2 +- docs/0.2.x/start/index.html | 2 +- docs/0.2.x/style/index.html | 2 +- docs/0.2.x/themes/dewdrop/index.html | 2 +- docs/0.2.x/themes/metropolis/index.html | 2 +- docs/0.2.x/themes/simple/index.html | 2 +- docs/0.2.x/themes/university/index.html | 2 +- docs/0.2.x/utilities/fit-to/index.html | 2 +- docs/0.2.x/utilities/oop/index.html | 2 +- docs/0.3.x/build-your-own-theme/index.html | 2 +- docs/0.3.x/category/dynamic-slides/index.html | 2 +- docs/0.3.x/category/external-tools/index.html | 2 +- docs/0.3.x/category/package-integration/index.html | 2 +- docs/0.3.x/category/progress/index.html | 2 +- docs/0.3.x/category/themes/index.html | 2 +- docs/0.3.x/category/utilities/index.html | 2 +- docs/0.3.x/changelog/index.html | 2 +- docs/0.3.x/code-styles/index.html | 2 +- docs/0.3.x/dynamic/complex/index.html | 2 +- docs/0.3.x/dynamic/cover/index.html | 2 +- docs/0.3.x/dynamic/equation/index.html | 2 +- docs/0.3.x/dynamic/handout/index.html | 2 +- docs/0.3.x/dynamic/other/index.html | 2 +- docs/0.3.x/dynamic/simple/index.html | 2 +- docs/0.3.x/external/pdfpc/index.html | 2 +- docs/0.3.x/external/typst-preview/index.html | 2 +- docs/0.3.x/global-settings/index.html | 2 +- docs/0.3.x/integration/cetz/index.html | 2 +- docs/0.3.x/integration/codly/index.html | 2 +- docs/0.3.x/integration/fletcher/index.html | 2 +- docs/0.3.x/integration/mitex/index.html | 2 +- docs/0.3.x/integration/pinit/index.html | 2 +- docs/0.3.x/integration/polylux/index.html | 2 +- docs/0.3.x/intro/index.html | 2 +- docs/0.3.x/layout/index.html | 2 +- docs/0.3.x/progress/counters/index.html | 2 +- docs/0.3.x/progress/sections/index.html | 2 +- docs/0.3.x/sections/index.html | 2 +- docs/0.3.x/start/index.html | 2 +- docs/0.3.x/themes/dewdrop/index.html | 2 +- docs/0.3.x/themes/metropolis/index.html | 2 +- docs/0.3.x/themes/simple/index.html | 2 +- docs/0.3.x/themes/university/index.html | 2 +- docs/0.3.x/utilities/fit-to/index.html | 2 +- docs/0.3.x/utilities/oop/index.html | 2 +- docs/build-your-own-theme/index.html | 4 ++-- docs/category/dynamic-slides/index.html | 2 +- docs/category/external-tools/index.html | 2 +- docs/category/package-integration/index.html | 2 +- docs/category/progress/index.html | 2 +- docs/category/themes/index.html | 2 +- docs/category/utilities/index.html | 2 +- docs/changelog/index.html | 2 +- docs/code-styles/index.html | 2 +- docs/dynamic/complex/index.html | 2 +- docs/dynamic/cover/index.html | 2 +- docs/dynamic/equation/index.html | 2 +- docs/dynamic/handout/index.html | 2 +- docs/dynamic/other/index.html | 2 +- docs/dynamic/simple/index.html | 2 +- docs/external/pdfpc/index.html | 2 +- docs/external/typst-preview/index.html | 2 +- docs/global-settings/index.html | 2 +- docs/integration/cetz/index.html | 2 +- docs/integration/codly/index.html | 2 +- docs/integration/fletcher/index.html | 2 +- docs/integration/mitex/index.html | 2 +- docs/integration/pinit/index.html | 2 +- docs/integration/polylux/index.html | 2 +- docs/intro/index.html | 2 +- docs/layout/index.html | 2 +- docs/next/build-your-own-theme/index.html | 4 ++-- docs/next/category/dynamic-slides/index.html | 2 +- docs/next/category/external-tools/index.html | 2 +- docs/next/category/package-integration/index.html | 2 +- docs/next/category/progress/index.html | 2 +- docs/next/category/themes/index.html | 2 +- docs/next/category/utilities/index.html | 2 +- docs/next/changelog/index.html | 2 +- docs/next/code-styles/index.html | 2 +- docs/next/dynamic/complex/index.html | 2 +- docs/next/dynamic/cover/index.html | 2 +- docs/next/dynamic/equation/index.html | 2 +- docs/next/dynamic/handout/index.html | 2 +- docs/next/dynamic/other/index.html | 2 +- docs/next/dynamic/simple/index.html | 2 +- docs/next/external/pdfpc/index.html | 2 +- docs/next/external/typst-preview/index.html | 2 +- docs/next/global-settings/index.html | 2 +- docs/next/integration/cetz/index.html | 2 +- docs/next/integration/codly/index.html | 2 +- docs/next/integration/fletcher/index.html | 2 +- docs/next/integration/mitex/index.html | 2 +- docs/next/integration/pinit/index.html | 2 +- docs/next/integration/polylux/index.html | 2 +- docs/next/intro/index.html | 2 +- docs/next/layout/index.html | 2 +- docs/next/progress/counters/index.html | 2 +- docs/next/progress/sections/index.html | 2 +- docs/next/sections/index.html | 2 +- docs/next/start/index.html | 2 +- docs/next/themes/aqua/index.html | 2 +- docs/next/themes/dewdrop/index.html | 2 +- docs/next/themes/metropolis/index.html | 2 +- docs/next/themes/simple/index.html | 2 +- docs/next/themes/university/index.html | 2 +- docs/next/utilities/fit-to/index.html | 2 +- docs/next/utilities/oop/index.html | 2 +- docs/progress/counters/index.html | 2 +- docs/progress/sections/index.html | 2 +- docs/sections/index.html | 2 +- docs/start/index.html | 2 +- docs/themes/aqua/index.html | 2 +- docs/themes/dewdrop/index.html | 2 +- docs/themes/metropolis/index.html | 2 +- docs/themes/simple/index.html | 2 +- docs/themes/university/index.html | 2 +- docs/utilities/fit-to/index.html | 2 +- docs/utilities/oop/index.html | 2 +- index.html | 2 +- markdown-page/index.html | 2 +- zh/404.html | 2 +- zh/assets/js/{4bd433da.427fe6e2.js => 4bd433da.af1e98ec.js} | 2 +- zh/assets/js/{63dd4865.014917e6.js => 63dd4865.8199f349.js} | 2 +- .../js/{runtime~main.8795903d.js => runtime~main.f9bcd4d6.js} | 2 +- zh/blog/archive/index.html | 2 +- zh/blog/index.html | 2 +- zh/blog/tags/development/index.html | 2 +- zh/blog/tags/index.html | 2 +- zh/blog/touying-0-2-0/index.html | 2 +- zh/docs/0.2.x/build-your-own-theme/index.html | 2 +- zh/docs/0.2.x/category/dynamic-slides/index.html | 2 +- zh/docs/0.2.x/category/external-tools/index.html | 2 +- zh/docs/0.2.x/category/progress/index.html | 2 +- zh/docs/0.2.x/category/themes/index.html | 2 +- zh/docs/0.2.x/category/utilities/index.html | 2 +- zh/docs/0.2.x/changelog/index.html | 2 +- zh/docs/0.2.x/dynamic/complex/index.html | 2 +- zh/docs/0.2.x/dynamic/cover/index.html | 2 +- zh/docs/0.2.x/dynamic/equation/index.html | 2 +- zh/docs/0.2.x/dynamic/handout/index.html | 2 +- zh/docs/0.2.x/dynamic/other/index.html | 2 +- zh/docs/0.2.x/dynamic/simple/index.html | 2 +- zh/docs/0.2.x/external/pdfpc/index.html | 2 +- zh/docs/0.2.x/external/typst-preview/index.html | 2 +- zh/docs/0.2.x/intro/index.html | 2 +- zh/docs/0.2.x/layout/index.html | 2 +- zh/docs/0.2.x/progress/counters/index.html | 2 +- zh/docs/0.2.x/progress/sections/index.html | 2 +- zh/docs/0.2.x/start/index.html | 2 +- zh/docs/0.2.x/style/index.html | 2 +- zh/docs/0.2.x/themes/dewdrop/index.html | 2 +- zh/docs/0.2.x/themes/metropolis/index.html | 2 +- zh/docs/0.2.x/themes/simple/index.html | 2 +- zh/docs/0.2.x/themes/university/index.html | 2 +- zh/docs/0.2.x/utilities/fit-to/index.html | 2 +- zh/docs/0.2.x/utilities/oop/index.html | 2 +- zh/docs/0.3.x/build-your-own-theme/index.html | 2 +- zh/docs/0.3.x/category/dynamic-slides/index.html | 2 +- zh/docs/0.3.x/category/external-tools/index.html | 2 +- zh/docs/0.3.x/category/package-integration/index.html | 2 +- zh/docs/0.3.x/category/progress/index.html | 2 +- zh/docs/0.3.x/category/themes/index.html | 2 +- zh/docs/0.3.x/category/utilities/index.html | 2 +- zh/docs/0.3.x/changelog/index.html | 2 +- zh/docs/0.3.x/code-styles/index.html | 2 +- zh/docs/0.3.x/dynamic/complex/index.html | 2 +- zh/docs/0.3.x/dynamic/cover/index.html | 2 +- zh/docs/0.3.x/dynamic/equation/index.html | 2 +- zh/docs/0.3.x/dynamic/handout/index.html | 2 +- zh/docs/0.3.x/dynamic/other/index.html | 2 +- zh/docs/0.3.x/dynamic/simple/index.html | 2 +- zh/docs/0.3.x/external/pdfpc/index.html | 2 +- zh/docs/0.3.x/external/typst-preview/index.html | 2 +- zh/docs/0.3.x/global-settings/index.html | 2 +- zh/docs/0.3.x/integration/cetz/index.html | 2 +- zh/docs/0.3.x/integration/codly/index.html | 2 +- zh/docs/0.3.x/integration/fletcher/index.html | 2 +- zh/docs/0.3.x/integration/mitex/index.html | 2 +- zh/docs/0.3.x/integration/pinit/index.html | 2 +- zh/docs/0.3.x/integration/polylux/index.html | 2 +- zh/docs/0.3.x/intro/index.html | 2 +- zh/docs/0.3.x/layout/index.html | 2 +- zh/docs/0.3.x/progress/counters/index.html | 2 +- zh/docs/0.3.x/progress/sections/index.html | 2 +- zh/docs/0.3.x/sections/index.html | 2 +- zh/docs/0.3.x/start/index.html | 2 +- zh/docs/0.3.x/themes/dewdrop/index.html | 2 +- zh/docs/0.3.x/themes/metropolis/index.html | 2 +- zh/docs/0.3.x/themes/simple/index.html | 2 +- zh/docs/0.3.x/themes/university/index.html | 2 +- zh/docs/0.3.x/utilities/fit-to/index.html | 2 +- zh/docs/0.3.x/utilities/oop/index.html | 2 +- zh/docs/build-your-own-theme/index.html | 4 ++-- zh/docs/category/dynamic-slides/index.html | 2 +- zh/docs/category/external-tools/index.html | 2 +- zh/docs/category/package-integration/index.html | 2 +- zh/docs/category/progress/index.html | 2 +- zh/docs/category/themes/index.html | 2 +- zh/docs/category/utilities/index.html | 2 +- zh/docs/changelog/index.html | 2 +- zh/docs/code-styles/index.html | 2 +- zh/docs/dynamic/complex/index.html | 2 +- zh/docs/dynamic/cover/index.html | 2 +- zh/docs/dynamic/equation/index.html | 2 +- zh/docs/dynamic/handout/index.html | 2 +- zh/docs/dynamic/other/index.html | 2 +- zh/docs/dynamic/simple/index.html | 2 +- zh/docs/external/pdfpc/index.html | 2 +- zh/docs/external/typst-preview/index.html | 2 +- zh/docs/global-settings/index.html | 2 +- zh/docs/integration/cetz/index.html | 2 +- zh/docs/integration/codly/index.html | 2 +- zh/docs/integration/fletcher/index.html | 2 +- zh/docs/integration/mitex/index.html | 2 +- zh/docs/integration/pinit/index.html | 2 +- zh/docs/integration/polylux/index.html | 2 +- zh/docs/intro/index.html | 2 +- zh/docs/layout/index.html | 2 +- zh/docs/next/build-your-own-theme/index.html | 4 ++-- zh/docs/next/category/dynamic-slides/index.html | 2 +- zh/docs/next/category/external-tools/index.html | 2 +- zh/docs/next/category/package-integration/index.html | 2 +- zh/docs/next/category/progress/index.html | 2 +- zh/docs/next/category/themes/index.html | 2 +- zh/docs/next/category/utilities/index.html | 2 +- zh/docs/next/changelog/index.html | 2 +- zh/docs/next/code-styles/index.html | 2 +- zh/docs/next/dynamic/complex/index.html | 2 +- zh/docs/next/dynamic/cover/index.html | 2 +- zh/docs/next/dynamic/equation/index.html | 2 +- zh/docs/next/dynamic/handout/index.html | 2 +- zh/docs/next/dynamic/other/index.html | 2 +- zh/docs/next/dynamic/simple/index.html | 2 +- zh/docs/next/external/pdfpc/index.html | 2 +- zh/docs/next/external/typst-preview/index.html | 2 +- zh/docs/next/global-settings/index.html | 2 +- zh/docs/next/integration/cetz/index.html | 2 +- zh/docs/next/integration/codly/index.html | 2 +- zh/docs/next/integration/fletcher/index.html | 2 +- zh/docs/next/integration/mitex/index.html | 2 +- zh/docs/next/integration/pinit/index.html | 2 +- zh/docs/next/integration/polylux/index.html | 2 +- zh/docs/next/intro/index.html | 2 +- zh/docs/next/layout/index.html | 2 +- zh/docs/next/progress/counters/index.html | 2 +- zh/docs/next/progress/sections/index.html | 2 +- zh/docs/next/sections/index.html | 2 +- zh/docs/next/start/index.html | 2 +- zh/docs/next/themes/aqua/index.html | 2 +- zh/docs/next/themes/dewdrop/index.html | 2 +- zh/docs/next/themes/metropolis/index.html | 2 +- zh/docs/next/themes/simple/index.html | 2 +- zh/docs/next/themes/university/index.html | 2 +- zh/docs/next/utilities/fit-to/index.html | 2 +- zh/docs/next/utilities/oop/index.html | 2 +- zh/docs/progress/counters/index.html | 2 +- zh/docs/progress/sections/index.html | 2 +- zh/docs/sections/index.html | 2 +- zh/docs/start/index.html | 2 +- zh/docs/themes/aqua/index.html | 2 +- zh/docs/themes/dewdrop/index.html | 2 +- zh/docs/themes/metropolis/index.html | 2 +- zh/docs/themes/simple/index.html | 2 +- zh/docs/themes/university/index.html | 2 +- zh/docs/utilities/fit-to/index.html | 2 +- zh/docs/utilities/oop/index.html | 2 +- zh/index.html | 2 +- zh/markdown-page/index.html | 2 +- 296 files changed, 300 insertions(+), 300 deletions(-) rename assets/js/{2553c37c.1ca5755f.js => 2553c37c.b398ce38.js} (99%) rename assets/js/{5670b452.4fce949b.js => 5670b452.9a520563.js} (99%) rename assets/js/{runtime~main.dcd4d528.js => runtime~main.ca8b8749.js} (98%) rename zh/assets/js/{4bd433da.427fe6e2.js => 4bd433da.af1e98ec.js} (99%) rename zh/assets/js/{63dd4865.014917e6.js => 63dd4865.8199f349.js} (99%) rename zh/assets/js/{runtime~main.8795903d.js => runtime~main.f9bcd4d6.js} (98%) diff --git a/404.html b/404.html index dac4d55fc..89b43cd43 100644 --- a/404.html +++ b/404.html @@ -5,7 +5,7 @@ Page Not Found | Touying - + diff --git a/assets/js/2553c37c.1ca5755f.js b/assets/js/2553c37c.b398ce38.js similarity index 99% rename from assets/js/2553c37c.1ca5755f.js rename to assets/js/2553c37c.b398ce38.js index 6a4721810..88cf1e104 100644 --- a/assets/js/2553c37c.1ca5755f.js +++ b/assets/js/2553c37c.b398ce38.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5526],{2382:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>a});var n=s(5893),i=s(1151);const o={sidebar_position:10},l="Creating Your Own Theme",r={id:"build-your-own-theme",title:"Creating Your Own Theme",description:"Creating your own theme with Touying might seem a bit complex initially due to the introduction of various concepts. However, fear not; if you successfully create a custom theme with Touying, you'll likely experience the convenience and powerful customization features it offers. You can refer to the source code of existing themes for guidance. The key steps to implement are:",source:"@site/versioned_docs/version-0.3.2+/build-your-own-theme.md",sourceDirName:".",slug:"/build-your-own-theme",permalink:"/touying/docs/build-your-own-theme",draft:!1,unlisted:!1,editUrl:"https://github.com/touying-typ/touying/tree/main/docs/versioned_docs/version-0.3.2+/build-your-own-theme.md",tags:[],version:"0.3.2+",sidebarPosition:10,frontMatter:{sidebar_position:10},sidebar:"tutorialSidebar",previous:{title:"Aqua Theme",permalink:"/touying/docs/themes/aqua"},next:{title:"Progress",permalink:"/touying/docs/category/progress"}},d={},a=[{value:"Modifying Existing Themes",id:"modifying-existing-themes",level:2},{value:"Import",id:"import",level:2},{value:"Register Function and Init Method",id:"register-function-and-init-method",level:2},{value:"Color Theme",id:"color-theme",level:2},{value:"Practical: Custom Alert Method",id:"practical-custom-alert-method",level:2},{value:"Custom Header and Footer",id:"custom-header-and-footer",level:2},{value:"Custom Special Slide",id:"custom-special-slide",level:2},{value:"Conclusion",id:"conclusion",level:2}];function c(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"creating-your-own-theme",children:"Creating Your Own Theme"}),"\n",(0,n.jsxs)(t.p,{children:["Creating your own theme with Touying might seem a bit complex initially due to the introduction of various concepts. However, fear not; if you successfully create a custom theme with Touying, you'll likely experience the convenience and powerful customization features it offers. You can refer to the ",(0,n.jsx)(t.a,{href:"https://github.com/touying-typ/touying/tree/main/themes",children:"source code of existing themes"})," for guidance. The key steps to implement are:"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"register"})," function to initialize the global singleton ",(0,n.jsx)(t.code,{children:"s"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"init"})," method."]}),"\n",(0,n.jsxs)(t.li,{children:["Define a color theme by modifying the ",(0,n.jsx)(t.code,{children:"self.colors"})," member variable."]}),"\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"alert"})," method (optional)."]}),"\n",(0,n.jsx)(t.li,{children:"Customize the header."}),"\n",(0,n.jsx)(t.li,{children:"Customize the footer."}),"\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"slide"})," method."]}),"\n",(0,n.jsxs)(t.li,{children:["Customize special slide methods, such as ",(0,n.jsx)(t.code,{children:"title-slide"})," and ",(0,n.jsx)(t.code,{children:"focus-slide"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"slides"})," method (optional)."]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"To demonstrate creating a simple and elegant Bamboo theme, let's follow the steps."}),"\n",(0,n.jsx)(t.h2,{id:"modifying-existing-themes",children:"Modifying Existing Themes"}),"\n",(0,n.jsx)(t.p,{children:"If you wish to modify a theme within the Touying framework locally instead of creating one from scratch, you can achieve this by following these steps:"}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["Copy the ",(0,n.jsx)(t.a,{href:"https://github.com/touying-typ/touying/tree/main/themes",children:"theme code"})," from the ",(0,n.jsx)(t.code,{children:"themes"})," directory to your local machine. For example, copy ",(0,n.jsx)(t.code,{children:"themes/university.typ"})," to a local file named ",(0,n.jsx)(t.code,{children:"university.typ"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Remove all ",(0,n.jsx)(t.code,{children:'#import "../xxx.typ"'})," commands at the top of the ",(0,n.jsx)(t.code,{children:"university.typ"})," file."]}),"\n",(0,n.jsxs)(t.li,{children:["Add ",(0,n.jsx)(t.code,{children:'#import "@preview/touying:0.3.3": *'})," at the top of the ",(0,n.jsx)(t.code,{children:"university.typ"})," file to import all modules."]}),"\n",(0,n.jsxs)(t.li,{children:["Replace ",(0,n.jsx)(t.code,{children:"self: s"})," in the ",(0,n.jsx)(t.code,{children:"register"})," function with ",(0,n.jsx)(t.code,{children:"self: themes.default.register()"})," ",(0,n.jsx)(t.strong,{children:"(Important)"}),"."]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"You can then import and use the theme by:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#import "@preview/touying:0.3.3": *\n#import "university.typ"\n\n#let s = university.register(aspect-ratio: "16-9")\n'})}),"\n",(0,n.jsxs)(t.p,{children:["For a specific example, refer to: ",(0,n.jsx)(t.a,{href:"https://typst.app/project/pdWNTS47I-6jxHrWdMSTLx",children:"https://typst.app/project/pdWNTS47I-6jxHrWdMSTLx"})]}),"\n",(0,n.jsx)(t.h2,{id:"import",children:"Import"}),"\n",(0,n.jsx)(t.p,{children:"Depending on whether the theme is for personal use or part of Touying, you can import in two ways:"}),"\n",(0,n.jsx)(t.p,{children:"If for personal use:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#import "@preview/touying:0.3.3": *\n'})}),"\n",(0,n.jsx)(t.p,{children:"If part of Touying themes:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#import "../utils/utils.typ"\n#import "../utils/states.typ"\n#import "../utils/components.typ"\n'})}),"\n",(0,n.jsxs)(t.p,{children:["Additionally, add the import statement in Touying's ",(0,n.jsx)(t.code,{children:"themes/themes.typ"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:'#import "bamboo.typ"\n'})}),"\n",(0,n.jsx)(t.h2,{id:"register-function-and-init-method",children:"Register Function and Init Method"}),"\n",(0,n.jsx)(t.p,{children:"Next, we'll distinguish between the bamboo.typ template file and the main.typ file, the latter of which is sometimes omitted."}),"\n",(0,n.jsx)(t.p,{children:"Generally, the first step in creating slides is to determine font size and page aspect ratio. Therefore, we need to register an initialization method:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n) = {\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n )\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9")\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n'})}),"\n",(0,n.jsxs)(t.p,{children:["As you can see, we created a ",(0,n.jsx)(t.code,{children:"register"})," function and passed an ",(0,n.jsx)(t.code,{children:"aspect-ratio"})," parameter to set the page aspect ratio. We get default ",(0,n.jsx)(t.code,{children:"self"})," by ",(0,n.jsx)(t.code,{children:"self: themes.default.register()"}),". As you might already know, in Touying, we should not use ",(0,n.jsx)(t.code,{children:"set page(..)"})," to set page parameters but rather use the syntax ",(0,n.jsx)(t.code,{children:"self.page-args += (..)"})," to set them, as explained in the Page Layout section."]}),"\n",(0,n.jsxs)(t.p,{children:["In addition, we registered a ",(0,n.jsx)(t.code,{children:"self.methods.init"})," method, which can be used for some global style settings. For example, in this case, we added ",(0,n.jsx)(t.code,{children:"set text(size: 20pt)"})," to set the font size. You can also place additional global style settings here, such as ",(0,n.jsx)(t.code,{children:"set par(justify: true)"}),". Since the ",(0,n.jsx)(t.code,{children:"init"})," function is placed inside ",(0,n.jsx)(t.code,{children:"self.methods"}),", it is a method, not a regular function. Therefore, we need to add the parameter ",(0,n.jsx)(t.code,{children:"self: none"})," to use it properly."]}),"\n",(0,n.jsxs)(t.p,{children:["As you can see, later in ",(0,n.jsx)(t.code,{children:"main.typ"}),", we apply the global style settings in ",(0,n.jsx)(t.code,{children:"init"})," using ",(0,n.jsx)(t.code,{children:"#show: init"}),", where ",(0,n.jsx)(t.code,{children:"init"})," is bound and unpacked through ",(0,n.jsx)(t.code,{children:"utils.methods(s)"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["If you pay extra attention, you'll notice that the ",(0,n.jsx)(t.code,{children:"register"})," function has an independent ",(0,n.jsx)(t.code,{children:"self"})," at the end. This actually represents returning the modified ",(0,n.jsx)(t.code,{children:"self"})," as the return value, which will be saved in ",(0,n.jsx)(t.code,{children:"#let s = .."}),". This line is therefore indispensable."]}),"\n",(0,n.jsx)(t.h2,{id:"color-theme",children:"Color Theme"}),"\n",(0,n.jsxs)(t.p,{children:["Choosing an attractive color theme for your slides is crucial. Touying provides built-in color theme support to minimize API differences between different themes. Touying offers two dimensions of color selection: the first is ",(0,n.jsx)(t.code,{children:"neutral"}),", ",(0,n.jsx)(t.code,{children:"primary"}),", ",(0,n.jsx)(t.code,{children:"secondary"}),", and ",(0,n.jsx)(t.code,{children:"tertiary"})," for hue distinction, with ",(0,n.jsx)(t.code,{children:"primary"})," being the most commonly used; the second is ",(0,n.jsx)(t.code,{children:"default"}),", ",(0,n.jsx)(t.code,{children:"light"}),", ",(0,n.jsx)(t.code,{children:"lighter"}),", ",(0,n.jsx)(t.code,{children:"lightest"}),", ",(0,n.jsx)(t.code,{children:"dark"}),", ",(0,n.jsx)(t.code,{children:"darker"}),", and ",(0,n.jsx)(t.code,{children:"darkest"})," for brightness distinction."]}),"\n",(0,n.jsxs)(t.p,{children:["As we are creating the Bamboo theme, we chose a color for the ",(0,n.jsx)(t.code,{children:"primary"})," theme, similar to bamboo (",(0,n.jsx)(t.code,{children:'rgb("#5E8B65")'}),"), and included neutral lightest/darkest as background and font colors."]}),"\n",(0,n.jsxs)(t.p,{children:["As shown in the code below, we use ",(0,n.jsx)(t.code,{children:"(self.methods.colors)(self: self, ..)"})," to modify the color theme. Essentially, it is a wrapper for ",(0,n.jsx)(t.code,{children:"self.colors += (..)"}),"."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n )\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n'})}),"\n",(0,n.jsxs)(t.p,{children:["After adding the color theme, we can access the color using syntax like ",(0,n.jsx)(t.code,{children:"self.colors.primary"}),"."]}),"\n",(0,n.jsx)(t.p,{children:"It's worth noting that users can change the theme color at any time using:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#let s = (s.methods.colors)(self: s, primary: rgb("#3578B9"))\n'})}),"\n",(0,n.jsx)(t.p,{children:"This flexibility demonstrates Touying's powerful customization capabilities."}),"\n",(0,n.jsx)(t.h2,{id:"practical-custom-alert-method",children:"Practical: Custom Alert Method"}),"\n",(0,n.jsxs)(t.p,{children:["In general, we need to provide a ",(0,n.jsx)(t.code,{children:"#alert[..]"})," function for users, similar to ",(0,n.jsx)(t.code,{children:"#strong[..]"}),". Typically, ",(0,n.jsx)(t.code,{children:"#alert[..]"})," emphasizes text using the primary theme color for aesthetics. We add a line in the ",(0,n.jsx)(t.code,{children:"register"})," function:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:"self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n"})}),"\n",(0,n.jsxs)(t.p,{children:["This code sets the text color to ",(0,n.jsx)(t.code,{children:"self.colors.primary"}),", utilizing the theme's primary color."]}),"\n",(0,n.jsx)(t.h2,{id:"custom-header-and-footer",children:"Custom Header and Footer"}),"\n",(0,n.jsx)(t.p,{children:"Here, assuming you've already read the Page Layout section, we know we should add headers and footers to the slides."}),"\n",(0,n.jsxs)(t.p,{children:["Firstly, we add ",(0,n.jsx)(t.code,{children:"self.bamboo-title = []"}),". This means we save the title of the current slide as a member variable ",(0,n.jsx)(t.code,{children:"self.bamboo-title"}),", stored in ",(0,n.jsx)(t.code,{children:"self"}),". This makes it easy to use in the header and later modifications. Similarly, we create ",(0,n.jsx)(t.code,{children:"self.bamboo-footer"}),", saving the ",(0,n.jsx)(t.code,{children:"footer: []"})," parameter from the ",(0,n.jsx)(t.code,{children:"register"})," function for displaying in the bottom-left corner."]}),"\n",(0,n.jsxs)(t.p,{children:["It's worth noting that our header is actually a content function in the form of ",(0,n.jsx)(t.code,{children:"let header(self) = { .. }"})," with the ",(0,n.jsx)(t.code,{children:"self"})," parameter, allowing us to get the latest information from ",(0,n.jsx)(t.code,{children:"self"}),". For example, ",(0,n.jsx)(t.code,{children:"self.bamboo-title"}),". The footer is similar."]}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"components.cell"})," used inside is actually ",(0,n.jsx)(t.code,{children:"#let cell = block.with(width: 100%, height: 100%, above: 0pt, below: 0pt, breakable: false)"}),", and ",(0,n.jsx)(t.code,{children:"show: components.cell"})," is shorthand for ",(0,n.jsx)(t.code,{children:"components.cell(body)"}),". The ",(0,n.jsx)(t.code,{children:"show: pad.with(.4em)"})," in the footer is similar."]}),"\n",(0,n.jsxs)(t.p,{children:["Another point to note is the ",(0,n.jsx)(t.code,{children:"states"})," module, which contains many counters and state-related content. For example, ",(0,n.jsx)(t.code,{children:"states.current-section-title"})," is used to display the current ",(0,n.jsx)(t.code,{children:"section"}),", and ",(0,n.jsx)(t.code,{children:'states.slide-counter.display() + " / " + states.last-slide-number'})," is used to display the current page number and total number of pages."]}),"\n",(0,n.jsxs)(t.p,{children:["We observe the usage of ",(0,n.jsx)(t.code,{children:"utils.call-or-display(self, self.bamboo-footer)"})," to display ",(0,n.jsx)(t.code,{children:"self.bamboo-footer"}),". This is used to handle situations like ",(0,n.jsx)(t.code,{children:"self.bamboo-footer = (self) => {..}"}),", ensuring a unified approach to displaying content functions and content."]}),"\n",(0,n.jsxs)(t.p,{children:["To ensure proper display of the header and footer and sufficient spacing from the main content, we also set top and bottom margins and left and right padding, such as ",(0,n.jsx)(t.code,{children:"self.page-args += (margin: (top: 4em, bottom: 1.5em, x: 0em))"})," and ",(0,n.jsx)(t.code,{children:"self.padding = (x: 2em, y: 0em)"}),". The left and right margin is ",(0,n.jsx)(t.code,{children:"0em"})," to allow the header to occupy the full page width. The left and right spacing of the main content is achieved through left and right padding of ",(0,n.jsx)(t.code,{children:"2em"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["We also need to customize a ",(0,n.jsx)(t.code,{children:"slide"})," method that accepts ",(0,n.jsx)(t.code,{children:"slide(self: none, title: auto, ..args)"}),". The first ",(0,n.jsx)(t.code,{children:"self: none"})," is a required method parameter for getting the latest ",(0,n.jsx)(t.code,{children:"self"}),". The second ",(0,n.jsx)(t.code,{children:"title"})," is used to update ",(0,n.jsx)(t.code,{children:"self.bamboo-title"})," for displaying in the header. The third ",(0,n.jsx)(t.code,{children:"..args"})," collects the remaining parameters and passes them to ",(0,n.jsx)(t.code,{children:"(self.methods.touying-slide)(self: self, ..args)"}),", which is necessary for the Touying ",(0,n.jsx)(t.code,{children:"slide"})," functionality to work properly. Additionally, we need to register this method in the ",(0,n.jsx)(t.code,{children:"register"})," function with ",(0,n.jsx)(t.code,{children:"self.methods.slide = slide"}),"."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let slide(self: none, title: auto, ..args) = {\n if title != auto {\n self.bamboo-title = title\n }\n (self.methods.touying-slide)(self: self, ..args)\n}\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n footer: [],\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n // variables for later use\n self.bamboo-title = []\n self.bamboo-footer = footer\n // set page\n let header(self) = {\n set align(top)\n show: components.cell.with(fill: self.colors.primary, inset: 1em)\n set align(horizon)\n set text(fill: self.colors.neutral-lightest, size: .7em)\n states.current-section-title\n linebreak()\n set text(size: 1.5em)\n utils.call-or-display(self, self.bamboo-title)\n }\n let footer(self) = {\n set align(bottom)\n show: pad.with(.4em)\n set text(fill: self.colors.neutral-darkest, size: .8em)\n utils.call-or-display(self, self.bamboo-footer)\n h(1fr)\n states.slide-counter.display() + " / " + states.last-slide-number\n }\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n header: header,\n footer: footer,\n margin: (top: 4em, bottom: 1.5em, x: 0em),\n )\n self.padding = (x: 2em, y: 0em)\n // register methods\n self.methods.slide = slide\n self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9", footer: self => self.info.institution)\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n'})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:"https://github.com/touying-typ/touying/assets/34951714/d33bcda7-c032-4b11-b392-5b939d9a0a47",alt:"image"})}),"\n",(0,n.jsx)(t.h2,{id:"custom-special-slide",children:"Custom Special Slide"}),"\n",(0,n.jsxs)(t.p,{children:["Building upon the basic slide, we further add some special slide functions such as ",(0,n.jsx)(t.code,{children:"title-slide"}),", ",(0,n.jsx)(t.code,{children:"focus-slide"}),", and a custom ",(0,n.jsx)(t.code,{children:"slides"})," method."]}),"\n",(0,n.jsxs)(t.p,{children:["For the ",(0,n.jsx)(t.code,{children:"title-slide"})," method, first, we call ",(0,n.jsx)(t.code,{children:"self = utils.empty-page(self)"}),". This function clears ",(0,n.jsx)(t.code,{children:"self.page-args.header"}),", ",(0,n.jsx)(t.code,{children:"self.page-args.footer"}),", and sets ",(0,n.jsx)(t.code,{children:"margin"})," and ",(0,n.jsx)(t.code,{children:"padding"})," to ",(0,n.jsx)(t.code,{children:"0em"}),", creating a blank page effect. Then, we use ",(0,n.jsx)(t.code,{children:"let info = self.info + args.named()"})," to get information stored in ",(0,n.jsx)(t.code,{children:"self.info"})," and update it with the passed ",(0,n.jsx)(t.code,{children:"args.named()"})," for later use as ",(0,n.jsx)(t.code,{children:"info.title"}),". The specific page content ",(0,n.jsx)(t.code,{children:"body"})," will vary for each theme, so we won't go into details here. Finally, we call `(self.methods.touying-slide)(self: self, repeat: none, body"]}),"\n",(0,n.jsxs)(t.p,{children:[")",(0,n.jsx)(t.code,{children:", where "}),"repeat: none",(0,n.jsx)(t.code,{children:"indicates that this page does not require animation effects, and passing the"}),"body` parameter displays its content."]}),"\n",(0,n.jsxs)(t.p,{children:["For the ",(0,n.jsx)(t.code,{children:"new-section-slide"})," method, the process is similar. The only thing to note is that in ",(0,n.jsx)(t.code,{children:"(self.methods.touying-slide)(self: self, repeat: none, section: section, body)"}),", we pass an additional ",(0,n.jsx)(t.code,{children:"section: section"})," parameter to declare the creation of a new section. Another point to note is that besides ",(0,n.jsx)(t.code,{children:"self.methods.new-section-slide = new-section-slide"}),", we also register ",(0,n.jsx)(t.code,{children:"self.methods.touying-new-section-slide = new-section-slide"}),", so ",(0,n.jsx)(t.code,{children:"new-section-slide"})," will be automatically called when encountering a first-level title."]}),"\n",(0,n.jsxs)(t.p,{children:["For the ",(0,n.jsx)(t.code,{children:"focus-slide"})," method, most of the content is similar, but it's worth noting that we use ",(0,n.jsx)(t.code,{children:"self.page-args += (..)"})," to update the page's background color."]}),"\n",(0,n.jsxs)(t.p,{children:["Finally, we update the ",(0,n.jsx)(t.code,{children:"slides(self: none, title-slide: true, slide-level: 1, ..args)"})," method. When ",(0,n.jsx)(t.code,{children:"title-slide"})," is ",(0,n.jsx)(t.code,{children:"true"}),", using ",(0,n.jsx)(t.code,{children:"#show: slides"})," will automatically create a ",(0,n.jsx)(t.code,{children:"title-slide"}),". Setting ",(0,n.jsx)(t.code,{children:"slide-level: 1"})," indicates that the first-level and second-level titles correspond to ",(0,n.jsx)(t.code,{children:"section"})," and ",(0,n.jsx)(t.code,{children:"title"}),", respectively."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let slide(self: none, title: auto, ..args) = {\n if title != auto {\n self.bamboo-title = title\n }\n (self.methods.touying-slide)(self: self, ..args)\n}\n\n#let title-slide(self: none, ..args) = {\n self = utils.empty-page(self)\n let info = self.info + args.named()\n let body = {\n set align(center + horizon)\n block(\n fill: self.colors.primary,\n width: 80%,\n inset: (y: 1em),\n radius: 1em,\n text(size: 2em, fill: self.colors.neutral-lightest, weight: "bold", info.title)\n )\n set text(fill: self.colors.neutral-darkest)\n if info.author != none {\n block(info.author)\n }\n if info.date != none {\n block(if type(info.date) == datetime { info.date.display(self.datetime-format) } else { info.date })\n }\n }\n (self.methods.touying-slide)(self: self, repeat: none, body)\n}\n\n#let new-section-slide(self: none, section) = {\n self = utils.empty-page(self)\n let body = {\n set align(center + horizon)\n set text(size: 2em, fill: self.colors.primary, weight: "bold", style: "italic")\n section\n }\n (self.methods.touying-slide)(self: self, repeat: none, section: section, body)\n}\n\n#let focus-slide(self: none, body) = {\n self = utils.empty-page(self)\n self.page-args += (\n fill: self.colors.primary,\n margin: 2em,\n )\n set text(fill: self.colors.neutral-lightest, size: 2em)\n (self.methods.touying-slide)(self: self, repeat: none, align(horizon + center, body))\n}\n\n#let slides(self: none, title-slide: true, slide-level: 1, ..args) = {\n if title-slide {\n (self.methods.title-slide)(self: self)\n }\n (self.methods.touying-slides)(self: self, slide-level: slide-level, ..args)\n}\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n footer: [],\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n // variables for later use\n self.bamboo-title = []\n self.bamboo-footer = footer\n // set page\n let header(self) = {\n set align(top)\n show: components.cell.with(fill: self.colors.primary, inset: 1em)\n set align(horizon)\n set text(fill: self.colors.neutral-lightest, size: .7em)\n states.current-section-title\n linebreak()\n set text(size: 1.5em)\n utils.call-or-display(self, self.bamboo-title)\n }\n let footer(self) = {\n set align(bottom)\n show: pad.with(.4em)\n set text(fill: self.colors.neutral-darkest, size: .8em)\n utils.call-or-display(self, self.bamboo-footer)\n h(1fr)\n states.slide-counter.display() + " / " + states.last-slide-number\n }\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n header: header,\n footer: footer,\n margin: (top: 4em, bottom: 1.5em, x: 0em),\n )\n self.padding = (x: 2em, y: 0em)\n // register methods\n self.methods.slide = slide\n self.methods.title-slide = title-slide\n self.methods.new-section-slide = new-section-slide\n self.methods.touying-new-section-slide = new-section-slide\n self.methods.focus-slide = focus-slide\n self.methods.slides = slides\n self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9", footer: self => self.info.institution)\n#let s = (s.methods.info)(\n self: s,\n title: [Title],\n subtitle: [Subtitle],\n author: [Authors],\n date: datetime.today(),\n institution: [Institution],\n)\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide, title-slide, focus-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n\n#focus-slide[\n Focus on it!\n]\n'})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:"https://github.com/touying-typ/touying/assets/34951714/03c5ad02-8ff4-4068-9664-d9cfad79baaf",alt:"image"})}),"\n",(0,n.jsx)(t.h2,{id:"conclusion",children:"Conclusion"}),"\n",(0,n.jsx)(t.p,{children:"Congratulations! You've created a simple and elegant theme. Perhaps you may find that Touying introduces a wealth of concepts, making it initially challenging to grasp. This is normal, as Touying opts for functionality over simplicity. However, thanks to Touying's comprehensive and unified approach, you can easily extract commonalities between different themes and transfer your knowledge seamlessly. You can also save global variables, modify existing themes, or switch between themes effortlessly, showcasing the benefits of Touying's decoupling and object-oriented programming."})]})}function h(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},1151:(e,t,s)=>{s.d(t,{Z:()=>r,a:()=>l});var n=s(7294);const i={},o=n.createContext(i);function l(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5526],{2382:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>a});var n=s(5893),i=s(1151);const o={sidebar_position:10},l="Creating Your Own Theme",r={id:"build-your-own-theme",title:"Creating Your Own Theme",description:"Creating your own theme with Touying might seem a bit complex initially due to the introduction of various concepts. However, fear not; if you successfully create a custom theme with Touying, you'll likely experience the convenience and powerful customization features it offers. You can refer to the source code of existing themes for guidance. The key steps to implement are:",source:"@site/versioned_docs/version-0.3.2+/build-your-own-theme.md",sourceDirName:".",slug:"/build-your-own-theme",permalink:"/touying/docs/build-your-own-theme",draft:!1,unlisted:!1,editUrl:"https://github.com/touying-typ/touying/tree/main/docs/versioned_docs/version-0.3.2+/build-your-own-theme.md",tags:[],version:"0.3.2+",sidebarPosition:10,frontMatter:{sidebar_position:10},sidebar:"tutorialSidebar",previous:{title:"Aqua Theme",permalink:"/touying/docs/themes/aqua"},next:{title:"Progress",permalink:"/touying/docs/category/progress"}},d={},a=[{value:"Modifying Existing Themes",id:"modifying-existing-themes",level:2},{value:"Import",id:"import",level:2},{value:"Register Function and Init Method",id:"register-function-and-init-method",level:2},{value:"Color Theme",id:"color-theme",level:2},{value:"Practical: Custom Alert Method",id:"practical-custom-alert-method",level:2},{value:"Custom Header and Footer",id:"custom-header-and-footer",level:2},{value:"Custom Special Slide",id:"custom-special-slide",level:2},{value:"Conclusion",id:"conclusion",level:2}];function c(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"creating-your-own-theme",children:"Creating Your Own Theme"}),"\n",(0,n.jsxs)(t.p,{children:["Creating your own theme with Touying might seem a bit complex initially due to the introduction of various concepts. However, fear not; if you successfully create a custom theme with Touying, you'll likely experience the convenience and powerful customization features it offers. You can refer to the ",(0,n.jsx)(t.a,{href:"https://github.com/touying-typ/touying/tree/main/themes",children:"source code of existing themes"})," for guidance. The key steps to implement are:"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"register"})," function to initialize the global singleton ",(0,n.jsx)(t.code,{children:"s"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"init"})," method."]}),"\n",(0,n.jsxs)(t.li,{children:["Define a color theme by modifying the ",(0,n.jsx)(t.code,{children:"self.colors"})," member variable."]}),"\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"alert"})," method (optional)."]}),"\n",(0,n.jsx)(t.li,{children:"Customize the header."}),"\n",(0,n.jsx)(t.li,{children:"Customize the footer."}),"\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"slide"})," method."]}),"\n",(0,n.jsxs)(t.li,{children:["Customize special slide methods, such as ",(0,n.jsx)(t.code,{children:"title-slide"})," and ",(0,n.jsx)(t.code,{children:"focus-slide"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"slides"})," method (optional)."]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"To demonstrate creating a simple and elegant Bamboo theme, let's follow the steps."}),"\n",(0,n.jsx)(t.h2,{id:"modifying-existing-themes",children:"Modifying Existing Themes"}),"\n",(0,n.jsx)(t.p,{children:"If you wish to modify a theme within the Touying framework locally instead of creating one from scratch, you can achieve this by following these steps:"}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["Copy the ",(0,n.jsx)(t.a,{href:"https://github.com/touying-typ/touying/tree/main/themes",children:"theme code"})," from the ",(0,n.jsx)(t.code,{children:"themes"})," directory to your local machine. For example, copy ",(0,n.jsx)(t.code,{children:"themes/university.typ"})," to a local file named ",(0,n.jsx)(t.code,{children:"university.typ"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Remove all ",(0,n.jsx)(t.code,{children:'#import "../xxx.typ"'})," commands at the top of the ",(0,n.jsx)(t.code,{children:"university.typ"})," file."]}),"\n",(0,n.jsxs)(t.li,{children:["Add ",(0,n.jsx)(t.code,{children:'#import "@preview/touying:0.3.3": *'})," at the top of the ",(0,n.jsx)(t.code,{children:"university.typ"})," file to import all modules."]}),"\n",(0,n.jsxs)(t.li,{children:["Replace ",(0,n.jsx)(t.code,{children:"self: s"})," in the ",(0,n.jsx)(t.code,{children:"register"})," function with ",(0,n.jsx)(t.code,{children:"self: themes.default.register()"})," ",(0,n.jsx)(t.strong,{children:"(Important)"}),"."]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"You can then import and use the theme by:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#import "@preview/touying:0.3.3": *\n#import "university.typ"\n\n#let s = university.register(aspect-ratio: "16-9")\n'})}),"\n",(0,n.jsxs)(t.p,{children:["For a specific example, refer to: ",(0,n.jsx)(t.a,{href:"https://typst.app/project/rqRuzg0keo_ZEB5AdxjweA",children:"https://typst.app/project/rqRuzg0keo_ZEB5AdxjweA"})]}),"\n",(0,n.jsx)(t.h2,{id:"import",children:"Import"}),"\n",(0,n.jsx)(t.p,{children:"Depending on whether the theme is for personal use or part of Touying, you can import in two ways:"}),"\n",(0,n.jsx)(t.p,{children:"If for personal use:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#import "@preview/touying:0.3.3": *\n'})}),"\n",(0,n.jsx)(t.p,{children:"If part of Touying themes:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#import "../utils/utils.typ"\n#import "../utils/states.typ"\n#import "../utils/components.typ"\n'})}),"\n",(0,n.jsxs)(t.p,{children:["Additionally, add the import statement in Touying's ",(0,n.jsx)(t.code,{children:"themes/themes.typ"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:'#import "bamboo.typ"\n'})}),"\n",(0,n.jsx)(t.h2,{id:"register-function-and-init-method",children:"Register Function and Init Method"}),"\n",(0,n.jsx)(t.p,{children:"Next, we'll distinguish between the bamboo.typ template file and the main.typ file, the latter of which is sometimes omitted."}),"\n",(0,n.jsx)(t.p,{children:"Generally, the first step in creating slides is to determine font size and page aspect ratio. Therefore, we need to register an initialization method:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n) = {\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n )\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9")\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n'})}),"\n",(0,n.jsxs)(t.p,{children:["As you can see, we created a ",(0,n.jsx)(t.code,{children:"register"})," function and passed an ",(0,n.jsx)(t.code,{children:"aspect-ratio"})," parameter to set the page aspect ratio. We get default ",(0,n.jsx)(t.code,{children:"self"})," by ",(0,n.jsx)(t.code,{children:"self: themes.default.register()"}),". As you might already know, in Touying, we should not use ",(0,n.jsx)(t.code,{children:"set page(..)"})," to set page parameters but rather use the syntax ",(0,n.jsx)(t.code,{children:"self.page-args += (..)"})," to set them, as explained in the Page Layout section."]}),"\n",(0,n.jsxs)(t.p,{children:["In addition, we registered a ",(0,n.jsx)(t.code,{children:"self.methods.init"})," method, which can be used for some global style settings. For example, in this case, we added ",(0,n.jsx)(t.code,{children:"set text(size: 20pt)"})," to set the font size. You can also place additional global style settings here, such as ",(0,n.jsx)(t.code,{children:"set par(justify: true)"}),". Since the ",(0,n.jsx)(t.code,{children:"init"})," function is placed inside ",(0,n.jsx)(t.code,{children:"self.methods"}),", it is a method, not a regular function. Therefore, we need to add the parameter ",(0,n.jsx)(t.code,{children:"self: none"})," to use it properly."]}),"\n",(0,n.jsxs)(t.p,{children:["As you can see, later in ",(0,n.jsx)(t.code,{children:"main.typ"}),", we apply the global style settings in ",(0,n.jsx)(t.code,{children:"init"})," using ",(0,n.jsx)(t.code,{children:"#show: init"}),", where ",(0,n.jsx)(t.code,{children:"init"})," is bound and unpacked through ",(0,n.jsx)(t.code,{children:"utils.methods(s)"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["If you pay extra attention, you'll notice that the ",(0,n.jsx)(t.code,{children:"register"})," function has an independent ",(0,n.jsx)(t.code,{children:"self"})," at the end. This actually represents returning the modified ",(0,n.jsx)(t.code,{children:"self"})," as the return value, which will be saved in ",(0,n.jsx)(t.code,{children:"#let s = .."}),". This line is therefore indispensable."]}),"\n",(0,n.jsx)(t.h2,{id:"color-theme",children:"Color Theme"}),"\n",(0,n.jsxs)(t.p,{children:["Choosing an attractive color theme for your slides is crucial. Touying provides built-in color theme support to minimize API differences between different themes. Touying offers two dimensions of color selection: the first is ",(0,n.jsx)(t.code,{children:"neutral"}),", ",(0,n.jsx)(t.code,{children:"primary"}),", ",(0,n.jsx)(t.code,{children:"secondary"}),", and ",(0,n.jsx)(t.code,{children:"tertiary"})," for hue distinction, with ",(0,n.jsx)(t.code,{children:"primary"})," being the most commonly used; the second is ",(0,n.jsx)(t.code,{children:"default"}),", ",(0,n.jsx)(t.code,{children:"light"}),", ",(0,n.jsx)(t.code,{children:"lighter"}),", ",(0,n.jsx)(t.code,{children:"lightest"}),", ",(0,n.jsx)(t.code,{children:"dark"}),", ",(0,n.jsx)(t.code,{children:"darker"}),", and ",(0,n.jsx)(t.code,{children:"darkest"})," for brightness distinction."]}),"\n",(0,n.jsxs)(t.p,{children:["As we are creating the Bamboo theme, we chose a color for the ",(0,n.jsx)(t.code,{children:"primary"})," theme, similar to bamboo (",(0,n.jsx)(t.code,{children:'rgb("#5E8B65")'}),"), and included neutral lightest/darkest as background and font colors."]}),"\n",(0,n.jsxs)(t.p,{children:["As shown in the code below, we use ",(0,n.jsx)(t.code,{children:"(self.methods.colors)(self: self, ..)"})," to modify the color theme. Essentially, it is a wrapper for ",(0,n.jsx)(t.code,{children:"self.colors += (..)"}),"."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n )\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n'})}),"\n",(0,n.jsxs)(t.p,{children:["After adding the color theme, we can access the color using syntax like ",(0,n.jsx)(t.code,{children:"self.colors.primary"}),"."]}),"\n",(0,n.jsx)(t.p,{children:"It's worth noting that users can change the theme color at any time using:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#let s = (s.methods.colors)(self: s, primary: rgb("#3578B9"))\n'})}),"\n",(0,n.jsx)(t.p,{children:"This flexibility demonstrates Touying's powerful customization capabilities."}),"\n",(0,n.jsx)(t.h2,{id:"practical-custom-alert-method",children:"Practical: Custom Alert Method"}),"\n",(0,n.jsxs)(t.p,{children:["In general, we need to provide a ",(0,n.jsx)(t.code,{children:"#alert[..]"})," function for users, similar to ",(0,n.jsx)(t.code,{children:"#strong[..]"}),". Typically, ",(0,n.jsx)(t.code,{children:"#alert[..]"})," emphasizes text using the primary theme color for aesthetics. We add a line in the ",(0,n.jsx)(t.code,{children:"register"})," function:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:"self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n"})}),"\n",(0,n.jsxs)(t.p,{children:["This code sets the text color to ",(0,n.jsx)(t.code,{children:"self.colors.primary"}),", utilizing the theme's primary color."]}),"\n",(0,n.jsx)(t.h2,{id:"custom-header-and-footer",children:"Custom Header and Footer"}),"\n",(0,n.jsx)(t.p,{children:"Here, assuming you've already read the Page Layout section, we know we should add headers and footers to the slides."}),"\n",(0,n.jsxs)(t.p,{children:["Firstly, we add ",(0,n.jsx)(t.code,{children:"self.bamboo-title = []"}),". This means we save the title of the current slide as a member variable ",(0,n.jsx)(t.code,{children:"self.bamboo-title"}),", stored in ",(0,n.jsx)(t.code,{children:"self"}),". This makes it easy to use in the header and later modifications. Similarly, we create ",(0,n.jsx)(t.code,{children:"self.bamboo-footer"}),", saving the ",(0,n.jsx)(t.code,{children:"footer: []"})," parameter from the ",(0,n.jsx)(t.code,{children:"register"})," function for displaying in the bottom-left corner."]}),"\n",(0,n.jsxs)(t.p,{children:["It's worth noting that our header is actually a content function in the form of ",(0,n.jsx)(t.code,{children:"let header(self) = { .. }"})," with the ",(0,n.jsx)(t.code,{children:"self"})," parameter, allowing us to get the latest information from ",(0,n.jsx)(t.code,{children:"self"}),". For example, ",(0,n.jsx)(t.code,{children:"self.bamboo-title"}),". The footer is similar."]}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"components.cell"})," used inside is actually ",(0,n.jsx)(t.code,{children:"#let cell = block.with(width: 100%, height: 100%, above: 0pt, below: 0pt, breakable: false)"}),", and ",(0,n.jsx)(t.code,{children:"show: components.cell"})," is shorthand for ",(0,n.jsx)(t.code,{children:"components.cell(body)"}),". The ",(0,n.jsx)(t.code,{children:"show: pad.with(.4em)"})," in the footer is similar."]}),"\n",(0,n.jsxs)(t.p,{children:["Another point to note is the ",(0,n.jsx)(t.code,{children:"states"})," module, which contains many counters and state-related content. For example, ",(0,n.jsx)(t.code,{children:"states.current-section-title"})," is used to display the current ",(0,n.jsx)(t.code,{children:"section"}),", and ",(0,n.jsx)(t.code,{children:'states.slide-counter.display() + " / " + states.last-slide-number'})," is used to display the current page number and total number of pages."]}),"\n",(0,n.jsxs)(t.p,{children:["We observe the usage of ",(0,n.jsx)(t.code,{children:"utils.call-or-display(self, self.bamboo-footer)"})," to display ",(0,n.jsx)(t.code,{children:"self.bamboo-footer"}),". This is used to handle situations like ",(0,n.jsx)(t.code,{children:"self.bamboo-footer = (self) => {..}"}),", ensuring a unified approach to displaying content functions and content."]}),"\n",(0,n.jsxs)(t.p,{children:["To ensure proper display of the header and footer and sufficient spacing from the main content, we also set top and bottom margins and left and right padding, such as ",(0,n.jsx)(t.code,{children:"self.page-args += (margin: (top: 4em, bottom: 1.5em, x: 0em))"})," and ",(0,n.jsx)(t.code,{children:"self.padding = (x: 2em, y: 0em)"}),". The left and right margin is ",(0,n.jsx)(t.code,{children:"0em"})," to allow the header to occupy the full page width. The left and right spacing of the main content is achieved through left and right padding of ",(0,n.jsx)(t.code,{children:"2em"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["We also need to customize a ",(0,n.jsx)(t.code,{children:"slide"})," method that accepts ",(0,n.jsx)(t.code,{children:"slide(self: none, title: auto, ..args)"}),". The first ",(0,n.jsx)(t.code,{children:"self: none"})," is a required method parameter for getting the latest ",(0,n.jsx)(t.code,{children:"self"}),". The second ",(0,n.jsx)(t.code,{children:"title"})," is used to update ",(0,n.jsx)(t.code,{children:"self.bamboo-title"})," for displaying in the header. The third ",(0,n.jsx)(t.code,{children:"..args"})," collects the remaining parameters and passes them to ",(0,n.jsx)(t.code,{children:"(self.methods.touying-slide)(self: self, ..args)"}),", which is necessary for the Touying ",(0,n.jsx)(t.code,{children:"slide"})," functionality to work properly. Additionally, we need to register this method in the ",(0,n.jsx)(t.code,{children:"register"})," function with ",(0,n.jsx)(t.code,{children:"self.methods.slide = slide"}),"."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let slide(self: none, title: auto, ..args) = {\n if title != auto {\n self.bamboo-title = title\n }\n (self.methods.touying-slide)(self: self, ..args)\n}\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n footer: [],\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n // variables for later use\n self.bamboo-title = []\n self.bamboo-footer = footer\n // set page\n let header(self) = {\n set align(top)\n show: components.cell.with(fill: self.colors.primary, inset: 1em)\n set align(horizon)\n set text(fill: self.colors.neutral-lightest, size: .7em)\n states.current-section-title\n linebreak()\n set text(size: 1.5em)\n utils.call-or-display(self, self.bamboo-title)\n }\n let footer(self) = {\n set align(bottom)\n show: pad.with(.4em)\n set text(fill: self.colors.neutral-darkest, size: .8em)\n utils.call-or-display(self, self.bamboo-footer)\n h(1fr)\n states.slide-counter.display() + " / " + states.last-slide-number\n }\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n header: header,\n footer: footer,\n margin: (top: 4em, bottom: 1.5em, x: 0em),\n )\n self.padding = (x: 2em, y: 0em)\n // register methods\n self.methods.slide = slide\n self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9", footer: self => self.info.institution)\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n'})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:"https://github.com/touying-typ/touying/assets/34951714/d33bcda7-c032-4b11-b392-5b939d9a0a47",alt:"image"})}),"\n",(0,n.jsx)(t.h2,{id:"custom-special-slide",children:"Custom Special Slide"}),"\n",(0,n.jsxs)(t.p,{children:["Building upon the basic slide, we further add some special slide functions such as ",(0,n.jsx)(t.code,{children:"title-slide"}),", ",(0,n.jsx)(t.code,{children:"focus-slide"}),", and a custom ",(0,n.jsx)(t.code,{children:"slides"})," method."]}),"\n",(0,n.jsxs)(t.p,{children:["For the ",(0,n.jsx)(t.code,{children:"title-slide"})," method, first, we call ",(0,n.jsx)(t.code,{children:"self = utils.empty-page(self)"}),". This function clears ",(0,n.jsx)(t.code,{children:"self.page-args.header"}),", ",(0,n.jsx)(t.code,{children:"self.page-args.footer"}),", and sets ",(0,n.jsx)(t.code,{children:"margin"})," and ",(0,n.jsx)(t.code,{children:"padding"})," to ",(0,n.jsx)(t.code,{children:"0em"}),", creating a blank page effect. Then, we use ",(0,n.jsx)(t.code,{children:"let info = self.info + args.named()"})," to get information stored in ",(0,n.jsx)(t.code,{children:"self.info"})," and update it with the passed ",(0,n.jsx)(t.code,{children:"args.named()"})," for later use as ",(0,n.jsx)(t.code,{children:"info.title"}),". The specific page content ",(0,n.jsx)(t.code,{children:"body"})," will vary for each theme, so we won't go into details here. Finally, we call `(self.methods.touying-slide)(self: self, repeat: none, body"]}),"\n",(0,n.jsxs)(t.p,{children:[")",(0,n.jsx)(t.code,{children:", where "}),"repeat: none",(0,n.jsx)(t.code,{children:"indicates that this page does not require animation effects, and passing the"}),"body` parameter displays its content."]}),"\n",(0,n.jsxs)(t.p,{children:["For the ",(0,n.jsx)(t.code,{children:"new-section-slide"})," method, the process is similar. The only thing to note is that in ",(0,n.jsx)(t.code,{children:"(self.methods.touying-slide)(self: self, repeat: none, section: section, body)"}),", we pass an additional ",(0,n.jsx)(t.code,{children:"section: section"})," parameter to declare the creation of a new section. Another point to note is that besides ",(0,n.jsx)(t.code,{children:"self.methods.new-section-slide = new-section-slide"}),", we also register ",(0,n.jsx)(t.code,{children:"self.methods.touying-new-section-slide = new-section-slide"}),", so ",(0,n.jsx)(t.code,{children:"new-section-slide"})," will be automatically called when encountering a first-level title."]}),"\n",(0,n.jsxs)(t.p,{children:["For the ",(0,n.jsx)(t.code,{children:"focus-slide"})," method, most of the content is similar, but it's worth noting that we use ",(0,n.jsx)(t.code,{children:"self.page-args += (..)"})," to update the page's background color."]}),"\n",(0,n.jsxs)(t.p,{children:["Finally, we update the ",(0,n.jsx)(t.code,{children:"slides(self: none, title-slide: true, slide-level: 1, ..args)"})," method. When ",(0,n.jsx)(t.code,{children:"title-slide"})," is ",(0,n.jsx)(t.code,{children:"true"}),", using ",(0,n.jsx)(t.code,{children:"#show: slides"})," will automatically create a ",(0,n.jsx)(t.code,{children:"title-slide"}),". Setting ",(0,n.jsx)(t.code,{children:"slide-level: 1"})," indicates that the first-level and second-level titles correspond to ",(0,n.jsx)(t.code,{children:"section"})," and ",(0,n.jsx)(t.code,{children:"title"}),", respectively."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let slide(self: none, title: auto, ..args) = {\n if title != auto {\n self.bamboo-title = title\n }\n (self.methods.touying-slide)(self: self, ..args)\n}\n\n#let title-slide(self: none, ..args) = {\n self = utils.empty-page(self)\n let info = self.info + args.named()\n let body = {\n set align(center + horizon)\n block(\n fill: self.colors.primary,\n width: 80%,\n inset: (y: 1em),\n radius: 1em,\n text(size: 2em, fill: self.colors.neutral-lightest, weight: "bold", info.title)\n )\n set text(fill: self.colors.neutral-darkest)\n if info.author != none {\n block(info.author)\n }\n if info.date != none {\n block(if type(info.date) == datetime { info.date.display(self.datetime-format) } else { info.date })\n }\n }\n (self.methods.touying-slide)(self: self, repeat: none, body)\n}\n\n#let new-section-slide(self: none, section) = {\n self = utils.empty-page(self)\n let body = {\n set align(center + horizon)\n set text(size: 2em, fill: self.colors.primary, weight: "bold", style: "italic")\n section\n }\n (self.methods.touying-slide)(self: self, repeat: none, section: section, body)\n}\n\n#let focus-slide(self: none, body) = {\n self = utils.empty-page(self)\n self.page-args += (\n fill: self.colors.primary,\n margin: 2em,\n )\n set text(fill: self.colors.neutral-lightest, size: 2em)\n (self.methods.touying-slide)(self: self, repeat: none, align(horizon + center, body))\n}\n\n#let slides(self: none, title-slide: true, slide-level: 1, ..args) = {\n if title-slide {\n (self.methods.title-slide)(self: self)\n }\n (self.methods.touying-slides)(self: self, slide-level: slide-level, ..args)\n}\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n footer: [],\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n // variables for later use\n self.bamboo-title = []\n self.bamboo-footer = footer\n // set page\n let header(self) = {\n set align(top)\n show: components.cell.with(fill: self.colors.primary, inset: 1em)\n set align(horizon)\n set text(fill: self.colors.neutral-lightest, size: .7em)\n states.current-section-title\n linebreak()\n set text(size: 1.5em)\n utils.call-or-display(self, self.bamboo-title)\n }\n let footer(self) = {\n set align(bottom)\n show: pad.with(.4em)\n set text(fill: self.colors.neutral-darkest, size: .8em)\n utils.call-or-display(self, self.bamboo-footer)\n h(1fr)\n states.slide-counter.display() + " / " + states.last-slide-number\n }\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n header: header,\n footer: footer,\n margin: (top: 4em, bottom: 1.5em, x: 0em),\n )\n self.padding = (x: 2em, y: 0em)\n // register methods\n self.methods.slide = slide\n self.methods.title-slide = title-slide\n self.methods.new-section-slide = new-section-slide\n self.methods.touying-new-section-slide = new-section-slide\n self.methods.focus-slide = focus-slide\n self.methods.slides = slides\n self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9", footer: self => self.info.institution)\n#let s = (s.methods.info)(\n self: s,\n title: [Title],\n subtitle: [Subtitle],\n author: [Authors],\n date: datetime.today(),\n institution: [Institution],\n)\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide, title-slide, focus-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n\n#focus-slide[\n Focus on it!\n]\n'})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:"https://github.com/touying-typ/touying/assets/34951714/03c5ad02-8ff4-4068-9664-d9cfad79baaf",alt:"image"})}),"\n",(0,n.jsx)(t.h2,{id:"conclusion",children:"Conclusion"}),"\n",(0,n.jsx)(t.p,{children:"Congratulations! You've created a simple and elegant theme. Perhaps you may find that Touying introduces a wealth of concepts, making it initially challenging to grasp. This is normal, as Touying opts for functionality over simplicity. However, thanks to Touying's comprehensive and unified approach, you can easily extract commonalities between different themes and transfer your knowledge seamlessly. You can also save global variables, modify existing themes, or switch between themes effortlessly, showcasing the benefits of Touying's decoupling and object-oriented programming."})]})}function h(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},1151:(e,t,s)=>{s.d(t,{Z:()=>r,a:()=>l});var n=s(7294);const i={},o=n.createContext(i);function l(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5670b452.4fce949b.js b/assets/js/5670b452.9a520563.js similarity index 99% rename from assets/js/5670b452.4fce949b.js rename to assets/js/5670b452.9a520563.js index 8a5a7112a..053fd8c42 100644 --- a/assets/js/5670b452.4fce949b.js +++ b/assets/js/5670b452.9a520563.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[997],{2261:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>a});var n=s(5893),i=s(1151);const o={sidebar_position:10},l="Creating Your Own Theme",r={id:"build-your-own-theme",title:"Creating Your Own Theme",description:"Creating your own theme with Touying might seem a bit complex initially due to the introduction of various concepts. However, fear not; if you successfully create a custom theme with Touying, you'll likely experience the convenience and powerful customization features it offers. You can refer to the source code of existing themes for guidance. The key steps to implement are:",source:"@site/docs/build-your-own-theme.md",sourceDirName:".",slug:"/build-your-own-theme",permalink:"/touying/docs/next/build-your-own-theme",draft:!1,unlisted:!1,editUrl:"https://github.com/touying-typ/touying/tree/main/docs/docs/build-your-own-theme.md",tags:[],version:"current",sidebarPosition:10,frontMatter:{sidebar_position:10},sidebar:"tutorialSidebar",previous:{title:"Aqua Theme",permalink:"/touying/docs/next/themes/aqua"},next:{title:"Progress",permalink:"/touying/docs/next/category/progress"}},d={},a=[{value:"Modifying Existing Themes",id:"modifying-existing-themes",level:2},{value:"Import",id:"import",level:2},{value:"Register Function and Init Method",id:"register-function-and-init-method",level:2},{value:"Color Theme",id:"color-theme",level:2},{value:"Practical: Custom Alert Method",id:"practical-custom-alert-method",level:2},{value:"Custom Header and Footer",id:"custom-header-and-footer",level:2},{value:"Custom Special Slide",id:"custom-special-slide",level:2},{value:"Conclusion",id:"conclusion",level:2}];function c(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"creating-your-own-theme",children:"Creating Your Own Theme"}),"\n",(0,n.jsxs)(t.p,{children:["Creating your own theme with Touying might seem a bit complex initially due to the introduction of various concepts. However, fear not; if you successfully create a custom theme with Touying, you'll likely experience the convenience and powerful customization features it offers. You can refer to the ",(0,n.jsx)(t.a,{href:"https://github.com/touying-typ/touying/tree/main/themes",children:"source code of existing themes"})," for guidance. The key steps to implement are:"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"register"})," function to initialize the global singleton ",(0,n.jsx)(t.code,{children:"s"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"init"})," method."]}),"\n",(0,n.jsxs)(t.li,{children:["Define a color theme by modifying the ",(0,n.jsx)(t.code,{children:"self.colors"})," member variable."]}),"\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"alert"})," method (optional)."]}),"\n",(0,n.jsx)(t.li,{children:"Customize the header."}),"\n",(0,n.jsx)(t.li,{children:"Customize the footer."}),"\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"slide"})," method."]}),"\n",(0,n.jsxs)(t.li,{children:["Customize special slide methods, such as ",(0,n.jsx)(t.code,{children:"title-slide"})," and ",(0,n.jsx)(t.code,{children:"focus-slide"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"slides"})," method (optional)."]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"To demonstrate creating a simple and elegant Bamboo theme, let's follow the steps."}),"\n",(0,n.jsx)(t.h2,{id:"modifying-existing-themes",children:"Modifying Existing Themes"}),"\n",(0,n.jsx)(t.p,{children:"If you wish to modify a theme within the Touying package locally instead of creating one from scratch, you can achieve this by following these steps:"}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["Copy the ",(0,n.jsx)(t.a,{href:"https://github.com/touying-typ/touying/tree/main/themes",children:"theme code"})," from the ",(0,n.jsx)(t.code,{children:"themes"})," directory to your local machine. For example, copy ",(0,n.jsx)(t.code,{children:"themes/university.typ"})," to a local file named ",(0,n.jsx)(t.code,{children:"university.typ"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Remove all ",(0,n.jsx)(t.code,{children:'#import "../xxx.typ"'})," commands at the top of the ",(0,n.jsx)(t.code,{children:"university.typ"})," file."]}),"\n",(0,n.jsxs)(t.li,{children:["Add ",(0,n.jsx)(t.code,{children:'#import "@preview/touying:0.3.3": *'})," at the top of the ",(0,n.jsx)(t.code,{children:"university.typ"})," file to import all modules."]}),"\n",(0,n.jsxs)(t.li,{children:["Replace ",(0,n.jsx)(t.code,{children:"self: s"})," in the ",(0,n.jsx)(t.code,{children:"register"})," function with ",(0,n.jsx)(t.code,{children:"self: themes.default.register()"})," ",(0,n.jsx)(t.strong,{children:"(Important)"}),"."]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"You can then import and use the theme by:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#import "@preview/touying:0.3.3": *\n#import "university.typ"\n\n#let s = university.register(aspect-ratio: "16-9")\n'})}),"\n",(0,n.jsxs)(t.p,{children:["For a specific example, refer to: ",(0,n.jsx)(t.a,{href:"https://typst.app/project/pdWNTS47I-6jxHrWdMSTLx",children:"https://typst.app/project/pdWNTS47I-6jxHrWdMSTLx"})]}),"\n",(0,n.jsx)(t.h2,{id:"import",children:"Import"}),"\n",(0,n.jsx)(t.p,{children:"Depending on whether the theme is for personal use or part of Touying, you can import in two ways:"}),"\n",(0,n.jsx)(t.p,{children:"If for personal use:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#import "@preview/touying:0.3.3": *\n'})}),"\n",(0,n.jsx)(t.p,{children:"If part of Touying themes:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#import "../utils/utils.typ"\n#import "../utils/states.typ"\n#import "../utils/components.typ"\n'})}),"\n",(0,n.jsxs)(t.p,{children:["Additionally, add the import statement in Touying's ",(0,n.jsx)(t.code,{children:"themes/themes.typ"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:'#import "bamboo.typ"\n'})}),"\n",(0,n.jsx)(t.h2,{id:"register-function-and-init-method",children:"Register Function and Init Method"}),"\n",(0,n.jsx)(t.p,{children:"Next, we'll distinguish between the bamboo.typ template file and the main.typ file, the latter of which is sometimes omitted."}),"\n",(0,n.jsx)(t.p,{children:"Generally, the first step in creating slides is to determine font size and page aspect ratio. Therefore, we need to register an initialization method:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n) = {\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n )\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9")\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n'})}),"\n",(0,n.jsxs)(t.p,{children:["As you can see, we created a ",(0,n.jsx)(t.code,{children:"register"})," function and passed an ",(0,n.jsx)(t.code,{children:"aspect-ratio"})," parameter to set the page aspect ratio. We get default ",(0,n.jsx)(t.code,{children:"self"})," by ",(0,n.jsx)(t.code,{children:"self: themes.default.register()"}),". As you might already know, in Touying, we should not use ",(0,n.jsx)(t.code,{children:"set page(..)"})," to set page parameters but rather use the syntax ",(0,n.jsx)(t.code,{children:"self.page-args += (..)"})," to set them, as explained in the Page Layout section."]}),"\n",(0,n.jsxs)(t.p,{children:["In addition, we registered a ",(0,n.jsx)(t.code,{children:"self.methods.init"})," method, which can be used for some global style settings. For example, in this case, we added ",(0,n.jsx)(t.code,{children:"set text(size: 20pt)"})," to set the font size. You can also place additional global style settings here, such as ",(0,n.jsx)(t.code,{children:"set par(justify: true)"}),". Since the ",(0,n.jsx)(t.code,{children:"init"})," function is placed inside ",(0,n.jsx)(t.code,{children:"self.methods"}),", it is a method, not a regular function. Therefore, we need to add the parameter ",(0,n.jsx)(t.code,{children:"self: none"})," to use it properly."]}),"\n",(0,n.jsxs)(t.p,{children:["As you can see, later in ",(0,n.jsx)(t.code,{children:"main.typ"}),", we apply the global style settings in ",(0,n.jsx)(t.code,{children:"init"})," using ",(0,n.jsx)(t.code,{children:"#show: init"}),", where ",(0,n.jsx)(t.code,{children:"init"})," is bound and unpacked through ",(0,n.jsx)(t.code,{children:"utils.methods(s)"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["If you pay extra attention, you'll notice that the ",(0,n.jsx)(t.code,{children:"register"})," function has an independent ",(0,n.jsx)(t.code,{children:"self"})," at the end. This actually represents returning the modified ",(0,n.jsx)(t.code,{children:"self"})," as the return value, which will be saved in ",(0,n.jsx)(t.code,{children:"#let s = .."}),". This line is therefore indispensable."]}),"\n",(0,n.jsx)(t.h2,{id:"color-theme",children:"Color Theme"}),"\n",(0,n.jsxs)(t.p,{children:["Choosing an attractive color theme for your slides is crucial. Touying provides built-in color theme support to minimize API differences between different themes. Touying offers two dimensions of color selection: the first is ",(0,n.jsx)(t.code,{children:"neutral"}),", ",(0,n.jsx)(t.code,{children:"primary"}),", ",(0,n.jsx)(t.code,{children:"secondary"}),", and ",(0,n.jsx)(t.code,{children:"tertiary"})," for hue distinction, with ",(0,n.jsx)(t.code,{children:"primary"})," being the most commonly used; the second is ",(0,n.jsx)(t.code,{children:"default"}),", ",(0,n.jsx)(t.code,{children:"light"}),", ",(0,n.jsx)(t.code,{children:"lighter"}),", ",(0,n.jsx)(t.code,{children:"lightest"}),", ",(0,n.jsx)(t.code,{children:"dark"}),", ",(0,n.jsx)(t.code,{children:"darker"}),", and ",(0,n.jsx)(t.code,{children:"darkest"})," for brightness distinction."]}),"\n",(0,n.jsxs)(t.p,{children:["As we are creating the Bamboo theme, we chose a color for the ",(0,n.jsx)(t.code,{children:"primary"})," theme, similar to bamboo (",(0,n.jsx)(t.code,{children:'rgb("#5E8B65")'}),"), and included neutral lightest/darkest as background and font colors."]}),"\n",(0,n.jsxs)(t.p,{children:["As shown in the code below, we use ",(0,n.jsx)(t.code,{children:"(self.methods.colors)(self: self, ..)"})," to modify the color theme. Essentially, it is a wrapper for ",(0,n.jsx)(t.code,{children:"self.colors += (..)"}),"."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n )\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n'})}),"\n",(0,n.jsxs)(t.p,{children:["After adding the color theme, we can access the color using syntax like ",(0,n.jsx)(t.code,{children:"self.colors.primary"}),"."]}),"\n",(0,n.jsx)(t.p,{children:"It's worth noting that users can change the theme color at any time using:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#let s = (s.methods.colors)(self: s, primary: rgb("#3578B9"))\n'})}),"\n",(0,n.jsx)(t.p,{children:"This flexibility demonstrates Touying's powerful customization capabilities."}),"\n",(0,n.jsx)(t.h2,{id:"practical-custom-alert-method",children:"Practical: Custom Alert Method"}),"\n",(0,n.jsxs)(t.p,{children:["In general, we need to provide a ",(0,n.jsx)(t.code,{children:"#alert[..]"})," function for users, similar to ",(0,n.jsx)(t.code,{children:"#strong[..]"}),". Typically, ",(0,n.jsx)(t.code,{children:"#alert[..]"})," emphasizes text using the primary theme color for aesthetics. We add a line in the ",(0,n.jsx)(t.code,{children:"register"})," function:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:"self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n"})}),"\n",(0,n.jsxs)(t.p,{children:["This code sets the text color to ",(0,n.jsx)(t.code,{children:"self.colors.primary"}),", utilizing the theme's primary color."]}),"\n",(0,n.jsx)(t.h2,{id:"custom-header-and-footer",children:"Custom Header and Footer"}),"\n",(0,n.jsx)(t.p,{children:"Here, assuming you've already read the Page Layout section, we know we should add headers and footers to the slides."}),"\n",(0,n.jsxs)(t.p,{children:["Firstly, we add ",(0,n.jsx)(t.code,{children:"self.bamboo-title = []"}),". This means we save the title of the current slide as a member variable ",(0,n.jsx)(t.code,{children:"self.bamboo-title"}),", stored in ",(0,n.jsx)(t.code,{children:"self"}),". This makes it easy to use in the header and later modifications. Similarly, we create ",(0,n.jsx)(t.code,{children:"self.bamboo-footer"}),", saving the ",(0,n.jsx)(t.code,{children:"footer: []"})," parameter from the ",(0,n.jsx)(t.code,{children:"register"})," function for displaying in the bottom-left corner."]}),"\n",(0,n.jsxs)(t.p,{children:["It's worth noting that our header is actually a content function in the form of ",(0,n.jsx)(t.code,{children:"let header(self) = { .. }"})," with the ",(0,n.jsx)(t.code,{children:"self"})," parameter, allowing us to get the latest information from ",(0,n.jsx)(t.code,{children:"self"}),". For example, ",(0,n.jsx)(t.code,{children:"self.bamboo-title"}),". The footer is similar."]}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"components.cell"})," used inside is actually ",(0,n.jsx)(t.code,{children:"#let cell = block.with(width: 100%, height: 100%, above: 0pt, below: 0pt, breakable: false)"}),", and ",(0,n.jsx)(t.code,{children:"show: components.cell"})," is shorthand for ",(0,n.jsx)(t.code,{children:"components.cell(body)"}),". The ",(0,n.jsx)(t.code,{children:"show: pad.with(.4em)"})," in the footer is similar."]}),"\n",(0,n.jsxs)(t.p,{children:["Another point to note is the ",(0,n.jsx)(t.code,{children:"states"})," module, which contains many counters and state-related content. For example, ",(0,n.jsx)(t.code,{children:"states.current-section-title"})," is used to display the current ",(0,n.jsx)(t.code,{children:"section"}),", and ",(0,n.jsx)(t.code,{children:'states.slide-counter.display() + " / " + states.last-slide-number'})," is used to display the current page number and total number of pages."]}),"\n",(0,n.jsxs)(t.p,{children:["We observe the usage of ",(0,n.jsx)(t.code,{children:"utils.call-or-display(self, self.bamboo-footer)"})," to display ",(0,n.jsx)(t.code,{children:"self.bamboo-footer"}),". This is used to handle situations like ",(0,n.jsx)(t.code,{children:"self.bamboo-footer = (self) => {..}"}),", ensuring a unified approach to displaying content functions and content."]}),"\n",(0,n.jsxs)(t.p,{children:["To ensure proper display of the header and footer and sufficient spacing from the main content, we also set top and bottom margins and left and right padding, such as ",(0,n.jsx)(t.code,{children:"self.page-args += (margin: (top: 4em, bottom: 1.5em, x: 0em))"})," and ",(0,n.jsx)(t.code,{children:"self.padding = (x: 2em, y: 0em)"}),". The left and right margin is ",(0,n.jsx)(t.code,{children:"0em"})," to allow the header to occupy the full page width. The left and right spacing of the main content is achieved through left and right padding of ",(0,n.jsx)(t.code,{children:"2em"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["We also need to customize a ",(0,n.jsx)(t.code,{children:"slide"})," method that accepts ",(0,n.jsx)(t.code,{children:"slide(self: none, title: auto, ..args)"}),". The first ",(0,n.jsx)(t.code,{children:"self: none"})," is a required method parameter for getting the latest ",(0,n.jsx)(t.code,{children:"self"}),". The second ",(0,n.jsx)(t.code,{children:"title"})," is used to update ",(0,n.jsx)(t.code,{children:"self.bamboo-title"})," for displaying in the header. The third ",(0,n.jsx)(t.code,{children:"..args"})," collects the remaining parameters and passes them to ",(0,n.jsx)(t.code,{children:"(self.methods.touying-slide)(self: self, ..args)"}),", which is necessary for the Touying ",(0,n.jsx)(t.code,{children:"slide"})," functionality to work properly. Additionally, we need to register this method in the ",(0,n.jsx)(t.code,{children:"register"})," function with ",(0,n.jsx)(t.code,{children:"self.methods.slide = slide"}),"."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let slide(self: none, title: auto, ..args) = {\n if title != auto {\n self.bamboo-title = title\n }\n (self.methods.touying-slide)(self: self, ..args)\n}\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n footer: [],\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n // variables for later use\n self.bamboo-title = []\n self.bamboo-footer = footer\n // set page\n let header(self) = {\n set align(top)\n show: components.cell.with(fill: self.colors.primary, inset: 1em)\n set align(horizon)\n set text(fill: self.colors.neutral-lightest, size: .7em)\n states.current-section-title\n linebreak()\n set text(size: 1.5em)\n utils.call-or-display(self, self.bamboo-title)\n }\n let footer(self) = {\n set align(bottom)\n show: pad.with(.4em)\n set text(fill: self.colors.neutral-darkest, size: .8em)\n utils.call-or-display(self, self.bamboo-footer)\n h(1fr)\n states.slide-counter.display() + " / " + states.last-slide-number\n }\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n header: header,\n footer: footer,\n margin: (top: 4em, bottom: 1.5em, x: 0em),\n )\n self.padding = (x: 2em, y: 0em)\n // register methods\n self.methods.slide = slide\n self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9", footer: self => self.info.institution)\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n'})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:"https://github.com/touying-typ/touying/assets/34951714/d33bcda7-c032-4b11-b392-5b939d9a0a47",alt:"image"})}),"\n",(0,n.jsx)(t.h2,{id:"custom-special-slide",children:"Custom Special Slide"}),"\n",(0,n.jsxs)(t.p,{children:["Building upon the basic slide, we further add some special slide functions such as ",(0,n.jsx)(t.code,{children:"title-slide"}),", ",(0,n.jsx)(t.code,{children:"focus-slide"}),", and a custom ",(0,n.jsx)(t.code,{children:"slides"})," method."]}),"\n",(0,n.jsxs)(t.p,{children:["For the ",(0,n.jsx)(t.code,{children:"title-slide"})," method, first, we call ",(0,n.jsx)(t.code,{children:"self = utils.empty-page(self)"}),". This function clears ",(0,n.jsx)(t.code,{children:"self.page-args.header"}),", ",(0,n.jsx)(t.code,{children:"self.page-args.footer"}),", and sets ",(0,n.jsx)(t.code,{children:"margin"})," and ",(0,n.jsx)(t.code,{children:"padding"})," to ",(0,n.jsx)(t.code,{children:"0em"}),", creating a blank page effect. Then, we use ",(0,n.jsx)(t.code,{children:"let info = self.info + args.named()"})," to get information stored in ",(0,n.jsx)(t.code,{children:"self.info"})," and update it with the passed ",(0,n.jsx)(t.code,{children:"args.named()"})," for later use as ",(0,n.jsx)(t.code,{children:"info.title"}),". The specific page content ",(0,n.jsx)(t.code,{children:"body"})," will vary for each theme, so we won't go into details here. Finally, we call `(self.methods.touying-slide)(self: self, repeat: none, body"]}),"\n",(0,n.jsxs)(t.p,{children:[")",(0,n.jsx)(t.code,{children:", where "}),"repeat: none",(0,n.jsx)(t.code,{children:"indicates that this page does not require animation effects, and passing the"}),"body` parameter displays its content."]}),"\n",(0,n.jsxs)(t.p,{children:["For the ",(0,n.jsx)(t.code,{children:"new-section-slide"})," method, the process is similar. The only thing to note is that in ",(0,n.jsx)(t.code,{children:"(self.methods.touying-slide)(self: self, repeat: none, section: section, body)"}),", we pass an additional ",(0,n.jsx)(t.code,{children:"section: section"})," parameter to declare the creation of a new section. Another point to note is that besides ",(0,n.jsx)(t.code,{children:"self.methods.new-section-slide = new-section-slide"}),", we also register ",(0,n.jsx)(t.code,{children:"self.methods.touying-new-section-slide = new-section-slide"}),", so ",(0,n.jsx)(t.code,{children:"new-section-slide"})," will be automatically called when encountering a first-level title."]}),"\n",(0,n.jsxs)(t.p,{children:["For the ",(0,n.jsx)(t.code,{children:"focus-slide"})," method, most of the content is similar, but it's worth noting that we use ",(0,n.jsx)(t.code,{children:"self.page-args += (..)"})," to update the page's background color."]}),"\n",(0,n.jsxs)(t.p,{children:["Finally, we update the ",(0,n.jsx)(t.code,{children:"slides(self: none, title-slide: true, slide-level: 1, ..args)"})," method. When ",(0,n.jsx)(t.code,{children:"title-slide"})," is ",(0,n.jsx)(t.code,{children:"true"}),", using ",(0,n.jsx)(t.code,{children:"#show: slides"})," will automatically create a ",(0,n.jsx)(t.code,{children:"title-slide"}),". Setting ",(0,n.jsx)(t.code,{children:"slide-level: 1"})," indicates that the first-level and second-level titles correspond to ",(0,n.jsx)(t.code,{children:"section"})," and ",(0,n.jsx)(t.code,{children:"title"}),", respectively."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let slide(self: none, title: auto, ..args) = {\n if title != auto {\n self.bamboo-title = title\n }\n (self.methods.touying-slide)(self: self, ..args)\n}\n\n#let title-slide(self: none, ..args) = {\n self = utils.empty-page(self)\n let info = self.info + args.named()\n let body = {\n set align(center + horizon)\n block(\n fill: self.colors.primary,\n width: 80%,\n inset: (y: 1em),\n radius: 1em,\n text(size: 2em, fill: self.colors.neutral-lightest, weight: "bold", info.title)\n )\n set text(fill: self.colors.neutral-darkest)\n if info.author != none {\n block(info.author)\n }\n if info.date != none {\n block(if type(info.date) == datetime { info.date.display(self.datetime-format) } else { info.date })\n }\n }\n (self.methods.touying-slide)(self: self, repeat: none, body)\n}\n\n#let new-section-slide(self: none, section) = {\n self = utils.empty-page(self)\n let body = {\n set align(center + horizon)\n set text(size: 2em, fill: self.colors.primary, weight: "bold", style: "italic")\n section\n }\n (self.methods.touying-slide)(self: self, repeat: none, section: section, body)\n}\n\n#let focus-slide(self: none, body) = {\n self = utils.empty-page(self)\n self.page-args += (\n fill: self.colors.primary,\n margin: 2em,\n )\n set text(fill: self.colors.neutral-lightest, size: 2em)\n (self.methods.touying-slide)(self: self, repeat: none, align(horizon + center, body))\n}\n\n#let slides(self: none, title-slide: true, slide-level: 1, ..args) = {\n if title-slide {\n (self.methods.title-slide)(self: self)\n }\n (self.methods.touying-slides)(self: self, slide-level: slide-level, ..args)\n}\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n footer: [],\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n // variables for later use\n self.bamboo-title = []\n self.bamboo-footer = footer\n // set page\n let header(self) = {\n set align(top)\n show: components.cell.with(fill: self.colors.primary, inset: 1em)\n set align(horizon)\n set text(fill: self.colors.neutral-lightest, size: .7em)\n states.current-section-title\n linebreak()\n set text(size: 1.5em)\n utils.call-or-display(self, self.bamboo-title)\n }\n let footer(self) = {\n set align(bottom)\n show: pad.with(.4em)\n set text(fill: self.colors.neutral-darkest, size: .8em)\n utils.call-or-display(self, self.bamboo-footer)\n h(1fr)\n states.slide-counter.display() + " / " + states.last-slide-number\n }\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n header: header,\n footer: footer,\n margin: (top: 4em, bottom: 1.5em, x: 0em),\n )\n self.padding = (x: 2em, y: 0em)\n // register methods\n self.methods.slide = slide\n self.methods.title-slide = title-slide\n self.methods.new-section-slide = new-section-slide\n self.methods.touying-new-section-slide = new-section-slide\n self.methods.focus-slide = focus-slide\n self.methods.slides = slides\n self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9", footer: self => self.info.institution)\n#let s = (s.methods.info)(\n self: s,\n title: [Title],\n subtitle: [Subtitle],\n author: [Authors],\n date: datetime.today(),\n institution: [Institution],\n)\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide, title-slide, focus-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n\n#focus-slide[\n Focus on it!\n]\n'})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:"https://github.com/touying-typ/touying/assets/34951714/03c5ad02-8ff4-4068-9664-d9cfad79baaf",alt:"image"})}),"\n",(0,n.jsx)(t.h2,{id:"conclusion",children:"Conclusion"}),"\n",(0,n.jsx)(t.p,{children:"Congratulations! You've created a simple and elegant theme. Perhaps you may find that Touying introduces a wealth of concepts, making it initially challenging to grasp. This is normal, as Touying opts for functionality over simplicity. However, thanks to Touying's comprehensive and unified approach, you can easily extract commonalities between different themes and transfer your knowledge seamlessly. You can also save global variables, modify existing themes, or switch between themes effortlessly, showcasing the benefits of Touying's decoupling and object-oriented programming."})]})}function h(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},1151:(e,t,s)=>{s.d(t,{Z:()=>r,a:()=>l});var n=s(7294);const i={},o=n.createContext(i);function l(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[997],{2261:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>a});var n=s(5893),i=s(1151);const o={sidebar_position:10},l="Creating Your Own Theme",r={id:"build-your-own-theme",title:"Creating Your Own Theme",description:"Creating your own theme with Touying might seem a bit complex initially due to the introduction of various concepts. However, fear not; if you successfully create a custom theme with Touying, you'll likely experience the convenience and powerful customization features it offers. You can refer to the source code of existing themes for guidance. The key steps to implement are:",source:"@site/docs/build-your-own-theme.md",sourceDirName:".",slug:"/build-your-own-theme",permalink:"/touying/docs/next/build-your-own-theme",draft:!1,unlisted:!1,editUrl:"https://github.com/touying-typ/touying/tree/main/docs/docs/build-your-own-theme.md",tags:[],version:"current",sidebarPosition:10,frontMatter:{sidebar_position:10},sidebar:"tutorialSidebar",previous:{title:"Aqua Theme",permalink:"/touying/docs/next/themes/aqua"},next:{title:"Progress",permalink:"/touying/docs/next/category/progress"}},d={},a=[{value:"Modifying Existing Themes",id:"modifying-existing-themes",level:2},{value:"Import",id:"import",level:2},{value:"Register Function and Init Method",id:"register-function-and-init-method",level:2},{value:"Color Theme",id:"color-theme",level:2},{value:"Practical: Custom Alert Method",id:"practical-custom-alert-method",level:2},{value:"Custom Header and Footer",id:"custom-header-and-footer",level:2},{value:"Custom Special Slide",id:"custom-special-slide",level:2},{value:"Conclusion",id:"conclusion",level:2}];function c(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"creating-your-own-theme",children:"Creating Your Own Theme"}),"\n",(0,n.jsxs)(t.p,{children:["Creating your own theme with Touying might seem a bit complex initially due to the introduction of various concepts. However, fear not; if you successfully create a custom theme with Touying, you'll likely experience the convenience and powerful customization features it offers. You can refer to the ",(0,n.jsx)(t.a,{href:"https://github.com/touying-typ/touying/tree/main/themes",children:"source code of existing themes"})," for guidance. The key steps to implement are:"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"register"})," function to initialize the global singleton ",(0,n.jsx)(t.code,{children:"s"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"init"})," method."]}),"\n",(0,n.jsxs)(t.li,{children:["Define a color theme by modifying the ",(0,n.jsx)(t.code,{children:"self.colors"})," member variable."]}),"\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"alert"})," method (optional)."]}),"\n",(0,n.jsx)(t.li,{children:"Customize the header."}),"\n",(0,n.jsx)(t.li,{children:"Customize the footer."}),"\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"slide"})," method."]}),"\n",(0,n.jsxs)(t.li,{children:["Customize special slide methods, such as ",(0,n.jsx)(t.code,{children:"title-slide"})," and ",(0,n.jsx)(t.code,{children:"focus-slide"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Customize the ",(0,n.jsx)(t.code,{children:"slides"})," method (optional)."]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"To demonstrate creating a simple and elegant Bamboo theme, let's follow the steps."}),"\n",(0,n.jsx)(t.h2,{id:"modifying-existing-themes",children:"Modifying Existing Themes"}),"\n",(0,n.jsx)(t.p,{children:"If you wish to modify a theme within the Touying package locally instead of creating one from scratch, you can achieve this by following these steps:"}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["Copy the ",(0,n.jsx)(t.a,{href:"https://github.com/touying-typ/touying/tree/main/themes",children:"theme code"})," from the ",(0,n.jsx)(t.code,{children:"themes"})," directory to your local machine. For example, copy ",(0,n.jsx)(t.code,{children:"themes/university.typ"})," to a local file named ",(0,n.jsx)(t.code,{children:"university.typ"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Remove all ",(0,n.jsx)(t.code,{children:'#import "../xxx.typ"'})," commands at the top of the ",(0,n.jsx)(t.code,{children:"university.typ"})," file."]}),"\n",(0,n.jsxs)(t.li,{children:["Add ",(0,n.jsx)(t.code,{children:'#import "@preview/touying:0.3.3": *'})," at the top of the ",(0,n.jsx)(t.code,{children:"university.typ"})," file to import all modules."]}),"\n",(0,n.jsxs)(t.li,{children:["Replace ",(0,n.jsx)(t.code,{children:"self: s"})," in the ",(0,n.jsx)(t.code,{children:"register"})," function with ",(0,n.jsx)(t.code,{children:"self: themes.default.register()"})," ",(0,n.jsx)(t.strong,{children:"(Important)"}),"."]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"You can then import and use the theme by:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#import "@preview/touying:0.3.3": *\n#import "university.typ"\n\n#let s = university.register(aspect-ratio: "16-9")\n'})}),"\n",(0,n.jsxs)(t.p,{children:["For a specific example, refer to: ",(0,n.jsx)(t.a,{href:"https://typst.app/project/rqRuzg0keo_ZEB5AdxjweA",children:"https://typst.app/project/rqRuzg0keo_ZEB5AdxjweA"})]}),"\n",(0,n.jsx)(t.h2,{id:"import",children:"Import"}),"\n",(0,n.jsx)(t.p,{children:"Depending on whether the theme is for personal use or part of Touying, you can import in two ways:"}),"\n",(0,n.jsx)(t.p,{children:"If for personal use:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#import "@preview/touying:0.3.3": *\n'})}),"\n",(0,n.jsx)(t.p,{children:"If part of Touying themes:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#import "../utils/utils.typ"\n#import "../utils/states.typ"\n#import "../utils/components.typ"\n'})}),"\n",(0,n.jsxs)(t.p,{children:["Additionally, add the import statement in Touying's ",(0,n.jsx)(t.code,{children:"themes/themes.typ"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:'#import "bamboo.typ"\n'})}),"\n",(0,n.jsx)(t.h2,{id:"register-function-and-init-method",children:"Register Function and Init Method"}),"\n",(0,n.jsx)(t.p,{children:"Next, we'll distinguish between the bamboo.typ template file and the main.typ file, the latter of which is sometimes omitted."}),"\n",(0,n.jsx)(t.p,{children:"Generally, the first step in creating slides is to determine font size and page aspect ratio. Therefore, we need to register an initialization method:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n) = {\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n )\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9")\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n'})}),"\n",(0,n.jsxs)(t.p,{children:["As you can see, we created a ",(0,n.jsx)(t.code,{children:"register"})," function and passed an ",(0,n.jsx)(t.code,{children:"aspect-ratio"})," parameter to set the page aspect ratio. We get default ",(0,n.jsx)(t.code,{children:"self"})," by ",(0,n.jsx)(t.code,{children:"self: themes.default.register()"}),". As you might already know, in Touying, we should not use ",(0,n.jsx)(t.code,{children:"set page(..)"})," to set page parameters but rather use the syntax ",(0,n.jsx)(t.code,{children:"self.page-args += (..)"})," to set them, as explained in the Page Layout section."]}),"\n",(0,n.jsxs)(t.p,{children:["In addition, we registered a ",(0,n.jsx)(t.code,{children:"self.methods.init"})," method, which can be used for some global style settings. For example, in this case, we added ",(0,n.jsx)(t.code,{children:"set text(size: 20pt)"})," to set the font size. You can also place additional global style settings here, such as ",(0,n.jsx)(t.code,{children:"set par(justify: true)"}),". Since the ",(0,n.jsx)(t.code,{children:"init"})," function is placed inside ",(0,n.jsx)(t.code,{children:"self.methods"}),", it is a method, not a regular function. Therefore, we need to add the parameter ",(0,n.jsx)(t.code,{children:"self: none"})," to use it properly."]}),"\n",(0,n.jsxs)(t.p,{children:["As you can see, later in ",(0,n.jsx)(t.code,{children:"main.typ"}),", we apply the global style settings in ",(0,n.jsx)(t.code,{children:"init"})," using ",(0,n.jsx)(t.code,{children:"#show: init"}),", where ",(0,n.jsx)(t.code,{children:"init"})," is bound and unpacked through ",(0,n.jsx)(t.code,{children:"utils.methods(s)"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["If you pay extra attention, you'll notice that the ",(0,n.jsx)(t.code,{children:"register"})," function has an independent ",(0,n.jsx)(t.code,{children:"self"})," at the end. This actually represents returning the modified ",(0,n.jsx)(t.code,{children:"self"})," as the return value, which will be saved in ",(0,n.jsx)(t.code,{children:"#let s = .."}),". This line is therefore indispensable."]}),"\n",(0,n.jsx)(t.h2,{id:"color-theme",children:"Color Theme"}),"\n",(0,n.jsxs)(t.p,{children:["Choosing an attractive color theme for your slides is crucial. Touying provides built-in color theme support to minimize API differences between different themes. Touying offers two dimensions of color selection: the first is ",(0,n.jsx)(t.code,{children:"neutral"}),", ",(0,n.jsx)(t.code,{children:"primary"}),", ",(0,n.jsx)(t.code,{children:"secondary"}),", and ",(0,n.jsx)(t.code,{children:"tertiary"})," for hue distinction, with ",(0,n.jsx)(t.code,{children:"primary"})," being the most commonly used; the second is ",(0,n.jsx)(t.code,{children:"default"}),", ",(0,n.jsx)(t.code,{children:"light"}),", ",(0,n.jsx)(t.code,{children:"lighter"}),", ",(0,n.jsx)(t.code,{children:"lightest"}),", ",(0,n.jsx)(t.code,{children:"dark"}),", ",(0,n.jsx)(t.code,{children:"darker"}),", and ",(0,n.jsx)(t.code,{children:"darkest"})," for brightness distinction."]}),"\n",(0,n.jsxs)(t.p,{children:["As we are creating the Bamboo theme, we chose a color for the ",(0,n.jsx)(t.code,{children:"primary"})," theme, similar to bamboo (",(0,n.jsx)(t.code,{children:'rgb("#5E8B65")'}),"), and included neutral lightest/darkest as background and font colors."]}),"\n",(0,n.jsxs)(t.p,{children:["As shown in the code below, we use ",(0,n.jsx)(t.code,{children:"(self.methods.colors)(self: self, ..)"})," to modify the color theme. Essentially, it is a wrapper for ",(0,n.jsx)(t.code,{children:"self.colors += (..)"}),"."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n )\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n'})}),"\n",(0,n.jsxs)(t.p,{children:["After adding the color theme, we can access the color using syntax like ",(0,n.jsx)(t.code,{children:"self.colors.primary"}),"."]}),"\n",(0,n.jsx)(t.p,{children:"It's worth noting that users can change the theme color at any time using:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'#let s = (s.methods.colors)(self: s, primary: rgb("#3578B9"))\n'})}),"\n",(0,n.jsx)(t.p,{children:"This flexibility demonstrates Touying's powerful customization capabilities."}),"\n",(0,n.jsx)(t.h2,{id:"practical-custom-alert-method",children:"Practical: Custom Alert Method"}),"\n",(0,n.jsxs)(t.p,{children:["In general, we need to provide a ",(0,n.jsx)(t.code,{children:"#alert[..]"})," function for users, similar to ",(0,n.jsx)(t.code,{children:"#strong[..]"}),". Typically, ",(0,n.jsx)(t.code,{children:"#alert[..]"})," emphasizes text using the primary theme color for aesthetics. We add a line in the ",(0,n.jsx)(t.code,{children:"register"})," function:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:"self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n"})}),"\n",(0,n.jsxs)(t.p,{children:["This code sets the text color to ",(0,n.jsx)(t.code,{children:"self.colors.primary"}),", utilizing the theme's primary color."]}),"\n",(0,n.jsx)(t.h2,{id:"custom-header-and-footer",children:"Custom Header and Footer"}),"\n",(0,n.jsx)(t.p,{children:"Here, assuming you've already read the Page Layout section, we know we should add headers and footers to the slides."}),"\n",(0,n.jsxs)(t.p,{children:["Firstly, we add ",(0,n.jsx)(t.code,{children:"self.bamboo-title = []"}),". This means we save the title of the current slide as a member variable ",(0,n.jsx)(t.code,{children:"self.bamboo-title"}),", stored in ",(0,n.jsx)(t.code,{children:"self"}),". This makes it easy to use in the header and later modifications. Similarly, we create ",(0,n.jsx)(t.code,{children:"self.bamboo-footer"}),", saving the ",(0,n.jsx)(t.code,{children:"footer: []"})," parameter from the ",(0,n.jsx)(t.code,{children:"register"})," function for displaying in the bottom-left corner."]}),"\n",(0,n.jsxs)(t.p,{children:["It's worth noting that our header is actually a content function in the form of ",(0,n.jsx)(t.code,{children:"let header(self) = { .. }"})," with the ",(0,n.jsx)(t.code,{children:"self"})," parameter, allowing us to get the latest information from ",(0,n.jsx)(t.code,{children:"self"}),". For example, ",(0,n.jsx)(t.code,{children:"self.bamboo-title"}),". The footer is similar."]}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"components.cell"})," used inside is actually ",(0,n.jsx)(t.code,{children:"#let cell = block.with(width: 100%, height: 100%, above: 0pt, below: 0pt, breakable: false)"}),", and ",(0,n.jsx)(t.code,{children:"show: components.cell"})," is shorthand for ",(0,n.jsx)(t.code,{children:"components.cell(body)"}),". The ",(0,n.jsx)(t.code,{children:"show: pad.with(.4em)"})," in the footer is similar."]}),"\n",(0,n.jsxs)(t.p,{children:["Another point to note is the ",(0,n.jsx)(t.code,{children:"states"})," module, which contains many counters and state-related content. For example, ",(0,n.jsx)(t.code,{children:"states.current-section-title"})," is used to display the current ",(0,n.jsx)(t.code,{children:"section"}),", and ",(0,n.jsx)(t.code,{children:'states.slide-counter.display() + " / " + states.last-slide-number'})," is used to display the current page number and total number of pages."]}),"\n",(0,n.jsxs)(t.p,{children:["We observe the usage of ",(0,n.jsx)(t.code,{children:"utils.call-or-display(self, self.bamboo-footer)"})," to display ",(0,n.jsx)(t.code,{children:"self.bamboo-footer"}),". This is used to handle situations like ",(0,n.jsx)(t.code,{children:"self.bamboo-footer = (self) => {..}"}),", ensuring a unified approach to displaying content functions and content."]}),"\n",(0,n.jsxs)(t.p,{children:["To ensure proper display of the header and footer and sufficient spacing from the main content, we also set top and bottom margins and left and right padding, such as ",(0,n.jsx)(t.code,{children:"self.page-args += (margin: (top: 4em, bottom: 1.5em, x: 0em))"})," and ",(0,n.jsx)(t.code,{children:"self.padding = (x: 2em, y: 0em)"}),". The left and right margin is ",(0,n.jsx)(t.code,{children:"0em"})," to allow the header to occupy the full page width. The left and right spacing of the main content is achieved through left and right padding of ",(0,n.jsx)(t.code,{children:"2em"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["We also need to customize a ",(0,n.jsx)(t.code,{children:"slide"})," method that accepts ",(0,n.jsx)(t.code,{children:"slide(self: none, title: auto, ..args)"}),". The first ",(0,n.jsx)(t.code,{children:"self: none"})," is a required method parameter for getting the latest ",(0,n.jsx)(t.code,{children:"self"}),". The second ",(0,n.jsx)(t.code,{children:"title"})," is used to update ",(0,n.jsx)(t.code,{children:"self.bamboo-title"})," for displaying in the header. The third ",(0,n.jsx)(t.code,{children:"..args"})," collects the remaining parameters and passes them to ",(0,n.jsx)(t.code,{children:"(self.methods.touying-slide)(self: self, ..args)"}),", which is necessary for the Touying ",(0,n.jsx)(t.code,{children:"slide"})," functionality to work properly. Additionally, we need to register this method in the ",(0,n.jsx)(t.code,{children:"register"})," function with ",(0,n.jsx)(t.code,{children:"self.methods.slide = slide"}),"."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typst",children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let slide(self: none, title: auto, ..args) = {\n if title != auto {\n self.bamboo-title = title\n }\n (self.methods.touying-slide)(self: self, ..args)\n}\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n footer: [],\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n // variables for later use\n self.bamboo-title = []\n self.bamboo-footer = footer\n // set page\n let header(self) = {\n set align(top)\n show: components.cell.with(fill: self.colors.primary, inset: 1em)\n set align(horizon)\n set text(fill: self.colors.neutral-lightest, size: .7em)\n states.current-section-title\n linebreak()\n set text(size: 1.5em)\n utils.call-or-display(self, self.bamboo-title)\n }\n let footer(self) = {\n set align(bottom)\n show: pad.with(.4em)\n set text(fill: self.colors.neutral-darkest, size: .8em)\n utils.call-or-display(self, self.bamboo-footer)\n h(1fr)\n states.slide-counter.display() + " / " + states.last-slide-number\n }\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n header: header,\n footer: footer,\n margin: (top: 4em, bottom: 1.5em, x: 0em),\n )\n self.padding = (x: 2em, y: 0em)\n // register methods\n self.methods.slide = slide\n self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9", footer: self => self.info.institution)\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n'})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:"https://github.com/touying-typ/touying/assets/34951714/d33bcda7-c032-4b11-b392-5b939d9a0a47",alt:"image"})}),"\n",(0,n.jsx)(t.h2,{id:"custom-special-slide",children:"Custom Special Slide"}),"\n",(0,n.jsxs)(t.p,{children:["Building upon the basic slide, we further add some special slide functions such as ",(0,n.jsx)(t.code,{children:"title-slide"}),", ",(0,n.jsx)(t.code,{children:"focus-slide"}),", and a custom ",(0,n.jsx)(t.code,{children:"slides"})," method."]}),"\n",(0,n.jsxs)(t.p,{children:["For the ",(0,n.jsx)(t.code,{children:"title-slide"})," method, first, we call ",(0,n.jsx)(t.code,{children:"self = utils.empty-page(self)"}),". This function clears ",(0,n.jsx)(t.code,{children:"self.page-args.header"}),", ",(0,n.jsx)(t.code,{children:"self.page-args.footer"}),", and sets ",(0,n.jsx)(t.code,{children:"margin"})," and ",(0,n.jsx)(t.code,{children:"padding"})," to ",(0,n.jsx)(t.code,{children:"0em"}),", creating a blank page effect. Then, we use ",(0,n.jsx)(t.code,{children:"let info = self.info + args.named()"})," to get information stored in ",(0,n.jsx)(t.code,{children:"self.info"})," and update it with the passed ",(0,n.jsx)(t.code,{children:"args.named()"})," for later use as ",(0,n.jsx)(t.code,{children:"info.title"}),". The specific page content ",(0,n.jsx)(t.code,{children:"body"})," will vary for each theme, so we won't go into details here. Finally, we call `(self.methods.touying-slide)(self: self, repeat: none, body"]}),"\n",(0,n.jsxs)(t.p,{children:[")",(0,n.jsx)(t.code,{children:", where "}),"repeat: none",(0,n.jsx)(t.code,{children:"indicates that this page does not require animation effects, and passing the"}),"body` parameter displays its content."]}),"\n",(0,n.jsxs)(t.p,{children:["For the ",(0,n.jsx)(t.code,{children:"new-section-slide"})," method, the process is similar. The only thing to note is that in ",(0,n.jsx)(t.code,{children:"(self.methods.touying-slide)(self: self, repeat: none, section: section, body)"}),", we pass an additional ",(0,n.jsx)(t.code,{children:"section: section"})," parameter to declare the creation of a new section. Another point to note is that besides ",(0,n.jsx)(t.code,{children:"self.methods.new-section-slide = new-section-slide"}),", we also register ",(0,n.jsx)(t.code,{children:"self.methods.touying-new-section-slide = new-section-slide"}),", so ",(0,n.jsx)(t.code,{children:"new-section-slide"})," will be automatically called when encountering a first-level title."]}),"\n",(0,n.jsxs)(t.p,{children:["For the ",(0,n.jsx)(t.code,{children:"focus-slide"})," method, most of the content is similar, but it's worth noting that we use ",(0,n.jsx)(t.code,{children:"self.page-args += (..)"})," to update the page's background color."]}),"\n",(0,n.jsxs)(t.p,{children:["Finally, we update the ",(0,n.jsx)(t.code,{children:"slides(self: none, title-slide: true, slide-level: 1, ..args)"})," method. When ",(0,n.jsx)(t.code,{children:"title-slide"})," is ",(0,n.jsx)(t.code,{children:"true"}),", using ",(0,n.jsx)(t.code,{children:"#show: slides"})," will automatically create a ",(0,n.jsx)(t.code,{children:"title-slide"}),". Setting ",(0,n.jsx)(t.code,{children:"slide-level: 1"})," indicates that the first-level and second-level titles correspond to ",(0,n.jsx)(t.code,{children:"section"})," and ",(0,n.jsx)(t.code,{children:"title"}),", respectively."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let slide(self: none, title: auto, ..args) = {\n if title != auto {\n self.bamboo-title = title\n }\n (self.methods.touying-slide)(self: self, ..args)\n}\n\n#let title-slide(self: none, ..args) = {\n self = utils.empty-page(self)\n let info = self.info + args.named()\n let body = {\n set align(center + horizon)\n block(\n fill: self.colors.primary,\n width: 80%,\n inset: (y: 1em),\n radius: 1em,\n text(size: 2em, fill: self.colors.neutral-lightest, weight: "bold", info.title)\n )\n set text(fill: self.colors.neutral-darkest)\n if info.author != none {\n block(info.author)\n }\n if info.date != none {\n block(if type(info.date) == datetime { info.date.display(self.datetime-format) } else { info.date })\n }\n }\n (self.methods.touying-slide)(self: self, repeat: none, body)\n}\n\n#let new-section-slide(self: none, section) = {\n self = utils.empty-page(self)\n let body = {\n set align(center + horizon)\n set text(size: 2em, fill: self.colors.primary, weight: "bold", style: "italic")\n section\n }\n (self.methods.touying-slide)(self: self, repeat: none, section: section, body)\n}\n\n#let focus-slide(self: none, body) = {\n self = utils.empty-page(self)\n self.page-args += (\n fill: self.colors.primary,\n margin: 2em,\n )\n set text(fill: self.colors.neutral-lightest, size: 2em)\n (self.methods.touying-slide)(self: self, repeat: none, align(horizon + center, body))\n}\n\n#let slides(self: none, title-slide: true, slide-level: 1, ..args) = {\n if title-slide {\n (self.methods.title-slide)(self: self)\n }\n (self.methods.touying-slides)(self: self, slide-level: slide-level, ..args)\n}\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n footer: [],\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n // variables for later use\n self.bamboo-title = []\n self.bamboo-footer = footer\n // set page\n let header(self) = {\n set align(top)\n show: components.cell.with(fill: self.colors.primary, inset: 1em)\n set align(horizon)\n set text(fill: self.colors.neutral-lightest, size: .7em)\n states.current-section-title\n linebreak()\n set text(size: 1.5em)\n utils.call-or-display(self, self.bamboo-title)\n }\n let footer(self) = {\n set align(bottom)\n show: pad.with(.4em)\n set text(fill: self.colors.neutral-darkest, size: .8em)\n utils.call-or-display(self, self.bamboo-footer)\n h(1fr)\n states.slide-counter.display() + " / " + states.last-slide-number\n }\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n header: header,\n footer: footer,\n margin: (top: 4em, bottom: 1.5em, x: 0em),\n )\n self.padding = (x: 2em, y: 0em)\n // register methods\n self.methods.slide = slide\n self.methods.title-slide = title-slide\n self.methods.new-section-slide = new-section-slide\n self.methods.touying-new-section-slide = new-section-slide\n self.methods.focus-slide = focus-slide\n self.methods.slides = slides\n self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9", footer: self => self.info.institution)\n#let s = (s.methods.info)(\n self: s,\n title: [Title],\n subtitle: [Subtitle],\n author: [Authors],\n date: datetime.today(),\n institution: [Institution],\n)\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide, title-slide, focus-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n\n#focus-slide[\n Focus on it!\n]\n'})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:"https://github.com/touying-typ/touying/assets/34951714/03c5ad02-8ff4-4068-9664-d9cfad79baaf",alt:"image"})}),"\n",(0,n.jsx)(t.h2,{id:"conclusion",children:"Conclusion"}),"\n",(0,n.jsx)(t.p,{children:"Congratulations! You've created a simple and elegant theme. Perhaps you may find that Touying introduces a wealth of concepts, making it initially challenging to grasp. This is normal, as Touying opts for functionality over simplicity. However, thanks to Touying's comprehensive and unified approach, you can easily extract commonalities between different themes and transfer your knowledge seamlessly. You can also save global variables, modify existing themes, or switch between themes effortlessly, showcasing the benefits of Touying's decoupling and object-oriented programming."})]})}function h(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},1151:(e,t,s)=>{s.d(t,{Z:()=>r,a:()=>l});var n=s(7294);const i={},o=n.createContext(i);function l(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.dcd4d528.js b/assets/js/runtime~main.ca8b8749.js similarity index 98% rename from assets/js/runtime~main.dcd4d528.js rename to assets/js/runtime~main.ca8b8749.js index b51f9c44c..3c0173c9c 100644 --- a/assets/js/runtime~main.dcd4d528.js +++ b/assets/js/runtime~main.ca8b8749.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,b,c,f,d={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var b=t[e]={id:e,loaded:!1,exports:{}};return d[e].call(b.exports,b,b.exports,r),b.loaded=!0,b.exports}r.m=d,r.c=t,e=[],r.O=(a,b,c,f)=>{if(!b){var d=1/0;for(i=0;i=f)&&Object.keys(r.O).every((e=>r.O[e](b[o])))?b.splice(o--,1):(t=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[b,c,f]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},b=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var f=Object.create(null);r.r(f);var d={};a=a||[null,b({}),b([]),b(b)];for(var t=2&c&&e;"object"==typeof t&&!~a.indexOf(t);t=b(t))Object.getOwnPropertyNames(t).forEach((a=>d[a]=()=>e[a]));return d.default=()=>e,r.d(f,d),f},r.d=(e,a)=>{for(var b in a)r.o(a,b)&&!r.o(e,b)&&Object.defineProperty(e,b,{enumerable:!0,get:a[b]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,b)=>(r.f[b](e,a),a)),[])),r.u=e=>"assets/js/"+({53:"935f2afb",69:"018a1506",80:"2c0b54ac",196:"d9bab663",263:"5c062049",417:"080c9bd0",498:"2cc1595c",530:"e5b11173",612:"d287f9e6",876:"b035a2d2",997:"5670b452",1049:"b472294c",1053:"c51e9508",1317:"9cec3c93",1400:"495c719e",1543:"98ce8162",1546:"92f7ac8d",1560:"0275f7e4",1581:"f8777534",1588:"f80396ac",1626:"a449492b",1860:"67bae27a",1893:"340f1526",2026:"9d0f4357",2143:"5a57e638",2172:"6bd5e75c",2191:"77e3d78c",2289:"51a4d3bf",2403:"d16cbc15",2418:"e9b496d5",2432:"116fbef0",2528:"ae31ff46",2529:"3143bd0d",2535:"814f3328",2551:"c37d3efc",2701:"1aab1ab5",2707:"ada9f060",2786:"267f059f",2792:"0d1c87af",2830:"86e5cb88",2865:"82487ba9",2868:"ce57b2d1",3034:"9beb87c2",3085:"1f391b9e",3089:"a6aa9e1f",3134:"86f810a5",3135:"7ba330a5",3209:"80a0c88e",3263:"91bd08ce",3280:"4bb9edb3",3376:"6c8708e3",3389:"4c713790",3432:"de4f60ff",3608:"9e4087bc",3651:"1514c4f3",3655:"b1a1bf59",3684:"797defb6",3715:"583d85fc",3732:"be07ec36",3832:"e6bd25e0",3942:"14c08683",3969:"5b27bc59",3994:"41abee02",4013:"01a85c17",4042:"acfad3c9",4195:"c4f5d8e4",4368:"a94703ab",4447:"28a86b5d",4481:"7d3539b2",4599:"a94a4682",4621:"0479d12b",4725:"06e0043a",4733:"173c8b24",4770:"bf750d2c",4823:"17588091",4842:"0c7d33f3",4873:"83b73936",4984:"b8fd1f7e",5022:"3b36ca8e",5094:"a3b8b6db",5151:"43e6fa63",5332:"8ded3f77",5428:"11366869",5431:"7329c3b8",5526:"2553c37c",5598:"65e4cc1e",5609:"5035b6a4",5617:"54ea3d6a",5619:"ecfd88b4",5675:"bce42248",5695:"6d7ce909",5739:"717af290",5832:"926843be",5870:"4b91b61e",5921:"1b6fd54f",5954:"ff235272",6085:"3d438ec7",6099:"58092a00",6103:"ccc49370",6114:"89f39702",6118:"c9566e8a",6142:"f2bffab0",6154:"c38df086",6193:"864ebe97",6296:"286c2c64",6403:"ad972684",6518:"3fefcd96",6526:"41a6ae87",6567:"b2b68e5a",6662:"555ecac1",6679:"a7cd7c6a",6685:"65dfabbc",6721:"38803c52",6864:"cbce90b2",6893:"d85491b0",6917:"7f65dfb7",7060:"9f9db465",7190:"ab32da60",7224:"d4a2dc55",7335:"850166d8",7414:"393be207",7504:"5297811e",7545:"2b9fd23c",7701:"df5b4e08",7836:"02f62403",7918:"17896441",8010:"99d50e1d",8084:"34ff0b4c",8088:"293f9c83",8110:"56a68450",8210:"29e7adb3",8300:"e5a884f4",8338:"f5938888",8341:"730fef4c",8350:"3f2877b5",8518:"a7bd4aaa",8565:"472f8a66",8610:"6875c492",8814:"11b282fc",9027:"2b13119a",9090:"4fabf2f1",9095:"ebca17e9",9139:"09ecdeab",9159:"fbe708ec",9183:"2d4a7f47",9199:"f7c1e588",9254:"78c3c618",9259:"a62a85e6",9319:"851c2574",9375:"729d3e1e",9410:"c9c87310",9413:"38682d35",9527:"8ac96054",9543:"f8016cde",9619:"39430005",9661:"5e95c892",9671:"0e384e19",9705:"396cf6b9",9744:"10eff399",9754:"f3d96861",9817:"14eb3368",9861:"9ea180da",9895:"b7a138aa",9916:"f3a7b3b2",9974:"dc65f2fa"}[e]||e)+"."+{53:"22a072e6",69:"7d02f359",80:"2aaad164",196:"1adc00f3",263:"73e95c26",417:"d61411b0",498:"6faa31d3",530:"590aaa77",612:"262d95ec",876:"97785d07",997:"4fce949b",1049:"c1ea99eb",1053:"6fb30be1",1317:"4c4de52b",1400:"8da501b5",1404:"2f578d87",1543:"511888e8",1546:"debacb4b",1560:"5c626199",1581:"85fe0a10",1588:"295f8f9c",1626:"441d5055",1772:"22d645a1",1860:"9979e720",1893:"bfadeec1",2026:"bc35b904",2143:"d5d2f771",2172:"aa97d729",2191:"c89c1ad8",2289:"67d62bc7",2403:"730d258c",2418:"6d0332a4",2432:"6f2750fe",2528:"ffe9e87d",2529:"10df310d",2535:"a329f4f2",2551:"a5207080",2701:"9195047e",2707:"b8b2376c",2786:"1727bc64",2792:"5905a41f",2830:"09fb73d7",2865:"4f5b83c0",2868:"f674fd38",3034:"f1b775ab",3085:"fa8680eb",3089:"d410008f",3134:"f8a5b679",3135:"cc3b1fc9",3209:"9eea04f4",3263:"25250122",3280:"061043fc",3376:"67c9997b",3389:"f6b6bc02",3432:"61319ea5",3608:"8eec8b12",3651:"c6271de7",3655:"fb33b4f8",3684:"2b44684f",3715:"1f34e760",3732:"0fc62efd",3832:"a617cf03",3942:"357fda3f",3969:"e72bec1a",3994:"4e7738e6",4013:"354f3ef2",4042:"29faaa36",4195:"b82e09e8",4368:"9ecc2e7c",4447:"1a361711",4481:"b44da348",4599:"f4cd98e8",4621:"b83508eb",4725:"c7037dab",4733:"e93baa7c",4770:"0f5ea528",4823:"5d773431",4842:"26f21937",4873:"099861e4",4984:"89a9f66b",5022:"c1ec8f85",5094:"7e9bd8d8",5151:"41006931",5332:"39e635f8",5428:"48b9bdb5",5431:"00d6f275",5526:"1ca5755f",5598:"e076f0aa",5609:"ba29a9c9",5617:"e9dc7a26",5619:"b6991f82",5675:"c35a8bcc",5695:"5080d462",5739:"20cf0c37",5832:"e8be20d9",5870:"3efbbdec",5921:"f602517c",5954:"e2efa1de",6085:"664d2788",6099:"500af44b",6103:"d9da7455",6114:"36c015ce",6118:"8502a18b",6142:"564929e9",6154:"b9aa5c15",6193:"3dcc4b8f",6296:"608f3c26",6403:"e9454893",6518:"987e36d8",6526:"2629620e",6567:"62c14c05",6662:"5b7af3be",6679:"b0847aa4",6685:"f8050b8c",6721:"01f754dc",6864:"2f8ac2ae",6893:"4e72fbe6",6917:"bf524ce9",7060:"9e91e83f",7190:"c588d84b",7224:"86b0fccd",7335:"67d41d40",7414:"dbd0b852",7504:"71d42028",7545:"45028282",7701:"4507b7bc",7836:"7661051c",7918:"15723699",8010:"92cd84e7",8084:"8f9d425a",8088:"187d4c5c",8110:"6be3c25e",8210:"64d8e266",8300:"12442be0",8338:"8dd127cf",8341:"fcb26556",8350:"9296d57d",8518:"f93b23a7",8565:"6c6c4972",8610:"686aaf2c",8814:"01cc229d",9027:"b39d6393",9090:"6af19ea5",9095:"4378e318",9139:"82cea7bf",9159:"ec36899b",9183:"359d3d24",9199:"38a8f426",9254:"b5e5000a",9259:"6b6a805a",9319:"ff9078b6",9375:"01643990",9410:"9f884158",9413:"e5782ec2",9527:"a771ac5d",9543:"a0af29ce",9619:"11ee1a7f",9661:"17c48d1d",9671:"8ef80ab1",9677:"ea822b9e",9705:"1b99490f",9744:"00ff6043",9754:"df8d17f9",9817:"21d38987",9861:"97b817f9",9895:"b665d587",9916:"580d831f",9974:"d122e46c"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},f="docs:",r.l=(e,a,b,d)=>{if(c[e])c[e].push(a);else{var t,o;if(void 0!==b)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var f=c[e];if(delete c[e],t.parentNode&&t.parentNode.removeChild(t),f&&f.forEach((e=>e(b))),a)return a(b)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/touying/",r.gca=function(e){return e={11366869:"5428",17588091:"4823",17896441:"7918",39430005:"9619","935f2afb":"53","018a1506":"69","2c0b54ac":"80",d9bab663:"196","5c062049":"263","080c9bd0":"417","2cc1595c":"498",e5b11173:"530",d287f9e6:"612",b035a2d2:"876","5670b452":"997",b472294c:"1049",c51e9508:"1053","9cec3c93":"1317","495c719e":"1400","98ce8162":"1543","92f7ac8d":"1546","0275f7e4":"1560",f8777534:"1581",f80396ac:"1588",a449492b:"1626","67bae27a":"1860","340f1526":"1893","9d0f4357":"2026","5a57e638":"2143","6bd5e75c":"2172","77e3d78c":"2191","51a4d3bf":"2289",d16cbc15:"2403",e9b496d5:"2418","116fbef0":"2432",ae31ff46:"2528","3143bd0d":"2529","814f3328":"2535",c37d3efc:"2551","1aab1ab5":"2701",ada9f060:"2707","267f059f":"2786","0d1c87af":"2792","86e5cb88":"2830","82487ba9":"2865",ce57b2d1:"2868","9beb87c2":"3034","1f391b9e":"3085",a6aa9e1f:"3089","86f810a5":"3134","7ba330a5":"3135","80a0c88e":"3209","91bd08ce":"3263","4bb9edb3":"3280","6c8708e3":"3376","4c713790":"3389",de4f60ff:"3432","9e4087bc":"3608","1514c4f3":"3651",b1a1bf59:"3655","797defb6":"3684","583d85fc":"3715",be07ec36:"3732",e6bd25e0:"3832","14c08683":"3942","5b27bc59":"3969","41abee02":"3994","01a85c17":"4013",acfad3c9:"4042",c4f5d8e4:"4195",a94703ab:"4368","28a86b5d":"4447","7d3539b2":"4481",a94a4682:"4599","0479d12b":"4621","06e0043a":"4725","173c8b24":"4733",bf750d2c:"4770","0c7d33f3":"4842","83b73936":"4873",b8fd1f7e:"4984","3b36ca8e":"5022",a3b8b6db:"5094","43e6fa63":"5151","8ded3f77":"5332","7329c3b8":"5431","2553c37c":"5526","65e4cc1e":"5598","5035b6a4":"5609","54ea3d6a":"5617",ecfd88b4:"5619",bce42248:"5675","6d7ce909":"5695","717af290":"5739","926843be":"5832","4b91b61e":"5870","1b6fd54f":"5921",ff235272:"5954","3d438ec7":"6085","58092a00":"6099",ccc49370:"6103","89f39702":"6114",c9566e8a:"6118",f2bffab0:"6142",c38df086:"6154","864ebe97":"6193","286c2c64":"6296",ad972684:"6403","3fefcd96":"6518","41a6ae87":"6526",b2b68e5a:"6567","555ecac1":"6662",a7cd7c6a:"6679","65dfabbc":"6685","38803c52":"6721",cbce90b2:"6864",d85491b0:"6893","7f65dfb7":"6917","9f9db465":"7060",ab32da60:"7190",d4a2dc55:"7224","850166d8":"7335","393be207":"7414","5297811e":"7504","2b9fd23c":"7545",df5b4e08:"7701","02f62403":"7836","99d50e1d":"8010","34ff0b4c":"8084","293f9c83":"8088","56a68450":"8110","29e7adb3":"8210",e5a884f4:"8300",f5938888:"8338","730fef4c":"8341","3f2877b5":"8350",a7bd4aaa:"8518","472f8a66":"8565","6875c492":"8610","11b282fc":"8814","2b13119a":"9027","4fabf2f1":"9090",ebca17e9:"9095","09ecdeab":"9139",fbe708ec:"9159","2d4a7f47":"9183",f7c1e588:"9199","78c3c618":"9254",a62a85e6:"9259","851c2574":"9319","729d3e1e":"9375",c9c87310:"9410","38682d35":"9413","8ac96054":"9527",f8016cde:"9543","5e95c892":"9661","0e384e19":"9671","396cf6b9":"9705","10eff399":"9744",f3d96861:"9754","14eb3368":"9817","9ea180da":"9861",b7a138aa:"9895",f3a7b3b2:"9916",dc65f2fa:"9974"}[e]||e,r.p+r.u(e)},(()=>{var e={1303:0,532:0};r.f.j=(a,b)=>{var c=r.o(e,a)?e[a]:void 0;if(0!==c)if(c)b.push(c[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var f=new Promise(((b,f)=>c=e[a]=[b,f]));b.push(c[2]=f);var d=r.p+r.u(a),t=new Error;r.l(d,(b=>{if(r.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var f=b&&("load"===b.type?"missing":b.type),d=b&&b.target&&b.target.src;t.message="Loading chunk "+a+" failed.\n("+f+": "+d+")",t.name="ChunkLoadError",t.type=f,t.request=d,c[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,b)=>{var c,f,d=b[0],t=b[1],o=b[2],n=0;if(d.some((a=>0!==e[a]))){for(c in t)r.o(t,c)&&(r.m[c]=t[c]);if(o)var i=o(r)}for(a&&a(b);n{"use strict";var e,a,b,c,f,d={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var b=t[e]={id:e,loaded:!1,exports:{}};return d[e].call(b.exports,b,b.exports,r),b.loaded=!0,b.exports}r.m=d,r.c=t,e=[],r.O=(a,b,c,f)=>{if(!b){var d=1/0;for(i=0;i=f)&&Object.keys(r.O).every((e=>r.O[e](b[o])))?b.splice(o--,1):(t=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[b,c,f]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},b=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var f=Object.create(null);r.r(f);var d={};a=a||[null,b({}),b([]),b(b)];for(var t=2&c&&e;"object"==typeof t&&!~a.indexOf(t);t=b(t))Object.getOwnPropertyNames(t).forEach((a=>d[a]=()=>e[a]));return d.default=()=>e,r.d(f,d),f},r.d=(e,a)=>{for(var b in a)r.o(a,b)&&!r.o(e,b)&&Object.defineProperty(e,b,{enumerable:!0,get:a[b]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,b)=>(r.f[b](e,a),a)),[])),r.u=e=>"assets/js/"+({53:"935f2afb",69:"018a1506",80:"2c0b54ac",196:"d9bab663",263:"5c062049",417:"080c9bd0",498:"2cc1595c",530:"e5b11173",612:"d287f9e6",876:"b035a2d2",997:"5670b452",1049:"b472294c",1053:"c51e9508",1317:"9cec3c93",1400:"495c719e",1543:"98ce8162",1546:"92f7ac8d",1560:"0275f7e4",1581:"f8777534",1588:"f80396ac",1626:"a449492b",1860:"67bae27a",1893:"340f1526",2026:"9d0f4357",2143:"5a57e638",2172:"6bd5e75c",2191:"77e3d78c",2289:"51a4d3bf",2403:"d16cbc15",2418:"e9b496d5",2432:"116fbef0",2528:"ae31ff46",2529:"3143bd0d",2535:"814f3328",2551:"c37d3efc",2701:"1aab1ab5",2707:"ada9f060",2786:"267f059f",2792:"0d1c87af",2830:"86e5cb88",2865:"82487ba9",2868:"ce57b2d1",3034:"9beb87c2",3085:"1f391b9e",3089:"a6aa9e1f",3134:"86f810a5",3135:"7ba330a5",3209:"80a0c88e",3263:"91bd08ce",3280:"4bb9edb3",3376:"6c8708e3",3389:"4c713790",3432:"de4f60ff",3608:"9e4087bc",3651:"1514c4f3",3655:"b1a1bf59",3684:"797defb6",3715:"583d85fc",3732:"be07ec36",3832:"e6bd25e0",3942:"14c08683",3969:"5b27bc59",3994:"41abee02",4013:"01a85c17",4042:"acfad3c9",4195:"c4f5d8e4",4368:"a94703ab",4447:"28a86b5d",4481:"7d3539b2",4599:"a94a4682",4621:"0479d12b",4725:"06e0043a",4733:"173c8b24",4770:"bf750d2c",4823:"17588091",4842:"0c7d33f3",4873:"83b73936",4984:"b8fd1f7e",5022:"3b36ca8e",5094:"a3b8b6db",5151:"43e6fa63",5332:"8ded3f77",5428:"11366869",5431:"7329c3b8",5526:"2553c37c",5598:"65e4cc1e",5609:"5035b6a4",5617:"54ea3d6a",5619:"ecfd88b4",5675:"bce42248",5695:"6d7ce909",5739:"717af290",5832:"926843be",5870:"4b91b61e",5921:"1b6fd54f",5954:"ff235272",6085:"3d438ec7",6099:"58092a00",6103:"ccc49370",6114:"89f39702",6118:"c9566e8a",6142:"f2bffab0",6154:"c38df086",6193:"864ebe97",6296:"286c2c64",6403:"ad972684",6518:"3fefcd96",6526:"41a6ae87",6567:"b2b68e5a",6662:"555ecac1",6679:"a7cd7c6a",6685:"65dfabbc",6721:"38803c52",6864:"cbce90b2",6893:"d85491b0",6917:"7f65dfb7",7060:"9f9db465",7190:"ab32da60",7224:"d4a2dc55",7335:"850166d8",7414:"393be207",7504:"5297811e",7545:"2b9fd23c",7701:"df5b4e08",7836:"02f62403",7918:"17896441",8010:"99d50e1d",8084:"34ff0b4c",8088:"293f9c83",8110:"56a68450",8210:"29e7adb3",8300:"e5a884f4",8338:"f5938888",8341:"730fef4c",8350:"3f2877b5",8518:"a7bd4aaa",8565:"472f8a66",8610:"6875c492",8814:"11b282fc",9027:"2b13119a",9090:"4fabf2f1",9095:"ebca17e9",9139:"09ecdeab",9159:"fbe708ec",9183:"2d4a7f47",9199:"f7c1e588",9254:"78c3c618",9259:"a62a85e6",9319:"851c2574",9375:"729d3e1e",9410:"c9c87310",9413:"38682d35",9527:"8ac96054",9543:"f8016cde",9619:"39430005",9661:"5e95c892",9671:"0e384e19",9705:"396cf6b9",9744:"10eff399",9754:"f3d96861",9817:"14eb3368",9861:"9ea180da",9895:"b7a138aa",9916:"f3a7b3b2",9974:"dc65f2fa"}[e]||e)+"."+{53:"22a072e6",69:"7d02f359",80:"2aaad164",196:"1adc00f3",263:"73e95c26",417:"d61411b0",498:"6faa31d3",530:"590aaa77",612:"262d95ec",876:"97785d07",997:"9a520563",1049:"c1ea99eb",1053:"6fb30be1",1317:"4c4de52b",1400:"8da501b5",1404:"2f578d87",1543:"511888e8",1546:"debacb4b",1560:"5c626199",1581:"85fe0a10",1588:"295f8f9c",1626:"441d5055",1772:"22d645a1",1860:"9979e720",1893:"bfadeec1",2026:"bc35b904",2143:"d5d2f771",2172:"aa97d729",2191:"c89c1ad8",2289:"67d62bc7",2403:"730d258c",2418:"6d0332a4",2432:"6f2750fe",2528:"ffe9e87d",2529:"10df310d",2535:"a329f4f2",2551:"a5207080",2701:"9195047e",2707:"b8b2376c",2786:"1727bc64",2792:"5905a41f",2830:"09fb73d7",2865:"4f5b83c0",2868:"f674fd38",3034:"f1b775ab",3085:"fa8680eb",3089:"d410008f",3134:"f8a5b679",3135:"cc3b1fc9",3209:"9eea04f4",3263:"25250122",3280:"061043fc",3376:"67c9997b",3389:"f6b6bc02",3432:"61319ea5",3608:"8eec8b12",3651:"c6271de7",3655:"fb33b4f8",3684:"2b44684f",3715:"1f34e760",3732:"0fc62efd",3832:"a617cf03",3942:"357fda3f",3969:"e72bec1a",3994:"4e7738e6",4013:"354f3ef2",4042:"29faaa36",4195:"b82e09e8",4368:"9ecc2e7c",4447:"1a361711",4481:"b44da348",4599:"f4cd98e8",4621:"b83508eb",4725:"c7037dab",4733:"e93baa7c",4770:"0f5ea528",4823:"5d773431",4842:"26f21937",4873:"099861e4",4984:"89a9f66b",5022:"c1ec8f85",5094:"7e9bd8d8",5151:"41006931",5332:"39e635f8",5428:"48b9bdb5",5431:"00d6f275",5526:"b398ce38",5598:"e076f0aa",5609:"ba29a9c9",5617:"e9dc7a26",5619:"b6991f82",5675:"c35a8bcc",5695:"5080d462",5739:"20cf0c37",5832:"e8be20d9",5870:"3efbbdec",5921:"f602517c",5954:"e2efa1de",6085:"664d2788",6099:"500af44b",6103:"d9da7455",6114:"36c015ce",6118:"8502a18b",6142:"564929e9",6154:"b9aa5c15",6193:"3dcc4b8f",6296:"608f3c26",6403:"e9454893",6518:"987e36d8",6526:"2629620e",6567:"62c14c05",6662:"5b7af3be",6679:"b0847aa4",6685:"f8050b8c",6721:"01f754dc",6864:"2f8ac2ae",6893:"4e72fbe6",6917:"bf524ce9",7060:"9e91e83f",7190:"c588d84b",7224:"86b0fccd",7335:"67d41d40",7414:"dbd0b852",7504:"71d42028",7545:"45028282",7701:"4507b7bc",7836:"7661051c",7918:"15723699",8010:"92cd84e7",8084:"8f9d425a",8088:"187d4c5c",8110:"6be3c25e",8210:"64d8e266",8300:"12442be0",8338:"8dd127cf",8341:"fcb26556",8350:"9296d57d",8518:"f93b23a7",8565:"6c6c4972",8610:"686aaf2c",8814:"01cc229d",9027:"b39d6393",9090:"6af19ea5",9095:"4378e318",9139:"82cea7bf",9159:"ec36899b",9183:"359d3d24",9199:"38a8f426",9254:"b5e5000a",9259:"6b6a805a",9319:"ff9078b6",9375:"01643990",9410:"9f884158",9413:"e5782ec2",9527:"a771ac5d",9543:"a0af29ce",9619:"11ee1a7f",9661:"17c48d1d",9671:"8ef80ab1",9677:"ea822b9e",9705:"1b99490f",9744:"00ff6043",9754:"df8d17f9",9817:"21d38987",9861:"97b817f9",9895:"b665d587",9916:"580d831f",9974:"d122e46c"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},f="docs:",r.l=(e,a,b,d)=>{if(c[e])c[e].push(a);else{var t,o;if(void 0!==b)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var f=c[e];if(delete c[e],t.parentNode&&t.parentNode.removeChild(t),f&&f.forEach((e=>e(b))),a)return a(b)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/touying/",r.gca=function(e){return e={11366869:"5428",17588091:"4823",17896441:"7918",39430005:"9619","935f2afb":"53","018a1506":"69","2c0b54ac":"80",d9bab663:"196","5c062049":"263","080c9bd0":"417","2cc1595c":"498",e5b11173:"530",d287f9e6:"612",b035a2d2:"876","5670b452":"997",b472294c:"1049",c51e9508:"1053","9cec3c93":"1317","495c719e":"1400","98ce8162":"1543","92f7ac8d":"1546","0275f7e4":"1560",f8777534:"1581",f80396ac:"1588",a449492b:"1626","67bae27a":"1860","340f1526":"1893","9d0f4357":"2026","5a57e638":"2143","6bd5e75c":"2172","77e3d78c":"2191","51a4d3bf":"2289",d16cbc15:"2403",e9b496d5:"2418","116fbef0":"2432",ae31ff46:"2528","3143bd0d":"2529","814f3328":"2535",c37d3efc:"2551","1aab1ab5":"2701",ada9f060:"2707","267f059f":"2786","0d1c87af":"2792","86e5cb88":"2830","82487ba9":"2865",ce57b2d1:"2868","9beb87c2":"3034","1f391b9e":"3085",a6aa9e1f:"3089","86f810a5":"3134","7ba330a5":"3135","80a0c88e":"3209","91bd08ce":"3263","4bb9edb3":"3280","6c8708e3":"3376","4c713790":"3389",de4f60ff:"3432","9e4087bc":"3608","1514c4f3":"3651",b1a1bf59:"3655","797defb6":"3684","583d85fc":"3715",be07ec36:"3732",e6bd25e0:"3832","14c08683":"3942","5b27bc59":"3969","41abee02":"3994","01a85c17":"4013",acfad3c9:"4042",c4f5d8e4:"4195",a94703ab:"4368","28a86b5d":"4447","7d3539b2":"4481",a94a4682:"4599","0479d12b":"4621","06e0043a":"4725","173c8b24":"4733",bf750d2c:"4770","0c7d33f3":"4842","83b73936":"4873",b8fd1f7e:"4984","3b36ca8e":"5022",a3b8b6db:"5094","43e6fa63":"5151","8ded3f77":"5332","7329c3b8":"5431","2553c37c":"5526","65e4cc1e":"5598","5035b6a4":"5609","54ea3d6a":"5617",ecfd88b4:"5619",bce42248:"5675","6d7ce909":"5695","717af290":"5739","926843be":"5832","4b91b61e":"5870","1b6fd54f":"5921",ff235272:"5954","3d438ec7":"6085","58092a00":"6099",ccc49370:"6103","89f39702":"6114",c9566e8a:"6118",f2bffab0:"6142",c38df086:"6154","864ebe97":"6193","286c2c64":"6296",ad972684:"6403","3fefcd96":"6518","41a6ae87":"6526",b2b68e5a:"6567","555ecac1":"6662",a7cd7c6a:"6679","65dfabbc":"6685","38803c52":"6721",cbce90b2:"6864",d85491b0:"6893","7f65dfb7":"6917","9f9db465":"7060",ab32da60:"7190",d4a2dc55:"7224","850166d8":"7335","393be207":"7414","5297811e":"7504","2b9fd23c":"7545",df5b4e08:"7701","02f62403":"7836","99d50e1d":"8010","34ff0b4c":"8084","293f9c83":"8088","56a68450":"8110","29e7adb3":"8210",e5a884f4:"8300",f5938888:"8338","730fef4c":"8341","3f2877b5":"8350",a7bd4aaa:"8518","472f8a66":"8565","6875c492":"8610","11b282fc":"8814","2b13119a":"9027","4fabf2f1":"9090",ebca17e9:"9095","09ecdeab":"9139",fbe708ec:"9159","2d4a7f47":"9183",f7c1e588:"9199","78c3c618":"9254",a62a85e6:"9259","851c2574":"9319","729d3e1e":"9375",c9c87310:"9410","38682d35":"9413","8ac96054":"9527",f8016cde:"9543","5e95c892":"9661","0e384e19":"9671","396cf6b9":"9705","10eff399":"9744",f3d96861:"9754","14eb3368":"9817","9ea180da":"9861",b7a138aa:"9895",f3a7b3b2:"9916",dc65f2fa:"9974"}[e]||e,r.p+r.u(e)},(()=>{var e={1303:0,532:0};r.f.j=(a,b)=>{var c=r.o(e,a)?e[a]:void 0;if(0!==c)if(c)b.push(c[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var f=new Promise(((b,f)=>c=e[a]=[b,f]));b.push(c[2]=f);var d=r.p+r.u(a),t=new Error;r.l(d,(b=>{if(r.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var f=b&&("load"===b.type?"missing":b.type),d=b&&b.target&&b.target.src;t.message="Loading chunk "+a+" failed.\n("+f+": "+d+")",t.name="ChunkLoadError",t.type=f,t.request=d,c[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,b)=>{var c,f,d=b[0],t=b[1],o=b[2],n=0;if(d.some((a=>0!==e[a]))){for(c in t)r.o(t,c)&&(r.m[c]=t[c]);if(o)var i=o(r)}for(a&&a(b);n Archive | Touying - + diff --git a/blog/index.html b/blog/index.html index 03c978893..939e46f7c 100644 --- a/blog/index.html +++ b/blog/index.html @@ -5,7 +5,7 @@ Blog | Touying - + diff --git a/blog/tags/development/index.html b/blog/tags/development/index.html index c9f5d934e..faa3c6387 100644 --- a/blog/tags/development/index.html +++ b/blog/tags/development/index.html @@ -5,7 +5,7 @@ One post tagged with "development" | Touying - + diff --git a/blog/tags/index.html b/blog/tags/index.html index 57c4ea36d..d46a8a2f8 100644 --- a/blog/tags/index.html +++ b/blog/tags/index.html @@ -5,7 +5,7 @@ Tags | Touying - + diff --git a/blog/touying-0-2-0/index.html b/blog/touying-0-2-0/index.html index 56e180e18..72206f75b 100644 --- a/blog/touying-0-2-0/index.html +++ b/blog/touying-0-2-0/index.html @@ -5,7 +5,7 @@ Touying 0.2.0 | Touying - + diff --git a/docs/0.2.x/build-your-own-theme/index.html b/docs/0.2.x/build-your-own-theme/index.html index 8fd6b39b9..8e2d93321 100644 --- a/docs/0.2.x/build-your-own-theme/index.html +++ b/docs/0.2.x/build-your-own-theme/index.html @@ -5,7 +5,7 @@ Build Your Own Theme | Touying - + diff --git a/docs/0.2.x/category/dynamic-slides/index.html b/docs/0.2.x/category/dynamic-slides/index.html index 70b899604..a45a2048a 100644 --- a/docs/0.2.x/category/dynamic-slides/index.html +++ b/docs/0.2.x/category/dynamic-slides/index.html @@ -5,7 +5,7 @@ Dynamic Slides | Touying - + diff --git a/docs/0.2.x/category/external-tools/index.html b/docs/0.2.x/category/external-tools/index.html index 3a5b56859..16ae75736 100644 --- a/docs/0.2.x/category/external-tools/index.html +++ b/docs/0.2.x/category/external-tools/index.html @@ -5,7 +5,7 @@ External Tools | Touying - + diff --git a/docs/0.2.x/category/progress/index.html b/docs/0.2.x/category/progress/index.html index 70797ce0b..04627bbf3 100644 --- a/docs/0.2.x/category/progress/index.html +++ b/docs/0.2.x/category/progress/index.html @@ -5,7 +5,7 @@ Progress | Touying - + diff --git a/docs/0.2.x/category/themes/index.html b/docs/0.2.x/category/themes/index.html index 64260260f..05d3ca090 100644 --- a/docs/0.2.x/category/themes/index.html +++ b/docs/0.2.x/category/themes/index.html @@ -5,7 +5,7 @@ Themes | Touying - + diff --git a/docs/0.2.x/category/utilities/index.html b/docs/0.2.x/category/utilities/index.html index af8d6b4a1..fd194532c 100644 --- a/docs/0.2.x/category/utilities/index.html +++ b/docs/0.2.x/category/utilities/index.html @@ -5,7 +5,7 @@ Utilities | Touying - + diff --git a/docs/0.2.x/changelog/index.html b/docs/0.2.x/changelog/index.html index ddcf24b31..9ed52746b 100644 --- a/docs/0.2.x/changelog/index.html +++ b/docs/0.2.x/changelog/index.html @@ -5,7 +5,7 @@ Changelog | Touying - + diff --git a/docs/0.2.x/dynamic/complex/index.html b/docs/0.2.x/dynamic/complex/index.html index 4cee86768..4e05ff676 100644 --- a/docs/0.2.x/dynamic/complex/index.html +++ b/docs/0.2.x/dynamic/complex/index.html @@ -5,7 +5,7 @@ Complex Animations | Touying - + diff --git a/docs/0.2.x/dynamic/cover/index.html b/docs/0.2.x/dynamic/cover/index.html index a892fc0cd..d1107154d 100644 --- a/docs/0.2.x/dynamic/cover/index.html +++ b/docs/0.2.x/dynamic/cover/index.html @@ -5,7 +5,7 @@ Cover Function | Touying - + diff --git a/docs/0.2.x/dynamic/equation/index.html b/docs/0.2.x/dynamic/equation/index.html index 2331a9c7e..0d8d3a6a8 100644 --- a/docs/0.2.x/dynamic/equation/index.html +++ b/docs/0.2.x/dynamic/equation/index.html @@ -5,7 +5,7 @@ Math Equation Animations | Touying - + diff --git a/docs/0.2.x/dynamic/handout/index.html b/docs/0.2.x/dynamic/handout/index.html index d36f453e0..4c706d4f8 100644 --- a/docs/0.2.x/dynamic/handout/index.html +++ b/docs/0.2.x/dynamic/handout/index.html @@ -5,7 +5,7 @@ Handout Mode | Touying - + diff --git a/docs/0.2.x/dynamic/other/index.html b/docs/0.2.x/dynamic/other/index.html index 4c820d1da..d5594b770 100644 --- a/docs/0.2.x/dynamic/other/index.html +++ b/docs/0.2.x/dynamic/other/index.html @@ -5,7 +5,7 @@ Other Animations | Touying - + diff --git a/docs/0.2.x/dynamic/simple/index.html b/docs/0.2.x/dynamic/simple/index.html index 19757e1ac..d3edd352a 100644 --- a/docs/0.2.x/dynamic/simple/index.html +++ b/docs/0.2.x/dynamic/simple/index.html @@ -5,7 +5,7 @@ Simple Animations | Touying - + diff --git a/docs/0.2.x/external/pdfpc/index.html b/docs/0.2.x/external/pdfpc/index.html index d5dc8e947..7469726ea 100644 --- a/docs/0.2.x/external/pdfpc/index.html +++ b/docs/0.2.x/external/pdfpc/index.html @@ -5,7 +5,7 @@ Pdfpc | Touying - + diff --git a/docs/0.2.x/external/typst-preview/index.html b/docs/0.2.x/external/typst-preview/index.html index bc32cf647..9f54ee296 100644 --- a/docs/0.2.x/external/typst-preview/index.html +++ b/docs/0.2.x/external/typst-preview/index.html @@ -5,7 +5,7 @@ Typst Preview | Touying - + diff --git a/docs/0.2.x/intro/index.html b/docs/0.2.x/intro/index.html index 82f3e969f..f4d3c7238 100644 --- a/docs/0.2.x/intro/index.html +++ b/docs/0.2.x/intro/index.html @@ -5,7 +5,7 @@ Introduction to Touying | Touying - + diff --git a/docs/0.2.x/layout/index.html b/docs/0.2.x/layout/index.html index 060856029..09d5979c3 100644 --- a/docs/0.2.x/layout/index.html +++ b/docs/0.2.x/layout/index.html @@ -5,7 +5,7 @@ Layout Your Contents | Touying - + diff --git a/docs/0.2.x/progress/counters/index.html b/docs/0.2.x/progress/counters/index.html index 922f6bb42..2cd5e6f42 100644 --- a/docs/0.2.x/progress/counters/index.html +++ b/docs/0.2.x/progress/counters/index.html @@ -5,7 +5,7 @@ Touying Counters | Touying - + diff --git a/docs/0.2.x/progress/sections/index.html b/docs/0.2.x/progress/sections/index.html index 60756050a..79c609813 100644 --- a/docs/0.2.x/progress/sections/index.html +++ b/docs/0.2.x/progress/sections/index.html @@ -5,7 +5,7 @@ Touying Sections | Touying - + diff --git a/docs/0.2.x/start/index.html b/docs/0.2.x/start/index.html index 7c807b984..3610ba7d7 100644 --- a/docs/0.2.x/start/index.html +++ b/docs/0.2.x/start/index.html @@ -5,7 +5,7 @@ Getting Started | Touying - + diff --git a/docs/0.2.x/style/index.html b/docs/0.2.x/style/index.html index 526f41c93..559f93e11 100644 --- a/docs/0.2.x/style/index.html +++ b/docs/0.2.x/style/index.html @@ -5,7 +5,7 @@ Code Styles | Touying - + diff --git a/docs/0.2.x/themes/dewdrop/index.html b/docs/0.2.x/themes/dewdrop/index.html index 357435fa5..d6d895c26 100644 --- a/docs/0.2.x/themes/dewdrop/index.html +++ b/docs/0.2.x/themes/dewdrop/index.html @@ -5,7 +5,7 @@ Dewdrop Theme | Touying - + diff --git a/docs/0.2.x/themes/metropolis/index.html b/docs/0.2.x/themes/metropolis/index.html index 801f0884f..5aa815fb0 100644 --- a/docs/0.2.x/themes/metropolis/index.html +++ b/docs/0.2.x/themes/metropolis/index.html @@ -5,7 +5,7 @@ Metropolis Theme | Touying - + diff --git a/docs/0.2.x/themes/simple/index.html b/docs/0.2.x/themes/simple/index.html index 5b94aa65f..c6a86f097 100644 --- a/docs/0.2.x/themes/simple/index.html +++ b/docs/0.2.x/themes/simple/index.html @@ -5,7 +5,7 @@ Simple Theme | Touying - + diff --git a/docs/0.2.x/themes/university/index.html b/docs/0.2.x/themes/university/index.html index 624f4edc7..83ee643b7 100644 --- a/docs/0.2.x/themes/university/index.html +++ b/docs/0.2.x/themes/university/index.html @@ -5,7 +5,7 @@ University Theme | Touying - + diff --git a/docs/0.2.x/utilities/fit-to/index.html b/docs/0.2.x/utilities/fit-to/index.html index 3e736492c..7e35c9d08 100644 --- a/docs/0.2.x/utilities/fit-to/index.html +++ b/docs/0.2.x/utilities/fit-to/index.html @@ -5,7 +5,7 @@ Fit to Height / Width | Touying - + diff --git a/docs/0.2.x/utilities/oop/index.html b/docs/0.2.x/utilities/oop/index.html index eda9373ba..ceb949842 100644 --- a/docs/0.2.x/utilities/oop/index.html +++ b/docs/0.2.x/utilities/oop/index.html @@ -5,7 +5,7 @@ Object-Oriented Programming | Touying - + diff --git a/docs/0.3.x/build-your-own-theme/index.html b/docs/0.3.x/build-your-own-theme/index.html index bf5253d50..9428d3fa4 100644 --- a/docs/0.3.x/build-your-own-theme/index.html +++ b/docs/0.3.x/build-your-own-theme/index.html @@ -5,7 +5,7 @@ Creating Your Own Theme | Touying - + diff --git a/docs/0.3.x/category/dynamic-slides/index.html b/docs/0.3.x/category/dynamic-slides/index.html index da2720c63..e7ee3d913 100644 --- a/docs/0.3.x/category/dynamic-slides/index.html +++ b/docs/0.3.x/category/dynamic-slides/index.html @@ -5,7 +5,7 @@ Dynamic Slides | Touying - + diff --git a/docs/0.3.x/category/external-tools/index.html b/docs/0.3.x/category/external-tools/index.html index 958f3b1f3..d8fe381e2 100644 --- a/docs/0.3.x/category/external-tools/index.html +++ b/docs/0.3.x/category/external-tools/index.html @@ -5,7 +5,7 @@ External Tools | Touying - + diff --git a/docs/0.3.x/category/package-integration/index.html b/docs/0.3.x/category/package-integration/index.html index b0f9bc920..190879d67 100644 --- a/docs/0.3.x/category/package-integration/index.html +++ b/docs/0.3.x/category/package-integration/index.html @@ -5,7 +5,7 @@ Package Integration | Touying - + diff --git a/docs/0.3.x/category/progress/index.html b/docs/0.3.x/category/progress/index.html index 3ea2913b4..253d5730b 100644 --- a/docs/0.3.x/category/progress/index.html +++ b/docs/0.3.x/category/progress/index.html @@ -5,7 +5,7 @@ Progress | Touying - + diff --git a/docs/0.3.x/category/themes/index.html b/docs/0.3.x/category/themes/index.html index 44a846458..74702095c 100644 --- a/docs/0.3.x/category/themes/index.html +++ b/docs/0.3.x/category/themes/index.html @@ -5,7 +5,7 @@ Themes | Touying - + diff --git a/docs/0.3.x/category/utilities/index.html b/docs/0.3.x/category/utilities/index.html index 79885cdfa..a630eb7c3 100644 --- a/docs/0.3.x/category/utilities/index.html +++ b/docs/0.3.x/category/utilities/index.html @@ -5,7 +5,7 @@ Utilities | Touying - + diff --git a/docs/0.3.x/changelog/index.html b/docs/0.3.x/changelog/index.html index 57dfb1af7..dee52936f 100644 --- a/docs/0.3.x/changelog/index.html +++ b/docs/0.3.x/changelog/index.html @@ -5,7 +5,7 @@ Changelog | Touying - + diff --git a/docs/0.3.x/code-styles/index.html b/docs/0.3.x/code-styles/index.html index 72347ff5a..1a5a38173 100644 --- a/docs/0.3.x/code-styles/index.html +++ b/docs/0.3.x/code-styles/index.html @@ -5,7 +5,7 @@ Code Style | Touying - + diff --git a/docs/0.3.x/dynamic/complex/index.html b/docs/0.3.x/dynamic/complex/index.html index aa607dfde..9afd9b6d1 100644 --- a/docs/0.3.x/dynamic/complex/index.html +++ b/docs/0.3.x/dynamic/complex/index.html @@ -5,7 +5,7 @@ Complex Animations | Touying - + diff --git a/docs/0.3.x/dynamic/cover/index.html b/docs/0.3.x/dynamic/cover/index.html index 6e1d255b0..11fbdb015 100644 --- a/docs/0.3.x/dynamic/cover/index.html +++ b/docs/0.3.x/dynamic/cover/index.html @@ -5,7 +5,7 @@ Cover Function | Touying - + diff --git a/docs/0.3.x/dynamic/equation/index.html b/docs/0.3.x/dynamic/equation/index.html index 054deffe7..d093ae8f6 100644 --- a/docs/0.3.x/dynamic/equation/index.html +++ b/docs/0.3.x/dynamic/equation/index.html @@ -5,7 +5,7 @@ Math Equation Animations | Touying - + diff --git a/docs/0.3.x/dynamic/handout/index.html b/docs/0.3.x/dynamic/handout/index.html index afe5f9f69..8d159ca1f 100644 --- a/docs/0.3.x/dynamic/handout/index.html +++ b/docs/0.3.x/dynamic/handout/index.html @@ -5,7 +5,7 @@ Handout Mode | Touying - + diff --git a/docs/0.3.x/dynamic/other/index.html b/docs/0.3.x/dynamic/other/index.html index 27a6d1732..2c6e72577 100644 --- a/docs/0.3.x/dynamic/other/index.html +++ b/docs/0.3.x/dynamic/other/index.html @@ -5,7 +5,7 @@ Other Animations | Touying - + diff --git a/docs/0.3.x/dynamic/simple/index.html b/docs/0.3.x/dynamic/simple/index.html index 241054058..c64b0798d 100644 --- a/docs/0.3.x/dynamic/simple/index.html +++ b/docs/0.3.x/dynamic/simple/index.html @@ -5,7 +5,7 @@ Simple Animations | Touying - + diff --git a/docs/0.3.x/external/pdfpc/index.html b/docs/0.3.x/external/pdfpc/index.html index fbc38f792..9dd4dc4df 100644 --- a/docs/0.3.x/external/pdfpc/index.html +++ b/docs/0.3.x/external/pdfpc/index.html @@ -5,7 +5,7 @@ Pdfpc | Touying - + diff --git a/docs/0.3.x/external/typst-preview/index.html b/docs/0.3.x/external/typst-preview/index.html index 72b4ec0f8..55d2193fa 100644 --- a/docs/0.3.x/external/typst-preview/index.html +++ b/docs/0.3.x/external/typst-preview/index.html @@ -5,7 +5,7 @@ Typst Preview | Touying - + diff --git a/docs/0.3.x/global-settings/index.html b/docs/0.3.x/global-settings/index.html index 5c9c45eb8..6feb9e86e 100644 --- a/docs/0.3.x/global-settings/index.html +++ b/docs/0.3.x/global-settings/index.html @@ -5,7 +5,7 @@ Global Settings | Touying - + diff --git a/docs/0.3.x/integration/cetz/index.html b/docs/0.3.x/integration/cetz/index.html index ed6f62ca1..4335e4fb9 100644 --- a/docs/0.3.x/integration/cetz/index.html +++ b/docs/0.3.x/integration/cetz/index.html @@ -5,7 +5,7 @@ CeTZ | Touying - + diff --git a/docs/0.3.x/integration/codly/index.html b/docs/0.3.x/integration/codly/index.html index b35d5cc26..5b3c2dd9e 100644 --- a/docs/0.3.x/integration/codly/index.html +++ b/docs/0.3.x/integration/codly/index.html @@ -5,7 +5,7 @@ Codly | Touying - + diff --git a/docs/0.3.x/integration/fletcher/index.html b/docs/0.3.x/integration/fletcher/index.html index 5d8f32922..03073b404 100644 --- a/docs/0.3.x/integration/fletcher/index.html +++ b/docs/0.3.x/integration/fletcher/index.html @@ -5,7 +5,7 @@ Fletcher | Touying - + diff --git a/docs/0.3.x/integration/mitex/index.html b/docs/0.3.x/integration/mitex/index.html index c7048a1d0..7b4cf82f4 100644 --- a/docs/0.3.x/integration/mitex/index.html +++ b/docs/0.3.x/integration/mitex/index.html @@ -5,7 +5,7 @@ MiTeX | Touying - + diff --git a/docs/0.3.x/integration/pinit/index.html b/docs/0.3.x/integration/pinit/index.html index 1e4a4c100..15d2009d0 100644 --- a/docs/0.3.x/integration/pinit/index.html +++ b/docs/0.3.x/integration/pinit/index.html @@ -5,7 +5,7 @@ Pinit | Touying - + diff --git a/docs/0.3.x/integration/polylux/index.html b/docs/0.3.x/integration/polylux/index.html index 7d82c7795..c0be9beba 100644 --- a/docs/0.3.x/integration/polylux/index.html +++ b/docs/0.3.x/integration/polylux/index.html @@ -5,7 +5,7 @@ Polylux | Touying - + diff --git a/docs/0.3.x/intro/index.html b/docs/0.3.x/intro/index.html index c7bddd1d6..36c52d50b 100644 --- a/docs/0.3.x/intro/index.html +++ b/docs/0.3.x/intro/index.html @@ -5,7 +5,7 @@ Introduction to Touying | Touying - + diff --git a/docs/0.3.x/layout/index.html b/docs/0.3.x/layout/index.html index e0a3e36ea..19cc30c07 100644 --- a/docs/0.3.x/layout/index.html +++ b/docs/0.3.x/layout/index.html @@ -5,7 +5,7 @@ Page Layout | Touying - + diff --git a/docs/0.3.x/progress/counters/index.html b/docs/0.3.x/progress/counters/index.html index 230452b01..8d5706611 100644 --- a/docs/0.3.x/progress/counters/index.html +++ b/docs/0.3.x/progress/counters/index.html @@ -5,7 +5,7 @@ Touying Counters | Touying - + diff --git a/docs/0.3.x/progress/sections/index.html b/docs/0.3.x/progress/sections/index.html index fe61c8b51..9f81e96ec 100644 --- a/docs/0.3.x/progress/sections/index.html +++ b/docs/0.3.x/progress/sections/index.html @@ -5,7 +5,7 @@ Touying Sections | Touying - + diff --git a/docs/0.3.x/sections/index.html b/docs/0.3.x/sections/index.html index a94b8a4bf..b972010e3 100644 --- a/docs/0.3.x/sections/index.html +++ b/docs/0.3.x/sections/index.html @@ -5,7 +5,7 @@ Sections and Subsections | Touying - + diff --git a/docs/0.3.x/start/index.html b/docs/0.3.x/start/index.html index 747cb58c9..574c0d42e 100644 --- a/docs/0.3.x/start/index.html +++ b/docs/0.3.x/start/index.html @@ -5,7 +5,7 @@ Getting Started | Touying - + diff --git a/docs/0.3.x/themes/dewdrop/index.html b/docs/0.3.x/themes/dewdrop/index.html index 1dffc31e1..d62b7caa0 100644 --- a/docs/0.3.x/themes/dewdrop/index.html +++ b/docs/0.3.x/themes/dewdrop/index.html @@ -5,7 +5,7 @@ Dewdrop Theme | Touying - + diff --git a/docs/0.3.x/themes/metropolis/index.html b/docs/0.3.x/themes/metropolis/index.html index 38d024791..f3ef56f23 100644 --- a/docs/0.3.x/themes/metropolis/index.html +++ b/docs/0.3.x/themes/metropolis/index.html @@ -5,7 +5,7 @@ Metropolis Theme | Touying - + diff --git a/docs/0.3.x/themes/simple/index.html b/docs/0.3.x/themes/simple/index.html index c54aaa5d2..69da6f898 100644 --- a/docs/0.3.x/themes/simple/index.html +++ b/docs/0.3.x/themes/simple/index.html @@ -5,7 +5,7 @@ Simple Theme | Touying - + diff --git a/docs/0.3.x/themes/university/index.html b/docs/0.3.x/themes/university/index.html index cb1f4dda0..b2793fa86 100644 --- a/docs/0.3.x/themes/university/index.html +++ b/docs/0.3.x/themes/university/index.html @@ -5,7 +5,7 @@ University Theme | Touying - + diff --git a/docs/0.3.x/utilities/fit-to/index.html b/docs/0.3.x/utilities/fit-to/index.html index c6eef19af..80e364a78 100644 --- a/docs/0.3.x/utilities/fit-to/index.html +++ b/docs/0.3.x/utilities/fit-to/index.html @@ -5,7 +5,7 @@ Fit to Height / Width | Touying - + diff --git a/docs/0.3.x/utilities/oop/index.html b/docs/0.3.x/utilities/oop/index.html index 305b11f8f..346e2d1c1 100644 --- a/docs/0.3.x/utilities/oop/index.html +++ b/docs/0.3.x/utilities/oop/index.html @@ -5,7 +5,7 @@ Object-Oriented Programming | Touying - + diff --git a/docs/build-your-own-theme/index.html b/docs/build-your-own-theme/index.html index 050b9bf23..b12e162f8 100644 --- a/docs/build-your-own-theme/index.html +++ b/docs/build-your-own-theme/index.html @@ -5,7 +5,7 @@ Creating Your Own Theme | Touying - + @@ -33,7 +33,7 @@

Mo

You can then import and use the theme by:

#import "@preview/touying:0.3.3": *
#import "university.typ"

#let s = university.register(aspect-ratio: "16-9")
-

For a specific example, refer to: https://typst.app/project/pdWNTS47I-6jxHrWdMSTLx

+

For a specific example, refer to: https://typst.app/project/rqRuzg0keo_ZEB5AdxjweA

Import

Depending on whether the theme is for personal use or part of Touying, you can import in two ways:

If for personal use:

diff --git a/docs/category/dynamic-slides/index.html b/docs/category/dynamic-slides/index.html index fbbfe7cb3..f6c0bcebb 100644 --- a/docs/category/dynamic-slides/index.html +++ b/docs/category/dynamic-slides/index.html @@ -5,7 +5,7 @@ Dynamic Slides | Touying - + diff --git a/docs/category/external-tools/index.html b/docs/category/external-tools/index.html index 4798e6109..0730c30f1 100644 --- a/docs/category/external-tools/index.html +++ b/docs/category/external-tools/index.html @@ -5,7 +5,7 @@ External Tools | Touying - + diff --git a/docs/category/package-integration/index.html b/docs/category/package-integration/index.html index 6c970b2c0..c3e570f5b 100644 --- a/docs/category/package-integration/index.html +++ b/docs/category/package-integration/index.html @@ -5,7 +5,7 @@ Package Integration | Touying - + diff --git a/docs/category/progress/index.html b/docs/category/progress/index.html index 7c17099e3..53bc85c36 100644 --- a/docs/category/progress/index.html +++ b/docs/category/progress/index.html @@ -5,7 +5,7 @@ Progress | Touying - + diff --git a/docs/category/themes/index.html b/docs/category/themes/index.html index 3937acb40..fe64b5d95 100644 --- a/docs/category/themes/index.html +++ b/docs/category/themes/index.html @@ -5,7 +5,7 @@ Themes | Touying - + diff --git a/docs/category/utilities/index.html b/docs/category/utilities/index.html index faa4ca40c..8285794a8 100644 --- a/docs/category/utilities/index.html +++ b/docs/category/utilities/index.html @@ -5,7 +5,7 @@ Utilities | Touying - + diff --git a/docs/changelog/index.html b/docs/changelog/index.html index 4fd406ed5..89efc54f9 100644 --- a/docs/changelog/index.html +++ b/docs/changelog/index.html @@ -5,7 +5,7 @@ Changelog | Touying - + diff --git a/docs/code-styles/index.html b/docs/code-styles/index.html index 956176b67..dcded3cda 100644 --- a/docs/code-styles/index.html +++ b/docs/code-styles/index.html @@ -5,7 +5,7 @@ Code Style | Touying - + diff --git a/docs/dynamic/complex/index.html b/docs/dynamic/complex/index.html index 35289fb29..51a80952b 100644 --- a/docs/dynamic/complex/index.html +++ b/docs/dynamic/complex/index.html @@ -5,7 +5,7 @@ Complex Animations | Touying - + diff --git a/docs/dynamic/cover/index.html b/docs/dynamic/cover/index.html index e052fbc81..b0615cee3 100644 --- a/docs/dynamic/cover/index.html +++ b/docs/dynamic/cover/index.html @@ -5,7 +5,7 @@ Cover Function | Touying - + diff --git a/docs/dynamic/equation/index.html b/docs/dynamic/equation/index.html index ea5fb22be..436d99eda 100644 --- a/docs/dynamic/equation/index.html +++ b/docs/dynamic/equation/index.html @@ -5,7 +5,7 @@ Math Equation Animations | Touying - + diff --git a/docs/dynamic/handout/index.html b/docs/dynamic/handout/index.html index 7e1dd2a39..07e7a3805 100644 --- a/docs/dynamic/handout/index.html +++ b/docs/dynamic/handout/index.html @@ -5,7 +5,7 @@ Handout Mode | Touying - + diff --git a/docs/dynamic/other/index.html b/docs/dynamic/other/index.html index da963f61e..f185cbb33 100644 --- a/docs/dynamic/other/index.html +++ b/docs/dynamic/other/index.html @@ -5,7 +5,7 @@ Other Animations | Touying - + diff --git a/docs/dynamic/simple/index.html b/docs/dynamic/simple/index.html index 439aa26a0..2d88ab889 100644 --- a/docs/dynamic/simple/index.html +++ b/docs/dynamic/simple/index.html @@ -5,7 +5,7 @@ Simple Animations | Touying - + diff --git a/docs/external/pdfpc/index.html b/docs/external/pdfpc/index.html index 82c74e2ad..2d4afbf53 100644 --- a/docs/external/pdfpc/index.html +++ b/docs/external/pdfpc/index.html @@ -5,7 +5,7 @@ Pdfpc | Touying - + diff --git a/docs/external/typst-preview/index.html b/docs/external/typst-preview/index.html index 3718fc4b2..96ae90230 100644 --- a/docs/external/typst-preview/index.html +++ b/docs/external/typst-preview/index.html @@ -5,7 +5,7 @@ Typst Preview | Touying - + diff --git a/docs/global-settings/index.html b/docs/global-settings/index.html index bdaaabd07..15a6aedd6 100644 --- a/docs/global-settings/index.html +++ b/docs/global-settings/index.html @@ -5,7 +5,7 @@ Global Settings | Touying - + diff --git a/docs/integration/cetz/index.html b/docs/integration/cetz/index.html index 3018249f6..d96fbabd3 100644 --- a/docs/integration/cetz/index.html +++ b/docs/integration/cetz/index.html @@ -5,7 +5,7 @@ CeTZ | Touying - + diff --git a/docs/integration/codly/index.html b/docs/integration/codly/index.html index 27cbd2a1a..897dce4c3 100644 --- a/docs/integration/codly/index.html +++ b/docs/integration/codly/index.html @@ -5,7 +5,7 @@ Codly | Touying - + diff --git a/docs/integration/fletcher/index.html b/docs/integration/fletcher/index.html index 30afdd0e7..952a7947c 100644 --- a/docs/integration/fletcher/index.html +++ b/docs/integration/fletcher/index.html @@ -5,7 +5,7 @@ Fletcher | Touying - + diff --git a/docs/integration/mitex/index.html b/docs/integration/mitex/index.html index 2a3276f69..963af2dce 100644 --- a/docs/integration/mitex/index.html +++ b/docs/integration/mitex/index.html @@ -5,7 +5,7 @@ MiTeX | Touying - + diff --git a/docs/integration/pinit/index.html b/docs/integration/pinit/index.html index 54db84136..5007d8a98 100644 --- a/docs/integration/pinit/index.html +++ b/docs/integration/pinit/index.html @@ -5,7 +5,7 @@ Pinit | Touying - + diff --git a/docs/integration/polylux/index.html b/docs/integration/polylux/index.html index c32d943e1..bbf2d46ea 100644 --- a/docs/integration/polylux/index.html +++ b/docs/integration/polylux/index.html @@ -5,7 +5,7 @@ Polylux | Touying - + diff --git a/docs/intro/index.html b/docs/intro/index.html index f387e1482..3c9eab652 100644 --- a/docs/intro/index.html +++ b/docs/intro/index.html @@ -5,7 +5,7 @@ Introduction to Touying | Touying - + diff --git a/docs/layout/index.html b/docs/layout/index.html index 7b33fcf27..ac8c0480e 100644 --- a/docs/layout/index.html +++ b/docs/layout/index.html @@ -5,7 +5,7 @@ Page Layout | Touying - + diff --git a/docs/next/build-your-own-theme/index.html b/docs/next/build-your-own-theme/index.html index 54ea83dd9..2b96fc65a 100644 --- a/docs/next/build-your-own-theme/index.html +++ b/docs/next/build-your-own-theme/index.html @@ -5,7 +5,7 @@ Creating Your Own Theme | Touying - + @@ -33,7 +33,7 @@

Mo

You can then import and use the theme by:

#import "@preview/touying:0.3.3": *
#import "university.typ"

#let s = university.register(aspect-ratio: "16-9")
-

For a specific example, refer to: https://typst.app/project/pdWNTS47I-6jxHrWdMSTLx

+

For a specific example, refer to: https://typst.app/project/rqRuzg0keo_ZEB5AdxjweA

Import

Depending on whether the theme is for personal use or part of Touying, you can import in two ways:

If for personal use:

diff --git a/docs/next/category/dynamic-slides/index.html b/docs/next/category/dynamic-slides/index.html index 8f21d5374..1835a5c43 100644 --- a/docs/next/category/dynamic-slides/index.html +++ b/docs/next/category/dynamic-slides/index.html @@ -5,7 +5,7 @@ Dynamic Slides | Touying - + diff --git a/docs/next/category/external-tools/index.html b/docs/next/category/external-tools/index.html index c6113f2e4..b7b8d6914 100644 --- a/docs/next/category/external-tools/index.html +++ b/docs/next/category/external-tools/index.html @@ -5,7 +5,7 @@ External Tools | Touying - + diff --git a/docs/next/category/package-integration/index.html b/docs/next/category/package-integration/index.html index 4f659a97a..b1f39b950 100644 --- a/docs/next/category/package-integration/index.html +++ b/docs/next/category/package-integration/index.html @@ -5,7 +5,7 @@ Package Integration | Touying - + diff --git a/docs/next/category/progress/index.html b/docs/next/category/progress/index.html index cd21f3af1..76b23ad4c 100644 --- a/docs/next/category/progress/index.html +++ b/docs/next/category/progress/index.html @@ -5,7 +5,7 @@ Progress | Touying - + diff --git a/docs/next/category/themes/index.html b/docs/next/category/themes/index.html index 8b0061aa2..aa8b2591b 100644 --- a/docs/next/category/themes/index.html +++ b/docs/next/category/themes/index.html @@ -5,7 +5,7 @@ Themes | Touying - + diff --git a/docs/next/category/utilities/index.html b/docs/next/category/utilities/index.html index d5c9ae7c1..85937eb81 100644 --- a/docs/next/category/utilities/index.html +++ b/docs/next/category/utilities/index.html @@ -5,7 +5,7 @@ Utilities | Touying - + diff --git a/docs/next/changelog/index.html b/docs/next/changelog/index.html index 0688215bc..6f59056ce 100644 --- a/docs/next/changelog/index.html +++ b/docs/next/changelog/index.html @@ -5,7 +5,7 @@ Changelog | Touying - + diff --git a/docs/next/code-styles/index.html b/docs/next/code-styles/index.html index def9ad1ca..87130383a 100644 --- a/docs/next/code-styles/index.html +++ b/docs/next/code-styles/index.html @@ -5,7 +5,7 @@ Code Style | Touying - + diff --git a/docs/next/dynamic/complex/index.html b/docs/next/dynamic/complex/index.html index 615cb6ad1..5f3d36223 100644 --- a/docs/next/dynamic/complex/index.html +++ b/docs/next/dynamic/complex/index.html @@ -5,7 +5,7 @@ Complex Animations | Touying - + diff --git a/docs/next/dynamic/cover/index.html b/docs/next/dynamic/cover/index.html index 3c029d4e7..e64faef83 100644 --- a/docs/next/dynamic/cover/index.html +++ b/docs/next/dynamic/cover/index.html @@ -5,7 +5,7 @@ Cover Function | Touying - + diff --git a/docs/next/dynamic/equation/index.html b/docs/next/dynamic/equation/index.html index 81dd2dba0..44981f605 100644 --- a/docs/next/dynamic/equation/index.html +++ b/docs/next/dynamic/equation/index.html @@ -5,7 +5,7 @@ Math Equation Animations | Touying - + diff --git a/docs/next/dynamic/handout/index.html b/docs/next/dynamic/handout/index.html index 49c7472c6..e6b286fc8 100644 --- a/docs/next/dynamic/handout/index.html +++ b/docs/next/dynamic/handout/index.html @@ -5,7 +5,7 @@ Handout Mode | Touying - + diff --git a/docs/next/dynamic/other/index.html b/docs/next/dynamic/other/index.html index c5262d5eb..83079175d 100644 --- a/docs/next/dynamic/other/index.html +++ b/docs/next/dynamic/other/index.html @@ -5,7 +5,7 @@ Other Animations | Touying - + diff --git a/docs/next/dynamic/simple/index.html b/docs/next/dynamic/simple/index.html index 74bb6d4ce..700419844 100644 --- a/docs/next/dynamic/simple/index.html +++ b/docs/next/dynamic/simple/index.html @@ -5,7 +5,7 @@ Simple Animations | Touying - + diff --git a/docs/next/external/pdfpc/index.html b/docs/next/external/pdfpc/index.html index f3052ccde..e0ea3d416 100644 --- a/docs/next/external/pdfpc/index.html +++ b/docs/next/external/pdfpc/index.html @@ -5,7 +5,7 @@ Pdfpc | Touying - + diff --git a/docs/next/external/typst-preview/index.html b/docs/next/external/typst-preview/index.html index a2799fbbd..42750682b 100644 --- a/docs/next/external/typst-preview/index.html +++ b/docs/next/external/typst-preview/index.html @@ -5,7 +5,7 @@ Typst Preview | Touying - + diff --git a/docs/next/global-settings/index.html b/docs/next/global-settings/index.html index f2374c506..28567926c 100644 --- a/docs/next/global-settings/index.html +++ b/docs/next/global-settings/index.html @@ -5,7 +5,7 @@ Global Settings | Touying - + diff --git a/docs/next/integration/cetz/index.html b/docs/next/integration/cetz/index.html index 20992f4cb..edc8879fd 100644 --- a/docs/next/integration/cetz/index.html +++ b/docs/next/integration/cetz/index.html @@ -5,7 +5,7 @@ CeTZ | Touying - + diff --git a/docs/next/integration/codly/index.html b/docs/next/integration/codly/index.html index 739575afe..aa99b6de2 100644 --- a/docs/next/integration/codly/index.html +++ b/docs/next/integration/codly/index.html @@ -5,7 +5,7 @@ Codly | Touying - + diff --git a/docs/next/integration/fletcher/index.html b/docs/next/integration/fletcher/index.html index 263691161..0275bf869 100644 --- a/docs/next/integration/fletcher/index.html +++ b/docs/next/integration/fletcher/index.html @@ -5,7 +5,7 @@ Fletcher | Touying - + diff --git a/docs/next/integration/mitex/index.html b/docs/next/integration/mitex/index.html index 532fed632..fd28acd50 100644 --- a/docs/next/integration/mitex/index.html +++ b/docs/next/integration/mitex/index.html @@ -5,7 +5,7 @@ MiTeX | Touying - + diff --git a/docs/next/integration/pinit/index.html b/docs/next/integration/pinit/index.html index fbddd7417..92a88ec9f 100644 --- a/docs/next/integration/pinit/index.html +++ b/docs/next/integration/pinit/index.html @@ -5,7 +5,7 @@ Pinit | Touying - + diff --git a/docs/next/integration/polylux/index.html b/docs/next/integration/polylux/index.html index e2ff6e44d..390c31dd2 100644 --- a/docs/next/integration/polylux/index.html +++ b/docs/next/integration/polylux/index.html @@ -5,7 +5,7 @@ Polylux | Touying - + diff --git a/docs/next/intro/index.html b/docs/next/intro/index.html index 404cbfe1e..77d773ac7 100644 --- a/docs/next/intro/index.html +++ b/docs/next/intro/index.html @@ -5,7 +5,7 @@ Introduction to Touying | Touying - + diff --git a/docs/next/layout/index.html b/docs/next/layout/index.html index 722730bbb..ef373f1da 100644 --- a/docs/next/layout/index.html +++ b/docs/next/layout/index.html @@ -5,7 +5,7 @@ Page Layout | Touying - + diff --git a/docs/next/progress/counters/index.html b/docs/next/progress/counters/index.html index 021f86ee9..bf1a6f24a 100644 --- a/docs/next/progress/counters/index.html +++ b/docs/next/progress/counters/index.html @@ -5,7 +5,7 @@ Touying Counters | Touying - + diff --git a/docs/next/progress/sections/index.html b/docs/next/progress/sections/index.html index 9a8ed7f22..4f16f9d28 100644 --- a/docs/next/progress/sections/index.html +++ b/docs/next/progress/sections/index.html @@ -5,7 +5,7 @@ Touying Sections | Touying - + diff --git a/docs/next/sections/index.html b/docs/next/sections/index.html index fabd173b6..8699746fe 100644 --- a/docs/next/sections/index.html +++ b/docs/next/sections/index.html @@ -5,7 +5,7 @@ Sections and Subsections | Touying - + diff --git a/docs/next/start/index.html b/docs/next/start/index.html index ee83a5781..69fd8d085 100644 --- a/docs/next/start/index.html +++ b/docs/next/start/index.html @@ -5,7 +5,7 @@ Getting Started | Touying - + diff --git a/docs/next/themes/aqua/index.html b/docs/next/themes/aqua/index.html index dd53361f9..967de6b7f 100644 --- a/docs/next/themes/aqua/index.html +++ b/docs/next/themes/aqua/index.html @@ -5,7 +5,7 @@ Aqua Theme | Touying - + diff --git a/docs/next/themes/dewdrop/index.html b/docs/next/themes/dewdrop/index.html index 7a4d9a749..8f8c3cf51 100644 --- a/docs/next/themes/dewdrop/index.html +++ b/docs/next/themes/dewdrop/index.html @@ -5,7 +5,7 @@ Dewdrop Theme | Touying - + diff --git a/docs/next/themes/metropolis/index.html b/docs/next/themes/metropolis/index.html index a797ba339..52023d650 100644 --- a/docs/next/themes/metropolis/index.html +++ b/docs/next/themes/metropolis/index.html @@ -5,7 +5,7 @@ Metropolis Theme | Touying - + diff --git a/docs/next/themes/simple/index.html b/docs/next/themes/simple/index.html index 48fd21ad7..3afb1d543 100644 --- a/docs/next/themes/simple/index.html +++ b/docs/next/themes/simple/index.html @@ -5,7 +5,7 @@ Simple Theme | Touying - + diff --git a/docs/next/themes/university/index.html b/docs/next/themes/university/index.html index 531835078..d5b818355 100644 --- a/docs/next/themes/university/index.html +++ b/docs/next/themes/university/index.html @@ -5,7 +5,7 @@ University Theme | Touying - + diff --git a/docs/next/utilities/fit-to/index.html b/docs/next/utilities/fit-to/index.html index fe02ca8dd..89742e40a 100644 --- a/docs/next/utilities/fit-to/index.html +++ b/docs/next/utilities/fit-to/index.html @@ -5,7 +5,7 @@ Fit to Height / Width | Touying - + diff --git a/docs/next/utilities/oop/index.html b/docs/next/utilities/oop/index.html index a74de958f..f1e22e0c5 100644 --- a/docs/next/utilities/oop/index.html +++ b/docs/next/utilities/oop/index.html @@ -5,7 +5,7 @@ Object-Oriented Programming | Touying - + diff --git a/docs/progress/counters/index.html b/docs/progress/counters/index.html index c52ea1923..73c058808 100644 --- a/docs/progress/counters/index.html +++ b/docs/progress/counters/index.html @@ -5,7 +5,7 @@ Touying Counters | Touying - + diff --git a/docs/progress/sections/index.html b/docs/progress/sections/index.html index 2a1c214ab..b5d057791 100644 --- a/docs/progress/sections/index.html +++ b/docs/progress/sections/index.html @@ -5,7 +5,7 @@ Touying Sections | Touying - + diff --git a/docs/sections/index.html b/docs/sections/index.html index facb79327..cadd36600 100644 --- a/docs/sections/index.html +++ b/docs/sections/index.html @@ -5,7 +5,7 @@ Sections and Subsections | Touying - + diff --git a/docs/start/index.html b/docs/start/index.html index 14a354bb1..50cad9f30 100644 --- a/docs/start/index.html +++ b/docs/start/index.html @@ -5,7 +5,7 @@ Getting Started | Touying - + diff --git a/docs/themes/aqua/index.html b/docs/themes/aqua/index.html index c66783ad0..3aa68e2cd 100644 --- a/docs/themes/aqua/index.html +++ b/docs/themes/aqua/index.html @@ -5,7 +5,7 @@ Aqua Theme | Touying - + diff --git a/docs/themes/dewdrop/index.html b/docs/themes/dewdrop/index.html index f93bf40c7..412d73319 100644 --- a/docs/themes/dewdrop/index.html +++ b/docs/themes/dewdrop/index.html @@ -5,7 +5,7 @@ Dewdrop Theme | Touying - + diff --git a/docs/themes/metropolis/index.html b/docs/themes/metropolis/index.html index 638d4404c..af8b66fb1 100644 --- a/docs/themes/metropolis/index.html +++ b/docs/themes/metropolis/index.html @@ -5,7 +5,7 @@ Metropolis Theme | Touying - + diff --git a/docs/themes/simple/index.html b/docs/themes/simple/index.html index 741ee62d5..74a40b79a 100644 --- a/docs/themes/simple/index.html +++ b/docs/themes/simple/index.html @@ -5,7 +5,7 @@ Simple Theme | Touying - + diff --git a/docs/themes/university/index.html b/docs/themes/university/index.html index 80bf72540..f666cb908 100644 --- a/docs/themes/university/index.html +++ b/docs/themes/university/index.html @@ -5,7 +5,7 @@ University Theme | Touying - + diff --git a/docs/utilities/fit-to/index.html b/docs/utilities/fit-to/index.html index ba8b361c9..ace3ad90e 100644 --- a/docs/utilities/fit-to/index.html +++ b/docs/utilities/fit-to/index.html @@ -5,7 +5,7 @@ Fit to Height / Width | Touying - + diff --git a/docs/utilities/oop/index.html b/docs/utilities/oop/index.html index ec98f7602..ba15f9e65 100644 --- a/docs/utilities/oop/index.html +++ b/docs/utilities/oop/index.html @@ -5,7 +5,7 @@ Object-Oriented Programming | Touying - + diff --git a/index.html b/index.html index 44193c0a5..0d7344fb8 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Touying in Typst | Touying - + diff --git a/markdown-page/index.html b/markdown-page/index.html index 73d1cfc9c..b3333a071 100644 --- a/markdown-page/index.html +++ b/markdown-page/index.html @@ -5,7 +5,7 @@ Markdown page example | Touying - + diff --git a/zh/404.html b/zh/404.html index 38568b8cf..088aeca3f 100644 --- a/zh/404.html +++ b/zh/404.html @@ -5,7 +5,7 @@ 找不到页面 | Touying - + diff --git a/zh/assets/js/4bd433da.427fe6e2.js b/zh/assets/js/4bd433da.af1e98ec.js similarity index 99% rename from zh/assets/js/4bd433da.427fe6e2.js rename to zh/assets/js/4bd433da.af1e98ec.js index a27201803..410943559 100644 --- a/zh/assets/js/4bd433da.427fe6e2.js +++ b/zh/assets/js/4bd433da.af1e98ec.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9758],{3122:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>r,contentTitle:()=>o,default:()=>a,frontMatter:()=>t,metadata:()=>d,toc:()=>c});var i=n(5893),l=n(1151);const t={sidebar_position:10},o="\u521b\u5efa\u81ea\u5df1\u7684\u4e3b\u9898",d={id:"build-your-own-theme",title:"\u521b\u5efa\u81ea\u5df1\u7684\u4e3b\u9898",description:"\u4f7f\u7528 Touying \u521b\u5efa\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\u662f\u4e00\u4ef6\u7565\u663e\u590d\u6742\u7684\u4e8b\u60c5\uff0c\u56e0\u4e3a\u6211\u4eec\u5f15\u5165\u4e86\u8bb8\u591a\u7684\u6982\u5ff5\u3002\u4e0d\u8fc7\u8bf7\u653e\u5fc3\uff0c\u5982\u679c\u60a8\u771f\u7684\u7528 Touying \u521b\u5efa\u4e86\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\uff0c\u4e5f\u8bb8\u60a8\u5c31\u53ef\u4ee5\u6df1\u5207\u5730\u611f\u53d7\u5230 Touying \u63d0\u4f9b\u7684\u4fbf\u5229\u7684\u529f\u80fd\u7684\u548c\u5f3a\u5927\u7684\u53ef\u5b9a\u5236\u6027\u3002\u60a8\u53ef\u4ee5\u53c2\u8003 \u4e3b\u9898\u7684\u6e90\u4ee3\u7801\uff0c\u4e3b\u8981\u9700\u8981\u5b9e\u73b0\u7684\u5c31\u662f\uff1a",source:"@site/i18n/zh/docusaurus-plugin-content-docs/version-0.3.2+/build-your-own-theme.md",sourceDirName:".",slug:"/build-your-own-theme",permalink:"/touying/zh/docs/build-your-own-theme",draft:!1,unlisted:!1,editUrl:"https://github.com/touying-typ/touying/tree/main/docs/versioned_docs/version-0.3.2+/build-your-own-theme.md",tags:[],version:"0.3.2+",sidebarPosition:10,frontMatter:{sidebar_position:10},sidebar:"tutorialSidebar",previous:{title:"Aqua \u4e3b\u9898",permalink:"/touying/zh/docs/themes/aqua"},next:{title:"Progress",permalink:"/touying/zh/docs/category/progress"}},r={},c=[{value:"\u4fee\u6539\u5df2\u6709\u4e3b\u9898",id:"\u4fee\u6539\u5df2\u6709\u4e3b\u9898",level:2},{value:"\u5bfc\u5165",id:"\u5bfc\u5165",level:2},{value:"register \u51fd\u6570\u548c init \u65b9\u6cd5",id:"register-\u51fd\u6570\u548c-init-\u65b9\u6cd5",level:2},{value:"\u989c\u8272\u4e3b\u9898",id:"\u989c\u8272\u4e3b\u9898",level:2},{value:"\u5b9e\u6218\uff1a\u81ea\u5b9a\u4e49 Alert \u65b9\u6cd5",id:"\u5b9e\u6218\u81ea\u5b9a\u4e49-alert-\u65b9\u6cd5",level:2},{value:"\u81ea\u5b9a\u4e49 Header \u548c Footer",id:"\u81ea\u5b9a\u4e49-header-\u548c-footer",level:2},{value:"\u81ea\u5b9a\u4e49\u7279\u6b8a Slide",id:"\u81ea\u5b9a\u4e49\u7279\u6b8a-slide",level:2},{value:"\u603b\u7ed3",id:"\u603b\u7ed3",level:2}];function h(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.h1,{id:"\u521b\u5efa\u81ea\u5df1\u7684\u4e3b\u9898",children:"\u521b\u5efa\u81ea\u5df1\u7684\u4e3b\u9898"}),"\n",(0,i.jsxs)(s.p,{children:["\u4f7f\u7528 Touying \u521b\u5efa\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\u662f\u4e00\u4ef6\u7565\u663e\u590d\u6742\u7684\u4e8b\u60c5\uff0c\u56e0\u4e3a\u6211\u4eec\u5f15\u5165\u4e86\u8bb8\u591a\u7684\u6982\u5ff5\u3002\u4e0d\u8fc7\u8bf7\u653e\u5fc3\uff0c\u5982\u679c\u60a8\u771f\u7684\u7528 Touying \u521b\u5efa\u4e86\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\uff0c\u4e5f\u8bb8\u60a8\u5c31\u53ef\u4ee5\u6df1\u5207\u5730\u611f\u53d7\u5230 Touying \u63d0\u4f9b\u7684\u4fbf\u5229\u7684\u529f\u80fd\u7684\u548c\u5f3a\u5927\u7684\u53ef\u5b9a\u5236\u6027\u3002\u60a8\u53ef\u4ee5\u53c2\u8003 ",(0,i.jsx)(s.a,{href:"https://github.com/touying-typ/touying/tree/main/themes",children:"\u4e3b\u9898\u7684\u6e90\u4ee3\u7801"}),"\uff0c\u4e3b\u8981\u9700\u8981\u5b9e\u73b0\u7684\u5c31\u662f\uff1a"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\uff0c\u521d\u59cb\u5316\u5168\u5c40\u5355\u4f8b ",(0,i.jsx)(s.code,{children:"s"}),"\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"init"})," \u65b9\u6cd5\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49\u989c\u8272\u4e3b\u9898\uff0c\u5373\u4fee\u6539 ",(0,i.jsx)(s.code,{children:"self.colors"})," \u6210\u5458\u53d8\u91cf\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"alert"})," \u65b9\u6cd5\uff0c\u53ef\u9009\uff1b"]}),"\n",(0,i.jsx)(s.li,{children:"\u81ea\u5b9a\u4e49 header\uff1b"}),"\n",(0,i.jsx)(s.li,{children:"\u81ea\u5b9a\u4e49 footer\uff1b"}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"slide"})," \u65b9\u6cd5\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49\u7279\u6b8a slide \u65b9\u6cd5\uff0c\u5982 ",(0,i.jsx)(s.code,{children:"title-slide"})," \u548c ",(0,i.jsx)(s.code,{children:"focus-slide"})," \u65b9\u6cd5\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"slides"})," \u65b9\u6cd5\uff0c\u53ef\u9009\uff1b"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"\u4e3a\u4e86\u6f14\u793a\u5982\u4f55\u4f7f\u7528 Touying \u521b\u5efa\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\uff0c\u6211\u4eec\u4e0d\u59a8\u6765\u4e00\u6b65\u4e00\u6b65\u5730\u521b\u5efa\u4e00\u4e2a\u7b80\u6d01\u7f8e\u89c2\u7684 Bamboo \u4e3b\u9898\u3002"}),"\n",(0,i.jsx)(s.h2,{id:"\u4fee\u6539\u5df2\u6709\u4e3b\u9898",children:"\u4fee\u6539\u5df2\u6709\u4e3b\u9898"}),"\n",(0,i.jsx)(s.p,{children:"\u5982\u679c\u4f60\u60f3\u5728\u672c\u5730\u4fee\u6539\u4e00\u4e2a Touying \u5185\u90e8\u7684 themes\uff0c\u800c\u4e0d\u662f\u81ea\u5df1\u4ece\u96f6\u5f00\u59cb\u521b\u5efa\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u901a\u8fc7\u4e0b\u9762\u7684\u65b9\u5f0f\u5b9e\u73b0\uff1a"}),"\n",(0,i.jsxs)(s.ol,{children:["\n",(0,i.jsxs)(s.li,{children:["\u5c06 ",(0,i.jsx)(s.code,{children:"themes"})," \u76ee\u5f55\u4e0b\u7684 ",(0,i.jsx)(s.a,{href:"https://github.com/touying-typ/touying/tree/main/themes",children:"\u4e3b\u9898\u4ee3\u7801"})," \u590d\u5236\u5230\u672c\u5730\uff0c\u4f8b\u5982\u5c06 ",(0,i.jsx)(s.code,{children:"themes/university.typ"})," \u590d\u5236\u5230\u672c\u5730 ",(0,i.jsx)(s.code,{children:"university.typ"})," \u4e2d\u3002"]}),"\n",(0,i.jsxs)(s.li,{children:["\u5c06 ",(0,i.jsx)(s.code,{children:"university.typ"})," \u6587\u4ef6\u9876\u90e8\u7684 ",(0,i.jsx)(s.code,{children:'#import "../xxx.typ"'})," \u547d\u4ee4\u5168\u90e8\u79fb\u9664\u3002"]}),"\n",(0,i.jsxs)(s.li,{children:["\u5411 ",(0,i.jsx)(s.code,{children:"university.typ"})," \u6587\u4ef6\u9876\u90e8\u4e2d\u52a0\u5165 ",(0,i.jsx)(s.code,{children:'#import "@preview/touying:0.3.3": *'})," \u6765\u5bfc\u5165\u6240\u6709\u6a21\u5757\u3002"]}),"\n",(0,i.jsxs)(s.li,{children:["\u5c06 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u4e2d\u7684 ",(0,i.jsx)(s.code,{children:"self: s"})," \u66ff\u6362\u6210 ",(0,i.jsx)(s.code,{children:"self: themes.default.register()"})," ",(0,i.jsx)(s.strong,{children:"(\u91cd\u8981)"}),"\u3002"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"\u7136\u540e\u5c31\u53ef\u4ee5\u901a\u8fc7"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#import "@preview/touying:0.3.3": *\n#import "university.typ"\n\n#let s = university.register(aspect-ratio: "16-9")\n'})}),"\n",(0,i.jsx)(s.p,{children:"\u7684\u65b9\u5f0f\u5bfc\u5165\u548c\u4f7f\u7528\u4e3b\u9898\u4e86\u3002"}),"\n",(0,i.jsxs)(s.p,{children:["\u4e00\u4e2a\u5177\u4f53\u7684\u793a\u4f8b\uff1a",(0,i.jsx)(s.a,{href:"https://typst.app/project/pdWNTS47I-6jxHrWdMSTLx",children:"https://typst.app/project/pdWNTS47I-6jxHrWdMSTLx"})]}),"\n",(0,i.jsx)(s.h2,{id:"\u5bfc\u5165",children:"\u5bfc\u5165"}),"\n",(0,i.jsx)(s.p,{children:"\u53d6\u51b3\u4e8e\u8fd9\u4e2a\u4e3b\u9898\u662f\u4f60\u81ea\u5df1\u7684\uff0c\u8fd8\u662f Touying \u7684\u4e00\u90e8\u5206\uff0c\u4f60\u53ef\u4ee5\u7528\u4e24\u79cd\u65b9\u5f0f\u5bfc\u5165\uff1a"}),"\n",(0,i.jsx)(s.p,{children:"\u5982\u679c\u53ea\u662f\u4f60\u81ea\u5df1\u4f7f\u7528\uff0c\u4f60\u53ef\u4ee5\u76f4\u63a5\u5bfc\u5165 Touying\uff1a"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#import "@preview/touying:0.3.3": *\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u5982\u679c\u4f60\u5e0c\u671b\u8fd9\u4e2a\u4e3b\u9898\u4f5c\u4e3a Touying \u7684\u4e00\u90e8\u5206\uff0c\u653e\u7f6e\u5728 Touying ",(0,i.jsx)(s.code,{children:"themes"})," \u76ee\u5f55\u4e0b\uff0c\u90a3\u4f60\u5e94\u8be5\u5c06\u4e0a\u9762\u7684\u5bfc\u5165\u8bed\u53e5\u6539\u4e3a"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#import "../utils/utils.typ"\n#import "../utils/states.typ"\n#import "../utils/components.typ"\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u5e76\u4e14\u8981\u5728 Touying \u7684 ",(0,i.jsx)(s.code,{children:"themes/themes.typ"})," \u91cc\u52a0\u4e0a"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{children:'#import "bamboo.typ"\n'})}),"\n",(0,i.jsx)(s.h2,{id:"register-\u51fd\u6570\u548c-init-\u65b9\u6cd5",children:"register \u51fd\u6570\u548c init \u65b9\u6cd5"}),"\n",(0,i.jsxs)(s.p,{children:["\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u4f1a\u533a\u5206 ",(0,i.jsx)(s.code,{children:"bamboo.typ"})," \u6a21\u677f\u6587\u4ef6\u548c ",(0,i.jsx)(s.code,{children:"main.typ"})," \u6587\u4ef6\uff0c\u540e\u8005\u6709\u65f6\u4f1a\u88ab\u7701\u7565\u3002"]}),"\n",(0,i.jsx)(s.p,{children:"\u4e00\u822c\u800c\u8a00\uff0c\u6211\u4eec\u5236\u4f5c slides \u7684\u7b2c\u4e00\u6b65\uff0c\u5c31\u662f\u786e\u5b9a\u597d\u5b57\u4f53\u5927\u5c0f\u548c\u9875\u9762\u957f\u5bbd\u6bd4\uff0c\u56e0\u6b64\u6211\u4eec\u9700\u8981\u6ce8\u518c\u4e00\u4e2a\u521d\u59cb\u5316\u65b9\u6cd5\uff1a"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n) = {\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n )\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9")\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u5982\u60a8\u6240\u89c1\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\uff0c\u5e76\u4f20\u5165\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"aspect-ratio"})," \u53c2\u6570\u6765\u8bbe\u5b9a\u9875\u9762\u957f\u5bbd\u6bd4\u3002\u6211\u4eec\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"self: themes.default.register()"})," \u7684\u65b9\u5f0f\uff0c\u83b7\u5f97\u4e86\u7f3a\u7701\u7684 ",(0,i.jsx)(s.code,{children:"self"}),"\u3002\u7136\u540e\u6211\u4eec\u5c31\u9700\u8981\u8bbe\u7f6e\u9875\u9762\u53c2\u6570\u4e86\u3002\u60a8\u5e94\u8be5\u5df2\u7ecf\u77e5\u9053\u4e86\uff0c\u5728 Touying \u4e2d\uff0c\u6211\u4eec\u4e0d\u5e94\u8be5\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"set page(..)"})," \u6765\u8bbe\u7f6e\u9875\u9762\u53c2\u6570\uff0c\u800c\u662f\u5e94\u8be5\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:" self.page-args += (..)"})," \u8fd9\u79cd\u8bed\u6cd5\u6765\u8bbe\u7f6e\uff0c\u5177\u4f53\u5185\u5bb9\u53ef\u4ee5\u53c2\u8003\u9875\u9762\u5e03\u5c40\u7ae0\u8282\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u9664\u6b64\u4e4b\u5916\uff0c\u6211\u4eec\u8fd8\u6ce8\u518c\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"self.methods.init"})," \u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u7528\u6765\u8fdb\u884c\u4e00\u4e9b\u5168\u5c40\u7684\u6837\u5f0f\u8bbe\u7f6e\uff0c\u4f8b\u5982\u5728\u6b64\u5904\uff0c\u6211\u4eec\u52a0\u4e0a\u4e86 ",(0,i.jsx)(s.code,{children:"set text(size: 20pt)"})," \u6765\u8bbe\u7f6e\u6587\u5b57\u5927\u5c0f\u3002\u4f60\u4e5f\u53ef\u4ee5\u5728\u8fd9\u91cc\u653e\u7f6e\u4e00\u4e9b\u989d\u5916\u7684\u5168\u5c40\u6837\u5f0f\u8bbe\u7f6e\uff0c\u4f8b\u5982 ",(0,i.jsx)(s.code,{children:"set par(justify: true)"})," \u7b49\u3002\u7531\u4e8e ",(0,i.jsx)(s.code,{children:"init"})," \u51fd\u6570\u88ab\u653e\u7f6e\u5230\u4e86 ",(0,i.jsx)(s.code,{children:"self.methods"})," \u91cc\uff0c\u662f\u4e00\u4e2a\u65b9\u6cd5\uff0c\u800c\u975e\u666e\u901a\u51fd\u6570\uff0c\u56e0\u6b64\u6211\u4eec\u9700\u8981\u52a0\u4e0a ",(0,i.jsx)(s.code,{children:"self: none"})," \u53c2\u6570\u624d\u80fd\u6b63\u5e38\u4f7f\u7528\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5982\u60a8\u6240\u89c1\uff0c\u540e\u7eed\u5728 ",(0,i.jsx)(s.code,{children:"main.typ"})," \u4e2d\uff0c\u6211\u4eec\u4f1a\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"#show: init"})," \u6765\u5e94\u7528 ",(0,i.jsx)(s.code,{children:"init"})," \u65b9\u6cd5\u91cc\u9762\u7684\u5168\u5c40\u6837\u5f0f\u8bbe\u7f6e\uff0c\u5176\u4e2d ",(0,i.jsx)(s.code,{children:"init"})," \u51fd\u6570\u662f\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"utils.methods(s)"})," \u7ed1\u5b9a\u5e76\u89e3\u5305\u800c\u6765\u7684\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5982\u679c\u60a8\u591a\u52a0\u6ce8\u610f\uff0c\u60a8\u4f1a\u53d1\u73b0 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u6700\u540e\u6709\u4e00\u884c\u72ec\u7acb\u7684 ",(0,i.jsx)(s.code,{children:"self"}),"\uff0c\u8fd9\u5176\u5b9e\u662f\u4ee3\u8868\u4e86\u5c06\u4fee\u6539\u540e\u7684 ",(0,i.jsx)(s.code,{children:"self"})," \u4f5c\u4e3a\u8fd4\u56de\u503c\u8fd4\u56de\uff0c\u540e\u7eed\u4f1a\u88ab\u4fdd\u5b58\u5728 ",(0,i.jsx)(s.code,{children:"#let s = .."})," \u4e2d\uff0c\u56e0\u6b64\u8fd9\u4e00\u884c\u662f\u4e0d\u53ef\u6216\u7f3a\u7684\u3002"]}),"\n",(0,i.jsx)(s.h2,{id:"\u989c\u8272\u4e3b\u9898",children:"\u989c\u8272\u4e3b\u9898"}),"\n",(0,i.jsxs)(s.p,{children:["\u4e3a\u60a8\u7684 slides \u6311\u9009\u4e00\u4e2a\u7f8e\u89c2\u7684\u989c\u8272\u4e3b\u9898\uff0c\u662f\u505a\u597d\u4e00\u4e2a slides \u7684\u5173\u952e\u6240\u5728\u3002Touying \u63d0\u4f9b\u4e86\u5185\u7f6e\u7684\u989c\u8272\u4e3b\u9898\u652f\u6301\uff0c\u4ee5\u5c3d\u91cf\u62b9\u5e73\u4e0d\u540c\u4e3b\u9898\u4e4b\u95f4\u7684 API \u5dee\u5f02\u3002Touying \u63d0\u4f9b\u4e86\u4e24\u4e2a\u7ef4\u5ea6\u7684\u989c\u8272\u9009\u62e9\uff0c\u7b2c\u4e00\u4e2a\u7ef4\u5ea6\u662f ",(0,i.jsx)(s.code,{children:"neutral"}),"\u3001",(0,i.jsx)(s.code,{children:"primary"}),"\u3001",(0,i.jsx)(s.code,{children:"secondary"})," \u548c ",(0,i.jsx)(s.code,{children:"tertiary"}),"\uff0c\u7528\u4e8e\u533a\u5206\u8272\u8c03\uff0c\u5176\u4e2d\u6700\u5e38\u7528\u7684\u5c31\u662f ",(0,i.jsx)(s.code,{children:"primary"})," \u4e3b\u9898\u8272\uff1b\u7b2c\u4e8c\u4e2a\u7ef4\u5ea6\u662f ",(0,i.jsx)(s.code,{children:"default"}),"\u3001",(0,i.jsx)(s.code,{children:"light"}),"\u3001",(0,i.jsx)(s.code,{children:"lighter"}),"\u3001",(0,i.jsx)(s.code,{children:"lightest"}),"\u3001",(0,i.jsx)(s.code,{children:"dark"}),"\u3001",(0,i.jsx)(s.code,{children:"darker"}),"\u3001",(0,i.jsx)(s.code,{children:"darkest"}),"\uff0c\u7528\u4e8e\u533a\u5206\u660e\u5ea6\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u7531\u4e8e\u6211\u4eec\u662f Bamboo \u4e3b\u9898\uff0c\u56e0\u6b64\u8fd9\u91cc\u7684\u4e3b\u9898\u8272 ",(0,i.jsx)(s.code,{children:"primary"})," \u6211\u4eec\u6311\u9009\u4e86\u4e00\u4e2a\u4e0e\u7af9\u5b50\u76f8\u8fd1\u7684\u989c\u8272 ",(0,i.jsx)(s.code,{children:'rgb("#5E8B65")'}),"\uff0c\u5e76\u52a0\u5165\u4e86\u4e2d\u6027\u8272 ",(0,i.jsx)(s.code,{children:"neutral-lightest"}),"\uff0c",(0,i.jsx)(s.code,{children:"neutral-darkest"}),"\uff0c\u5206\u522b\u4f5c\u4e3a\u80cc\u666f\u8272\u548c\u5b57\u4f53\u989c\u8272\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u6b63\u5982\u4e0b\u9762\u7684\u4ee3\u7801\u6240\u793a\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"self = (self.methods.colors)(self: self, ..)"})," \u65b9\u6cd5\u4fee\u6539\u989c\u8272\u4e3b\u9898\u3002\u5176\u672c\u8d28\u5c31\u662f ",(0,i.jsx)(s.code,{children:"self.colors += (..)"})," \u7684\u4e00\u4e2a\u5305\u88c5\u3002"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n )\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u50cf\u8fd9\u6837\u6dfb\u52a0\u4e86\u989c\u8272\u4e3b\u9898\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"self.colors.primary"})," \u8fd9\u6837\u7684\u65b9\u5f0f\u83b7\u53d6\u5230\u8fd9\u4e2a\u989c\u8272\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5e76\u4e14\u6709\u4e00\u70b9\u503c\u5f97\u6ce8\u610f\uff0c\u7528\u6237\u53ef\u4ee5\u968f\u65f6\u5728 ",(0,i.jsx)(s.code,{children:"main.typ"})," \u91cc\u901a\u8fc7"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#let s = (s.methods.colors)(self: s, primary: rgb("#3578B9"))\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u8fd9\u6837\u7684\u65b9\u5f0f\u4fee\u6539\u4e3b\u9898\u8272\uff0c\u5176\u4e2d\u8fd9\u53e5\u8bed\u53e5\u9700\u8981\u653e\u5728 ",(0,i.jsx)(s.code,{children:"register()"})," \u4e4b\u540e\uff0c\u4ee5\u53ca ",(0,i.jsx)(s.code,{children:"utils.methods(s)"})," \u4e4b\u524d\u3002"]}),"\n",(0,i.jsx)(s.p,{children:"\u8fd9\u79cd\u968f\u65f6\u66f4\u6362\u989c\u8272\u4e3b\u9898\u7684\u5185\u5bb9\uff0c\u6b63\u662f Touying \u5f3a\u5927\u53ef\u5b9a\u5236\u6027\u7684\u4f53\u73b0\u3002"}),"\n",(0,i.jsx)(s.h2,{id:"\u5b9e\u6218\u81ea\u5b9a\u4e49-alert-\u65b9\u6cd5",children:"\u5b9e\u6218\uff1a\u81ea\u5b9a\u4e49 Alert \u65b9\u6cd5"}),"\n",(0,i.jsxs)(s.p,{children:["\u4e00\u822c\u800c\u8a00\uff0c\u6211\u4eec\u90fd\u9700\u8981\u63d0\u4f9b\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"#alert[..]"})," \u51fd\u6570\u7ed9\u7528\u6237\u4f7f\u7528\uff0c\u5176\u7528\u9014\u4e0e ",(0,i.jsx)(s.code,{children:"#strong[..]"})," \u7c7b\u4f3c\uff0c\u90fd\u662f\u7528\u4e8e\u5f3a\u8c03\u5f53\u524d\u6587\u672c\u3002\u4e00\u822c ",(0,i.jsx)(s.code,{children:"#alert[..]"})," \u4f1a\u5c06\u6587\u672c\u989c\u8272\u4fee\u6539\u4e3a\u4e3b\u9898\u8272\uff0c\u8fd9\u6837\u770b\u8d77\u6765\u4f1a\u66f4\u7f8e\u89c2\uff0c\u8fd9\u4e5f\u662f\u6211\u4eec\u63a5\u4e0b\u6765\u8981\u5b9e\u73b0\u7684\u76ee\u6807\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u6211\u4eec\u5728 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u91cc\u52a0\u4e0a\u4e00\u53e5"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:"self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n"})}),"\n",(0,i.jsxs)(s.p,{children:["\u8fd9\u53e5\u4ee3\u7801\u7684\u610f\u601d\u5c31\u662f\u5c06\u6587\u672c\u989c\u8272\u4fee\u6539\u4e3a ",(0,i.jsx)(s.code,{children:"self.colors.primary"}),"\uff0c\u800c\u8fd9\u91cc\u7684 ",(0,i.jsx)(s.code,{children:"self"})," \u6b63\u662f\u901a\u8fc7\u53c2\u6570 ",(0,i.jsx)(s.code,{children:"self: none"})," \u4f20\u8fdb\u6765\u7684\uff0c\u8fd9\u6837\u6211\u4eec\u624d\u80fd\u5b9e\u65f6\u5730\u83b7\u53d6\u5230 ",(0,i.jsx)(s.code,{children:"primary"})," \u4e3b\u9898\u8272\u3002"]}),"\n",(0,i.jsx)(s.h2,{id:"\u81ea\u5b9a\u4e49-header-\u548c-footer",children:"\u81ea\u5b9a\u4e49 Header \u548c Footer"}),"\n",(0,i.jsx)(s.p,{children:"\u5728\u8fd9\u91cc\uff0c\u6211\u8ba4\u4e3a\u60a8\u5df2\u7ecf\u9605\u8bfb\u8fc7\u9875\u9762\u5e03\u5c40\u7ae0\u8282\u4e86\uff0c\u56e0\u6b64\u6211\u4eec\u77e5\u9053\u5e94\u8be5\u7ed9 slides \u52a0\u4e0a header \u548c footer\u3002"}),"\n",(0,i.jsxs)(s.p,{children:["\u9996\u5148\uff0c\u6211\u4eec\u5148\u52a0\u5165 ",(0,i.jsx)(s.code,{children:"self.bamboo-title = []"}),"\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u6211\u4eec\u5c06\u5f53\u524d slide \u7684\u6807\u9898\u4f5c\u4e3a\u4e00\u4e2a\u6210\u5458\u53d8\u91cf ",(0,i.jsx)(s.code,{children:"self.bamboo-title"}),"\uff0c\u4fdd\u5b58\u5728 ",(0,i.jsx)(s.code,{children:"self"})," \u91cc\u9762\uff0c\u8fd9\u6837\u65b9\u4fbf\u6211\u4eec\u5728 header \u91cc\u4f7f\u7528\uff0c\u4ee5\u53ca\u540e\u7eed\u4fee\u6539\u3002\u540c\u7406\uff0c\u6211\u4eec\u8fd8\u521b\u5efa\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"self.bamboo-footer"}),"\uff0c\u5e76\u5c06 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u7684 ",(0,i.jsx)(s.code,{children:"footer: []"})," \u53c2\u6570\u4fdd\u5b58\u8d77\u6765\uff0c\u7528\u4f5c\u5de6\u4e0b\u89d2\u7684 footer \u5c55\u793a\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u7136\u540e\u503c\u5f97\u6ce8\u610f\u7684\u5c31\u662f\uff0c\u6211\u4eec\u7684 header \u5176\u5b9e\u662f\u4e00\u4e2a\u5f62\u5982 ",(0,i.jsx)(s.code,{children:"let header(self) = { .. }"})," \u7684\u53c2\u6570\u4e3a ",(0,i.jsx)(s.code,{children:"self"})," \u7684 content \u51fd\u6570\uff0c\u800c\u4e0d\u662f\u4e00\u4e2a\u5355\u7eaf\u7684 content\uff0c\u8fd9\u6837\u6211\u4eec\u624d\u80fd\u4ece\u6700\u65b0\u7684 ",(0,i.jsx)(s.code,{children:"self"})," \u5185\u90e8\u83b7\u53d6\u5230\u6211\u4eec\u9700\u8981\u7684\u4fe1\u606f\uff0c\u4f8b\u5982 ",(0,i.jsx)(s.code,{children:"self.bamboo-title"}),"\u3002\u800c footer \u4e5f\u662f\u540c\u7406\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u91cc\u9762\u4f7f\u7528\u5230\u7684 ",(0,i.jsx)(s.code,{children:"components.cell"})," \u5176\u5b9e\u5c31\u662f ",(0,i.jsx)(s.code,{children:"#let cell = block.with(width: 100%, height: 100%, above: 0pt, below: 0pt, breakable: false)"}),"\uff0c\u800c ",(0,i.jsx)(s.code,{children:"show: components.cell"})," \u4e5f\u5c31\u662f ",(0,i.jsx)(s.code,{children:"components.cell(body)"})," \u7684\u7b80\u5199\uff0cfooter \u7684 ",(0,i.jsx)(s.code,{children:"show: pad.with(.4em)"})," \u4e5f\u662f\u540c\u7406\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u53e6\u4e00\u70b9\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c",(0,i.jsx)(s.code,{children:"states"})," \u6a21\u5757\u91cc\u653e\u7f6e\u4e86\u5f88\u591a\u548c\u8ba1\u6570\u5668\u3001\u72b6\u6001\u6709\u5173\u7684\u5185\u5bb9\uff0c\u4f8b\u5982 ",(0,i.jsx)(s.code,{children:"states.current-section-title"})," \u7528\u4e8e\u663e\u793a\u5f53\u524d\u7684 ",(0,i.jsx)(s.code,{children:"section"}),"\uff0c\u800c ",(0,i.jsx)(s.code,{children:'states.slide-counter.display() + " / " + states.last-slide-number'})," \u7528\u4e8e\u663e\u793a\u5f53\u524d\u9875\u6570\u548c\u603b\u9875\u6570\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u4ee5\u53ca\u6211\u4eec\u53d1\u73b0\u6211\u4eec\u4f1a\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"utils.call-or-display(self, self.bamboo-footer)"})," \u8fd9\u6837\u7684\u8bed\u6cd5\u6765\u663e\u793a ",(0,i.jsx)(s.code,{children:"self.bamboo-footer"}),"\uff0c\u8fd9\u662f\u7528\u4e8e\u5e94\u4ed8 ",(0,i.jsx)(s.code,{children:"self.bamboo-footer = (self) => {..}"})," \u8fd9\u79cd\u60c5\u51b5\uff0c\u8fd9\u6837\u6211\u4eec\u5c31\u80fd\u7edf\u4e00 content \u51fd\u6570\u548c content \u7684\u663e\u793a\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u4e3a\u4e86\u8ba9 header \u548c footer \u6b63\u786e\u663e\u793a\uff0c\u5e76\u4e14\u4e0e\u6b63\u6587\u6709\u8db3\u591f\u7684\u95f4\u9694\uff0c\u6211\u4eec\u8fd8\u8bbe\u7f6e\u4e86\u4e0a\u4e0b margin \u548c\u5de6\u53f3 padding\uff0c\u5982 ",(0,i.jsx)(s.code,{children:"self.page-args += (margin: (top: 4em, bottom: 1.5em, x: 0em))"})," \u548c ",(0,i.jsx)(s.code,{children:"self.padding = (x: 2em, y: 0em)"}),"\u3002\u5de6\u53f3 margin \u4e3a ",(0,i.jsx)(s.code,{children:"0em"})," \u662f\u4e3a\u4e86\u8ba9 header \u80fd\u5360\u6ee1\u9875\u9762\u5bbd\u5ea6\uff0c\u6b63\u6587\u7684\u5de6\u53f3\u95f4\u8ddd\u5c31\u4f9d\u9760\u5de6\u53f3 padding ",(0,i.jsx)(s.code,{children:"2em"})," \u6765\u5b9e\u73b0\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u800c\u6211\u4eec\u8fd8\u9700\u8981\u81ea\u5b9a\u4e49\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"slide"})," \u65b9\u6cd5\uff0c\u5176\u4e2d\u63a5\u6536 ",(0,i.jsx)(s.code,{children:"slide(self: none, title: auto, ..args)"}),"\uff0c\u7b2c\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"self: none"})," \u662f\u4e00\u4e2a\u65b9\u6cd5\u6240\u5fc5\u987b\u7684\u53c2\u6570\uff0c\u7528\u4e8e\u83b7\u53d6\u6700\u65b0\u7684 ",(0,i.jsx)(s.code,{children:"self"}),"\uff1b\u800c\u7b2c\u4e8c\u4e2a ",(0,i.jsx)(s.code,{children:"title"})," \u5219\u662f\u7528\u4e8e\u66f4\u65b0 ",(0,i.jsx)(s.code,{children:"self.bamboo-title"}),"\uff0c\u4ee5\u4fbf\u5728 header \u4e2d\u663e\u793a\u51fa\u6765\uff1b\u7b2c\u4e09\u4e2a ",(0,i.jsx)(s.code,{children:"..args"})," \u662f\u7528\u4e8e\u6536\u96c6\u5269\u4f59\u7684\u53c2\u6570\uff0c\u5e76\u4f20\u5230 ",(0,i.jsx)(s.code,{children:"(self.methods.touying-slide)(self: self, ..args)"})," \u91cc\uff0c\u8fd9\u4e5f\u662f\u8ba9 Touying ",(0,i.jsx)(s.code,{children:"slide"})," \u529f\u80fd\u6b63\u5e38\u751f\u6548\u6240\u5fc5\u987b\u7684\u3002\u5e76\u4e14\uff0c\u6211\u4eec\u9700\u8981\u5728 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u91cc\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"self.methods.slide = slide"})," \u6ce8\u518c\u8fd9\u4e2a\u65b9\u6cd5\u3002"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let slide(self: none, title: auto, ..args) = {\n if title != auto {\n self.bamboo-title = title\n }\n (self.methods.touying-slide)(self: self, ..args)\n}\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n footer: [],\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n // variables for later use\n self.bamboo-title = []\n self.bamboo-footer = footer\n // set page\n let header(self) = {\n set align(top)\n show: components.cell.with(fill: self.colors.primary, inset: 1em)\n set align(horizon)\n set text(fill: self.colors.neutral-lightest, size: .7em)\n states.current-section-title\n linebreak()\n set text(size: 1.5em)\n utils.call-or-display(self, self.bamboo-title)\n }\n let footer(self) = {\n set align(bottom)\n show: pad.with(.4em)\n set text(fill: self.colors.neutral-darkest, size: .8em)\n utils.call-or-display(self, self.bamboo-footer)\n h(1fr)\n states.slide-counter.display() + " / " + states.last-slide-number\n }\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n header: header,\n footer: footer,\n margin: (top: 4em, bottom: 1.5em, x: 0em),\n )\n self.padding = (x: 2em, y: 0em)\n // register methods\n self.methods.slide = slide\n self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9", footer: self => self.info.institution)\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n'})}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{src:"https://github.com/touying-typ/touying/assets/34951714/d33bcda7-c032-4b11-b392-5b939d9a0a47",alt:"image"})}),"\n",(0,i.jsx)(s.h2,{id:"\u81ea\u5b9a\u4e49\u7279\u6b8a-slide",children:"\u81ea\u5b9a\u4e49\u7279\u6b8a Slide"}),"\n",(0,i.jsxs)(s.p,{children:["\u6211\u4eec\u5728\u4e0a\u9762\u7684\u57fa\u7840 slide \u7684\u57fa\u7840\u4e0a\uff0c\u8fdb\u4e00\u6b65\u52a0\u5165\u4e00\u4e9b\u7279\u6b8a\u7684 slide \u51fd\u6570\uff0c\u4f8b\u5982 ",(0,i.jsx)(s.code,{children:"title-slide"}),"\uff0c",(0,i.jsx)(s.code,{children:"focus-slide"})," \u4ee5\u53ca\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"slides"})," \u65b9\u6cd5\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5bf9\u4e8e ",(0,i.jsx)(s.code,{children:"title-slide"})," \u65b9\u6cd5\uff0c\u9996\u5148\uff0c\u6211\u4eec\u8c03\u7528\u4e86 ",(0,i.jsx)(s.code,{children:"self = utils.empty-page(self)"}),"\uff0c\u8fd9\u4e2a\u51fd\u6570\u53ef\u4ee5\u6e05\u9664 ",(0,i.jsx)(s.code,{children:"self.page-args.header"})," \u548c ",(0,i.jsx)(s.code,{children:"self.page-args.footer"}),"\uff0c\u4ee5\u53ca\u5c06 ",(0,i.jsx)(s.code,{children:"margin"})," \u548c ",(0,i.jsx)(s.code,{children:"padding"})," \u90fd\u8bbe\u4e3a ",(0,i.jsx)(s.code,{children:"0em"}),"\uff0c\u5f97\u5230\u4e00\u4e2a\u7a7a\u767d\u9875\u7684\u6548\u679c\u3002\u7136\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"let info = self.info + args.named()"})," \u83b7\u53d6\u5230 ",(0,i.jsx)(s.code,{children:"self.info"})," \u91cc\u4fdd\u5b58\u7684\u4fe1\u606f\uff0c\u4e5f\u53ef\u4ee5\u7528\u51fd\u6570\u53c2\u6570\u91cc\u4f20\u5165\u7684 ",(0,i.jsx)(s.code,{children:"args.named()"})," \u6765\u66f4\u65b0\u4fe1\u606f\uff0c\u4fbf\u4e8e\u540e\u7eed\u4ee5 ",(0,i.jsx)(s.code,{children:"info.title"})," \u7684\u65b9\u5f0f\u4f7f\u7528\u3002\u5177\u4f53\u7684\u9875\u9762\u5185\u5bb9 ",(0,i.jsx)(s.code,{children:"body"}),"\uff0c\u6bcf\u4e2a theme \u90fd\u4f1a\u6709\u6240\u4e0d\u540c\uff0c\u8fd9\u91cc\u5c31\u4e0d\u518d\u8fc7\u591a\u8d58\u8ff0\u3002\u800c\u5728\u6700\u540e\uff0c\u6211\u4eec\u8c03\u7528\u4e86 ",(0,i.jsx)(s.code,{children:"(self.methods.touying-slide)(self: self, repeat: none, body)"}),"\uff0c\u5176\u4e2d\u7684 ",(0,i.jsx)(s.code,{children:"repeat: none"})," \u8868\u9762\u8fd9\u4e2a\u9875\u9762\u4e0d\u9700\u8981\u52a8\u753b\u6548\u679c\uff0c\u800c\u4f20\u5165 ",(0,i.jsx)(s.code,{children:"body"})," \u53c2\u6570\u4f1a\u5c06 ",(0,i.jsx)(s.code,{children:"body"})," \u7684\u5185\u5bb9\u663e\u793a\u51fa\u6765\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5bf9\u4e8e ",(0,i.jsx)(s.code,{children:"new-section-slide"})," \u65b9\u6cd5\uff0c\u4e5f\u662f\u540c\u7406\uff0c\u4e0d\u8fc7\u552f\u4e00\u8981\u6ce8\u610f\u7684\u662f\u6211\u4eec\u5728 ",(0,i.jsx)(s.code,{children:"(self.methods.touying-slide)(self: self, repeat: none, section: section, body)"})," \u7684\u53c2\u6570\u91cc\u9762\u591a\u4f20\u5165\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"section: section"}),"\uff0c\u8fd9\u662f\u7528\u6765\u58f0\u660e\u65b0\u5efa\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"section"})," \u7684\u3002\u53e6\u4e00\u70b9\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u6211\u4eec\u9664\u4e86 ",(0,i.jsx)(s.code,{children:"self.methods.new-section-slide = new-section-slide"}),"\uff0c\u8fd8\u6ce8\u518c\u4e86 ",(0,i.jsx)(s.code,{children:"self.methods.touying-new-section-slide = new-section-slide"}),"\uff0c\u8fd9\u6837 ",(0,i.jsx)(s.code,{children:"new-section-slide"})," \u5c31\u4f1a\u5728\u78b0\u5230\u4e00\u7ea7\u6807\u9898\u65f6\u81ea\u52a8\u88ab\u8c03\u7528\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5bf9\u4e8e ",(0,i.jsx)(s.code,{children:"focus-slide"})," \u65b9\u6cd5\uff0c\u5927\u90e8\u5206\u5185\u5bb9\u4e5f\u57fa\u672c\u4e00\u81f4\uff0c\u4e0d\u8fc7\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u6211\u4eec\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"self.page-args += (..)"})," \u66f4\u65b0\u4e86\u9875\u9762\u7684\u80cc\u666f\u989c\u8272\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u6700\u540e\uff0c\u6211\u4eec\u8fd8\u66f4\u65b0\u4e86 ",(0,i.jsx)(s.code,{children:"slides(self: none, title-slide: true, slide-level: 1, ..args)"})," \u65b9\u6cd5\uff0c\u5176\u4e2d ",(0,i.jsx)(s.code,{children:"title-slide"})," \u4e3a ",(0,i.jsx)(s.code,{children:"true"})," \u65f6\uff0c\u5728\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"#show: slides"})," \u540e\u4f1a\u81ea\u52a8\u521b\u5efa\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"title-slide"}),"\uff1b\u800c ",(0,i.jsx)(s.code,{children:"slide-level: 1"})," \u6307\u660e\u4e86\u4e00\u7ea7\u6807\u9898\u548c\u4e8c\u7ea7\u6807\u9898\u5206\u522b\u5bf9\u5e94 ",(0,i.jsx)(s.code,{children:"section"})," \u548c ",(0,i.jsx)(s.code,{children:"title"}),"\u3002"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let slide(self: none, title: auto, ..args) = {\n if title != auto {\n self.bamboo-title = title\n }\n (self.methods.touying-slide)(self: self, ..args)\n}\n\n#let title-slide(self: none, ..args) = {\n self = utils.empty-page(self)\n let info = self.info + args.named()\n let body = {\n set align(center + horizon)\n block(\n fill: self.colors.primary,\n width: 80%,\n inset: (y: 1em),\n radius: 1em,\n text(size: 2em, fill: self.colors.neutral-lightest, weight: "bold", info.title)\n )\n set text(fill: self.colors.neutral-darkest)\n if info.author != none {\n block(info.author)\n }\n if info.date != none {\n block(if type(info.date) == datetime { info.date.display(self.datetime-format) } else { info.date })\n }\n }\n (self.methods.touying-slide)(self: self, repeat: none, body)\n}\n\n#let new-section-slide(self: none, section) = {\n self = utils.empty-page(self)\n let body = {\n set align(center + horizon)\n set text(size: 2em, fill: self.colors.primary, weight: "bold", style: "italic")\n section\n }\n (self.methods.touying-slide)(self: self, repeat: none, section: section, body)\n}\n\n#let focus-slide(self: none, body) = {\n self = utils.empty-page(self)\n self.page-args += (\n fill: self.colors.primary,\n margin: 2em,\n )\n set text(fill: self.colors.neutral-lightest, size: 2em)\n (self.methods.touying-slide)(self: self, repeat: none, align(horizon + center, body))\n}\n\n#let slides(self: none, title-slide: true, slide-level: 1, ..args) = {\n if title-slide {\n (self.methods.title-slide)(self: self)\n }\n (self.methods.touying-slides)(self: self, slide-level: slide-level, ..args)\n}\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n footer: [],\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n // variables for later use\n self.bamboo-title = []\n self.bamboo-footer = footer\n // set page\n let header(self) = {\n set align(top)\n show: components.cell.with(fill: self.colors.primary, inset: 1em)\n set align(horizon)\n set text(fill: self.colors.neutral-lightest, size: .7em)\n states.current-section-title\n linebreak()\n set text(size: 1.5em)\n utils.call-or-display(self, self.bamboo-title)\n }\n let footer(self) = {\n set align(bottom)\n show: pad.with(.4em)\n set text(fill: self.colors.neutral-darkest, size: .8em)\n utils.call-or-display(self, self.bamboo-footer)\n h(1fr)\n states.slide-counter.display() + " / " + states.last-slide-number\n }\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n header: header,\n footer: footer,\n margin: (top: 4em, bottom: 1.5em, x: 0em),\n )\n self.padding = (x: 2em, y: 0em)\n // register methods\n self.methods.slide = slide\n self.methods.title-slide = title-slide\n self.methods.new-section-slide = new-section-slide\n self.methods.touying-new-section-slide = new-section-slide\n self.methods.focus-slide = focus-slide\n self.methods.slides = slides\n self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9", footer: self => self.info.institution)\n#let s = (s.methods.info)(\n self: s,\n title: [Title],\n subtitle: [Subtitle],\n author: [Authors],\n date: datetime.today(),\n institution: [Institution],\n)\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide, title-slide, focus-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n\n#focus-slide[\n Focus on it!\n]\n'})}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{src:"https://github.com/touying-typ/touying/assets/34951714/03c5ad02-8ff4-4068-9664-d9cfad79baaf",alt:"image"})}),"\n",(0,i.jsx)(s.h2,{id:"\u603b\u7ed3",children:"\u603b\u7ed3"}),"\n",(0,i.jsx)(s.p,{children:"\u81f3\u6b64\uff0c\u6211\u4eec\u5c31\u5df2\u7ecf\u521b\u5efa\u4e86\u4e00\u4e2a\u7b80\u6d01\u53c8\u7f8e\u89c2\u7684\u4e3b\u9898\u4e86\u3002\u4e5f\u8bb8\u4f60\u4f1a\u89c9\u5f97\uff0cTouying \u5f15\u5165\u7684\u6982\u5ff5\u8fc7\u4e8e\u4e30\u5bcc\u4e86\uff0c\u4ee5\u81f3\u4e8e\u8ba9\u4eba\u4e00\u65f6\u5f88\u96be\u8f7b\u6613\u63a5\u53d7\u3002\u8fd9\u662f\u6b63\u5e38\u7684\uff0c\u5728\u5f3a\u5927\u7684\u529f\u80fd\u4e0e\u7b80\u6d01\u7684\u6982\u5ff5\u4e4b\u95f4\uff0cTouying \u9009\u62e9\u4e86\u524d\u8005\u3002\u4f46\u662f\u4e5f\u6b63\u662f\u5f97\u76ca\u4e8e Touying \u8fd9\u79cd\u5927\u800c\u5168\u7684\u7edf\u4e00\u7406\u5ff5\uff0c\u4f60\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u5728\u4e0d\u540c\u7684\u4e3b\u9898\u4e4b\u95f4\u62bd\u79bb\u51fa\u5171\u901a\u4e4b\u5904\uff0c\u5e76\u5c06\u4f60\u5b66\u5230\u7684\u6982\u5ff5\u8fc1\u79fb\u5230\u53e6\u4e00\u4e2a\u4e3b\u9898\u4e0a\u3002\u4ea6\u6216\u8005\uff0c\u4f60\u53ef\u4ee5\u5f88\u8f7b\u6613\u5730\u4fdd\u5b58\u5168\u5c40\u53d8\u91cf\uff0c\u6216\u8005\u66f4\u6539\u5df2\u6709\u7684\u4e3b\u9898\uff0c\u4f8b\u5982\u5168\u5c40\u4fdd\u5b58\u4e3b\u9898\u989c\u8272\uff0c\u66ff\u6362\u6389 slides \u7684 header\uff0c\u6216\u8005\u6dfb\u52a0\u4e00\u4e24\u4e2a Logo \u7b49\uff0c\u8fd9\u4e5f\u6b63\u662f Touying \u89e3\u8026\u4e0e\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\u5e26\u6765\u7684\u597d\u5904\u3002"})]})}function a(e={}){const{wrapper:s}={...(0,l.a)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},1151:(e,s,n)=>{n.d(s,{Z:()=>d,a:()=>o});var i=n(7294);const l={},t=i.createContext(l);function o(e){const s=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:o(e.components),i.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9758],{3122:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>r,contentTitle:()=>o,default:()=>a,frontMatter:()=>t,metadata:()=>d,toc:()=>c});var i=n(5893),l=n(1151);const t={sidebar_position:10},o="\u521b\u5efa\u81ea\u5df1\u7684\u4e3b\u9898",d={id:"build-your-own-theme",title:"\u521b\u5efa\u81ea\u5df1\u7684\u4e3b\u9898",description:"\u4f7f\u7528 Touying \u521b\u5efa\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\u662f\u4e00\u4ef6\u7565\u663e\u590d\u6742\u7684\u4e8b\u60c5\uff0c\u56e0\u4e3a\u6211\u4eec\u5f15\u5165\u4e86\u8bb8\u591a\u7684\u6982\u5ff5\u3002\u4e0d\u8fc7\u8bf7\u653e\u5fc3\uff0c\u5982\u679c\u60a8\u771f\u7684\u7528 Touying \u521b\u5efa\u4e86\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\uff0c\u4e5f\u8bb8\u60a8\u5c31\u53ef\u4ee5\u6df1\u5207\u5730\u611f\u53d7\u5230 Touying \u63d0\u4f9b\u7684\u4fbf\u5229\u7684\u529f\u80fd\u7684\u548c\u5f3a\u5927\u7684\u53ef\u5b9a\u5236\u6027\u3002\u60a8\u53ef\u4ee5\u53c2\u8003 \u4e3b\u9898\u7684\u6e90\u4ee3\u7801\uff0c\u4e3b\u8981\u9700\u8981\u5b9e\u73b0\u7684\u5c31\u662f\uff1a",source:"@site/i18n/zh/docusaurus-plugin-content-docs/version-0.3.2+/build-your-own-theme.md",sourceDirName:".",slug:"/build-your-own-theme",permalink:"/touying/zh/docs/build-your-own-theme",draft:!1,unlisted:!1,editUrl:"https://github.com/touying-typ/touying/tree/main/docs/versioned_docs/version-0.3.2+/build-your-own-theme.md",tags:[],version:"0.3.2+",sidebarPosition:10,frontMatter:{sidebar_position:10},sidebar:"tutorialSidebar",previous:{title:"Aqua \u4e3b\u9898",permalink:"/touying/zh/docs/themes/aqua"},next:{title:"Progress",permalink:"/touying/zh/docs/category/progress"}},r={},c=[{value:"\u4fee\u6539\u5df2\u6709\u4e3b\u9898",id:"\u4fee\u6539\u5df2\u6709\u4e3b\u9898",level:2},{value:"\u5bfc\u5165",id:"\u5bfc\u5165",level:2},{value:"register \u51fd\u6570\u548c init \u65b9\u6cd5",id:"register-\u51fd\u6570\u548c-init-\u65b9\u6cd5",level:2},{value:"\u989c\u8272\u4e3b\u9898",id:"\u989c\u8272\u4e3b\u9898",level:2},{value:"\u5b9e\u6218\uff1a\u81ea\u5b9a\u4e49 Alert \u65b9\u6cd5",id:"\u5b9e\u6218\u81ea\u5b9a\u4e49-alert-\u65b9\u6cd5",level:2},{value:"\u81ea\u5b9a\u4e49 Header \u548c Footer",id:"\u81ea\u5b9a\u4e49-header-\u548c-footer",level:2},{value:"\u81ea\u5b9a\u4e49\u7279\u6b8a Slide",id:"\u81ea\u5b9a\u4e49\u7279\u6b8a-slide",level:2},{value:"\u603b\u7ed3",id:"\u603b\u7ed3",level:2}];function h(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.h1,{id:"\u521b\u5efa\u81ea\u5df1\u7684\u4e3b\u9898",children:"\u521b\u5efa\u81ea\u5df1\u7684\u4e3b\u9898"}),"\n",(0,i.jsxs)(s.p,{children:["\u4f7f\u7528 Touying \u521b\u5efa\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\u662f\u4e00\u4ef6\u7565\u663e\u590d\u6742\u7684\u4e8b\u60c5\uff0c\u56e0\u4e3a\u6211\u4eec\u5f15\u5165\u4e86\u8bb8\u591a\u7684\u6982\u5ff5\u3002\u4e0d\u8fc7\u8bf7\u653e\u5fc3\uff0c\u5982\u679c\u60a8\u771f\u7684\u7528 Touying \u521b\u5efa\u4e86\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\uff0c\u4e5f\u8bb8\u60a8\u5c31\u53ef\u4ee5\u6df1\u5207\u5730\u611f\u53d7\u5230 Touying \u63d0\u4f9b\u7684\u4fbf\u5229\u7684\u529f\u80fd\u7684\u548c\u5f3a\u5927\u7684\u53ef\u5b9a\u5236\u6027\u3002\u60a8\u53ef\u4ee5\u53c2\u8003 ",(0,i.jsx)(s.a,{href:"https://github.com/touying-typ/touying/tree/main/themes",children:"\u4e3b\u9898\u7684\u6e90\u4ee3\u7801"}),"\uff0c\u4e3b\u8981\u9700\u8981\u5b9e\u73b0\u7684\u5c31\u662f\uff1a"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\uff0c\u521d\u59cb\u5316\u5168\u5c40\u5355\u4f8b ",(0,i.jsx)(s.code,{children:"s"}),"\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"init"})," \u65b9\u6cd5\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49\u989c\u8272\u4e3b\u9898\uff0c\u5373\u4fee\u6539 ",(0,i.jsx)(s.code,{children:"self.colors"})," \u6210\u5458\u53d8\u91cf\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"alert"})," \u65b9\u6cd5\uff0c\u53ef\u9009\uff1b"]}),"\n",(0,i.jsx)(s.li,{children:"\u81ea\u5b9a\u4e49 header\uff1b"}),"\n",(0,i.jsx)(s.li,{children:"\u81ea\u5b9a\u4e49 footer\uff1b"}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"slide"})," \u65b9\u6cd5\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49\u7279\u6b8a slide \u65b9\u6cd5\uff0c\u5982 ",(0,i.jsx)(s.code,{children:"title-slide"})," \u548c ",(0,i.jsx)(s.code,{children:"focus-slide"})," \u65b9\u6cd5\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"slides"})," \u65b9\u6cd5\uff0c\u53ef\u9009\uff1b"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"\u4e3a\u4e86\u6f14\u793a\u5982\u4f55\u4f7f\u7528 Touying \u521b\u5efa\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\uff0c\u6211\u4eec\u4e0d\u59a8\u6765\u4e00\u6b65\u4e00\u6b65\u5730\u521b\u5efa\u4e00\u4e2a\u7b80\u6d01\u7f8e\u89c2\u7684 Bamboo \u4e3b\u9898\u3002"}),"\n",(0,i.jsx)(s.h2,{id:"\u4fee\u6539\u5df2\u6709\u4e3b\u9898",children:"\u4fee\u6539\u5df2\u6709\u4e3b\u9898"}),"\n",(0,i.jsx)(s.p,{children:"\u5982\u679c\u4f60\u60f3\u5728\u672c\u5730\u4fee\u6539\u4e00\u4e2a Touying \u5185\u90e8\u7684 themes\uff0c\u800c\u4e0d\u662f\u81ea\u5df1\u4ece\u96f6\u5f00\u59cb\u521b\u5efa\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u901a\u8fc7\u4e0b\u9762\u7684\u65b9\u5f0f\u5b9e\u73b0\uff1a"}),"\n",(0,i.jsxs)(s.ol,{children:["\n",(0,i.jsxs)(s.li,{children:["\u5c06 ",(0,i.jsx)(s.code,{children:"themes"})," \u76ee\u5f55\u4e0b\u7684 ",(0,i.jsx)(s.a,{href:"https://github.com/touying-typ/touying/tree/main/themes",children:"\u4e3b\u9898\u4ee3\u7801"})," \u590d\u5236\u5230\u672c\u5730\uff0c\u4f8b\u5982\u5c06 ",(0,i.jsx)(s.code,{children:"themes/university.typ"})," \u590d\u5236\u5230\u672c\u5730 ",(0,i.jsx)(s.code,{children:"university.typ"})," \u4e2d\u3002"]}),"\n",(0,i.jsxs)(s.li,{children:["\u5c06 ",(0,i.jsx)(s.code,{children:"university.typ"})," \u6587\u4ef6\u9876\u90e8\u7684 ",(0,i.jsx)(s.code,{children:'#import "../xxx.typ"'})," \u547d\u4ee4\u5168\u90e8\u79fb\u9664\u3002"]}),"\n",(0,i.jsxs)(s.li,{children:["\u5411 ",(0,i.jsx)(s.code,{children:"university.typ"})," \u6587\u4ef6\u9876\u90e8\u4e2d\u52a0\u5165 ",(0,i.jsx)(s.code,{children:'#import "@preview/touying:0.3.3": *'})," \u6765\u5bfc\u5165\u6240\u6709\u6a21\u5757\u3002"]}),"\n",(0,i.jsxs)(s.li,{children:["\u5c06 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u4e2d\u7684 ",(0,i.jsx)(s.code,{children:"self: s"})," \u66ff\u6362\u6210 ",(0,i.jsx)(s.code,{children:"self: themes.default.register()"})," ",(0,i.jsx)(s.strong,{children:"(\u91cd\u8981)"}),"\u3002"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"\u7136\u540e\u5c31\u53ef\u4ee5\u901a\u8fc7"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#import "@preview/touying:0.3.3": *\n#import "university.typ"\n\n#let s = university.register(aspect-ratio: "16-9")\n'})}),"\n",(0,i.jsx)(s.p,{children:"\u7684\u65b9\u5f0f\u5bfc\u5165\u548c\u4f7f\u7528\u4e3b\u9898\u4e86\u3002"}),"\n",(0,i.jsxs)(s.p,{children:["\u4e00\u4e2a\u5177\u4f53\u7684\u793a\u4f8b\uff1a",(0,i.jsx)(s.a,{href:"https://typst.app/project/rqRuzg0keo_ZEB5AdxjweA",children:"https://typst.app/project/rqRuzg0keo_ZEB5AdxjweA"})]}),"\n",(0,i.jsx)(s.h2,{id:"\u5bfc\u5165",children:"\u5bfc\u5165"}),"\n",(0,i.jsx)(s.p,{children:"\u53d6\u51b3\u4e8e\u8fd9\u4e2a\u4e3b\u9898\u662f\u4f60\u81ea\u5df1\u7684\uff0c\u8fd8\u662f Touying \u7684\u4e00\u90e8\u5206\uff0c\u4f60\u53ef\u4ee5\u7528\u4e24\u79cd\u65b9\u5f0f\u5bfc\u5165\uff1a"}),"\n",(0,i.jsx)(s.p,{children:"\u5982\u679c\u53ea\u662f\u4f60\u81ea\u5df1\u4f7f\u7528\uff0c\u4f60\u53ef\u4ee5\u76f4\u63a5\u5bfc\u5165 Touying\uff1a"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#import "@preview/touying:0.3.3": *\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u5982\u679c\u4f60\u5e0c\u671b\u8fd9\u4e2a\u4e3b\u9898\u4f5c\u4e3a Touying \u7684\u4e00\u90e8\u5206\uff0c\u653e\u7f6e\u5728 Touying ",(0,i.jsx)(s.code,{children:"themes"})," \u76ee\u5f55\u4e0b\uff0c\u90a3\u4f60\u5e94\u8be5\u5c06\u4e0a\u9762\u7684\u5bfc\u5165\u8bed\u53e5\u6539\u4e3a"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#import "../utils/utils.typ"\n#import "../utils/states.typ"\n#import "../utils/components.typ"\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u5e76\u4e14\u8981\u5728 Touying \u7684 ",(0,i.jsx)(s.code,{children:"themes/themes.typ"})," \u91cc\u52a0\u4e0a"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{children:'#import "bamboo.typ"\n'})}),"\n",(0,i.jsx)(s.h2,{id:"register-\u51fd\u6570\u548c-init-\u65b9\u6cd5",children:"register \u51fd\u6570\u548c init \u65b9\u6cd5"}),"\n",(0,i.jsxs)(s.p,{children:["\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u4f1a\u533a\u5206 ",(0,i.jsx)(s.code,{children:"bamboo.typ"})," \u6a21\u677f\u6587\u4ef6\u548c ",(0,i.jsx)(s.code,{children:"main.typ"})," \u6587\u4ef6\uff0c\u540e\u8005\u6709\u65f6\u4f1a\u88ab\u7701\u7565\u3002"]}),"\n",(0,i.jsx)(s.p,{children:"\u4e00\u822c\u800c\u8a00\uff0c\u6211\u4eec\u5236\u4f5c slides \u7684\u7b2c\u4e00\u6b65\uff0c\u5c31\u662f\u786e\u5b9a\u597d\u5b57\u4f53\u5927\u5c0f\u548c\u9875\u9762\u957f\u5bbd\u6bd4\uff0c\u56e0\u6b64\u6211\u4eec\u9700\u8981\u6ce8\u518c\u4e00\u4e2a\u521d\u59cb\u5316\u65b9\u6cd5\uff1a"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n) = {\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n )\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9")\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u5982\u60a8\u6240\u89c1\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\uff0c\u5e76\u4f20\u5165\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"aspect-ratio"})," \u53c2\u6570\u6765\u8bbe\u5b9a\u9875\u9762\u957f\u5bbd\u6bd4\u3002\u6211\u4eec\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"self: themes.default.register()"})," \u7684\u65b9\u5f0f\uff0c\u83b7\u5f97\u4e86\u7f3a\u7701\u7684 ",(0,i.jsx)(s.code,{children:"self"}),"\u3002\u7136\u540e\u6211\u4eec\u5c31\u9700\u8981\u8bbe\u7f6e\u9875\u9762\u53c2\u6570\u4e86\u3002\u60a8\u5e94\u8be5\u5df2\u7ecf\u77e5\u9053\u4e86\uff0c\u5728 Touying \u4e2d\uff0c\u6211\u4eec\u4e0d\u5e94\u8be5\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"set page(..)"})," \u6765\u8bbe\u7f6e\u9875\u9762\u53c2\u6570\uff0c\u800c\u662f\u5e94\u8be5\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:" self.page-args += (..)"})," \u8fd9\u79cd\u8bed\u6cd5\u6765\u8bbe\u7f6e\uff0c\u5177\u4f53\u5185\u5bb9\u53ef\u4ee5\u53c2\u8003\u9875\u9762\u5e03\u5c40\u7ae0\u8282\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u9664\u6b64\u4e4b\u5916\uff0c\u6211\u4eec\u8fd8\u6ce8\u518c\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"self.methods.init"})," \u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u7528\u6765\u8fdb\u884c\u4e00\u4e9b\u5168\u5c40\u7684\u6837\u5f0f\u8bbe\u7f6e\uff0c\u4f8b\u5982\u5728\u6b64\u5904\uff0c\u6211\u4eec\u52a0\u4e0a\u4e86 ",(0,i.jsx)(s.code,{children:"set text(size: 20pt)"})," \u6765\u8bbe\u7f6e\u6587\u5b57\u5927\u5c0f\u3002\u4f60\u4e5f\u53ef\u4ee5\u5728\u8fd9\u91cc\u653e\u7f6e\u4e00\u4e9b\u989d\u5916\u7684\u5168\u5c40\u6837\u5f0f\u8bbe\u7f6e\uff0c\u4f8b\u5982 ",(0,i.jsx)(s.code,{children:"set par(justify: true)"})," \u7b49\u3002\u7531\u4e8e ",(0,i.jsx)(s.code,{children:"init"})," \u51fd\u6570\u88ab\u653e\u7f6e\u5230\u4e86 ",(0,i.jsx)(s.code,{children:"self.methods"})," \u91cc\uff0c\u662f\u4e00\u4e2a\u65b9\u6cd5\uff0c\u800c\u975e\u666e\u901a\u51fd\u6570\uff0c\u56e0\u6b64\u6211\u4eec\u9700\u8981\u52a0\u4e0a ",(0,i.jsx)(s.code,{children:"self: none"})," \u53c2\u6570\u624d\u80fd\u6b63\u5e38\u4f7f\u7528\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5982\u60a8\u6240\u89c1\uff0c\u540e\u7eed\u5728 ",(0,i.jsx)(s.code,{children:"main.typ"})," \u4e2d\uff0c\u6211\u4eec\u4f1a\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"#show: init"})," \u6765\u5e94\u7528 ",(0,i.jsx)(s.code,{children:"init"})," \u65b9\u6cd5\u91cc\u9762\u7684\u5168\u5c40\u6837\u5f0f\u8bbe\u7f6e\uff0c\u5176\u4e2d ",(0,i.jsx)(s.code,{children:"init"})," \u51fd\u6570\u662f\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"utils.methods(s)"})," \u7ed1\u5b9a\u5e76\u89e3\u5305\u800c\u6765\u7684\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5982\u679c\u60a8\u591a\u52a0\u6ce8\u610f\uff0c\u60a8\u4f1a\u53d1\u73b0 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u6700\u540e\u6709\u4e00\u884c\u72ec\u7acb\u7684 ",(0,i.jsx)(s.code,{children:"self"}),"\uff0c\u8fd9\u5176\u5b9e\u662f\u4ee3\u8868\u4e86\u5c06\u4fee\u6539\u540e\u7684 ",(0,i.jsx)(s.code,{children:"self"})," \u4f5c\u4e3a\u8fd4\u56de\u503c\u8fd4\u56de\uff0c\u540e\u7eed\u4f1a\u88ab\u4fdd\u5b58\u5728 ",(0,i.jsx)(s.code,{children:"#let s = .."})," \u4e2d\uff0c\u56e0\u6b64\u8fd9\u4e00\u884c\u662f\u4e0d\u53ef\u6216\u7f3a\u7684\u3002"]}),"\n",(0,i.jsx)(s.h2,{id:"\u989c\u8272\u4e3b\u9898",children:"\u989c\u8272\u4e3b\u9898"}),"\n",(0,i.jsxs)(s.p,{children:["\u4e3a\u60a8\u7684 slides \u6311\u9009\u4e00\u4e2a\u7f8e\u89c2\u7684\u989c\u8272\u4e3b\u9898\uff0c\u662f\u505a\u597d\u4e00\u4e2a slides \u7684\u5173\u952e\u6240\u5728\u3002Touying \u63d0\u4f9b\u4e86\u5185\u7f6e\u7684\u989c\u8272\u4e3b\u9898\u652f\u6301\uff0c\u4ee5\u5c3d\u91cf\u62b9\u5e73\u4e0d\u540c\u4e3b\u9898\u4e4b\u95f4\u7684 API \u5dee\u5f02\u3002Touying \u63d0\u4f9b\u4e86\u4e24\u4e2a\u7ef4\u5ea6\u7684\u989c\u8272\u9009\u62e9\uff0c\u7b2c\u4e00\u4e2a\u7ef4\u5ea6\u662f ",(0,i.jsx)(s.code,{children:"neutral"}),"\u3001",(0,i.jsx)(s.code,{children:"primary"}),"\u3001",(0,i.jsx)(s.code,{children:"secondary"})," \u548c ",(0,i.jsx)(s.code,{children:"tertiary"}),"\uff0c\u7528\u4e8e\u533a\u5206\u8272\u8c03\uff0c\u5176\u4e2d\u6700\u5e38\u7528\u7684\u5c31\u662f ",(0,i.jsx)(s.code,{children:"primary"})," \u4e3b\u9898\u8272\uff1b\u7b2c\u4e8c\u4e2a\u7ef4\u5ea6\u662f ",(0,i.jsx)(s.code,{children:"default"}),"\u3001",(0,i.jsx)(s.code,{children:"light"}),"\u3001",(0,i.jsx)(s.code,{children:"lighter"}),"\u3001",(0,i.jsx)(s.code,{children:"lightest"}),"\u3001",(0,i.jsx)(s.code,{children:"dark"}),"\u3001",(0,i.jsx)(s.code,{children:"darker"}),"\u3001",(0,i.jsx)(s.code,{children:"darkest"}),"\uff0c\u7528\u4e8e\u533a\u5206\u660e\u5ea6\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u7531\u4e8e\u6211\u4eec\u662f Bamboo \u4e3b\u9898\uff0c\u56e0\u6b64\u8fd9\u91cc\u7684\u4e3b\u9898\u8272 ",(0,i.jsx)(s.code,{children:"primary"})," \u6211\u4eec\u6311\u9009\u4e86\u4e00\u4e2a\u4e0e\u7af9\u5b50\u76f8\u8fd1\u7684\u989c\u8272 ",(0,i.jsx)(s.code,{children:'rgb("#5E8B65")'}),"\uff0c\u5e76\u52a0\u5165\u4e86\u4e2d\u6027\u8272 ",(0,i.jsx)(s.code,{children:"neutral-lightest"}),"\uff0c",(0,i.jsx)(s.code,{children:"neutral-darkest"}),"\uff0c\u5206\u522b\u4f5c\u4e3a\u80cc\u666f\u8272\u548c\u5b57\u4f53\u989c\u8272\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u6b63\u5982\u4e0b\u9762\u7684\u4ee3\u7801\u6240\u793a\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"self = (self.methods.colors)(self: self, ..)"})," \u65b9\u6cd5\u4fee\u6539\u989c\u8272\u4e3b\u9898\u3002\u5176\u672c\u8d28\u5c31\u662f ",(0,i.jsx)(s.code,{children:"self.colors += (..)"})," \u7684\u4e00\u4e2a\u5305\u88c5\u3002"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n )\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u50cf\u8fd9\u6837\u6dfb\u52a0\u4e86\u989c\u8272\u4e3b\u9898\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"self.colors.primary"})," \u8fd9\u6837\u7684\u65b9\u5f0f\u83b7\u53d6\u5230\u8fd9\u4e2a\u989c\u8272\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5e76\u4e14\u6709\u4e00\u70b9\u503c\u5f97\u6ce8\u610f\uff0c\u7528\u6237\u53ef\u4ee5\u968f\u65f6\u5728 ",(0,i.jsx)(s.code,{children:"main.typ"})," \u91cc\u901a\u8fc7"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#let s = (s.methods.colors)(self: s, primary: rgb("#3578B9"))\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u8fd9\u6837\u7684\u65b9\u5f0f\u4fee\u6539\u4e3b\u9898\u8272\uff0c\u5176\u4e2d\u8fd9\u53e5\u8bed\u53e5\u9700\u8981\u653e\u5728 ",(0,i.jsx)(s.code,{children:"register()"})," \u4e4b\u540e\uff0c\u4ee5\u53ca ",(0,i.jsx)(s.code,{children:"utils.methods(s)"})," \u4e4b\u524d\u3002"]}),"\n",(0,i.jsx)(s.p,{children:"\u8fd9\u79cd\u968f\u65f6\u66f4\u6362\u989c\u8272\u4e3b\u9898\u7684\u5185\u5bb9\uff0c\u6b63\u662f Touying \u5f3a\u5927\u53ef\u5b9a\u5236\u6027\u7684\u4f53\u73b0\u3002"}),"\n",(0,i.jsx)(s.h2,{id:"\u5b9e\u6218\u81ea\u5b9a\u4e49-alert-\u65b9\u6cd5",children:"\u5b9e\u6218\uff1a\u81ea\u5b9a\u4e49 Alert \u65b9\u6cd5"}),"\n",(0,i.jsxs)(s.p,{children:["\u4e00\u822c\u800c\u8a00\uff0c\u6211\u4eec\u90fd\u9700\u8981\u63d0\u4f9b\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"#alert[..]"})," \u51fd\u6570\u7ed9\u7528\u6237\u4f7f\u7528\uff0c\u5176\u7528\u9014\u4e0e ",(0,i.jsx)(s.code,{children:"#strong[..]"})," \u7c7b\u4f3c\uff0c\u90fd\u662f\u7528\u4e8e\u5f3a\u8c03\u5f53\u524d\u6587\u672c\u3002\u4e00\u822c ",(0,i.jsx)(s.code,{children:"#alert[..]"})," \u4f1a\u5c06\u6587\u672c\u989c\u8272\u4fee\u6539\u4e3a\u4e3b\u9898\u8272\uff0c\u8fd9\u6837\u770b\u8d77\u6765\u4f1a\u66f4\u7f8e\u89c2\uff0c\u8fd9\u4e5f\u662f\u6211\u4eec\u63a5\u4e0b\u6765\u8981\u5b9e\u73b0\u7684\u76ee\u6807\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u6211\u4eec\u5728 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u91cc\u52a0\u4e0a\u4e00\u53e5"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:"self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n"})}),"\n",(0,i.jsxs)(s.p,{children:["\u8fd9\u53e5\u4ee3\u7801\u7684\u610f\u601d\u5c31\u662f\u5c06\u6587\u672c\u989c\u8272\u4fee\u6539\u4e3a ",(0,i.jsx)(s.code,{children:"self.colors.primary"}),"\uff0c\u800c\u8fd9\u91cc\u7684 ",(0,i.jsx)(s.code,{children:"self"})," \u6b63\u662f\u901a\u8fc7\u53c2\u6570 ",(0,i.jsx)(s.code,{children:"self: none"})," \u4f20\u8fdb\u6765\u7684\uff0c\u8fd9\u6837\u6211\u4eec\u624d\u80fd\u5b9e\u65f6\u5730\u83b7\u53d6\u5230 ",(0,i.jsx)(s.code,{children:"primary"})," \u4e3b\u9898\u8272\u3002"]}),"\n",(0,i.jsx)(s.h2,{id:"\u81ea\u5b9a\u4e49-header-\u548c-footer",children:"\u81ea\u5b9a\u4e49 Header \u548c Footer"}),"\n",(0,i.jsx)(s.p,{children:"\u5728\u8fd9\u91cc\uff0c\u6211\u8ba4\u4e3a\u60a8\u5df2\u7ecf\u9605\u8bfb\u8fc7\u9875\u9762\u5e03\u5c40\u7ae0\u8282\u4e86\uff0c\u56e0\u6b64\u6211\u4eec\u77e5\u9053\u5e94\u8be5\u7ed9 slides \u52a0\u4e0a header \u548c footer\u3002"}),"\n",(0,i.jsxs)(s.p,{children:["\u9996\u5148\uff0c\u6211\u4eec\u5148\u52a0\u5165 ",(0,i.jsx)(s.code,{children:"self.bamboo-title = []"}),"\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u6211\u4eec\u5c06\u5f53\u524d slide \u7684\u6807\u9898\u4f5c\u4e3a\u4e00\u4e2a\u6210\u5458\u53d8\u91cf ",(0,i.jsx)(s.code,{children:"self.bamboo-title"}),"\uff0c\u4fdd\u5b58\u5728 ",(0,i.jsx)(s.code,{children:"self"})," \u91cc\u9762\uff0c\u8fd9\u6837\u65b9\u4fbf\u6211\u4eec\u5728 header \u91cc\u4f7f\u7528\uff0c\u4ee5\u53ca\u540e\u7eed\u4fee\u6539\u3002\u540c\u7406\uff0c\u6211\u4eec\u8fd8\u521b\u5efa\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"self.bamboo-footer"}),"\uff0c\u5e76\u5c06 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u7684 ",(0,i.jsx)(s.code,{children:"footer: []"})," \u53c2\u6570\u4fdd\u5b58\u8d77\u6765\uff0c\u7528\u4f5c\u5de6\u4e0b\u89d2\u7684 footer \u5c55\u793a\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u7136\u540e\u503c\u5f97\u6ce8\u610f\u7684\u5c31\u662f\uff0c\u6211\u4eec\u7684 header \u5176\u5b9e\u662f\u4e00\u4e2a\u5f62\u5982 ",(0,i.jsx)(s.code,{children:"let header(self) = { .. }"})," \u7684\u53c2\u6570\u4e3a ",(0,i.jsx)(s.code,{children:"self"})," \u7684 content \u51fd\u6570\uff0c\u800c\u4e0d\u662f\u4e00\u4e2a\u5355\u7eaf\u7684 content\uff0c\u8fd9\u6837\u6211\u4eec\u624d\u80fd\u4ece\u6700\u65b0\u7684 ",(0,i.jsx)(s.code,{children:"self"})," \u5185\u90e8\u83b7\u53d6\u5230\u6211\u4eec\u9700\u8981\u7684\u4fe1\u606f\uff0c\u4f8b\u5982 ",(0,i.jsx)(s.code,{children:"self.bamboo-title"}),"\u3002\u800c footer \u4e5f\u662f\u540c\u7406\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u91cc\u9762\u4f7f\u7528\u5230\u7684 ",(0,i.jsx)(s.code,{children:"components.cell"})," \u5176\u5b9e\u5c31\u662f ",(0,i.jsx)(s.code,{children:"#let cell = block.with(width: 100%, height: 100%, above: 0pt, below: 0pt, breakable: false)"}),"\uff0c\u800c ",(0,i.jsx)(s.code,{children:"show: components.cell"})," \u4e5f\u5c31\u662f ",(0,i.jsx)(s.code,{children:"components.cell(body)"})," \u7684\u7b80\u5199\uff0cfooter \u7684 ",(0,i.jsx)(s.code,{children:"show: pad.with(.4em)"})," \u4e5f\u662f\u540c\u7406\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u53e6\u4e00\u70b9\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c",(0,i.jsx)(s.code,{children:"states"})," \u6a21\u5757\u91cc\u653e\u7f6e\u4e86\u5f88\u591a\u548c\u8ba1\u6570\u5668\u3001\u72b6\u6001\u6709\u5173\u7684\u5185\u5bb9\uff0c\u4f8b\u5982 ",(0,i.jsx)(s.code,{children:"states.current-section-title"})," \u7528\u4e8e\u663e\u793a\u5f53\u524d\u7684 ",(0,i.jsx)(s.code,{children:"section"}),"\uff0c\u800c ",(0,i.jsx)(s.code,{children:'states.slide-counter.display() + " / " + states.last-slide-number'})," \u7528\u4e8e\u663e\u793a\u5f53\u524d\u9875\u6570\u548c\u603b\u9875\u6570\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u4ee5\u53ca\u6211\u4eec\u53d1\u73b0\u6211\u4eec\u4f1a\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"utils.call-or-display(self, self.bamboo-footer)"})," \u8fd9\u6837\u7684\u8bed\u6cd5\u6765\u663e\u793a ",(0,i.jsx)(s.code,{children:"self.bamboo-footer"}),"\uff0c\u8fd9\u662f\u7528\u4e8e\u5e94\u4ed8 ",(0,i.jsx)(s.code,{children:"self.bamboo-footer = (self) => {..}"})," \u8fd9\u79cd\u60c5\u51b5\uff0c\u8fd9\u6837\u6211\u4eec\u5c31\u80fd\u7edf\u4e00 content \u51fd\u6570\u548c content \u7684\u663e\u793a\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u4e3a\u4e86\u8ba9 header \u548c footer \u6b63\u786e\u663e\u793a\uff0c\u5e76\u4e14\u4e0e\u6b63\u6587\u6709\u8db3\u591f\u7684\u95f4\u9694\uff0c\u6211\u4eec\u8fd8\u8bbe\u7f6e\u4e86\u4e0a\u4e0b margin \u548c\u5de6\u53f3 padding\uff0c\u5982 ",(0,i.jsx)(s.code,{children:"self.page-args += (margin: (top: 4em, bottom: 1.5em, x: 0em))"})," \u548c ",(0,i.jsx)(s.code,{children:"self.padding = (x: 2em, y: 0em)"}),"\u3002\u5de6\u53f3 margin \u4e3a ",(0,i.jsx)(s.code,{children:"0em"})," \u662f\u4e3a\u4e86\u8ba9 header \u80fd\u5360\u6ee1\u9875\u9762\u5bbd\u5ea6\uff0c\u6b63\u6587\u7684\u5de6\u53f3\u95f4\u8ddd\u5c31\u4f9d\u9760\u5de6\u53f3 padding ",(0,i.jsx)(s.code,{children:"2em"})," \u6765\u5b9e\u73b0\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u800c\u6211\u4eec\u8fd8\u9700\u8981\u81ea\u5b9a\u4e49\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"slide"})," \u65b9\u6cd5\uff0c\u5176\u4e2d\u63a5\u6536 ",(0,i.jsx)(s.code,{children:"slide(self: none, title: auto, ..args)"}),"\uff0c\u7b2c\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"self: none"})," \u662f\u4e00\u4e2a\u65b9\u6cd5\u6240\u5fc5\u987b\u7684\u53c2\u6570\uff0c\u7528\u4e8e\u83b7\u53d6\u6700\u65b0\u7684 ",(0,i.jsx)(s.code,{children:"self"}),"\uff1b\u800c\u7b2c\u4e8c\u4e2a ",(0,i.jsx)(s.code,{children:"title"})," \u5219\u662f\u7528\u4e8e\u66f4\u65b0 ",(0,i.jsx)(s.code,{children:"self.bamboo-title"}),"\uff0c\u4ee5\u4fbf\u5728 header \u4e2d\u663e\u793a\u51fa\u6765\uff1b\u7b2c\u4e09\u4e2a ",(0,i.jsx)(s.code,{children:"..args"})," \u662f\u7528\u4e8e\u6536\u96c6\u5269\u4f59\u7684\u53c2\u6570\uff0c\u5e76\u4f20\u5230 ",(0,i.jsx)(s.code,{children:"(self.methods.touying-slide)(self: self, ..args)"})," \u91cc\uff0c\u8fd9\u4e5f\u662f\u8ba9 Touying ",(0,i.jsx)(s.code,{children:"slide"})," \u529f\u80fd\u6b63\u5e38\u751f\u6548\u6240\u5fc5\u987b\u7684\u3002\u5e76\u4e14\uff0c\u6211\u4eec\u9700\u8981\u5728 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u91cc\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"self.methods.slide = slide"})," \u6ce8\u518c\u8fd9\u4e2a\u65b9\u6cd5\u3002"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let slide(self: none, title: auto, ..args) = {\n if title != auto {\n self.bamboo-title = title\n }\n (self.methods.touying-slide)(self: self, ..args)\n}\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n footer: [],\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n // variables for later use\n self.bamboo-title = []\n self.bamboo-footer = footer\n // set page\n let header(self) = {\n set align(top)\n show: components.cell.with(fill: self.colors.primary, inset: 1em)\n set align(horizon)\n set text(fill: self.colors.neutral-lightest, size: .7em)\n states.current-section-title\n linebreak()\n set text(size: 1.5em)\n utils.call-or-display(self, self.bamboo-title)\n }\n let footer(self) = {\n set align(bottom)\n show: pad.with(.4em)\n set text(fill: self.colors.neutral-darkest, size: .8em)\n utils.call-or-display(self, self.bamboo-footer)\n h(1fr)\n states.slide-counter.display() + " / " + states.last-slide-number\n }\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n header: header,\n footer: footer,\n margin: (top: 4em, bottom: 1.5em, x: 0em),\n )\n self.padding = (x: 2em, y: 0em)\n // register methods\n self.methods.slide = slide\n self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9", footer: self => self.info.institution)\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n'})}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{src:"https://github.com/touying-typ/touying/assets/34951714/d33bcda7-c032-4b11-b392-5b939d9a0a47",alt:"image"})}),"\n",(0,i.jsx)(s.h2,{id:"\u81ea\u5b9a\u4e49\u7279\u6b8a-slide",children:"\u81ea\u5b9a\u4e49\u7279\u6b8a Slide"}),"\n",(0,i.jsxs)(s.p,{children:["\u6211\u4eec\u5728\u4e0a\u9762\u7684\u57fa\u7840 slide \u7684\u57fa\u7840\u4e0a\uff0c\u8fdb\u4e00\u6b65\u52a0\u5165\u4e00\u4e9b\u7279\u6b8a\u7684 slide \u51fd\u6570\uff0c\u4f8b\u5982 ",(0,i.jsx)(s.code,{children:"title-slide"}),"\uff0c",(0,i.jsx)(s.code,{children:"focus-slide"})," \u4ee5\u53ca\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"slides"})," \u65b9\u6cd5\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5bf9\u4e8e ",(0,i.jsx)(s.code,{children:"title-slide"})," \u65b9\u6cd5\uff0c\u9996\u5148\uff0c\u6211\u4eec\u8c03\u7528\u4e86 ",(0,i.jsx)(s.code,{children:"self = utils.empty-page(self)"}),"\uff0c\u8fd9\u4e2a\u51fd\u6570\u53ef\u4ee5\u6e05\u9664 ",(0,i.jsx)(s.code,{children:"self.page-args.header"})," \u548c ",(0,i.jsx)(s.code,{children:"self.page-args.footer"}),"\uff0c\u4ee5\u53ca\u5c06 ",(0,i.jsx)(s.code,{children:"margin"})," \u548c ",(0,i.jsx)(s.code,{children:"padding"})," \u90fd\u8bbe\u4e3a ",(0,i.jsx)(s.code,{children:"0em"}),"\uff0c\u5f97\u5230\u4e00\u4e2a\u7a7a\u767d\u9875\u7684\u6548\u679c\u3002\u7136\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"let info = self.info + args.named()"})," \u83b7\u53d6\u5230 ",(0,i.jsx)(s.code,{children:"self.info"})," \u91cc\u4fdd\u5b58\u7684\u4fe1\u606f\uff0c\u4e5f\u53ef\u4ee5\u7528\u51fd\u6570\u53c2\u6570\u91cc\u4f20\u5165\u7684 ",(0,i.jsx)(s.code,{children:"args.named()"})," \u6765\u66f4\u65b0\u4fe1\u606f\uff0c\u4fbf\u4e8e\u540e\u7eed\u4ee5 ",(0,i.jsx)(s.code,{children:"info.title"})," \u7684\u65b9\u5f0f\u4f7f\u7528\u3002\u5177\u4f53\u7684\u9875\u9762\u5185\u5bb9 ",(0,i.jsx)(s.code,{children:"body"}),"\uff0c\u6bcf\u4e2a theme \u90fd\u4f1a\u6709\u6240\u4e0d\u540c\uff0c\u8fd9\u91cc\u5c31\u4e0d\u518d\u8fc7\u591a\u8d58\u8ff0\u3002\u800c\u5728\u6700\u540e\uff0c\u6211\u4eec\u8c03\u7528\u4e86 ",(0,i.jsx)(s.code,{children:"(self.methods.touying-slide)(self: self, repeat: none, body)"}),"\uff0c\u5176\u4e2d\u7684 ",(0,i.jsx)(s.code,{children:"repeat: none"})," \u8868\u9762\u8fd9\u4e2a\u9875\u9762\u4e0d\u9700\u8981\u52a8\u753b\u6548\u679c\uff0c\u800c\u4f20\u5165 ",(0,i.jsx)(s.code,{children:"body"})," \u53c2\u6570\u4f1a\u5c06 ",(0,i.jsx)(s.code,{children:"body"})," \u7684\u5185\u5bb9\u663e\u793a\u51fa\u6765\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5bf9\u4e8e ",(0,i.jsx)(s.code,{children:"new-section-slide"})," \u65b9\u6cd5\uff0c\u4e5f\u662f\u540c\u7406\uff0c\u4e0d\u8fc7\u552f\u4e00\u8981\u6ce8\u610f\u7684\u662f\u6211\u4eec\u5728 ",(0,i.jsx)(s.code,{children:"(self.methods.touying-slide)(self: self, repeat: none, section: section, body)"})," \u7684\u53c2\u6570\u91cc\u9762\u591a\u4f20\u5165\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"section: section"}),"\uff0c\u8fd9\u662f\u7528\u6765\u58f0\u660e\u65b0\u5efa\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"section"})," \u7684\u3002\u53e6\u4e00\u70b9\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u6211\u4eec\u9664\u4e86 ",(0,i.jsx)(s.code,{children:"self.methods.new-section-slide = new-section-slide"}),"\uff0c\u8fd8\u6ce8\u518c\u4e86 ",(0,i.jsx)(s.code,{children:"self.methods.touying-new-section-slide = new-section-slide"}),"\uff0c\u8fd9\u6837 ",(0,i.jsx)(s.code,{children:"new-section-slide"})," \u5c31\u4f1a\u5728\u78b0\u5230\u4e00\u7ea7\u6807\u9898\u65f6\u81ea\u52a8\u88ab\u8c03\u7528\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5bf9\u4e8e ",(0,i.jsx)(s.code,{children:"focus-slide"})," \u65b9\u6cd5\uff0c\u5927\u90e8\u5206\u5185\u5bb9\u4e5f\u57fa\u672c\u4e00\u81f4\uff0c\u4e0d\u8fc7\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u6211\u4eec\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"self.page-args += (..)"})," \u66f4\u65b0\u4e86\u9875\u9762\u7684\u80cc\u666f\u989c\u8272\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u6700\u540e\uff0c\u6211\u4eec\u8fd8\u66f4\u65b0\u4e86 ",(0,i.jsx)(s.code,{children:"slides(self: none, title-slide: true, slide-level: 1, ..args)"})," \u65b9\u6cd5\uff0c\u5176\u4e2d ",(0,i.jsx)(s.code,{children:"title-slide"})," \u4e3a ",(0,i.jsx)(s.code,{children:"true"})," \u65f6\uff0c\u5728\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"#show: slides"})," \u540e\u4f1a\u81ea\u52a8\u521b\u5efa\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"title-slide"}),"\uff1b\u800c ",(0,i.jsx)(s.code,{children:"slide-level: 1"})," \u6307\u660e\u4e86\u4e00\u7ea7\u6807\u9898\u548c\u4e8c\u7ea7\u6807\u9898\u5206\u522b\u5bf9\u5e94 ",(0,i.jsx)(s.code,{children:"section"})," \u548c ",(0,i.jsx)(s.code,{children:"title"}),"\u3002"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let slide(self: none, title: auto, ..args) = {\n if title != auto {\n self.bamboo-title = title\n }\n (self.methods.touying-slide)(self: self, ..args)\n}\n\n#let title-slide(self: none, ..args) = {\n self = utils.empty-page(self)\n let info = self.info + args.named()\n let body = {\n set align(center + horizon)\n block(\n fill: self.colors.primary,\n width: 80%,\n inset: (y: 1em),\n radius: 1em,\n text(size: 2em, fill: self.colors.neutral-lightest, weight: "bold", info.title)\n )\n set text(fill: self.colors.neutral-darkest)\n if info.author != none {\n block(info.author)\n }\n if info.date != none {\n block(if type(info.date) == datetime { info.date.display(self.datetime-format) } else { info.date })\n }\n }\n (self.methods.touying-slide)(self: self, repeat: none, body)\n}\n\n#let new-section-slide(self: none, section) = {\n self = utils.empty-page(self)\n let body = {\n set align(center + horizon)\n set text(size: 2em, fill: self.colors.primary, weight: "bold", style: "italic")\n section\n }\n (self.methods.touying-slide)(self: self, repeat: none, section: section, body)\n}\n\n#let focus-slide(self: none, body) = {\n self = utils.empty-page(self)\n self.page-args += (\n fill: self.colors.primary,\n margin: 2em,\n )\n set text(fill: self.colors.neutral-lightest, size: 2em)\n (self.methods.touying-slide)(self: self, repeat: none, align(horizon + center, body))\n}\n\n#let slides(self: none, title-slide: true, slide-level: 1, ..args) = {\n if title-slide {\n (self.methods.title-slide)(self: self)\n }\n (self.methods.touying-slides)(self: self, slide-level: slide-level, ..args)\n}\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n footer: [],\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n // variables for later use\n self.bamboo-title = []\n self.bamboo-footer = footer\n // set page\n let header(self) = {\n set align(top)\n show: components.cell.with(fill: self.colors.primary, inset: 1em)\n set align(horizon)\n set text(fill: self.colors.neutral-lightest, size: .7em)\n states.current-section-title\n linebreak()\n set text(size: 1.5em)\n utils.call-or-display(self, self.bamboo-title)\n }\n let footer(self) = {\n set align(bottom)\n show: pad.with(.4em)\n set text(fill: self.colors.neutral-darkest, size: .8em)\n utils.call-or-display(self, self.bamboo-footer)\n h(1fr)\n states.slide-counter.display() + " / " + states.last-slide-number\n }\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n header: header,\n footer: footer,\n margin: (top: 4em, bottom: 1.5em, x: 0em),\n )\n self.padding = (x: 2em, y: 0em)\n // register methods\n self.methods.slide = slide\n self.methods.title-slide = title-slide\n self.methods.new-section-slide = new-section-slide\n self.methods.touying-new-section-slide = new-section-slide\n self.methods.focus-slide = focus-slide\n self.methods.slides = slides\n self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9", footer: self => self.info.institution)\n#let s = (s.methods.info)(\n self: s,\n title: [Title],\n subtitle: [Subtitle],\n author: [Authors],\n date: datetime.today(),\n institution: [Institution],\n)\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide, title-slide, focus-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n\n#focus-slide[\n Focus on it!\n]\n'})}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{src:"https://github.com/touying-typ/touying/assets/34951714/03c5ad02-8ff4-4068-9664-d9cfad79baaf",alt:"image"})}),"\n",(0,i.jsx)(s.h2,{id:"\u603b\u7ed3",children:"\u603b\u7ed3"}),"\n",(0,i.jsx)(s.p,{children:"\u81f3\u6b64\uff0c\u6211\u4eec\u5c31\u5df2\u7ecf\u521b\u5efa\u4e86\u4e00\u4e2a\u7b80\u6d01\u53c8\u7f8e\u89c2\u7684\u4e3b\u9898\u4e86\u3002\u4e5f\u8bb8\u4f60\u4f1a\u89c9\u5f97\uff0cTouying \u5f15\u5165\u7684\u6982\u5ff5\u8fc7\u4e8e\u4e30\u5bcc\u4e86\uff0c\u4ee5\u81f3\u4e8e\u8ba9\u4eba\u4e00\u65f6\u5f88\u96be\u8f7b\u6613\u63a5\u53d7\u3002\u8fd9\u662f\u6b63\u5e38\u7684\uff0c\u5728\u5f3a\u5927\u7684\u529f\u80fd\u4e0e\u7b80\u6d01\u7684\u6982\u5ff5\u4e4b\u95f4\uff0cTouying \u9009\u62e9\u4e86\u524d\u8005\u3002\u4f46\u662f\u4e5f\u6b63\u662f\u5f97\u76ca\u4e8e Touying \u8fd9\u79cd\u5927\u800c\u5168\u7684\u7edf\u4e00\u7406\u5ff5\uff0c\u4f60\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u5728\u4e0d\u540c\u7684\u4e3b\u9898\u4e4b\u95f4\u62bd\u79bb\u51fa\u5171\u901a\u4e4b\u5904\uff0c\u5e76\u5c06\u4f60\u5b66\u5230\u7684\u6982\u5ff5\u8fc1\u79fb\u5230\u53e6\u4e00\u4e2a\u4e3b\u9898\u4e0a\u3002\u4ea6\u6216\u8005\uff0c\u4f60\u53ef\u4ee5\u5f88\u8f7b\u6613\u5730\u4fdd\u5b58\u5168\u5c40\u53d8\u91cf\uff0c\u6216\u8005\u66f4\u6539\u5df2\u6709\u7684\u4e3b\u9898\uff0c\u4f8b\u5982\u5168\u5c40\u4fdd\u5b58\u4e3b\u9898\u989c\u8272\uff0c\u66ff\u6362\u6389 slides \u7684 header\uff0c\u6216\u8005\u6dfb\u52a0\u4e00\u4e24\u4e2a Logo \u7b49\uff0c\u8fd9\u4e5f\u6b63\u662f Touying \u89e3\u8026\u4e0e\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\u5e26\u6765\u7684\u597d\u5904\u3002"})]})}function a(e={}){const{wrapper:s}={...(0,l.a)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},1151:(e,s,n)=>{n.d(s,{Z:()=>d,a:()=>o});var i=n(7294);const l={},t=i.createContext(l);function o(e){const s=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:o(e.components),i.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/zh/assets/js/63dd4865.014917e6.js b/zh/assets/js/63dd4865.8199f349.js similarity index 99% rename from zh/assets/js/63dd4865.014917e6.js rename to zh/assets/js/63dd4865.8199f349.js index ac48cd66f..792b21393 100644 --- a/zh/assets/js/63dd4865.014917e6.js +++ b/zh/assets/js/63dd4865.8199f349.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7373],{8573:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>r,contentTitle:()=>o,default:()=>a,frontMatter:()=>t,metadata:()=>d,toc:()=>c});var i=n(5893),l=n(1151);const t={sidebar_position:10},o="\u521b\u5efa\u81ea\u5df1\u7684\u4e3b\u9898",d={id:"build-your-own-theme",title:"\u521b\u5efa\u81ea\u5df1\u7684\u4e3b\u9898",description:"\u4f7f\u7528 Touying \u521b\u5efa\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\u662f\u4e00\u4ef6\u7565\u663e\u590d\u6742\u7684\u4e8b\u60c5\uff0c\u56e0\u4e3a\u6211\u4eec\u5f15\u5165\u4e86\u8bb8\u591a\u7684\u6982\u5ff5\u3002\u4e0d\u8fc7\u8bf7\u653e\u5fc3\uff0c\u5982\u679c\u60a8\u771f\u7684\u7528 Touying \u521b\u5efa\u4e86\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\uff0c\u4e5f\u8bb8\u60a8\u5c31\u53ef\u4ee5\u6df1\u5207\u5730\u611f\u53d7\u5230 Touying \u63d0\u4f9b\u7684\u4fbf\u5229\u7684\u529f\u80fd\u7684\u548c\u5f3a\u5927\u7684\u53ef\u5b9a\u5236\u6027\u3002\u60a8\u53ef\u4ee5\u53c2\u8003 \u4e3b\u9898\u7684\u6e90\u4ee3\u7801\uff0c\u4e3b\u8981\u9700\u8981\u5b9e\u73b0\u7684\u5c31\u662f\uff1a",source:"@site/i18n/zh/docusaurus-plugin-content-docs/current/build-your-own-theme.md",sourceDirName:".",slug:"/build-your-own-theme",permalink:"/touying/zh/docs/next/build-your-own-theme",draft:!1,unlisted:!1,editUrl:"https://github.com/touying-typ/touying/tree/main/docs/docs/build-your-own-theme.md",tags:[],version:"current",sidebarPosition:10,frontMatter:{sidebar_position:10},sidebar:"tutorialSidebar",previous:{title:"Aqua \u4e3b\u9898",permalink:"/touying/zh/docs/next/themes/aqua"},next:{title:"Progress",permalink:"/touying/zh/docs/next/category/progress"}},r={},c=[{value:"\u4fee\u6539\u5df2\u6709\u4e3b\u9898",id:"\u4fee\u6539\u5df2\u6709\u4e3b\u9898",level:2},{value:"\u5bfc\u5165",id:"\u5bfc\u5165",level:2},{value:"register \u51fd\u6570\u548c init \u65b9\u6cd5",id:"register-\u51fd\u6570\u548c-init-\u65b9\u6cd5",level:2},{value:"\u989c\u8272\u4e3b\u9898",id:"\u989c\u8272\u4e3b\u9898",level:2},{value:"\u5b9e\u6218\uff1a\u81ea\u5b9a\u4e49 Alert \u65b9\u6cd5",id:"\u5b9e\u6218\u81ea\u5b9a\u4e49-alert-\u65b9\u6cd5",level:2},{value:"\u81ea\u5b9a\u4e49 Header \u548c Footer",id:"\u81ea\u5b9a\u4e49-header-\u548c-footer",level:2},{value:"\u81ea\u5b9a\u4e49\u7279\u6b8a Slide",id:"\u81ea\u5b9a\u4e49\u7279\u6b8a-slide",level:2},{value:"\u603b\u7ed3",id:"\u603b\u7ed3",level:2}];function h(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.h1,{id:"\u521b\u5efa\u81ea\u5df1\u7684\u4e3b\u9898",children:"\u521b\u5efa\u81ea\u5df1\u7684\u4e3b\u9898"}),"\n",(0,i.jsxs)(s.p,{children:["\u4f7f\u7528 Touying \u521b\u5efa\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\u662f\u4e00\u4ef6\u7565\u663e\u590d\u6742\u7684\u4e8b\u60c5\uff0c\u56e0\u4e3a\u6211\u4eec\u5f15\u5165\u4e86\u8bb8\u591a\u7684\u6982\u5ff5\u3002\u4e0d\u8fc7\u8bf7\u653e\u5fc3\uff0c\u5982\u679c\u60a8\u771f\u7684\u7528 Touying \u521b\u5efa\u4e86\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\uff0c\u4e5f\u8bb8\u60a8\u5c31\u53ef\u4ee5\u6df1\u5207\u5730\u611f\u53d7\u5230 Touying \u63d0\u4f9b\u7684\u4fbf\u5229\u7684\u529f\u80fd\u7684\u548c\u5f3a\u5927\u7684\u53ef\u5b9a\u5236\u6027\u3002\u60a8\u53ef\u4ee5\u53c2\u8003 ",(0,i.jsx)(s.a,{href:"https://github.com/touying-typ/touying/tree/main/themes",children:"\u4e3b\u9898\u7684\u6e90\u4ee3\u7801"}),"\uff0c\u4e3b\u8981\u9700\u8981\u5b9e\u73b0\u7684\u5c31\u662f\uff1a"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\uff0c\u521d\u59cb\u5316\u5168\u5c40\u5355\u4f8b ",(0,i.jsx)(s.code,{children:"s"}),"\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"init"})," \u65b9\u6cd5\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49\u989c\u8272\u4e3b\u9898\uff0c\u5373\u4fee\u6539 ",(0,i.jsx)(s.code,{children:"self.colors"})," \u6210\u5458\u53d8\u91cf\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"alert"})," \u65b9\u6cd5\uff0c\u53ef\u9009\uff1b"]}),"\n",(0,i.jsx)(s.li,{children:"\u81ea\u5b9a\u4e49 header\uff1b"}),"\n",(0,i.jsx)(s.li,{children:"\u81ea\u5b9a\u4e49 footer\uff1b"}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"slide"})," \u65b9\u6cd5\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49\u7279\u6b8a slide \u65b9\u6cd5\uff0c\u5982 ",(0,i.jsx)(s.code,{children:"title-slide"})," \u548c ",(0,i.jsx)(s.code,{children:"focus-slide"})," \u65b9\u6cd5\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"slides"})," \u65b9\u6cd5\uff0c\u53ef\u9009\uff1b"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"\u4e3a\u4e86\u6f14\u793a\u5982\u4f55\u4f7f\u7528 Touying \u521b\u5efa\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\uff0c\u6211\u4eec\u4e0d\u59a8\u6765\u4e00\u6b65\u4e00\u6b65\u5730\u521b\u5efa\u4e00\u4e2a\u7b80\u6d01\u7f8e\u89c2\u7684 Bamboo \u4e3b\u9898\u3002"}),"\n",(0,i.jsx)(s.h2,{id:"\u4fee\u6539\u5df2\u6709\u4e3b\u9898",children:"\u4fee\u6539\u5df2\u6709\u4e3b\u9898"}),"\n",(0,i.jsx)(s.p,{children:"\u5982\u679c\u4f60\u60f3\u5728\u672c\u5730\u4fee\u6539\u4e00\u4e2a Touying \u5185\u90e8\u7684 themes\uff0c\u800c\u4e0d\u662f\u81ea\u5df1\u4ece\u96f6\u5f00\u59cb\u521b\u5efa\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u901a\u8fc7\u4e0b\u9762\u7684\u65b9\u5f0f\u5b9e\u73b0\uff1a"}),"\n",(0,i.jsxs)(s.ol,{children:["\n",(0,i.jsxs)(s.li,{children:["\u5c06 ",(0,i.jsx)(s.code,{children:"themes"})," \u76ee\u5f55\u4e0b\u7684 ",(0,i.jsx)(s.a,{href:"https://github.com/touying-typ/touying/tree/main/themes",children:"\u4e3b\u9898\u4ee3\u7801"})," \u590d\u5236\u5230\u672c\u5730\uff0c\u4f8b\u5982\u5c06 ",(0,i.jsx)(s.code,{children:"themes/university.typ"})," \u590d\u5236\u5230\u672c\u5730 ",(0,i.jsx)(s.code,{children:"university.typ"})," \u4e2d\u3002"]}),"\n",(0,i.jsxs)(s.li,{children:["\u5c06 ",(0,i.jsx)(s.code,{children:"university.typ"})," \u6587\u4ef6\u9876\u90e8\u7684 ",(0,i.jsx)(s.code,{children:'#import "../xxx.typ"'})," \u547d\u4ee4\u5168\u90e8\u79fb\u9664\u3002"]}),"\n",(0,i.jsxs)(s.li,{children:["\u5411 ",(0,i.jsx)(s.code,{children:"university.typ"})," \u6587\u4ef6\u9876\u90e8\u4e2d\u52a0\u5165 ",(0,i.jsx)(s.code,{children:'#import "@preview/touying:0.3.3": *'})," \u6765\u5bfc\u5165\u6240\u6709\u6a21\u5757\u3002"]}),"\n",(0,i.jsxs)(s.li,{children:["\u5c06 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u4e2d\u7684 ",(0,i.jsx)(s.code,{children:"self: s"})," \u66ff\u6362\u6210 ",(0,i.jsx)(s.code,{children:"self: themes.default.register()"})," ",(0,i.jsx)(s.strong,{children:"(\u91cd\u8981)"}),"\u3002"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"\u7136\u540e\u5c31\u53ef\u4ee5\u901a\u8fc7"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#import "@preview/touying:0.3.3": *\n#import "university.typ"\n\n#let s = university.register(aspect-ratio: "16-9")\n'})}),"\n",(0,i.jsx)(s.p,{children:"\u7684\u65b9\u5f0f\u5bfc\u5165\u548c\u4f7f\u7528\u4e3b\u9898\u4e86\u3002"}),"\n",(0,i.jsxs)(s.p,{children:["\u4e00\u4e2a\u5177\u4f53\u7684\u793a\u4f8b\uff1a",(0,i.jsx)(s.a,{href:"https://typst.app/project/pdWNTS47I-6jxHrWdMSTLx",children:"https://typst.app/project/pdWNTS47I-6jxHrWdMSTLx"})]}),"\n",(0,i.jsx)(s.h2,{id:"\u5bfc\u5165",children:"\u5bfc\u5165"}),"\n",(0,i.jsx)(s.p,{children:"\u53d6\u51b3\u4e8e\u8fd9\u4e2a\u4e3b\u9898\u662f\u4f60\u81ea\u5df1\u7684\uff0c\u8fd8\u662f Touying \u7684\u4e00\u90e8\u5206\uff0c\u4f60\u53ef\u4ee5\u7528\u4e24\u79cd\u65b9\u5f0f\u5bfc\u5165\uff1a"}),"\n",(0,i.jsx)(s.p,{children:"\u5982\u679c\u53ea\u662f\u4f60\u81ea\u5df1\u4f7f\u7528\uff0c\u4f60\u53ef\u4ee5\u76f4\u63a5\u5bfc\u5165 Touying\uff1a"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#import "@preview/touying:0.3.3": *\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u5982\u679c\u4f60\u5e0c\u671b\u8fd9\u4e2a\u4e3b\u9898\u4f5c\u4e3a Touying \u7684\u4e00\u90e8\u5206\uff0c\u653e\u7f6e\u5728 Touying ",(0,i.jsx)(s.code,{children:"themes"})," \u76ee\u5f55\u4e0b\uff0c\u90a3\u4f60\u5e94\u8be5\u5c06\u4e0a\u9762\u7684\u5bfc\u5165\u8bed\u53e5\u6539\u4e3a"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#import "../utils/utils.typ"\n#import "../utils/states.typ"\n#import "../utils/components.typ"\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u5e76\u4e14\u8981\u5728 Touying \u7684 ",(0,i.jsx)(s.code,{children:"themes/themes.typ"})," \u91cc\u52a0\u4e0a"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{children:'#import "bamboo.typ"\n'})}),"\n",(0,i.jsx)(s.h2,{id:"register-\u51fd\u6570\u548c-init-\u65b9\u6cd5",children:"register \u51fd\u6570\u548c init \u65b9\u6cd5"}),"\n",(0,i.jsxs)(s.p,{children:["\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u4f1a\u533a\u5206 ",(0,i.jsx)(s.code,{children:"bamboo.typ"})," \u6a21\u677f\u6587\u4ef6\u548c ",(0,i.jsx)(s.code,{children:"main.typ"})," \u6587\u4ef6\uff0c\u540e\u8005\u6709\u65f6\u4f1a\u88ab\u7701\u7565\u3002"]}),"\n",(0,i.jsx)(s.p,{children:"\u4e00\u822c\u800c\u8a00\uff0c\u6211\u4eec\u5236\u4f5c slides \u7684\u7b2c\u4e00\u6b65\uff0c\u5c31\u662f\u786e\u5b9a\u597d\u5b57\u4f53\u5927\u5c0f\u548c\u9875\u9762\u957f\u5bbd\u6bd4\uff0c\u56e0\u6b64\u6211\u4eec\u9700\u8981\u6ce8\u518c\u4e00\u4e2a\u521d\u59cb\u5316\u65b9\u6cd5\uff1a"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n) = {\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n )\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9")\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u5982\u60a8\u6240\u89c1\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\uff0c\u5e76\u4f20\u5165\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"aspect-ratio"})," \u53c2\u6570\u6765\u8bbe\u5b9a\u9875\u9762\u957f\u5bbd\u6bd4\u3002\u6211\u4eec\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"self: themes.default.register()"})," \u7684\u65b9\u5f0f\uff0c\u83b7\u5f97\u4e86\u7f3a\u7701\u7684 ",(0,i.jsx)(s.code,{children:"self"}),"\u3002\u7136\u540e\u6211\u4eec\u5c31\u9700\u8981\u8bbe\u7f6e\u9875\u9762\u53c2\u6570\u4e86\u3002\u60a8\u5e94\u8be5\u5df2\u7ecf\u77e5\u9053\u4e86\uff0c\u5728 Touying \u4e2d\uff0c\u6211\u4eec\u4e0d\u5e94\u8be5\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"set page(..)"})," \u6765\u8bbe\u7f6e\u9875\u9762\u53c2\u6570\uff0c\u800c\u662f\u5e94\u8be5\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:" self.page-args += (..)"})," \u8fd9\u79cd\u8bed\u6cd5\u6765\u8bbe\u7f6e\uff0c\u5177\u4f53\u5185\u5bb9\u53ef\u4ee5\u53c2\u8003\u9875\u9762\u5e03\u5c40\u7ae0\u8282\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u9664\u6b64\u4e4b\u5916\uff0c\u6211\u4eec\u8fd8\u6ce8\u518c\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"self.methods.init"})," \u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u7528\u6765\u8fdb\u884c\u4e00\u4e9b\u5168\u5c40\u7684\u6837\u5f0f\u8bbe\u7f6e\uff0c\u4f8b\u5982\u5728\u6b64\u5904\uff0c\u6211\u4eec\u52a0\u4e0a\u4e86 ",(0,i.jsx)(s.code,{children:"set text(size: 20pt)"})," \u6765\u8bbe\u7f6e\u6587\u5b57\u5927\u5c0f\u3002\u4f60\u4e5f\u53ef\u4ee5\u5728\u8fd9\u91cc\u653e\u7f6e\u4e00\u4e9b\u989d\u5916\u7684\u5168\u5c40\u6837\u5f0f\u8bbe\u7f6e\uff0c\u4f8b\u5982 ",(0,i.jsx)(s.code,{children:"set par(justify: true)"})," \u7b49\u3002\u7531\u4e8e ",(0,i.jsx)(s.code,{children:"init"})," \u51fd\u6570\u88ab\u653e\u7f6e\u5230\u4e86 ",(0,i.jsx)(s.code,{children:"self.methods"})," \u91cc\uff0c\u662f\u4e00\u4e2a\u65b9\u6cd5\uff0c\u800c\u975e\u666e\u901a\u51fd\u6570\uff0c\u56e0\u6b64\u6211\u4eec\u9700\u8981\u52a0\u4e0a ",(0,i.jsx)(s.code,{children:"self: none"})," \u53c2\u6570\u624d\u80fd\u6b63\u5e38\u4f7f\u7528\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5982\u60a8\u6240\u89c1\uff0c\u540e\u7eed\u5728 ",(0,i.jsx)(s.code,{children:"main.typ"})," \u4e2d\uff0c\u6211\u4eec\u4f1a\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"#show: init"})," \u6765\u5e94\u7528 ",(0,i.jsx)(s.code,{children:"init"})," \u65b9\u6cd5\u91cc\u9762\u7684\u5168\u5c40\u6837\u5f0f\u8bbe\u7f6e\uff0c\u5176\u4e2d ",(0,i.jsx)(s.code,{children:"init"})," \u51fd\u6570\u662f\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"utils.methods(s)"})," \u7ed1\u5b9a\u5e76\u89e3\u5305\u800c\u6765\u7684\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5982\u679c\u60a8\u591a\u52a0\u6ce8\u610f\uff0c\u60a8\u4f1a\u53d1\u73b0 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u6700\u540e\u6709\u4e00\u884c\u72ec\u7acb\u7684 ",(0,i.jsx)(s.code,{children:"self"}),"\uff0c\u8fd9\u5176\u5b9e\u662f\u4ee3\u8868\u4e86\u5c06\u4fee\u6539\u540e\u7684 ",(0,i.jsx)(s.code,{children:"self"})," \u4f5c\u4e3a\u8fd4\u56de\u503c\u8fd4\u56de\uff0c\u540e\u7eed\u4f1a\u88ab\u4fdd\u5b58\u5728 ",(0,i.jsx)(s.code,{children:"#let s = .."})," \u4e2d\uff0c\u56e0\u6b64\u8fd9\u4e00\u884c\u662f\u4e0d\u53ef\u6216\u7f3a\u7684\u3002"]}),"\n",(0,i.jsx)(s.h2,{id:"\u989c\u8272\u4e3b\u9898",children:"\u989c\u8272\u4e3b\u9898"}),"\n",(0,i.jsxs)(s.p,{children:["\u4e3a\u60a8\u7684 slides \u6311\u9009\u4e00\u4e2a\u7f8e\u89c2\u7684\u989c\u8272\u4e3b\u9898\uff0c\u662f\u505a\u597d\u4e00\u4e2a slides \u7684\u5173\u952e\u6240\u5728\u3002Touying \u63d0\u4f9b\u4e86\u5185\u7f6e\u7684\u989c\u8272\u4e3b\u9898\u652f\u6301\uff0c\u4ee5\u5c3d\u91cf\u62b9\u5e73\u4e0d\u540c\u4e3b\u9898\u4e4b\u95f4\u7684 API \u5dee\u5f02\u3002Touying \u63d0\u4f9b\u4e86\u4e24\u4e2a\u7ef4\u5ea6\u7684\u989c\u8272\u9009\u62e9\uff0c\u7b2c\u4e00\u4e2a\u7ef4\u5ea6\u662f ",(0,i.jsx)(s.code,{children:"neutral"}),"\u3001",(0,i.jsx)(s.code,{children:"primary"}),"\u3001",(0,i.jsx)(s.code,{children:"secondary"})," \u548c ",(0,i.jsx)(s.code,{children:"tertiary"}),"\uff0c\u7528\u4e8e\u533a\u5206\u8272\u8c03\uff0c\u5176\u4e2d\u6700\u5e38\u7528\u7684\u5c31\u662f ",(0,i.jsx)(s.code,{children:"primary"})," \u4e3b\u9898\u8272\uff1b\u7b2c\u4e8c\u4e2a\u7ef4\u5ea6\u662f ",(0,i.jsx)(s.code,{children:"default"}),"\u3001",(0,i.jsx)(s.code,{children:"light"}),"\u3001",(0,i.jsx)(s.code,{children:"lighter"}),"\u3001",(0,i.jsx)(s.code,{children:"lightest"}),"\u3001",(0,i.jsx)(s.code,{children:"dark"}),"\u3001",(0,i.jsx)(s.code,{children:"darker"}),"\u3001",(0,i.jsx)(s.code,{children:"darkest"}),"\uff0c\u7528\u4e8e\u533a\u5206\u660e\u5ea6\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u7531\u4e8e\u6211\u4eec\u662f Bamboo \u4e3b\u9898\uff0c\u56e0\u6b64\u8fd9\u91cc\u7684\u4e3b\u9898\u8272 ",(0,i.jsx)(s.code,{children:"primary"})," \u6211\u4eec\u6311\u9009\u4e86\u4e00\u4e2a\u4e0e\u7af9\u5b50\u76f8\u8fd1\u7684\u989c\u8272 ",(0,i.jsx)(s.code,{children:'rgb("#5E8B65")'}),"\uff0c\u5e76\u52a0\u5165\u4e86\u4e2d\u6027\u8272 ",(0,i.jsx)(s.code,{children:"neutral-lightest"}),"\uff0c",(0,i.jsx)(s.code,{children:"neutral-darkest"}),"\uff0c\u5206\u522b\u4f5c\u4e3a\u80cc\u666f\u8272\u548c\u5b57\u4f53\u989c\u8272\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u6b63\u5982\u4e0b\u9762\u7684\u4ee3\u7801\u6240\u793a\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"self = (self.methods.colors)(self: self, ..)"})," \u65b9\u6cd5\u4fee\u6539\u989c\u8272\u4e3b\u9898\u3002\u5176\u672c\u8d28\u5c31\u662f ",(0,i.jsx)(s.code,{children:"self.colors += (..)"})," \u7684\u4e00\u4e2a\u5305\u88c5\u3002"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n )\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u50cf\u8fd9\u6837\u6dfb\u52a0\u4e86\u989c\u8272\u4e3b\u9898\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"self.colors.primary"})," \u8fd9\u6837\u7684\u65b9\u5f0f\u83b7\u53d6\u5230\u8fd9\u4e2a\u989c\u8272\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5e76\u4e14\u6709\u4e00\u70b9\u503c\u5f97\u6ce8\u610f\uff0c\u7528\u6237\u53ef\u4ee5\u968f\u65f6\u5728 ",(0,i.jsx)(s.code,{children:"main.typ"})," \u91cc\u901a\u8fc7"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#let s = (s.methods.colors)(self: s, primary: rgb("#3578B9"))\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u8fd9\u6837\u7684\u65b9\u5f0f\u4fee\u6539\u4e3b\u9898\u8272\uff0c\u5176\u4e2d\u8fd9\u53e5\u8bed\u53e5\u9700\u8981\u653e\u5728 ",(0,i.jsx)(s.code,{children:"register()"})," \u4e4b\u540e\uff0c\u4ee5\u53ca ",(0,i.jsx)(s.code,{children:"utils.methods(s)"})," \u4e4b\u524d\u3002"]}),"\n",(0,i.jsx)(s.p,{children:"\u8fd9\u79cd\u968f\u65f6\u66f4\u6362\u989c\u8272\u4e3b\u9898\u7684\u5185\u5bb9\uff0c\u6b63\u662f Touying \u5f3a\u5927\u53ef\u5b9a\u5236\u6027\u7684\u4f53\u73b0\u3002"}),"\n",(0,i.jsx)(s.h2,{id:"\u5b9e\u6218\u81ea\u5b9a\u4e49-alert-\u65b9\u6cd5",children:"\u5b9e\u6218\uff1a\u81ea\u5b9a\u4e49 Alert \u65b9\u6cd5"}),"\n",(0,i.jsxs)(s.p,{children:["\u4e00\u822c\u800c\u8a00\uff0c\u6211\u4eec\u90fd\u9700\u8981\u63d0\u4f9b\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"#alert[..]"})," \u51fd\u6570\u7ed9\u7528\u6237\u4f7f\u7528\uff0c\u5176\u7528\u9014\u4e0e ",(0,i.jsx)(s.code,{children:"#strong[..]"})," \u7c7b\u4f3c\uff0c\u90fd\u662f\u7528\u4e8e\u5f3a\u8c03\u5f53\u524d\u6587\u672c\u3002\u4e00\u822c ",(0,i.jsx)(s.code,{children:"#alert[..]"})," \u4f1a\u5c06\u6587\u672c\u989c\u8272\u4fee\u6539\u4e3a\u4e3b\u9898\u8272\uff0c\u8fd9\u6837\u770b\u8d77\u6765\u4f1a\u66f4\u7f8e\u89c2\uff0c\u8fd9\u4e5f\u662f\u6211\u4eec\u63a5\u4e0b\u6765\u8981\u5b9e\u73b0\u7684\u76ee\u6807\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u6211\u4eec\u5728 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u91cc\u52a0\u4e0a\u4e00\u53e5"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:"self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n"})}),"\n",(0,i.jsxs)(s.p,{children:["\u8fd9\u53e5\u4ee3\u7801\u7684\u610f\u601d\u5c31\u662f\u5c06\u6587\u672c\u989c\u8272\u4fee\u6539\u4e3a ",(0,i.jsx)(s.code,{children:"self.colors.primary"}),"\uff0c\u800c\u8fd9\u91cc\u7684 ",(0,i.jsx)(s.code,{children:"self"})," \u6b63\u662f\u901a\u8fc7\u53c2\u6570 ",(0,i.jsx)(s.code,{children:"self: none"})," \u4f20\u8fdb\u6765\u7684\uff0c\u8fd9\u6837\u6211\u4eec\u624d\u80fd\u5b9e\u65f6\u5730\u83b7\u53d6\u5230 ",(0,i.jsx)(s.code,{children:"primary"})," \u4e3b\u9898\u8272\u3002"]}),"\n",(0,i.jsx)(s.h2,{id:"\u81ea\u5b9a\u4e49-header-\u548c-footer",children:"\u81ea\u5b9a\u4e49 Header \u548c Footer"}),"\n",(0,i.jsx)(s.p,{children:"\u5728\u8fd9\u91cc\uff0c\u6211\u8ba4\u4e3a\u60a8\u5df2\u7ecf\u9605\u8bfb\u8fc7\u9875\u9762\u5e03\u5c40\u7ae0\u8282\u4e86\uff0c\u56e0\u6b64\u6211\u4eec\u77e5\u9053\u5e94\u8be5\u7ed9 slides \u52a0\u4e0a header \u548c footer\u3002"}),"\n",(0,i.jsxs)(s.p,{children:["\u9996\u5148\uff0c\u6211\u4eec\u5148\u52a0\u5165 ",(0,i.jsx)(s.code,{children:"self.bamboo-title = []"}),"\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u6211\u4eec\u5c06\u5f53\u524d slide \u7684\u6807\u9898\u4f5c\u4e3a\u4e00\u4e2a\u6210\u5458\u53d8\u91cf ",(0,i.jsx)(s.code,{children:"self.bamboo-title"}),"\uff0c\u4fdd\u5b58\u5728 ",(0,i.jsx)(s.code,{children:"self"})," \u91cc\u9762\uff0c\u8fd9\u6837\u65b9\u4fbf\u6211\u4eec\u5728 header \u91cc\u4f7f\u7528\uff0c\u4ee5\u53ca\u540e\u7eed\u4fee\u6539\u3002\u540c\u7406\uff0c\u6211\u4eec\u8fd8\u521b\u5efa\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"self.bamboo-footer"}),"\uff0c\u5e76\u5c06 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u7684 ",(0,i.jsx)(s.code,{children:"footer: []"})," \u53c2\u6570\u4fdd\u5b58\u8d77\u6765\uff0c\u7528\u4f5c\u5de6\u4e0b\u89d2\u7684 footer \u5c55\u793a\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u7136\u540e\u503c\u5f97\u6ce8\u610f\u7684\u5c31\u662f\uff0c\u6211\u4eec\u7684 header \u5176\u5b9e\u662f\u4e00\u4e2a\u5f62\u5982 ",(0,i.jsx)(s.code,{children:"let header(self) = { .. }"})," \u7684\u53c2\u6570\u4e3a ",(0,i.jsx)(s.code,{children:"self"})," \u7684 content \u51fd\u6570\uff0c\u800c\u4e0d\u662f\u4e00\u4e2a\u5355\u7eaf\u7684 content\uff0c\u8fd9\u6837\u6211\u4eec\u624d\u80fd\u4ece\u6700\u65b0\u7684 ",(0,i.jsx)(s.code,{children:"self"})," \u5185\u90e8\u83b7\u53d6\u5230\u6211\u4eec\u9700\u8981\u7684\u4fe1\u606f\uff0c\u4f8b\u5982 ",(0,i.jsx)(s.code,{children:"self.bamboo-title"}),"\u3002\u800c footer \u4e5f\u662f\u540c\u7406\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u91cc\u9762\u4f7f\u7528\u5230\u7684 ",(0,i.jsx)(s.code,{children:"components.cell"})," \u5176\u5b9e\u5c31\u662f ",(0,i.jsx)(s.code,{children:"#let cell = block.with(width: 100%, height: 100%, above: 0pt, below: 0pt, breakable: false)"}),"\uff0c\u800c ",(0,i.jsx)(s.code,{children:"show: components.cell"})," \u4e5f\u5c31\u662f ",(0,i.jsx)(s.code,{children:"components.cell(body)"})," \u7684\u7b80\u5199\uff0cfooter \u7684 ",(0,i.jsx)(s.code,{children:"show: pad.with(.4em)"})," \u4e5f\u662f\u540c\u7406\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u53e6\u4e00\u70b9\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c",(0,i.jsx)(s.code,{children:"states"})," \u6a21\u5757\u91cc\u653e\u7f6e\u4e86\u5f88\u591a\u548c\u8ba1\u6570\u5668\u3001\u72b6\u6001\u6709\u5173\u7684\u5185\u5bb9\uff0c\u4f8b\u5982 ",(0,i.jsx)(s.code,{children:"states.current-section-title"})," \u7528\u4e8e\u663e\u793a\u5f53\u524d\u7684 ",(0,i.jsx)(s.code,{children:"section"}),"\uff0c\u800c ",(0,i.jsx)(s.code,{children:'states.slide-counter.display() + " / " + states.last-slide-number'})," \u7528\u4e8e\u663e\u793a\u5f53\u524d\u9875\u6570\u548c\u603b\u9875\u6570\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u4ee5\u53ca\u6211\u4eec\u53d1\u73b0\u6211\u4eec\u4f1a\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"utils.call-or-display(self, self.bamboo-footer)"})," \u8fd9\u6837\u7684\u8bed\u6cd5\u6765\u663e\u793a ",(0,i.jsx)(s.code,{children:"self.bamboo-footer"}),"\uff0c\u8fd9\u662f\u7528\u4e8e\u5e94\u4ed8 ",(0,i.jsx)(s.code,{children:"self.bamboo-footer = (self) => {..}"})," \u8fd9\u79cd\u60c5\u51b5\uff0c\u8fd9\u6837\u6211\u4eec\u5c31\u80fd\u7edf\u4e00 content \u51fd\u6570\u548c content \u7684\u663e\u793a\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u4e3a\u4e86\u8ba9 header \u548c footer \u6b63\u786e\u663e\u793a\uff0c\u5e76\u4e14\u4e0e\u6b63\u6587\u6709\u8db3\u591f\u7684\u95f4\u9694\uff0c\u6211\u4eec\u8fd8\u8bbe\u7f6e\u4e86\u4e0a\u4e0b margin \u548c\u5de6\u53f3 padding\uff0c\u5982 ",(0,i.jsx)(s.code,{children:"self.page-args += (margin: (top: 4em, bottom: 1.5em, x: 0em))"})," \u548c ",(0,i.jsx)(s.code,{children:"self.padding = (x: 2em, y: 0em)"}),"\u3002\u5de6\u53f3 margin \u4e3a ",(0,i.jsx)(s.code,{children:"0em"})," \u662f\u4e3a\u4e86\u8ba9 header \u80fd\u5360\u6ee1\u9875\u9762\u5bbd\u5ea6\uff0c\u6b63\u6587\u7684\u5de6\u53f3\u95f4\u8ddd\u5c31\u4f9d\u9760\u5de6\u53f3 padding ",(0,i.jsx)(s.code,{children:"2em"})," \u6765\u5b9e\u73b0\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u800c\u6211\u4eec\u8fd8\u9700\u8981\u81ea\u5b9a\u4e49\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"slide"})," \u65b9\u6cd5\uff0c\u5176\u4e2d\u63a5\u6536 ",(0,i.jsx)(s.code,{children:"slide(self: none, title: auto, ..args)"}),"\uff0c\u7b2c\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"self: none"})," \u662f\u4e00\u4e2a\u65b9\u6cd5\u6240\u5fc5\u987b\u7684\u53c2\u6570\uff0c\u7528\u4e8e\u83b7\u53d6\u6700\u65b0\u7684 ",(0,i.jsx)(s.code,{children:"self"}),"\uff1b\u800c\u7b2c\u4e8c\u4e2a ",(0,i.jsx)(s.code,{children:"title"})," \u5219\u662f\u7528\u4e8e\u66f4\u65b0 ",(0,i.jsx)(s.code,{children:"self.bamboo-title"}),"\uff0c\u4ee5\u4fbf\u5728 header \u4e2d\u663e\u793a\u51fa\u6765\uff1b\u7b2c\u4e09\u4e2a ",(0,i.jsx)(s.code,{children:"..args"})," \u662f\u7528\u4e8e\u6536\u96c6\u5269\u4f59\u7684\u53c2\u6570\uff0c\u5e76\u4f20\u5230 ",(0,i.jsx)(s.code,{children:"(self.methods.touying-slide)(self: self, ..args)"})," \u91cc\uff0c\u8fd9\u4e5f\u662f\u8ba9 Touying ",(0,i.jsx)(s.code,{children:"slide"})," \u529f\u80fd\u6b63\u5e38\u751f\u6548\u6240\u5fc5\u987b\u7684\u3002\u5e76\u4e14\uff0c\u6211\u4eec\u9700\u8981\u5728 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u91cc\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"self.methods.slide = slide"})," \u6ce8\u518c\u8fd9\u4e2a\u65b9\u6cd5\u3002"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let slide(self: none, title: auto, ..args) = {\n if title != auto {\n self.bamboo-title = title\n }\n (self.methods.touying-slide)(self: self, ..args)\n}\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n footer: [],\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n // variables for later use\n self.bamboo-title = []\n self.bamboo-footer = footer\n // set page\n let header(self) = {\n set align(top)\n show: components.cell.with(fill: self.colors.primary, inset: 1em)\n set align(horizon)\n set text(fill: self.colors.neutral-lightest, size: .7em)\n states.current-section-title\n linebreak()\n set text(size: 1.5em)\n utils.call-or-display(self, self.bamboo-title)\n }\n let footer(self) = {\n set align(bottom)\n show: pad.with(.4em)\n set text(fill: self.colors.neutral-darkest, size: .8em)\n utils.call-or-display(self, self.bamboo-footer)\n h(1fr)\n states.slide-counter.display() + " / " + states.last-slide-number\n }\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n header: header,\n footer: footer,\n margin: (top: 4em, bottom: 1.5em, x: 0em),\n )\n self.padding = (x: 2em, y: 0em)\n // register methods\n self.methods.slide = slide\n self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9", footer: self => self.info.institution)\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n'})}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{src:"https://github.com/touying-typ/touying/assets/34951714/d33bcda7-c032-4b11-b392-5b939d9a0a47",alt:"image"})}),"\n",(0,i.jsx)(s.h2,{id:"\u81ea\u5b9a\u4e49\u7279\u6b8a-slide",children:"\u81ea\u5b9a\u4e49\u7279\u6b8a Slide"}),"\n",(0,i.jsxs)(s.p,{children:["\u6211\u4eec\u5728\u4e0a\u9762\u7684\u57fa\u7840 slide \u7684\u57fa\u7840\u4e0a\uff0c\u8fdb\u4e00\u6b65\u52a0\u5165\u4e00\u4e9b\u7279\u6b8a\u7684 slide \u51fd\u6570\uff0c\u4f8b\u5982 ",(0,i.jsx)(s.code,{children:"title-slide"}),"\uff0c",(0,i.jsx)(s.code,{children:"focus-slide"})," \u4ee5\u53ca\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"slides"})," \u65b9\u6cd5\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5bf9\u4e8e ",(0,i.jsx)(s.code,{children:"title-slide"})," \u65b9\u6cd5\uff0c\u9996\u5148\uff0c\u6211\u4eec\u8c03\u7528\u4e86 ",(0,i.jsx)(s.code,{children:"self = utils.empty-page(self)"}),"\uff0c\u8fd9\u4e2a\u51fd\u6570\u53ef\u4ee5\u6e05\u9664 ",(0,i.jsx)(s.code,{children:"self.page-args.header"})," \u548c ",(0,i.jsx)(s.code,{children:"self.page-args.footer"}),"\uff0c\u4ee5\u53ca\u5c06 ",(0,i.jsx)(s.code,{children:"margin"})," \u548c ",(0,i.jsx)(s.code,{children:"padding"})," \u90fd\u8bbe\u4e3a ",(0,i.jsx)(s.code,{children:"0em"}),"\uff0c\u5f97\u5230\u4e00\u4e2a\u7a7a\u767d\u9875\u7684\u6548\u679c\u3002\u7136\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"let info = self.info + args.named()"})," \u83b7\u53d6\u5230 ",(0,i.jsx)(s.code,{children:"self.info"})," \u91cc\u4fdd\u5b58\u7684\u4fe1\u606f\uff0c\u4e5f\u53ef\u4ee5\u7528\u51fd\u6570\u53c2\u6570\u91cc\u4f20\u5165\u7684 ",(0,i.jsx)(s.code,{children:"args.named()"})," \u6765\u66f4\u65b0\u4fe1\u606f\uff0c\u4fbf\u4e8e\u540e\u7eed\u4ee5 ",(0,i.jsx)(s.code,{children:"info.title"})," \u7684\u65b9\u5f0f\u4f7f\u7528\u3002\u5177\u4f53\u7684\u9875\u9762\u5185\u5bb9 ",(0,i.jsx)(s.code,{children:"body"}),"\uff0c\u6bcf\u4e2a theme \u90fd\u4f1a\u6709\u6240\u4e0d\u540c\uff0c\u8fd9\u91cc\u5c31\u4e0d\u518d\u8fc7\u591a\u8d58\u8ff0\u3002\u800c\u5728\u6700\u540e\uff0c\u6211\u4eec\u8c03\u7528\u4e86 ",(0,i.jsx)(s.code,{children:"(self.methods.touying-slide)(self: self, repeat: none, body)"}),"\uff0c\u5176\u4e2d\u7684 ",(0,i.jsx)(s.code,{children:"repeat: none"})," \u8868\u9762\u8fd9\u4e2a\u9875\u9762\u4e0d\u9700\u8981\u52a8\u753b\u6548\u679c\uff0c\u800c\u4f20\u5165 ",(0,i.jsx)(s.code,{children:"body"})," \u53c2\u6570\u4f1a\u5c06 ",(0,i.jsx)(s.code,{children:"body"})," \u7684\u5185\u5bb9\u663e\u793a\u51fa\u6765\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5bf9\u4e8e ",(0,i.jsx)(s.code,{children:"new-section-slide"})," \u65b9\u6cd5\uff0c\u4e5f\u662f\u540c\u7406\uff0c\u4e0d\u8fc7\u552f\u4e00\u8981\u6ce8\u610f\u7684\u662f\u6211\u4eec\u5728 ",(0,i.jsx)(s.code,{children:"(self.methods.touying-slide)(self: self, repeat: none, section: section, body)"})," \u7684\u53c2\u6570\u91cc\u9762\u591a\u4f20\u5165\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"section: section"}),"\uff0c\u8fd9\u662f\u7528\u6765\u58f0\u660e\u65b0\u5efa\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"section"})," \u7684\u3002\u53e6\u4e00\u70b9\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u6211\u4eec\u9664\u4e86 ",(0,i.jsx)(s.code,{children:"self.methods.new-section-slide = new-section-slide"}),"\uff0c\u8fd8\u6ce8\u518c\u4e86 ",(0,i.jsx)(s.code,{children:"self.methods.touying-new-section-slide = new-section-slide"}),"\uff0c\u8fd9\u6837 ",(0,i.jsx)(s.code,{children:"new-section-slide"})," \u5c31\u4f1a\u5728\u78b0\u5230\u4e00\u7ea7\u6807\u9898\u65f6\u81ea\u52a8\u88ab\u8c03\u7528\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5bf9\u4e8e ",(0,i.jsx)(s.code,{children:"focus-slide"})," \u65b9\u6cd5\uff0c\u5927\u90e8\u5206\u5185\u5bb9\u4e5f\u57fa\u672c\u4e00\u81f4\uff0c\u4e0d\u8fc7\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u6211\u4eec\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"self.page-args += (..)"})," \u66f4\u65b0\u4e86\u9875\u9762\u7684\u80cc\u666f\u989c\u8272\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u6700\u540e\uff0c\u6211\u4eec\u8fd8\u66f4\u65b0\u4e86 ",(0,i.jsx)(s.code,{children:"slides(self: none, title-slide: true, slide-level: 1, ..args)"})," \u65b9\u6cd5\uff0c\u5176\u4e2d ",(0,i.jsx)(s.code,{children:"title-slide"})," \u4e3a ",(0,i.jsx)(s.code,{children:"true"})," \u65f6\uff0c\u5728\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"#show: slides"})," \u540e\u4f1a\u81ea\u52a8\u521b\u5efa\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"title-slide"}),"\uff1b\u800c ",(0,i.jsx)(s.code,{children:"slide-level: 1"})," \u6307\u660e\u4e86\u4e00\u7ea7\u6807\u9898\u548c\u4e8c\u7ea7\u6807\u9898\u5206\u522b\u5bf9\u5e94 ",(0,i.jsx)(s.code,{children:"section"})," \u548c ",(0,i.jsx)(s.code,{children:"title"}),"\u3002"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let slide(self: none, title: auto, ..args) = {\n if title != auto {\n self.bamboo-title = title\n }\n (self.methods.touying-slide)(self: self, ..args)\n}\n\n#let title-slide(self: none, ..args) = {\n self = utils.empty-page(self)\n let info = self.info + args.named()\n let body = {\n set align(center + horizon)\n block(\n fill: self.colors.primary,\n width: 80%,\n inset: (y: 1em),\n radius: 1em,\n text(size: 2em, fill: self.colors.neutral-lightest, weight: "bold", info.title)\n )\n set text(fill: self.colors.neutral-darkest)\n if info.author != none {\n block(info.author)\n }\n if info.date != none {\n block(if type(info.date) == datetime { info.date.display(self.datetime-format) } else { info.date })\n }\n }\n (self.methods.touying-slide)(self: self, repeat: none, body)\n}\n\n#let new-section-slide(self: none, section) = {\n self = utils.empty-page(self)\n let body = {\n set align(center + horizon)\n set text(size: 2em, fill: self.colors.primary, weight: "bold", style: "italic")\n section\n }\n (self.methods.touying-slide)(self: self, repeat: none, section: section, body)\n}\n\n#let focus-slide(self: none, body) = {\n self = utils.empty-page(self)\n self.page-args += (\n fill: self.colors.primary,\n margin: 2em,\n )\n set text(fill: self.colors.neutral-lightest, size: 2em)\n (self.methods.touying-slide)(self: self, repeat: none, align(horizon + center, body))\n}\n\n#let slides(self: none, title-slide: true, slide-level: 1, ..args) = {\n if title-slide {\n (self.methods.title-slide)(self: self)\n }\n (self.methods.touying-slides)(self: self, slide-level: slide-level, ..args)\n}\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n footer: [],\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n // variables for later use\n self.bamboo-title = []\n self.bamboo-footer = footer\n // set page\n let header(self) = {\n set align(top)\n show: components.cell.with(fill: self.colors.primary, inset: 1em)\n set align(horizon)\n set text(fill: self.colors.neutral-lightest, size: .7em)\n states.current-section-title\n linebreak()\n set text(size: 1.5em)\n utils.call-or-display(self, self.bamboo-title)\n }\n let footer(self) = {\n set align(bottom)\n show: pad.with(.4em)\n set text(fill: self.colors.neutral-darkest, size: .8em)\n utils.call-or-display(self, self.bamboo-footer)\n h(1fr)\n states.slide-counter.display() + " / " + states.last-slide-number\n }\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n header: header,\n footer: footer,\n margin: (top: 4em, bottom: 1.5em, x: 0em),\n )\n self.padding = (x: 2em, y: 0em)\n // register methods\n self.methods.slide = slide\n self.methods.title-slide = title-slide\n self.methods.new-section-slide = new-section-slide\n self.methods.touying-new-section-slide = new-section-slide\n self.methods.focus-slide = focus-slide\n self.methods.slides = slides\n self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9", footer: self => self.info.institution)\n#let s = (s.methods.info)(\n self: s,\n title: [Title],\n subtitle: [Subtitle],\n author: [Authors],\n date: datetime.today(),\n institution: [Institution],\n)\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide, title-slide, focus-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n\n#focus-slide[\n Focus on it!\n]\n'})}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{src:"https://github.com/touying-typ/touying/assets/34951714/03c5ad02-8ff4-4068-9664-d9cfad79baaf",alt:"image"})}),"\n",(0,i.jsx)(s.h2,{id:"\u603b\u7ed3",children:"\u603b\u7ed3"}),"\n",(0,i.jsx)(s.p,{children:"\u81f3\u6b64\uff0c\u6211\u4eec\u5c31\u5df2\u7ecf\u521b\u5efa\u4e86\u4e00\u4e2a\u7b80\u6d01\u53c8\u7f8e\u89c2\u7684\u4e3b\u9898\u4e86\u3002\u4e5f\u8bb8\u4f60\u4f1a\u89c9\u5f97\uff0cTouying \u5f15\u5165\u7684\u6982\u5ff5\u8fc7\u4e8e\u4e30\u5bcc\u4e86\uff0c\u4ee5\u81f3\u4e8e\u8ba9\u4eba\u4e00\u65f6\u5f88\u96be\u8f7b\u6613\u63a5\u53d7\u3002\u8fd9\u662f\u6b63\u5e38\u7684\uff0c\u5728\u5f3a\u5927\u7684\u529f\u80fd\u4e0e\u7b80\u6d01\u7684\u6982\u5ff5\u4e4b\u95f4\uff0cTouying \u9009\u62e9\u4e86\u524d\u8005\u3002\u4f46\u662f\u4e5f\u6b63\u662f\u5f97\u76ca\u4e8e Touying \u8fd9\u79cd\u5927\u800c\u5168\u7684\u7edf\u4e00\u7406\u5ff5\uff0c\u4f60\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u5728\u4e0d\u540c\u7684\u4e3b\u9898\u4e4b\u95f4\u62bd\u79bb\u51fa\u5171\u901a\u4e4b\u5904\uff0c\u5e76\u5c06\u4f60\u5b66\u5230\u7684\u6982\u5ff5\u8fc1\u79fb\u5230\u53e6\u4e00\u4e2a\u4e3b\u9898\u4e0a\u3002\u4ea6\u6216\u8005\uff0c\u4f60\u53ef\u4ee5\u5f88\u8f7b\u6613\u5730\u4fdd\u5b58\u5168\u5c40\u53d8\u91cf\uff0c\u6216\u8005\u66f4\u6539\u5df2\u6709\u7684\u4e3b\u9898\uff0c\u4f8b\u5982\u5168\u5c40\u4fdd\u5b58\u4e3b\u9898\u989c\u8272\uff0c\u66ff\u6362\u6389 slides \u7684 header\uff0c\u6216\u8005\u6dfb\u52a0\u4e00\u4e24\u4e2a Logo \u7b49\uff0c\u8fd9\u4e5f\u6b63\u662f Touying \u89e3\u8026\u4e0e\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\u5e26\u6765\u7684\u597d\u5904\u3002"})]})}function a(e={}){const{wrapper:s}={...(0,l.a)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},1151:(e,s,n)=>{n.d(s,{Z:()=>d,a:()=>o});var i=n(7294);const l={},t=i.createContext(l);function o(e){const s=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:o(e.components),i.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7373],{8573:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>r,contentTitle:()=>o,default:()=>a,frontMatter:()=>t,metadata:()=>d,toc:()=>c});var i=n(5893),l=n(1151);const t={sidebar_position:10},o="\u521b\u5efa\u81ea\u5df1\u7684\u4e3b\u9898",d={id:"build-your-own-theme",title:"\u521b\u5efa\u81ea\u5df1\u7684\u4e3b\u9898",description:"\u4f7f\u7528 Touying \u521b\u5efa\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\u662f\u4e00\u4ef6\u7565\u663e\u590d\u6742\u7684\u4e8b\u60c5\uff0c\u56e0\u4e3a\u6211\u4eec\u5f15\u5165\u4e86\u8bb8\u591a\u7684\u6982\u5ff5\u3002\u4e0d\u8fc7\u8bf7\u653e\u5fc3\uff0c\u5982\u679c\u60a8\u771f\u7684\u7528 Touying \u521b\u5efa\u4e86\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\uff0c\u4e5f\u8bb8\u60a8\u5c31\u53ef\u4ee5\u6df1\u5207\u5730\u611f\u53d7\u5230 Touying \u63d0\u4f9b\u7684\u4fbf\u5229\u7684\u529f\u80fd\u7684\u548c\u5f3a\u5927\u7684\u53ef\u5b9a\u5236\u6027\u3002\u60a8\u53ef\u4ee5\u53c2\u8003 \u4e3b\u9898\u7684\u6e90\u4ee3\u7801\uff0c\u4e3b\u8981\u9700\u8981\u5b9e\u73b0\u7684\u5c31\u662f\uff1a",source:"@site/i18n/zh/docusaurus-plugin-content-docs/current/build-your-own-theme.md",sourceDirName:".",slug:"/build-your-own-theme",permalink:"/touying/zh/docs/next/build-your-own-theme",draft:!1,unlisted:!1,editUrl:"https://github.com/touying-typ/touying/tree/main/docs/docs/build-your-own-theme.md",tags:[],version:"current",sidebarPosition:10,frontMatter:{sidebar_position:10},sidebar:"tutorialSidebar",previous:{title:"Aqua \u4e3b\u9898",permalink:"/touying/zh/docs/next/themes/aqua"},next:{title:"Progress",permalink:"/touying/zh/docs/next/category/progress"}},r={},c=[{value:"\u4fee\u6539\u5df2\u6709\u4e3b\u9898",id:"\u4fee\u6539\u5df2\u6709\u4e3b\u9898",level:2},{value:"\u5bfc\u5165",id:"\u5bfc\u5165",level:2},{value:"register \u51fd\u6570\u548c init \u65b9\u6cd5",id:"register-\u51fd\u6570\u548c-init-\u65b9\u6cd5",level:2},{value:"\u989c\u8272\u4e3b\u9898",id:"\u989c\u8272\u4e3b\u9898",level:2},{value:"\u5b9e\u6218\uff1a\u81ea\u5b9a\u4e49 Alert \u65b9\u6cd5",id:"\u5b9e\u6218\u81ea\u5b9a\u4e49-alert-\u65b9\u6cd5",level:2},{value:"\u81ea\u5b9a\u4e49 Header \u548c Footer",id:"\u81ea\u5b9a\u4e49-header-\u548c-footer",level:2},{value:"\u81ea\u5b9a\u4e49\u7279\u6b8a Slide",id:"\u81ea\u5b9a\u4e49\u7279\u6b8a-slide",level:2},{value:"\u603b\u7ed3",id:"\u603b\u7ed3",level:2}];function h(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.h1,{id:"\u521b\u5efa\u81ea\u5df1\u7684\u4e3b\u9898",children:"\u521b\u5efa\u81ea\u5df1\u7684\u4e3b\u9898"}),"\n",(0,i.jsxs)(s.p,{children:["\u4f7f\u7528 Touying \u521b\u5efa\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\u662f\u4e00\u4ef6\u7565\u663e\u590d\u6742\u7684\u4e8b\u60c5\uff0c\u56e0\u4e3a\u6211\u4eec\u5f15\u5165\u4e86\u8bb8\u591a\u7684\u6982\u5ff5\u3002\u4e0d\u8fc7\u8bf7\u653e\u5fc3\uff0c\u5982\u679c\u60a8\u771f\u7684\u7528 Touying \u521b\u5efa\u4e86\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\uff0c\u4e5f\u8bb8\u60a8\u5c31\u53ef\u4ee5\u6df1\u5207\u5730\u611f\u53d7\u5230 Touying \u63d0\u4f9b\u7684\u4fbf\u5229\u7684\u529f\u80fd\u7684\u548c\u5f3a\u5927\u7684\u53ef\u5b9a\u5236\u6027\u3002\u60a8\u53ef\u4ee5\u53c2\u8003 ",(0,i.jsx)(s.a,{href:"https://github.com/touying-typ/touying/tree/main/themes",children:"\u4e3b\u9898\u7684\u6e90\u4ee3\u7801"}),"\uff0c\u4e3b\u8981\u9700\u8981\u5b9e\u73b0\u7684\u5c31\u662f\uff1a"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\uff0c\u521d\u59cb\u5316\u5168\u5c40\u5355\u4f8b ",(0,i.jsx)(s.code,{children:"s"}),"\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"init"})," \u65b9\u6cd5\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49\u989c\u8272\u4e3b\u9898\uff0c\u5373\u4fee\u6539 ",(0,i.jsx)(s.code,{children:"self.colors"})," \u6210\u5458\u53d8\u91cf\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"alert"})," \u65b9\u6cd5\uff0c\u53ef\u9009\uff1b"]}),"\n",(0,i.jsx)(s.li,{children:"\u81ea\u5b9a\u4e49 header\uff1b"}),"\n",(0,i.jsx)(s.li,{children:"\u81ea\u5b9a\u4e49 footer\uff1b"}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"slide"})," \u65b9\u6cd5\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49\u7279\u6b8a slide \u65b9\u6cd5\uff0c\u5982 ",(0,i.jsx)(s.code,{children:"title-slide"})," \u548c ",(0,i.jsx)(s.code,{children:"focus-slide"})," \u65b9\u6cd5\uff1b"]}),"\n",(0,i.jsxs)(s.li,{children:["\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"slides"})," \u65b9\u6cd5\uff0c\u53ef\u9009\uff1b"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"\u4e3a\u4e86\u6f14\u793a\u5982\u4f55\u4f7f\u7528 Touying \u521b\u5efa\u4e00\u4e2a\u81ea\u5df1\u7684\u4e3b\u9898\uff0c\u6211\u4eec\u4e0d\u59a8\u6765\u4e00\u6b65\u4e00\u6b65\u5730\u521b\u5efa\u4e00\u4e2a\u7b80\u6d01\u7f8e\u89c2\u7684 Bamboo \u4e3b\u9898\u3002"}),"\n",(0,i.jsx)(s.h2,{id:"\u4fee\u6539\u5df2\u6709\u4e3b\u9898",children:"\u4fee\u6539\u5df2\u6709\u4e3b\u9898"}),"\n",(0,i.jsx)(s.p,{children:"\u5982\u679c\u4f60\u60f3\u5728\u672c\u5730\u4fee\u6539\u4e00\u4e2a Touying \u5185\u90e8\u7684 themes\uff0c\u800c\u4e0d\u662f\u81ea\u5df1\u4ece\u96f6\u5f00\u59cb\u521b\u5efa\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u901a\u8fc7\u4e0b\u9762\u7684\u65b9\u5f0f\u5b9e\u73b0\uff1a"}),"\n",(0,i.jsxs)(s.ol,{children:["\n",(0,i.jsxs)(s.li,{children:["\u5c06 ",(0,i.jsx)(s.code,{children:"themes"})," \u76ee\u5f55\u4e0b\u7684 ",(0,i.jsx)(s.a,{href:"https://github.com/touying-typ/touying/tree/main/themes",children:"\u4e3b\u9898\u4ee3\u7801"})," \u590d\u5236\u5230\u672c\u5730\uff0c\u4f8b\u5982\u5c06 ",(0,i.jsx)(s.code,{children:"themes/university.typ"})," \u590d\u5236\u5230\u672c\u5730 ",(0,i.jsx)(s.code,{children:"university.typ"})," \u4e2d\u3002"]}),"\n",(0,i.jsxs)(s.li,{children:["\u5c06 ",(0,i.jsx)(s.code,{children:"university.typ"})," \u6587\u4ef6\u9876\u90e8\u7684 ",(0,i.jsx)(s.code,{children:'#import "../xxx.typ"'})," \u547d\u4ee4\u5168\u90e8\u79fb\u9664\u3002"]}),"\n",(0,i.jsxs)(s.li,{children:["\u5411 ",(0,i.jsx)(s.code,{children:"university.typ"})," \u6587\u4ef6\u9876\u90e8\u4e2d\u52a0\u5165 ",(0,i.jsx)(s.code,{children:'#import "@preview/touying:0.3.3": *'})," \u6765\u5bfc\u5165\u6240\u6709\u6a21\u5757\u3002"]}),"\n",(0,i.jsxs)(s.li,{children:["\u5c06 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u4e2d\u7684 ",(0,i.jsx)(s.code,{children:"self: s"})," \u66ff\u6362\u6210 ",(0,i.jsx)(s.code,{children:"self: themes.default.register()"})," ",(0,i.jsx)(s.strong,{children:"(\u91cd\u8981)"}),"\u3002"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"\u7136\u540e\u5c31\u53ef\u4ee5\u901a\u8fc7"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#import "@preview/touying:0.3.3": *\n#import "university.typ"\n\n#let s = university.register(aspect-ratio: "16-9")\n'})}),"\n",(0,i.jsx)(s.p,{children:"\u7684\u65b9\u5f0f\u5bfc\u5165\u548c\u4f7f\u7528\u4e3b\u9898\u4e86\u3002"}),"\n",(0,i.jsxs)(s.p,{children:["\u4e00\u4e2a\u5177\u4f53\u7684\u793a\u4f8b\uff1a",(0,i.jsx)(s.a,{href:"https://typst.app/project/rqRuzg0keo_ZEB5AdxjweA",children:"https://typst.app/project/rqRuzg0keo_ZEB5AdxjweA"})]}),"\n",(0,i.jsx)(s.h2,{id:"\u5bfc\u5165",children:"\u5bfc\u5165"}),"\n",(0,i.jsx)(s.p,{children:"\u53d6\u51b3\u4e8e\u8fd9\u4e2a\u4e3b\u9898\u662f\u4f60\u81ea\u5df1\u7684\uff0c\u8fd8\u662f Touying \u7684\u4e00\u90e8\u5206\uff0c\u4f60\u53ef\u4ee5\u7528\u4e24\u79cd\u65b9\u5f0f\u5bfc\u5165\uff1a"}),"\n",(0,i.jsx)(s.p,{children:"\u5982\u679c\u53ea\u662f\u4f60\u81ea\u5df1\u4f7f\u7528\uff0c\u4f60\u53ef\u4ee5\u76f4\u63a5\u5bfc\u5165 Touying\uff1a"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#import "@preview/touying:0.3.3": *\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u5982\u679c\u4f60\u5e0c\u671b\u8fd9\u4e2a\u4e3b\u9898\u4f5c\u4e3a Touying \u7684\u4e00\u90e8\u5206\uff0c\u653e\u7f6e\u5728 Touying ",(0,i.jsx)(s.code,{children:"themes"})," \u76ee\u5f55\u4e0b\uff0c\u90a3\u4f60\u5e94\u8be5\u5c06\u4e0a\u9762\u7684\u5bfc\u5165\u8bed\u53e5\u6539\u4e3a"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#import "../utils/utils.typ"\n#import "../utils/states.typ"\n#import "../utils/components.typ"\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u5e76\u4e14\u8981\u5728 Touying \u7684 ",(0,i.jsx)(s.code,{children:"themes/themes.typ"})," \u91cc\u52a0\u4e0a"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{children:'#import "bamboo.typ"\n'})}),"\n",(0,i.jsx)(s.h2,{id:"register-\u51fd\u6570\u548c-init-\u65b9\u6cd5",children:"register \u51fd\u6570\u548c init \u65b9\u6cd5"}),"\n",(0,i.jsxs)(s.p,{children:["\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u4f1a\u533a\u5206 ",(0,i.jsx)(s.code,{children:"bamboo.typ"})," \u6a21\u677f\u6587\u4ef6\u548c ",(0,i.jsx)(s.code,{children:"main.typ"})," \u6587\u4ef6\uff0c\u540e\u8005\u6709\u65f6\u4f1a\u88ab\u7701\u7565\u3002"]}),"\n",(0,i.jsx)(s.p,{children:"\u4e00\u822c\u800c\u8a00\uff0c\u6211\u4eec\u5236\u4f5c slides \u7684\u7b2c\u4e00\u6b65\uff0c\u5c31\u662f\u786e\u5b9a\u597d\u5b57\u4f53\u5927\u5c0f\u548c\u9875\u9762\u957f\u5bbd\u6bd4\uff0c\u56e0\u6b64\u6211\u4eec\u9700\u8981\u6ce8\u518c\u4e00\u4e2a\u521d\u59cb\u5316\u65b9\u6cd5\uff1a"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n) = {\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n )\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9")\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u5982\u60a8\u6240\u89c1\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\uff0c\u5e76\u4f20\u5165\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"aspect-ratio"})," \u53c2\u6570\u6765\u8bbe\u5b9a\u9875\u9762\u957f\u5bbd\u6bd4\u3002\u6211\u4eec\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"self: themes.default.register()"})," \u7684\u65b9\u5f0f\uff0c\u83b7\u5f97\u4e86\u7f3a\u7701\u7684 ",(0,i.jsx)(s.code,{children:"self"}),"\u3002\u7136\u540e\u6211\u4eec\u5c31\u9700\u8981\u8bbe\u7f6e\u9875\u9762\u53c2\u6570\u4e86\u3002\u60a8\u5e94\u8be5\u5df2\u7ecf\u77e5\u9053\u4e86\uff0c\u5728 Touying \u4e2d\uff0c\u6211\u4eec\u4e0d\u5e94\u8be5\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"set page(..)"})," \u6765\u8bbe\u7f6e\u9875\u9762\u53c2\u6570\uff0c\u800c\u662f\u5e94\u8be5\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:" self.page-args += (..)"})," \u8fd9\u79cd\u8bed\u6cd5\u6765\u8bbe\u7f6e\uff0c\u5177\u4f53\u5185\u5bb9\u53ef\u4ee5\u53c2\u8003\u9875\u9762\u5e03\u5c40\u7ae0\u8282\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u9664\u6b64\u4e4b\u5916\uff0c\u6211\u4eec\u8fd8\u6ce8\u518c\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"self.methods.init"})," \u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u7528\u6765\u8fdb\u884c\u4e00\u4e9b\u5168\u5c40\u7684\u6837\u5f0f\u8bbe\u7f6e\uff0c\u4f8b\u5982\u5728\u6b64\u5904\uff0c\u6211\u4eec\u52a0\u4e0a\u4e86 ",(0,i.jsx)(s.code,{children:"set text(size: 20pt)"})," \u6765\u8bbe\u7f6e\u6587\u5b57\u5927\u5c0f\u3002\u4f60\u4e5f\u53ef\u4ee5\u5728\u8fd9\u91cc\u653e\u7f6e\u4e00\u4e9b\u989d\u5916\u7684\u5168\u5c40\u6837\u5f0f\u8bbe\u7f6e\uff0c\u4f8b\u5982 ",(0,i.jsx)(s.code,{children:"set par(justify: true)"})," \u7b49\u3002\u7531\u4e8e ",(0,i.jsx)(s.code,{children:"init"})," \u51fd\u6570\u88ab\u653e\u7f6e\u5230\u4e86 ",(0,i.jsx)(s.code,{children:"self.methods"})," \u91cc\uff0c\u662f\u4e00\u4e2a\u65b9\u6cd5\uff0c\u800c\u975e\u666e\u901a\u51fd\u6570\uff0c\u56e0\u6b64\u6211\u4eec\u9700\u8981\u52a0\u4e0a ",(0,i.jsx)(s.code,{children:"self: none"})," \u53c2\u6570\u624d\u80fd\u6b63\u5e38\u4f7f\u7528\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5982\u60a8\u6240\u89c1\uff0c\u540e\u7eed\u5728 ",(0,i.jsx)(s.code,{children:"main.typ"})," \u4e2d\uff0c\u6211\u4eec\u4f1a\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"#show: init"})," \u6765\u5e94\u7528 ",(0,i.jsx)(s.code,{children:"init"})," \u65b9\u6cd5\u91cc\u9762\u7684\u5168\u5c40\u6837\u5f0f\u8bbe\u7f6e\uff0c\u5176\u4e2d ",(0,i.jsx)(s.code,{children:"init"})," \u51fd\u6570\u662f\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"utils.methods(s)"})," \u7ed1\u5b9a\u5e76\u89e3\u5305\u800c\u6765\u7684\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5982\u679c\u60a8\u591a\u52a0\u6ce8\u610f\uff0c\u60a8\u4f1a\u53d1\u73b0 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u6700\u540e\u6709\u4e00\u884c\u72ec\u7acb\u7684 ",(0,i.jsx)(s.code,{children:"self"}),"\uff0c\u8fd9\u5176\u5b9e\u662f\u4ee3\u8868\u4e86\u5c06\u4fee\u6539\u540e\u7684 ",(0,i.jsx)(s.code,{children:"self"})," \u4f5c\u4e3a\u8fd4\u56de\u503c\u8fd4\u56de\uff0c\u540e\u7eed\u4f1a\u88ab\u4fdd\u5b58\u5728 ",(0,i.jsx)(s.code,{children:"#let s = .."})," \u4e2d\uff0c\u56e0\u6b64\u8fd9\u4e00\u884c\u662f\u4e0d\u53ef\u6216\u7f3a\u7684\u3002"]}),"\n",(0,i.jsx)(s.h2,{id:"\u989c\u8272\u4e3b\u9898",children:"\u989c\u8272\u4e3b\u9898"}),"\n",(0,i.jsxs)(s.p,{children:["\u4e3a\u60a8\u7684 slides \u6311\u9009\u4e00\u4e2a\u7f8e\u89c2\u7684\u989c\u8272\u4e3b\u9898\uff0c\u662f\u505a\u597d\u4e00\u4e2a slides \u7684\u5173\u952e\u6240\u5728\u3002Touying \u63d0\u4f9b\u4e86\u5185\u7f6e\u7684\u989c\u8272\u4e3b\u9898\u652f\u6301\uff0c\u4ee5\u5c3d\u91cf\u62b9\u5e73\u4e0d\u540c\u4e3b\u9898\u4e4b\u95f4\u7684 API \u5dee\u5f02\u3002Touying \u63d0\u4f9b\u4e86\u4e24\u4e2a\u7ef4\u5ea6\u7684\u989c\u8272\u9009\u62e9\uff0c\u7b2c\u4e00\u4e2a\u7ef4\u5ea6\u662f ",(0,i.jsx)(s.code,{children:"neutral"}),"\u3001",(0,i.jsx)(s.code,{children:"primary"}),"\u3001",(0,i.jsx)(s.code,{children:"secondary"})," \u548c ",(0,i.jsx)(s.code,{children:"tertiary"}),"\uff0c\u7528\u4e8e\u533a\u5206\u8272\u8c03\uff0c\u5176\u4e2d\u6700\u5e38\u7528\u7684\u5c31\u662f ",(0,i.jsx)(s.code,{children:"primary"})," \u4e3b\u9898\u8272\uff1b\u7b2c\u4e8c\u4e2a\u7ef4\u5ea6\u662f ",(0,i.jsx)(s.code,{children:"default"}),"\u3001",(0,i.jsx)(s.code,{children:"light"}),"\u3001",(0,i.jsx)(s.code,{children:"lighter"}),"\u3001",(0,i.jsx)(s.code,{children:"lightest"}),"\u3001",(0,i.jsx)(s.code,{children:"dark"}),"\u3001",(0,i.jsx)(s.code,{children:"darker"}),"\u3001",(0,i.jsx)(s.code,{children:"darkest"}),"\uff0c\u7528\u4e8e\u533a\u5206\u660e\u5ea6\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u7531\u4e8e\u6211\u4eec\u662f Bamboo \u4e3b\u9898\uff0c\u56e0\u6b64\u8fd9\u91cc\u7684\u4e3b\u9898\u8272 ",(0,i.jsx)(s.code,{children:"primary"})," \u6211\u4eec\u6311\u9009\u4e86\u4e00\u4e2a\u4e0e\u7af9\u5b50\u76f8\u8fd1\u7684\u989c\u8272 ",(0,i.jsx)(s.code,{children:'rgb("#5E8B65")'}),"\uff0c\u5e76\u52a0\u5165\u4e86\u4e2d\u6027\u8272 ",(0,i.jsx)(s.code,{children:"neutral-lightest"}),"\uff0c",(0,i.jsx)(s.code,{children:"neutral-darkest"}),"\uff0c\u5206\u522b\u4f5c\u4e3a\u80cc\u666f\u8272\u548c\u5b57\u4f53\u989c\u8272\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u6b63\u5982\u4e0b\u9762\u7684\u4ee3\u7801\u6240\u793a\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"self = (self.methods.colors)(self: self, ..)"})," \u65b9\u6cd5\u4fee\u6539\u989c\u8272\u4e3b\u9898\u3002\u5176\u672c\u8d28\u5c31\u662f ",(0,i.jsx)(s.code,{children:"self.colors += (..)"})," \u7684\u4e00\u4e2a\u5305\u88c5\u3002"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n )\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u50cf\u8fd9\u6837\u6dfb\u52a0\u4e86\u989c\u8272\u4e3b\u9898\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"self.colors.primary"})," \u8fd9\u6837\u7684\u65b9\u5f0f\u83b7\u53d6\u5230\u8fd9\u4e2a\u989c\u8272\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5e76\u4e14\u6709\u4e00\u70b9\u503c\u5f97\u6ce8\u610f\uff0c\u7528\u6237\u53ef\u4ee5\u968f\u65f6\u5728 ",(0,i.jsx)(s.code,{children:"main.typ"})," \u91cc\u901a\u8fc7"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'#let s = (s.methods.colors)(self: s, primary: rgb("#3578B9"))\n'})}),"\n",(0,i.jsxs)(s.p,{children:["\u8fd9\u6837\u7684\u65b9\u5f0f\u4fee\u6539\u4e3b\u9898\u8272\uff0c\u5176\u4e2d\u8fd9\u53e5\u8bed\u53e5\u9700\u8981\u653e\u5728 ",(0,i.jsx)(s.code,{children:"register()"})," \u4e4b\u540e\uff0c\u4ee5\u53ca ",(0,i.jsx)(s.code,{children:"utils.methods(s)"})," \u4e4b\u524d\u3002"]}),"\n",(0,i.jsx)(s.p,{children:"\u8fd9\u79cd\u968f\u65f6\u66f4\u6362\u989c\u8272\u4e3b\u9898\u7684\u5185\u5bb9\uff0c\u6b63\u662f Touying \u5f3a\u5927\u53ef\u5b9a\u5236\u6027\u7684\u4f53\u73b0\u3002"}),"\n",(0,i.jsx)(s.h2,{id:"\u5b9e\u6218\u81ea\u5b9a\u4e49-alert-\u65b9\u6cd5",children:"\u5b9e\u6218\uff1a\u81ea\u5b9a\u4e49 Alert \u65b9\u6cd5"}),"\n",(0,i.jsxs)(s.p,{children:["\u4e00\u822c\u800c\u8a00\uff0c\u6211\u4eec\u90fd\u9700\u8981\u63d0\u4f9b\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"#alert[..]"})," \u51fd\u6570\u7ed9\u7528\u6237\u4f7f\u7528\uff0c\u5176\u7528\u9014\u4e0e ",(0,i.jsx)(s.code,{children:"#strong[..]"})," \u7c7b\u4f3c\uff0c\u90fd\u662f\u7528\u4e8e\u5f3a\u8c03\u5f53\u524d\u6587\u672c\u3002\u4e00\u822c ",(0,i.jsx)(s.code,{children:"#alert[..]"})," \u4f1a\u5c06\u6587\u672c\u989c\u8272\u4fee\u6539\u4e3a\u4e3b\u9898\u8272\uff0c\u8fd9\u6837\u770b\u8d77\u6765\u4f1a\u66f4\u7f8e\u89c2\uff0c\u8fd9\u4e5f\u662f\u6211\u4eec\u63a5\u4e0b\u6765\u8981\u5b9e\u73b0\u7684\u76ee\u6807\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u6211\u4eec\u5728 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u91cc\u52a0\u4e0a\u4e00\u53e5"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:"self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n"})}),"\n",(0,i.jsxs)(s.p,{children:["\u8fd9\u53e5\u4ee3\u7801\u7684\u610f\u601d\u5c31\u662f\u5c06\u6587\u672c\u989c\u8272\u4fee\u6539\u4e3a ",(0,i.jsx)(s.code,{children:"self.colors.primary"}),"\uff0c\u800c\u8fd9\u91cc\u7684 ",(0,i.jsx)(s.code,{children:"self"})," \u6b63\u662f\u901a\u8fc7\u53c2\u6570 ",(0,i.jsx)(s.code,{children:"self: none"})," \u4f20\u8fdb\u6765\u7684\uff0c\u8fd9\u6837\u6211\u4eec\u624d\u80fd\u5b9e\u65f6\u5730\u83b7\u53d6\u5230 ",(0,i.jsx)(s.code,{children:"primary"})," \u4e3b\u9898\u8272\u3002"]}),"\n",(0,i.jsx)(s.h2,{id:"\u81ea\u5b9a\u4e49-header-\u548c-footer",children:"\u81ea\u5b9a\u4e49 Header \u548c Footer"}),"\n",(0,i.jsx)(s.p,{children:"\u5728\u8fd9\u91cc\uff0c\u6211\u8ba4\u4e3a\u60a8\u5df2\u7ecf\u9605\u8bfb\u8fc7\u9875\u9762\u5e03\u5c40\u7ae0\u8282\u4e86\uff0c\u56e0\u6b64\u6211\u4eec\u77e5\u9053\u5e94\u8be5\u7ed9 slides \u52a0\u4e0a header \u548c footer\u3002"}),"\n",(0,i.jsxs)(s.p,{children:["\u9996\u5148\uff0c\u6211\u4eec\u5148\u52a0\u5165 ",(0,i.jsx)(s.code,{children:"self.bamboo-title = []"}),"\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u6211\u4eec\u5c06\u5f53\u524d slide \u7684\u6807\u9898\u4f5c\u4e3a\u4e00\u4e2a\u6210\u5458\u53d8\u91cf ",(0,i.jsx)(s.code,{children:"self.bamboo-title"}),"\uff0c\u4fdd\u5b58\u5728 ",(0,i.jsx)(s.code,{children:"self"})," \u91cc\u9762\uff0c\u8fd9\u6837\u65b9\u4fbf\u6211\u4eec\u5728 header \u91cc\u4f7f\u7528\uff0c\u4ee5\u53ca\u540e\u7eed\u4fee\u6539\u3002\u540c\u7406\uff0c\u6211\u4eec\u8fd8\u521b\u5efa\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"self.bamboo-footer"}),"\uff0c\u5e76\u5c06 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u7684 ",(0,i.jsx)(s.code,{children:"footer: []"})," \u53c2\u6570\u4fdd\u5b58\u8d77\u6765\uff0c\u7528\u4f5c\u5de6\u4e0b\u89d2\u7684 footer \u5c55\u793a\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u7136\u540e\u503c\u5f97\u6ce8\u610f\u7684\u5c31\u662f\uff0c\u6211\u4eec\u7684 header \u5176\u5b9e\u662f\u4e00\u4e2a\u5f62\u5982 ",(0,i.jsx)(s.code,{children:"let header(self) = { .. }"})," \u7684\u53c2\u6570\u4e3a ",(0,i.jsx)(s.code,{children:"self"})," \u7684 content \u51fd\u6570\uff0c\u800c\u4e0d\u662f\u4e00\u4e2a\u5355\u7eaf\u7684 content\uff0c\u8fd9\u6837\u6211\u4eec\u624d\u80fd\u4ece\u6700\u65b0\u7684 ",(0,i.jsx)(s.code,{children:"self"})," \u5185\u90e8\u83b7\u53d6\u5230\u6211\u4eec\u9700\u8981\u7684\u4fe1\u606f\uff0c\u4f8b\u5982 ",(0,i.jsx)(s.code,{children:"self.bamboo-title"}),"\u3002\u800c footer \u4e5f\u662f\u540c\u7406\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u91cc\u9762\u4f7f\u7528\u5230\u7684 ",(0,i.jsx)(s.code,{children:"components.cell"})," \u5176\u5b9e\u5c31\u662f ",(0,i.jsx)(s.code,{children:"#let cell = block.with(width: 100%, height: 100%, above: 0pt, below: 0pt, breakable: false)"}),"\uff0c\u800c ",(0,i.jsx)(s.code,{children:"show: components.cell"})," \u4e5f\u5c31\u662f ",(0,i.jsx)(s.code,{children:"components.cell(body)"})," \u7684\u7b80\u5199\uff0cfooter \u7684 ",(0,i.jsx)(s.code,{children:"show: pad.with(.4em)"})," \u4e5f\u662f\u540c\u7406\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u53e6\u4e00\u70b9\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c",(0,i.jsx)(s.code,{children:"states"})," \u6a21\u5757\u91cc\u653e\u7f6e\u4e86\u5f88\u591a\u548c\u8ba1\u6570\u5668\u3001\u72b6\u6001\u6709\u5173\u7684\u5185\u5bb9\uff0c\u4f8b\u5982 ",(0,i.jsx)(s.code,{children:"states.current-section-title"})," \u7528\u4e8e\u663e\u793a\u5f53\u524d\u7684 ",(0,i.jsx)(s.code,{children:"section"}),"\uff0c\u800c ",(0,i.jsx)(s.code,{children:'states.slide-counter.display() + " / " + states.last-slide-number'})," \u7528\u4e8e\u663e\u793a\u5f53\u524d\u9875\u6570\u548c\u603b\u9875\u6570\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u4ee5\u53ca\u6211\u4eec\u53d1\u73b0\u6211\u4eec\u4f1a\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"utils.call-or-display(self, self.bamboo-footer)"})," \u8fd9\u6837\u7684\u8bed\u6cd5\u6765\u663e\u793a ",(0,i.jsx)(s.code,{children:"self.bamboo-footer"}),"\uff0c\u8fd9\u662f\u7528\u4e8e\u5e94\u4ed8 ",(0,i.jsx)(s.code,{children:"self.bamboo-footer = (self) => {..}"})," \u8fd9\u79cd\u60c5\u51b5\uff0c\u8fd9\u6837\u6211\u4eec\u5c31\u80fd\u7edf\u4e00 content \u51fd\u6570\u548c content \u7684\u663e\u793a\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u4e3a\u4e86\u8ba9 header \u548c footer \u6b63\u786e\u663e\u793a\uff0c\u5e76\u4e14\u4e0e\u6b63\u6587\u6709\u8db3\u591f\u7684\u95f4\u9694\uff0c\u6211\u4eec\u8fd8\u8bbe\u7f6e\u4e86\u4e0a\u4e0b margin \u548c\u5de6\u53f3 padding\uff0c\u5982 ",(0,i.jsx)(s.code,{children:"self.page-args += (margin: (top: 4em, bottom: 1.5em, x: 0em))"})," \u548c ",(0,i.jsx)(s.code,{children:"self.padding = (x: 2em, y: 0em)"}),"\u3002\u5de6\u53f3 margin \u4e3a ",(0,i.jsx)(s.code,{children:"0em"})," \u662f\u4e3a\u4e86\u8ba9 header \u80fd\u5360\u6ee1\u9875\u9762\u5bbd\u5ea6\uff0c\u6b63\u6587\u7684\u5de6\u53f3\u95f4\u8ddd\u5c31\u4f9d\u9760\u5de6\u53f3 padding ",(0,i.jsx)(s.code,{children:"2em"})," \u6765\u5b9e\u73b0\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u800c\u6211\u4eec\u8fd8\u9700\u8981\u81ea\u5b9a\u4e49\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"slide"})," \u65b9\u6cd5\uff0c\u5176\u4e2d\u63a5\u6536 ",(0,i.jsx)(s.code,{children:"slide(self: none, title: auto, ..args)"}),"\uff0c\u7b2c\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"self: none"})," \u662f\u4e00\u4e2a\u65b9\u6cd5\u6240\u5fc5\u987b\u7684\u53c2\u6570\uff0c\u7528\u4e8e\u83b7\u53d6\u6700\u65b0\u7684 ",(0,i.jsx)(s.code,{children:"self"}),"\uff1b\u800c\u7b2c\u4e8c\u4e2a ",(0,i.jsx)(s.code,{children:"title"})," \u5219\u662f\u7528\u4e8e\u66f4\u65b0 ",(0,i.jsx)(s.code,{children:"self.bamboo-title"}),"\uff0c\u4ee5\u4fbf\u5728 header \u4e2d\u663e\u793a\u51fa\u6765\uff1b\u7b2c\u4e09\u4e2a ",(0,i.jsx)(s.code,{children:"..args"})," \u662f\u7528\u4e8e\u6536\u96c6\u5269\u4f59\u7684\u53c2\u6570\uff0c\u5e76\u4f20\u5230 ",(0,i.jsx)(s.code,{children:"(self.methods.touying-slide)(self: self, ..args)"})," \u91cc\uff0c\u8fd9\u4e5f\u662f\u8ba9 Touying ",(0,i.jsx)(s.code,{children:"slide"})," \u529f\u80fd\u6b63\u5e38\u751f\u6548\u6240\u5fc5\u987b\u7684\u3002\u5e76\u4e14\uff0c\u6211\u4eec\u9700\u8981\u5728 ",(0,i.jsx)(s.code,{children:"register"})," \u51fd\u6570\u91cc\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"self.methods.slide = slide"})," \u6ce8\u518c\u8fd9\u4e2a\u65b9\u6cd5\u3002"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-typst",children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let slide(self: none, title: auto, ..args) = {\n if title != auto {\n self.bamboo-title = title\n }\n (self.methods.touying-slide)(self: self, ..args)\n}\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n footer: [],\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n // variables for later use\n self.bamboo-title = []\n self.bamboo-footer = footer\n // set page\n let header(self) = {\n set align(top)\n show: components.cell.with(fill: self.colors.primary, inset: 1em)\n set align(horizon)\n set text(fill: self.colors.neutral-lightest, size: .7em)\n states.current-section-title\n linebreak()\n set text(size: 1.5em)\n utils.call-or-display(self, self.bamboo-title)\n }\n let footer(self) = {\n set align(bottom)\n show: pad.with(.4em)\n set text(fill: self.colors.neutral-darkest, size: .8em)\n utils.call-or-display(self, self.bamboo-footer)\n h(1fr)\n states.slide-counter.display() + " / " + states.last-slide-number\n }\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n header: header,\n footer: footer,\n margin: (top: 4em, bottom: 1.5em, x: 0em),\n )\n self.padding = (x: 2em, y: 0em)\n // register methods\n self.methods.slide = slide\n self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9", footer: self => self.info.institution)\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n'})}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{src:"https://github.com/touying-typ/touying/assets/34951714/d33bcda7-c032-4b11-b392-5b939d9a0a47",alt:"image"})}),"\n",(0,i.jsx)(s.h2,{id:"\u81ea\u5b9a\u4e49\u7279\u6b8a-slide",children:"\u81ea\u5b9a\u4e49\u7279\u6b8a Slide"}),"\n",(0,i.jsxs)(s.p,{children:["\u6211\u4eec\u5728\u4e0a\u9762\u7684\u57fa\u7840 slide \u7684\u57fa\u7840\u4e0a\uff0c\u8fdb\u4e00\u6b65\u52a0\u5165\u4e00\u4e9b\u7279\u6b8a\u7684 slide \u51fd\u6570\uff0c\u4f8b\u5982 ",(0,i.jsx)(s.code,{children:"title-slide"}),"\uff0c",(0,i.jsx)(s.code,{children:"focus-slide"})," \u4ee5\u53ca\u81ea\u5b9a\u4e49 ",(0,i.jsx)(s.code,{children:"slides"})," \u65b9\u6cd5\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5bf9\u4e8e ",(0,i.jsx)(s.code,{children:"title-slide"})," \u65b9\u6cd5\uff0c\u9996\u5148\uff0c\u6211\u4eec\u8c03\u7528\u4e86 ",(0,i.jsx)(s.code,{children:"self = utils.empty-page(self)"}),"\uff0c\u8fd9\u4e2a\u51fd\u6570\u53ef\u4ee5\u6e05\u9664 ",(0,i.jsx)(s.code,{children:"self.page-args.header"})," \u548c ",(0,i.jsx)(s.code,{children:"self.page-args.footer"}),"\uff0c\u4ee5\u53ca\u5c06 ",(0,i.jsx)(s.code,{children:"margin"})," \u548c ",(0,i.jsx)(s.code,{children:"padding"})," \u90fd\u8bbe\u4e3a ",(0,i.jsx)(s.code,{children:"0em"}),"\uff0c\u5f97\u5230\u4e00\u4e2a\u7a7a\u767d\u9875\u7684\u6548\u679c\u3002\u7136\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"let info = self.info + args.named()"})," \u83b7\u53d6\u5230 ",(0,i.jsx)(s.code,{children:"self.info"})," \u91cc\u4fdd\u5b58\u7684\u4fe1\u606f\uff0c\u4e5f\u53ef\u4ee5\u7528\u51fd\u6570\u53c2\u6570\u91cc\u4f20\u5165\u7684 ",(0,i.jsx)(s.code,{children:"args.named()"})," \u6765\u66f4\u65b0\u4fe1\u606f\uff0c\u4fbf\u4e8e\u540e\u7eed\u4ee5 ",(0,i.jsx)(s.code,{children:"info.title"})," \u7684\u65b9\u5f0f\u4f7f\u7528\u3002\u5177\u4f53\u7684\u9875\u9762\u5185\u5bb9 ",(0,i.jsx)(s.code,{children:"body"}),"\uff0c\u6bcf\u4e2a theme \u90fd\u4f1a\u6709\u6240\u4e0d\u540c\uff0c\u8fd9\u91cc\u5c31\u4e0d\u518d\u8fc7\u591a\u8d58\u8ff0\u3002\u800c\u5728\u6700\u540e\uff0c\u6211\u4eec\u8c03\u7528\u4e86 ",(0,i.jsx)(s.code,{children:"(self.methods.touying-slide)(self: self, repeat: none, body)"}),"\uff0c\u5176\u4e2d\u7684 ",(0,i.jsx)(s.code,{children:"repeat: none"})," \u8868\u9762\u8fd9\u4e2a\u9875\u9762\u4e0d\u9700\u8981\u52a8\u753b\u6548\u679c\uff0c\u800c\u4f20\u5165 ",(0,i.jsx)(s.code,{children:"body"})," \u53c2\u6570\u4f1a\u5c06 ",(0,i.jsx)(s.code,{children:"body"})," \u7684\u5185\u5bb9\u663e\u793a\u51fa\u6765\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5bf9\u4e8e ",(0,i.jsx)(s.code,{children:"new-section-slide"})," \u65b9\u6cd5\uff0c\u4e5f\u662f\u540c\u7406\uff0c\u4e0d\u8fc7\u552f\u4e00\u8981\u6ce8\u610f\u7684\u662f\u6211\u4eec\u5728 ",(0,i.jsx)(s.code,{children:"(self.methods.touying-slide)(self: self, repeat: none, section: section, body)"})," \u7684\u53c2\u6570\u91cc\u9762\u591a\u4f20\u5165\u4e86\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"section: section"}),"\uff0c\u8fd9\u662f\u7528\u6765\u58f0\u660e\u65b0\u5efa\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"section"})," \u7684\u3002\u53e6\u4e00\u70b9\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u6211\u4eec\u9664\u4e86 ",(0,i.jsx)(s.code,{children:"self.methods.new-section-slide = new-section-slide"}),"\uff0c\u8fd8\u6ce8\u518c\u4e86 ",(0,i.jsx)(s.code,{children:"self.methods.touying-new-section-slide = new-section-slide"}),"\uff0c\u8fd9\u6837 ",(0,i.jsx)(s.code,{children:"new-section-slide"})," \u5c31\u4f1a\u5728\u78b0\u5230\u4e00\u7ea7\u6807\u9898\u65f6\u81ea\u52a8\u88ab\u8c03\u7528\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u5bf9\u4e8e ",(0,i.jsx)(s.code,{children:"focus-slide"})," \u65b9\u6cd5\uff0c\u5927\u90e8\u5206\u5185\u5bb9\u4e5f\u57fa\u672c\u4e00\u81f4\uff0c\u4e0d\u8fc7\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u6211\u4eec\u901a\u8fc7 ",(0,i.jsx)(s.code,{children:"self.page-args += (..)"})," \u66f4\u65b0\u4e86\u9875\u9762\u7684\u80cc\u666f\u989c\u8272\u3002"]}),"\n",(0,i.jsxs)(s.p,{children:["\u6700\u540e\uff0c\u6211\u4eec\u8fd8\u66f4\u65b0\u4e86 ",(0,i.jsx)(s.code,{children:"slides(self: none, title-slide: true, slide-level: 1, ..args)"})," \u65b9\u6cd5\uff0c\u5176\u4e2d ",(0,i.jsx)(s.code,{children:"title-slide"})," \u4e3a ",(0,i.jsx)(s.code,{children:"true"})," \u65f6\uff0c\u5728\u4f7f\u7528 ",(0,i.jsx)(s.code,{children:"#show: slides"})," \u540e\u4f1a\u81ea\u52a8\u521b\u5efa\u4e00\u4e2a ",(0,i.jsx)(s.code,{children:"title-slide"}),"\uff1b\u800c ",(0,i.jsx)(s.code,{children:"slide-level: 1"})," \u6307\u660e\u4e86\u4e00\u7ea7\u6807\u9898\u548c\u4e8c\u7ea7\u6807\u9898\u5206\u522b\u5bf9\u5e94 ",(0,i.jsx)(s.code,{children:"section"})," \u548c ",(0,i.jsx)(s.code,{children:"title"}),"\u3002"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{children:'// bamboo.typ\n#import "@preview/touying:0.3.3": *\n\n#let slide(self: none, title: auto, ..args) = {\n if title != auto {\n self.bamboo-title = title\n }\n (self.methods.touying-slide)(self: self, ..args)\n}\n\n#let title-slide(self: none, ..args) = {\n self = utils.empty-page(self)\n let info = self.info + args.named()\n let body = {\n set align(center + horizon)\n block(\n fill: self.colors.primary,\n width: 80%,\n inset: (y: 1em),\n radius: 1em,\n text(size: 2em, fill: self.colors.neutral-lightest, weight: "bold", info.title)\n )\n set text(fill: self.colors.neutral-darkest)\n if info.author != none {\n block(info.author)\n }\n if info.date != none {\n block(if type(info.date) == datetime { info.date.display(self.datetime-format) } else { info.date })\n }\n }\n (self.methods.touying-slide)(self: self, repeat: none, body)\n}\n\n#let new-section-slide(self: none, section) = {\n self = utils.empty-page(self)\n let body = {\n set align(center + horizon)\n set text(size: 2em, fill: self.colors.primary, weight: "bold", style: "italic")\n section\n }\n (self.methods.touying-slide)(self: self, repeat: none, section: section, body)\n}\n\n#let focus-slide(self: none, body) = {\n self = utils.empty-page(self)\n self.page-args += (\n fill: self.colors.primary,\n margin: 2em,\n )\n set text(fill: self.colors.neutral-lightest, size: 2em)\n (self.methods.touying-slide)(self: self, repeat: none, align(horizon + center, body))\n}\n\n#let slides(self: none, title-slide: true, slide-level: 1, ..args) = {\n if title-slide {\n (self.methods.title-slide)(self: self)\n }\n (self.methods.touying-slides)(self: self, slide-level: slide-level, ..args)\n}\n\n#let register(\n self: themes.default.register(),\n aspect-ratio: "16-9",\n footer: [],\n) = {\n // color theme\n self = (self.methods.colors)(\n self: self,\n primary: rgb("#5E8B65"),\n neutral-lightest: rgb("#ffffff"),\n neutral-darkest: rgb("#000000"),\n )\n // variables for later use\n self.bamboo-title = []\n self.bamboo-footer = footer\n // set page\n let header(self) = {\n set align(top)\n show: components.cell.with(fill: self.colors.primary, inset: 1em)\n set align(horizon)\n set text(fill: self.colors.neutral-lightest, size: .7em)\n states.current-section-title\n linebreak()\n set text(size: 1.5em)\n utils.call-or-display(self, self.bamboo-title)\n }\n let footer(self) = {\n set align(bottom)\n show: pad.with(.4em)\n set text(fill: self.colors.neutral-darkest, size: .8em)\n utils.call-or-display(self, self.bamboo-footer)\n h(1fr)\n states.slide-counter.display() + " / " + states.last-slide-number\n }\n self.page-args += (\n paper: "presentation-" + aspect-ratio,\n header: header,\n footer: footer,\n margin: (top: 4em, bottom: 1.5em, x: 0em),\n )\n self.padding = (x: 2em, y: 0em)\n // register methods\n self.methods.slide = slide\n self.methods.title-slide = title-slide\n self.methods.new-section-slide = new-section-slide\n self.methods.touying-new-section-slide = new-section-slide\n self.methods.focus-slide = focus-slide\n self.methods.slides = slides\n self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it)\n self.methods.init = (self: none, body) => {\n set text(size: 20pt)\n body\n }\n self\n}\n\n\n// main.typ\n#import "@preview/touying:0.3.3": *\n#import "bamboo.typ"\n\n#let s = bamboo.register(aspect-ratio: "16-9", footer: self => self.info.institution)\n#let s = (s.methods.info)(\n self: s,\n title: [Title],\n subtitle: [Subtitle],\n author: [Authors],\n date: datetime.today(),\n institution: [Institution],\n)\n#let (init, slides, touying-outline, alert) = utils.methods(s)\n#show: init\n\n#show strong: alert\n\n#let (slide, empty-slide, title-slide, focus-slide) = utils.slides(s)\n#show: slides\n\n= First Section\n\n== First Slide\n\n#slide[\n A slide with a title and an *important* information.\n]\n\n#focus-slide[\n Focus on it!\n]\n'})}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{src:"https://github.com/touying-typ/touying/assets/34951714/03c5ad02-8ff4-4068-9664-d9cfad79baaf",alt:"image"})}),"\n",(0,i.jsx)(s.h2,{id:"\u603b\u7ed3",children:"\u603b\u7ed3"}),"\n",(0,i.jsx)(s.p,{children:"\u81f3\u6b64\uff0c\u6211\u4eec\u5c31\u5df2\u7ecf\u521b\u5efa\u4e86\u4e00\u4e2a\u7b80\u6d01\u53c8\u7f8e\u89c2\u7684\u4e3b\u9898\u4e86\u3002\u4e5f\u8bb8\u4f60\u4f1a\u89c9\u5f97\uff0cTouying \u5f15\u5165\u7684\u6982\u5ff5\u8fc7\u4e8e\u4e30\u5bcc\u4e86\uff0c\u4ee5\u81f3\u4e8e\u8ba9\u4eba\u4e00\u65f6\u5f88\u96be\u8f7b\u6613\u63a5\u53d7\u3002\u8fd9\u662f\u6b63\u5e38\u7684\uff0c\u5728\u5f3a\u5927\u7684\u529f\u80fd\u4e0e\u7b80\u6d01\u7684\u6982\u5ff5\u4e4b\u95f4\uff0cTouying \u9009\u62e9\u4e86\u524d\u8005\u3002\u4f46\u662f\u4e5f\u6b63\u662f\u5f97\u76ca\u4e8e Touying \u8fd9\u79cd\u5927\u800c\u5168\u7684\u7edf\u4e00\u7406\u5ff5\uff0c\u4f60\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u5728\u4e0d\u540c\u7684\u4e3b\u9898\u4e4b\u95f4\u62bd\u79bb\u51fa\u5171\u901a\u4e4b\u5904\uff0c\u5e76\u5c06\u4f60\u5b66\u5230\u7684\u6982\u5ff5\u8fc1\u79fb\u5230\u53e6\u4e00\u4e2a\u4e3b\u9898\u4e0a\u3002\u4ea6\u6216\u8005\uff0c\u4f60\u53ef\u4ee5\u5f88\u8f7b\u6613\u5730\u4fdd\u5b58\u5168\u5c40\u53d8\u91cf\uff0c\u6216\u8005\u66f4\u6539\u5df2\u6709\u7684\u4e3b\u9898\uff0c\u4f8b\u5982\u5168\u5c40\u4fdd\u5b58\u4e3b\u9898\u989c\u8272\uff0c\u66ff\u6362\u6389 slides \u7684 header\uff0c\u6216\u8005\u6dfb\u52a0\u4e00\u4e24\u4e2a Logo \u7b49\uff0c\u8fd9\u4e5f\u6b63\u662f Touying \u89e3\u8026\u4e0e\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\u5e26\u6765\u7684\u597d\u5904\u3002"})]})}function a(e={}){const{wrapper:s}={...(0,l.a)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},1151:(e,s,n)=>{n.d(s,{Z:()=>d,a:()=>o});var i=n(7294);const l={},t=i.createContext(l);function o(e){const s=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:o(e.components),i.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/zh/assets/js/runtime~main.8795903d.js b/zh/assets/js/runtime~main.f9bcd4d6.js similarity index 98% rename from zh/assets/js/runtime~main.8795903d.js rename to zh/assets/js/runtime~main.f9bcd4d6.js index bcf147b99..f89b524f0 100644 --- a/zh/assets/js/runtime~main.8795903d.js +++ b/zh/assets/js/runtime~main.f9bcd4d6.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,b,c,d,f={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var b=t[e]={id:e,loaded:!1,exports:{}};return f[e].call(b.exports,b,b.exports,r),b.loaded=!0,b.exports}r.m=f,r.c=t,e=[],r.O=(a,b,c,d)=>{if(!b){var f=1/0;for(i=0;i=d)&&Object.keys(r.O).every((e=>r.O[e](b[o])))?b.splice(o--,1):(t=!1,d0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[b,c,d]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},b=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var d=Object.create(null);r.r(d);var f={};a=a||[null,b({}),b([]),b(b)];for(var t=2&c&&e;"object"==typeof t&&!~a.indexOf(t);t=b(t))Object.getOwnPropertyNames(t).forEach((a=>f[a]=()=>e[a]));return f.default=()=>e,r.d(d,f),d},r.d=(e,a)=>{for(var b in a)r.o(a,b)&&!r.o(e,b)&&Object.defineProperty(e,b,{enumerable:!0,get:a[b]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,b)=>(r.f[b](e,a),a)),[])),r.u=e=>"assets/js/"+({21:"56424af8",25:"e2afdb46",53:"935f2afb",55:"abd5ed0d",71:"b08ed549",79:"5d9196ef",299:"6ea55157",348:"fb15e9e7",427:"901b6cf8",438:"8c4e5360",452:"86ce6de9",635:"5fe8a7d6",685:"e3f0bdb4",759:"c21d2b24",770:"6c78ff94",775:"20c179ae",851:"b0ad5fdb",877:"8891196d",913:"18caf1db",946:"9093a083",977:"b48061fd",1029:"bb8dba6b",1043:"04a36ee2",1182:"cf8983c6",1229:"a2ce0262",1242:"8f8b8c9d",1336:"55c13872",1431:"35c994aa",1534:"561e6c7b",1648:"e0c6d955",1704:"5896fb71",1761:"f01ace04",1785:"31fc2e15",1798:"3760b40e",1869:"d9d9b422",1898:"8dbec68f",1934:"f6262a69",1993:"b39d38b0",2002:"90b312ed",2013:"c984ce9d",2046:"fc90ac41",2069:"dcf6645f",2145:"a9d8b83d",2336:"94d2f82b",2392:"fafe762b",2528:"ae31ff46",2535:"814f3328",2608:"fdbf24e4",2701:"1aab1ab5",2803:"f49334b8",3085:"1f391b9e",3089:"a6aa9e1f",3137:"443dc191",3207:"874294bc",3263:"c6092dbc",3296:"4e00a773",3374:"f757d0c5",3426:"449c721b",3440:"2e03f7f4",3563:"5bb6c1c3",3604:"77c2c049",3608:"9e4087bc",3712:"2c8659d9",3748:"bcac2ad4",3759:"802946da",3843:"20f452e9",3850:"2a635ef0",3881:"1c3f293b",4013:"01a85c17",4084:"71e4bc12",4102:"2845e528",4108:"cf04afb9",4110:"08c77efa",4134:"4eaaf39d",4195:"c4f5d8e4",4213:"468510f3",4238:"2edddeb1",4334:"a6759f2d",4368:"a94703ab",4407:"a876e6bc",4413:"cad84648",4557:"64a34be6",4599:"a94a4682",4879:"ae8e5624",4917:"cc496b32",4988:"9010ec73",5022:"3b36ca8e",5036:"484b6277",5166:"69a95a34",5204:"1b05ed46",5315:"05e5ef8f",5332:"8ded3f77",5455:"d5c687ae",5609:"5035b6a4",5610:"352a2724",5658:"d21a173f",5850:"4c00a561",5964:"6af3e01d",6009:"aa94d6df",6103:"ccc49370",6122:"78ac7022",6401:"530fec33",6506:"a0168dc0",6508:"f4a64ebe",6633:"737adc8d",6639:"08114ca6",6811:"acc723e6",6864:"cbce90b2",6879:"7356add0",6958:"b28182d4",7059:"eb154561",7146:"df8eaafd",7192:"5b5a3966",7259:"a3a5cdb3",7280:"780b1457",7291:"82a7b37c",7373:"63dd4865",7414:"393be207",7502:"43883141",7525:"c7f532e1",7589:"2c0f3de2",7686:"78005bf6",7696:"e8ed6e8b",7718:"c875b75b",7739:"adb750bb",7828:"e6c80b16",7838:"ce05be13",7918:"17896441",7936:"afca79fb",7946:"d3b36941",7983:"b42b1cce",8069:"463d321d",8080:"f040d35e",8112:"9ed0691e",8317:"44b10a21",8370:"99f237dc",8385:"8eb20e8c",8506:"339ee8e1",8518:"a7bd4aaa",8598:"4f5513f7",8610:"6875c492",8656:"a50a9650",8698:"905648c2",8759:"fba7183b",8814:"ecc6e0e3",8860:"59c77264",8993:"24f6044e",9022:"25021cc6",9074:"23f1990b",9122:"b885bf58",9183:"2d4a7f47",9235:"2a18e37e",9306:"04de189a",9491:"e39444e4",9661:"5e95c892",9683:"5aeabefc",9716:"ec177486",9755:"c0c5477b",9758:"4bd433da",9761:"d55b4038",9769:"b723c464",9774:"a8a3d11e",9817:"14eb3368",9836:"8fdae525",9971:"498e264e"}[e]||e)+"."+{21:"24311bab",25:"94cc3e7a",53:"dc08d7d6",55:"22cb969e",71:"ebbf28c2",79:"d46efdd0",299:"f51eff60",348:"fae2fe8f",427:"89f37d14",438:"47fc01b0",452:"d319f9ab",635:"5c258295",685:"54e0cc12",759:"b358dfa9",770:"5550f363",775:"a4db236d",851:"69eee92b",877:"c0d00dd1",913:"d6bbc662",946:"a75a1eba",977:"6dd451b8",1029:"fb6b7018",1043:"8e00bb10",1182:"49daeed0",1229:"efc1839b",1242:"99e112cf",1336:"981729e6",1404:"2f578d87",1431:"eed8c5ba",1534:"7466bbec",1648:"c5f1a26f",1704:"fdb8542b",1761:"46504d2e",1772:"22d645a1",1785:"bbe1529a",1798:"db578d1e",1869:"89d55153",1898:"af7f108c",1934:"793f6c75",1993:"f5d3a898",2002:"93cd8ae6",2013:"43c7c448",2046:"8ac7249c",2069:"359c1bb8",2145:"dfac18d9",2336:"c6f63ede",2392:"3a067fb2",2528:"712af5e9",2535:"67360812",2608:"db42c702",2701:"149cb0ad",2803:"f23162a8",3085:"fa8680eb",3089:"d410008f",3137:"8c6a97a6",3207:"1a8e8b1a",3263:"2e572022",3296:"062aab9f",3374:"e8d458cc",3426:"20e4f357",3440:"8d42a22f",3563:"5cdf92be",3604:"313d8886",3608:"8eec8b12",3712:"ac445854",3748:"39ec2c0c",3759:"069d303f",3843:"bea09197",3850:"f7652a6f",3881:"4bfaa04c",4013:"354f3ef2",4084:"9d164f37",4102:"b30bf730",4108:"a593074a",4110:"60c3eaf6",4134:"46c9128f",4195:"b82e09e8",4213:"a6acd4c9",4238:"e7c8d9f7",4334:"16f448b0",4368:"9ecc2e7c",4407:"627d6a1a",4413:"4fa8fc14",4557:"9c7aa276",4599:"44b2d2fd",4879:"bfad032a",4917:"e13cfbf6",4988:"a052fb9a",5022:"c1ec8f85",5036:"bb5f46f7",5166:"0029cf75",5204:"05da8861",5315:"cef3c5c9",5332:"39e635f8",5455:"c1d1080d",5609:"ba29a9c9",5610:"29b897a7",5658:"12227919",5850:"37be27a1",5964:"9b26f81f",6009:"7f883505",6103:"d9da7455",6122:"c8bd6b21",6401:"6c93aea7",6506:"020f221e",6508:"604871c5",6633:"43afa7d5",6639:"4947aeb3",6811:"ecccbabe",6864:"48111e1f",6879:"c97d20aa",6958:"7f1c5441",7059:"e2e70aa7",7146:"6a2f2762",7192:"d8e8bb54",7259:"d71b2c7d",7280:"8777fd90",7291:"6afdcca4",7373:"014917e6",7414:"e44f1810",7502:"dfaaee05",7525:"761d0d15",7589:"61bbe160",7686:"d1a05a85",7696:"89315a51",7718:"57665f31",7739:"1ccccb00",7828:"e34b2337",7838:"976073b6",7918:"15723699",7936:"7f1c34b3",7946:"d84370e5",7983:"57637745",8069:"3297a6c3",8080:"ee0007d3",8112:"6b5bbe99",8317:"1bcf04af",8370:"bc02d180",8385:"b761dd92",8506:"f4c463ec",8518:"f93b23a7",8598:"3a20b20e",8610:"686aaf2c",8656:"f76af84a",8698:"c5739e19",8759:"b6a01123",8814:"1eff7a79",8860:"1ade3b69",8993:"591915e7",9022:"2d5f14e2",9074:"9d231d3d",9122:"694d9c31",9183:"15768c44",9235:"04f021ce",9306:"1c191db5",9491:"9c15e87f",9661:"17c48d1d",9677:"ea822b9e",9683:"7a093544",9716:"8101c54c",9755:"570fdcda",9758:"427fe6e2",9761:"d24a92be",9769:"4dc1509d",9774:"a498b275",9817:"21d38987",9836:"bc4fccda",9971:"0089f170"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},d="docs:",r.l=(e,a,b,f)=>{if(c[e])c[e].push(a);else{var t,o;if(void 0!==b)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var d=c[e];if(delete c[e],t.parentNode&&t.parentNode.removeChild(t),d&&d.forEach((e=>e(b))),a)return a(b)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/touying/zh/",r.gca=function(e){return e={17896441:"7918",43883141:"7502","56424af8":"21",e2afdb46:"25","935f2afb":"53",abd5ed0d:"55",b08ed549:"71","5d9196ef":"79","6ea55157":"299",fb15e9e7:"348","901b6cf8":"427","8c4e5360":"438","86ce6de9":"452","5fe8a7d6":"635",e3f0bdb4:"685",c21d2b24:"759","6c78ff94":"770","20c179ae":"775",b0ad5fdb:"851","8891196d":"877","18caf1db":"913","9093a083":"946",b48061fd:"977",bb8dba6b:"1029","04a36ee2":"1043",cf8983c6:"1182",a2ce0262:"1229","8f8b8c9d":"1242","55c13872":"1336","35c994aa":"1431","561e6c7b":"1534",e0c6d955:"1648","5896fb71":"1704",f01ace04:"1761","31fc2e15":"1785","3760b40e":"1798",d9d9b422:"1869","8dbec68f":"1898",f6262a69:"1934",b39d38b0:"1993","90b312ed":"2002",c984ce9d:"2013",fc90ac41:"2046",dcf6645f:"2069",a9d8b83d:"2145","94d2f82b":"2336",fafe762b:"2392",ae31ff46:"2528","814f3328":"2535",fdbf24e4:"2608","1aab1ab5":"2701",f49334b8:"2803","1f391b9e":"3085",a6aa9e1f:"3089","443dc191":"3137","874294bc":"3207",c6092dbc:"3263","4e00a773":"3296",f757d0c5:"3374","449c721b":"3426","2e03f7f4":"3440","5bb6c1c3":"3563","77c2c049":"3604","9e4087bc":"3608","2c8659d9":"3712",bcac2ad4:"3748","802946da":"3759","20f452e9":"3843","2a635ef0":"3850","1c3f293b":"3881","01a85c17":"4013","71e4bc12":"4084","2845e528":"4102",cf04afb9:"4108","08c77efa":"4110","4eaaf39d":"4134",c4f5d8e4:"4195","468510f3":"4213","2edddeb1":"4238",a6759f2d:"4334",a94703ab:"4368",a876e6bc:"4407",cad84648:"4413","64a34be6":"4557",a94a4682:"4599",ae8e5624:"4879",cc496b32:"4917","9010ec73":"4988","3b36ca8e":"5022","484b6277":"5036","69a95a34":"5166","1b05ed46":"5204","05e5ef8f":"5315","8ded3f77":"5332",d5c687ae:"5455","5035b6a4":"5609","352a2724":"5610",d21a173f:"5658","4c00a561":"5850","6af3e01d":"5964",aa94d6df:"6009",ccc49370:"6103","78ac7022":"6122","530fec33":"6401",a0168dc0:"6506",f4a64ebe:"6508","737adc8d":"6633","08114ca6":"6639",acc723e6:"6811",cbce90b2:"6864","7356add0":"6879",b28182d4:"6958",eb154561:"7059",df8eaafd:"7146","5b5a3966":"7192",a3a5cdb3:"7259","780b1457":"7280","82a7b37c":"7291","63dd4865":"7373","393be207":"7414",c7f532e1:"7525","2c0f3de2":"7589","78005bf6":"7686",e8ed6e8b:"7696",c875b75b:"7718",adb750bb:"7739",e6c80b16:"7828",ce05be13:"7838",afca79fb:"7936",d3b36941:"7946",b42b1cce:"7983","463d321d":"8069",f040d35e:"8080","9ed0691e":"8112","44b10a21":"8317","99f237dc":"8370","8eb20e8c":"8385","339ee8e1":"8506",a7bd4aaa:"8518","4f5513f7":"8598","6875c492":"8610",a50a9650:"8656","905648c2":"8698",fba7183b:"8759",ecc6e0e3:"8814","59c77264":"8860","24f6044e":"8993","25021cc6":"9022","23f1990b":"9074",b885bf58:"9122","2d4a7f47":"9183","2a18e37e":"9235","04de189a":"9306",e39444e4:"9491","5e95c892":"9661","5aeabefc":"9683",ec177486:"9716",c0c5477b:"9755","4bd433da":"9758",d55b4038:"9761",b723c464:"9769",a8a3d11e:"9774","14eb3368":"9817","8fdae525":"9836","498e264e":"9971"}[e]||e,r.p+r.u(e)},(()=>{var e={1303:0,532:0};r.f.j=(a,b)=>{var c=r.o(e,a)?e[a]:void 0;if(0!==c)if(c)b.push(c[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var d=new Promise(((b,d)=>c=e[a]=[b,d]));b.push(c[2]=d);var f=r.p+r.u(a),t=new Error;r.l(f,(b=>{if(r.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var d=b&&("load"===b.type?"missing":b.type),f=b&&b.target&&b.target.src;t.message="Loading chunk "+a+" failed.\n("+d+": "+f+")",t.name="ChunkLoadError",t.type=d,t.request=f,c[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,b)=>{var c,d,f=b[0],t=b[1],o=b[2],n=0;if(f.some((a=>0!==e[a]))){for(c in t)r.o(t,c)&&(r.m[c]=t[c]);if(o)var i=o(r)}for(a&&a(b);n{"use strict";var e,a,b,c,d,f={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var b=t[e]={id:e,loaded:!1,exports:{}};return f[e].call(b.exports,b,b.exports,r),b.loaded=!0,b.exports}r.m=f,r.c=t,e=[],r.O=(a,b,c,d)=>{if(!b){var f=1/0;for(i=0;i=d)&&Object.keys(r.O).every((e=>r.O[e](b[o])))?b.splice(o--,1):(t=!1,d0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[b,c,d]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},b=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var d=Object.create(null);r.r(d);var f={};a=a||[null,b({}),b([]),b(b)];for(var t=2&c&&e;"object"==typeof t&&!~a.indexOf(t);t=b(t))Object.getOwnPropertyNames(t).forEach((a=>f[a]=()=>e[a]));return f.default=()=>e,r.d(d,f),d},r.d=(e,a)=>{for(var b in a)r.o(a,b)&&!r.o(e,b)&&Object.defineProperty(e,b,{enumerable:!0,get:a[b]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,b)=>(r.f[b](e,a),a)),[])),r.u=e=>"assets/js/"+({21:"56424af8",25:"e2afdb46",53:"935f2afb",55:"abd5ed0d",71:"b08ed549",79:"5d9196ef",299:"6ea55157",348:"fb15e9e7",427:"901b6cf8",438:"8c4e5360",452:"86ce6de9",635:"5fe8a7d6",685:"e3f0bdb4",759:"c21d2b24",770:"6c78ff94",775:"20c179ae",851:"b0ad5fdb",877:"8891196d",913:"18caf1db",946:"9093a083",977:"b48061fd",1029:"bb8dba6b",1043:"04a36ee2",1182:"cf8983c6",1229:"a2ce0262",1242:"8f8b8c9d",1336:"55c13872",1431:"35c994aa",1534:"561e6c7b",1648:"e0c6d955",1704:"5896fb71",1761:"f01ace04",1785:"31fc2e15",1798:"3760b40e",1869:"d9d9b422",1898:"8dbec68f",1934:"f6262a69",1993:"b39d38b0",2002:"90b312ed",2013:"c984ce9d",2046:"fc90ac41",2069:"dcf6645f",2145:"a9d8b83d",2336:"94d2f82b",2392:"fafe762b",2528:"ae31ff46",2535:"814f3328",2608:"fdbf24e4",2701:"1aab1ab5",2803:"f49334b8",3085:"1f391b9e",3089:"a6aa9e1f",3137:"443dc191",3207:"874294bc",3263:"c6092dbc",3296:"4e00a773",3374:"f757d0c5",3426:"449c721b",3440:"2e03f7f4",3563:"5bb6c1c3",3604:"77c2c049",3608:"9e4087bc",3712:"2c8659d9",3748:"bcac2ad4",3759:"802946da",3843:"20f452e9",3850:"2a635ef0",3881:"1c3f293b",4013:"01a85c17",4084:"71e4bc12",4102:"2845e528",4108:"cf04afb9",4110:"08c77efa",4134:"4eaaf39d",4195:"c4f5d8e4",4213:"468510f3",4238:"2edddeb1",4334:"a6759f2d",4368:"a94703ab",4407:"a876e6bc",4413:"cad84648",4557:"64a34be6",4599:"a94a4682",4879:"ae8e5624",4917:"cc496b32",4988:"9010ec73",5022:"3b36ca8e",5036:"484b6277",5166:"69a95a34",5204:"1b05ed46",5315:"05e5ef8f",5332:"8ded3f77",5455:"d5c687ae",5609:"5035b6a4",5610:"352a2724",5658:"d21a173f",5850:"4c00a561",5964:"6af3e01d",6009:"aa94d6df",6103:"ccc49370",6122:"78ac7022",6401:"530fec33",6506:"a0168dc0",6508:"f4a64ebe",6633:"737adc8d",6639:"08114ca6",6811:"acc723e6",6864:"cbce90b2",6879:"7356add0",6958:"b28182d4",7059:"eb154561",7146:"df8eaafd",7192:"5b5a3966",7259:"a3a5cdb3",7280:"780b1457",7291:"82a7b37c",7373:"63dd4865",7414:"393be207",7502:"43883141",7525:"c7f532e1",7589:"2c0f3de2",7686:"78005bf6",7696:"e8ed6e8b",7718:"c875b75b",7739:"adb750bb",7828:"e6c80b16",7838:"ce05be13",7918:"17896441",7936:"afca79fb",7946:"d3b36941",7983:"b42b1cce",8069:"463d321d",8080:"f040d35e",8112:"9ed0691e",8317:"44b10a21",8370:"99f237dc",8385:"8eb20e8c",8506:"339ee8e1",8518:"a7bd4aaa",8598:"4f5513f7",8610:"6875c492",8656:"a50a9650",8698:"905648c2",8759:"fba7183b",8814:"ecc6e0e3",8860:"59c77264",8993:"24f6044e",9022:"25021cc6",9074:"23f1990b",9122:"b885bf58",9183:"2d4a7f47",9235:"2a18e37e",9306:"04de189a",9491:"e39444e4",9661:"5e95c892",9683:"5aeabefc",9716:"ec177486",9755:"c0c5477b",9758:"4bd433da",9761:"d55b4038",9769:"b723c464",9774:"a8a3d11e",9817:"14eb3368",9836:"8fdae525",9971:"498e264e"}[e]||e)+"."+{21:"24311bab",25:"94cc3e7a",53:"dc08d7d6",55:"22cb969e",71:"ebbf28c2",79:"d46efdd0",299:"f51eff60",348:"fae2fe8f",427:"89f37d14",438:"47fc01b0",452:"d319f9ab",635:"5c258295",685:"54e0cc12",759:"b358dfa9",770:"5550f363",775:"a4db236d",851:"69eee92b",877:"c0d00dd1",913:"d6bbc662",946:"a75a1eba",977:"6dd451b8",1029:"fb6b7018",1043:"8e00bb10",1182:"49daeed0",1229:"efc1839b",1242:"99e112cf",1336:"981729e6",1404:"2f578d87",1431:"eed8c5ba",1534:"7466bbec",1648:"c5f1a26f",1704:"fdb8542b",1761:"46504d2e",1772:"22d645a1",1785:"bbe1529a",1798:"db578d1e",1869:"89d55153",1898:"af7f108c",1934:"793f6c75",1993:"f5d3a898",2002:"93cd8ae6",2013:"43c7c448",2046:"8ac7249c",2069:"359c1bb8",2145:"dfac18d9",2336:"c6f63ede",2392:"3a067fb2",2528:"712af5e9",2535:"67360812",2608:"db42c702",2701:"149cb0ad",2803:"f23162a8",3085:"fa8680eb",3089:"d410008f",3137:"8c6a97a6",3207:"1a8e8b1a",3263:"2e572022",3296:"062aab9f",3374:"e8d458cc",3426:"20e4f357",3440:"8d42a22f",3563:"5cdf92be",3604:"313d8886",3608:"8eec8b12",3712:"ac445854",3748:"39ec2c0c",3759:"069d303f",3843:"bea09197",3850:"f7652a6f",3881:"4bfaa04c",4013:"354f3ef2",4084:"9d164f37",4102:"b30bf730",4108:"a593074a",4110:"60c3eaf6",4134:"46c9128f",4195:"b82e09e8",4213:"a6acd4c9",4238:"e7c8d9f7",4334:"16f448b0",4368:"9ecc2e7c",4407:"627d6a1a",4413:"4fa8fc14",4557:"9c7aa276",4599:"44b2d2fd",4879:"bfad032a",4917:"e13cfbf6",4988:"a052fb9a",5022:"c1ec8f85",5036:"bb5f46f7",5166:"0029cf75",5204:"05da8861",5315:"cef3c5c9",5332:"39e635f8",5455:"c1d1080d",5609:"ba29a9c9",5610:"29b897a7",5658:"12227919",5850:"37be27a1",5964:"9b26f81f",6009:"7f883505",6103:"d9da7455",6122:"c8bd6b21",6401:"6c93aea7",6506:"020f221e",6508:"604871c5",6633:"43afa7d5",6639:"4947aeb3",6811:"ecccbabe",6864:"48111e1f",6879:"c97d20aa",6958:"7f1c5441",7059:"e2e70aa7",7146:"6a2f2762",7192:"d8e8bb54",7259:"d71b2c7d",7280:"8777fd90",7291:"6afdcca4",7373:"8199f349",7414:"e44f1810",7502:"dfaaee05",7525:"761d0d15",7589:"61bbe160",7686:"d1a05a85",7696:"89315a51",7718:"57665f31",7739:"1ccccb00",7828:"e34b2337",7838:"976073b6",7918:"15723699",7936:"7f1c34b3",7946:"d84370e5",7983:"57637745",8069:"3297a6c3",8080:"ee0007d3",8112:"6b5bbe99",8317:"1bcf04af",8370:"bc02d180",8385:"b761dd92",8506:"f4c463ec",8518:"f93b23a7",8598:"3a20b20e",8610:"686aaf2c",8656:"f76af84a",8698:"c5739e19",8759:"b6a01123",8814:"1eff7a79",8860:"1ade3b69",8993:"591915e7",9022:"2d5f14e2",9074:"9d231d3d",9122:"694d9c31",9183:"15768c44",9235:"04f021ce",9306:"1c191db5",9491:"9c15e87f",9661:"17c48d1d",9677:"ea822b9e",9683:"7a093544",9716:"8101c54c",9755:"570fdcda",9758:"af1e98ec",9761:"d24a92be",9769:"4dc1509d",9774:"a498b275",9817:"21d38987",9836:"bc4fccda",9971:"0089f170"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},d="docs:",r.l=(e,a,b,f)=>{if(c[e])c[e].push(a);else{var t,o;if(void 0!==b)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var d=c[e];if(delete c[e],t.parentNode&&t.parentNode.removeChild(t),d&&d.forEach((e=>e(b))),a)return a(b)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/touying/zh/",r.gca=function(e){return e={17896441:"7918",43883141:"7502","56424af8":"21",e2afdb46:"25","935f2afb":"53",abd5ed0d:"55",b08ed549:"71","5d9196ef":"79","6ea55157":"299",fb15e9e7:"348","901b6cf8":"427","8c4e5360":"438","86ce6de9":"452","5fe8a7d6":"635",e3f0bdb4:"685",c21d2b24:"759","6c78ff94":"770","20c179ae":"775",b0ad5fdb:"851","8891196d":"877","18caf1db":"913","9093a083":"946",b48061fd:"977",bb8dba6b:"1029","04a36ee2":"1043",cf8983c6:"1182",a2ce0262:"1229","8f8b8c9d":"1242","55c13872":"1336","35c994aa":"1431","561e6c7b":"1534",e0c6d955:"1648","5896fb71":"1704",f01ace04:"1761","31fc2e15":"1785","3760b40e":"1798",d9d9b422:"1869","8dbec68f":"1898",f6262a69:"1934",b39d38b0:"1993","90b312ed":"2002",c984ce9d:"2013",fc90ac41:"2046",dcf6645f:"2069",a9d8b83d:"2145","94d2f82b":"2336",fafe762b:"2392",ae31ff46:"2528","814f3328":"2535",fdbf24e4:"2608","1aab1ab5":"2701",f49334b8:"2803","1f391b9e":"3085",a6aa9e1f:"3089","443dc191":"3137","874294bc":"3207",c6092dbc:"3263","4e00a773":"3296",f757d0c5:"3374","449c721b":"3426","2e03f7f4":"3440","5bb6c1c3":"3563","77c2c049":"3604","9e4087bc":"3608","2c8659d9":"3712",bcac2ad4:"3748","802946da":"3759","20f452e9":"3843","2a635ef0":"3850","1c3f293b":"3881","01a85c17":"4013","71e4bc12":"4084","2845e528":"4102",cf04afb9:"4108","08c77efa":"4110","4eaaf39d":"4134",c4f5d8e4:"4195","468510f3":"4213","2edddeb1":"4238",a6759f2d:"4334",a94703ab:"4368",a876e6bc:"4407",cad84648:"4413","64a34be6":"4557",a94a4682:"4599",ae8e5624:"4879",cc496b32:"4917","9010ec73":"4988","3b36ca8e":"5022","484b6277":"5036","69a95a34":"5166","1b05ed46":"5204","05e5ef8f":"5315","8ded3f77":"5332",d5c687ae:"5455","5035b6a4":"5609","352a2724":"5610",d21a173f:"5658","4c00a561":"5850","6af3e01d":"5964",aa94d6df:"6009",ccc49370:"6103","78ac7022":"6122","530fec33":"6401",a0168dc0:"6506",f4a64ebe:"6508","737adc8d":"6633","08114ca6":"6639",acc723e6:"6811",cbce90b2:"6864","7356add0":"6879",b28182d4:"6958",eb154561:"7059",df8eaafd:"7146","5b5a3966":"7192",a3a5cdb3:"7259","780b1457":"7280","82a7b37c":"7291","63dd4865":"7373","393be207":"7414",c7f532e1:"7525","2c0f3de2":"7589","78005bf6":"7686",e8ed6e8b:"7696",c875b75b:"7718",adb750bb:"7739",e6c80b16:"7828",ce05be13:"7838",afca79fb:"7936",d3b36941:"7946",b42b1cce:"7983","463d321d":"8069",f040d35e:"8080","9ed0691e":"8112","44b10a21":"8317","99f237dc":"8370","8eb20e8c":"8385","339ee8e1":"8506",a7bd4aaa:"8518","4f5513f7":"8598","6875c492":"8610",a50a9650:"8656","905648c2":"8698",fba7183b:"8759",ecc6e0e3:"8814","59c77264":"8860","24f6044e":"8993","25021cc6":"9022","23f1990b":"9074",b885bf58:"9122","2d4a7f47":"9183","2a18e37e":"9235","04de189a":"9306",e39444e4:"9491","5e95c892":"9661","5aeabefc":"9683",ec177486:"9716",c0c5477b:"9755","4bd433da":"9758",d55b4038:"9761",b723c464:"9769",a8a3d11e:"9774","14eb3368":"9817","8fdae525":"9836","498e264e":"9971"}[e]||e,r.p+r.u(e)},(()=>{var e={1303:0,532:0};r.f.j=(a,b)=>{var c=r.o(e,a)?e[a]:void 0;if(0!==c)if(c)b.push(c[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var d=new Promise(((b,d)=>c=e[a]=[b,d]));b.push(c[2]=d);var f=r.p+r.u(a),t=new Error;r.l(f,(b=>{if(r.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var d=b&&("load"===b.type?"missing":b.type),f=b&&b.target&&b.target.src;t.message="Loading chunk "+a+" failed.\n("+d+": "+f+")",t.name="ChunkLoadError",t.type=d,t.request=f,c[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,b)=>{var c,d,f=b[0],t=b[1],o=b[2],n=0;if(f.some((a=>0!==e[a]))){for(c in t)r.o(t,c)&&(r.m[c]=t[c]);if(o)var i=o(r)}for(a&&a(b);n 历史博文 | Touying - + diff --git a/zh/blog/index.html b/zh/blog/index.html index eb06db873..7a092f1aa 100644 --- a/zh/blog/index.html +++ b/zh/blog/index.html @@ -5,7 +5,7 @@ Blog | Touying - + diff --git a/zh/blog/tags/development/index.html b/zh/blog/tags/development/index.html index a894c1281..c31f59b17 100644 --- a/zh/blog/tags/development/index.html +++ b/zh/blog/tags/development/index.html @@ -5,7 +5,7 @@ 1 篇博文 含有标签「development」 | Touying - + diff --git a/zh/blog/tags/index.html b/zh/blog/tags/index.html index bc4c717b9..912c0acdb 100644 --- a/zh/blog/tags/index.html +++ b/zh/blog/tags/index.html @@ -5,7 +5,7 @@ 标签 | Touying - + diff --git a/zh/blog/touying-0-2-0/index.html b/zh/blog/touying-0-2-0/index.html index 9dd296596..47faf9ebb 100644 --- a/zh/blog/touying-0-2-0/index.html +++ b/zh/blog/touying-0-2-0/index.html @@ -5,7 +5,7 @@ Touying 0.2.0 | Touying - + diff --git a/zh/docs/0.2.x/build-your-own-theme/index.html b/zh/docs/0.2.x/build-your-own-theme/index.html index 712647124..81018ab24 100644 --- a/zh/docs/0.2.x/build-your-own-theme/index.html +++ b/zh/docs/0.2.x/build-your-own-theme/index.html @@ -5,7 +5,7 @@ 创建自己的主题 | Touying - + diff --git a/zh/docs/0.2.x/category/dynamic-slides/index.html b/zh/docs/0.2.x/category/dynamic-slides/index.html index a6457029c..95b3fc34f 100644 --- a/zh/docs/0.2.x/category/dynamic-slides/index.html +++ b/zh/docs/0.2.x/category/dynamic-slides/index.html @@ -5,7 +5,7 @@ Dynamic Slides | Touying - + diff --git a/zh/docs/0.2.x/category/external-tools/index.html b/zh/docs/0.2.x/category/external-tools/index.html index ae2d77e85..c205a2d2c 100644 --- a/zh/docs/0.2.x/category/external-tools/index.html +++ b/zh/docs/0.2.x/category/external-tools/index.html @@ -5,7 +5,7 @@ External Tools | Touying - + diff --git a/zh/docs/0.2.x/category/progress/index.html b/zh/docs/0.2.x/category/progress/index.html index 20ffd9755..1c4590269 100644 --- a/zh/docs/0.2.x/category/progress/index.html +++ b/zh/docs/0.2.x/category/progress/index.html @@ -5,7 +5,7 @@ Progress | Touying - + diff --git a/zh/docs/0.2.x/category/themes/index.html b/zh/docs/0.2.x/category/themes/index.html index 05d2aab9b..027f89bc8 100644 --- a/zh/docs/0.2.x/category/themes/index.html +++ b/zh/docs/0.2.x/category/themes/index.html @@ -5,7 +5,7 @@ Themes | Touying - + diff --git a/zh/docs/0.2.x/category/utilities/index.html b/zh/docs/0.2.x/category/utilities/index.html index de3b7a08a..a7a8dfc3f 100644 --- a/zh/docs/0.2.x/category/utilities/index.html +++ b/zh/docs/0.2.x/category/utilities/index.html @@ -5,7 +5,7 @@ Utilities | Touying - + diff --git a/zh/docs/0.2.x/changelog/index.html b/zh/docs/0.2.x/changelog/index.html index d9a38a5a4..c5f1131d8 100644 --- a/zh/docs/0.2.x/changelog/index.html +++ b/zh/docs/0.2.x/changelog/index.html @@ -5,7 +5,7 @@ 更新日志 | Touying - + diff --git a/zh/docs/0.2.x/dynamic/complex/index.html b/zh/docs/0.2.x/dynamic/complex/index.html index bf09c267f..f16545fb3 100644 --- a/zh/docs/0.2.x/dynamic/complex/index.html +++ b/zh/docs/0.2.x/dynamic/complex/index.html @@ -5,7 +5,7 @@ 复杂动画 | Touying - + diff --git a/zh/docs/0.2.x/dynamic/cover/index.html b/zh/docs/0.2.x/dynamic/cover/index.html index 0d4f4d106..7865c546b 100644 --- a/zh/docs/0.2.x/dynamic/cover/index.html +++ b/zh/docs/0.2.x/dynamic/cover/index.html @@ -5,7 +5,7 @@ Cover 函数 | Touying - + diff --git a/zh/docs/0.2.x/dynamic/equation/index.html b/zh/docs/0.2.x/dynamic/equation/index.html index 32a4bbd72..44597aac0 100644 --- a/zh/docs/0.2.x/dynamic/equation/index.html +++ b/zh/docs/0.2.x/dynamic/equation/index.html @@ -5,7 +5,7 @@ 数学公式动画 | Touying - + diff --git a/zh/docs/0.2.x/dynamic/handout/index.html b/zh/docs/0.2.x/dynamic/handout/index.html index efdcb3284..92d4d969c 100644 --- a/zh/docs/0.2.x/dynamic/handout/index.html +++ b/zh/docs/0.2.x/dynamic/handout/index.html @@ -5,7 +5,7 @@ 创建讲义 | Touying - + diff --git a/zh/docs/0.2.x/dynamic/other/index.html b/zh/docs/0.2.x/dynamic/other/index.html index a00c87b3d..7e9aadf2c 100644 --- a/zh/docs/0.2.x/dynamic/other/index.html +++ b/zh/docs/0.2.x/dynamic/other/index.html @@ -5,7 +5,7 @@ 其他动画 | Touying - + diff --git a/zh/docs/0.2.x/dynamic/simple/index.html b/zh/docs/0.2.x/dynamic/simple/index.html index 66f81162b..43a1e86df 100644 --- a/zh/docs/0.2.x/dynamic/simple/index.html +++ b/zh/docs/0.2.x/dynamic/simple/index.html @@ -5,7 +5,7 @@ 简单动画 | Touying - + diff --git a/zh/docs/0.2.x/external/pdfpc/index.html b/zh/docs/0.2.x/external/pdfpc/index.html index db537369f..b6155bdd9 100644 --- a/zh/docs/0.2.x/external/pdfpc/index.html +++ b/zh/docs/0.2.x/external/pdfpc/index.html @@ -5,7 +5,7 @@ pdfpc | Touying - + diff --git a/zh/docs/0.2.x/external/typst-preview/index.html b/zh/docs/0.2.x/external/typst-preview/index.html index 2b225db7b..258d83bf4 100644 --- a/zh/docs/0.2.x/external/typst-preview/index.html +++ b/zh/docs/0.2.x/external/typst-preview/index.html @@ -5,7 +5,7 @@ Typst Preview | Touying - + diff --git a/zh/docs/0.2.x/intro/index.html b/zh/docs/0.2.x/intro/index.html index cf45fa0aa..ddabe6e00 100644 --- a/zh/docs/0.2.x/intro/index.html +++ b/zh/docs/0.2.x/intro/index.html @@ -5,7 +5,7 @@ Touying 介绍 | Touying - + diff --git a/zh/docs/0.2.x/layout/index.html b/zh/docs/0.2.x/layout/index.html index 2ebcfab19..0c1f777d5 100644 --- a/zh/docs/0.2.x/layout/index.html +++ b/zh/docs/0.2.x/layout/index.html @@ -5,7 +5,7 @@ 排篇布局 | Touying - + diff --git a/zh/docs/0.2.x/progress/counters/index.html b/zh/docs/0.2.x/progress/counters/index.html index a097d2d83..76af2ebb4 100644 --- a/zh/docs/0.2.x/progress/counters/index.html +++ b/zh/docs/0.2.x/progress/counters/index.html @@ -5,7 +5,7 @@ Touying 的计数器 | Touying - + diff --git a/zh/docs/0.2.x/progress/sections/index.html b/zh/docs/0.2.x/progress/sections/index.html index a66b1dfb1..a7db4c1fe 100644 --- a/zh/docs/0.2.x/progress/sections/index.html +++ b/zh/docs/0.2.x/progress/sections/index.html @@ -5,7 +5,7 @@ Touying 的 Sections | Touying - + diff --git a/zh/docs/0.2.x/start/index.html b/zh/docs/0.2.x/start/index.html index de8a44e8f..5a3f627ee 100644 --- a/zh/docs/0.2.x/start/index.html +++ b/zh/docs/0.2.x/start/index.html @@ -5,7 +5,7 @@ 开始 | Touying - + diff --git a/zh/docs/0.2.x/style/index.html b/zh/docs/0.2.x/style/index.html index b9149a852..be1bde1ac 100644 --- a/zh/docs/0.2.x/style/index.html +++ b/zh/docs/0.2.x/style/index.html @@ -5,7 +5,7 @@ 代码风格 | Touying - + diff --git a/zh/docs/0.2.x/themes/dewdrop/index.html b/zh/docs/0.2.x/themes/dewdrop/index.html index 911b5d9bd..91acd0791 100644 --- a/zh/docs/0.2.x/themes/dewdrop/index.html +++ b/zh/docs/0.2.x/themes/dewdrop/index.html @@ -5,7 +5,7 @@ Dewdrop 主题 | Touying - + diff --git a/zh/docs/0.2.x/themes/metropolis/index.html b/zh/docs/0.2.x/themes/metropolis/index.html index db8460398..422d8226d 100644 --- a/zh/docs/0.2.x/themes/metropolis/index.html +++ b/zh/docs/0.2.x/themes/metropolis/index.html @@ -5,7 +5,7 @@ Metropolis 主题 | Touying - + diff --git a/zh/docs/0.2.x/themes/simple/index.html b/zh/docs/0.2.x/themes/simple/index.html index 7f86fc1d4..477801858 100644 --- a/zh/docs/0.2.x/themes/simple/index.html +++ b/zh/docs/0.2.x/themes/simple/index.html @@ -5,7 +5,7 @@ Simple 主题 | Touying - + diff --git a/zh/docs/0.2.x/themes/university/index.html b/zh/docs/0.2.x/themes/university/index.html index 61948a3e7..b862e1ad3 100644 --- a/zh/docs/0.2.x/themes/university/index.html +++ b/zh/docs/0.2.x/themes/university/index.html @@ -5,7 +5,7 @@ University 主题 | Touying - + diff --git a/zh/docs/0.2.x/utilities/fit-to/index.html b/zh/docs/0.2.x/utilities/fit-to/index.html index 811eca878..568ea47b9 100644 --- a/zh/docs/0.2.x/utilities/fit-to/index.html +++ b/zh/docs/0.2.x/utilities/fit-to/index.html @@ -5,7 +5,7 @@ Fit to height / width | Touying - + diff --git a/zh/docs/0.2.x/utilities/oop/index.html b/zh/docs/0.2.x/utilities/oop/index.html index 9eb3232b6..b3031067e 100644 --- a/zh/docs/0.2.x/utilities/oop/index.html +++ b/zh/docs/0.2.x/utilities/oop/index.html @@ -5,7 +5,7 @@ 面向对象编程 | Touying - + diff --git a/zh/docs/0.3.x/build-your-own-theme/index.html b/zh/docs/0.3.x/build-your-own-theme/index.html index 8fbf3d637..514643ff8 100644 --- a/zh/docs/0.3.x/build-your-own-theme/index.html +++ b/zh/docs/0.3.x/build-your-own-theme/index.html @@ -5,7 +5,7 @@ 创建自己的主题 | Touying - + diff --git a/zh/docs/0.3.x/category/dynamic-slides/index.html b/zh/docs/0.3.x/category/dynamic-slides/index.html index e0d03cb9f..33f6add9c 100644 --- a/zh/docs/0.3.x/category/dynamic-slides/index.html +++ b/zh/docs/0.3.x/category/dynamic-slides/index.html @@ -5,7 +5,7 @@ Dynamic Slides | Touying - + diff --git a/zh/docs/0.3.x/category/external-tools/index.html b/zh/docs/0.3.x/category/external-tools/index.html index 8a845f531..95e0156df 100644 --- a/zh/docs/0.3.x/category/external-tools/index.html +++ b/zh/docs/0.3.x/category/external-tools/index.html @@ -5,7 +5,7 @@ External Tools | Touying - + diff --git a/zh/docs/0.3.x/category/package-integration/index.html b/zh/docs/0.3.x/category/package-integration/index.html index de258e9c1..b543cf081 100644 --- a/zh/docs/0.3.x/category/package-integration/index.html +++ b/zh/docs/0.3.x/category/package-integration/index.html @@ -5,7 +5,7 @@ Package Integration | Touying - + diff --git a/zh/docs/0.3.x/category/progress/index.html b/zh/docs/0.3.x/category/progress/index.html index f2bd324c7..885f517ba 100644 --- a/zh/docs/0.3.x/category/progress/index.html +++ b/zh/docs/0.3.x/category/progress/index.html @@ -5,7 +5,7 @@ Progress | Touying - + diff --git a/zh/docs/0.3.x/category/themes/index.html b/zh/docs/0.3.x/category/themes/index.html index ca37c190a..1482e48c1 100644 --- a/zh/docs/0.3.x/category/themes/index.html +++ b/zh/docs/0.3.x/category/themes/index.html @@ -5,7 +5,7 @@ Themes | Touying - + diff --git a/zh/docs/0.3.x/category/utilities/index.html b/zh/docs/0.3.x/category/utilities/index.html index f36c5246d..e0cd15067 100644 --- a/zh/docs/0.3.x/category/utilities/index.html +++ b/zh/docs/0.3.x/category/utilities/index.html @@ -5,7 +5,7 @@ Utilities | Touying - + diff --git a/zh/docs/0.3.x/changelog/index.html b/zh/docs/0.3.x/changelog/index.html index cedab7e3b..482ae617f 100644 --- a/zh/docs/0.3.x/changelog/index.html +++ b/zh/docs/0.3.x/changelog/index.html @@ -5,7 +5,7 @@ 更新日志 | Touying - + diff --git a/zh/docs/0.3.x/code-styles/index.html b/zh/docs/0.3.x/code-styles/index.html index dad95c6d4..be4b4307c 100644 --- a/zh/docs/0.3.x/code-styles/index.html +++ b/zh/docs/0.3.x/code-styles/index.html @@ -5,7 +5,7 @@ 代码风格 | Touying - + diff --git a/zh/docs/0.3.x/dynamic/complex/index.html b/zh/docs/0.3.x/dynamic/complex/index.html index 5d4476b42..791379e08 100644 --- a/zh/docs/0.3.x/dynamic/complex/index.html +++ b/zh/docs/0.3.x/dynamic/complex/index.html @@ -5,7 +5,7 @@ 复杂动画 | Touying - + diff --git a/zh/docs/0.3.x/dynamic/cover/index.html b/zh/docs/0.3.x/dynamic/cover/index.html index 9cea573d7..b064be88c 100644 --- a/zh/docs/0.3.x/dynamic/cover/index.html +++ b/zh/docs/0.3.x/dynamic/cover/index.html @@ -5,7 +5,7 @@ Cover 函数 | Touying - + diff --git a/zh/docs/0.3.x/dynamic/equation/index.html b/zh/docs/0.3.x/dynamic/equation/index.html index 5ec0c7063..c23fba47a 100644 --- a/zh/docs/0.3.x/dynamic/equation/index.html +++ b/zh/docs/0.3.x/dynamic/equation/index.html @@ -5,7 +5,7 @@ 数学公式动画 | Touying - + diff --git a/zh/docs/0.3.x/dynamic/handout/index.html b/zh/docs/0.3.x/dynamic/handout/index.html index e9a464529..26f711639 100644 --- a/zh/docs/0.3.x/dynamic/handout/index.html +++ b/zh/docs/0.3.x/dynamic/handout/index.html @@ -5,7 +5,7 @@ 创建讲义 | Touying - + diff --git a/zh/docs/0.3.x/dynamic/other/index.html b/zh/docs/0.3.x/dynamic/other/index.html index b8604cc5c..c826a826c 100644 --- a/zh/docs/0.3.x/dynamic/other/index.html +++ b/zh/docs/0.3.x/dynamic/other/index.html @@ -5,7 +5,7 @@ 其他动画 | Touying - + diff --git a/zh/docs/0.3.x/dynamic/simple/index.html b/zh/docs/0.3.x/dynamic/simple/index.html index 02b0e94b4..cbfc17a4d 100644 --- a/zh/docs/0.3.x/dynamic/simple/index.html +++ b/zh/docs/0.3.x/dynamic/simple/index.html @@ -5,7 +5,7 @@ 简单动画 | Touying - + diff --git a/zh/docs/0.3.x/external/pdfpc/index.html b/zh/docs/0.3.x/external/pdfpc/index.html index 7b8f409f2..97955bc86 100644 --- a/zh/docs/0.3.x/external/pdfpc/index.html +++ b/zh/docs/0.3.x/external/pdfpc/index.html @@ -5,7 +5,7 @@ pdfpc | Touying - + diff --git a/zh/docs/0.3.x/external/typst-preview/index.html b/zh/docs/0.3.x/external/typst-preview/index.html index 6dbeee242..ff01c7ab9 100644 --- a/zh/docs/0.3.x/external/typst-preview/index.html +++ b/zh/docs/0.3.x/external/typst-preview/index.html @@ -5,7 +5,7 @@ Typst Preview | Touying - + diff --git a/zh/docs/0.3.x/global-settings/index.html b/zh/docs/0.3.x/global-settings/index.html index 54469f9f7..9e82fd919 100644 --- a/zh/docs/0.3.x/global-settings/index.html +++ b/zh/docs/0.3.x/global-settings/index.html @@ -5,7 +5,7 @@ 全局设置 | Touying - + diff --git a/zh/docs/0.3.x/integration/cetz/index.html b/zh/docs/0.3.x/integration/cetz/index.html index b420a1cdd..5cac81992 100644 --- a/zh/docs/0.3.x/integration/cetz/index.html +++ b/zh/docs/0.3.x/integration/cetz/index.html @@ -5,7 +5,7 @@ CeTZ | Touying - + diff --git a/zh/docs/0.3.x/integration/codly/index.html b/zh/docs/0.3.x/integration/codly/index.html index e6af79604..82d2fbec8 100644 --- a/zh/docs/0.3.x/integration/codly/index.html +++ b/zh/docs/0.3.x/integration/codly/index.html @@ -5,7 +5,7 @@ Codly | Touying - + diff --git a/zh/docs/0.3.x/integration/fletcher/index.html b/zh/docs/0.3.x/integration/fletcher/index.html index b1aac0a32..566e86d5d 100644 --- a/zh/docs/0.3.x/integration/fletcher/index.html +++ b/zh/docs/0.3.x/integration/fletcher/index.html @@ -5,7 +5,7 @@ Fletcher | Touying - + diff --git a/zh/docs/0.3.x/integration/mitex/index.html b/zh/docs/0.3.x/integration/mitex/index.html index a1d816818..d6c3e2dec 100644 --- a/zh/docs/0.3.x/integration/mitex/index.html +++ b/zh/docs/0.3.x/integration/mitex/index.html @@ -5,7 +5,7 @@ MiTeX | Touying - + diff --git a/zh/docs/0.3.x/integration/pinit/index.html b/zh/docs/0.3.x/integration/pinit/index.html index ffa9aba75..72b5a0a81 100644 --- a/zh/docs/0.3.x/integration/pinit/index.html +++ b/zh/docs/0.3.x/integration/pinit/index.html @@ -5,7 +5,7 @@ Pinit | Touying - + diff --git a/zh/docs/0.3.x/integration/polylux/index.html b/zh/docs/0.3.x/integration/polylux/index.html index 2e17e4f99..826e4c6b5 100644 --- a/zh/docs/0.3.x/integration/polylux/index.html +++ b/zh/docs/0.3.x/integration/polylux/index.html @@ -5,7 +5,7 @@ Polylux | Touying - + diff --git a/zh/docs/0.3.x/intro/index.html b/zh/docs/0.3.x/intro/index.html index c4e68dd46..60afef5a2 100644 --- a/zh/docs/0.3.x/intro/index.html +++ b/zh/docs/0.3.x/intro/index.html @@ -5,7 +5,7 @@ Touying 介绍 | Touying - + diff --git a/zh/docs/0.3.x/layout/index.html b/zh/docs/0.3.x/layout/index.html index 83007bf12..e372938e6 100644 --- a/zh/docs/0.3.x/layout/index.html +++ b/zh/docs/0.3.x/layout/index.html @@ -5,7 +5,7 @@ 页面布局 | Touying - + diff --git a/zh/docs/0.3.x/progress/counters/index.html b/zh/docs/0.3.x/progress/counters/index.html index 6d246acd3..f6c1b8a49 100644 --- a/zh/docs/0.3.x/progress/counters/index.html +++ b/zh/docs/0.3.x/progress/counters/index.html @@ -5,7 +5,7 @@ Touying 的计数器 | Touying - + diff --git a/zh/docs/0.3.x/progress/sections/index.html b/zh/docs/0.3.x/progress/sections/index.html index af94e842b..81e5f240f 100644 --- a/zh/docs/0.3.x/progress/sections/index.html +++ b/zh/docs/0.3.x/progress/sections/index.html @@ -5,7 +5,7 @@ Touying 的 Sections | Touying - + diff --git a/zh/docs/0.3.x/sections/index.html b/zh/docs/0.3.x/sections/index.html index 6378d13d4..924b0bea2 100644 --- a/zh/docs/0.3.x/sections/index.html +++ b/zh/docs/0.3.x/sections/index.html @@ -5,7 +5,7 @@ 节与小节 | Touying - + diff --git a/zh/docs/0.3.x/start/index.html b/zh/docs/0.3.x/start/index.html index d224e764c..df54c1cab 100644 --- a/zh/docs/0.3.x/start/index.html +++ b/zh/docs/0.3.x/start/index.html @@ -5,7 +5,7 @@ 开始 | Touying - + diff --git a/zh/docs/0.3.x/themes/dewdrop/index.html b/zh/docs/0.3.x/themes/dewdrop/index.html index 7337aed62..7d17dc7f6 100644 --- a/zh/docs/0.3.x/themes/dewdrop/index.html +++ b/zh/docs/0.3.x/themes/dewdrop/index.html @@ -5,7 +5,7 @@ Dewdrop 主题 | Touying - + diff --git a/zh/docs/0.3.x/themes/metropolis/index.html b/zh/docs/0.3.x/themes/metropolis/index.html index 1cc45ac82..f8294409c 100644 --- a/zh/docs/0.3.x/themes/metropolis/index.html +++ b/zh/docs/0.3.x/themes/metropolis/index.html @@ -5,7 +5,7 @@ Metropolis 主题 | Touying - + diff --git a/zh/docs/0.3.x/themes/simple/index.html b/zh/docs/0.3.x/themes/simple/index.html index e3580219e..9134449a6 100644 --- a/zh/docs/0.3.x/themes/simple/index.html +++ b/zh/docs/0.3.x/themes/simple/index.html @@ -5,7 +5,7 @@ Simple 主题 | Touying - + diff --git a/zh/docs/0.3.x/themes/university/index.html b/zh/docs/0.3.x/themes/university/index.html index 0a9e75cdd..2050a0e06 100644 --- a/zh/docs/0.3.x/themes/university/index.html +++ b/zh/docs/0.3.x/themes/university/index.html @@ -5,7 +5,7 @@ University 主题 | Touying - + diff --git a/zh/docs/0.3.x/utilities/fit-to/index.html b/zh/docs/0.3.x/utilities/fit-to/index.html index a7d040ded..72e3fbcfe 100644 --- a/zh/docs/0.3.x/utilities/fit-to/index.html +++ b/zh/docs/0.3.x/utilities/fit-to/index.html @@ -5,7 +5,7 @@ Fit to height / width | Touying - + diff --git a/zh/docs/0.3.x/utilities/oop/index.html b/zh/docs/0.3.x/utilities/oop/index.html index 5c674fd8b..6f56344d6 100644 --- a/zh/docs/0.3.x/utilities/oop/index.html +++ b/zh/docs/0.3.x/utilities/oop/index.html @@ -5,7 +5,7 @@ 面向对象编程 | Touying - + diff --git a/zh/docs/build-your-own-theme/index.html b/zh/docs/build-your-own-theme/index.html index 52e2ea9e2..1c94f989c 100644 --- a/zh/docs/build-your-own-theme/index.html +++ b/zh/docs/build-your-own-theme/index.html @@ -5,7 +5,7 @@ 创建自己的主题 | Touying - + @@ -34,7 +34,7 @@

修改已

然后就可以通过

#import "@preview/touying:0.3.3": *
#import "university.typ"

#let s = university.register(aspect-ratio: "16-9")

的方式导入和使用主题了。

-

一个具体的示例:https://typst.app/project/pdWNTS47I-6jxHrWdMSTLx

+

一个具体的示例:https://typst.app/project/rqRuzg0keo_ZEB5AdxjweA

导入

取决于这个主题是你自己的,还是 Touying 的一部分,你可以用两种方式导入:

如果只是你自己使用,你可以直接导入 Touying:

diff --git a/zh/docs/category/dynamic-slides/index.html b/zh/docs/category/dynamic-slides/index.html index 9bb05df6d..ed0baf5af 100644 --- a/zh/docs/category/dynamic-slides/index.html +++ b/zh/docs/category/dynamic-slides/index.html @@ -5,7 +5,7 @@ Dynamic Slides | Touying - + diff --git a/zh/docs/category/external-tools/index.html b/zh/docs/category/external-tools/index.html index abaed2639..25c545007 100644 --- a/zh/docs/category/external-tools/index.html +++ b/zh/docs/category/external-tools/index.html @@ -5,7 +5,7 @@ External Tools | Touying - + diff --git a/zh/docs/category/package-integration/index.html b/zh/docs/category/package-integration/index.html index fa03a0099..0a07a3905 100644 --- a/zh/docs/category/package-integration/index.html +++ b/zh/docs/category/package-integration/index.html @@ -5,7 +5,7 @@ Package Integration | Touying - + diff --git a/zh/docs/category/progress/index.html b/zh/docs/category/progress/index.html index bcb2f5fe4..9c47c6bc5 100644 --- a/zh/docs/category/progress/index.html +++ b/zh/docs/category/progress/index.html @@ -5,7 +5,7 @@ Progress | Touying - + diff --git a/zh/docs/category/themes/index.html b/zh/docs/category/themes/index.html index ba8af3ce7..cf585f820 100644 --- a/zh/docs/category/themes/index.html +++ b/zh/docs/category/themes/index.html @@ -5,7 +5,7 @@ Themes | Touying - + diff --git a/zh/docs/category/utilities/index.html b/zh/docs/category/utilities/index.html index 87e8afa78..719ad8365 100644 --- a/zh/docs/category/utilities/index.html +++ b/zh/docs/category/utilities/index.html @@ -5,7 +5,7 @@ Utilities | Touying - + diff --git a/zh/docs/changelog/index.html b/zh/docs/changelog/index.html index 67f2fca1c..082a13873 100644 --- a/zh/docs/changelog/index.html +++ b/zh/docs/changelog/index.html @@ -5,7 +5,7 @@ 更新日志 | Touying - + diff --git a/zh/docs/code-styles/index.html b/zh/docs/code-styles/index.html index 38d9f5da7..be20c72d9 100644 --- a/zh/docs/code-styles/index.html +++ b/zh/docs/code-styles/index.html @@ -5,7 +5,7 @@ 代码风格 | Touying - + diff --git a/zh/docs/dynamic/complex/index.html b/zh/docs/dynamic/complex/index.html index 66d7bf85d..8782795bc 100644 --- a/zh/docs/dynamic/complex/index.html +++ b/zh/docs/dynamic/complex/index.html @@ -5,7 +5,7 @@ 复杂动画 | Touying - + diff --git a/zh/docs/dynamic/cover/index.html b/zh/docs/dynamic/cover/index.html index 8c0e7e8fb..dc1605142 100644 --- a/zh/docs/dynamic/cover/index.html +++ b/zh/docs/dynamic/cover/index.html @@ -5,7 +5,7 @@ Cover 函数 | Touying - + diff --git a/zh/docs/dynamic/equation/index.html b/zh/docs/dynamic/equation/index.html index 849b81c8e..e18a99948 100644 --- a/zh/docs/dynamic/equation/index.html +++ b/zh/docs/dynamic/equation/index.html @@ -5,7 +5,7 @@ 数学公式动画 | Touying - + diff --git a/zh/docs/dynamic/handout/index.html b/zh/docs/dynamic/handout/index.html index 54372c817..7d224c2c3 100644 --- a/zh/docs/dynamic/handout/index.html +++ b/zh/docs/dynamic/handout/index.html @@ -5,7 +5,7 @@ 创建讲义 | Touying - + diff --git a/zh/docs/dynamic/other/index.html b/zh/docs/dynamic/other/index.html index fa6c769b3..46d145b5d 100644 --- a/zh/docs/dynamic/other/index.html +++ b/zh/docs/dynamic/other/index.html @@ -5,7 +5,7 @@ 其他动画 | Touying - + diff --git a/zh/docs/dynamic/simple/index.html b/zh/docs/dynamic/simple/index.html index 63102f6a5..8dffbbb40 100644 --- a/zh/docs/dynamic/simple/index.html +++ b/zh/docs/dynamic/simple/index.html @@ -5,7 +5,7 @@ 简单动画 | Touying - + diff --git a/zh/docs/external/pdfpc/index.html b/zh/docs/external/pdfpc/index.html index 5d964e522..2510704b8 100644 --- a/zh/docs/external/pdfpc/index.html +++ b/zh/docs/external/pdfpc/index.html @@ -5,7 +5,7 @@ pdfpc | Touying - + diff --git a/zh/docs/external/typst-preview/index.html b/zh/docs/external/typst-preview/index.html index 217aa31c6..eed86ba53 100644 --- a/zh/docs/external/typst-preview/index.html +++ b/zh/docs/external/typst-preview/index.html @@ -5,7 +5,7 @@ Typst Preview | Touying - + diff --git a/zh/docs/global-settings/index.html b/zh/docs/global-settings/index.html index 1d069fcf1..667d8b23e 100644 --- a/zh/docs/global-settings/index.html +++ b/zh/docs/global-settings/index.html @@ -5,7 +5,7 @@ 全局设置 | Touying - + diff --git a/zh/docs/integration/cetz/index.html b/zh/docs/integration/cetz/index.html index 15cd74f91..dbd34ddcc 100644 --- a/zh/docs/integration/cetz/index.html +++ b/zh/docs/integration/cetz/index.html @@ -5,7 +5,7 @@ CeTZ | Touying - + diff --git a/zh/docs/integration/codly/index.html b/zh/docs/integration/codly/index.html index b562a7a2e..25271b2d3 100644 --- a/zh/docs/integration/codly/index.html +++ b/zh/docs/integration/codly/index.html @@ -5,7 +5,7 @@ Codly | Touying - + diff --git a/zh/docs/integration/fletcher/index.html b/zh/docs/integration/fletcher/index.html index f270fef51..d64696095 100644 --- a/zh/docs/integration/fletcher/index.html +++ b/zh/docs/integration/fletcher/index.html @@ -5,7 +5,7 @@ Fletcher | Touying - + diff --git a/zh/docs/integration/mitex/index.html b/zh/docs/integration/mitex/index.html index 4c4418753..4af48e065 100644 --- a/zh/docs/integration/mitex/index.html +++ b/zh/docs/integration/mitex/index.html @@ -5,7 +5,7 @@ MiTeX | Touying - + diff --git a/zh/docs/integration/pinit/index.html b/zh/docs/integration/pinit/index.html index e2612883c..3fc3f63bf 100644 --- a/zh/docs/integration/pinit/index.html +++ b/zh/docs/integration/pinit/index.html @@ -5,7 +5,7 @@ Pinit | Touying - + diff --git a/zh/docs/integration/polylux/index.html b/zh/docs/integration/polylux/index.html index 95be0c40d..dba100c8c 100644 --- a/zh/docs/integration/polylux/index.html +++ b/zh/docs/integration/polylux/index.html @@ -5,7 +5,7 @@ Polylux | Touying - + diff --git a/zh/docs/intro/index.html b/zh/docs/intro/index.html index 6a5a9e8e5..6e32d9a06 100644 --- a/zh/docs/intro/index.html +++ b/zh/docs/intro/index.html @@ -5,7 +5,7 @@ Touying 介绍 | Touying - + diff --git a/zh/docs/layout/index.html b/zh/docs/layout/index.html index 4f2d2624b..2e433b10b 100644 --- a/zh/docs/layout/index.html +++ b/zh/docs/layout/index.html @@ -5,7 +5,7 @@ 页面布局 | Touying - + diff --git a/zh/docs/next/build-your-own-theme/index.html b/zh/docs/next/build-your-own-theme/index.html index 43dde217f..1856950a4 100644 --- a/zh/docs/next/build-your-own-theme/index.html +++ b/zh/docs/next/build-your-own-theme/index.html @@ -5,7 +5,7 @@ 创建自己的主题 | Touying - + @@ -34,7 +34,7 @@

然后就可以通过

#import "@preview/touying:0.3.3": *
#import "university.typ"

#let s = university.register(aspect-ratio: "16-9")

的方式导入和使用主题了。

-

一个具体的示例:https://typst.app/project/pdWNTS47I-6jxHrWdMSTLx

+

一个具体的示例:https://typst.app/project/rqRuzg0keo_ZEB5AdxjweA

导入

取决于这个主题是你自己的,还是 Touying 的一部分,你可以用两种方式导入:

如果只是你自己使用,你可以直接导入 Touying:

diff --git a/zh/docs/next/category/dynamic-slides/index.html b/zh/docs/next/category/dynamic-slides/index.html index 7c99fce8f..4713c74c2 100644 --- a/zh/docs/next/category/dynamic-slides/index.html +++ b/zh/docs/next/category/dynamic-slides/index.html @@ -5,7 +5,7 @@ Dynamic Slides | Touying - + diff --git a/zh/docs/next/category/external-tools/index.html b/zh/docs/next/category/external-tools/index.html index 66562c11c..d7db764fa 100644 --- a/zh/docs/next/category/external-tools/index.html +++ b/zh/docs/next/category/external-tools/index.html @@ -5,7 +5,7 @@ External Tools | Touying - + diff --git a/zh/docs/next/category/package-integration/index.html b/zh/docs/next/category/package-integration/index.html index 484515901..5e3244411 100644 --- a/zh/docs/next/category/package-integration/index.html +++ b/zh/docs/next/category/package-integration/index.html @@ -5,7 +5,7 @@ Package Integration | Touying - + diff --git a/zh/docs/next/category/progress/index.html b/zh/docs/next/category/progress/index.html index fdcdee4f7..0d014b92e 100644 --- a/zh/docs/next/category/progress/index.html +++ b/zh/docs/next/category/progress/index.html @@ -5,7 +5,7 @@ Progress | Touying - + diff --git a/zh/docs/next/category/themes/index.html b/zh/docs/next/category/themes/index.html index 1321b6715..2ab1bc8dd 100644 --- a/zh/docs/next/category/themes/index.html +++ b/zh/docs/next/category/themes/index.html @@ -5,7 +5,7 @@ Themes | Touying - + diff --git a/zh/docs/next/category/utilities/index.html b/zh/docs/next/category/utilities/index.html index 02e5c9276..154aa874e 100644 --- a/zh/docs/next/category/utilities/index.html +++ b/zh/docs/next/category/utilities/index.html @@ -5,7 +5,7 @@ Utilities | Touying - + diff --git a/zh/docs/next/changelog/index.html b/zh/docs/next/changelog/index.html index 76e5e24eb..389e21237 100644 --- a/zh/docs/next/changelog/index.html +++ b/zh/docs/next/changelog/index.html @@ -5,7 +5,7 @@ 更新日志 | Touying - + diff --git a/zh/docs/next/code-styles/index.html b/zh/docs/next/code-styles/index.html index d6529b5d5..92cd9c5e8 100644 --- a/zh/docs/next/code-styles/index.html +++ b/zh/docs/next/code-styles/index.html @@ -5,7 +5,7 @@ 代码风格 | Touying - + diff --git a/zh/docs/next/dynamic/complex/index.html b/zh/docs/next/dynamic/complex/index.html index 820cc648b..a13b99093 100644 --- a/zh/docs/next/dynamic/complex/index.html +++ b/zh/docs/next/dynamic/complex/index.html @@ -5,7 +5,7 @@ 复杂动画 | Touying - + diff --git a/zh/docs/next/dynamic/cover/index.html b/zh/docs/next/dynamic/cover/index.html index cc6f71fcb..edf83a440 100644 --- a/zh/docs/next/dynamic/cover/index.html +++ b/zh/docs/next/dynamic/cover/index.html @@ -5,7 +5,7 @@ Cover 函数 | Touying - + diff --git a/zh/docs/next/dynamic/equation/index.html b/zh/docs/next/dynamic/equation/index.html index 2d51f3066..f7dc48b25 100644 --- a/zh/docs/next/dynamic/equation/index.html +++ b/zh/docs/next/dynamic/equation/index.html @@ -5,7 +5,7 @@ 数学公式动画 | Touying - + diff --git a/zh/docs/next/dynamic/handout/index.html b/zh/docs/next/dynamic/handout/index.html index 2cd891132..73ee7aac5 100644 --- a/zh/docs/next/dynamic/handout/index.html +++ b/zh/docs/next/dynamic/handout/index.html @@ -5,7 +5,7 @@ 创建讲义 | Touying - + diff --git a/zh/docs/next/dynamic/other/index.html b/zh/docs/next/dynamic/other/index.html index e05edebf3..c552834a3 100644 --- a/zh/docs/next/dynamic/other/index.html +++ b/zh/docs/next/dynamic/other/index.html @@ -5,7 +5,7 @@ 其他动画 | Touying - + diff --git a/zh/docs/next/dynamic/simple/index.html b/zh/docs/next/dynamic/simple/index.html index 40a032109..ae94a16ca 100644 --- a/zh/docs/next/dynamic/simple/index.html +++ b/zh/docs/next/dynamic/simple/index.html @@ -5,7 +5,7 @@ 简单动画 | Touying - + diff --git a/zh/docs/next/external/pdfpc/index.html b/zh/docs/next/external/pdfpc/index.html index 78d1ceea6..b71864333 100644 --- a/zh/docs/next/external/pdfpc/index.html +++ b/zh/docs/next/external/pdfpc/index.html @@ -5,7 +5,7 @@ pdfpc | Touying - + diff --git a/zh/docs/next/external/typst-preview/index.html b/zh/docs/next/external/typst-preview/index.html index 7651272f6..c8dcbd06d 100644 --- a/zh/docs/next/external/typst-preview/index.html +++ b/zh/docs/next/external/typst-preview/index.html @@ -5,7 +5,7 @@ Typst Preview | Touying - + diff --git a/zh/docs/next/global-settings/index.html b/zh/docs/next/global-settings/index.html index abc0d7493..ed5d1e0e6 100644 --- a/zh/docs/next/global-settings/index.html +++ b/zh/docs/next/global-settings/index.html @@ -5,7 +5,7 @@ 全局设置 | Touying - + diff --git a/zh/docs/next/integration/cetz/index.html b/zh/docs/next/integration/cetz/index.html index 165e009e0..d705aedab 100644 --- a/zh/docs/next/integration/cetz/index.html +++ b/zh/docs/next/integration/cetz/index.html @@ -5,7 +5,7 @@ CeTZ | Touying - + diff --git a/zh/docs/next/integration/codly/index.html b/zh/docs/next/integration/codly/index.html index b33dcc4ae..2ce2317f0 100644 --- a/zh/docs/next/integration/codly/index.html +++ b/zh/docs/next/integration/codly/index.html @@ -5,7 +5,7 @@ Codly | Touying - + diff --git a/zh/docs/next/integration/fletcher/index.html b/zh/docs/next/integration/fletcher/index.html index d85a33464..693d51b5c 100644 --- a/zh/docs/next/integration/fletcher/index.html +++ b/zh/docs/next/integration/fletcher/index.html @@ -5,7 +5,7 @@ Fletcher | Touying - + diff --git a/zh/docs/next/integration/mitex/index.html b/zh/docs/next/integration/mitex/index.html index c8eb42bdc..06e906b1d 100644 --- a/zh/docs/next/integration/mitex/index.html +++ b/zh/docs/next/integration/mitex/index.html @@ -5,7 +5,7 @@ MiTeX | Touying - + diff --git a/zh/docs/next/integration/pinit/index.html b/zh/docs/next/integration/pinit/index.html index a5f07959e..4527bc1b4 100644 --- a/zh/docs/next/integration/pinit/index.html +++ b/zh/docs/next/integration/pinit/index.html @@ -5,7 +5,7 @@ Pinit | Touying - + diff --git a/zh/docs/next/integration/polylux/index.html b/zh/docs/next/integration/polylux/index.html index 586f9fa6b..e7ffa7761 100644 --- a/zh/docs/next/integration/polylux/index.html +++ b/zh/docs/next/integration/polylux/index.html @@ -5,7 +5,7 @@ Polylux | Touying - + diff --git a/zh/docs/next/intro/index.html b/zh/docs/next/intro/index.html index 8726be9f2..a0a994c0e 100644 --- a/zh/docs/next/intro/index.html +++ b/zh/docs/next/intro/index.html @@ -5,7 +5,7 @@ Touying 介绍 | Touying - + diff --git a/zh/docs/next/layout/index.html b/zh/docs/next/layout/index.html index d129bba79..911401ad3 100644 --- a/zh/docs/next/layout/index.html +++ b/zh/docs/next/layout/index.html @@ -5,7 +5,7 @@ 页面布局 | Touying - + diff --git a/zh/docs/next/progress/counters/index.html b/zh/docs/next/progress/counters/index.html index 1823a96ce..cbc05ea38 100644 --- a/zh/docs/next/progress/counters/index.html +++ b/zh/docs/next/progress/counters/index.html @@ -5,7 +5,7 @@ Touying 的计数器 | Touying - + diff --git a/zh/docs/next/progress/sections/index.html b/zh/docs/next/progress/sections/index.html index 01ebe3cb1..9b9f95ac1 100644 --- a/zh/docs/next/progress/sections/index.html +++ b/zh/docs/next/progress/sections/index.html @@ -5,7 +5,7 @@ Touying 的 Sections | Touying - + diff --git a/zh/docs/next/sections/index.html b/zh/docs/next/sections/index.html index dc9617ce2..2a8918839 100644 --- a/zh/docs/next/sections/index.html +++ b/zh/docs/next/sections/index.html @@ -5,7 +5,7 @@ 节与小节 | Touying - + diff --git a/zh/docs/next/start/index.html b/zh/docs/next/start/index.html index 006c4c541..cb0878fa9 100644 --- a/zh/docs/next/start/index.html +++ b/zh/docs/next/start/index.html @@ -5,7 +5,7 @@ 开始 | Touying - + diff --git a/zh/docs/next/themes/aqua/index.html b/zh/docs/next/themes/aqua/index.html index dd00e4546..e82d85e30 100644 --- a/zh/docs/next/themes/aqua/index.html +++ b/zh/docs/next/themes/aqua/index.html @@ -5,7 +5,7 @@ Aqua 主题 | Touying - + diff --git a/zh/docs/next/themes/dewdrop/index.html b/zh/docs/next/themes/dewdrop/index.html index 28663a027..9e0632cb1 100644 --- a/zh/docs/next/themes/dewdrop/index.html +++ b/zh/docs/next/themes/dewdrop/index.html @@ -5,7 +5,7 @@ Dewdrop 主题 | Touying - + diff --git a/zh/docs/next/themes/metropolis/index.html b/zh/docs/next/themes/metropolis/index.html index 3a6db0d13..0ef3cb787 100644 --- a/zh/docs/next/themes/metropolis/index.html +++ b/zh/docs/next/themes/metropolis/index.html @@ -5,7 +5,7 @@ Metropolis 主题 | Touying - + diff --git a/zh/docs/next/themes/simple/index.html b/zh/docs/next/themes/simple/index.html index c66e81b6b..584bf135e 100644 --- a/zh/docs/next/themes/simple/index.html +++ b/zh/docs/next/themes/simple/index.html @@ -5,7 +5,7 @@ Simple 主题 | Touying - + diff --git a/zh/docs/next/themes/university/index.html b/zh/docs/next/themes/university/index.html index 73c49ff15..ee521893b 100644 --- a/zh/docs/next/themes/university/index.html +++ b/zh/docs/next/themes/university/index.html @@ -5,7 +5,7 @@ University 主题 | Touying - + diff --git a/zh/docs/next/utilities/fit-to/index.html b/zh/docs/next/utilities/fit-to/index.html index 64a71566e..e34df1376 100644 --- a/zh/docs/next/utilities/fit-to/index.html +++ b/zh/docs/next/utilities/fit-to/index.html @@ -5,7 +5,7 @@ Fit to height / width | Touying - + diff --git a/zh/docs/next/utilities/oop/index.html b/zh/docs/next/utilities/oop/index.html index 2aeaf8e9a..68ee52639 100644 --- a/zh/docs/next/utilities/oop/index.html +++ b/zh/docs/next/utilities/oop/index.html @@ -5,7 +5,7 @@ 面向对象编程 | Touying - + diff --git a/zh/docs/progress/counters/index.html b/zh/docs/progress/counters/index.html index 45b44298e..7f61f9acd 100644 --- a/zh/docs/progress/counters/index.html +++ b/zh/docs/progress/counters/index.html @@ -5,7 +5,7 @@ Touying 的计数器 | Touying - + diff --git a/zh/docs/progress/sections/index.html b/zh/docs/progress/sections/index.html index b9108c7c6..00f0c017b 100644 --- a/zh/docs/progress/sections/index.html +++ b/zh/docs/progress/sections/index.html @@ -5,7 +5,7 @@ Touying 的 Sections | Touying - + diff --git a/zh/docs/sections/index.html b/zh/docs/sections/index.html index 2698ae88f..fceadb1e5 100644 --- a/zh/docs/sections/index.html +++ b/zh/docs/sections/index.html @@ -5,7 +5,7 @@ 节与小节 | Touying - + diff --git a/zh/docs/start/index.html b/zh/docs/start/index.html index 9329de661..3463031f8 100644 --- a/zh/docs/start/index.html +++ b/zh/docs/start/index.html @@ -5,7 +5,7 @@ 开始 | Touying - + diff --git a/zh/docs/themes/aqua/index.html b/zh/docs/themes/aqua/index.html index a4d6dc9f2..8ab5bee8a 100644 --- a/zh/docs/themes/aqua/index.html +++ b/zh/docs/themes/aqua/index.html @@ -5,7 +5,7 @@ Aqua 主题 | Touying - + diff --git a/zh/docs/themes/dewdrop/index.html b/zh/docs/themes/dewdrop/index.html index 1bcaa1af0..7ee9d3435 100644 --- a/zh/docs/themes/dewdrop/index.html +++ b/zh/docs/themes/dewdrop/index.html @@ -5,7 +5,7 @@ Dewdrop 主题 | Touying - + diff --git a/zh/docs/themes/metropolis/index.html b/zh/docs/themes/metropolis/index.html index b62c7c21c..67d4ce629 100644 --- a/zh/docs/themes/metropolis/index.html +++ b/zh/docs/themes/metropolis/index.html @@ -5,7 +5,7 @@ Metropolis 主题 | Touying - + diff --git a/zh/docs/themes/simple/index.html b/zh/docs/themes/simple/index.html index f522ba9ec..1ec1ac9b1 100644 --- a/zh/docs/themes/simple/index.html +++ b/zh/docs/themes/simple/index.html @@ -5,7 +5,7 @@ Simple 主题 | Touying - + diff --git a/zh/docs/themes/university/index.html b/zh/docs/themes/university/index.html index e7cb8d0d0..c81d306ec 100644 --- a/zh/docs/themes/university/index.html +++ b/zh/docs/themes/university/index.html @@ -5,7 +5,7 @@ University 主题 | Touying - + diff --git a/zh/docs/utilities/fit-to/index.html b/zh/docs/utilities/fit-to/index.html index fff45738a..7f6b7d84d 100644 --- a/zh/docs/utilities/fit-to/index.html +++ b/zh/docs/utilities/fit-to/index.html @@ -5,7 +5,7 @@ Fit to height / width | Touying - + diff --git a/zh/docs/utilities/oop/index.html b/zh/docs/utilities/oop/index.html index b8239f497..d3a0c65b1 100644 --- a/zh/docs/utilities/oop/index.html +++ b/zh/docs/utilities/oop/index.html @@ -5,7 +5,7 @@ 面向对象编程 | Touying - + diff --git a/zh/index.html b/zh/index.html index f1f2895b6..3900b8c43 100644 --- a/zh/index.html +++ b/zh/index.html @@ -5,7 +5,7 @@ Touying in Typst | Touying - + diff --git a/zh/markdown-page/index.html b/zh/markdown-page/index.html index df2295d4e..9dc939dda 100644 --- a/zh/markdown-page/index.html +++ b/zh/markdown-page/index.html @@ -5,7 +5,7 @@ Markdown page example | Touying - +