Changes

Jump to navigation Jump to search
→‎Hooks: Add {begin,end}_of_{display,inline} hooks
function visualizer.flush_line(str, nested)
This hook is called for every non-empty line, or the entire content ofan inline <code>\type</code> command. The first argument is the
line itself, as returned by the <tt>line</tt> hook. The second argument
is some indication of nested brackets in the input, but it's not
table and pass that to <tt>buffers.flush_result</tt> (which also handles
some stuff related to nesting).
 
===<tt>begin_of_display, end_of_display, begin_of_inline, end_of_inline</tt>===
 
function visualizer.begin_of_display()
function visualizer.end_of_display()
function visualizer.begin_of_inline()
function visualizer.end_of_inline()
 
These hooks are called at the start and end of prettyprinting a buffer,
file or phrase. The <code>_display</code> versions are used when
prettyprinting a buffer (named or anonymous using
<code>\starttyping</code>) or a file. The <code>_inline</code> versions
are used for prettyprinting a phrase inline, using <code>\type</code>.
 
These functions should return nothing, but can use <tt>texprint</tt> and
friends to produce output.
 
The default implementations output some tex commands using
<tt>buffers.commands.{begin,end}_of_{display,inline}_command</tt> (which
seem to expand to nothing currently).
== Utility functions and variables ==
14

edits

Navigation menu