PageSourceSearch

https://touying-typ.github.io/assets/js/1aa21655.84f4cec4.js

js touying-typ.github.io collected 2026-10-03 10:07:42 UTC 6,645 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4430],{40589:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>c,toc:()=>l});var i=o(85893),n=o(11151);const s={sidebar_position:1,description:"Default slide function for the presentation.",toc_max_heading_level:2},r="slide",c={id:"reference/themes/dewdrop/slide",title:"slide",description:"Default slide function for the presentation.",source:"@site/docs/reference/themes/dewdrop/slide.mdx",sourceDirName:"reference/themes/dewdrop",slug:"/reference/themes/dewdrop/slide",permalink:"/docs/reference/themes/dewdrop/slide",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,description:"Default slide function for the presentation.",toc_max_heading_level:2},sidebar:"tutorialSidebar",previous:{title:"Dewdrop",permalink:"/docs/category/dewdrop"},next:{title:"title-slide",permalink:"/docs/reference/themes/dewdrop/title-slide"}},d={},l=[{value:"config : <TypeLink></TypeLink> <Default><code>(:)</code></Default>",id:"config",level:3},{value:"repeat : <TypeLink></TypeLink> | <TypeLink></TypeLink> <Default><code>auto</code></Default>",id:"repeat",level:3},{value:"setting : <TypeLink></TypeLink> <Default><code>body =&gt; body</code></Default>",id:"setting",level:3},{value:"composer : <TypeLink></TypeLink> | <TypeLink></TypeLink> <Default><code>auto</code></Default>",id:"composer",level:3},{value:"..bodies : <TypeLink></TypeLink>",id:"bodies",level:3}];function a(e){const t={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",...(0,n.a)(),...e.components},{Default:o,Param:s,Parameters:r,Signature:c,SignatureName:d,SignatureParam:l,SourceLink:a,TypeLink:h}=t;return o||u("Default",!0),s||u("Param",!0),r||u("Parameters",!0),c||u("Signature",!0),d||u("SignatureName",!0),l||u("SignatureParam",!0),a||u("SourceLink",!0),h||u("TypeLink",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"slide",children:"slide"}),"\n",(0,i.jsx)(c,{children:(0,i.jsxs)("code",{children:[(0,i.jsx)(d,{children:"slide"}),"(",(0,i.jsxs)(l,{children:[(0,i.jsx)(t.a,{href:"#config",children:"config: (:)"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(t.a,{href:"#repeat",children:"repeat: auto"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(t.a,{href:"#setting",children:"setting: body => body"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(t.a,{href:"#composer",children:"composer: auto"}),", "]}),(0,i.jsx)(l,{children:(0,i.jsx)(t.a,{href:"#bodies",children:"..bodies"})}),")",(0,i.jsx)(a,{href:"https://github.com/touying-typ/touying/blob/main/themes/dewdrop.typ#L94"})]})}),"\n",(0,i.jsx)(t.p,{children:"Default slide function for the presentation."}),"\n",(0,i.jsxs)(r,{children:[(0,i.jsxs)(t.h3,{id:"config",children:["config : ",(0,i.jsx)(h,{type:"dictionary"})," ",(0,i.jsx)(o,{children:(0,i.jsx)(t.code,{children:"(:)"})})]}),(0,i.jsx)(s,{children:(0,i.jsxs)(t.p,{children:["The configuration of the slide. You can use ",(0,i.jsx)(t.code,{children:"config-xxx"})," to set the configuration of the slide. For more several configurations, you can use ",(0,i.jsx)(t.code,{children:"utils.merge-dicts"})," to merge them."]})}),(0,i.jsxs)(t.h3,{id:"repeat",children:["repeat : ",(0,i.jsx)(h,{type:"int"})," | ",(0,i.jsx)(h,{type:"auto"})," ",(0,i.jsx)(o,{children:(0,i.jsx)(t.code,{children:"auto"})})]}),(0,i.jsx)(s,{children:(0,i.jsxs)(t.p,{children:["The number of subslides. Default is ",(0,i.jsx)(t.code,{children:"auto"}),", which means touying will automatically calculate the number of subslides. The ",(0,i.jsx)(t.code,{children:"repeat"})," argument is necessary when you use ",(0,i.jsx)(t.code,{children:"#slide(repeat: 3, self => [ .. ])"})," style code to create a slide. The callback-style ",(0,i.jsx)(t.code,{children:"uncover"})," and ",(0,i.jsx)(t.code,{children:"only"})," cannot be detected by touying automatically."]})}),(0,i.jsxs)(t.h3,{id:"setting",children:["setting : ",(0,i.jsx)(h,{type:"function"})," ",(0,i.jsx)(o,{children:(0,i.jsx)(t.code,{children:"body => body"})})]}),(0,i.jsx)(s,{children:(0,i.jsx)(t.p,{children:"The setting of the slide. You can use it to add some set/show rules for the slide."})}),(0,i.jsxs)(t.h3,{id:"composer",children:["composer : ",(0,i.jsx)(h,{type:"function"})," | ",(0,i.jsx)(h,{type:"array"})," ",(0,i.jsx)(o,{children:(0,i.jsx)(t.code,{children:"auto"})})]}),(0,i.jsx)(s,{children:(0,i.jsxs)(t.p,{children:["The composer of the slide. You can use it to set the layout of the slide. For example, ",(0,i.jsx)(t.code,{children:"#slide(composer: (1fr, 2fr, 1fr))[A][B][C]"})," to split the slide into three parts. The first and the last parts will take 1/4 of the slide, and the second part will take 1/2 of the slide. If you pass a non-function value like ",(0,i.jsx)(t.code,{children:"(1fr, 2fr, 1fr)"}),", it will be assumed to be the first argument of the ",(0,i.jsx)(t.code,{children:"cols"})," function. The ",(0,i.jsx)(t.code,{children:"cols"})," function is a simple wrapper of the ",(0,i.jsx)(t.code,{children:"grid"})," function. It means you can use the ",(0,i.jsx)(t.code,{children:"grid.cell(colspan: 2, ..)"})," to make the cell take 2 columns. For example, ",(0,i.jsx)(t.code,{children:"#slide(composer: 2)[A][B][#grid.cell(colspan: 2)[Footer]]"})," will make the ",(0,i.jsx)(t.code,{children:"Footer"})," cell take 2 columns. If you want to customize the composer, you can pass a function to the ",(0,i.jsx)(t.code,{children:"composer"})," argument. The function should receive the contents of the slide and return the content of the slide, like ",(0,i.jsx)(t.code,{children:"#slide(composer: grid.with(columns: 2))[A][B]"}),"."]})}),(0,i.jsxs)(t.h3,{id:"bodies",children:["..bodies : ",(0,i.jsx)(h,{type:"array"})]}),(0,i.jsx)(s,{children:(0,i.jsxs)(t.p,{children:["The contents of the slide. You can call the ",(0,i.jsx)(t.code,{children:"slide"})," function with syntax like ",(0,i.jsx)(t.code,{children:"#slide[A][B][C]"})," to create a slide."]})})]})]})}function h(e={}){const{wrapper:t}={...(0,n.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}function u(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},11151:(e,t,o)=>{o.d(t,{Z:()=>c,a:()=>r});var i=o(67294);const n={},s=i.createContext(n);function r(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.