Skip to content

Instantly share code, notes, and snippets.

View wikipedia-mathjax-for-MathML+SVG-mode.js
// add to User:YOURNAME/common.js to get smooth MathJax rendering
var mathTags = $('.mwe-math-mathml-a11y');
if (mathTags.length > 0){ //only do something when there's math on the page
window.MathJax = {
SVG: {blacker: 1}, // clearer SVG output, in case people switch to SVG output
AuthorInit: function () {
MathJax.Hub.Register.StartupHook("End",function () { //when MathJax is done...
mathTags.removeClass('mwe-math-mathml-a11y'); // .. make the span around MathML (now MathJax output) visible
pkra / quickmjpage.js
Last active Feb 13, 2019
boiler plate for page processing with mathjax-node
View quickmjpage.js
const fs = require('fs');
const mjnode = require('mathjax-node-sre');
const jsdom = require('jsdom');
const { JSDOM } = jsdom;
process.on('unhandledRejection', r => console.log(r));
MathJax: {
// your config
pkra / mj-bookmarklet
Created Jan 10, 2019
Bookmarklet for injecting mathjax
View mj-bookmarklet
pkra / mse-tutorial-plain.html
Last active Jul 4, 2018
TeX sample extracted from math.SE tutorial
View mse-tutorial-plain.html
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Math.SE extracted Samples</title>
pkra /
Last active Jun 14, 2018
draft: A11y und eine kurze Einführung in Numeronyme

layout: post title: | Quick Tip: A11y und eine kurze Einführung in Numeronyme description: Das Numeronym "a11y" steht für "accessibility" author: Scott O'Hara translator: Peter Krautzberger date: 2017-11-27


published: true

pkra / google_sheets_emailer.js
Last active May 24, 2018
Google Script for Google Sheets mass emailing
View google_sheets_emailer.js
// modified from, cf
// Licensed under Apache 2.0 License,
// Copyright (c) Google Inc, MathJax Consortium
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
var startRow = 1; // First row of data to process
var numRows = 1; // Number of rows to process
// Fetch the range of cells
pkra / test.svg
Last active Sep 6, 2017
A test svg
View test.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
pkra / email.svg
Last active Sep 6, 2017
An svg to test email delivery
View email.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
pkra / chromium739221-stroke0.svg
Last active Sep 6, 2017
Samples for Chromium bug 739221
View chromium739221-stroke0.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
pkra / sre.js
Created Aug 25, 2017
sre, hacked.
View sre.js
var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global?global:a};$$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_";
$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$||($$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(a){return $jscomp.SYMBOL_PREFIX+(a||"")+$jscomp.symbolCounter_++};
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$;a||(a=$$"iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(th