Skip to content

Commit

Permalink
Update code blocks in magics section
Browse files Browse the repository at this point in the history
  • Loading branch information
johnne committed Nov 27, 2024
1 parent ce6a0e4 commit 037d7e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pages/jupyter.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -331,17 +331,17 @@ by running `%load_ext rpy2.ipython` in a cell.
Try this out if you know any of the languages above. For example, to run some
simple R code:

```
```r
%%R
print(paste("Hello","world", sep=" "))
```


Or to print the quadratic formula with LaTeX:

```no-highlight
```latex
%%latex
\begin{array}{*{20}c} {x = \frac{{ - b \pm \sqrt {b^2 - 4ac} }}{{2a}}} & {{\rm{when}}} & {ax^2 + bx + c = 0} \\ \end{array}
\begin{array}{} {x = \frac{{ - b \pm \sqrt {b^2 - 4ac} }}{{2a}}} & {{\rm{when}}} & {ax^2 + bx + c = 0} \\ \end{array}
```

Another useful magic is `%precision` which sets the floating point precision
Expand Down

0 comments on commit 037d7e5

Please sign in to comment.