Spaces:
Sleeping
Sleeping
enhanced tooltips for Equations and Matrices buttons
Browse files- web/src/App.tsx +19 -19
web/src/App.tsx
CHANGED
|
@@ -960,17 +960,17 @@ function App() {
|
|
| 960 |
{activeSymbolCategory === 'equations' && (
|
| 961 |
<div className="symbol-category">
|
| 962 |
<div className="symbol-row">
|
| 963 |
-
<button onClick={() => insertSymbol('$ $')} className="symbol-btn template-btn" title="Inline equation">$...$</button>
|
| 964 |
-
<button onClick={() => insertSymbol('$$\n \n$$')} className="symbol-btn template-btn" title="Display equation">$$...$$</button>
|
| 965 |
-
<button onClick={() => insertSymbol('\\begin{align}\n & = \\\\\n & = \n\\end{align}')} className="symbol-btn template-btn" title="Aligned equations">align</button>
|
| 966 |
-
<button onClick={() => insertSymbol('\\begin{cases}\n & \\text{if } \\\\\n & \\text{if } \n\\end{cases}')} className="symbol-btn template-btn" title="Piecewise
|
| 967 |
-
<button onClick={() => insertSymbol('\\begin{equation}\n \n\\end{equation}')} className="symbol-btn template-btn" title="Numbered equation">equation</button>
|
| 968 |
-
<button onClick={() => insertSymbol('\\begin{aligned}\n & \\\\\n & \n\\end{aligned}')} className="symbol-btn template-btn" title="
|
| 969 |
</div>
|
| 970 |
<div className="symbol-row">
|
| 971 |
-
<button onClick={() => insertSymbol('\\begin{cases}\n a_1x + b_1y = c_1 \\\\\n a_2x + b_2y = c_2\n\\end{cases}')} className="symbol-btn template-btn" title="
|
| 972 |
-
<button onClick={() => insertSymbol('\\begin{cases}\n a_1x + b_1y + c_1z = d_1 \\\\\n a_2x + b_2y + c_2z = d_2 \\\\\n a_3x + b_3y + c_3z = d_3\n\\end{cases}')} className="symbol-btn template-btn" title="3
|
| 973 |
-
<button onClick={() => insertSymbol('\\left\\{\\begin{array}{l}\n \\\\\n \\\\\n \n\\end{array}\\right.')} className="symbol-btn template-btn" title="Custom system">system</button>
|
| 974 |
</div>
|
| 975 |
</div>
|
| 976 |
)}
|
|
@@ -978,20 +978,20 @@ function App() {
|
|
| 978 |
{activeSymbolCategory === 'matrices' && (
|
| 979 |
<div className="symbol-category">
|
| 980 |
<div className="symbol-row">
|
| 981 |
-
<button onClick={() => insertSymbol('\\begin{matrix}\n a & b \\\\\n c & d\n\\end{matrix}')} className="symbol-btn template-btn" title="
|
| 982 |
-
<button onClick={() => insertSymbol('\\begin{pmatrix}\n a & b \\\\\n c & d\n\\end{pmatrix}')} className="symbol-btn template-btn" title="
|
| 983 |
-
<button onClick={() => insertSymbol('\\begin{bmatrix}\n a & b \\\\\n c & d\n\\end{bmatrix}')} className="symbol-btn template-btn" title="
|
| 984 |
-
<button onClick={() => insertSymbol('\\begin{vmatrix}\n a & b \\\\\n c & d\n\\end{vmatrix}')} className="symbol-btn template-btn" title="
|
| 985 |
</div>
|
| 986 |
<div className="symbol-row">
|
| 987 |
-
<button onClick={() => insertSymbol('\\begin{pmatrix}\n a & b & c \\\\\n d & e & f \\\\\n g & h & i\n\\end{pmatrix}')} className="symbol-btn template-btn" title="
|
| 988 |
-
<button onClick={() => insertSymbol('\\begin{bmatrix}\n a & b & c \\\\\n d & e & f \\\\\n g & h & i\n\\end{bmatrix}')} className="symbol-btn template-btn" title="
|
| 989 |
-
<button onClick={() => insertSymbol('\\begin{vmatrix}\n a & b & c \\\\\n d & e & f \\\\\n g & h & i\n\\end{vmatrix}')} className="symbol-btn template-btn" title="
|
| 990 |
</div>
|
| 991 |
<div className="symbol-row">
|
| 992 |
-
<button onClick={() => insertSymbol('\\begin{pmatrix}\n x_1 \\\\\n x_2 \\\\\n x_3\n\\end{pmatrix}')} className="symbol-btn template-btn" title="Column vector">col vec</button>
|
| 993 |
-
<button onClick={() => insertSymbol('\\begin{pmatrix} x_1 & x_2 & x_3 \\end{pmatrix}')} className="symbol-btn template-btn" title="Row vector">row vec</button>
|
| 994 |
-
<button onClick={() => insertSymbol('\\begin{pmatrix}\n a_{11} & a_{12} & \\cdots & a_{1n} \\\\\n a_{21} & a_{22} & \\cdots & a_{2n} \\\\\n \\vdots & \\vdots & \\ddots & \\vdots \\\\\n a_{m1} & a_{m2} & \\cdots & a_{mn}\n\\end{pmatrix}')} className="symbol-btn template-btn" title="General m
|
| 995 |
</div>
|
| 996 |
</div>
|
| 997 |
)}
|
|
|
|
| 960 |
{activeSymbolCategory === 'equations' && (
|
| 961 |
<div className="symbol-category">
|
| 962 |
<div className="symbol-row">
|
| 963 |
+
<button onClick={() => insertSymbol('$ $')} className="symbol-btn template-btn" title="Inline equation: $ E = mc^2 $">$...$</button>
|
| 964 |
+
<button onClick={() => insertSymbol('$$\n \n$$')} className="symbol-btn template-btn" title="Display equation: $$ \\int_0^1 x^2 dx = \\frac{1}{3} $$">$$...$$</button>
|
| 965 |
+
<button onClick={() => insertSymbol('\\begin{align}\n & = \\\\\n & = \n\\end{align}')} className="symbol-btn template-btn" title="Aligned equations with alignment at = sign">align</button>
|
| 966 |
+
<button onClick={() => insertSymbol('\\begin{cases}\n & \\text{if } \\\\\n & \\text{if } \n\\end{cases}')} className="symbol-btn template-btn" title="Piecewise: f(x) = { x^2 if x ≥ 0, -x if x < 0 }">cases</button>
|
| 967 |
+
<button onClick={() => insertSymbol('\\begin{equation}\n \n\\end{equation}')} className="symbol-btn template-btn" title="Numbered equation with automatic numbering">equation</button>
|
| 968 |
+
<button onClick={() => insertSymbol('\\begin{aligned}\n & \\\\\n & \n\\end{aligned}')} className="symbol-btn template-btn" title="Multi-line derivation with alignment">aligned</button>
|
| 969 |
</div>
|
| 970 |
<div className="symbol-row">
|
| 971 |
+
<button onClick={() => insertSymbol('\\begin{cases}\n a_1x + b_1y = c_1 \\\\\n a_2x + b_2y = c_2\n\\end{cases}')} className="symbol-btn template-btn" title="Example: { 2x + 3y = 5, x - y = 1 }">2 eq</button>
|
| 972 |
+
<button onClick={() => insertSymbol('\\begin{cases}\n a_1x + b_1y + c_1z = d_1 \\\\\n a_2x + b_2y + c_2z = d_2 \\\\\n a_3x + b_3y + c_3z = d_3\n\\end{cases}')} className="symbol-btn template-btn" title="Example: { x + y + z = 6, 2x - y + z = 3, x + 2y - z = 1 }">3 eq</button>
|
| 973 |
+
<button onClick={() => insertSymbol('\\left\\{\\begin{array}{l}\n \\\\\n \\\\\n \n\\end{array}\\right.')} className="symbol-btn template-btn" title="Custom system of n equations">system</button>
|
| 974 |
</div>
|
| 975 |
</div>
|
| 976 |
)}
|
|
|
|
| 978 |
{activeSymbolCategory === 'matrices' && (
|
| 979 |
<div className="symbol-category">
|
| 980 |
<div className="symbol-row">
|
| 981 |
+
<button onClick={() => insertSymbol('\\begin{matrix}\n a & b \\\\\n c & d\n\\end{matrix}')} className="symbol-btn template-btn" title="Plain matrix: a b / c d">2×2</button>
|
| 982 |
+
<button onClick={() => insertSymbol('\\begin{pmatrix}\n a & b \\\\\n c & d\n\\end{pmatrix}')} className="symbol-btn template-btn" title="Matrix with parentheses: ( 1 2 / 3 4 )">(2×2)</button>
|
| 983 |
+
<button onClick={() => insertSymbol('\\begin{bmatrix}\n a & b \\\\\n c & d\n\\end{bmatrix}')} className="symbol-btn template-btn" title="Matrix with brackets: [ 1 2 / 3 4 ]">[2×2]</button>
|
| 984 |
+
<button onClick={() => insertSymbol('\\begin{vmatrix}\n a & b \\\\\n c & d\n\\end{vmatrix}')} className="symbol-btn template-btn" title="Determinant: | 1 2 / 3 4 | = ad - bc">|2×2|</button>
|
| 985 |
</div>
|
| 986 |
<div className="symbol-row">
|
| 987 |
+
<button onClick={() => insertSymbol('\\begin{pmatrix}\n a & b & c \\\\\n d & e & f \\\\\n g & h & i\n\\end{pmatrix}')} className="symbol-btn template-btn" title="3×3 identity: ( 1 0 0 / 0 1 0 / 0 0 1 )">(3×3)</button>
|
| 988 |
+
<button onClick={() => insertSymbol('\\begin{bmatrix}\n a & b & c \\\\\n d & e & f \\\\\n g & h & i\n\\end{bmatrix}')} className="symbol-btn template-btn" title="3×3 with brackets: [ 1 2 3 / 4 5 6 / 7 8 9 ]">[3×3]</button>
|
| 989 |
+
<button onClick={() => insertSymbol('\\begin{vmatrix}\n a & b & c \\\\\n d & e & f \\\\\n g & h & i\n\\end{vmatrix}')} className="symbol-btn template-btn" title="3×3 determinant for calculating volume/area">|3×3|</button>
|
| 990 |
</div>
|
| 991 |
<div className="symbol-row">
|
| 992 |
+
<button onClick={() => insertSymbol('\\begin{pmatrix}\n x_1 \\\\\n x_2 \\\\\n x_3\n\\end{pmatrix}')} className="symbol-btn template-btn" title="Column vector: ( x / y / z )">col vec</button>
|
| 993 |
+
<button onClick={() => insertSymbol('\\begin{pmatrix} x_1 & x_2 & x_3 \\end{pmatrix}')} className="symbol-btn template-btn" title="Row vector: ( a b c )">row vec</button>
|
| 994 |
+
<button onClick={() => insertSymbol('\\begin{pmatrix}\n a_{11} & a_{12} & \\cdots & a_{1n} \\\\\n a_{21} & a_{22} & \\cdots & a_{2n} \\\\\n \\vdots & \\vdots & \\ddots & \\vdots \\\\\n a_{m1} & a_{m2} & \\cdots & a_{mn}\n\\end{pmatrix}')} className="symbol-btn template-btn" title="General matrix with m rows and n columns">m×n</button>
|
| 995 |
</div>
|
| 996 |
</div>
|
| 997 |
)}
|