Successfully reported this slideshow.
Your SlideShare is downloading. ×

Microdown

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
Improving Pharo Snapshots
Improving Pharo Snapshots
Loading in …3
×

Check these out next

1 of 37 Ad

More Related Content

Slideshows for you (20)

Similar to Microdown (20)

Advertisement

More from ESUG (20)

Recently uploaded (20)

Advertisement

Microdown

  1. 1. S. Ducasse & K. Osterbye Microdown a clean and extensible markup language to support Pharo documentation
  2. 2. MIT Copyright © 2019 - 2022 Stéphane Ducasse, Kasper Osterbye with contributions of Guillermo Polito, Leo Frere, Gaylord Delporte, Laurine Dargaud, Lina Grangaud, Hernan Morales Durand, Esteban Lorenzano https://github.com/pillar-markup/Microdown License
  3. 3. Goals and used for • Book generation http://books.pharo.org • Slides http://mooc.pharo.org • Static website generation (books) https://github.com/pillar-markup The Pillar Text Edition Toolchain
  4. 4. • Syntax of the markdown !! Header [[[ ]]] *this is a link to Pharo>http://www.pharo.org* • Document compilation chain Pillar: One word but two concepts
  5. 5. Pillar Compilation Chain Pillar Trees Slides Web PDF Pillar Visitors Pillar
  6. 6. • Better integration with external tools: text editors, websites • In-Image DOCUMENTATION New goals for Pillar
  7. 7. • Project documentation (e.g., Github readme fi les) • User discussion (e.g., Slack, Discord, Stack over fl ow) • Static site generation (e.g., Jekyll) Well-know, very used => low entry barrier Markdown is a de-facto “standard”
  8. 8. • No real support for books • No explicit anchor • No fi gures or code references • No caption • Not extensible • Since June 22 Math support but • cannot refer to your equation :) Markdown is weak
  9. 9. • Markdown clean and non-ambiguous subset => compatibility Microdown —> Markdown • Extensible => support for books => slide, calendar,… • A robust parser tolerates non-supported syntax => compatibility Microdown <— Markdown a clean and extensible markup language Microdown yet another one!
  10. 10. A Markdown Compatible Subset *** horizontal line # … ###### headers ``` 
 code blocks 
 ``` 1. ordered 
 2. lists * unordered 
 * lists [link](https://example.com) ![figure](image.jpg bold, formatted, italics $frac{1}{2}$ $$ frac{1}{2} $$
  11. 11. Microdown Extensions (1) (ignored by Markdown) % Comments Meta data { “author” : “Tintin et Milou”, “title” : “Tintin chez les picaros” }
  12. 12. Anchors and References (ignored by Markdown) # This title has an anchor @anchor ![Our Logo](logo.png size=80&anchor=logo1) References to anchors *@anchor@* and figures *@logo1@*.
  13. 13. Extensible Annotations {!…!} (ignored by Markdown) Extensible annotations (in text) {!footnote | value=footnote is an annotation.!} {!citation|ref=Duca99a!}
  14. 14. Extensible environments <! … !> (ignored by Markdown) <!slide|title=This is a cool title&tag=nh5p - a list of bullet - bullet 2 - bullet 3 !> <!inputFile|path=Chapters/withStyle.md!>
  15. 15. Extensible environments <! … !> (ignored by Markdown) <!columns <!column|width=80 - col 1 item1 a first list - col 1 item2 a first list !> !>
  16. 16. About Math & reference!!! (ignored by Markdown) Math in paragraph This is a math $frac{1+3}{2+5}$ Math equations $$ %anchor=Eq1 frac{1+3}{2+5} $$ As you can see in Equation *@Eq1@*
  17. 17. • Elements are either block elements (paragraphs, blockquotes, lists…) or inline elements (bold, italics, links…) • Blocks form a tree • When a block opener is detected a new block is open in the tree • A line is added to the current block if it accepts it. Otherwise the block is closed and it retries with the parent. Inspired by CommonMark’s speci fi cation Microdown Robust Parser
  18. 18. • Invalid syntax is then added as verbatim text • Unclosed inline elements do not propagate to other block elements! • Limited propagation of error! Inspired by CommonMark’s speci fi cation Microdown Robust Parser
  19. 19. • Class comments • Speci fi c class templates • Books :) • Documentation inside Pharo :) :) Use cases
  20. 20. Rendering of Class and Package Comments
  21. 21. Comment Templates
  22. 22. Comment Templates
  23. 23. Comment Templates
  24. 24. Comment Templates
  25. 25. • No, no, NO! you should not build Microdown by string concatenation (evil!) • You can script the Microdown builder Microdown builder 
 header: [ builder text: 'Hello ‘; italic: [ builder text: 'Pharo' ]; text: ' is cool'] 
 withLevel: 1; contents) # Hello _Pharo_ is cool • Used for comment templating Microdown builder
  26. 26. Pillar Compilation Chain Pillar Trees Slides Web PDF Pillar Visitors Pillar uDown uDown Trees uDown Visitors
  27. 27. Books (state of union) • full conversion of Pillar syntax book into Microdown • pillar convertBook index.pillar • full compile a md book (PBE9 as testbed) • pillar build pdf index.md
  28. 28. Microdown HTML Styler Converting µ⬇︎ to HTML
  29. 29. Microdown HTML Styler @ Work Converting µ⬇︎ to HTML
  30. 30. Microdown HTML Styler @ Work Converting µ⬇︎ to HTML
  31. 31. • Browse a speci fi c uDown fi le • Browse uDown on disc • Browse all class comments of a package • Browse uDown from http • Browse uDown directories on github/… Microdown Document Browser
  32. 32. Nice Help System
  33. 33. • Editing uDown documentation
  34. 34. Editing uDown documentation
  35. 35. • Books: • convert them all (check if math is fully working) • browsable on github AND in HTML AND from Pharo (see next item) • Document Browser in Pharo11 • Resurrect ecstatic for web page Next Steps
  36. 36. Next Steps

×