Angular Modal Form
A Pen by Tim Arnold on CodePen.
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="2.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:outline="http://wkhtmltopdf.org/outline" | |
xmlns="http://www.w3.org/1999/xhtml"> | |
<xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" | |
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" | |
indent="yes" /> | |
<xsl:template match="outline:outline"> | |
<html> |
#!/bin/sh | |
# Enable fonts from texmf-local using updmap-sys --enable Map | |
# | |
# Manuel Pégourié-Gonnard, 2010; WTFPL v2. | |
find -H `kpsewhich --var-value TEXMFLOCAL` -name '*.map' | while read file | |
do | |
updmap-sys --nohash --nomkmap --enable Map `basename $file` | |
done |
// Given an iframe id and an anchor id that is present within the iframe, | |
// determine whether the element is visible/present inside the window viewport. | |
// This is not about the css 'display' property; this shows whether | |
// the window viewport contains the element. | |
var isVisible = function (anchor, iframe_id) { | |
var ifrId = iframe_id || 'bv_page'; | |
var ifrOffset = window.parent.document.getElementById(ifrId).offsetTop; | |
var myloc = document.getElementById(anchor).offsetTop + ifrOffset; | |
var viewtop = window.parent.scrollY; |
var cluster = require('cluster'); | |
var http = require('http'); | |
var numCPUs = require('os').cpus().length; | |
var createServer = function(port) { | |
var mjAPI = require("node_modules/MathJax-node/lib/mj-single"); | |
mjAPI.config({ | |
MathJax: { | |
SVG: { | |
font: "STIX-Web" |
These two files, pdf_linkchecker.py
and pdf_fontchecker.py
are code examples to go along with a blog article: http://reachtim.com/articles/PDF-Testing.html
See the article for details on how to test your PDFs for broken internal and external links and for unembedded fonts.
from PyPDF2 import PdfFileReader | |
from pprint import pprint | |
def walk(obj, fnt, emb): | |
''' | |
If there is a key called 'BaseFont', that is a font that is used in the document. | |
If there is a key called 'FontName' and another key in the same dictionary object | |
that is called 'FontFilex' (where x is null, 2, or 3), then that fontname is | |
embedded. | |
var url = require('system').args[1]; | |
var page = require('webpage').create(); | |
function waitFor(testFn, onSuccessFn, timeOut) { | |
var start = new Date().getTime(); | |
var condition = false; | |
var interval = setInterval(function() { | |
if ( (new Date().getTime() - start < timeOut) && !condition ) { | |
condition = testFn(); | |
} else { |
function ajaxRequest(){ | |
return new XMLHttpRequest(async=false); | |
} | |
function mltest (){ | |
var filename = window.location.href.substr(window.location.href.lastIndexOf("/")+1); | |
MathJax.Hub.Config({TeX: {noUndefined: {disabled: true}}}); | |
MathJax.Hub.Queue(function() {console.log('finished rendering');}); | |
MathJax.Hub.Register.MessageHook("TeX Jax - parse error",function (message) { | |
console.log('error encountered'); | |
var mydata = {}; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Encapsulate Trapping of Math and TeX errors</title> | |
<script type="text/x-mathjax-config"> | |
// Turn off NoErrors extension | |
MathJax.Hub.Config({ | |
TeX: {noErrors: {disabled: true}} | |
}); | |
// Set flag function for TeX Errors (undefined cs) |