Warning
And here is a warning about something to pay attention to. We
test how the heading behave and add quite some extra texts
in comparison with the other admons.
We continue with more text to see how that affects the layout.
And more and more text.
And more and more text.
And more and more text.
And more and more text.
And more and more text.
And more and more text.
Title ending with math \( \sqrt{2}\approx 1.4 \)
And here comes some text with bad news in larger font.
Also some code:
And a complete program
Note, eventually!
Ah, we are soon close to the end (with illegal font size specification!).
But first a bit of math where we define \( \theta \) and \( \boldsymbol{r} \):
$$
\begin{align*}
\theta &= q^2,\\
\boldsymbol{r} &= \varrho\boldsymbol{i}
\end{align*}
$$
Tip
It is of outmost important to
- stay cool
- read hints and tips carefully
Because here the thing is to do
import urllib
def grab(url, filename):
urllib.urlretrieve(url, filename=filename)
Going deeper.
We have some equations that should be preceded by much text, so the
task is to write and write. The number of words, and not the
meaning, is what counts here. We need desperately to fill up the
page in the hope that some admonitions will experience a page break,
which the LaTeX environment should handle with ease.
Let us start with some equations:
$$
\begin{align*}
\frac{Du}{dt} &= 0
\\
\frac{1}{2} &= {1/2}\\
\frac{1}{2}\pmb{x} &= \pmb{n}
\end{align*}
$$
The implementation of such complicated equations in computer
code is task that this "Going deeper" environment targets.
def Dudt(u):
r = diff(u, t) + u*grad(u)
return r
half = 0.5
x = 2*n
And some more text that can help going into the next page.
Longer computer code requires vertical space:
class Diff:
def __init__(self, f, h=1E-5):
self.f = f
self.h = float(h)
class Forward1(Diff):
def __call__(self, x):
f, h = self.f, self.h
return (f(x+h) - f(x))/h
class Backward1(Diff):
def __call__(self, x):
f, h = self.f, self.h
return (f(x) - f(x-h))/h
class Central2(Diff):
def __call__(self, x):
f, h = self.f, self.h
return (f(x+h) - f(x-h))/(2*h)
class Central4(Diff):
def __call__(self, x):
f, h = self.f, self.h
return (4./3)*(f(x+h) - f(x-h)) /(2*h) - \
(1./3)*(f(x+2*h) - f(x-2*h))/(4*h)
class Central6(Diff):
def __call__(self, x):
f, h = self.f, self.h
return (3./2) *(f(x+h) - f(x-h)) /(2*h) - \
(3./5) *(f(x+2*h) - f(x-2*h))/(4*h) + \
(1./10)*(f(x+3*h) - f(x-3*h))/(6*h)
class Forward3(Diff):
def __call__(self, x):
f, h = self.f, self.h
return (-(1./6)*f(x+2*h) + f(x+h) - 0.5*f(x) - \
(1./3)*f(x-h))/h
And then we add a figure too.
