1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1816],{46028:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>o,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var n=s(85893),i=s(11151);const r={sidebar_position:46,description:"#alternatives is able to show contents sequentially in subslides.",toc_max_heading_level:2},a="alternatives",l={id:"reference/utils/alternatives",title:"alternatives",description:"#alternatives is able to show contents sequentially in subslides.",source:"@site/docs/reference/utils/alternatives.mdx",sourceDirName:"reference/utils",slug:"/reference/utils/alternatives",permalink:"/docs/reference/utils/alternatives",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:46,frontMatter:{sidebar_position:46,description:"#alternatives is able to show contents sequentially in subslides.",toc_max_heading_level:2},sidebar:"tutorialSidebar",previous:{title:"alternatives-match",permalink:"/docs/reference/utils/alternatives-match"},next:{title:"alternatives-fn",permalink:"/docs/reference/utils/alternatives-fn"}},o={},c=[{value:"start : <TypeLink></TypeLink> <Default><code>1</code></Default>",id:"start",level:3},{value:"repeat-last : <TypeLink></TypeLink> <Default><code>true</code></Default>",id:"repeat-last",level:3},{value:"position : <TypeLink></TypeLink>",id:"position",level:3},{value:"stretch : <TypeLink></TypeLink>",id:"stretch",level:3}];function d(e){const t={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",strong:"strong",...(0,i.a)(),...e.components},{Default:s,Param:r,Parameters:a,Signature:l,SignatureName:o,SignatureParam:c,SourceLink:d,TypeLink:h}=t;return s||u("Default",!0),r||u("Param",!0),a||u("Parameters",!0),l||u("Signature",!0),o||u("SignatureName",!0),c||u("SignatureParam",!0),d||u("SourceLink",!0),h||u("TypeLink",!0),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"alternatives",children:"alternatives"}),"\n",(0,n.jsx)(l,{children:(0,n.jsxs)("code",{children:[(0,n.jsx)(o,{children:"alternatives"}),"(",(0,n.jsxs)(c,{children:[(0,n.jsx)(t.a,{href:"#self",children:"self: none"}),", "]}),(0,n.jsxs)(c,{children:[(0,n.jsx)(t.a,{href:"#start",children:"start: 1"}),", "]}),(0,n.jsxs)(c,{children:[(0,n.jsx)(t.a,{href:"#repeat-last",children:"repeat-last: true"}),", "]}),(0,n.jsx)(c,{children:(0,n.jsx)(t.a,{href:"#args",children:"..args"})}),")",(0,n.jsx)(d,{href:"https://github.com/touying-typ/touying/blob/main/src/utils.typ#L2351"})]})}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"#alternatives"})," is able to show contents sequentially in subslides."]}),"\n",(0,n.jsxs)(t.p,{children:["Example: ",(0,n.jsx)(t.code,{children:"#alternatives[Ann][Bob][Christopher]"}),' will show "Ann" in the first subslide, "Bob" in the second subslide, and "Christopher" in the third subslide.']}),"\n",(0,n.jsxs)(a,{children:[(0,n.jsxs)(t.h3,{id:"start",children:["start : ",(0,n.jsx)(h,{type:"int"})," ",(0,n.jsx)(s,{children:(0,n.jsx)(t.code,{children:"1"})})]}),(0,n.jsx)(r,{children:(0,n.jsxs)(t.p,{children:["The starting subslide number. Default is ",(0,n.jsx)(t.code,{children:"1"}),"."]})}),(0,n.jsxs)(t.h3,{id:"repeat-last",children:["repeat-last : ",(0,n.jsx)(h,{type:"bool"})," ",(0,n.jsx)(s,{children:(0,n.jsx)(t.code,{children:"true"})})]}),(0,n.jsx)(r,{children:(0,n.jsxs)(t.p,{children:["Whether the last alternative should persist on all remaining subslides. Default is ",(0,n.jsx)(t.code,{children:"true"}),"."]})}),(0,n.jsxs)(t.h3,{id:"position",children:["position : ",(0,n.jsx)(h,{type:"alignment"})]}),(0,n.jsx)(r,{children:(0,n.jsxs)(t.p,{children:["The alignment of alternatives within the reserved space. Default is ",(0,n.jsx)(t.code,{children:"bottom + left"}),"."]})}),(0,n.jsxs)(t.h3,{id:"stretch",children:["stretch : ",(0,n.jsx)(h,{type:"bool"})]}),(0,n.jsx)(r,{children:(0,n.jsxs)(t.p,{children:["Whether to stretch all alternatives to the maximum width and height. Default is ",(0,n.jsx)(t.code,{children:"false"}),". Important: If you use a zero-length content like a context expression, you should set ",(0,n.jsx)(t.code,{children:"stretch: false"}),"."]})})]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Returns:"})," ",(0,n.jsx)(h,{type:"content"})]})]})}function h(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(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,s)=>{s.d(t,{Z:()=>l,a:()=>a});var n=s(67294);const i={},r=n.createContext(i);function a(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),n.createElement(r.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.