Changes

Jump to navigation Jump to search
Add section about registering pretty printers (required in latest beta)
use it, see [[Verbatim_text#Your_own_formatter]]. We'll focus here on
what to put in the file.
 
== Registering a new pretty printer ==
To let the pretty printer core know about your pretty printer, you need
to register it first. You do this by calling the
<code>buffers.newvisualizer</code> function:
 
visualizer = buffers.newvisualizer('foo')
 
Here, you pass the name of the pretty printer, which is the (lowercase)
version of the first argument to <code>\installprettytype</code>.
 
This function returns an (empty) table, into which you should store the
hook functions for any hooks you want to override. You can do this by
simply declaring the function with <code>visualizer</code> as the first
component of the name (or whatever you assigned the return value from
<code>newvisualizer</code> to). Each of the function headers in the hook
list below use this.
== Defining hooks ==
14

edits

Navigation menu