Skip to content

Commit

Permalink
Merge pull request #2 from IllinoisRef/212-migration
Browse files Browse the repository at this point in the history
migrating particle kinetics, changes for responsivness
  • Loading branch information
jcrayb authored Aug 18, 2024
2 parents f216946 + c02f29e commit 32f49e0
Show file tree
Hide file tree
Showing 12 changed files with 1,838 additions and 130 deletions.
40 changes: 18 additions & 22 deletions html_to_astro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -261,79 +261,75 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 68,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<DisplayEquation equation=\"\\\\int_0^t a_1(t) \\\\,d\\\\tau= \\\\left[a_1(t) \\\\, \\\\tau\\\\right]_{\\\\tau = 0}^{\\\\tau = t}= a_1(t) \\\\, t, \\\\]\" />\n"
"<DisplayEquation equation=\"\\\\begin{aligned}x = u, \\\\quad \\\\quad y = y(u) = y(x)\\\\end{aligned}\" />\n"
]
}
],
"source": [
"e = r\"\"\"\n",
"\\[\n",
"\\int_0^t a_1(t) \\,d\\tau\n",
"= \\left[a_1(t) \\, \\tau\\right]_{\\tau = 0}^{\\tau = t}\n",
"= a_1(t) \\, t,\n",
" \\]\n",
"\\[\\begin{aligned}\n",
"x = u, \\quad \\quad y = y(u) = y(x)\n",
"\\end{aligned}\\]\n",
"\"\"\"\n",
"\n",
"print(\"<DisplayEquation equation=\\\"\" + e.replace('\\n', '').replace(' ', '').replace('$', '').replace(r'\\[', '').replace(r'[\\\\', '').replace(\"\\\\\", r\"\\\\\") + \"\\\" />\")\n"
"print(\"<DisplayEquation equation=\\\"\" + e.replace('\\n', '').replace(' ', '').replace('$', '').replace(r'\\[', '').replace(r'\\]', '').replace(\"\\\\\", r\"\\\\\") + \"\\\" />\")\n"
]
},
{
"cell_type": "code",
"execution_count": 74,
"execution_count": 66,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\\\\begin{aligned}\\\\vec{r} &amp;= r \\\\,\\\\hat{e}_r \\\\\\\\\\\\vec{v} &amp;= \\\\dot{r} \\\\,\\\\hat{e}_r+ r \\\\dot\\\\theta \\\\sin\\\\phi \\\\,\\\\hat{e}_{\\\\theta}+ r \\\\dot\\\\phi \\\\,\\\\hat{e}_{\\\\phi} \\\\\\\\\\\\vec{a} &amp;= (\\\\ddot{r} - r \\\\dot{\\\\theta}^2 \\\\sin^2\\\\phi- r \\\\dot{\\\\phi}^2) \\\\,\\\\hat{e}_r \\\\\\\\&amp;\\\\quad + (r \\\\ddot\\\\theta \\\\sin\\\\phi+ 2 \\\\dot{r} \\\\dot\\\\theta \\\\sin\\\\phi+ 2 r \\\\dot\\\\theta \\\\dot\\\\phi \\\\cos\\\\phi) \\\\,\\\\hat{e}_{\\\\theta} \\\\\\\\&amp;\\\\quad + (r \\\\ddot\\\\phi + 2 \\\\dot{r} \\\\dot\\\\phi- r \\\\dot{\\\\theta}^2 \\\\sin\\\\phi \\\\cos\\\\phi) \\\\,\\\\hat{e}_{\\\\phi}\\\\end{aligned}\n"
"\\\\kappa = \\\\frac{|y''(x)|}{(1 + y'(x)^2)^{3/2}}\n"
]
}
],
"source": [
"print(e.replace('\\n', '').replace(' ', '').replace(\"\\\\\", r\"\\\\\"))"
"print(e.replace('\\n', '').replace(' ', '').replace('$', '').replace(r'\\[', '').replace(r'\\]', '').replace(\"\\\\\", r\"\\\\\"))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 69,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<InlineEquation equation=\"\\\\vec{a}(t)\" />\n"
"<InlineEquation equation=\"x'(u) = 1\" />\n"
]
}
],
"source": [
"e = r\"\"\"\n",
"$\\vec{a}(t)$\n",
"$x'(u) = 1$\n",
"\"\"\"\n",
"\n",
"print(\"<InlineEquation equation=\\\"\" + e.replace('\\n', '').replace(' ', '').replace('$', '').replace(\"\\\\\", r\"\\\\\") + \"\\\" />\")"
"print(\"<InlineEquation equation=\\\"\" + e.replace('\\n', '').replace(' ', '').replace('$', '').replace(r'\\(', '').replace(r'\\)', '').replace(\"\\\\\", r\"\\\\\") + \"\\\" />\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
Loading

0 comments on commit 32f49e0

Please sign in to comment.