PageSourceSearch

https://touying-typ.github.io/assets/js/087080a7.4f46ed13.js

js touying-typ.github.io collected 2026-10-03 10:06:33 UTC 5,574 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1727],{18975:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>s,default:()=>u,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var i=t(85893),r=t(11151);const o={sidebar_position:36,description:"Touying can integrate with mitex to display math equations.",toc_max_heading_level:2},s="touying-mitex",c={id:"reference/core/touying-mitex",title:"touying-mitex",description:"Touying can integrate with mitex to display math equations.",source:"@site/docs/reference/core/touying-mitex.mdx",sourceDirName:"reference/core",slug:"/reference/core/touying-mitex",permalink:"/docs/reference/core/touying-mitex",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:36,frontMatter:{sidebar_position:36,description:"Touying can integrate with mitex to display math equations.",toc_max_heading_level:2},sidebar:"tutorialSidebar",previous:{title:"touying-equation",permalink:"/docs/reference/core/touying-equation"},next:{title:"touying-raw",permalink:"/docs/reference/core/touying-raw"}},a={},l=[{value:"mitex : <TypeLink></TypeLink>",id:"mitex",level:3},{value:"block : <TypeLink></TypeLink> <Default><code>true</code></Default>",id:"block",level:3},{value:"numbering : <TypeLink></TypeLink> | <TypeLink></TypeLink> <Default><code>none</code></Default>",id:"numbering",level:3},{value:"supplement : <TypeLink></TypeLink> | <TypeLink></TypeLink> <Default><code>auto</code></Default>",id:"supplement",level:3},{value:"body : <TypeLink></TypeLink> | <TypeLink></TypeLink> | <TypeLink></TypeLink>",id:"body",level:3}];function d(e){const n={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,r.a)(),...e.components},{Default:t,Param:o,Parameters:s,Signature:c,SignatureName:a,SignatureParam:l,SourceLink:d,TypeLink:u}=n;return t||x("Default",!0),o||x("Param",!0),s||x("Parameters",!0),c||x("Signature",!0),a||x("SignatureName",!0),l||x("SignatureParam",!0),d||x("SourceLink",!0),u||x("TypeLink",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"touying-mitex",children:"touying-mitex"}),"\n",(0,i.jsx)(c,{children:(0,i.jsxs)("code",{children:[(0,i.jsx)(a,{children:"touying-mitex"}),"(",(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#block",children:"block: true"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#numbering",children:"numbering: none"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#supplement",children:"supplement: auto"}),", "]}),(0,i.jsxs)(l,{children:[(0,i.jsx)(n.a,{href:"#mitex",children:"mitex"}),", "]}),(0,i.jsx)(l,{children:(0,i.jsx)(n.a,{href:"#body",children:"body"})}),")",(0,i.jsx)(d,{href:"https://github.com/touying-typ/touying/blob/main/src/core.typ#L2620"})]})}),"\n",(0,i.jsxs)(n.p,{children:["Touying can integrate with ",(0,i.jsx)(n.code,{children:"mitex"})," to display math equations.\nYou can use ",(0,i.jsx)(n.code,{children:"#touying-mitex"})," to display math equations with pause and meanwhile."]}),"\n",(0,i.jsx)(n.p,{children:"Example:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typst",children:"#touying-mitex(mitex, `\n  f(x) &= \\pause x^2 + 2x + 1  \\\\\n      &= \\pause (x + 1)^2  \\\\\n`)\n"})}),"\n",(0,i.jsxs)(s,{children:[(0,i.jsxs)(n.h3,{id:"mitex",children:["mitex : ",(0,i.jsx)(u,{type:"function"})]}),(0,i.jsx)(o,{children:(0,i.jsxs)(n.p,{children:["The mitex function. You can import it by code like ",(0,i.jsx)(n.code,{children:'#import "@preview/mitex:0.2.6": mitex'}),"."]})}),(0,i.jsxs)(n.h3,{id:"block",children:["block : ",(0,i.jsx)(u,{type:"bool"})," ",(0,i.jsx)(t,{children:(0,i.jsx)(n.code,{children:"true"})})]}),(0,i.jsx)(o,{children:(0,i.jsxs)(n.p,{children:["Whether the equation is a block element. Default is ",(0,i.jsx)(n.code,{children:"true"}),"."]})}),(0,i.jsxs)(n.h3,{id:"numbering",children:["numbering : ",(0,i.jsx)(u,{type:"none"})," | ",(0,i.jsx)(u,{type:"str"})," ",(0,i.jsx)(t,{children:(0,i.jsx)(n.code,{children:"none"})})]}),(0,i.jsx)(o,{children:(0,i.jsxs)(n.p,{children:["The numbering of the equation. Default is ",(0,i.jsx)(n.code,{children:"none"}),"."]})}),(0,i.jsxs)(n.h3,{id:"supplement",children:["supplement : ",(0,i.jsx)(u,{type:"auto"})," | ",(0,i.jsx)(u,{type:"str"})," ",(0,i.jsx)(t,{children:(0,i.jsx)(n.code,{children:"auto"})})]}),(0,i.jsx)(o,{children:(0,i.jsxs)(n.p,{children:["The supplement of the equation. Default is ",(0,i.jsx)(n.code,{children:"auto"}),"."]})}),(0,i.jsxs)(n.h3,{id:"body",children:["body : ",(0,i.jsx)(u,{type:"string"})," | ",(0,i.jsx)(u,{type:"content"})," | ",(0,i.jsx)(u,{type:"function"})]}),(0,i.jsx)(o,{children:(0,i.jsxs)(n.p,{children:["The content of the equation. It should be a string, a raw text, or a function that receives ",(0,i.jsx)(n.code,{children:"self"})," as an argument and returns a string."]})})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns:"})," ",(0,i.jsx)(u,{type:"content"})]})]})}function u(e={}){const{wrapper:n}={...(0,r.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}function x(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:()=>c,a:()=>s});var i=t(67294);const r={},o=i.createContext(r);function s(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(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.