docs(test): fix jupyter equation numbering notebook
This commit is contained in:
@@ -8,18 +8,39 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"Inline math: $a^2 + b^2 = c^2$.\n",
|
"Inline math: $a^2 + b^2 = c^2$.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Manual equation tag:\n",
|
"Displayed equations below should be numbered automatically by the Gitea renderer.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"$$\n",
|
"$$\n",
|
||||||
"\\\\int_0^1 x^2 \\\\, dx = \\\\frac{1}{3} \\\\tag{1}\n",
|
"\\int_0^1 x^2 \\, dx = \\frac{1}{3}\n",
|
||||||
"$$\n",
|
"$$\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Second equation:\n",
|
|
||||||
"\n",
|
|
||||||
"$$\n",
|
"$$\n",
|
||||||
"f(x) = x^2 + 1 \\\\tag{2}\n",
|
"f(x) = x^2 + 1\n",
|
||||||
"$$\n"
|
"$$\n"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 1,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"integral x^2 on [0, 1] = 0.333333\\n",
|
||||||
|
"sample values: [1.0, 1.0625, 1.25, 1.5625, 2.0]\\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"def integral_x2(a=0.0, b=1.0):\\n",
|
||||||
|
" return (b ** 3 - a ** 3) / 3.0\\n",
|
||||||
|
"\\n",
|
||||||
|
"values = [x * x + 1 for x in [0.0, 0.25, 0.5, 0.75, 1.0]]\\n",
|
||||||
|
"print(f'integral x^2 on [0, 1] = {integral_x2():.6f}')\\n",
|
||||||
|
"print(f'sample values: {values}')\\n"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
|
|||||||
Reference in New Issue
Block a user