@drghaliasri/butex 7.4.0 → 7.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/document2.js.map +1 -1
- package/dist/document2.mjs.map +1 -1
- package/dist/index.global.js +24 -9
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +24 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -9
- package/dist/index.mjs.map +1 -1
- package/dist/react-document.js +5 -2
- package/dist/react-document.js.map +1 -1
- package/dist/react-document.mjs +5 -2
- package/dist/react-document.mjs.map +1 -1
- package/dist/react-document2-preview.js.map +1 -1
- package/dist/react-document2-preview.mjs.map +1 -1
- package/dist/react-document2.js +5 -2
- package/dist/react-document2.js.map +1 -1
- package/dist/react-document2.mjs +5 -2
- package/dist/react-document2.mjs.map +1 -1
- package/dist/react.js +5 -2
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +5 -2
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ Peer dependency: `mathjax` ^4.x (aligned with MathJax 4 components). If you use
|
|
|
61
61
|
2. Load BuTeX’s IIFE bundle (`dist/index.global.js` exposes global `BuTeX`).
|
|
62
62
|
3. In `MathJax.startup.ready`, call `BuTeX.registerBuTeX(MathJax)` before `MathJax.startup.defaultReady()`.
|
|
63
63
|
4. Inject styles once: `BuTeX.injectBuTeXStyles()` (or embed `BuTeX.BUTEX_CHROME_CSS` yourself).
|
|
64
|
-
5. When using **SVG** (`tex-svg.js`), call `BuTeX.registerBuTeXSvgTextWrapper(MathJax)` **after** `defaultReady()` so Takween/Diwani/Maghribi text, `\ad`, and Arabic atomic commands (`\arsin`, etc.) render in the preview
|
|
64
|
+
5. When using **SVG** (`tex-svg.js`), call `BuTeX.registerBuTeXSvgTextWrapper(MathJax)` **after** `defaultReady()` so Takween/Diwani/Maghribi text, RTL multiword `\unit{وحدة تجريبية}` displays, `\ad`, and Arabic atomic commands (`\arsin`, etc.) render correctly in the preview. SVG units use one upright, RTL-isolated text element; neither the unit identity nor the stored notation is reversed. CommonHTML (`tex-chtml.js`) uses the injected CSS classes instead.
|
|
65
65
|
6. Render math with `renderBuTeXMathIsland(tex, options?)` or mount into a host element via `mountBuTeXMathIsland(host, tex, options?)`. Pass `output: 'svg'` when the host loads `tex-svg.js`, or `output: 'chtml'` with `tex-chtml.js`. For raw Arabic TeX that did not come from the editor AST, pass `mirrorOperators: true` to wrap directional operators according to BuTeX's shared operator table. `ButexEditor` picks SVG vs CHTML automatically from the loaded MathJax bundle (`tex2svg` vs `tex2chtml`).
|
|
66
66
|
|
|
67
67
|
Ensure TeX `packages` includes `butex-arabic-math` (use `BUTEX_TEX_PACKAGE` in config when using `{ '[+]': [...] }`). BuTeX registers lightweight browser compatibility macros for toolbar symbols such as `\coloneqq` and `\eqqcolon`; XeLaTeX export still relies on the document preamble's `mathtools`.
|