Giter VIP home page Giter VIP logo

math-tex-snippets's Introduction

Math tex snippets

Math tex snippets for UltiSnips

Getting Started

Prerequisites

This snippet file is for UltiSnips plugin in Vim, so you need to install UltiSnips in your Vim (if not installing Vim first).

Installing

To use the snippet file you need to configure UltiSnips, but I didn't try to know how to configure this. I just use vim-snippets plugin to do that for me.

So I recommend you just install vim-snippets plugin like me and copy this file to your vim-snippets directory. It should be '~/.vim/bundle/vim-snippets/UltiSnips/' by default.

Standards for making rules

  • The less, the better (only heavily used typings)
  • Convenience
  • No confusion
  • Do not change users' custom of typing
  • No hot-key

Details of standards

When I type LaTeX, I heavily use the arrow keys; and this is a waste of time. So I decided to reduce the use of those keys I set up a set of snippet to auto-middle for '(', '[', and '{', etc. So you just type '()' then the cursor will be in the middle. When you have finished typing in the parentheses, you can just press '<tab>' to jump out of the parentheses.

How to use

Only you have done above, you can just start editing your tex file by Vim. But before that I recommend you have a glance at the snippet file to learn what you can do with this.

Examples

To type Einstein's field equation Einstein's field equation

We just type

eq<tab>\[G_\m<tab> \n<tab><tab> + \L<tab> g_\m<tab> \n<tab><tab> = frac<tab>8\p<tab> G<tab>c^4<tab><tab> T_\m<tab> \n<tab>

to get

\begin{equation}
	\[ G_{\mu \nu} + \Lambda g_{\mu \nu} = \frac{8\pi G}{c^{4}} T_{\mu \nu} \]
\end{equation}

Here I use '\m' instead of just '\mu' for consistency. At here its convience is not obvious, but when you type '\g' for '\gamma' or '\e' for 'epsilon', the convience is clear. Notice that I didn't press any arrow key. The mappings I used to map these keys to the Greek letters is by the Greek keyboard. See GreekKeyboard for a complete version.

Contributing

Any advice to improve is welcome.

To-do list

  • Complete README
  • Add some common matrix

License

This project is licensed under the MIT License - see the LICENSE.md file for details

math-tex-snippets's People

Contributors

0mco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

hilsenit sierxue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.