找回密码
 快速注册
搜索
查看: 30|回复: 10

測試vscode的chatGPT插件

[复制链接]

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

hbghlyj 发表于 2024-8-15 12:25 |阅读模式
本帖最后由 hbghlyj 于 2024-8-19 07:04 编辑 marketplace.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

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2024-8-15 12:28
本帖最后由 hbghlyj 于 2024-8-17 10:27 编辑 利用它学习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个按鈕:复制/粘贴/撤銷/重做
但是怎么增加呢?

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2024-8-15 13:00
除了点击按鈕,还可以直接输入 alpha、beta、gamma,不需要 \
Animation.gif

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

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

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2024-8-15 13:15
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.

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2024-8-15 13:21
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. }
复制代码

Animation.gif

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2024-8-15 13:48
hbghlyj 发表于 2024-8-15 04:28
有便利的工具来输入矩阵、选择括号。对应 matrix / pmatrix / vmatrix / Vmatrix / bmatrix / Bmatrix


github.com/mathquill/mathquill/issues/332#issuecomment-314149398:类似于pmatrix可增加对align*环境的支持。
align*环境是一个两列的矩阵
但怎么做呢
请求帮助……

730

主题

1万

回帖

9万

积分

积分
93593
QQ

显示全部楼层

kuing 发表于 2024-8-15 15:33
这么牛批😯

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

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2024-8-16 17:47
Add support for \begin{cases}
github.com/mathquill/mathquill/pull/661

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

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

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2024-8-17 04:33
現在可以粘贴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*}
复制代码

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}
复制代码

Screenshot 2024-08-17 at 04-35-33 .png
  1. \begin{cases}
  2. aaa & bbb\\
  3. a & b
  4. \end{cases}
复制代码

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

手机版|悠闲数学娱乐论坛(第3版)

GMT+8, 2025-3-4 12:46

Powered by Discuz!

× 快速回复 返回顶部 返回列表