GithubHelp home page GithubHelp logo

bratex's Introduction

bratex

Emacs package for manipulation of brackets in LaTeX mode

If you dislike the \left and \right macros in LaTeX, you are not alone! Quoting from the manual of the amsmath package (see section 4.14.1):

The automatic delimiter sizing done by \left and \right has two limitations: First, it is applied mechanically to produce delimiters large enough to encompass the largest contained item, and second, the range of sizes is not even approximately continuous but has fairly large quantum jumps.

You might prefer manual sizing through the size modifiers: \big, \Big, \bigg and \Bigg, or even better (this requires amsmath): \bigl...\bigr, \Bigl...\Bigr, \biggl...\biggr and \Biggl...\Biggr. But then, resizing becomes painful: you need to move to the opening delimiter, change its size modifier, then move to the closing delimiter, and do the same.

Introducing bratex, that defines functions to automatically cycle through size delimiters.

Getting started

A picture is worth a thousand words… So the four major functions defined in the bratex package are illustrated below.

Cycling through the delimiter sizes

bratex-cycle-size (S-up) bratex-cycle-size-reverse (S-down)
bratex-cycle-size bratex-cycle-size-reverse

Cycling through the delimiter types

bratex-cycle-bracket (S-right) bratex-cycle-bracket-reverse (S-left)
bratex-cycle-bracket bratex-cycle-bracket-reverse

Installation

For the time being, package-install is not enabled (contributions welcome!).

Checkout the current repository, and place the file bratex.el somewhere in your load-path.

Configuration with the default latex-mode

Add the following lines to your init.el file

(require 'bratex)
(add-hook 'latex-mode-hook #'bratex-config)

Configuration with AUCTeX

Add the following lines to your init.el file

(require 'bratex)
(add-hook 'LaTeX-mode-hook #'bratex-config)

bratex's People

Contributors

sbrisard avatar

Stargazers

Dani avatar  avatar Andy Shevchenko avatar Felippe Alves avatar Georgios Bakirtzis avatar Kazuki Yoshida avatar husky avatar Yimin Yi avatar Mike King avatar Hong Xu avatar William Henney avatar Alexander Weigl avatar Michel Schinz avatar Takaaki ISHIKAWA avatar Jumpei KAWAMI avatar Alberto Luaces avatar  avatar  avatar Xi "Alexander" Fu avatar

Watchers

James Cloos avatar  avatar husky avatar

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.