package presentation
The algorithm for presenting MMT content (data structures to user-facing formats). See api for an overview of the algorithms.
The main interfaces are - Presenter: the main interface for parser (combining a structure and an object parser) - StructurePresenter: presenting structural elements - ObjectPresenter: presenting objects
The main implementations are (in each case for structural elements and objects) - for OMDoc XML: OMDocPresenter resp. OpenMathPresenter - for plain strings (using the toString methods): TextPresenter resp. ObjectTextPresenter - for nice human-oriented strings: MMTStructurePresenter resp. NotationBasedParser - for HTML: HTMLPresenter resp. MathMLPresenter
- Source
- package.scala
- Alphabetic
- By Inheritance
- presentation
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
class
FileWriter extends RenderingHandler
writes text output to a file
-
class
FlatMMTSyntaxPresenter extends MMTSyntaxPresenter
flattened
- abstract class HTMLPresenter extends Presenter
- class HTMLRenderingHandler extends RenderingHandler
-
class
MMTDocExporter extends HTMLPresenter
like HTMLPresenter but without SVG graphs
-
class
MMTSyntaxPresenter extends Presenter
Presenter writing out parsable MMT surface syntax.
Presenter writing out parsable MMT surface syntax.
This class supersedes the now deleted class MMTStructurePresenter. Previously was just a minimally modified copy of MMTStructurePresenter now been deleted.
-
class
MathMLPresenter extends NotationBasedPresenter
This overrides the appropriate methods present objects as MathML.
This overrides the appropriate methods present objects as MathML.
The MathML carries additional attributes as described in HTMLAttributes
-
class
NotationBasedPresenter extends ObjectPresenter
presents objects using notations
presents objects using notations
The main methods do not produce any rendering themselves. Instead, they call special methods that may be overridden for customization. The default implementations produce plain text.
The bracket placement algorithm is only approximate. It will sometimes put too many and sometimes too few brackets. The latter will confuse the NotationBasedParser, but rarely humans.
-
trait
ObjectPresenter extends Extension
the type of presenters that can handle objects
the type of presenters that can handle objects
see also [Presenter]]
- case class PresentationContext(rh: RenderingHandler, owner: Option[CPath], ids: List[(String, String)], source: Option[SourceRef], pos: Position, globalContext: Context, context: List[VarData], style: Option[(PresentationContext) ⇒ String]) extends Product with Serializable
-
abstract
class
Presenter extends BuildTarget with StructurePresenter with ObjectPresenter with LeveledExtension
the designated super class of all presenters
the designated super class of all presenters
The format for which a Presenter is applicable is the same as the key used to run it as an exporter.
-
abstract
class
RenderingHandler extends AnyRef
A RenderingHandler collects output generated during presentation
- trait RenderingResult[A] extends RenderingHandler
-
class
StringBuilder extends RenderingHandler with RenderingResult[String]
writes text output to a StringBuilder
-
trait
StructurePresenter extends BuildTarget with Exporter
the type of presenters that can handle structural elements
the type of presenters that can handle structural elements
see also Presenter
-
case class
VarData(decl: VarDecl, binder: Option[GlobalName], declpos: Position) extends Product with Serializable
This class stores information about a bound variable.
This class stores information about a bound variable.
- decl
the variable declaration
- binder
the path of the binder (if atomic)
- declpos
the position of the variable declaration
Value Members
-
object
ConsoleWriter extends RenderingHandler
writes text output to the console
-
object
HTMLAttributes
describes the special attributes used in generated HTML and MathML
-
object
OMDocPresenter extends Presenter
A Presenter that returns XML based on the toNode method, i.e., OMDoc
A Presenter that returns XML based on the toNode method, i.e., OMDoc
This Presenter can be used without initialization.
-
object
ObjectTextPresenter extends ObjectPresenter
A Presenter that returns text based on the toString method
A Presenter that returns text based on the toString method
This Presenter can be used without initialization.
-
object
OpenMathPresenter extends ObjectPresenter
A Presenter that returns XML based on the toNode method, i.e., OpenMath
A Presenter that returns XML based on the toNode method, i.e., OpenMath
This Presenter can be used without initialization.
-
object
Presenter
helper object
-
object
TextPresenter extends Presenter
A Presenter that returns text based on the toString method
A Presenter that returns text based on the toString method
This Presenter can be used without initialization.