Skip to content

Instantly share code, notes, and snippets.

View bjmorgan's full-sized avatar
:atom:
Crunching numbers

Benjamin Morgan bjmorgan

:atom:
Crunching numbers
View GitHub Profile
@bjmorgan
bjmorgan / Default (OSX).sublime.keymap
Last active December 10, 2015 00:48
Sublime Text plugin for LaTeX that lists a choice of `.eps` files in the directory defined in `\graphicspath{<DIRECTORY>}`, and after the user selecting one inserts boilerplate figure code. If `\graphicspath` is missing, or the line is commented out, the plugin will look for .eps files in the root directory of the `.tex` file.
[
// Run LaTeX plugin to insert figure code
{
"keys": ["super+l", "super+f"],
"command": "insert_latex_figure",
"context": [
{ "key": "selector", "operator": "equal", "operand": "text.tex.latex" }
]
}
]
@bjmorgan
bjmorgan / Bibtex.sublime-build
Created December 20, 2012 23:30 — forked from dpo/BibTeX.sublime-build
Build files, keymap entries, and `run_latex_build.py` plugin for adding the option for running bibtex and cleaning up auxiliary files for LaTeX in Sublime Text 2. Added the ability to run bibtex, and changed key bindings.
{
"cmd": ["bibtex", "$file_base_name"],
"path": "$PATH:/usr/texbin:/usr/local/bin",
"file_regex": "^(...*?):([0-9]+): ([0-9]*)([^\\.]+)",
"selector": "text.tex.latex"
}
@bjmorgan
bjmorgan / gist:4344886
Created December 20, 2012 11:56
A Ruby TextExpander snippet that takes data copied to the clipboard from Numbers and pastes LaTeX source for a table environment. Discussed here: http://analysisandsynthesis.com/utilities/2012/12/20/quick-latex-tables-using-textexpander.html
#!/usr/local/bin/ruby
class Line
@@max_length = nil
@@eol = ' \\\\'
def initialize( data )
@contents = data
@@max_length = [0]*@contents.size if @@max_length.nil? # initialize array if this is the first Line instance
@bjmorgan
bjmorgan / TeXShop Extended.thTheme
Last active June 25, 2021 16:47
Light theme designed for LaTeX in TextMate / Sublime Text. Based on my colour scheme in TeXShop, with extensions for additional syntax highlighting for \ref, \label, \cite, \footnote, math environment, and others. Also supports syntax highlighting for \caption and \mathrm, provided these are listed in the LaTeX.tmLanguage file.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>TeXShop Extended</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>