You should learn from the following example because I will ask you questions to answer.
Subsection1.5.1Math Features
Text with some math: \(\sin(x) = \cos(x)\) only for some values of \(x\text{.}\)
Math is rendered using MathJax on the web (and just plain latex when building a PDF) and can accept arbitrarily complex \(\LaTeX\) expressions. Here’s a gnarly one:
You can refer to other things, for example, a previous proof with xref and it will include an expandable “knowl” of the content for reference! Let’s refer to
And no math book would be complete without some theorem-like statement.
Theorem1.5.1.Fermat’s Last Theorem.
Let \(x, y, z \in \Z\text{.}\) There are no solutions to \(x^n + y+n = z^n\) for any integer \(n\ge 3\)
Proof.
There isn’t enough room in this code block for my clever proof.
Want to have two things side-by-side? We can do it with a sidebyside element:
def fib(n):
if n == 0:
return 0
elif n == 1:
return 1
else:
return fib(n-1) + fib(n-2)
Here’s a sample python implementation for finding the \(n\)th Fibonancci number recursively. That actually reminds me... We can run it interactively using the sage code blocks. We’ll do that in