PageSourceSearch

https://touying-typ.github.io/assets/js/debd2b06.54baad56.js

js touying-typ.github.io collected 2026-10-03 10:05:50 UTC 9,253 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[33],{26661:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>d,frontMatter:()=>o,metadata:()=>r,toc:()=>h});var i=t(85893),s=t(11151);const o={sidebar_position:3,description:"The configuration of the methods.",toc_max_heading_level:2},c="config-methods",r={id:"reference/configs/config-methods",title:"config-methods",description:"The configuration of the methods.",source:"@site/docs/reference/configs/config-methods.mdx",sourceDirName:"reference/configs",slug:"/reference/configs/config-methods",permalink:"/docs/reference/configs/config-methods",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3,description:"The configuration of the methods.",toc_max_heading_level:2},sidebar:"tutorialSidebar",previous:{title:"config-common",permalink:"/docs/reference/configs/config-common"},next:{title:"config-info",permalink:"/docs/reference/configs/config-info"}},l={},h=[{value:"init : <TypeLink></TypeLink>",id:"init",level:3},{value:"cover : <TypeLink></TypeLink>",id:"cover",level:3},{value:"uncover : <TypeLink></TypeLink>",id:"uncover",level:3},{value:"only : <TypeLink></TypeLink>",id:"only",level:3},{value:"effect : <TypeLink></TypeLink>",id:"effect",level:3},{value:"alternatives-match : <TypeLink></TypeLink>",id:"alternatives-match",level:3},{value:"alternatives : <TypeLink></TypeLink>",id:"alternatives",level:3},{value:"alternatives-fn : <TypeLink></TypeLink>",id:"alternatives-fn",level:3},{value:"alternatives-cases : <TypeLink></TypeLink>",id:"alternatives-cases",level:3},{value:"item-by-item : <TypeLink></TypeLink>",id:"item-by-item",level:3},{value:"alert : <TypeLink></TypeLink>",id:"alert",level:3},{value:"show-only-notes : <TypeLink></TypeLink>",id:"show-only-notes",level:3},{value:"convert-label-to-short-heading : <TypeLink></TypeLink>",id:"convert-label-to-short-heading",level:3}];function a(e){const n={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",strong:"strong",...(0,s.a)(),...e.components},{Param:t,Parameters:o,Signature:c,SignatureName:r,SignatureParam:l,SourceLink:h,TypeLink:a}=n;return t||u("Param",!0),o||u("Parameters",!0),c||u("Signature",!0),r||u("SignatureName",!0),l||u("SignatureParam",!0),h||u("SourceLink",!0),a||u("TypeLink",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"config-methods",children:"config-methods"}),"\n",(0,i.jsx)(c,{children:(0,i.jsxs)("code",{children:[(0,i.jsx)(r,{children:"config-methods"}),"(",(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#init",children:"init"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#cover",children:"cover"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#uncover",children:"uncover"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#only",children:"only"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#effect",children:"effect"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#alternatives-match",children:"alternatives-match"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#alternatives",children:"alternatives"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#alternatives-fn",children:"alternatives-fn"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#alternatives-cases",children:"alternatives-cases"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#item-by-item",children:"item-by-item"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#alert",children:"alert"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#show-only-notes",children:"show-only-notes"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#convert-label-to-short-heading",children:"convert-label-to-short-heading"}),", "]}),(0,i.jsx)(l,{children:(0,i.jsx)(n.a,{href:"#args",children:"..args"})}),")",(0,i.jsx)(h,{href:"https://github.com/touying-typ/touying/blob/main/src/configs.typ#L461"})]})}),"\n",(0,i.jsx)(n.p,{children:"The configuration of the methods."}),"\n",(0,i.jsxs)(o,{children:[(0,i.jsxs)(n.h3,{id:"init",children:["init : ",(0,i.jsx)(a,{type:"function"})]}),(0,i.jsx)(t,{children:(0,i.jsxs)(n.p,{children:["The function to initialize the presentation. It should be ",(0,i.jsx)(n.code,{children:"(self: none, body) => { .. }"}),"."]})}),(0,i.jsxs)(n.h3,{id:"cover",children:["cover : ",(0,i.jsx)(a,{type:"function"})]}),(0,i.jsx)(t,{children:(0,i.jsxs)(n.p,{children:["The function to cover content. The default value is ",(0,i.jsx)(n.code,{children:"utils.method-wrapper(hide)"})," function. You can configure it with ",(0,i.jsx)(n.code,{children:"cover: utils.semi-transparent-cover"})," to use the semi-transparent cover."]})}),(0,i.jsxs)(n.h3,{id:"uncover",children:["uncover : ",(0,i.jsx)(a,{type:"function"})]}),(0,i.jsx)(t,{children:(0,i.jsxs)(n.p,{children:["The function to uncover content. The default value is ",(0,i.jsx)(n.code,{children:"utils.uncover"})," function."]})}),(0,i.jsxs)(n.h3,{id:"only",children:["only : ",(0,i.jsx)(a,{type:"function"})]}),(0,i.jsx)(t,{children:(0,i.jsxs)(n.p,{children:["The function to show only the content. The default value is ",(0,i.jsx)(n.code,{children:"utils.only"})," function."]})}),(0,i.jsxs)(n.h3,{id:"effect",children:["effect : ",(0,i.jsx)(a,{type:"function"})]}),(0,i.jsx)(t,{children:(0,i.jsxs)(n.p,{children:["The function to add effect to the content. The default value is ",(0,i.jsx)(n.code,{children:"utils.effect"}),"."]})}),(0,i.jsxs)(n.h3,{id:"alternatives-match",children:["alternatives-match : ",(0,i.jsx)(a,{type:"function"})]}),(0,i.jsx)(t,{children:(0,i.jsxs)(n.p,{children:["The function to match alternatives. The default value is ",(0,i.jsx)(n.code,{children:"utils.alternatives-match"})," function."]})}),(0,i.jsxs)(n.h3,{id:"alternatives",children:["alternatives : ",(0,i.jsx)(a,{type:"function"})]}),(0,i.jsx)(t,{children:(0,i.jsxs)(n.p,{children:["The function to show alternatives. The default value is ",(0,i.jsx)(n.code,{children:"utils.alternatives"})," function."]})}),(0,i.jsxs)(n.h3,{id:"alternatives-fn",children:["alternatives-fn : ",(0,i.jsx)(a,{type:"function"})]}),(0,i.jsx)(t,{children:(0,i.jsxs)(n.p,{children:["The function to show alternatives with a function. The default value is ",(0,i.jsx)(n.code,{children:"utils.alternatives-fn"})," function."]})}),(0,i.jsxs)(n.h3,{id:"alternatives-cases",children:["alternatives-cases : ",(0,i.jsx)(a,{type:"function"})]}),(0,i.jsx)(t,{children:(0,i.jsxs)(n.p,{children:["The function to show alternatives with cases. The default value is ",(0,i.jsx)(n.code,{children:"utils.alternatives-cases"})," function."]})}),(0,i.jsxs)(n.h3,{id:"item-by-item",children:["item-by-item : ",(0,i.jsx)(a,{type:"function"})]}),(0,i.jsx)(t,{children:(0,i.jsxs)(n.p,{children:["The function to show items one by one. The default value is ",(0,i.jsx)(n.code,{children:"utils.item-by-item"})," function."]})}),(0,i.jsxs)(n.h3,{id:"alert",children:["alert : ",(0,i.jsx)(a,{type:"function"})]}),(0,i.jsx)(t,{children:(0,i.jsxs)(n.p,{children:["The function to alert the content. The default value is ",(0,i.jsx)(n.code,{children:'utils.method-wrapper(text.with(weight: "bold"))'})," function."]})}),(0,i.jsxs)(n.h3,{id:"show-only-notes",children:["show-only-notes : ",(0,i.jsx)(a,{type:"function"})]}),(0,i.jsx)(t,{children:(0,i.jsxs)(n.p,{children:["The function used to render speaker notes, either as the primary content (",(0,i.jsx)(n.code,{children:"show-only-notes: true"})," mode) or on a second screen. It should accept ",(0,i.jsx)(n.code,{children:"(self: none, width: 0pt, height: 0pt, cutout: false)"}),". When ",(0,i.jsx)(n.code,{children:"cutout: true"}),", return a dictionary with ",(0,i.jsx)(n.code,{children:"background"}),", ",(0,i.jsx)(n.code,{children:"foreground"}),", and ",(0,i.jsx)(n.code,{children:"cutout-height"})," keys."]})}),(0,i.jsxs)(n.h3,{id:"convert-label-to-short-heading",children:["convert-label-to-short-heading : ",(0,i.jsx)(a,{type:"function"})]}),(0,i.jsx)(t,{children:(0,i.jsxs)(n.p,{children:["The function to convert label to short heading. It is useful for the short heading for heading with label. It will be used in function with ",(0,i.jsx)(n.code,{children:"short-heading"}),". The default value is ",(0,i.jsx)(n.code,{children:'utils.titlecase(lbl.replace(regex("^[^:]*:"), "").replace("_", " ").replace("-", " "))'}),". It means that some headings with labels like ",(0,i.jsx)(n.code,{children:"section:my-section"})," will be converted to ",(0,i.jsx)(n.code,{children:"My Section"}),"."]})})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns:"})," ",(0,i.jsx)(a,{type:"dictionary"})]})]})}function d(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}function u(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},11151:(e,n,t)=>{t.d(n,{Z:()=>r,a:()=>c});var i=t(67294);const s={},o=i.createContext(s);function c(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),i.createElement(o.Provider,{value:n},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.