{{ message }}

Instantly share code, notes, and snippets.

# fkuehnel/mathmltagger.lua

Created Mar 11, 2012
Tagging Math Expressions in PDF documents with Lualatex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 \pdfcompresslevel=0 % to make everything visible in the pdf \documentclass{article} \usepackage{amssymb} \usepackage{luacode} \directlua{dofile("mathmltagger.lua")} %% a collection of Hans Hagens MathML examples, and some additions \begin{document} $$b \equiv b$$ $$\sqrt[1+n]{64}$$ $$1 + x \over 1 - x$$ $$-1$$ $$a+b+c$$ $$x \ge 4$$ $$a b$$ $$x\in\mathbb{N}$$ $$1A2C_{16} + 0101_{16} = 1B2D_{16}$$ $$2+5i\in\mathbb{C}$$ %% eq, neq, gt, lt, geq, leq $$a\le b\le c$$ %% equivalent, approx, implies $$a+b \equiv b+a$$ $$3.14159 \approx \pi$$ %% minus, plus $$37 -x$$ $$-37$$ $$-x+37$$ $$a+x$$ %% times $$3p$$ %% divide $$1-{1 \over 3}+{1\over 5}-{1\over 7}+\ldots = \frac{\pi}{4}$$ $${-b - \sqrt{a} \over (b-b) -\sqrt{a}}$$ %%$${-b - -b - \sqrt{a} \over (b-b)- -b -\sqrt{a}}$$ %% power $$x^2 + \sin^2 x$$ %% root, degree $$\sqrt[3]{64} = 4$$ %% sin, cos, tan, cot, scs, sec, .. $$\sin(x+y)=\sin x \cos y + \cos x \sin y$$ $$\cos\pi = -1$$ %% log, ln, exp $$\ln(e+2)\approx 1.55$$ $$e^2=7.3890560989307$$ %% is false! %% quotient, rem $$\lfloor a/b \rfloor$$ %% factorial $$n! = n\times(n-1)\times(n-2)\times\cdots\times 1$$ %% min, max, gcd, lcm $$z=\min\left\{(x+y),2x,{1\over y}\right\}$$ %% and, or, xor, not $$1001_2 0101_2=0001$$ %% set, bvar $$\left\{1,4,8\right\}\neq$$  \left\{x | 2