4. Démo de Marp slides !

Ces slides peuvent être rédigés dans VSCode et visualisés avec Marp.

On peut les exporter comme une présentation HTML/js interactive, depuis VSCode, et ensuite convertir cette présentation comme un PDF.

© This document is © Lilian Besson, 2021 see https://github.com/Naereen/slides/

4.1. Paragraphs :rocket:

On my theme, paragraphs have justified text by default!

This is random paragraph: Et commodo culpa adipisicing culpa irure officia excepteur. Irure exercitation veniam laboris quis elit tempor amet pariatur aute est dolore. Excepteur cillum sint in ea laborum in ex duis laboris nostrud minim.

This is random paragraph: Et commodo culpa adipisicing culpa irure officia excepteur. Irure exercitation veniam laboris quis elit tempor amet pariatur aute est dolore. Excepteur cillum sint in ea laborum in ex duis laboris nostrud minim.

This is random paragraph: Et commodo culpa adipisicing culpa irure officia excepteur. Irure exercitation veniam laboris quis elit tempor amet pariatur aute est dolore. Excepteur cillum sint in ea laborum in ex duis laboris nostrud minim.

4.2. Paragraphs

  1. This is random paragraph: Et commodo culpa adipisicing culpa irure officia excepteur. Irure exercitation veniam laboris quis elit tempor amet pariatur aute est dolore. Excepteur cillum sint in ea laborum in ex duis laboris nostrud minim.

  2. This is random paragraph: Et commodo culpa adipisicing culpa irure officia excepteur. Irure exercitation veniam laboris quis elit tempor amet pariatur aute est dolore. Excepteur cillum sint in ea laborum in ex duis laboris nostrud minim.

  3. This is random paragraph: Et commodo culpa adipisicing culpa irure officia excepteur. Irure exercitation veniam laboris quis elit tempor amet pariatur aute est dolore. Excepteur cillum sint in ea laborum in ex duis laboris nostrud minim.

4.3. Maths using \(\LaTeX\) notations

4.4. Maths, with MathJax

Inline equations, as for instance the classic \(\Delta = b^2-4ac\) and \(x_{1,2} = \frac{-b\pm\sqrt{\Delta}}{2a}\), or display equations as this one: $\( J_\alpha(x) = \sum\limits_{m=0}^\infty \frac{(-1)^m}{m! \, \Gamma(m + \alpha + 1)}{\left({\frac{x}{2}}\right)}^{2 m + \alpha} \)$

4.5. More maths

\[ 4 \sum_{n=1}^{+\infty} \rho_n^2 \sin^2 nh = \frac{1}{2\pi} \int_{-\pi}^{\pi}\lvert f(x+h) - f(x-h)\rvert^2 dx. \]
\[ 4 \sum_{n=1}^{+\infty} \rho_n^2 \sin^2 nh = \frac{1}{2\pi} \int_{-\pi}^{\pi}\lvert f(x+h) - f(x-h)\rvert^2 dx. \]
\[ 4 \sum_{n=1}^{+\infty} \rho_n^2 \sin^2 nh = \frac{1}{2\pi} \int_{-\pi}^{\pi}\lvert f(x+h) - f(x-h)\rvert^2 dx. \]
\[ 4 \sum_{n=1}^{+\infty} \rho_n^2 \sin^2 nh = \frac{1}{2\pi} \int_{-\pi}^{\pi}\lvert f(x+h) - f(x-h)\rvert^2 dx. \]

See https://naereen.github.io/StrapDown.js/example3.html

4.6. Images

J’ai essayé de faire de ce slide un « titre » avec :

<!-- _class: titre -->

4.7. Using images

Image left aligned (default): width:250 width:250

Image centered: width:250

Image right aligned: width:250

![width:250](logo.png)
![width:250](logo.png#left)
![width:250](logo.png#right)
![width:250](logo.png#center)

4.8. Change width/height of image

width:100width:200width:300

![width:100](logo.png)
![width:200](logo.png)
![width:300](logo.png)

4.9. Code listing

In OCaml, for instance:

let rec fact n = n ;;
type 'a Tree = Leaf | Node of ('a Tree, 'a, 'a Tree);;

Using this Markdown code:

```ocaml
let rec fact n = n ;;
type 'a Tree = Leaf | Node of ('a Tree, 'a, 'a Tree);;
```

4.10. Bullet list

  • One

  • Two

  • Three

- One
- Two
- Three

4.11. Fragmented list

  • One

  • Two

  • Three

Lists using * should appear one at a time, in the produced HTML or PDF.

* One
* Two
* Three

See https://github.com/marp-team/marpit/issues/145

4.12. Hex color (White BG + Black text)

bg

Demo of using

![bg](#fff)    <!-- white background: default -->
![](#000)      <!-- black text: default -->

to change font color and slide background. (Marp Markdown’s syntax extension)

4.13. Named color (black BG + white text)

bg

Demo of using

![bg](black)    <!-- black background: ugly -->
![](white)      <!-- white text: ugly -->

to change font color and slide background. (Marp Markdown’s syntax extension)

4.14. RGB values (Orange BG + White text)

bg

Demo of using

![bg](rgb(255,128,0))    <!-- orange background: ugly -->
![](rgb(255,255,255))    <!-- white text: ugly -->

to change font color and slide background. (Marp Markdown’s syntax extension)

4.15. Slides split in two-columns?

See https://github.com/marp-team/marpit/issues/137

  • item

  • item

Image on left side:

Image on right background side

4.16. ~~TODO:~~ DONE!

  • [x] Titles are ~~NOT~~ top aligned ~~yet, I managed to obtain this on old Marp, I want it again!~~ DONE

  • [x] fontify and my own handwriting font don’t work yet!

  • [x] ~~Test de ligature fi if si tl rst rest Naereen~~ failed

  • [x] How to export slides to PDF? Use decktape or marp-cli

  • [x] TODO lines are not correctly converted?

4.17. Test of empty slide

I want this header to be top aligned!

4.18. Test of empty slide

I want this header to be top aligned!

4.19. Conclusion

4.19.1. :point_right: Take home message

  • Pretty OK, but not perfect


Merci de votre attention :+1: !