Skip to content

Instantly share code, notes, and snippets.

@reitzig
reitzig / math4slack.js
Created November 17, 2015 10:27
MathJax for Slack -- Attempt 1
( function () { // start of anonymous wrapper function (needed to restrict variable scope on Opera)
// Opera does not support @match, so re-check that we're on SE chat before doing anything
// if ( location.hostname != 'slack.com' ) return;
// Baseline MathJax URL and config, copied from SE:
var mathJaxURL = "//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full";
var config = {
"HTML-CSS": { preferredFont: "TeX", availableFonts: ["STIX","TeX"], linebreaks: { automatic:true }, EqnChunk: 50 },
tex2jax: { inlineMath: [ ["$", "$"], ["\\\\(","\\\\)"] ], displayMath: [ ["$$","$$"], ["\\[", "\\]"] ], processEscapes: true, ignoreClass: "tex2jax_ignore|dno" },
@reitzig
reitzig / sebibtex.tex
Last active September 17, 2015 13:43
A small MWE for testing SE BibTeX export with biblatex+biber vs bibtex+natbib
\documentclass{article}
\def\testmode{old}
\def\testmode{new}
\usepackage{xifthen,url}
\newcommand{\ifnew}[2]{\ifthenelse{\equal{\testmode}{new}}{#1}{#2}}
\ifnew{%
\usepackage[backend=biber]{biblatex}