From f6c762266440ef4a15cbca98d35a7e6a3d9f1c30 Mon Sep 17 00:00:00 2001 From: NT Date: Fri, 20 Aug 2021 11:28:02 +0200 Subject: [PATCH] additional unicode tweaks --- diffphys-code-ns.ipynb | 12 ++++++------ fixup-latex.py | 7 +++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/diffphys-code-ns.ipynb b/diffphys-code-ns.ipynb index 83bcddf..f6b647f 100644 --- a/diffphys-code-ns.ipynb +++ b/diffphys-code-ns.ipynb @@ -127,7 +127,7 @@ { "data": { "text/plain": [ - "(inflow_loc\u1d47=4, x\u02e2=32, y\u02e2=40)" + "(inflow_locᵇ=4, xˢ=32, yˢ=40)" ] }, "execution_count": 2, @@ -267,7 +267,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Velocity dimensions: (inflow_loc\u1d47=4, x\u02e2=32, y\u02e2=40, vector\u1d5b=2)\n" + "Velocity dimensions: (inflow_locᵇ=4, xˢ=32, yˢ=40, vectorᵛ=2)\n" ] } ], @@ -313,8 +313,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "Some gradient info: StaggeredGrid[(inflow_loc\u1d47=4, x\u02e2=32, y\u02e2=40, vector\u1d5b=2), size=(32, 40), extrapolation=0]\n", - "(x\u02e2=31, y\u02e2=40) float32 -17.366662979125977 < ... < 14.014090538024902\n" + "Some gradient info: StaggeredGrid[(inflow_locᵇ=4, xˢ=32, yˢ=40, vectorᵛ=2), size=(32, 40), extrapolation=0]\n", + "(xˢ=31, yˢ=40) float32 -17.366662979125977 < ... < 14.014090538024902\n" ] } ], @@ -334,7 +334,7 @@ "source": [ "The last two lines just print some information about the resulting gradient field. Naturally, it has the same shape as the velocity itself: it's a staggered grid with four inflow locations. The last line shows how to access the x-components of one of the gradients.\n", "\n", - "We could use this to take a look at the content of the computed gradient with regular plotting functions, e.g., by converting the x component of one of the simulations to a numpy array via `velocity_grad.values.inflow_loc[0].vector[0].numpy('y,x')`. However, below we'll use phiflow's `view()` function instead. It automatically analyzes the grid content and provides UI buttons to choose different viewing modes. You can use them to show arrows, single components of the 2-dimensional velocity vectors, or their magnitudes.\n" + "We could use this to take a look at the content of the computed gradient with regular plotting functions, e.g., by converting the x component of one of the simulations to a numpy array via `velocity_grad.values.inflow_loc[0].vector[0].numpy('y,x')`. However, below we'll use phiflow's `view()` function instead. It automatically analyzes the grid content and provides UI buttons to choose different viewing modes. You can use them to show arrows, single components of the 2-dimensional velocity vectors, or their magnitudes. (Because of its interactive nature, the corresponding image won't show up outside of Jupyter, though.)\n" ] }, { @@ -664,5 +664,5 @@ } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git a/fixup-latex.py b/fixup-latex.py index fd5ddcd..e48df5c 100644 --- a/fixup-latex.py +++ b/fixup-latex.py @@ -49,6 +49,7 @@ recs.append( re.compile(r"approach using continuous convolutions {.}.hyperlink{c rect.append( "approach using continuous convolutions {[}\\\\protect\\\\hyperlink{cite.references:id14}{UPTK19}{]}" ) # fixup unicode symbols +# compare book-in2.tex -> book.tex after iconv recs.append( re.compile(r"’" ) ) # unicode ' rect.append( "\'" ) @@ -77,6 +78,12 @@ rect.append( " " ) # recs.append( re.compile(r"") ) # rect.append( "" ) +# recs.append( re.compile(r"") ) +# rect.append( "" ) + +# recs.append( re.compile(r"") ) +# rect.append( "" ) + # fixup title , cumbersome...