mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-13 22:55:51 +00:00
extend equations exercise
This commit is contained in:
parent
b48d0e014e
commit
8449d845ca
1 changed files with 33 additions and 10 deletions
|
|
@ -19,7 +19,29 @@ Using properly formatted equations makes mathematical expressions clearer and mo
|
||||||
$$ F_{res} = m \cdot a $$
|
$$ F_{res} = m \cdot a $$
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Now, add an inline equation by enclosing the equation with single dollar signs. Try this example:
|
```{tip}
|
||||||
|
The syntax used for creation equations is TeX, a markup language for math. It's often part of the software-system LaTeX, which allows to create full documents in this language. There's plenty of documentation online on how to use it, including graphical interfaces (for example [this one](https://latexeditor.lagrida.com/))
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Now let's add another equation with an error:
|
||||||
|
|
||||||
|
```md
|
||||||
|
$$ E = m \ccdot c^2 $$
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Check whether the equations renders correctly by clicking `preview`. Note that all ill-formatted equation are indicated in red, i.e. $\red{\text{\ccdot}}$
|
||||||
|
|
||||||
|
5. As an alternative you try and use the 'math directive'. This will have the same results + adds a equation number which can be used for referencing:
|
||||||
|
|
||||||
|
````md
|
||||||
|
```{math}
|
||||||
|
v = a \cdot t
|
||||||
|
```
|
||||||
|
````
|
||||||
|
|
||||||
|
6. Click on `preview` again. Note that these equations don't render. That's because the 'math directive' is a MyST feature (an extension of markdown), which is not supported by the GitHub previewer that only support markdown.
|
||||||
|
|
||||||
|
7. Now, add an inline equation by enclosing the equation with single dollar signs. Try this example:
|
||||||
|
|
||||||
|
|
||||||
```md
|
```md
|
||||||
|
|
@ -28,7 +50,7 @@ The displacement can be found using the equation $s = v \cdot t$.
|
||||||
|
|
||||||
## Formatting mathematical symbols
|
## Formatting mathematical symbols
|
||||||
|
|
||||||
4. In this step we will experiment with different LaTeX symbols. Use the following table and test each example in your Markdown file:
|
8. In this step we will experiment with different TeX symbols. Use the following table and test each example in your Markdown file:
|
||||||
|
|
||||||
|
|
||||||
| Name | Script |
|
| Name | Script |
|
||||||
|
|
@ -40,7 +62,7 @@ The displacement can be found using the equation $s = v \cdot t$.
|
||||||
| Superscript | `^{N}` |
|
| Superscript | `^{N}` |
|
||||||
| Multiplication | `\cdot` |
|
| Multiplication | `\cdot` |
|
||||||
|
|
||||||
5. Extend this exercise by trying more advanced mathematical expressions:
|
9. Extend this exercise by trying more advanced mathematical expressions:
|
||||||
|
|
||||||
| Name | Script |
|
| Name | Script |
|
||||||
|---|---|
|
|---|---|
|
||||||
|
|
@ -48,15 +70,15 @@ The displacement can be found using the equation $s = v \cdot t$.
|
||||||
| Integral | `\int_a^b dx` |
|
| Integral | `\int_a^b dx` |
|
||||||
| Sine function | `\sin(x)` |
|
| Sine function | `\sin(x)` |
|
||||||
|
|
||||||
6. Test your understanding by adding a new equation of your choice, ideally one that requires many LaTex symbols!
|
10. Test your understanding by adding a new equation of your choice, ideally one that requires many LaTex symbols!
|
||||||
|
|
||||||
7. When you are ready, commit your changes to the repository by clicking on the green `Commit changes` button.
|
11. When you are ready, commit your changes to the repository by clicking on the green `Commit changes` button.
|
||||||
|
|
||||||
8. Add a commit message.
|
12. Add a commit message.
|
||||||
|
|
||||||
9. To see your changes, go to {octicon}`play;1em` `Actions` - The most recent workflow run `overview.md / the commit message of the commit you just made` - Wait for it to finish - In the summary, click on the link of your book shown in the table `Branches deployed` and under `Primary book at root` (getting bored of waiting? There'll be exercising on doing this locally which prevents you from waiting).
|
13. To see your changes, go to {octicon}`play` `Actions` - The most recent workflow run `overview.md / the commit message of the commit you just made` - Wait for it to finish - In the summary, click on the link of your book shown in the table `Branches deployed` and under `Primary book at root` (getting bored of waiting? There'll be exercising on doing this locally which prevents you from waiting).
|
||||||
|
|
||||||
10. Do you see your change? If you don't see it click `CTRL`+`F5`/`Control`+`F5`to refresh the page.
|
14. Do you see your change? If you don't see it click `CTRL`+`F5`/`Control`+`F5`to refresh the page.
|
||||||
|
|
||||||
|
|
||||||
```{admonition} Check your understanding
|
```{admonition} Check your understanding
|
||||||
|
|
@ -64,7 +86,8 @@ The displacement can be found using the equation $s = v \cdot t$.
|
||||||
|
|
||||||
Before moving on to the next exercise, make sure you understand the following:
|
Before moving on to the next exercise, make sure you understand the following:
|
||||||
- What is the difference between inline and block equations?
|
- What is the difference between inline and block equations?
|
||||||
- How do you use LaTeX formatting for different mathematical symbols?
|
- How do you use TeX formatting for different mathematical symbols?
|
||||||
|
- What is the purpose of using single vs. double dollar signs for equations?
|
||||||
|
- How do you troubleshoot if your equations are not rendering correctly?
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue