Archiving a bunch of old stuff
This commit is contained in:
4
oldstuff/math-replay/.gitignore
vendored
Normal file
4
oldstuff/math-replay/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
*.aux
|
||||
*.log
|
||||
*.pdf
|
||||
*.html
|
25
oldstuff/math-replay/Makefile
Normal file
25
oldstuff/math-replay/Makefile
Normal file
@@ -0,0 +1,25 @@
|
||||
ALL := $(patsubst %.haml,%.html,$(shell find . -name '*.haml'))
|
||||
ALL += $(patsubst %.tex,%.pdf,$(shell find . -name '*.tex'))
|
||||
|
||||
|
||||
%.html:%.haml
|
||||
haml -Ilib -rhaml/filters-ext $^ $@
|
||||
|
||||
|
||||
%.pdf:%.tex
|
||||
texi2pdf $^ -o $@ && \
|
||||
rm -vf $(patsubst %.pdf,%.aux,$(notdir $@)) \
|
||||
$(patsubst %.pdf,%.log,$(notdir $@))
|
||||
|
||||
|
||||
all: $(ALL)
|
||||
|
||||
|
||||
clean:
|
||||
rm -vf $(ALL)
|
||||
|
||||
|
||||
serve:
|
||||
rackup ./config.ru
|
||||
|
||||
.PHONY: all clean serve
|
83
oldstuff/math-replay/algebra/linear-equations-2.haml
Normal file
83
oldstuff/math-replay/algebra/linear-equations-2.haml
Normal file
@@ -0,0 +1,83 @@
|
||||
%html
|
||||
%head
|
||||
%title Linear Equations 2
|
||||
%script{:type => "text/x-mathjax-config"}
|
||||
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
|
||||
%script{:type => "text/javascript", :src => "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"}
|
||||
%link{:rel => 'stylesheet', :type => 'text/css', :href => './style.css'}
|
||||
%body
|
||||
%h2 Solve for $x$:
|
||||
:eqnarray
|
||||
6x + 8 & = & 5 \\
|
||||
-8 + 6x + 8 & = & 5 - 8 \\
|
||||
6x & = & 5 - 8 \\
|
||||
6x & = & -3 \\
|
||||
6x \times \frac{1}{6} & = & -3 \times \frac{1}{6} \\
|
||||
x & = & -3 \times \frac{1}{6} \\
|
||||
x & = & -3 \over 6 \\
|
||||
x & = & \frac{-1}{2} \\
|
||||
|
||||
%h2 Solve for $x$ (again):
|
||||
:eqnarray
|
||||
10x - 2 & = & 8 \\
|
||||
10x - 2 + 2 & = & 8 + 2 \\
|
||||
10x & = & 10 \\
|
||||
10x \over 10 & = & 10 \over 10 \\
|
||||
x & = & 10 \over 10 \\
|
||||
x & = & 1 \\
|
||||
|
||||
%h2 Solve for $x$ (again):
|
||||
:eqnarray
|
||||
6x - 4 & = & 3 \\
|
||||
6x - 4 + 4 & = & 3 + 4 \\
|
||||
6x & = & 7 \\
|
||||
6x \over 6 & = & 7 \over 6 \\
|
||||
x & = & 7 \over 6 \\
|
||||
|
||||
%h2 Solve for $x$ (again):
|
||||
:eqnarray
|
||||
10x + 7 & = & 8 \\
|
||||
10x + 7 - 7 & = & 8 - 7 \\
|
||||
10x & = & 1 \\
|
||||
10x \over 10 & = & 1 \over 10 \\
|
||||
x & = & 1 \over 10 \\
|
||||
|
||||
%h2 Solve for $x$ (again):
|
||||
:eqnarray
|
||||
10x + 3 & = & 5 \\
|
||||
10x + 3 - 3 & = & 5 - 3 \\
|
||||
10x & = & 2 \\
|
||||
10x \over 10 & = & 2 \over 10 \\
|
||||
x & = & 1 \over 5 \\
|
||||
|
||||
%h2 Solve for $x$ (again):
|
||||
:eqnarray
|
||||
4x + 9 & = & 10 \\
|
||||
4x + 9 - 9 & = & 10 - 9 \\
|
||||
4x & = & 1 \\
|
||||
4x \over 4 & = & 1 \over 4 \\
|
||||
x & = & 1 \over 4 \\
|
||||
|
||||
%h2 Solve for $x$ (again):
|
||||
:eqnarray
|
||||
7x - 5 & = & 9 \\
|
||||
7x - 5 + 5 & = & 9 + 5 \\
|
||||
7x & = & 14 \\
|
||||
7x \over 7 & = & 14 \over 7 \\
|
||||
x & = & 2 \\
|
||||
|
||||
%h2 Solve for $x$ (again):
|
||||
:eqnarray
|
||||
3x + 9 & = & 9 \\
|
||||
3x + 9 - 9 & = & 9 - 9 \\
|
||||
3x & = & 0 \\
|
||||
3x \over 3 & = & 0 \over 3 \\
|
||||
x & = & 0 \\
|
||||
|
||||
%h2 Solve for $x$ (again):
|
||||
:eqnarray
|
||||
3x + 10 & = & 7 \\
|
||||
3x + 10 - 10 & = & 7 - 10 \\
|
||||
3x & = & -3 \\
|
||||
3x \over 3 & = & -3 \over 3 \\
|
||||
x & = & -1 \\
|
43
oldstuff/math-replay/algebra/new-definitions-1.haml
Normal file
43
oldstuff/math-replay/algebra/new-definitions-1.haml
Normal file
@@ -0,0 +1,43 @@
|
||||
%html
|
||||
%head
|
||||
%title New Definitions 1
|
||||
%script{:type => "text/x-mathjax-config"}
|
||||
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
|
||||
%script{:type => "text/javascript", :src => "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"}
|
||||
%link{:rel => 'stylesheet', :type => 'text/css', :href => './style.css'}
|
||||
%body
|
||||
%h2 $x `not` $y = 8x - 3y$:
|
||||
:eqnarray
|
||||
x `not` y & = & 8x - 3y \\
|
||||
6 `not` -2 & = & 8(6) - 3(-2) \\
|
||||
6 `not` -2 & = & 48 + 6 \\
|
||||
6 `not` -2 & = & 54 \\
|
||||
|
||||
%h2 $x `star` y = 8y + 2$:
|
||||
:eqnarray
|
||||
x `star` y & = & 8y + 2 \\
|
||||
-2 `star` 5 & = & 8(5) + 2 \\
|
||||
-2 `star` 5 & = & 40 + 2 \\
|
||||
-2 `star` 5 & = & 42 \\
|
||||
|
||||
%h2 $x `diamond` y = xy + 3x - y$:
|
||||
:eqnarray
|
||||
x `diamond` y & = & xy + 3x - y \\
|
||||
3 `diamond` -2 & = & (3)(-2) + 3(3) - (-2) \\
|
||||
3 `diamond` -2 & = & -6 + 9 + 2 \\
|
||||
3 `diamond` -2 & = & -6 + 11 \\
|
||||
3 `diamond` -2 & = & 5 \\
|
||||
|
||||
%h2 $x `not` y = x + 3y$:
|
||||
:eqnarray
|
||||
x `not` y & = & x + 3y \\
|
||||
-4 `not` 6 & = & -4 + 3(6) \\
|
||||
-4 `not` 6 & = & -4 + 18 \\
|
||||
-4 `not` 6 & = & 14 \\
|
||||
|
||||
%h2 $x `donut` y = 3x - 3y$:
|
||||
:eqnarray
|
||||
x `donut` y & = & 3x - 3y \\
|
||||
0 `donut` 0 & = & 3(0) - 3(0) \\
|
||||
0 `donut` 0 & = & 0 - 0 \\
|
||||
0 `donut` 0 & = & 0 \\
|
93
oldstuff/math-replay/algebra/order-of-operations.tex
Normal file
93
oldstuff/math-replay/algebra/order-of-operations.tex
Normal file
@@ -0,0 +1,93 @@
|
||||
\documentclass{article}
|
||||
\begin{document}
|
||||
|
||||
At this point this is mostly LaTeX practice, but why not?!?...
|
||||
|
||||
Related video is at:
|
||||
http://www.khanacademy.org/math/algebra/solving-linear-equations/v/order-of-operations-example
|
||||
|
||||
1b.
|
||||
\begin{eqnarray*}
|
||||
ans & = & 2 + 7 \times 11 - 12 \div 3 \\
|
||||
ans & = & 2 + (7 \times 11) - (12 \div 3) \\
|
||||
ans & = & 2 + 77 - 4 \\
|
||||
ans & = & 79 - 4 \\
|
||||
ans & = & 75
|
||||
\end{eqnarray*}
|
||||
|
||||
1d.
|
||||
\begin{eqnarray*}
|
||||
ans & = & \frac{2 \times (3 + (2 - 1))}{4 - (6 + 2)} - (3 - 5) \\
|
||||
ans & = & \frac{2 \times (3 + 1)}{4 - (6 + 2)} - (3 - 5) \\
|
||||
ans & = & \frac{2 \times 4}{4 - (6 + 2)} - (3 - 5) \\
|
||||
ans & = & \frac{8}{4 - 8} - (3 - 5) \\
|
||||
ans & = & \frac{8}{-4} - (3 - 5) \\
|
||||
ans & = & -2 - (3 - 5) \\
|
||||
ans & = & -2 - -2 \\
|
||||
ans & = & -2 + 2 \\
|
||||
ans & = & 0
|
||||
\end{eqnarray*}
|
||||
|
||||
2b.
|
||||
\begin{eqnarray*}
|
||||
ans & = & 2y^2 \mbox{ when } x = 1 \mbox{ and } y = 5 \\
|
||||
ans & = & 2 \times (5^2) \\
|
||||
ans & = & 2 \times 25 \\
|
||||
ans & = & 50
|
||||
\end{eqnarray*}
|
||||
|
||||
2d.
|
||||
\begin{eqnarray*}
|
||||
ans & = & (y^2 - x)^2 \mbox{ when } x = 2 \mbox{ and } y = 1 \\
|
||||
ans & = & (1^2 - 2)^2 \\
|
||||
ans & = & (1 - 2)^2 \\
|
||||
ans & = & (-1)^2 \\
|
||||
ans & = & 1
|
||||
\end{eqnarray*}
|
||||
|
||||
3b.
|
||||
\begin{eqnarray*}
|
||||
ans & = & \frac{z^2}{x + y} + \frac{x^2}{x - y} \mbox{ when } x = 1, y = -2, \mbox{ and } z = 4 \\
|
||||
ans & = & \frac{4^2}{1 + -2} + \frac{1^2}{1 - -2} \\
|
||||
ans & = & \frac{16}{-1} + \frac{1}{3} \\
|
||||
ans & = & -16 + \frac{1}{3} \\
|
||||
ans & = & \frac{-48}{3} + \frac{1}{3} \\
|
||||
ans & = & \frac{-47}{3}
|
||||
\end{eqnarray*}
|
||||
|
||||
3d.
|
||||
\begin{eqnarray*}
|
||||
ans & = & \frac{x^2 - z^2}{xz - 2x(z - x)} \mbox{ when } x = -1 \mbox{ and } z = 3 \\
|
||||
ans & = & \frac{-1^2 - 3^2}{-1 \times 3 - 2 \times -1 \times (3 - -1)} \\
|
||||
ans & = & \frac{1 - 9}{-3 - 2(-1) \times 4} \\
|
||||
ans & = & \frac{-8}{-3 - -2 \times 4} \\
|
||||
ans & = & \frac{-8}{-3 - -8} \\
|
||||
ans & = & \frac{-8}{5}
|
||||
\end{eqnarray*}
|
||||
|
||||
4b.
|
||||
\begin{eqnarray*}
|
||||
12 \div 4 + 10 - 3 \times 3 + 7 & = & 11 \\
|
||||
3 + 10 - 9 + 7 & = & 11 \\
|
||||
13 - 9 + 7 & = & 11 \\
|
||||
4 + 7 & = & 11 \\
|
||||
11 & = & 11
|
||||
\end{eqnarray*}
|
||||
|
||||
4d.
|
||||
\begin{eqnarray*}
|
||||
12 - 8 - 4 \times 5 & = & -8 \\
|
||||
12 - 8 - 20 & = & -8 \\
|
||||
4 - 20 & = & -8 \\
|
||||
-16 & = & -8
|
||||
\end{eqnarray*}
|
||||
|
||||
\begin{eqnarray*}
|
||||
12 - 8 - 4 \times 5 & = & -8 \\
|
||||
12 - (8 - 4) \times 5 & = & -8 \\
|
||||
12 - 4 \times 5 & = & -8 \\
|
||||
12 - 20 & = & -8 \\
|
||||
-8 & = & -8
|
||||
\end{eqnarray*}
|
||||
|
||||
\end{document}
|
13
oldstuff/math-replay/algebra/simple-equations.tex
Normal file
13
oldstuff/math-replay/algebra/simple-equations.tex
Normal file
@@ -0,0 +1,13 @@
|
||||
\documentclass{article}
|
||||
\begin{document}
|
||||
|
||||
More LaTeX practice related to the video at http://www.khanacademy.org/math/algebra/solving-linear-equations/v/simple-equations
|
||||
|
||||
\begin{eqnarray*}
|
||||
7x & = & 14 \\
|
||||
7 \times x & = & 14 \\
|
||||
\frac{7x}{7} & = & \frac{14}{7} \\
|
||||
x & = & 2
|
||||
\end{eqnarray*}
|
||||
|
||||
\end{document}
|
130
oldstuff/math-replay/algebra/solving-for-a-variable.haml
Normal file
130
oldstuff/math-replay/algebra/solving-for-a-variable.haml
Normal file
@@ -0,0 +1,130 @@
|
||||
%html
|
||||
%head
|
||||
%title Solving for a Variable
|
||||
%script{:type => "text/x-mathjax-config"}
|
||||
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
|
||||
%script{:type => "text/javascript", :src => "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"}
|
||||
%link{:rel => 'stylesheet', :type => 'text/css', :href => './style.css'}
|
||||
%body
|
||||
%h2 Solve for $l$:
|
||||
:eqnarray
|
||||
-2lmn + 8m - 3n + 9 & = & -5m + 3n - 7 \\
|
||||
-2lmn + 8m - 3n + 9 - 9 & = & -5m + 3n - 7 - 9 \\
|
||||
-2lmn + 8m - 3n & = & -5m + 3n - 16 \\
|
||||
-2lmn + 8m - 3n + 3n & = & -5m + 3n - 16 + 3n \\
|
||||
-2lmn + 8m & = & -5m + 3n - 16 + 3n \\
|
||||
-2lmn + 8m - 8m & = & -5m + 3n - 16 + 3n - 8m \\
|
||||
-2lmn & = & -5m + 3n - 16 + 3n - 8m \\
|
||||
\frac{-2lmn}{-2} & = & \frac{-5m + 3n - 16 + 3n - 8m}{-2} \\
|
||||
lmn & = & \frac{-5m + 3n - 16 + 3n - 8m}{-2} \\
|
||||
\frac{lmn}{mn} & = & \frac{\frac{-5m + 3n - 16 + 3n - 8m}{-2}}{mn} \\
|
||||
l & = & \frac{\frac{-5m + 3n - 16 + 3n - 8m}{-2}}{mn} \\
|
||||
l & = & \frac{\frac{-5m - 16 + 6n - 8m}{-2}}{mn} \\
|
||||
l & = & \frac{\frac{-16 + 6n - 13m}{-2}}{mn} \\
|
||||
l & = & \frac{8 - 3n - \frac{13m}{-2}}{mn} \\
|
||||
|
||||
:eqnarray
|
||||
-2lmn + 8m - 3n + 9 & = & -5m + 3n - 7 \\
|
||||
-2lmn + 8m - 3n + 9 - 9 & = & -5m + 3n - 7 - 9 \\
|
||||
-2lmn + 8m - 3n & = & -5m + 3n + 2 \\
|
||||
-2lmn + 8m - 3n + 3n & = & -5m + 3n + 2 + 3n \\
|
||||
-2lmn + 8m & = & -5m + 6n + 2 \\
|
||||
-2lmn + 8m - 8m & = & -5m + 6n + 2 - 8m \\
|
||||
-2lmn & = & -13m + 6n + 2 \\
|
||||
\frac{-2lmn}{-2} & = & \frac{-13m + 6n + 2}{-2} \\
|
||||
lmn & = & \frac{-13m}{-2} + \frac{6n}{-2} + \frac{2}{-2} \\
|
||||
lmn & = & \frac{-13m}{-2} + \frac{6n}{-2} - 1 \\
|
||||
lmn & = & \frac{-13m}{-2} + \frac{3n}{-1} - 1 \\
|
||||
lmn & = & \frac{-13m}{-2} - 3n - 1 \\
|
||||
\frac{lmn}{mn} & = & \frac{\frac{-13m}{-2} - 3n - 1}{mn} \\
|
||||
l & = & \frac{\frac{-13m}{-2} - 3n - 1}{mn} \\
|
||||
|
||||
:eqnarray
|
||||
-2lmn + 8m - 3n + 9 & = & -5m + 3n - 7 \\
|
||||
-9 + -2lmn + 8m - 3n + 9 & = & -9 + -5m + 3n - 7 \\
|
||||
-2lmn + 8m - 3n & = & -9 + -5m + 3n - 7 \\
|
||||
-2lmn + 8m - 3n & = & -5m + 3n - 7 - 9 \\
|
||||
-2lmn + 8m - 3n & = & -5m + 3n + -7 + -9 \\
|
||||
-2lmn + 8m - 3n & = & -5m + 3n + -16 \\
|
||||
-2lmn + 8m - 3n + 3n & = & -5m + 3n + -16 + 3n \\
|
||||
-2lmn + 8m & = & -5m + -16 + 6n \\
|
||||
-2lmn + 8m - 8m & = & -5m + -16 + 6n - 8m \\
|
||||
-2lmn & = & -13m + 6n + -16 \\
|
||||
\frac{-2lmn}{-2mn} & = & \frac{-13m + 6n + -16}{-2mn} \\
|
||||
l & = & \frac{-13m + 6n + -16}{-2mn} \\
|
||||
l & = & \frac{13m - 6n + 16}{2mn} \\
|
||||
|
||||
%h2 Solve for $x$:
|
||||
:eqnarray
|
||||
-2xy + 5xz - 5x + 10 & = & -6y - 2 \\
|
||||
-2xy + 5xz - 5x + 10 - 10 & = & -6y - 2 - 10 \\
|
||||
-2xy + 5xz - 5x & = & -6y + -2 + -10 \\
|
||||
-2xy + 5xz - 5x & = & -6y + -12 \\
|
||||
-2xy + 5xz - 5xz - 5x & = & -6y - 12 - 5xz \\
|
||||
-2xy - 5x & = & -6y - 12 - 5xz \\
|
||||
-2xy + 2xy - 5x & = & -6y - 12 - 5xz + 2xy \\
|
||||
-5x & = & -6y - 12 - 5xz + 2xy \\
|
||||
-5x \over -5 & = & -6y - 12 - 5xz + 2xy \over -5x \\
|
||||
x & = & -6y - 12 - 5xz + 2xy \over -5x \\
|
||||
x & = & \frac{-6y}{-5x} - \frac{12}{-5x} - \frac{5xz}{-5x} + \frac{2xy}{-5x} \\
|
||||
|
||||
:eqnarray
|
||||
-2xy + 5xz - 5x + 10 & = & -6y - 2 \\
|
||||
-2xy + 5xz - 5x + 10 - 10 & = & -6y - 2 - 10 \\
|
||||
-2xy + 5xz - 5x & = & -6y + -2 + -10 \\
|
||||
-2xy + 5xz - 5x & = & -6y - 12 \\
|
||||
-2xy + 5xz - 5x \over 5z & = & -6y - 12 \over 5z \\
|
||||
-2xy + x - 5x & = & -6y - 12 \over 5z \\
|
||||
-2xy + x + -5x & = & -6y - 12 \over 5z \\
|
||||
-2xy + -4x & = & -6y - 12 \over 5z \\
|
||||
-2xy - 4x & = & -6y - 12 \over 5z \\
|
||||
-2xy - 4x \over -2y & = & -6y - 12 \over -2y + 5z \\
|
||||
-x - 4x \over -2y & = & -6y - 12 \over -2y + 5z \\
|
||||
-x + -4x & = & -6y - 12 \over -2y + 5z \\
|
||||
-5x & = & -6y - 12 \over -2y + 5z \\
|
||||
-5x \over -5 & = & -6y - 12 \over -2y + 5z - 5 \\
|
||||
x & = & -6y - 12 \over -2y + 5z - 5 \\
|
||||
x & = & 6y + 12 \over 2y - 5z + 5 \\
|
||||
|
||||
:eqnarray
|
||||
-2xy + 5xz - 5x + 10 & = & -6y - 2 \\
|
||||
-2xy + 5xz - 5x + 10 - 10 & = & -6y - 2 - 10 \\
|
||||
-2xy + 5xz - 5x & = & -6y - 12 \\
|
||||
x \cdot (-2y + 5z - 5) & = & -6y - 12 \\
|
||||
x \cdot (-2y + 5z - 5) \over -2y + 5z - 5 & = & -6y - 12 \over -2y + 5z - 5 \\
|
||||
x & = & -6y - 12 \over -2y + 5z - 5 \\
|
||||
x & = & 6y + 12 \over 2y - 5z + 5 \\
|
||||
|
||||
%h2 Solve for $m$:
|
||||
:eqnarray
|
||||
-8m - 4n - 8p - 5 & = & -5n - p + 6 \\
|
||||
-8m - 4n - 8p - 5 + 5 & = & -5n - p + 6 + 5 \\
|
||||
-8m - 4n - 8p & = & -5n - p + 11 \\
|
||||
-8m - 4n - 8p + 8p & = & -5n - p + 11 + 8p \\
|
||||
-8m - 4n & = & -5n + -p + 11 + 8p \\
|
||||
-8m - 4n & = & -5n + 11 + 7p \\
|
||||
-8m - 4n + 4n & = & -5n + 11 + 7p + 4n \\
|
||||
-8m & = & -n + 11 + 7p \\
|
||||
-8m & = & -n + 11 + 7p \\
|
||||
-8m \over -8 & = & -n + 11 + 7p \over -8 \\
|
||||
m & = & -n + 11 + 7p \over -8 \\
|
||||
m & = & n - 11 - 7p \over 8 \\
|
||||
m & = & n - 7p - 11 \over 8 \\
|
||||
|
||||
%h2 Solve for $x$ (again):
|
||||
:eqnarray
|
||||
7xy + 4xz + x + 1 & = & y + 6 \\
|
||||
7xy + 4xz + x + 1 - 1 & = & y + 6 - 1 \\
|
||||
7xy + 4xz + x & = & y + 5 \\
|
||||
x \cdot (7y + 4z + 1) & = & y + 5 \\
|
||||
x \cdot (7y + 4z + 1) \over 7y + 4z + 1 & = & y + 5 \over 7y + 4z + 1 \\
|
||||
x & = & y + 5 \over 7y + 4z + 1 \\
|
||||
|
||||
%h2 Solve for $v$:
|
||||
:eqnarray
|
||||
3vw - 2vx + 10v + 1 & = & w + 4 \\
|
||||
3vw - 2vx + 10v + 1 - 1 & = & w + 4 - 1 \\
|
||||
3vw - 2vx + 10v & = & w + 3 \\
|
||||
v \cdot (3w - 2x + 10) & = & w + 3 \\
|
||||
v \cdot (3w - 2x + 10) \over 3w - 2x + 10 & = & w + 3 \over 3w - 2x + 10 \\
|
||||
v & = & w + 3 \over 3w - 2x + 10 \\
|
17
oldstuff/math-replay/algebra/style.css
Normal file
17
oldstuff/math-replay/algebra/style.css
Normal file
@@ -0,0 +1,17 @@
|
||||
body {
|
||||
color: #fefefe;
|
||||
background: #222;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
text-shadow: 3px 3px #111;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.eqnarray {
|
||||
border-radius: 5px;
|
||||
box-shadow: 2px 5px 5px #000;
|
||||
padding: 10px;
|
||||
background: #333;
|
||||
}
|
6
oldstuff/math-replay/config.ru
Executable file
6
oldstuff/math-replay/config.ru
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env rackup
|
||||
use Rack::ContentLength
|
||||
root = File.expand_path('./algebra', File.dirname(__FILE__))
|
||||
app = Rack::Directory.new(root)
|
||||
puts "Serving #{root} (see --help for options)"
|
||||
run app
|
22
oldstuff/math-replay/lib/haml/filters-ext.rb
Normal file
22
oldstuff/math-replay/lib/haml/filters-ext.rb
Normal file
@@ -0,0 +1,22 @@
|
||||
require 'haml/filters'
|
||||
require 'haml/helpers'
|
||||
|
||||
module Haml
|
||||
module Filters
|
||||
module Eqnarray
|
||||
include Base
|
||||
|
||||
def render(text)
|
||||
<<END
|
||||
<div class="eqnarray">
|
||||
$$
|
||||
\\begin{eqnarray}
|
||||
#{Haml::Helpers.html_escape(text).rstrip.gsub("\n", "\n ")}
|
||||
\\end{eqnarray}
|
||||
$$
|
||||
</div>
|
||||
END
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user