Expresso.Renderer (expresso v0.1.0)

Copy Markdown View Source

The renderer

It makes one HTML document from a deck. The document holds the present view, the handout view, the styles, the generated rules of the overlays and the script of the presenter.

The present view holds one section for each slide. The handout view holds one section for each step of each slide, with the notes of the speaker under each page. docs/overlays.md gives the reason for the second view.

Summary

Functions

inner_block(name, list)

(macro)

render(assigns)

@spec render(map() | keyword()) :: Phoenix.HTML.safe()

Make the HTML tree of a deck

The assigns hold the deck under the key deck. Expresso.Deck.render/1 calls this function, and it writes the tree and adds the doctype. The function dims the lines of each code element with the highlight option with Expresso.Element.Code.spotlight/1 first. It runs the tool of each graph with Expresso.Element.Diagram.draw/1, so a render runs each tool one time. Expresso.Element.Math.typeset/1 makes the MathML of each formula in LaTeX, in one run of Node, and Expresso.Element.Math.place/1 writes each move of a part of a formula. Expresso.Element.Window.apply/1 gives each code element, image and embed the window of the deck when it has none of its own. It gives each element its identity with Expresso.Overlay.Render.identify/1 next. Then Expresso.Goto.resolve/1 gives each link its number and its commands, and it raises for a link to a slide or a step that the deck does not have.

The function makes the document in Expresso.Copies.number/1. Thus the copies of a diagram and of an arrow get the same ids in each render of a deck.

render_slot(slot, arg)

(macro)