PageSourceSearch

https://touying-typ.github.io/assets/js/e32e5111.f29ff762.js

js touying-typ.github.io collected 2026-10-03 10:08:57 UTC 6,418 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7173],{9941:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>t,metadata:()=>o,toc:()=>d});var r=i(85893),s=i(11151);const t={sidebar_position:37,description:"Animated code block.",toc_max_heading_level:2},l="touying-raw",o={id:"reference/core/touying-raw",title:"touying-raw",description:"Animated code block.",source:"@site/docs/reference/core/touying-raw.mdx",sourceDirName:"reference/core",slug:"/reference/core/touying-raw",permalink:"/docs/reference/core/touying-raw",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:37,frontMatter:{sidebar_position:37,description:"Animated code block.",toc_max_heading_level:2},sidebar:"tutorialSidebar",previous:{title:"touying-mitex",permalink:"/docs/reference/core/touying-mitex"},next:{title:"touying-reducer",permalink:"/docs/reference/core/touying-reducer"}},c={},d=[{value:"block : <TypeLink></TypeLink> <Default><code>true</code></Default>",id:"block",level:3},{value:"lang : <TypeLink></TypeLink> | <TypeLink></TypeLink> <Default><code>none</code></Default>",id:"lang",level:3},{value:"fill-empty-lines : <TypeLink></TypeLink> <Default><code>true</code></Default>",id:"fill-empty-lines",level:3},{value:"simple : <TypeLink></TypeLink> <Default><code>false</code></Default>",id:"simple",level:3},{value:"body : <TypeLink></TypeLink> | <TypeLink></TypeLink> | <TypeLink></TypeLink>",id:"body",level:3}];function a(e){const n={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,s.a)(),...e.components},{Default:i,Param:t,Parameters:l,Signature:o,SignatureName:c,SignatureParam:d,SourceLink:a,TypeLink:h}=n;return i||u("Default",!0),t||u("Param",!0),l||u("Parameters",!0),o||u("Signature",!0),c||u("SignatureName",!0),d||u("SignatureParam",!0),a||u("SourceLink",!0),h||u("TypeLink",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"touying-raw",children:"touying-raw"}),"\n",(0,r.jsx)(o,{children:(0,r.jsxs)("code",{children:[(0,r.jsx)(c,{children:"touying-raw"}),"(",(0,r.jsxs)(d,{children:[(0,r.jsx)(n.a,{href:"#block",children:"block: true"}),", "]}),(0,r.jsxs)(d,{children:[(0,r.jsx)(n.a,{href:"#lang",children:"lang: none"}),", "]}),(0,r.jsxs)(d,{children:[(0,r.jsx)(n.a,{href:"#fill-empty-lines",children:"fill-empty-lines: true"}),", "]}),(0,r.jsxs)(d,{children:[(0,r.jsx)(n.a,{href:"#simple",children:"simple: false"}),", "]}),(0,r.jsx)(d,{children:(0,r.jsx)(n.a,{href:"#body",children:"body"})}),")",(0,r.jsx)(a,{href:"https://github.com/touying-typ/touying/blob/main/src/core.typ#L2684"})]})}),"\n",(0,r.jsxs)(n.p,{children:["Animated code block. Use a comment-style ",(0,r.jsx)(n.code,{children:"pause"})," or ",(0,r.jsx)(n.code,{children:"meanwhile"})," on its own line to insert animation markers."]}),"\n",(0,r.jsxs)(n.p,{children:["A line is treated as a ",(0,r.jsx)(n.code,{children:"pause"})," or ",(0,r.jsx)(n.code,{children:"meanwhile"}),' marker when its only\nmeaningful characters (letters, digits, CJK) exactly spell "pause" or\n"meanwhile". For example, ',(0,r.jsx)(n.code,{children:"// pause"}),", ",(0,r.jsx)(n.code,{children:"# pause"}),", and ",(0,r.jsx)(n.code,{children:"#pause"})," are all\nvalid markers, while ",(0,r.jsx)(n.code,{children:"pause = 1"})," or ",(0,r.jsx)(n.code,{children:"def pause():"})," are not."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example:"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typst",children:'#show: simple-theme.with(aspect-ratio: "16-9")\n= Slide\n#touying-raw(```rust\nfn main() {\n// pause\nprintln!("Hello, world!");\n}\n```)\n'})}),"\n",(0,r.jsxs)(l,{children:[(0,r.jsxs)(n.h3,{id:"block",children:["block : ",(0,r.jsx)(h,{type:"bool"})," ",(0,r.jsx)(i,{children:(0,r.jsx)(n.code,{children:"true"})})]}),(0,r.jsx)(t,{children:(0,r.jsxs)(n.p,{children:["Whether the raw block is a block element. Default is ",(0,r.jsx)(n.code,{children:"true"}),"."]})}),(0,r.jsxs)(n.h3,{id:"lang",children:["lang : ",(0,r.jsx)(h,{type:"none"})," | ",(0,r.jsx)(h,{type:"str"})," ",(0,r.jsx)(i,{children:(0,r.jsx)(n.code,{children:"none"})})]}),(0,r.jsx)(t,{children:(0,r.jsxs)(n.p,{children:["The language for syntax highlighting. When ",(0,r.jsx)(n.code,{children:"none"}),", the language is inferred from the raw block body if possible. Default is ",(0,r.jsx)(n.code,{children:"none"}),"."]})}),(0,r.jsxs)(n.h3,{id:"fill-empty-lines",children:["fill-empty-lines : ",(0,r.jsx)(h,{type:"bool"})," ",(0,r.jsx)(i,{children:(0,r.jsx)(n.code,{children:"true"})})]}),(0,r.jsx)(t,{children:(0,r.jsxs)(n.p,{children:["Whether to replace hidden lines with empty lines to preserve the layout of visible lines. Default is ",(0,r.jsx)(n.code,{children:"true"}),"."]})}),(0,r.jsxs)(n.h3,{id:"simple",children:["simple : ",(0,r.jsx)(h,{type:"bool"})," ",(0,r.jsx)(i,{children:(0,r.jsx)(n.code,{children:"false"})})]}),(0,r.jsx)(t,{children:(0,r.jsxs)(n.p,{children:["When ",(0,r.jsx)(n.code,{children:"true"}),", use ",(0,r.jsx)(n.code,{children:"#pause;"})," and ",(0,r.jsx)(n.code,{children:"#meanwhile;"})," as direct split markers (similar to how ",(0,r.jsx)(n.code,{children:"touying-mitex"})," uses ",(0,r.jsx)(n.code,{children:"\\pause"}),"). Default is ",(0,r.jsx)(n.code,{children:"false"}),"."]})}),(0,r.jsxs)(n.h3,{id:"body",children:["body : ",(0,r.jsx)(h,{type:"str"})," | ",(0,r.jsx)(h,{type:"content"})," | ",(0,r.jsx)(h,{type:"function"})]}),(0,r.jsx)(t,{children:(0,r.jsxs)(n.p,{children:["The raw code content. Can be a raw block, a string, or a function receiving ",(0,r.jsx)(n.code,{children:"self"})," as an argument."]})})]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns:"})," ",(0,r.jsx)(h,{type:"content"})]})]})}function h(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.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,i)=>{i.d(n,{Z:()=>o,a:()=>l});var r=i(67294);const s={},t=r.createContext(s);function l(e){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),r.createElement(t.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.