• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Einlar/latex_snippets: Easy snippets to write faster LaTeX (in Visual Studio Cod ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

Einlar/latex_snippets

开源软件地址(OpenSource Url):

https://github.com/Einlar/latex_snippets

开源编程语言(OpenSource Language):


开源软件介绍(OpenSource Introduction):

Latex Snippets for Visual Studio Code

Common snippets to write faster LaTeX

Installing

  • Install the HyperSnips extension.
  • Open the HyperSnips directory (Ctrl + Shift + P, "HyperSnips: Open Snippets Directory") and copy there the file hsnips/latex.hsnips
  • From the VSCode menu (Ctrl + Shift + P) go to "Preferences: Configure User Snippets" and select "latex". Copy there the content of vscode/latex.json
  • Set keybindings with Ctrl + Shift + P, and "Preferences: Open Keyboard Shortcuts (JSON)". Copy there the content of vscode/keybindings.json
  • You may also install the LaTeX Workshop extension, but some snippets may conflict. You can disable the snippets from that extension thanks to another extension: Control Snippets.

Usage

Simply open a .tex file and start typing. All "static" snippets are contained in latex.json, and are expanded by typing their "prefix" and pressing Tab (or Enter, if they appear in the IntelliSense menu). You can navigate between fixed placeholders with Alt + LeftArrow and Alt + RightArrow.

There are also "dynamic" snippets, that automatically expands after typing a certain trigger. For example:

  • mk expands in $ $ . Note that the final space is automatically removed if you type certain characters (e.g. -?:,) after the last $.
  • An alphabetical character repeated two times is automatically converted to the corresponding greek letter: e.g. aa becomes \alpha. This does not conflict with words with repeated letters (e.g. letters) or with other commands (e.g. \ddot).
  • Type M3x3 and a space to obtain a 0-filled 3x3 matrix. Dimensions can be changed dynamically: M2x6 works too. If you type a d instead of the final space, the resulting matrix will have navigable placeholders only on the diagonal.
  • Type dfdx and a space to write a partial derivative. Use a capital D at the start if you want the usual derivative.
  • Vectors can be set by typing a character (or word) followed by ., or ,. (just press the two keys at the same time, as their order does not matter). Similar commands automatically convert strings like p-hat, pbar, Pcal (to \mathcal{P}). For \mathbb{P} use P#.
  • Many more! Look at latex.hsnips for all the implementations.



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap