wolfram-mathematica - 有没有办法在 Mathematica 中使用 [[ 和 ]] 作为 Part 吗?

标签 wolfram-mathematica frontend

有没有办法避免必须做 ⋮[[⋮Part 获得那些漂亮的括号?

enter image description here

运行函数或定义后,有没有办法自动完成?

最佳答案

我在 /Applications/Mathematica.app/SystemFiles/FrontEnd/TextResources/Macintosh/KeyEventTranslations.tr 中添加了以下内容这让我可以用组合键输入双括号。您可以通过修改文件(在您的操作系统上的任何位置)来执行相同的操作。我最初是从 Szabolcs's 得知这一点的网站 here .他那里有其他与数学相关的东西,可能对你有帮助。

添加的命令是:

  • 使用 Ctrl+[
  • 使用 Ctrl+]
  • 〚〛使用 Ctrl+Alt+]

  • KeyEventTranslations.tr 文件中列出的等效项是:

    Modifiers can be "Shift", "Control", "Command", "Option"

    For Macintosh: "Command" = Command Key, "Option" = Option Key

    For X11: "Command" = Mod1, "Option" = Mod2

    For Windows: "Command" = Alt, "Option" = Alt



    EventTranslations[{ 之后插入以下内容在上面的文件中。
    (* Custom keyboard shortcuts *)
        Item[KeyEvent["[", Modifiers -> {Control}],
            FrontEndExecute[{
                FrontEnd`NotebookWrite[FrontEnd`InputNotebook[],
                    "\[LeftDoubleBracket]", After]
            }]],
        Item[KeyEvent["]", Modifiers -> {Control}],
            FrontEndExecute[{
                FrontEnd`NotebookWrite[FrontEnd`InputNotebook[],
                    "\[RightDoubleBracket]", After]
            }]], 
        Item[KeyEvent["]", Modifiers -> {Control, Command}],
            FrontEndExecute[{
                FrontEnd`NotebookWrite[FrontEnd`InputNotebook[],
                    "\[LeftDoubleBracket]", After],
                FrontEnd`NotebookWrite[FrontEnd`InputNotebook[],
                    "\[RightDoubleBracket]", Before]
            }]], 
    

    你不是唯一一个被它激怒的人。 Here's我试图通过将 Caps 锁定映射到 Esc 来避免不得不拉伸(stretch)以击中 Esc。巫师先生也有一个couplequestions[[ 的转换有关至 .

    关于wolfram-mathematica - 有没有办法在 Mathematica 中使用 [[ 和 ]] 作为 Part 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7327411/

    相关文章:

    html - 如何为图像添加悬停效果?

    image - 数学: Add text to imported image/graphic as a label

    wolfram-mathematica - 可以将方程的表达式放在其图形表示附近吗?

    wolfram-mathematica - 在不显式迭代的情况下找到满足某些条件的最大矩形 block

    magento:从前端添加产品

    javascript - Angular1.3 : Access functions from standard controllers, 在使用controllerAs的 View 内?

    wolfram-mathematica - "regular"区域中包含的 "irregular"晶格上的数据的 ListPlot3D

    list - 在 mathematica 中使用 map/select 在列表中查找子列表

    javascript - 如何实现跨页定时器?

    javascript - 使用javascript将上传的文件分成多个 block