From 225c7ad94065a491e219011ca52092e15f223df4 Mon Sep 17 00:00:00 2001 From: u1 Date: Sun, 12 Apr 2026 14:39:49 +0200 Subject: [PATCH] docs(test): fix jupyter equation numbering notebook --- equation-numbering.ipynb | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/equation-numbering.ipynb b/equation-numbering.ipynb index 7ad7ea0..33b5d8d 100644 --- a/equation-numbering.ipynb +++ b/equation-numbering.ipynb @@ -8,18 +8,39 @@ "\n", "Inline math: $a^2 + b^2 = c^2$.\n", "\n", - "Manual equation tag:\n", + "Displayed equations below should be numbered automatically by the Gitea renderer.\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", - "Second equation:\n", - "\n", "$$\n", - "f(x) = x^2 + 1 \\\\tag{2}\n", + "f(x) = x^2 + 1\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": {