Forgot password?
 Create new account
View 337|Reply 10

測試vscode的chatGPT插件

[Copy link]

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

hbghlyj Posted at 2024-8-15 12:25:45 |Read mode
Last edited by hbghlyj at 2024-8-19 07:04:00marketplace.visualstudio.com/items?itemName=timkmecl.chatgpt
续写小故事。按左右方向鍵可以再次生成故事,但首选項通常是最佳的🧐
Screenshot 2024-07-17 153005.png
它延续了这种诙谐的行文风格:它可以理解nonce word,例如输入的ductor是doctor和duck的缩合。
它还能改正拼写錯误,例如输入的underduckling被拼錯为undcrduckling,但在它的输出中竟然改正了。


如果给的提示词太少,它会不断重复同一句话
Screenshot 2024-08-15 122223.png

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2024-8-15 12:28:45
Last edited by hbghlyj at 2024-8-17 10:27:00利用它学习React。制作一款公式编辑器🧐
这是为手机屏幕设计的公式编辑器,有6组按鈕,点击上方的蓝色按鈕在6组之间切换。
有便利的工具来输入矩阵、选择括号。对应 pmatrix / vmatrix / Vmatrix / bmatrix / Bmatrix
Del键删除矩阵空行/列
Shift-Spacebar添加列
Shift-Enter添加行
Screenshot 2024-08-15 122955.png

这些按鈕可以通过修改代碼中的数组:symbolGroups来定制。


现在可以使用快捷鍵:
Ctrl+C 复制
Ctrl+V 粘贴
Ctrl+U 撤銷(历史)
Ctrl+Y 重做(历史)
编辑框可以粘贴LaTeX,例如粘贴\begin{bmatrix}1&2\\3&4\end{bmatrix}
编辑完成后可以复制出LaTeX,也可以只选中一部分来复制LaTeX


另外,考虑到手机上没有Ctrl,应该增加4个按鈕:复制/粘贴/撤銷/重做
但是怎么增加呢?

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2024-8-15 13:00:23
除了点击按鈕,还可以直接输入 alpha、beta、gamma,不需要 \
Animation.gif

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2024-8-15 13:11:46
除了点击按鈕,还可以直接输入 sum、int,不需要 \
这个是怎么实现的呢🧐
Animation.gif

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2024-8-15 13:15:35
hbghlyj 发表于 2024-8-15 05:11
除了点击按鈕,还可以直接输入 sum、int,不需要 \
这个是怎么实现的呢🧐
...

我查到了!因为这个编辑器调用了 MathQuill,在MathQuill中有配置autocommands

autoCommands defines the set of commands automatically rendered by just typing the letters without typing a backslash first.

This takes a string formatted as a space-delimited list of LaTeX commands. Each LaTeX command must be at least letters only with a minimum length of 2 characters.

For example, with autoCommands set to 'pi theta', the word 'pi' automatically converts to the pi symbol and the word 'theta' automatically converts to the theta symbol.

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2024-8-15 13:21:57
docs.mathquill.com/en/latest/Config/#spacesbehavesliketab:可以直接用空格鍵输入空格,然后自动导出 \, 或 \;

docs.mathquill.com/en/latest/Config/#outof-handlers
当存在相邻的上下标时,上下方向鍵会进入相邻的上下标。
当不存在相邻的上下标时,上下方向鍵新建上下标。
  1. upOutOf: (mathField) => {
  2.     // This handler is called when the user presses the up
  3.     // arrow key, but there is nowhere in the expression to go
  4.     // up to (no numerator or exponent). For ease of use,
  5.     // interpret this as an attempt to create an exponent.
  6.     mathField.typedText("^");
  7. }
Copy the Code

Animation.gif

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2024-8-15 13:48:03
hbghlyj 发表于 2024-8-15 04:28
有便利的工具来输入矩阵、选择括号。对应 matrix / pmatrix / vmatrix / Vmatrix / bmatrix / Bmatrix
github.com/mathquill/mathquill/issues/332#issuecomment-314149398:类似于pmatrix可增加对align*环境的支持。
align*环境是一个两列的矩阵
但怎么做呢
请求帮助……

701

Threads

110K

Posts

910K

Credits

Credits
94177
QQ

Show all posts

kuing Posted at 2024-8-15 15:33:46
这么牛批😯

网页图标也是“🧐”真可爱n(*≧▽≦*)n

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2024-8-16 17:47:07
Add support for \begin{cases}
github.com/mathquill/mathquill/pull/661

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2024-8-16 19:34:38
Support align* environments for displaying and editing multi-line equations.
github.com/Learnosity/mathquill/pull/60
28704344-4c6f2f10-73ad-11e7-8180-a8e57187e458[1].gif

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2024-8-17 04:33:46
現在可以粘贴align*arraycases了🧐

測試:
  1. \begin{align*}
  2. x&=y           &  w &=z              &  a&=b+c\\
  3. 2x&=-y         &  3w&=\frac{1}{2}z   &  a&=b\\
  4. -4 + 5x&=2+y   &  w+2&=-1+w          &  ab&=cb
  5. \end{align*}
Copy the Code

Screenshot 2024-08-17 at 04-34-33 .png
  1. \begin{array}{|rlc|l|}
  2. aaa & bbb & ccc & ddd \\
  3. a & b & c & d
  4. \end{array}
Copy the Code

Screenshot 2024-08-17 at 04-35-33 .png
  1. \begin{cases}
  2. aaa & bbb\\
  3. a & b
  4. \end{cases}
Copy the Code

Screenshot 2024-08-17 at 04-39-35 .png

手机版Mobile version|Leisure Math Forum

2025-4-20 22:25 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list