massive update for Mogan Research 1.2.5

This commit is contained in:
Darcy Shen 2024-02-24 11:38:26 +08:00
parent 64a5d8b40d
commit 73005e7d0a
49 changed files with 3265 additions and 2793 deletions

View file

@ -5,72 +5,73 @@
<\body>
\;
<doc-data|<doc-title|<TeXmacs>图形编程>|<doc-author|<author-data|<author-name|沈浪熊猫儿>|<author-email|shenda@ustc.edu>>>|<doc-date|<date>>>
<doc-data|<doc-title|<TeXmacs>\<#56FE\>\<#5F62\>\<#7F16\>\<#7A0B\>>|<doc-author|<author-data|<author-name|\<#6C88\>\<#6D6A\>\<#718A\>\<#732B\>\<#513F\>>|<author-email|shenda@ustc.edu>>>|<doc-date|<date>>>
<section|简介>
<section|\<#7B80\>\<#4ECB\>>
因为<TeXmacs>的介绍资料不多,所以打算边学边写,写一系列用<name|Scheme>作图的小文章。早先我在自己的博客上写过两篇使用Scheme在<TeXmacs>中生成图片<\footnote>
\<#56E0\>\<#4E3A\><TeXmacs>\<#7684\>\<#4ECB\>\<#7ECD\>\<#8D44\>\<#6599\>\<#4E0D\>\<#591A\>\<#FF0C\>\<#6240\>\<#4EE5\>\<#6253\>\<#7B97\>\<#8FB9\>\<#5B66\>\<#8FB9\>\<#5199\>\<#FF0C\>\<#5199\>\<#4E00\>\<#7CFB\>\<#5217\>\<#7528\><name|Scheme>\<#4F5C\>\<#56FE\>\<#7684\>\<#5C0F\>\<#6587\>\<#7AE0\>\<#3002\>\<#65E9\>\<#5148\>\<#6211\>\<#5728\>\<#81EA\>\<#5DF1\>\<#7684\>\<#535A\>\<#5BA2\>\<#4E0A\>\<#5199\>\<#8FC7\>\<#4E24\>\<#7BC7\>\<#FF1A\>\<#4F7F\>\<#7528\>Scheme\<#5728\><TeXmacs>\<#4E2D\>\<#751F\>\<#6210\>\<#56FE\>\<#7247\><\footnote>
<href|http://sadhen.com/blog/2014/11/04/texmacs-graphics.html>
</footnote>和使用Scheme在<TeXmacs>中画内核代码结构体关系图<\footnote>
</footnote>\<#548C\>\<#4F7F\>\<#7528\>Scheme\<#5728\><TeXmacs>\<#4E2D\>\<#753B\>\<#5185\>\<#6838\>\<#4EE3\>\<#7801\>\<#7ED3\>\<#6784\>\<#4F53\>\<#5173\>\<#7CFB\>\<#56FE\><\footnote>
<href|http://sadhen.com/blog/2014/11/09/texmacs-graphics-struct.html>
</footnote>,对其图形系统的文档树有一个大概的了解。这次打算系统性地介绍作图方法并构建用<name|Scheme>编程作图的配置文件。
</footnote>\<#FF0C\>\<#5BF9\>\<#5176\>\<#56FE\>\<#5F62\>\<#7CFB\>\<#7EDF\>\<#7684\>\<#6587\>\<#6863\>\<#6811\>\<#6709\>\<#4E00\>\<#4E2A\>\<#5927\>\<#6982\>\<#7684\>\<#4E86\>\<#89E3\>\<#3002\>\<#8FD9\>\<#6B21\>\<#6253\>\<#7B97\>\<#7CFB\>\<#7EDF\>\<#6027\>\<#5730\>\<#4ECB\>\<#7ECD\>\<#4F5C\>\<#56FE\>\<#65B9\>\<#6CD5\>\<#5E76\>\<#6784\>\<#5EFA\>\<#7528\><name|Scheme>\<#7F16\>\<#7A0B\>\<#4F5C\>\<#56FE\>\<#7684\>\<#914D\>\<#7F6E\>\<#6587\>\<#4EF6\>\<#3002\>
本文对读者的基本要求就是熟悉<TeXmacs>的基本使用和<name|Scheme>语言的基础。<TeXmacs>相关的操作和内部原理,我尽量会使用自己的语言阐述清楚,或者给出<TeXmacs>官方文档的具体位置。另外,本文原始文档托管在Github<\footnote>
\<#672C\>\<#6587\>\<#5BF9\>\<#8BFB\>\<#8005\>\<#7684\>\<#57FA\>\<#672C\>\<#8981\>\<#6C42\>\<#5C31\>\<#662F\>\<#719F\>\<#6089\><TeXmacs>\<#7684\>\<#57FA\>\<#672C\>\<#4F7F\>\<#7528\>\<#548C\><name|Scheme>\<#8BED\>\<#8A00\>\<#7684\>\<#57FA\>\<#7840\>\<#3002\><TeXmacs>\<#76F8\>\<#5173\>\<#7684\>\<#64CD\>\<#4F5C\>\<#548C\>\<#5185\>\<#90E8\>\<#539F\>\<#7406\>\<#FF0C\>\<#6211\>\<#5C3D\>\<#91CF\>\<#4F1A\>\<#4F7F\>\<#7528\>\<#81EA\>\<#5DF1\>\<#7684\>\<#8BED\>\<#8A00\>\<#9610\>\<#8FF0\>\<#6E05\>\<#695A\>\<#FF0C\>\<#6216\>\<#8005\>\<#7ED9\>\<#51FA\><TeXmacs>\<#5B98\>\<#65B9\>\<#6587\>\<#6863\>\<#7684\>\<#5177\>\<#4F53\>\<#4F4D\>\<#7F6E\>\<#3002\>\<#53E6\>\<#5916\>\<#FF0C\>\<#672C\>\<#6587\>\<#539F\>\<#59CB\>\<#6587\>\<#6863\>\<#6258\>\<#7BA1\>\<#5728\>Github<\footnote>
<href|https://github.com/sadhen/articles-and-notes-by-TeXmacs>
</footnote>上,所使用的<TeXmacs>版本为<TeXmacs-version>。
</footnote>\<#4E0A\>\<#FF0C\>\<#6240\>\<#4F7F\>\<#7528\>\<#7684\><TeXmacs>\<#7248\>\<#672C\>\<#4E3A\><TeXmacs-version>\<#3002\>
<with|ornament-color|#efefef|<\ornamented>
<\remark>
由于文中使用了大量交互式<name|Scheme>进程,在原始文档中才能够对其求值并作图,所以请使用<TeXmacs>阅读原始文档。
\<#7531\>\<#4E8E\>\<#6587\>\<#4E2D\>\<#4F7F\>\<#7528\>\<#4E86\>\<#5927\>\<#91CF\>\<#4EA4\>\<#4E92\>\<#5F0F\><name|Scheme>\<#8FDB\>\<#7A0B\>\<#FF0C\>\<#5728\>\<#539F\>\<#59CB\>\<#6587\>\<#6863\>\<#4E2D\>\<#624D\>\<#80FD\>\<#591F\>\<#5BF9\>\<#5176\>\<#6C42\>\<#503C\>\<#5E76\>\<#4F5C\>\<#56FE\>\<#FF0C\>\<#6240\>\<#4EE5\>\<#8BF7\>\<#4F7F\>\<#7528\><TeXmacs>\<#9605\>\<#8BFB\>\<#539F\>\<#59CB\>\<#6587\>\<#6863\>\<#3002\>
</remark>
</ornamented>>
本文的交互式代码的执行假定读者是一次性从上到下读完全文,当然这是不现实的,所以附录的小贴士建议优先阅读,以方便你第二次阅读本文中末节时快速进入状态。
\<#672C\>\<#6587\>\<#7684\>\<#4EA4\>\<#4E92\>\<#5F0F\>\<#4EE3\>\<#7801\>\<#7684\>\<#6267\>\<#884C\>\<#5047\>\<#5B9A\>\<#8BFB\>\<#8005\>\<#662F\>\<#4E00\>\<#6B21\>\<#6027\>\<#4ECE\>\<#4E0A\>\<#5230\>\<#4E0B\>\<#8BFB\>\<#5B8C\>\<#5168\>\<#6587\>\<#FF0C\>\<#5F53\>\<#7136\>\<#8FD9\>\<#662F\>\<#4E0D\>\<#73B0\>\<#5B9E\>\<#7684\>\<#FF0C\>\<#6240\>\<#4EE5\>\<#9644\>\<#5F55\>\<#7684\>\<#5C0F\>\<#8D34\>\<#58EB\>\<#5EFA\>\<#8BAE\>\<#4F18\>\<#5148\>\<#9605\>\<#8BFB\>\<#FF0C\>\<#4EE5\>\<#65B9\>\<#4FBF\>\<#4F60\>\<#7B2C\>\<#4E8C\>\<#6B21\>\<#9605\>\<#8BFB\>\<#672C\>\<#6587\>\<#4E2D\>\<#672B\>\<#8282\>\<#65F6\>\<#5FEB\>\<#901F\>\<#8FDB\>\<#5165\>\<#72B6\>\<#6001\>\<#3002\>
<section|基本原理>
<section|\<#57FA\>\<#672C\>\<#539F\>\<#7406\>>
首先,假设我们已经了解到:一篇<TeXmacs>文档实际上就是一长串<name|Scheme>代码,通过渲染引擎的加工,这些代码得以展现在我们笔记本的屏幕上。这些代码我们称之为<TeXmacs>
<name|Scheme>。为了区分,我们将在<name|Guile>中运行的代码称为<name|Guile>
<name|Scheme>
\<#9996\>\<#5148\>\<#FF0C\>\<#5047\>\<#8BBE\>\<#6211\>\<#4EEC\>\<#5DF2\>\<#7ECF\>\<#4E86\>\<#89E3\>\<#5230\>\<#FF1A\>\<#4E00\>\<#7BC7\><TeXmacs>\<#6587\>\<#6863\>\<#5B9E\>\<#9645\>\<#4E0A\>\<#5C31\>\<#662F\>\<#4E00\>\<#957F\>\<#4E32\><name|Scheme>\<#4EE3\>\<#7801\>\<#FF0C\>\<#901A\>\<#8FC7\>\<#6E32\>\<#67D3\>\<#5F15\>\<#64CE\>\<#7684\>\<#52A0\>\<#5DE5\>\<#FF0C\>\<#8FD9\>\<#4E9B\>\<#4EE3\>\<#7801\>\<#5F97\>\<#4EE5\>\<#5C55\>\<#73B0\>\<#5728\>\<#6211\>\<#4EEC\>\<#7B14\>\<#8BB0\>\<#672C\>\<#7684\>\<#5C4F\>\<#5E55\>\<#4E0A\>\<#3002\>\<#8FD9\>\<#4E9B\>\<#4EE3\>\<#7801\>\<#6211\>\<#4EEC\>\<#79F0\>\<#4E4B\>\<#4E3A\><TeXmacs>
<name|Scheme>\<#3002\>\<#4E3A\>\<#4E86\>\<#533A\>\<#5206\>\<#FF0C\>\<#6211\>\<#4EEC\>\<#5C06\>\<#5728\><name|Guile>\<#4E2D\>\<#8FD0\>\<#884C\>\<#7684\>\<#4EE3\>\<#7801\>\<#79F0\>\<#4E3A\><name|Guile>
<name|Scheme>\<#3002\>
通过<menu|insert|session|Scheme>,我们得到一个<name|Scheme>
<name|REPL>。我们定义第一个函数
\<#901A\>\<#8FC7\><menu|insert|session|Scheme>\<#FF0C\>\<#6211\>\<#4EEC\>\<#5F97\>\<#5230\>\<#4E00\>\<#4E2A\><name|Scheme>
<name|REPL>\<#3002\>\<#6211\>\<#4EEC\>\<#5B9A\>\<#4E49\>\<#7B2C\>\<#4E00\>\<#4E2A\>\<#51FD\>\<#6570\>
<\session|scheme|default>
<\input|Scheme] >
(define (plot l) (stree-\<gtr\>tree l))
;按下回车,定义这个函数
;\<#6309\>\<#4E0B\>\<#56DE\>\<#8F66\>\<#FF0C\>\<#5B9A\>\<#4E49\>\<#8FD9\>\<#4E2A\>\<#51FD\>\<#6570\>
</input>
</session>
一串<name|Scheme>代码对应的结构是一棵树,这里的<scm|stree-\<gtr\>tree>就是将<name|Guile>
<scheme>树转变成<TeXmacs> <scheme>树,以便在文档中显示。比如,我们知道<frac|1|2>的内部表示实际上就是<scm|(frac
1 2)>。于是,在<name|REPL>中,我们就可以通过
\<#4E00\>\<#4E32\><name|Scheme>\<#4EE3\>\<#7801\>\<#5BF9\>\<#5E94\>\<#7684\>\<#7ED3\>\<#6784\>\<#662F\>\<#4E00\>\<#68F5\>\<#6811\>\<#FF0C\>\<#8FD9\>\<#91CC\>\<#7684\><scm|stree-\<gtr\>tree>\<#5C31\>\<#662F\>\<#5C06\><name|Guile>
<scheme>\<#6811\>\<#8F6C\>\<#53D8\>\<#6210\><TeXmacs>
<scheme>\<#6811\>\<#FF0C\>\<#4EE5\>\<#4FBF\>\<#5728\>\<#6587\>\<#6863\>\<#4E2D\>\<#663E\>\<#793A\>\<#3002\>\<#6BD4\>\<#5982\>\<#FF0C\>\<#6211\>\<#4EEC\>\<#77E5\>\<#9053\><frac|1|2>\<#7684\>\<#5185\>\<#90E8\>\<#8868\>\<#793A\>\<#5B9E\>\<#9645\>\<#4E0A\>\<#5C31\>\<#662F\><scm|(frac
1 2)>\<#3002\>\<#4E8E\>\<#662F\>\<#FF0C\>\<#5728\><name|REPL>\<#4E2D\>\<#FF0C\>\<#6211\>\<#4EEC\>\<#5C31\>\<#53EF\>\<#4EE5\>\<#901A\>\<#8FC7\>
<\session|scheme|default>
<\folded-io|Scheme] >
(plot `(frac 1 2)) ;光标放在这行上,按下回车就能得到1/2
(plot `(frac 1 2)) ;\<#5149\>\<#6807\>\<#653E\>\<#5728\>\<#8FD9\>\<#884C\>\<#4E0A\>\<#FF0C\>\<#6309\>\<#4E0B\>\<#56DE\>\<#8F66\>\<#5C31\>\<#80FD\>\<#5F97\>\<#5230\>1/2
<|folded-io>
\;
</folded-io>
</session>
<subsection|原语>
<subsection|\<#539F\>\<#8BED\>>
上面介绍的原语<verbatim|frac>实际上用于数学模式,下面我们介绍图形模式下的原语。先全部列出来:
\<#4E0A\>\<#9762\>\<#4ECB\>\<#7ECD\>\<#7684\>\<#539F\>\<#8BED\><verbatim|frac>\<#5B9E\>\<#9645\>\<#4E0A\>\<#7528\>\<#4E8E\>\<#6570\>\<#5B66\>\<#6A21\>\<#5F0F\>\<#FF0C\>\<#4E0B\>\<#9762\>\<#6211\>\<#4EEC\>\<#4ECB\>\<#7ECD\>\<#56FE\>\<#5F62\>\<#6A21\>\<#5F0F\>\<#4E0B\>\<#7684\>\<#539F\>\<#8BED\>\<#3002\>\<#5148\>\<#5168\>\<#90E8\>\<#5217\>\<#51FA\>\<#6765\>\<#FF1A\>
<\big-table|<tabular|<tformat|<table|<row|<cell|>>>>><block*|<tformat|<cwith|1|-1|1|-1|cell-hyphen|c>|<table|<row|<\cell>
原语
\<#539F\>\<#8BED\>
</cell>|<\cell>
示例
\<#793A\>\<#4F8B\>
</cell>|<\cell>
功能
\<#529F\>\<#80FD\>
</cell>>|<row|<\cell>
<markup|point>
</cell>|<\cell>
<verbatim|<code*|(point \P0\Q \P0\Q)>>
</cell>|<\cell>
坐标(0,0)处的一个点
\<#5750\>\<#6807\>(0,0)\<#5904\>\<#7684\>\<#4E00\>\<#4E2A\>\<#70B9\>
</cell>>|<row|<\cell>
<markup|line>
</cell>|<\cell>
@ -82,7 +83,7 @@
</cell>|<\cell>
(0,0)<math|\<rightarrow\>>(0,1)<math|\<rightarrow\>>(1,1)
的一条折线
\<#7684\>\<#4E00\>\<#6761\>\<#6298\>\<#7EBF\>
</cell>>|<row|<\cell>
<markup|cline>
</cell>|<\cell>
@ -94,7 +95,7 @@
</cell>|<\cell>
<math|(0,0)\<rightarrow\>(0,1)\<rightarrow\>(1,1)\<rightarrow\>(0,0)>
的一条闭合折线
\<#7684\>\<#4E00\>\<#6761\>\<#95ED\>\<#5408\>\<#6298\>\<#7EBF\>
</cell>>|<row|<\cell>
<markup|spline>
</cell>|<\cell>
@ -106,7 +107,7 @@
</cell>|<\cell>
<math|(0,0)\<rightarrow\>(0,1)\<rightarrow\>(1,1)>
的一条样条曲线
\<#7684\>\<#4E00\>\<#6761\>\<#6837\>\<#6761\>\<#66F2\>\<#7EBF\>
</cell>>|<row|<\cell>
<markup|cspline>
</cell>|<\cell>
@ -118,7 +119,7 @@
</cell>|<\cell>
<math|(0,0)\<rightarrow\>(0,1)\<rightarrow\>(1,1)\<rightarrow\>(0,0)>
的一条闭合样条曲线
\<#7684\>\<#4E00\>\<#6761\>\<#95ED\>\<#5408\>\<#6837\>\<#6761\>\<#66F2\>\<#7EBF\>
</cell>>|<row|<\cell>
<markup|arc>
</cell>|<\cell>
@ -128,7 +129,7 @@
(point \P1\Q \P1\Q))
</code*>
</cell>|<\cell>
过这三点的一条弧
\<#8FC7\>\<#8FD9\>\<#4E09\>\<#70B9\>\<#7684\>\<#4E00\>\<#6761\>\<#5F27\>
</cell>>|<row|<\cell>
<markup|carc>
</cell>|<\cell>
@ -138,7 +139,7 @@
(point \P1\Q \P1\Q))
</code*>
</cell>|<\cell>
过这三点的一个圆
\<#8FC7\>\<#8FD9\>\<#4E09\>\<#70B9\>\<#7684\>\<#4E00\>\<#4E2A\>\<#5706\>
</cell>>|<row|<\cell>
<markup|text-at>
</cell>|<\cell>
@ -148,30 +149,30 @@
(point \P0\Q \P0\Q))
</code*>
</cell>|<\cell>
这个原语的重要之处在于提
\<#8FD9\>\<#4E2A\>\<#539F\>\<#8BED\>\<#7684\>\<#91CD\>\<#8981\>\<#4E4B\>\<#5904\>\<#5728\>\<#4E8E\>\<#63D0\>
供了一种在图片上放置
\<#4F9B\>\<#4E86\>\<#4E00\>\<#79CD\>\<#5728\>\<#56FE\>\<#7247\>\<#4E0A\>\<#653E\>\<#7F6E\>
图片的方法,放在其上
\<#56FE\>\<#7247\>\<#7684\>\<#65B9\>\<#6CD5\>\<#FF0C\>\<#653E\>\<#5728\>\<#5176\>\<#4E0A\>
的图片所处的位置是点
\<#7684\>\<#56FE\>\<#7247\>\<#6240\>\<#5904\>\<#7684\>\<#4F4D\>\<#7F6E\>\<#662F\>\<#70B9\>
(0,0)的右边,其竖直方向
(0,0)\<#7684\>\<#53F3\>\<#8FB9\>\<#FF0C\>\<#5176\>\<#7AD6\>\<#76F4\>\<#65B9\>\<#5411\>
上的对称轴正好过点(0,0)
\<#4E0A\>\<#7684\>\<#5BF9\>\<#79F0\>\<#8F74\>\<#6B63\>\<#597D\>\<#8FC7\>\<#70B9\>(0,0)
</cell>>>>>>
\;
</big-table>
接着,我们在这些原语<\footnote>
这些原语的代码实现可以在<verbatim|src/Graphics/Types/>下找到
</footnote>的基础上构建作图所需的基本元素。首先是点,线段,矩形和圆:
\<#63A5\>\<#7740\>\<#FF0C\>\<#6211\>\<#4EEC\>\<#5728\>\<#8FD9\>\<#4E9B\>\<#539F\>\<#8BED\><\footnote>
\<#8FD9\>\<#4E9B\>\<#539F\>\<#8BED\>\<#7684\>\<#4EE3\>\<#7801\>\<#5B9E\>\<#73B0\>\<#53EF\>\<#4EE5\>\<#5728\><verbatim|src/Graphics/Types/>\<#4E0B\>\<#627E\>\<#5230\>
</footnote>\<#7684\>\<#57FA\>\<#7840\>\<#4E0A\>\<#6784\>\<#5EFA\>\<#4F5C\>\<#56FE\>\<#6240\>\<#9700\>\<#7684\>\<#57FA\>\<#672C\>\<#5143\>\<#7D20\>\<#3002\>\<#9996\>\<#5148\>\<#662F\>\<#70B9\>\<#FF0C\>\<#7EBF\>\<#6BB5\>\<#FF0C\>\<#77E9\>\<#5F62\>\<#548C\>\<#5706\>\<#FF1A\>
<\session|scheme|default>
<\input|Scheme] >
(define (point x y)
\ \ ; number-\<gtr\>string的作用是将树变成文档中表示数据的字符串
\ \ ; number-\<gtr\>string\<#7684\>\<#4F5C\>\<#7528\>\<#662F\>\<#5C06\>\<#6811\>\<#53D8\>\<#6210\>\<#6587\>\<#6863\>\<#4E2D\>\<#8868\>\<#793A\>\<#6570\>\<#636E\>\<#7684\>\<#5B57\>\<#7B26\>\<#4E32\>
\ \ `(point ,(number-\<gtr\>string x) ,(number-\<gtr\>string y)))
</input>
@ -224,7 +225,7 @@
</input>
</session>
用<verbatim|plot>绘制点、矩形和圆:
\<#7528\><verbatim|plot>\<#7ED8\>\<#5236\>\<#70B9\>\<#3001\>\<#77E9\>\<#5F62\>\<#548C\>\<#5706\>\<#FF1A\>
<\session|scheme|default>
<\unfolded-io|Scheme] >
@ -246,9 +247,9 @@
</unfolded-io>
</session>
<subsection|操纵样式属性>
<subsection|\<#64CD\>\<#7EB5\>\<#6837\>\<#5F0F\>\<#5C5E\>\<#6027\>>
使用<markup|with>原语可以给<TeXmacs>对象附上各种属性。比如
\<#4F7F\>\<#7528\><markup|with>\<#539F\>\<#8BED\>\<#53EF\>\<#4EE5\>\<#7ED9\><TeXmacs>\<#5BF9\>\<#8C61\>\<#9644\>\<#4E0A\>\<#5404\>\<#79CD\>\<#5C5E\>\<#6027\>\<#3002\>\<#6BD4\>\<#5982\>
<\session|scheme|default>
<\unfolded-io|Scheme] >
@ -259,7 +260,7 @@
<\unfolded-io|Scheme] >
(plot `(with arrow-begin "\<less\>gtr\<gtr\>" dash-style "11100"
(line (point 0 1) (point 0 0) (point 1 1))))
\<#FF0C\>(line (point 0 1) (point 0 0) (point 1 1))))
<|unfolded-io>
<text|<with|arrow-begin|\<gtr\>|dash-style|11100|<line|<point|0|1>|<point|0|0>|<point|1|1>>>>
</unfolded-io>
@ -271,54 +272,54 @@
</unfolded-io>
</session>
根据源码<\footnote>
\<#6839\>\<#636E\>\<#6E90\>\<#7801\><\footnote>
<verbatim|TeXmacs/progs/graphics/graphics-drd.scm>
</footnote>中的定义,可以总结出:
</footnote>\<#4E2D\>\<#7684\>\<#5B9A\>\<#4E49\>\<#FF0C\>\<#53EF\>\<#4EE5\>\<#603B\>\<#7ED3\>\<#51FA\>\<#FF1A\>
<big-table|<block*|<tformat|<cwith|1|-1|1|-1|cell-hyphen|c>|<cwith|2|2|2|2|cell-row-span|2>|<cwith|2|2|2|2|cell-col-span|1>|<cwith|8|8|2|2|cell-row-span|2>|<cwith|8|8|2|2|cell-col-span|1>|<cwith|1|-1|1|-1|cell-vcorrect|b>|<table|<row|<\cell>
属性
\<#5C5E\>\<#6027\>
</cell>|<\cell>
\<#503C\>
</cell>|<\cell>
作用
\<#4F5C\>\<#7528\>
</cell>>|<row|<\cell>
color
</cell>|<\cell>
\;
颜色,如<verbatim|"red"><verbatim|"#eeeee">
\<#989C\>\<#8272\>\<#FF0C\>\<#5982\><verbatim|"red">\<#FF0C\><verbatim|"#eeeee">
</cell>|<\cell>
对象本身的颜色
\<#5BF9\>\<#8C61\>\<#672C\>\<#8EAB\>\<#7684\>\<#989C\>\<#8272\>
</cell>>|<row|<\cell>
fill-color
</cell>|<\cell>
\;
</cell>|<\cell>
填充色
\<#586B\>\<#5145\>\<#8272\>
</cell>>|<row|<\cell>
magnify
</cell>|<\cell>
浮点数,如<verbatim|"1.1">
\<#6D6E\>\<#70B9\>\<#6570\>\<#FF0C\>\<#5982\><verbatim|"1.1">
</cell>|<\cell>
放大或缩小的倍率
\<#653E\>\<#5927\>\<#6216\>\<#7F29\>\<#5C0F\>\<#7684\>\<#500D\>\<#7387\>
</cell>>|<row|<\cell>
opacity
</cell>|<\cell>
百分比,如<verbatim|"100%">
\<#767E\>\<#5206\>\<#6BD4\>\<#FF0C\>\<#5982\><verbatim|"100%">
</cell>|<\cell>
透明度
\<#900F\>\<#660E\>\<#5EA6\>
</cell>>|<row|<\cell>
point-style
</cell>|<\cell>
<verbatim|default,round,square,diamond,triangle,star>
</cell>|<\cell>
点的样式
\<#70B9\>\<#7684\>\<#6837\>\<#5F0F\>
</cell>>|<row|<\cell>
dash-style
</cell>|<\cell>
<verbatim|"10","11100","1111010">
</cell>|<\cell>
线的样式
\<#7EBF\>\<#7684\>\<#6837\>\<#5F0F\>
</cell>>|<row|<\cell>
arrow-begin
</cell>|<\cell>
@ -328,19 +329,19 @@
\;
</cell>|<\cell>
开始处的箭头
\<#5F00\>\<#59CB\>\<#5904\>\<#7684\>\<#7BAD\>\<#5934\>
</cell>>|<row|<\cell>
arrow-end
</cell>|<\cell>
\;
</cell>|<\cell>
结束处的箭头
</cell>>>>>|部分对象属性>
\<#7ED3\>\<#675F\>\<#5904\>\<#7684\>\<#7BAD\>\<#5934\>
</cell>>>>>|\<#90E8\>\<#5206\>\<#5BF9\>\<#8C61\>\<#5C5E\>\<#6027\>>
光看表格中的总结不免失之直观,推荐阅读<menu|help|manual|内置作图工具>这章中样式属性详述这一节。
\<#5149\>\<#770B\>\<#8868\>\<#683C\>\<#4E2D\>\<#7684\>\<#603B\>\<#7ED3\>\<#4E0D\>\<#514D\>\<#5931\>\<#4E4B\>\<#76F4\>\<#89C2\>\<#FF0C\>\<#63A8\>\<#8350\>\<#9605\>\<#8BFB\><menu|help|manual|\<#5185\>\<#7F6E\>\<#4F5C\>\<#56FE\>\<#5DE5\>\<#5177\>>\<#8FD9\>\<#7AE0\>\<#4E2D\>\<#6837\>\<#5F0F\>\<#5C5E\>\<#6027\>\<#8BE6\>\<#8FF0\>\<#8FD9\>\<#4E00\>\<#8282\>\<#3002\>
下面,定义一些函数,方便我们操纵上一节中点、圆和矩形的样式。首先是颜色,我们定义<verbatim|fill>来设置背景色,定义<verbatim|colorize>来设置前景色。粗糙的想法是在图形对象前增加<markup|with>标签以及相应的属性,<em|但是如果我们对同一个对象增加了许多次<markup|with>标签会怎样呢?>
这个问题可以用函数<verbatim|merge-with>解决,另外我们定义<verbatim|decorate>来设置任意属性:
\<#4E0B\>\<#9762\>\<#FF0C\>\<#5B9A\>\<#4E49\>\<#4E00\>\<#4E9B\>\<#51FD\>\<#6570\>\<#FF0C\>\<#65B9\>\<#4FBF\>\<#6211\>\<#4EEC\>\<#64CD\>\<#7EB5\>\<#4E0A\>\<#4E00\>\<#8282\>\<#4E2D\>\<#70B9\>\<#3001\>\<#5706\>\<#548C\>\<#77E9\>\<#5F62\>\<#7684\>\<#6837\>\<#5F0F\>\<#3002\>\<#9996\>\<#5148\>\<#662F\>\<#989C\>\<#8272\>\<#FF0C\>\<#6211\>\<#4EEC\>\<#5B9A\>\<#4E49\><verbatim|fill>\<#6765\>\<#8BBE\>\<#7F6E\>\<#80CC\>\<#666F\>\<#8272\>\<#FF0C\>\<#5B9A\>\<#4E49\><verbatim|colorize>\<#6765\>\<#8BBE\>\<#7F6E\>\<#524D\>\<#666F\>\<#8272\>\<#3002\>\<#7C97\>\<#7CD9\>\<#7684\>\<#60F3\>\<#6CD5\>\<#662F\>\<#5728\>\<#56FE\>\<#5F62\>\<#5BF9\>\<#8C61\>\<#524D\>\<#589E\>\<#52A0\><markup|with>\<#6807\>\<#7B7E\>\<#4EE5\>\<#53CA\>\<#76F8\>\<#5E94\>\<#7684\>\<#5C5E\>\<#6027\>\<#FF0C\><em|\<#4F46\>\<#662F\>\<#5982\>\<#679C\>\<#6211\>\<#4EEC\>\<#5BF9\>\<#540C\>\<#4E00\>\<#4E2A\>\<#5BF9\>\<#8C61\>\<#589E\>\<#52A0\>\<#4E86\>\<#8BB8\>\<#591A\>\<#6B21\><markup|with>\<#6807\>\<#7B7E\>\<#4F1A\>\<#600E\>\<#6837\>\<#5462\>\<#FF1F\>>
\<#8FD9\>\<#4E2A\>\<#95EE\>\<#9898\>\<#53EF\>\<#4EE5\>\<#7528\>\<#51FD\>\<#6570\><verbatim|merge-with>\<#89E3\>\<#51B3\>\<#FF0C\>\<#53E6\>\<#5916\>\<#6211\>\<#4EEC\>\<#5B9A\>\<#4E49\><verbatim|decorate>\<#6765\>\<#8BBE\>\<#7F6E\>\<#4EFB\>\<#610F\>\<#5C5E\>\<#6027\>\<#FF1A\>
<\session|scheme|default>
<\input|Scheme] >
@ -459,17 +460,17 @@
</unfolded-io>
</session>
<subsection|摆弄画布>
<subsection|\<#6446\>\<#5F04\>\<#753B\>\<#5E03\>>
前文所作之图,我们都只是将图形对象生成出来<TeXmacs>文档树放在<scheme>进程的输出上我们观察到坐标的原点就在文档横截线的中点上。用光标选中这个图案可以看到左边的一大截空白。在上一节作出的箭头图案前输入了单词left后你可以清晰地看到这些空白。
\<#524D\>\<#6587\>\<#6240\>\<#4F5C\>\<#4E4B\>\<#56FE\>\<#FF0C\>\<#6211\>\<#4EEC\>\<#90FD\>\<#53EA\>\<#662F\>\<#5C06\>\<#56FE\>\<#5F62\>\<#5BF9\>\<#8C61\>\<#751F\>\<#6210\>\<#51FA\>\<#6765\><TeXmacs>\<#6587\>\<#6863\>\<#6811\>\<#653E\>\<#5728\><scheme>\<#8FDB\>\<#7A0B\>\<#7684\>\<#8F93\>\<#51FA\>\<#4E0A\>\<#FF0C\>\<#6211\>\<#4EEC\>\<#89C2\>\<#5BDF\>\<#5230\>\<#5750\>\<#6807\>\<#7684\>\<#539F\>\<#70B9\>\<#5C31\>\<#5728\>\<#6587\>\<#6863\>\<#6A2A\>\<#622A\>\<#7EBF\>\<#7684\>\<#4E2D\>\<#70B9\>\<#4E0A\>\<#3002\>\<#7528\>\<#5149\>\<#6807\>\<#9009\>\<#4E2D\>\<#8FD9\>\<#4E2A\>\<#56FE\>\<#6848\>\<#FF0C\>\<#53EF\>\<#4EE5\>\<#770B\>\<#5230\>\<#5DE6\>\<#8FB9\>\<#7684\>\<#4E00\>\<#5927\>\<#622A\>\<#7A7A\>\<#767D\>\<#3002\>\<#5728\>\<#4E0A\>\<#4E00\>\<#8282\>\<#4F5C\>\<#51FA\>\<#7684\>\<#7BAD\>\<#5934\>\<#56FE\>\<#6848\>\<#524D\>\<#8F93\>\<#5165\>\<#4E86\>\<#5355\>\<#8BCD\>left\<#540E\>\<#FF0C\>\<#4F60\>\<#53EF\>\<#4EE5\>\<#6E05\>\<#6670\>\<#5730\>\<#770B\>\<#5230\>\<#8FD9\>\<#4E9B\>\<#7A7A\>\<#767D\>\<#3002\>
left<with|arrow-end|\|\<gtr\>|<line|<point|-2|0>|<point|0|0>|<point|1|1>>>
由此可以知道,在没有画布的情况下,<TeXmacs>会分配一个动态大小的画布,以适应图形的尺寸。
\<#7531\>\<#6B64\>\<#53EF\>\<#4EE5\>\<#77E5\>\<#9053\>\<#FF0C\>\<#5728\>\<#6CA1\>\<#6709\>\<#753B\>\<#5E03\>\<#7684\>\<#60C5\>\<#51B5\>\<#4E0B\>\<#FF0C\><TeXmacs>\<#4F1A\>\<#5206\>\<#914D\>\<#4E00\>\<#4E2A\>\<#52A8\>\<#6001\>\<#5927\>\<#5C0F\>\<#7684\>\<#753B\>\<#5E03\>\<#FF0C\>\<#4EE5\>\<#9002\>\<#5E94\>\<#56FE\>\<#5F62\>\<#7684\>\<#5C3A\>\<#5BF8\>\<#3002\>
前文中的图像都只是单个图形对象在默认画布上的显示。引入画布之后,我们就可以将多个图形对象叠加在同一个画布上。通过逆向工程<\footnote>
方法请参考附录中的小贴士
</footnote>,可以举出这个例子:
\<#524D\>\<#6587\>\<#4E2D\>\<#7684\>\<#56FE\>\<#50CF\>\<#90FD\>\<#53EA\>\<#662F\>\<#5355\>\<#4E2A\>\<#56FE\>\<#5F62\>\<#5BF9\>\<#8C61\>\<#5728\>\<#9ED8\>\<#8BA4\>\<#753B\>\<#5E03\>\<#4E0A\>\<#7684\>\<#663E\>\<#793A\>\<#3002\>\<#5F15\>\<#5165\>\<#753B\>\<#5E03\>\<#4E4B\>\<#540E\>\<#FF0C\>\<#6211\>\<#4EEC\>\<#5C31\>\<#53EF\>\<#4EE5\>\<#5C06\>\<#591A\>\<#4E2A\>\<#56FE\>\<#5F62\>\<#5BF9\>\<#8C61\>\<#53E0\>\<#52A0\>\<#5728\>\<#540C\>\<#4E00\>\<#4E2A\>\<#753B\>\<#5E03\>\<#4E0A\>\<#3002\>\<#901A\>\<#8FC7\>\<#9006\>\<#5411\>\<#5DE5\>\<#7A0B\><\footnote>
\<#65B9\>\<#6CD5\>\<#8BF7\>\<#53C2\>\<#8003\>\<#9644\>\<#5F55\>\<#4E2D\>\<#7684\>\<#5C0F\>\<#8D34\>\<#58EB\>
</footnote>\<#FF0C\>\<#53EF\>\<#4EE5\>\<#4E3E\>\<#51FA\>\<#8FD9\>\<#4E2A\>\<#4F8B\>\<#5B50\>\<#FF1A\>
<\session|scheme|default>
<\input|Scheme] >
@ -506,11 +507,11 @@
</unfolded-io>
</session>
现在我们就能够用函数<verbatim|graphics>,将多个图形对象叠加在同一个画布上,而且,图形对象的顺序决定了渲染的顺序,后者会覆盖前者。如上图所示,虚线表示原来蓝色矩形的右边界,现在被红色矩形覆盖了。
\<#73B0\>\<#5728\>\<#6211\>\<#4EEC\>\<#5C31\>\<#80FD\>\<#591F\>\<#7528\>\<#51FD\>\<#6570\><verbatim|graphics>\<#FF0C\>\<#5C06\>\<#591A\>\<#4E2A\>\<#56FE\>\<#5F62\>\<#5BF9\>\<#8C61\>\<#53E0\>\<#52A0\>\<#5728\>\<#540C\>\<#4E00\>\<#4E2A\>\<#753B\>\<#5E03\>\<#4E0A\>\<#FF0C\>\<#800C\>\<#4E14\>\<#FF0C\>\<#56FE\>\<#5F62\>\<#5BF9\>\<#8C61\>\<#7684\>\<#987A\>\<#5E8F\>\<#51B3\>\<#5B9A\>\<#4E86\>\<#6E32\>\<#67D3\>\<#7684\>\<#987A\>\<#5E8F\>\<#FF0C\>\<#540E\>\<#8005\>\<#4F1A\>\<#8986\>\<#76D6\>\<#524D\>\<#8005\>\<#3002\>\<#5982\>\<#4E0A\>\<#56FE\>\<#6240\>\<#793A\>\<#FF0C\>\<#865A\>\<#7EBF\>\<#8868\>\<#793A\>\<#539F\>\<#6765\>\<#84DD\>\<#8272\>\<#77E9\>\<#5F62\>\<#7684\>\<#53F3\>\<#8FB9\>\<#754C\>\<#FF0C\>\<#73B0\>\<#5728\>\<#88AB\>\<#7EA2\>\<#8272\>\<#77E9\>\<#5F62\>\<#8986\>\<#76D6\>\<#4E86\>\<#3002\>
而<verbatim|geometry>函数可以控制画布的大小。注意,前文中都没有讨论长度单位这一因素。但实际上前文中所有的坐标的单位都是<verbatim|cm>。所以在指定画布的宽度和高度的时候,我们需要加上<verbatim|cm>这个单位,因为这里的默认单位不是<verbatim|cm>。
\<#800C\><verbatim|geometry>\<#51FD\>\<#6570\>\<#53EF\>\<#4EE5\>\<#63A7\>\<#5236\>\<#753B\>\<#5E03\>\<#7684\>\<#5927\>\<#5C0F\>\<#3002\>\<#6CE8\>\<#610F\>\<#FF0C\>\<#524D\>\<#6587\>\<#4E2D\>\<#90FD\>\<#6CA1\>\<#6709\>\<#8BA8\>\<#8BBA\>\<#957F\>\<#5EA6\>\<#5355\>\<#4F4D\>\<#8FD9\>\<#4E00\>\<#56E0\>\<#7D20\>\<#3002\>\<#4F46\>\<#5B9E\>\<#9645\>\<#4E0A\>\<#524D\>\<#6587\>\<#4E2D\>\<#6240\>\<#6709\>\<#7684\>\<#5750\>\<#6807\>\<#7684\>\<#5355\>\<#4F4D\>\<#90FD\>\<#662F\><verbatim|cm>\<#3002\>\<#6240\>\<#4EE5\>\<#5728\>\<#6307\>\<#5B9A\>\<#753B\>\<#5E03\>\<#7684\>\<#5BBD\>\<#5EA6\>\<#548C\>\<#9AD8\>\<#5EA6\>\<#7684\>\<#65F6\>\<#5019\>\<#FF0C\>\<#6211\>\<#4EEC\>\<#9700\>\<#8981\>\<#52A0\>\<#4E0A\><verbatim|cm>\<#8FD9\>\<#4E2A\>\<#5355\>\<#4F4D\>\<#FF0C\>\<#56E0\>\<#4E3A\>\<#8FD9\>\<#91CC\>\<#7684\>\<#9ED8\>\<#8BA4\>\<#5355\>\<#4F4D\>\<#4E0D\>\<#662F\><verbatim|cm>\<#3002\>
另外,我们还可以剪裁画布,尽可能减少画布周围的空白。
\<#53E6\>\<#5916\>\<#FF0C\>\<#6211\>\<#4EEC\>\<#8FD8\>\<#53EF\>\<#4EE5\>\<#526A\>\<#88C1\>\<#753B\>\<#5E03\>\<#FF0C\>\<#5C3D\>\<#53EF\>\<#80FD\>\<#51CF\>\<#5C11\>\<#753B\>\<#5E03\>\<#5468\>\<#56F4\>\<#7684\>\<#7A7A\>\<#767D\>\<#3002\>
<\session|scheme|default>
<\input|Scheme] >
@ -535,27 +536,27 @@
</unfolded-io>
</session>
选中最近的这两个一样的图像,你就可以看到区别。
\<#9009\>\<#4E2D\>\<#6700\>\<#8FD1\>\<#7684\>\<#8FD9\>\<#4E24\>\<#4E2A\>\<#4E00\>\<#6837\>\<#7684\>\<#56FE\>\<#50CF\>\<#FF0C\>\<#4F60\>\<#5C31\>\<#53EF\>\<#4EE5\>\<#770B\>\<#5230\>\<#533A\>\<#522B\>\<#3002\>
<section|画廊>
<section|\<#753B\>\<#5ECA\>>
这一章主要利用前文定义好的函数,绘制各种各样有趣的图案。
\<#8FD9\>\<#4E00\>\<#7AE0\>\<#4E3B\>\<#8981\>\<#5229\>\<#7528\>\<#524D\>\<#6587\>\<#5B9A\>\<#4E49\>\<#597D\>\<#7684\>\<#51FD\>\<#6570\>\<#FF0C\>\<#7ED8\>\<#5236\>\<#5404\>\<#79CD\>\<#5404\>\<#6837\>\<#6709\>\<#8DA3\>\<#7684\>\<#56FE\>\<#6848\>\<#3002\>
<subsection|金刚石图案>
<subsection|\<#91D1\>\<#521A\>\<#77F3\>\<#56FE\>\<#6848\>>
将半径为R的圆周n等分然后用直线将各个等分点两两相连。
\<#5C06\>\<#534A\>\<#5F84\>\<#4E3A\>R\<#7684\>\<#5706\>\<#5468\>n\<#7B49\>\<#5206\>\<#FF0C\>\<#7136\>\<#540E\>\<#7528\>\<#76F4\>\<#7EBF\>\<#5C06\>\<#5404\>\<#4E2A\>\<#7B49\>\<#5206\>\<#70B9\>\<#4E24\>\<#4E24\>\<#76F8\>\<#8FDE\>\<#3002\>
<subsection|圆环图案>
<subsection|\<#5706\>\<#73AF\>\<#56FE\>\<#6848\>>
将半径为<math|R<rsub|1>>的圆周n等分然后以每个等分点为圆心以<math|R<rsub|2>>为半径画n个圆。
\<#5C06\>\<#534A\>\<#5F84\>\<#4E3A\><math|R<rsub|1>>\<#7684\>\<#5706\>\<#5468\>n\<#7B49\>\<#5206\>\<#FF0C\>\<#7136\>\<#540E\>\<#4EE5\>\<#6BCF\>\<#4E2A\>\<#7B49\>\<#5206\>\<#70B9\>\<#4E3A\>\<#5706\>\<#5FC3\>\<#FF0C\>\<#4EE5\><math|R<rsub|2>>\<#4E3A\>\<#534A\>\<#5F84\>\<#753B\>n\<#4E2A\>\<#5706\>\<#3002\>
<subsection|肾形图案>
<subsection|\<#80BE\>\<#5F62\>\<#56FE\>\<#6848\>>
<subsection|心脏形图案>
<subsection|\<#5FC3\>\<#810F\>\<#5F62\>\<#56FE\>\<#6848\>>
<subsection|分形图案>
<subsection|\<#5206\>\<#5F62\>\<#56FE\>\<#6848\>>
<subsubsection|>
<subsubsection|\<#6811\>>
<subsubsection|Koch snowflake<\footnote>
<href|https://en.wikipedia.org/wiki/Koch_snowflake>
@ -571,19 +572,19 @@
<href|https://en.wikipedia.org/wiki/Mandelbrot_set>
</footnote>>
<section|附录>
<section|\<#9644\>\<#5F55\>>
<subsection|小贴士>
<subsection|\<#5C0F\>\<#8D34\>\<#58EB\>>
<subsubsection|对本文所有的<scheme>表达式求值>
<subsubsection|\<#5BF9\>\<#672C\>\<#6587\>\<#6240\>\<#6709\>\<#7684\><scheme>\<#8868\>\<#8FBE\>\<#5F0F\>\<#6C42\>\<#503C\>>
当你刚刚用编辑器打开本文时,如果你跳到中间的某节去执行代码,很有可能会出错,因为当前的代码很有可能依赖上前文中已经出现过的函数和变量。而将前文中所有的代码都执行一遍这个操作实际上非常繁琐。启用<menu|工具|开发菜单>,将光标置于本文的某个<scheme>进程中,然后<menu|Developer|Export
Sessions...>就可以导出所有的代码到单个文件<verbatim|code.scm>中。然后<menu|转到|无标题文件>,开启一个<scheme>进程并输入<scm|(load
"/path/to/code.scm")>,回车之后,文中所有的代码就都被加载了。
\<#5F53\>\<#4F60\>\<#521A\>\<#521A\>\<#7528\>\<#7F16\>\<#8F91\>\<#5668\>\<#6253\>\<#5F00\>\<#672C\>\<#6587\>\<#65F6\>\<#FF0C\>\<#5982\>\<#679C\>\<#4F60\>\<#8DF3\>\<#5230\>\<#4E2D\>\<#95F4\>\<#7684\>\<#67D0\>\<#8282\>\<#53BB\>\<#6267\>\<#884C\>\<#4EE3\>\<#7801\>\<#FF0C\>\<#5F88\>\<#6709\>\<#53EF\>\<#80FD\>\<#4F1A\>\<#51FA\>\<#9519\>\<#FF0C\>\<#56E0\>\<#4E3A\>\<#5F53\>\<#524D\>\<#7684\>\<#4EE3\>\<#7801\>\<#5F88\>\<#6709\>\<#53EF\>\<#80FD\>\<#4F9D\>\<#8D56\>\<#4E0A\>\<#524D\>\<#6587\>\<#4E2D\>\<#5DF2\>\<#7ECF\>\<#51FA\>\<#73B0\>\<#8FC7\>\<#7684\>\<#51FD\>\<#6570\>\<#548C\>\<#53D8\>\<#91CF\>\<#3002\>\<#800C\>\<#5C06\>\<#524D\>\<#6587\>\<#4E2D\>\<#6240\>\<#6709\>\<#7684\>\<#4EE3\>\<#7801\>\<#90FD\>\<#6267\>\<#884C\>\<#4E00\>\<#904D\>\<#8FD9\>\<#4E2A\>\<#64CD\>\<#4F5C\>\<#5B9E\>\<#9645\>\<#4E0A\>\<#975E\>\<#5E38\>\<#7E41\>\<#7410\>\<#3002\>\<#542F\>\<#7528\><menu|\<#5DE5\>\<#5177\>|\<#5F00\>\<#53D1\>\<#83DC\>\<#5355\>>\<#FF0C\>\<#5C06\>\<#5149\>\<#6807\>\<#7F6E\>\<#4E8E\>\<#672C\>\<#6587\>\<#7684\>\<#67D0\>\<#4E2A\><scheme>\<#8FDB\>\<#7A0B\>\<#4E2D\>\<#FF0C\>\<#7136\>\<#540E\><menu|Developer|Export
Sessions...>\<#5C31\>\<#53EF\>\<#4EE5\>\<#5BFC\>\<#51FA\>\<#6240\>\<#6709\>\<#7684\>\<#4EE3\>\<#7801\>\<#5230\>\<#5355\>\<#4E2A\>\<#6587\>\<#4EF6\><verbatim|code.scm>\<#4E2D\>\<#3002\>\<#7136\>\<#540E\><menu|\<#8F6C\>\<#5230\>|\<#65E0\>\<#6807\>\<#9898\>\<#6587\>\<#4EF6\>>\<#FF0C\>\<#5F00\>\<#542F\>\<#4E00\>\<#4E2A\><scheme>\<#8FDB\>\<#7A0B\>\<#5E76\>\<#8F93\>\<#5165\><scm|(load
"/path/to/code.scm")>\<#FF0C\>\<#56DE\>\<#8F66\>\<#4E4B\>\<#540E\>\<#FF0C\>\<#6587\>\<#4E2D\>\<#6240\>\<#6709\>\<#7684\>\<#4EE3\>\<#7801\>\<#5C31\>\<#90FD\>\<#88AB\>\<#52A0\>\<#8F7D\>\<#4E86\>\<#3002\>
<subsubsection|逆向工程>
<subsubsection|\<#9006\>\<#5411\>\<#5DE5\>\<#7A0B\>>
<subsection|参考资料>
<subsection|\<#53C2\>\<#8003\>\<#8D44\>\<#6599\>>
<\itemize>
<item>A TeXmacs graphics tutorial<\footnote>
@ -677,75 +678,76 @@
<\auxiliary>
<\collection>
<\associate|idx>
<tuple|<tuple|<with|font-family|<quote|ss>|插入>|<with|font-family|<quote|ss>|会话>|<with|font-family|<quote|ss>|Scheme>>|<pageref|auto-3>>
<tuple|<tuple|<with|font-family|<quote|ss>|\<#63D2\>\<#5165\>>|<with|font-family|<quote|ss>|\<#4F1A\>\<#8BDD\>>|<with|font-family|<quote|ss>|Scheme>>|<pageref|auto-3>>
<tuple|<tuple|<with|font-family|<quote|ss>|帮助>|<with|font-family|<quote|ss>|用户手册>|<with|font-family|<quote|ss>|内置作图工具>>|<pageref|auto-8>>
<tuple|<tuple|<with|font-family|<quote|ss>|\<#5E2E\>\<#52A9\>>|<with|font-family|<quote|ss>|\<#7528\>\<#6237\>\<#624B\>\<#518C\>>|<with|font-family|<quote|ss>|\<#5185\>\<#7F6E\>\<#4F5C\>\<#56FE\>\<#5DE5\>\<#5177\>>>|<pageref|auto-8>>
<tuple|<tuple|<with|font-family|<quote|ss>|工具>|<with|font-family|<quote|ss>|开发菜单>>|<pageref|auto-23>>
<tuple|<tuple|<with|font-family|<quote|ss>|\<#5DE5\>\<#5177\>>|<with|font-family|<quote|ss>|\<#5F00\>\<#53D1\>\<#83DC\>\<#5355\>>>|<pageref|auto-23>>
<tuple|<tuple|<with|font-family|<quote|ss>|开发者>|<with|font-family|<quote|ss>|Export
<tuple|<tuple|<with|font-family|<quote|ss>|\<#5F00\>\<#53D1\>\<#8005\>>|<with|font-family|<quote|ss>|Export
Sessions...>>|<pageref|auto-24>>
<tuple|<tuple|<with|font-family|<quote|ss>|转到>|<with|font-family|<quote|ss>|无标题文件>>|<pageref|auto-25>>
<tuple|<tuple|<with|font-family|<quote|ss>|\<#8F6C\>\<#5230\>>|<with|font-family|<quote|ss>|\<#65E0\>\<#6807\>\<#9898\>\<#6587\>\<#4EF6\>>>|<pageref|auto-25>>
</associate>
<\associate|table>
<tuple|normal|<\surround|<hidden-binding|<tuple>|1>|>
\;
</surround>|<pageref|auto-5>>
<tuple|normal|<surround|<hidden-binding|<tuple>|2>||部分对象属性>|<pageref|auto-7>>
<tuple|normal|<surround|<hidden-binding|<tuple>|2>||\<#90E8\>\<#5206\>\<#5BF9\>\<#8C61\>\<#5C5E\>\<#6027\>>|<pageref|auto-7>>
</associate>
<\associate|toc>
1<space|2spc>简介 <datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
1<space|2spc>\<#7B80\>\<#4ECB\> <datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-1>
2<space|2spc>基本原理 <datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
2<space|2spc>\<#57FA\>\<#672C\>\<#539F\>\<#7406\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-2>
<with|par-left|<quote|1tab>|2.1<space|2spc>原语
<with|par-left|<quote|1tab>|2.1<space|2spc>\<#539F\>\<#8BED\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-4>>
<with|par-left|<quote|1tab>|2.2<space|2spc>操纵样式属性
<with|par-left|<quote|1tab>|2.2<space|2spc>\<#64CD\>\<#7EB5\>\<#6837\>\<#5F0F\>\<#5C5E\>\<#6027\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-6>>
<with|par-left|<quote|1tab>|2.3<space|2spc>摆弄画布
<with|par-left|<quote|1tab>|2.3<space|2spc>\<#6446\>\<#5F04\>\<#753B\>\<#5E03\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-9>>
3<space|2spc>画廊 <datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
3<space|2spc>\<#753B\>\<#5ECA\> <datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-10>
<with|par-left|<quote|1tab>|3.1<space|2spc>金刚石图案
<with|par-left|<quote|1tab>|3.1<space|2spc>\<#91D1\>\<#521A\>\<#77F3\>\<#56FE\>\<#6848\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-11>>
<with|par-left|<quote|1tab>|3.2<space|2spc>圆环图案
<with|par-left|<quote|1tab>|3.2<space|2spc>\<#5706\>\<#73AF\>\<#56FE\>\<#6848\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-12>>
<with|par-left|<quote|1tab>|3.3<space|2spc>肾形图案
<with|par-left|<quote|1tab>|3.3<space|2spc>\<#80BE\>\<#5F62\>\<#56FE\>\<#6848\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-13>>
<with|par-left|<quote|1tab>|3.4<space|2spc>心脏形图案
<with|par-left|<quote|1tab>|3.4<space|2spc>\<#5FC3\>\<#810F\>\<#5F62\>\<#56FE\>\<#6848\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-14>>
<with|par-left|<quote|1tab>|3.5<space|2spc>分形图案
<with|par-left|<quote|1tab>|3.5<space|2spc>\<#5206\>\<#5F62\>\<#56FE\>\<#6848\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-15>>
<with|par-left|<quote|2tab>|3.5.1<space|2spc>
<with|par-left|<quote|2tab>|3.5.1<space|2spc>\<#6811\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-16>>
<with|par-left|<quote|2tab>|3.5.2<space|2spc>Koch
snowflake<assign|footnote-nr|7><hidden-binding|<tuple>|7><\float|footnote|>
<with|font-size|<quote|0.771>|<with|par-mode|<quote|justify>|par-left|<quote|0cm>|par-right|<quote|0cm>|font-shape|<quote|right>|dummy|<quote|1.0fn>|dummy|<quote|7.5fn>|<\surround|<locus|<id|%-52A10B5C8--528F31208>|<link|hyperlink|<id|%-52A10B5C8--528F31208>|<url|#footnr-7>>|7>.
<with|font-size|<quote|0.771>|<with|par-mode|<quote|justify>|par-left|<quote|0cm>|par-right|<quote|0cm>|font-shape|<quote|right>|dummy|<quote|1.0fn>|dummy|<quote|7.5fn>|<\surround|<locus|<id|%356995400-359625C80>|<link|hyperlink|<id|%356995400-359625C80>|<url|#footnr-7>>|7>.
|<hidden-binding|<tuple|footnote-7>|7><specific|texmacs|<htab|0fn|first>>>
<locus|<id|%-52A10B5C8--528F31298>|<link|hyperlink|<id|%-52A10B5C8--528F31298>|<url|https://en.wikipedia.org/wiki/Koch_snowflake>>|<with|font-family|<quote|tt>|language|<quote|verbatim>|https://en.wikipedia.org/wiki/Koch_snowflake>>
<locus|<id|%356995400-359625D40>|<link|hyperlink|<id|%356995400-359625D40>|<url|https://en.wikipedia.org/wiki/Koch_snowflake>>|<with|font-family|<quote|tt>|language|<quote|verbatim>|https://en.wikipedia.org/wiki/Koch_snowflake>>
</surround>>>
</float><space|0spc><rsup|<with|font-shape|<quote|right>|<reference|footnote-7>>>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
@ -753,15 +755,15 @@
<with|par-left|<quote|2tab>|3.5.3<space|2spc>Sierpinski
carpet<assign|footnote-nr|10><hidden-binding|<tuple>|10><\float|footnote|>
<with|font-size|<quote|0.771>|<with|par-mode|<quote|justify>|par-left|<quote|0cm>|par-right|<quote|0cm>|font-shape|<quote|right>|dummy|<quote|1.0fn>|dummy|<quote|7.5fn>|<\surround|<locus|<id|%-52A10B5C8--528F31360>|<link|hyperlink|<id|%-52A10B5C8--528F31360>|<url|#footnr-10>>|10>.
<with|font-size|<quote|0.771>|<with|par-mode|<quote|justify>|par-left|<quote|0cm>|par-right|<quote|0cm>|font-shape|<quote|right>|dummy|<quote|1.0fn>|dummy|<quote|7.5fn>|<\surround|<locus|<id|%356995400-359625E20>|<link|hyperlink|<id|%356995400-359625E20>|<url|#footnr-10>>|10>.
|<hidden-binding|<tuple|footnote-10>|10><specific|texmacs|<htab|0fn|first>>>
<locus|<id|%-52A10B5C8--528F313F0>|<link|hyperlink|<id|%-52A10B5C8--528F313F0>|<url|https://en.wikipedia.org/wiki/Sierpinski_carpet>>|<with|font-family|<quote|tt>|language|<quote|verbatim>|https://en.wikipedia.org/wiki/Sierpinski_carpet>>
<locus|<id|%356995400-359625BE0>|<link|hyperlink|<id|%356995400-359625BE0>|<url|https://en.wikipedia.org/wiki/Sierpinski_carpet>>|<with|font-family|<quote|tt>|language|<quote|verbatim>|https://en.wikipedia.org/wiki/Sierpinski_carpet>>
</surround>>>
</float><space|0spc><rsup|<with|font-shape|<quote|right>|<reference|footnote-10>>>
and triangle<assign|footnote-nr|11><hidden-binding|<tuple>|11><\float|footnote|>
<with|font-size|<quote|0.771>|<with|par-mode|<quote|justify>|par-left|<quote|0cm>|par-right|<quote|0cm>|font-shape|<quote|right>|dummy|<quote|1.0fn>|dummy|<quote|7.5fn>|<\surround|<locus|<id|%-52A10B5C8--528F60A28>|<link|hyperlink|<id|%-52A10B5C8--528F60A28>|<url|#footnr-11>>|11>.
<with|font-size|<quote|0.771>|<with|par-mode|<quote|justify>|par-left|<quote|0cm>|par-right|<quote|0cm>|font-shape|<quote|right>|dummy|<quote|1.0fn>|dummy|<quote|7.5fn>|<\surround|<locus|<id|%356995400-359625880>|<link|hyperlink|<id|%356995400-359625880>|<url|#footnr-11>>|11>.
|<hidden-binding|<tuple|footnote-11>|11><specific|texmacs|<htab|0fn|first>>>
<locus|<id|%-52A10B5C8--528F319F8>|<link|hyperlink|<id|%-52A10B5C8--528F319F8>|<url|https://en.wikipedia.org/wiki/Sierpinski_triangle>>|<with|font-family|<quote|tt>|language|<quote|verbatim>|https://en.wikipedia.org/wiki/Sierpinski_triangle>>
<locus|<id|%356995400-359625100>|<link|hyperlink|<id|%356995400-359625100>|<url|https://en.wikipedia.org/wiki/Sierpinski_triangle>>|<with|font-family|<quote|tt>|language|<quote|verbatim>|https://en.wikipedia.org/wiki/Sierpinski_triangle>>
</surround>>>
</float><space|0spc><rsup|<with|font-shape|<quote|right>|<reference|footnote-11>>>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
@ -769,30 +771,30 @@
<with|par-left|<quote|2tab>|3.5.4<space|2spc>Mandelbrot
set<assign|footnote-nr|16><hidden-binding|<tuple>|16><\float|footnote|>
<with|font-size|<quote|0.771>|<with|par-mode|<quote|justify>|par-left|<quote|0cm>|par-right|<quote|0cm>|font-shape|<quote|right>|dummy|<quote|1.0fn>|dummy|<quote|7.5fn>|<\surround|<locus|<id|%-52A10B5C8--528F4F6E8>|<link|hyperlink|<id|%-52A10B5C8--528F4F6E8>|<url|#footnr-16>>|16>.
<with|font-size|<quote|0.771>|<with|par-mode|<quote|justify>|par-left|<quote|0cm>|par-right|<quote|0cm>|font-shape|<quote|right>|dummy|<quote|1.0fn>|dummy|<quote|7.5fn>|<\surround|<locus|<id|%356995400-359625260>|<link|hyperlink|<id|%356995400-359625260>|<url|#footnr-16>>|16>.
|<hidden-binding|<tuple|footnote-16>|16><specific|texmacs|<htab|0fn|first>>>
<locus|<id|%-52A10B5C8--528F4F7A0>|<link|hyperlink|<id|%-52A10B5C8--528F4F7A0>|<url|https://en.wikipedia.org/wiki/Mandelbrot_set>>|<with|font-family|<quote|tt>|language|<quote|verbatim>|https://en.wikipedia.org/wiki/Mandelbrot_set>>
<locus|<id|%356995400-359625D80>|<link|hyperlink|<id|%356995400-359625D80>|<url|https://en.wikipedia.org/wiki/Mandelbrot_set>>|<with|font-family|<quote|tt>|language|<quote|verbatim>|https://en.wikipedia.org/wiki/Mandelbrot_set>>
</surround>>>
</float><space|0spc><rsup|<with|font-shape|<quote|right>|<reference|footnote-16>>>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-19>>
4<space|2spc>附录 <datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
4<space|2spc>\<#9644\>\<#5F55\> <datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-20>
<with|par-left|<quote|1tab>|4.1<space|2spc>小贴士
<with|par-left|<quote|1tab>|4.1<space|2spc>\<#5C0F\>\<#8D34\>\<#58EB\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-21>>
<with|par-left|<quote|2tab>|4.1.1<space|2spc>对本文所有的<with|font-shape|<quote|small-caps>|Scheme>表达式求值
<with|par-left|<quote|2tab>|4.1.1<space|2spc>\<#5BF9\>\<#672C\>\<#6587\>\<#6240\>\<#6709\>\<#7684\><with|font-shape|<quote|small-caps>|Scheme>\<#8868\>\<#8FBE\>\<#5F0F\>\<#6C42\>\<#503C\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-22>>
<with|par-left|<quote|2tab>|4.1.2<space|2spc>逆向工程
<with|par-left|<quote|2tab>|4.1.2<space|2spc>\<#9006\>\<#5411\>\<#5DE5\>\<#7A0B\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-26>>
<with|par-left|<quote|1tab>|4.2<space|2spc>参考资料
<with|par-left|<quote|1tab>|4.2<space|2spc>\<#53C2\>\<#8003\>\<#8D44\>\<#6599\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-27>>
</associate>

View file

@ -4,19 +4,19 @@
<\body>
<\hide-preamble>
<assign|myspace|http://git.tmml.wiki/XmacsLabs/planet/raw/main/墨干编辑器/>
<assign|myspace|http://git.tmml.wiki/XmacsLabs/planet/raw/main/\<#58A8\>\<#5E72\>\<#7F16\>\<#8F91\>\<#5668\>/>
<assign|gitlink|<macro|name|<hlink|<arg|name>|<merge|<value|myspace>|<arg|name>|.tm>>>>
</hide-preamble>
<doc-data|<doc-title|墨干编辑器:从入门到精通>>
<doc-data|<doc-title|\<#58A8\>\<#5E72\>\<#7F16\>\<#8F91\>\<#5668\>\<#FF1A\>\<#4ECE\>\<#5165\>\<#95E8\>\<#5230\>\<#7CBE\>\<#901A\>>>
<section*|文章列表>
<section*|\<#6587\>\<#7AE0\>\<#5217\>\<#8868\>>
<\itemize>
<item><gitlink|数学结构入门>
<item><gitlink|\<#6570\>\<#5B66\>\<#7ED3\>\<#6784\>\<#5165\>\<#95E8\>>
<item><gitlink|TeXmacs图形编程>
<item><gitlink|TeXmacs\<#56FE\>\<#5F62\>\<#7F16\>\<#7A0B\>>
</itemize>
</body>
@ -35,7 +35,7 @@
<\auxiliary>
<\collection>
<\associate|toc>
<vspace*|1fn><with|font-series|<quote|bold>|math-font-series|<quote|bold>|文章列表>
<vspace*|1fn><with|font-series|<quote|bold>|math-font-series|<quote|bold>|\<#6587\>\<#7AE0\>\<#5217\>\<#8868\>>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-1><vspace|0.5fn>
</associate>

View file

@ -7,102 +7,103 @@
<assign|term|<macro|x|<translate|<arg|x>|english|chinese><glossary-explain|<arg|x>|<translate|<arg|x>|english|chinese>>>>
</hide-preamble>
<doc-data|<doc-title|数学结构入门>|<doc-author|<author-data|<author-name|沈达>>>>
<doc-data|<doc-title|\<#6570\>\<#5B66\>\<#7ED3\>\<#6784\>\<#5165\>\<#95E8\>>|<doc-author|<author-data|<author-name|\<#6C88\>\<#8FBE\>>>>>
<subsection|上标和下标>
<subsection|\<#4E0A\>\<#6807\>\<#548C\>\<#4E0B\>\<#6807\>>
\;
<term|superscript>和<term|subscript>是最基础的数学结构。除了上标和下标,还有<term|left
superscript>、<term|left subscript>、<term|script above>和<term|script
below>。
<term|superscript>\<#548C\><term|subscript>\<#662F\>\<#6700\>\<#57FA\>\<#7840\>\<#7684\>\<#6570\>\<#5B66\>\<#7ED3\>\<#6784\>\<#3002\>\<#9664\>\<#4E86\>\<#4E0A\>\<#6807\>\<#548C\>\<#4E0B\>\<#6807\>\<#FF0C\>\<#8FD8\>\<#6709\><term|left
superscript>\<#3001\><term|left subscript>\<#3001\><term|script
above>\<#548C\><term|script below>\<#3002\>
<\big-table|<tabular|<tformat|<cwith|1|1|1|-1|cell-background|pastel
green>|<cwith|1|-1|1|-1|cell-halign|c>|<cwith|4|4|2|2|cell-row-span|2>|<cwith|4|4|2|2|cell-col-span|1>|<cwith|1|-1|1|-1|cell-valign|c>|<table|<row|<cell|上下标>|<cell|示例>|<cell|输入方式>>|<row|<cell|上标>|<cell|<math|360<rsup|\<circ\>>>>|<cell|<key|^>>>|<row|<cell|下标>|<cell|<math|A<rsub|i
j>>>|<cell|<key|_>>>|<row|<cell|左上标>|<cell|<math|<lsup|227><lsub|90>Th>>|<cell|>>|<row|<cell|左下标>|<cell|>|<cell|>>|<row|<cell|正上标>|<cell|<math|<above|<text|您>|<text|nín>><above|<text|好>|<text|h\<#001CE\>o>>>>|<cell|<menu|Insert|Script|Script
above>>>|<row|<cell|正下标>|<cell|<math|<below|min|i>>>|<cell|<menu|Insert|Script|Script
green>|<cwith|1|-1|1|-1|cell-halign|c>|<cwith|4|4|2|2|cell-row-span|2>|<cwith|4|4|2|2|cell-col-span|1>|<cwith|1|-1|1|-1|cell-valign|c>|<table|<row|<cell|\<#4E0A\>\<#4E0B\>\<#6807\>>|<cell|\<#793A\>\<#4F8B\>>|<cell|\<#8F93\>\<#5165\>\<#65B9\>\<#5F0F\>>>|<row|<cell|\<#4E0A\>\<#6807\>>|<cell|<math|360<rsup|\<circ\>>>>|<cell|<key|^>>>|<row|<cell|\<#4E0B\>\<#6807\>>|<cell|<math|A<rsub|i
j>>>|<cell|<key|_>>>|<row|<cell|\<#5DE6\>\<#4E0A\>\<#6807\>>|<cell|<math|<lsup|227><lsub|90>Th>>|<cell|>>|<row|<cell|\<#5DE6\>\<#4E0B\>\<#6807\>>|<cell|>|<cell|>>|<row|<cell|\<#6B63\>\<#4E0A\>\<#6807\>>|<cell|<math|<above|<text|\<#60A8\>>|<text|n\<#00ED\>n>><above|<text|\<#597D\>>|<text|h\<#001CE\>o>>>>|<cell|<menu|Insert|Script|Script
above>>>|<row|<cell|\<#6B63\>\<#4E0B\>\<#6807\>>|<cell|<math|<below|min|i>>>|<cell|<menu|Insert|Script|Script
below>>>>>>>
上下标的输入方式
\<#4E0A\>\<#4E0B\>\<#6807\>\<#7684\>\<#8F93\>\<#5165\>\<#65B9\>\<#5F0F\>
</big-table>
<term|left subscript>和<term|left subscript>的输入,稍稍有一些不一样,按照从左到右的顺序,我们可以先用<menu|Insert|Script|Left
Subscript>输入左上标,然后再把光标往右移出左下标的作用范围,输入左下标所依附的主体,最后将光标移动到<term|left
subscript>的作用范围内,使用<term|focus dependent
icons>里面的<icon|tm_insert_up.svg>按钮,就可以进入<term|left
superscript>的输入结构。
<term|left subscript>\<#548C\><term|left
subscript>\<#7684\>\<#8F93\>\<#5165\>\<#FF0C\>\<#7A0D\>\<#7A0D\>\<#6709\>\<#4E00\>\<#4E9B\>\<#4E0D\>\<#4E00\>\<#6837\>\<#FF0C\>\<#6309\>\<#7167\>\<#4ECE\>\<#5DE6\>\<#5230\>\<#53F3\>\<#7684\>\<#987A\>\<#5E8F\>\<#FF0C\>\<#6211\>\<#4EEC\>\<#53EF\>\<#4EE5\>\<#5148\>\<#7528\><menu|Insert|Script|Left
Subscript>\<#8F93\>\<#5165\>\<#5DE6\>\<#4E0A\>\<#6807\>\<#FF0C\>\<#7136\>\<#540E\>\<#518D\>\<#628A\>\<#5149\>\<#6807\>\<#5F80\>\<#53F3\>\<#79FB\>\<#51FA\>\<#5DE6\>\<#4E0B\>\<#6807\>\<#7684\>\<#4F5C\>\<#7528\>\<#8303\>\<#56F4\>\<#FF0C\>\<#8F93\>\<#5165\>\<#5DE6\>\<#4E0B\>\<#6807\>\<#6240\>\<#4F9D\>\<#9644\>\<#7684\>\<#4E3B\>\<#4F53\>\<#FF0C\>\<#6700\>\<#540E\>\<#5C06\>\<#5149\>\<#6807\>\<#79FB\>\<#52A8\>\<#5230\><term|left
subscript>\<#7684\>\<#4F5C\>\<#7528\>\<#8303\>\<#56F4\>\<#5185\>\<#FF0C\>\<#4F7F\>\<#7528\><term|focus
dependent icons>\<#91CC\>\<#9762\>\<#7684\><icon|tm_insert_up.svg>\<#6309\>\<#94AE\>\<#FF0C\>\<#5C31\>\<#53EF\>\<#4EE5\>\<#8FDB\>\<#5165\><term|left
superscript>\<#7684\>\<#8F93\>\<#5165\>\<#7ED3\>\<#6784\>\<#3002\>
<subsection|分式>
<subsection|\<#5206\>\<#5F0F\>>
\;
分式不仅可以在数学模式下使用,在文本模式下,也可以输入。使用命令<markup|frac><\footnote>
命令<markup|frac>:是指使用<key|\\><key|f><key|r><key|a><key|c><key|return>这样的按键序列来输入内容,按下<key|\\>之后进入进入<LaTeX>/<TeXmacs>混合命令模式,然后输入命令,最后按下回车键。下文中提到的其它命令,也是类似的输入方式。
</footnote>,在任何模式下都可以使用分式。不同的系统下,在数学模式中输入分式的快捷键<\footnote>
<key|escape escape>这个快捷键前缀是随系统变化的在macOS中是Option键。而<key*|escape
escape>是不随系统变化的都是按两下ESC键。
</footnote>是不同的:
\<#5206\>\<#5F0F\>\<#4E0D\>\<#4EC5\>\<#53EF\>\<#4EE5\>\<#5728\>\<#6570\>\<#5B66\>\<#6A21\>\<#5F0F\>\<#4E0B\>\<#4F7F\>\<#7528\>\<#FF0C\>\<#5728\>\<#6587\>\<#672C\>\<#6A21\>\<#5F0F\>\<#4E0B\>\<#FF0C\>\<#4E5F\>\<#53EF\>\<#4EE5\>\<#8F93\>\<#5165\>\<#3002\>\<#4F7F\>\<#7528\>\<#547D\>\<#4EE4\><markup|frac><\footnote>
\<#547D\>\<#4EE4\><markup|frac>\<#FF1A\>\<#662F\>\<#6307\>\<#4F7F\>\<#7528\><key|\\><key|f><key|r><key|a><key|c><key|return>\<#8FD9\>\<#6837\>\<#7684\>\<#6309\>\<#952E\>\<#5E8F\>\<#5217\>\<#6765\>\<#8F93\>\<#5165\>\<#5185\>\<#5BB9\>\<#FF0C\>\<#6309\>\<#4E0B\><key|\\>\<#4E4B\>\<#540E\>\<#8FDB\>\<#5165\>\<#8FDB\>\<#5165\><LaTeX>/<TeXmacs>\<#6DF7\>\<#5408\>\<#547D\>\<#4EE4\>\<#6A21\>\<#5F0F\>\<#FF0C\>\<#7136\>\<#540E\>\<#8F93\>\<#5165\>\<#547D\>\<#4EE4\>\<#FF0C\>\<#6700\>\<#540E\>\<#6309\>\<#4E0B\>\<#56DE\>\<#8F66\>\<#952E\>\<#3002\>\<#4E0B\>\<#6587\>\<#4E2D\>\<#63D0\>\<#5230\>\<#7684\>\<#5176\>\<#5B83\>\<#547D\>\<#4EE4\>\<#FF0C\>\<#4E5F\>\<#662F\>\<#7C7B\>\<#4F3C\>\<#7684\>\<#8F93\>\<#5165\>\<#65B9\>\<#5F0F\>\<#3002\>
</footnote>\<#FF0C\>\<#5728\>\<#4EFB\>\<#4F55\>\<#6A21\>\<#5F0F\>\<#4E0B\>\<#90FD\>\<#53EF\>\<#4EE5\>\<#4F7F\>\<#7528\>\<#5206\>\<#5F0F\>\<#3002\>\<#4E0D\>\<#540C\>\<#7684\>\<#7CFB\>\<#7EDF\>\<#4E0B\>\<#FF0C\>\<#5728\>\<#6570\>\<#5B66\>\<#6A21\>\<#5F0F\>\<#4E2D\>\<#8F93\>\<#5165\>\<#5206\>\<#5F0F\>\<#7684\>\<#5FEB\>\<#6377\>\<#952E\><\footnote>
<key|escape escape>\<#8FD9\>\<#4E2A\>\<#5FEB\>\<#6377\>\<#952E\>\<#524D\>\<#7F00\>\<#662F\>\<#968F\>\<#7CFB\>\<#7EDF\>\<#53D8\>\<#5316\>\<#7684\>\<#FF0C\>\<#5728\>macOS\<#4E2D\>\<#662F\>Option\<#952E\>\<#3002\>\<#800C\><key*|escape
escape>\<#662F\>\<#4E0D\>\<#968F\>\<#7CFB\>\<#7EDF\>\<#53D8\>\<#5316\>\<#7684\>\<#FF0C\>\<#90FD\>\<#662F\>\<#6309\>\<#4E24\>\<#4E0B\>ESC\<#952E\>\<#3002\>
</footnote>\<#662F\>\<#4E0D\>\<#540C\>\<#7684\>\<#FF1A\>
<\big-table|<tabular|<tformat|<cwith|1|1|2|2|cell-valign|b>|<cwith|1|-1|1|-1|cell-halign|c>|<cwith|1|1|1|-1|cell-background|pastel
green>|<table|<row|<cell|输入方式>|<cell|适用场景>|<cell|系统>>|<row|<cell|<markup|frac>>|<cell|任意模式>|<cell|通用>>|<row|<cell|<menu|Insert|Fraction>>|<cell|数学模式>|<cell|通用>>|<row|<cell|<key|escape
escape><key|f>>|<cell|数学模式>|<cell|随系统变化>>|<row|<cell|<key*|escape
escape><key|f>>|<cell|数学模式>|<cell|通用>>>>>>
分式的输入方式
green>|<table|<row|<cell|\<#8F93\>\<#5165\>\<#65B9\>\<#5F0F\>>|<cell|\<#9002\>\<#7528\>\<#573A\>\<#666F\>>|<cell|\<#7CFB\>\<#7EDF\>>>|<row|<cell|<markup|frac>>|<cell|\<#4EFB\>\<#610F\>\<#6A21\>\<#5F0F\>>|<cell|\<#901A\>\<#7528\>>>|<row|<cell|<menu|Insert|Fraction>>|<cell|\<#6570\>\<#5B66\>\<#6A21\>\<#5F0F\>>|<cell|\<#901A\>\<#7528\>>>|<row|<cell|<key|escape
escape><key|f>>|<cell|\<#6570\>\<#5B66\>\<#6A21\>\<#5F0F\>>|<cell|\<#968F\>\<#7CFB\>\<#7EDF\>\<#53D8\>\<#5316\>>>|<row|<cell|<key*|escape
escape><key|f>>|<cell|\<#6570\>\<#5B66\>\<#6A21\>\<#5F0F\>>|<cell|\<#901A\>\<#7528\>>>>>>>
\<#5206\>\<#5F0F\>\<#7684\>\<#8F93\>\<#5165\>\<#65B9\>\<#5F0F\>
</big-table>
<subsection|根式>
<subsection|\<#6839\>\<#5F0F\>>
\;
根式和分式类似,在所有模式下都可以使用,不过一般我们只在数学模式下使用。就平方根<glossary-explain|square
root|平方根>而言,输入方式如下表所示:
\<#6839\>\<#5F0F\>\<#548C\>\<#5206\>\<#5F0F\>\<#7C7B\>\<#4F3C\>\<#FF0C\>\<#5728\>\<#6240\>\<#6709\>\<#6A21\>\<#5F0F\>\<#4E0B\>\<#90FD\>\<#53EF\>\<#4EE5\>\<#4F7F\>\<#7528\>\<#FF0C\>\<#4E0D\>\<#8FC7\>\<#4E00\>\<#822C\>\<#6211\>\<#4EEC\>\<#53EA\>\<#5728\>\<#6570\>\<#5B66\>\<#6A21\>\<#5F0F\>\<#4E0B\>\<#4F7F\>\<#7528\>\<#3002\>\<#5C31\>\<#5E73\>\<#65B9\>\<#6839\><glossary-explain|square
root|\<#5E73\>\<#65B9\>\<#6839\>>\<#800C\>\<#8A00\>\<#FF0C\>\<#8F93\>\<#5165\>\<#65B9\>\<#5F0F\>\<#5982\>\<#4E0B\>\<#8868\>\<#6240\>\<#793A\>\<#FF1A\>
<\big-table|<tabular|<tformat|<cwith|1|-1|1|-1|cell-halign|c>|<cwith|4|4|1|1|cell-valign|b>|<table|<row|<cell|输入方式>|<cell|适用场景>|<cell|系统>>|<row|<cell|<markup|sqrt>>|<cell|任意模式>|<cell|通用>>|<row|<cell|<menu|Insert|Square
root>>|<cell|任意模式>|<cell|通用>>|<row|<cell|<key|escape
escape><key|s>>|<cell|数学模式>|<cell|随系统变化>>|<row|<cell|<key*|escape
escape><key|s>>|<cell|数学模式>|<cell|通用>>>>>>
平方根的输入方式
<\big-table|<tabular|<tformat|<cwith|1|-1|1|-1|cell-halign|c>|<cwith|4|4|1|1|cell-valign|b>|<table|<row|<cell|\<#8F93\>\<#5165\>\<#65B9\>\<#5F0F\>>|<cell|\<#9002\>\<#7528\>\<#573A\>\<#666F\>>|<cell|\<#7CFB\>\<#7EDF\>>>|<row|<cell|<markup|sqrt>>|<cell|\<#4EFB\>\<#610F\>\<#6A21\>\<#5F0F\>>|<cell|\<#901A\>\<#7528\>>>|<row|<cell|<menu|Insert|Square
root>>|<cell|\<#4EFB\>\<#610F\>\<#6A21\>\<#5F0F\>>|<cell|\<#901A\>\<#7528\>>>|<row|<cell|<key|escape
escape><key|s>>|<cell|\<#6570\>\<#5B66\>\<#6A21\>\<#5F0F\>>|<cell|\<#968F\>\<#7CFB\>\<#7EDF\>\<#53D8\>\<#5316\>>>|<row|<cell|<key*|escape
escape><key|s>>|<cell|\<#6570\>\<#5B66\>\<#6A21\>\<#5F0F\>>|<cell|\<#901A\>\<#7528\>>>>>>>
\<#5E73\>\<#65B9\>\<#6839\>\<#7684\>\<#8F93\>\<#5165\>\<#65B9\>\<#5F0F\>
</big-table>
对于高次方根<glossary-explain|multiple
root|高次方根>,在数学模式下,可以使用菜单项<menu|Insert|Multiple
root>插入。也可以在输入平方根的当下<\footnote>
当下:指在输入平方根之后,立即按下<key|tab>。另外,使用命令输入之后,该方式无效。
</footnote>,使用<key|tab>将平方根切换到高次方根。
\<#5BF9\>\<#4E8E\>\<#9AD8\>\<#6B21\>\<#65B9\>\<#6839\><glossary-explain|multiple
root|\<#9AD8\>\<#6B21\>\<#65B9\>\<#6839\>>\<#FF0C\>\<#5728\>\<#6570\>\<#5B66\>\<#6A21\>\<#5F0F\>\<#4E0B\>\<#FF0C\>\<#53EF\>\<#4EE5\>\<#4F7F\>\<#7528\>\<#83DC\>\<#5355\>\<#9879\><menu|Insert|Multiple
root>\<#63D2\>\<#5165\>\<#3002\>\<#4E5F\>\<#53EF\>\<#4EE5\>\<#5728\>\<#8F93\>\<#5165\>\<#5E73\>\<#65B9\>\<#6839\>\<#7684\>\<#5F53\>\<#4E0B\><\footnote>
\<#5F53\>\<#4E0B\>\<#FF1A\>\<#6307\>\<#5728\>\<#8F93\>\<#5165\>\<#5E73\>\<#65B9\>\<#6839\>\<#4E4B\>\<#540E\>\<#FF0C\>\<#7ACB\>\<#5373\>\<#6309\>\<#4E0B\><key|tab>\<#3002\>\<#53E6\>\<#5916\>\<#FF0C\>\<#4F7F\>\<#7528\>\<#547D\>\<#4EE4\>\<#8F93\>\<#5165\>\<#4E4B\>\<#540E\>\<#FF0C\>\<#8BE5\>\<#65B9\>\<#5F0F\>\<#65E0\>\<#6548\>\<#3002\>
</footnote>\<#FF0C\>\<#4F7F\>\<#7528\><key|tab>\<#5C06\>\<#5E73\>\<#65B9\>\<#6839\>\<#5207\>\<#6362\>\<#5230\>\<#9AD8\>\<#6B21\>\<#65B9\>\<#6839\>\<#3002\>
除了用菜单、命令、快捷键输入数学结构,也可以使用工具栏。菜单之下,有三个工具栏:
\<#9664\>\<#4E86\>\<#7528\>\<#83DC\>\<#5355\>\<#3001\>\<#547D\>\<#4EE4\>\<#3001\>\<#5FEB\>\<#6377\>\<#952E\>\<#8F93\>\<#5165\>\<#6570\>\<#5B66\>\<#7ED3\>\<#6784\>\<#FF0C\>\<#4E5F\>\<#53EF\>\<#4EE5\>\<#4F7F\>\<#7528\>\<#5DE5\>\<#5177\>\<#680F\>\<#3002\>\<#83DC\>\<#5355\>\<#4E4B\>\<#4E0B\>\<#FF0C\>\<#6709\>\<#4E09\>\<#4E2A\>\<#5DE5\>\<#5177\>\<#680F\>\<#FF1A\>
<\itemize>
<item>主要工具栏:通用功能,不随模式和焦点的改变而变化
<item>\<#4E3B\>\<#8981\>\<#5DE5\>\<#5177\>\<#680F\>\<#FF1A\>\<#901A\>\<#7528\>\<#529F\>\<#80FD\>\<#FF0C\>\<#4E0D\>\<#968F\>\<#6A21\>\<#5F0F\>\<#548C\>\<#7126\>\<#70B9\>\<#7684\>\<#6539\>\<#53D8\>\<#800C\>\<#53D8\>\<#5316\>
<item>模式工具栏:随着模式的改变而变化,数学模式下,模式工具栏比较常用
<item>\<#6A21\>\<#5F0F\>\<#5DE5\>\<#5177\>\<#680F\>\<#FF1A\>\<#968F\>\<#7740\>\<#6A21\>\<#5F0F\>\<#7684\>\<#6539\>\<#53D8\>\<#800C\>\<#53D8\>\<#5316\>\<#FF0C\>\<#6570\>\<#5B66\>\<#6A21\>\<#5F0F\>\<#4E0B\>\<#FF0C\>\<#6A21\>\<#5F0F\>\<#5DE5\>\<#5177\>\<#680F\>\<#6BD4\>\<#8F83\>\<#5E38\>\<#7528\>
<item>焦点工具栏:随着焦点的改变而变化,对应于菜单栏中的焦点菜单
<item>\<#7126\>\<#70B9\>\<#5DE5\>\<#5177\>\<#680F\>\<#FF1A\>\<#968F\>\<#7740\>\<#7126\>\<#70B9\>\<#7684\>\<#6539\>\<#53D8\>\<#800C\>\<#53D8\>\<#5316\>\<#FF0C\>\<#5BF9\>\<#5E94\>\<#4E8E\>\<#83DC\>\<#5355\>\<#680F\>\<#4E2D\>\<#7684\>\<#7126\>\<#70B9\>\<#83DC\>\<#5355\>
</itemize>
\;
在输入平方根之后,我们可以使用<menu|Focus|Multiple
root>将平方根切换为高次方根。焦点菜单中的菜单项,都可以在焦点工具栏中找到对应的按钮。
\<#5728\>\<#8F93\>\<#5165\>\<#5E73\>\<#65B9\>\<#6839\>\<#4E4B\>\<#540E\>\<#FF0C\>\<#6211\>\<#4EEC\>\<#53EF\>\<#4EE5\>\<#4F7F\>\<#7528\><menu|Focus|Multiple
root>\<#5C06\>\<#5E73\>\<#65B9\>\<#6839\>\<#5207\>\<#6362\>\<#4E3A\>\<#9AD8\>\<#6B21\>\<#65B9\>\<#6839\>\<#3002\>\<#7126\>\<#70B9\>\<#83DC\>\<#5355\>\<#4E2D\>\<#7684\>\<#83DC\>\<#5355\>\<#9879\>\<#FF0C\>\<#90FD\>\<#53EF\>\<#4EE5\>\<#5728\>\<#7126\>\<#70B9\>\<#5DE5\>\<#5177\>\<#680F\>\<#4E2D\>\<#627E\>\<#5230\>\<#5BF9\>\<#5E94\>\<#7684\>\<#6309\>\<#94AE\>\<#3002\>
<subsection|矩阵><label|matrix>
<subsection|\<#77E9\>\<#9635\>><label|matrix>
\;
<TeXmacs>的矩阵<glossary-explain|matrix|矩阵>在底层实际上是表格,所以在使用上和表格的操作几乎相同。
<TeXmacs>\<#7684\>\<#77E9\>\<#9635\><glossary-explain|matrix|\<#77E9\>\<#9635\>>\<#5728\>\<#5E95\>\<#5C42\>\<#5B9E\>\<#9645\>\<#4E0A\>\<#662F\>\<#8868\>\<#683C\>\<#FF0C\>\<#6240\>\<#4EE5\>\<#5728\>\<#4F7F\>\<#7528\>\<#4E0A\>\<#548C\>\<#8868\>\<#683C\>\<#7684\>\<#64CD\>\<#4F5C\>\<#51E0\>\<#4E4E\>\<#76F8\>\<#540C\>\<#3002\>
<\big-table|<tabular|<tformat|<cwith|1|1|1|-1|cell-background|pastel
green>|<cwith|1|1|3|3|cell-background|pastel
green>|<table|<row|<cell|amsmath>|<cell|示例>|<cell|命令>>|<row|<cell|matrix>|<cell|<with|math-display|true|<math|<matrix*|<tformat|<table|<row|<cell|a>|<cell|b>>|<row|<cell|c>|<cell|d>>>>>>>>|<cell|<markup|matrix*>>>|<row|<cell|bmatrix>|<cell|<bmatrix|<tformat|<table|<row|<cell|a>|<cell|b>>|<row|<cell|c>|<cell|d>>>>>>|<cell|<markup|bmatrix>>>|<row|<cell|vmatrix>|<cell|<det|<tformat|<table|<row|<cell|a>|<cell|b>>|<row|<cell|c>|<cell|d>>>>>>|<cell|<compound|markup|>>>|<row|<cell|pmatrix>|<cell|<matrix|<tformat|<table|<row|<cell|a>|<cell|b>>|<row|<cell|c>|<cell|d>>>>>>|<cell|<markup|matrix>>>|<row|<cell|Bmatrix>|<cell|<math|<around*|{|<matrix*|<tformat|<table|<row|<cell|a>|<cell|b>>|<row|<cell|c>|<cell|d>>>>>|}>>>|<cell|>>|<row|<cell|Vmatrix>|<cell|<math|<around*|\<\|\|\>|<matrix*|<tformat|<table|<row|<cell|a>|<cell|b>>|<row|<cell|c>|<cell|d>>>>>|\<\|\|\>>>>|<cell|>>>>>>
矩阵一览
green>|<table|<row|<cell|amsmath>|<cell|\<#793A\>\<#4F8B\>>|<cell|\<#547D\>\<#4EE4\>>>|<row|<cell|matrix>|<cell|<with|math-display|true|<math|<matrix*|<tformat|<table|<row|<cell|a>|<cell|b>>|<row|<cell|c>|<cell|d>>>>>>>>|<cell|<markup|matrix*>>>|<row|<cell|bmatrix>|<cell|<bmatrix|<tformat|<table|<row|<cell|a>|<cell|b>>|<row|<cell|c>|<cell|d>>>>>>|<cell|<markup|bmatrix>>>|<row|<cell|vmatrix>|<cell|<det|<tformat|<table|<row|<cell|a>|<cell|b>>|<row|<cell|c>|<cell|d>>>>>>|<cell|<compound|markup|>>>|<row|<cell|pmatrix>|<cell|<matrix|<tformat|<table|<row|<cell|a>|<cell|b>>|<row|<cell|c>|<cell|d>>>>>>|<cell|<markup|matrix>>>|<row|<cell|Bmatrix>|<cell|<math|<around*|{|<matrix*|<tformat|<table|<row|<cell|a>|<cell|b>>|<row|<cell|c>|<cell|d>>>>>|}>>>|<cell|>>|<row|<cell|Vmatrix>|<cell|<math|<around*|\<\|\|\>|<matrix*|<tformat|<table|<row|<cell|a>|<cell|b>>|<row|<cell|c>|<cell|d>>>>>|\<\|\|\>>>>|<cell|>>>>>>
\<#77E9\>\<#9635\>\<#4E00\>\<#89C8\>
</big-table>
AMS-<LaTeX>里面提供了一系列矩阵环境,都可以在<TeXmacs>中轻松输入。如上表所示,其中的matrix,
bmatrix, pmatrix都可以通过<TeXmacs>命令输入而vmatrix即行列式可以通过菜单项<menu|Insert|Table|Determinant><\footnote>
注意:菜单项行列式当且仅当在数学环境中才可见。
</footnote>输入。剩下的Bmatrix和Vmatrix则可以先输入外围的括号再使用命令<markup|matrix*>输入。
AMS-<LaTeX>\<#91CC\>\<#9762\>\<#63D0\>\<#4F9B\>\<#4E86\>\<#4E00\>\<#7CFB\>\<#5217\>\<#77E9\>\<#9635\>\<#73AF\>\<#5883\>\<#FF0C\>\<#90FD\>\<#53EF\>\<#4EE5\>\<#5728\><TeXmacs>\<#4E2D\>\<#8F7B\>\<#677E\>\<#8F93\>\<#5165\>\<#3002\>\<#5982\>\<#4E0A\>\<#8868\>\<#6240\>\<#793A\>\<#FF0C\>\<#5176\>\<#4E2D\>\<#7684\>matrix,
bmatrix, pmatrix\<#90FD\>\<#53EF\>\<#4EE5\>\<#901A\>\<#8FC7\><TeXmacs>\<#547D\>\<#4EE4\>\<#8F93\>\<#5165\>\<#FF0C\>\<#800C\>vmatrix\<#5373\>\<#884C\>\<#5217\>\<#5F0F\>\<#FF0C\>\<#53EF\>\<#4EE5\>\<#901A\>\<#8FC7\>\<#83DC\>\<#5355\>\<#9879\><menu|Insert|Table|Determinant><\footnote>
\<#6CE8\>\<#610F\>\<#FF1A\>\<#83DC\>\<#5355\>\<#9879\>\<#884C\>\<#5217\>\<#5F0F\>\<#5F53\>\<#4E14\>\<#4EC5\>\<#5F53\>\<#5728\>\<#6570\>\<#5B66\>\<#73AF\>\<#5883\>\<#4E2D\>\<#624D\>\<#53EF\>\<#89C1\>\<#3002\>
</footnote>\<#8F93\>\<#5165\>\<#3002\>\<#5269\>\<#4E0B\>\<#7684\>Bmatrix\<#548C\>Vmatrix\<#FF0C\>\<#5219\>\<#53EF\>\<#4EE5\>\<#5148\>\<#8F93\>\<#5165\>\<#5916\>\<#56F4\>\<#7684\>\<#62EC\>\<#53F7\>\<#FF0C\>\<#518D\>\<#4F7F\>\<#7528\>\<#547D\>\<#4EE4\><markup|matrix*>\<#8F93\>\<#5165\>\<#3002\>
矩阵环境中常用的省略号有<markup|dots>, <markup|vdots>,
<markup|ddots>
\<#77E9\>\<#9635\>\<#73AF\>\<#5883\>\<#4E2D\>\<#5E38\>\<#7528\>\<#7684\>\<#7701\>\<#7565\>\<#53F7\>\<#6709\><markup|dots>,
<markup|vdots>, <markup|ddots>\<#FF1A\>
<\equation*>
A=<bmatrix|<tformat|<table|<row|<cell|a<rsub|1
@ -112,18 +113,18 @@
\;
这三种省略号,除了直接用<LaTeX>模拟命令输入,也可以采用<TeXmacs>特有的快捷键系统:
\<#8FD9\>\<#4E09\>\<#79CD\>\<#7701\>\<#7565\>\<#53F7\>\<#FF0C\>\<#9664\>\<#4E86\>\<#76F4\>\<#63A5\>\<#7528\><LaTeX>\<#6A21\>\<#62DF\>\<#547D\>\<#4EE4\>\<#8F93\>\<#5165\>\<#FF0C\>\<#4E5F\>\<#53EF\>\<#4EE5\>\<#91C7\>\<#7528\><TeXmacs>\<#7279\>\<#6709\>\<#7684\>\<#5FEB\>\<#6377\>\<#952E\>\<#7CFB\>\<#7EDF\>\<#FF1A\>
<\big-table|<tabular|<tformat|<cwith|1|1|1|-1|cell-background|pastel
green>|<cwith|1|-1|1|1|cell-halign|c>|<table|<row|<cell|省略号>|<cell|按键序列>>|<row|<cell|<math|\<ldots\>>>|<cell|<key|$><key|.><key|.>>>|<row|<cell|<math|\<vdots\>>>|<cell|<key|$><key|.><key|.><key|tab><key|tab><key|tab>>>|<row|<cell|<math|\<ddots\>>>|<cell|<key|$><key|.><key|.><key|tab><key|tab><key|tab><key|tab>>>>>>>
省略号的输入
green>|<cwith|1|-1|1|1|cell-halign|c>|<table|<row|<cell|\<#7701\>\<#7565\>\<#53F7\>>|<cell|\<#6309\>\<#952E\>\<#5E8F\>\<#5217\>>>|<row|<cell|<math|\<ldots\>>>|<cell|<key|$><key|.><key|.>>>|<row|<cell|<math|\<vdots\>>>|<cell|<key|$><key|.><key|.><key|tab><key|tab><key|tab>>>|<row|<cell|<math|\<ddots\>>>|<cell|<key|$><key|.><key|.><key|tab><key|tab><key|tab><key|tab>>>>>>>
\<#7701\>\<#7565\>\<#53F7\>\<#7684\>\<#8F93\>\<#5165\>
</big-table>
当我们把光标放在省略号之后,就可以在底部状态栏看到光标所在位置省略号的名字。
\<#5F53\>\<#6211\>\<#4EEC\>\<#628A\>\<#5149\>\<#6807\>\<#653E\>\<#5728\>\<#7701\>\<#7565\>\<#53F7\>\<#4E4B\>\<#540E\>\<#FF0C\>\<#5C31\>\<#53EF\>\<#4EE5\>\<#5728\>\<#5E95\>\<#90E8\>\<#72B6\>\<#6001\>\<#680F\>\<#770B\>\<#5230\>\<#5149\>\<#6807\>\<#6240\>\<#5728\>\<#4F4D\>\<#7F6E\>\<#7701\>\<#7565\>\<#53F7\>\<#7684\>\<#540D\>\<#5B57\>\<#3002\>
还有另外两个场景,其本质是矩阵的特殊形式。
\<#8FD8\>\<#6709\>\<#53E6\>\<#5916\>\<#4E24\>\<#4E2A\>\<#573A\>\<#666F\>\<#FF0C\>\<#5176\>\<#672C\>\<#8D28\>\<#662F\>\<#77E9\>\<#9635\>\<#7684\>\<#7279\>\<#6B8A\>\<#5F62\>\<#5F0F\>\<#3002\>
其一是分段函数,在<TeXmacs>中这种数学结构叫做<dfn|选择><glossary-explain|choice|选择>,可以通过<menu|Insert|Table|Choice>输入:
\<#5176\>\<#4E00\>\<#662F\>\<#5206\>\<#6BB5\>\<#51FD\>\<#6570\>\<#FF0C\>\<#5728\><TeXmacs>\<#4E2D\>\<#8FD9\>\<#79CD\>\<#6570\>\<#5B66\>\<#7ED3\>\<#6784\>\<#53EB\>\<#505A\><dfn|\<#9009\>\<#62E9\>><glossary-explain|choice|\<#9009\>\<#62E9\>>\<#FF0C\>\<#53EF\>\<#4EE5\>\<#901A\>\<#8FC7\><menu|Insert|Table|Choice>\<#8F93\>\<#5165\>\<#FF1A\>
<\equation*>
<choice|<tformat|<table|<row|<cell|y=-<frac|1|2>x+3>|<cell|,x\<in\><around*|(|-\<infty\>,0|)>>>|<row|<cell|y=<frac|1|2>x<rsup|2>>|<cell|,x\<in\><around*|[|0,+\<infty\>|)>>>>>>
@ -131,7 +132,7 @@
\;
其二是求和公式下面的<dfn|堆叠><glossary-explain|stack|堆叠>,可以通过<menu|Insert|Table|Stack>输入:
\<#5176\>\<#4E8C\>\<#662F\>\<#6C42\>\<#548C\>\<#516C\>\<#5F0F\>\<#4E0B\>\<#9762\>\<#7684\><dfn|\<#5806\>\<#53E0\>><glossary-explain|stack|\<#5806\>\<#53E0\>>\<#FF0C\>\<#53EF\>\<#4EE5\>\<#901A\>\<#8FC7\><menu|Insert|Table|Stack>\<#8F93\>\<#5165\>\<#FF1A\>
<\equation*>
<big|sum><rsub|<stack|<tformat|<table|<row|<cell|0\<less\>i\<less\>n>>|<row|<cell|0\<less\>j\<less\>m>>>>>>x<rsub|i
@ -196,95 +197,95 @@
<\auxiliary>
<\collection>
<\associate|gly>
<tuple|normal|superscript|上标|<pageref|auto-2>>
<tuple|normal|superscript|\<#4E0A\>\<#6807\>|<pageref|auto-2>>
<tuple|normal|subscript|下标|<pageref|auto-3>>
<tuple|normal|subscript|\<#4E0B\>\<#6807\>|<pageref|auto-3>>
<tuple|normal|left superscript|左上标|<pageref|auto-4>>
<tuple|normal|left superscript|\<#5DE6\>\<#4E0A\>\<#6807\>|<pageref|auto-4>>
<tuple|normal|left subscript|左下标|<pageref|auto-5>>
<tuple|normal|left subscript|\<#5DE6\>\<#4E0B\>\<#6807\>|<pageref|auto-5>>
<tuple|normal|script above|顶标|<pageref|auto-6>>
<tuple|normal|script above|\<#9876\>\<#6807\>|<pageref|auto-6>>
<tuple|normal|script below|底标|<pageref|auto-7>>
<tuple|normal|script below|\<#5E95\>\<#6807\>|<pageref|auto-7>>
<tuple|normal|left subscript|左下标|<pageref|auto-11>>
<tuple|normal|left subscript|\<#5DE6\>\<#4E0B\>\<#6807\>|<pageref|auto-11>>
<tuple|normal|left subscript|左下标|<pageref|auto-12>>
<tuple|normal|left subscript|\<#5DE6\>\<#4E0B\>\<#6807\>|<pageref|auto-12>>
<tuple|normal|left subscript|左下标|<pageref|auto-14>>
<tuple|normal|left subscript|\<#5DE6\>\<#4E0B\>\<#6807\>|<pageref|auto-14>>
<tuple|normal|focus dependent icons|焦点工具栏|<pageref|auto-15>>
<tuple|normal|focus dependent icons|\<#7126\>\<#70B9\>\<#5DE5\>\<#5177\>\<#680F\>|<pageref|auto-15>>
<tuple|normal|left superscript|左上标|<pageref|auto-16>>
<tuple|normal|left superscript|\<#5DE6\>\<#4E0A\>\<#6807\>|<pageref|auto-16>>
<tuple|normal|square root|平方根|<pageref|auto-21>>
<tuple|normal|square root|\<#5E73\>\<#65B9\>\<#6839\>|<pageref|auto-21>>
<tuple|normal|multiple root|高次方根|<pageref|auto-24>>
<tuple|normal|multiple root|\<#9AD8\>\<#6B21\>\<#65B9\>\<#6839\>|<pageref|auto-24>>
<tuple|normal|matrix|矩阵|<pageref|auto-28>>
<tuple|normal|matrix|\<#77E9\>\<#9635\>|<pageref|auto-28>>
<tuple|normal|choice|选择|<pageref|auto-32>>
<tuple|normal|choice|\<#9009\>\<#62E9\>|<pageref|auto-32>>
<tuple|normal|stack|堆叠|<pageref|auto-34>>
<tuple|normal|stack|\<#5806\>\<#53E0\>|<pageref|auto-34>>
</associate>
<\associate|idx>
<tuple|<tuple|<with|font-family|<quote|ss>|插入>|<with|font-family|<quote|ss>|上下标>|<with|font-family|<quote|ss>|顶标>>|<pageref|auto-9>>
<tuple|<tuple|<with|font-family|<quote|ss>|\<#63D2\>\<#5165\>>|<with|font-family|<quote|ss>|\<#4E0A\>\<#4E0B\>\<#6807\>>|<with|font-family|<quote|ss>|\<#9876\>\<#6807\>>>|<pageref|auto-9>>
<tuple|<tuple|<with|font-family|<quote|ss>|插入>|<with|font-family|<quote|ss>|上下标>|<with|font-family|<quote|ss>|底标>>|<pageref|auto-10>>
<tuple|<tuple|<with|font-family|<quote|ss>|\<#63D2\>\<#5165\>>|<with|font-family|<quote|ss>|\<#4E0A\>\<#4E0B\>\<#6807\>>|<with|font-family|<quote|ss>|\<#5E95\>\<#6807\>>>|<pageref|auto-10>>
<tuple|<tuple|<with|font-family|<quote|ss>|插入>|<with|font-family|<quote|ss>|上下标>|<with|font-family|<quote|ss>|Left
<tuple|<tuple|<with|font-family|<quote|ss>|\<#63D2\>\<#5165\>>|<with|font-family|<quote|ss>|\<#4E0A\>\<#4E0B\>\<#6807\>>|<with|font-family|<quote|ss>|Left
Subscript>>|<pageref|auto-13>>
<tuple|<tuple|<with|font-family|<quote|ss>|插入>|<with|font-family|<quote|ss>|分式>>|<pageref|auto-19>>
<tuple|<tuple|<with|font-family|<quote|ss>|\<#63D2\>\<#5165\>>|<with|font-family|<quote|ss>|\<#5206\>\<#5F0F\>>>|<pageref|auto-19>>
<tuple|<tuple|<with|font-family|<quote|ss>|插入>|<with|font-family|<quote|ss>|平方根>>|<pageref|auto-23>>
<tuple|<tuple|<with|font-family|<quote|ss>|\<#63D2\>\<#5165\>>|<with|font-family|<quote|ss>|\<#5E73\>\<#65B9\>\<#6839\>>>|<pageref|auto-23>>
<tuple|<tuple|<with|font-family|<quote|ss>|插入>|<with|font-family|<quote|ss>|高次方根>>|<pageref|auto-25>>
<tuple|<tuple|<with|font-family|<quote|ss>|\<#63D2\>\<#5165\>>|<with|font-family|<quote|ss>|\<#9AD8\>\<#6B21\>\<#65B9\>\<#6839\>>>|<pageref|auto-25>>
<tuple|<tuple|<with|font-family|<quote|ss>|焦点>|<with|font-family|<quote|ss>|高次方根>>|<pageref|auto-26>>
<tuple|<tuple|<with|font-family|<quote|ss>|\<#7126\>\<#70B9\>>|<with|font-family|<quote|ss>|\<#9AD8\>\<#6B21\>\<#65B9\>\<#6839\>>>|<pageref|auto-26>>
<tuple|<tuple|<with|font-family|<quote|ss>|插入>|<with|font-family|<quote|ss>|表格>|<with|font-family|<quote|ss>|行列式>>|<pageref|auto-30>>
<tuple|<tuple|<with|font-family|<quote|ss>|\<#63D2\>\<#5165\>>|<with|font-family|<quote|ss>|\<#8868\>\<#683C\>>|<with|font-family|<quote|ss>|\<#884C\>\<#5217\>\<#5F0F\>>>|<pageref|auto-30>>
<tuple|<tuple|<with|font-family|<quote|ss>|插入>|<with|font-family|<quote|ss>|表格>|<with|font-family|<quote|ss>|选择>>|<pageref|auto-33>>
<tuple|<tuple|<with|font-family|<quote|ss>|\<#63D2\>\<#5165\>>|<with|font-family|<quote|ss>|\<#8868\>\<#683C\>>|<with|font-family|<quote|ss>|\<#9009\>\<#62E9\>>>|<pageref|auto-33>>
<tuple|<tuple|<with|font-family|<quote|ss>|插入>|<with|font-family|<quote|ss>|表格>|<with|font-family|<quote|ss>|堆叠>>|<pageref|auto-35>>
<tuple|<tuple|<with|font-family|<quote|ss>|\<#63D2\>\<#5165\>>|<with|font-family|<quote|ss>|\<#8868\>\<#683C\>>|<with|font-family|<quote|ss>|\<#5806\>\<#53E0\>>>|<pageref|auto-35>>
</associate>
<\associate|table>
<tuple|normal|<\surround|<hidden-binding|<tuple>|1>|>
上下标的输入方式
\<#4E0A\>\<#4E0B\>\<#6807\>\<#7684\>\<#8F93\>\<#5165\>\<#65B9\>\<#5F0F\>
</surround>|<pageref|auto-8>>
<tuple|normal|<\surround|<hidden-binding|<tuple>|2>|>
分式的输入方式
\<#5206\>\<#5F0F\>\<#7684\>\<#8F93\>\<#5165\>\<#65B9\>\<#5F0F\>
</surround>|<pageref|auto-18>>
<tuple|normal|<\surround|<hidden-binding|<tuple>|3>|>
平方根的输入方式
\<#5E73\>\<#65B9\>\<#6839\>\<#7684\>\<#8F93\>\<#5165\>\<#65B9\>\<#5F0F\>
</surround>|<pageref|auto-22>>
<tuple|normal|<\surround|<hidden-binding|<tuple>|4>|>
矩阵一览
\<#77E9\>\<#9635\>\<#4E00\>\<#89C8\>
</surround>|<pageref|auto-29>>
<tuple|normal|<\surround|<hidden-binding|<tuple>|5>|>
省略号的输入
\<#7701\>\<#7565\>\<#53F7\>\<#7684\>\<#8F93\>\<#5165\>
</surround>|<pageref|auto-31>>
</associate>
<\associate|toc>
<with|par-left|<quote|1tab>|1<space|2spc>上标和下标
<with|par-left|<quote|1tab>|1<space|2spc>\<#4E0A\>\<#6807\>\<#548C\>\<#4E0B\>\<#6807\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-1>>
<with|par-left|<quote|1tab>|2<space|2spc>分式
<with|par-left|<quote|1tab>|2<space|2spc>\<#5206\>\<#5F0F\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-17>>
<with|par-left|<quote|1tab>|3<space|2spc>根式
<with|par-left|<quote|1tab>|3<space|2spc>\<#6839\>\<#5F0F\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-20>>
<with|par-left|<quote|1tab>|4<space|2spc>矩阵
<with|par-left|<quote|1tab>|4<space|2spc>\<#77E9\>\<#9635\>
<datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
<no-break><pageref|auto-27>>
</associate>