PageSourceSearch

https://touying-typ.github.io/assets/js/7c6c66c2.dd6d3f9e.js

js touying-typ.github.io collected 2026-10-03 10:08:13 UTC 4,385 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5855],{88691:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var i=s(85893),t=s(11151);const o={sidebar_position:20,description:"Display content in some subslides only.",toc_max_heading_level:2},r="only",l={id:"reference/core/only",title:"only",description:"Display content in some subslides only.",source:"@site/docs/reference/core/only.mdx",sourceDirName:"reference/core",slug:"/reference/core/only",permalink:"/docs/reference/core/only",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:20,frontMatter:{sidebar_position:20,description:"Display content in some subslides only.",toc_max_heading_level:2},sidebar:"tutorialSidebar",previous:{title:"uncover",permalink:"/docs/reference/core/uncover"},next:{title:"handout-only",permalink:"/docs/reference/core/handout-only"}},c={},d=[{value:"visible-subslides : <TypeLink></TypeLink> | <TypeLink></TypeLink> | <TypeLink></TypeLink> | <TypeLink></TypeLink> | <TypeLink></TypeLink>",id:"visible-subslides",level:3},{value:"only-cont : <TypeLink></TypeLink>",id:"only-cont",level:3}];function a(e){const n={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,t.a)(),...e.components},{Param:s,Parameters:o,Signature:r,SignatureName:l,SignatureParam:c,SourceLink:d,TypeLink:a}=n;return s||y("Param",!0),o||y("Parameters",!0),r||y("Signature",!0),l||y("SignatureName",!0),c||y("SignatureParam",!0),d||y("SourceLink",!0),a||y("TypeLink",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"only",children:"only"}),"\n",(0,i.jsx)(r,{children:(0,i.jsxs)("code",{children:[(0,i.jsx)(l,{children:"only"}),"(",(0,i.jsxs)(c,{children:[(0,i.jsx)(n.a,{href:"#visible-subslides",children:"visible-subslides"}),", "]}),(0,i.jsx)(c,{children:(0,i.jsx)(n.a,{href:"#only-cont",children:"only-cont"})}),")",(0,i.jsx)(d,{href:"https://github.com/touying-typ/touying/blob/main/src/core.typ#L1832"})]})}),"\n",(0,i.jsx)(n.p,{children:"Display content in some subslides only. No space is reserved when hidden."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Example:"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typst",children:'#show: simple-theme.with(aspect-ratio: "16-9")\n= Slide\n#only("2")[Only on subslide 2]\n'})}),"\n",(0,i.jsxs)(o,{children:[(0,i.jsxs)(n.h3,{id:"visible-subslides",children:["visible-subslides : ",(0,i.jsx)(a,{type:"int"})," | ",(0,i.jsx)(a,{type:"array"})," | ",(0,i.jsx)(a,{type:"str"})," | ",(0,i.jsx)(a,{type:"label"})," | ",(0,i.jsx)(a,{type:"dictionary"})]}),(0,i.jsx)(s,{children:(0,i.jsxs)(n.p,{children:["Specifies when content is visible. Supported formats: - A single integer, e.g. ",(0,i.jsx)(n.code,{children:"3"})," \u2014 only subslide 3. - An array, e.g. ",(0,i.jsx)(n.code,{children:"(1, 2, 4)"})," \u2014 equivalent to ",(0,i.jsx)(n.code,{children:'"1, 2, 4"'}),". - A string with ranges, e.g. ",(0,i.jsx)(n.code,{children:'"-2, 4, 6-8, 10-"'})," \u2014 subslides 1, 2, 4, 6, 7, 8, 10, and all after 10. - A label, e.g. ",(0,i.jsx)(n.code,{children:"<my-waypoint>"})," \u2014 creates an implicit waypoint and shows from there onward. - A waypoint marker, e.g. ",(0,i.jsx)(n.code,{children:"from-wp(<label>)"}),", ",(0,i.jsx)(n.code,{children:"until-wp(<label>)"}),", ",(0,i.jsx)(n.code,{children:"get-first(<label>)"}),", etc."]})}),(0,i.jsxs)(n.h3,{id:"only-cont",children:["only-cont : ",(0,i.jsx)(a,{type:"content"})]}),(0,i.jsx)(s,{children:(0,i.jsx)(n.p,{children:"The content to display when visible."})})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns:"})," ",(0,i.jsx)(a,{type:"content"})]})]})}function p(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}function y(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,s)=>{s.d(n,{Z:()=>l,a:()=>r});var i=s(67294);const t={},o=i.createContext(t);function r(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(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.