docs(linalg): formula-doc design and F1 display auto-simplify

Lock the run-implies-correct authoring model, default-simplify ascii/latex/show
(with raw= escape), and add linalg-doc-smoke for (AB)^T identity.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-07 15:50:33 +08:00
1 parent 51bb8767e3
commit b2401b8458
11 files changed
+355 -30

No files matched your search

+13 -7
View File
@@ -69,15 +69,19 @@ Apply MatExpr rewrite rules (R1–R5).
## ascii
+ `expr`
+ `raw`=False
Display ASCII (default **simplify** first). Pass `raw=True` to keep the written tree.
> ensure_plugin
**> linalg_ascii expr=`expr`**
**> linalg_ascii expr=`expr` raw=`raw`**
## latex
+ `expr`
+ `raw`=False
> ensure_plugin
**> linalg_latex expr=`expr`**
**> linalg_latex expr=`expr` raw=`raw`**
## shape
+ `expr`
@@ -88,11 +92,12 @@ Apply MatExpr rewrite rules (R1–R5).
## show
+ `expr`
+ `path`=None
+ `raw`=False
Record a formula SVG via host plot channel; returns the expr map.
Record a formula SVG via host plot channel (default simplify). Returns the expr map.
> ensure_plugin
**> linalg_show expr=`expr` path=`path`**
**> linalg_show expr=`expr` path=`path` raw=`raw`**
## eye
+ `n`
@@ -305,11 +310,11 @@ Matrix value (`_type=matrix`). Prefer infix `A + B` / `A * B`, or methods `` `A`
## ascii
**> linalg_ascii expr=`self`**
**> linalg_ascii expr=`self` raw=False**
## latex
**> linalg_latex expr=`self`**
**> linalg_latex expr=`self` raw=False**
## explicit
@@ -325,8 +330,9 @@ Matrix value (`_type=matrix`). Prefer infix `A + B` / `A * B`, or methods `` `A`
## show
+ `path`=None
+ `raw`=False
**> linalg_show expr=`self` path=`path`**
**> linalg_show expr=`self` path=`path` raw=`raw`**
## eye
+ `n`
+14 -6
View File
@@ -67,15 +67,19 @@ import sys:lib/sys.mq.md
## 文本
+ `式`
+ `原始`=False
展示 ASCII(默认先 **化简**)。`原始=True` 保留书写树。
> 确保插件
**> linalg_ascii expr=`式`**
**> linalg_ascii expr=`式` raw=`原始`**
## 乳胶
+ `式`
+ `原始`=False
> 确保插件
**> linalg_latex expr=`式`**
**> linalg_latex expr=`式` raw=`原始`**
## 形状
+ `式`
@@ -86,9 +90,12 @@ import sys:lib/sys.mq.md
## 展示
+ `式`
+ `路径`=None
+ `原始`=False
写入公式 SVG(默认化简)。
> 确保插件
**> linalg_show expr=`式` path=`路径`**
**> linalg_show expr=`式` path=`路径` raw=`原始`**
## 单位
+ `阶`
@@ -297,11 +304,11 @@ import sys:lib/sys.mq.md
## 文本
**> linalg_ascii expr=`self`**
**> linalg_ascii expr=`self` raw=False**
## 乳胶
**> linalg_latex expr=`self`**
**> linalg_latex expr=`self` raw=False**
## 求值
@@ -317,8 +324,9 @@ import sys:lib/sys.mq.md
## 展示
+ `路径`=None
+ `原始`=False
**> linalg_show expr=`self` path=`路径`**
**> linalg_show expr=`self` path=`路径` raw=`原始`**
## 单位
+ `阶`