Packages

  • package root
    Definition Classes
    root
  • package info
    Definition Classes
    root
  • package kwarc
    Definition Classes
    info
  • package mmt
    Definition Classes
    kwarc
  • package api

    This is the main package of the MMT API.

    This is the main package of the MMT API.

    It holds subpackages for all data structures, data containers, and the central algorithms and services.

    Classes directly defined in the package

    Some minor classes that are used throughout MMT are defined in this package, in particular:

    • MMT URIs in the class Path and Namespace
    • processing and content errors in the class Error

    The package also contains root classes for certain types that are subclassed throughout the package. Most importantly:

    • StructuralElement: structure-level (= named) parts in the data structures for the MMT language: documents, theories, constants, ...
    • MMTTask: tasks for a single object: parsing, checking, ...
    • Rule: object-level part of the MMT language that is written in Scala

    Subpackages

    Data structures for the MMT language

    The data structures for the MMT languages are defined in 4 packages corresponding to the 4 levels: - documents: Documents and all other NarrativeElements - modules: Modules (= the toplevel declarations), in particular Theorys and Views - symbols: all Declarations inside modules, in particular Constants - objects: all anonymous Objects (e.g., formulas, functions, etc.), in particular Contexts and Terms

    The former 3 levels are jointly called 'structural' levels. All elements subclass StructuralElement, have an MMT URI, and carry an MMT URI referring to their parent in the MMT abstract syntax tree.

    Structural elements are extensible (via DerivedModules and DerivedDeclarations), and the package patterns defines declaration patterns as a built-in extension.

    All structural elements are mutable and implement the ContainerElement interface for changing their children. Objects, by contrast, are represented as immutable inductive types.(except for carrying metadata.Metadata and objects.ClientProperties). The boundary between structural elements and objects is mediated by ComponentContainers: these are mutable, owned by structural elements, and maintain objects.

    A few auxiliary data structures shifted to separate packages: - opaque: external (i.e., informal, computation) content - informal: partially outdated informal data structures - metadata: metadata annotations to all structural elements or objects

    The MMT main class and its internal state

    The package frontend contains the class Controller, which owns all state relevant for running MMT. Typically, each application creates a single instance of this class. The package also defines several other essential classes, most importantly MMT's extension (=plug-in, add-on) interfaces via the Extension class.

    The package libraries maintains the instances of MMT language data structures, in particular the Library class. Controller owns a Library, which stores all structural elements that have been loaded into memory.

    User interfaces

    The package frontend also contains the main executable classes, in particular the Shell class.

    The package gui collects all classes for building graphical user interfaces. This includes auxiliary classes for use in IDE plugins.

    The package web collects all classes for the HTTP interface of MMT.

    Physical storage of the MMT language files

    The package archives defines MMT Archives (= projects) as well as classes for building and working with archives. The latter include in particular the BuildManager and BuildTarget. Build targets include Importers and [Exporter]]s that translate between MMT and other formats.

    The package backend defines classes for maintaining archives and translating between the MMT URIs of structural elements and their physical storage locations.

    The central algorithms for processing MMT content

    The processing model of MMT consists of several major algorithms. - parser: read strings into MMT data structures - checking: check and refine MMT data structures - uom: pure computation on MMT data structures - proving: theorem proving on MMT data structures (in very early state)) - execution: imperative computation (in very, very early state) - presentation: rendering MMT data structures in user-facing formats (including HTML+presentation MathML)

    All algorithms are defined in Extensions coupled with default implementations. Moreover, all algorithms are split into two separate levels, one for structural elements and objects. See LeveledExtension.

    The package notations maintains the common code for parsing and presentation.

    The package valuebases maintains mathematical databases as a part of MMT.

    Other algorithms on the MMT data structures

    The package ontology contains a relational, semantic web-style ontology and query engine for it.

    The package moc contains change management.

    The package refactoring contains refactoring principles.

    General purpose utility functions

    The package utils defines general purpose APIs for files, URIs, HTML building, etc.

    Definition Classes
    mmt
  • package presentation

    The algorithm for presenting MMT content (data structures to user-facing formats).

    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

    Definition Classes
    api
  • ConsoleWriter
  • FileWriter
  • FlatMMTSyntaxPresenter
  • HTMLAttributes
  • HTMLPresenter
  • HTMLRenderingHandler
  • MMTDocExporter
  • MMTSyntaxPresenter
  • MathMLPresenter
  • NotationBasedPresenter
  • OMDocPresenter
  • ObjectPresenter
  • ObjectTextPresenter
  • OpenMathPresenter
  • PresentationContext
  • Presenter
  • RenderingHandler
  • RenderingResult
  • StringBuilder
  • StructurePresenter
  • TextPresenter
  • VarData
c

info.kwarc.mmt.api.presentation

MathMLPresenter

class MathMLPresenter extends NotationBasedPresenter

This overrides the appropriate methods present objects as MathML.

The MathML carries additional attributes as described in HTMLAttributes

Source
MathMLPresenter.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MathMLPresenter
  2. NotationBasedPresenter
  3. ObjectPresenter
  4. Extension
  5. Logger
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MathMLPresenter()

Type Members

  1. case class LocalError(s: String) extends ExtensionError with Product with Serializable

    a custom error class for this extension

    a custom error class for this extension

    Definition Classes
    Extension
  2. type Cont = () ⇒ Unit

    auxiliary type for a continuation function

    auxiliary type for a continuation function

    Definition Classes
    NotationBasedPresenter

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply(o: Obj, origin: Option[CPath], style: (PresentationContext) ⇒ String)(implicit rh: RenderingHandler): Unit

    generalized apply method that takes a callback function to determine the css class of a subterm

  5. def apply(o: Obj, origin: Option[CPath])(implicit rh: RenderingHandler): Unit
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def asString(o: Obj, origin: Option[CPath] = None): String
    Definition Classes
    ObjectPresenter
  8. def asXML(o: Obj, origin: Option[CPath] = None): Node
    Definition Classes
    ObjectPresenter
  9. def catchErrors[A](msg: String, recoverWith: ⇒ A)(code: ⇒ A): A

    like its partner but with return value

    like its partner but with return value

    Attributes
    protected
    Definition Classes
    Extension
  10. def catchErrors(msg: String)(code: ⇒ Unit): Unit

    convenience method for wrapping code in error handler that throws LocalError

    convenience method for wrapping code in error handler that throws LocalError

    Attributes
    protected
    Definition Classes
    Extension
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  12. val controller: Controller

    the controller that this extension is added to; only valid after creation of the extension, i.e., will return null if used in a non-lazy val-field

    the controller that this extension is added to; only valid after creation of the extension, i.e., will return null if used in a non-lazy val-field

    Attributes
    protected
    Definition Classes
    Extension
  13. lazy val defaultPrefix: String
    Definition Classes
    Extension
  14. def destroy: Unit

    extension-specific cleanup (override as needed, empty by default)

    extension-specific cleanup (override as needed, empty by default)

    Extensions may create persistent data structures and threads, but they must clean up after themselves in this method

    Definition Classes
    Extension
  15. def destroyWhenRemainingTasksFinished: Unit

    convenience for calling waitUntilRemainingTasksFinished and then destroy

    convenience for calling waitUntilRemainingTasksFinished and then destroy

    Definition Classes
    Extension
  16. def doAttributedTerm(t: Term, k: OMID, v: Term)(implicit pc: PresentationContext): Int
    Definition Classes
    NotationBasedPresenter
  17. def doBracketedGroup(body: ⇒ Unit)(implicit pc: PresentationContext): Unit

    called to wrap around subexpressions that must be bracketed

    called to wrap around subexpressions that must be bracketed

    body

    the part between the brackets

    Definition Classes
    MathMLPresenterNotationBasedPresenter
  18. def doComplex(op: GlobalName, subs: Substitution, con: Context, args: List[Term])(implicit pc: PresentationContext): Unit

    default treatment of complex terms

    default treatment of complex terms

    Definition Classes
    NotationBasedPresenter
  19. def doDefault(o: Obj)(implicit pc: PresentationContext): Int

    called on objects for which no notation is available

    called on objects for which no notation is available

    returns

    1/0/-1 depending on the type of bracketing applied (yes/optional/no)

    Definition Classes
    NotationBasedPresenter
  20. def doDelimiter(p: GlobalName, d: Delimiter, implicits: List[Cont])(implicit pc: PresentationContext): Unit

    called on every delimiter that is rendered through the notation of a symbol

    called on every delimiter that is rendered through the notation of a symbol

    p

    the path of the rendered notation

    d

    the delimiter

    implicits

    implicit arguments of the rendered term that are not explicitly placed by the notation (added to first delimiter)

    Definition Classes
    MathMLPresenterNotationBasedPresenter
  21. def doDelimiter(n: LocalName, d: Delimiter)(implicit pc: PresentationContext): Unit

    called on every delimiter that is rendered through the notation of a variable

    called on every delimiter that is rendered through the notation of a variable

    n

    the variable name

    d

    the delimiter

    Definition Classes
    NotationBasedPresenter
  22. def doErrorMarker(args: List[Cont])(implicit pc: PresentationContext): Unit
  23. def doFraction(above: List[Cont], below: List[Cont], line: Boolean)(implicit pc: PresentationContext): Unit
  24. def doGlyphMarker(arg: Delim, alt: String = "Failed to load")(implicit pc: PresentationContext): Unit
  25. def doIdenMarker(arg: Delim)(implicit pc: PresentationContext): Unit
  26. def doIdentifier(p: ContentPath)(implicit pc: PresentationContext): Unit

    called by doDefaultTerm to render symbols

    called by doDefaultTerm to render symbols

    names are given in human-oriented form and not parsable if there are name clashes

    Definition Classes
    MathMLPresenterNotationBasedPresenter
  27. def doImplicit(body: ⇒ Unit)(implicit pc: PresentationContext): Unit

    called to wrap around subexpressions that are implicit arguments

    called to wrap around subexpressions that are implicit arguments

    body

    the argument

    Definition Classes
    MathMLPresenterNotationBasedPresenter
  28. def doInferredType(body: ⇒ Unit)(implicit pc: PresentationContext): Unit

    called to wrap around inferred types of bound variables

    called to wrap around inferred types of bound variables

    body

    the argument

    Definition Classes
    MathMLPresenterNotationBasedPresenter
  29. def doLabelMarker(args: List[Cont], label: String)(implicit pc: PresentationContext): Unit
  30. def doListWithSeparator(l: List[Cont], sep: Cont): Unit

    auxiliary function for inserting a separator (such as whitespace) into a list

    auxiliary function for inserting a separator (such as whitespace) into a list

    Definition Classes
    NotationBasedPresenter
  31. def doListWithSpace(l: List[Cont], n: Int = 1)(implicit pc: PresentationContext): Unit
    Definition Classes
    NotationBasedPresenter
  32. def doLiteral(l: OMLITTrait)(implicit pc: PresentationContext): Unit

    called by doDefaultTerm to render literals

    called by doDefaultTerm to render literals

    Definition Classes
    MathMLPresenterNotationBasedPresenter
  33. def doNumberMarker(arg: Delim)(implicit pc: PresentationContext): Unit
  34. def doOperator(s: String)(implicit pc: PresentationContext): Unit

    called by various methods to render MMT-level operators, such as ,:=()

    called by various methods to render MMT-level operators, such as ,:=()

    Definition Classes
    MathMLPresenterNotationBasedPresenter
  35. def doOptionallyBracketedGroup(body: ⇒ Unit)(implicit pc: PresentationContext): Unit

    called to wrap around subexpressions that could but do not have to be bracketed

    called to wrap around subexpressions that could but do not have to be bracketed

    body

    the part between the brackets

    Definition Classes
    MathMLPresenterNotationBasedPresenter
  36. def doPhantomMarker(args: List[Cont])(implicit pc: PresentationContext): Unit
  37. def doPresentationMarker(m: PresentationMarker, doMarkers: (List[Marker]) ⇒ Unit)(implicit pc: PresentationContext): Unit
    Definition Classes
    NotationBasedPresenter
  38. def doRootMarker(base: List[Cont], root: List[Cont])(implicit pc: PresentationContext): Unit
  39. def doScript(main: ⇒ Unit, sup: Option[Cont], sub: Option[Cont], over: Option[Cont], under: Option[Cont])(implicit pc: PresentationContext): Unit

    called to render a scripted object - an optional decorated by several optional scripts

    called to render a scripted object - an optional decorated by several optional scripts

    each script is passed as a continuation that must be called at the appropriate place

    main

    the object See notations.ScriptMarker for the meaning of the scripts

    Definition Classes
    MathMLPresenterNotationBasedPresenter
  40. def doSpace(level: Int)(implicit pc: PresentationContext): Unit

    called by various methods to render whitespace

    called by various methods to render whitespace

    level

    how big a space to produce, 0 for no space, higher levels also indicate line-breaking points

    Definition Classes
    MathMLPresenterNotationBasedPresenter
  41. def doSqrt(args: List[Cont])(implicit pc: PresentationContext): Unit
  42. def doTable(ms: List[Cont])(implicit pc: PresentationContext): Unit
  43. def doTd(ms: List[Cont])(implicit pc: PresentationContext): Unit
  44. def doTextMarker(text: Delim)(implicit pc: PresentationContext): Unit
  45. def doToplevel(o: Obj)(body: ⇒ Unit)(implicit pc: PresentationContext): Unit

    called once at the toplevel of every object to be rendered

    called once at the toplevel of every object to be rendered

    Definition Classes
    MathMLPresenterNotationBasedPresenter
  46. def doTr(ms: List[Cont])(implicit pc: PresentationContext): Unit
  47. def doUnbracketedGroup(body: ⇒ Unit)(implicit pc: PresentationContext): Unit

    called to wrap around subexpressions that are not bracketed

    called to wrap around subexpressions that are not bracketed

    body

    the part between the brackets

    Definition Classes
    MathMLPresenterNotationBasedPresenter
  48. def doVariable(n: LocalName)(implicit pc: PresentationContext): Unit

    called by doDefaultTerm to render variables

    called by doDefaultTerm to render variables

    Definition Classes
    MathMLPresenterNotationBasedPresenter
  49. def doWord(s: String)(implicit pc: PresentationContext): Unit
    Definition Classes
    NotationBasedPresenter
  50. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  51. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  52. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  53. def getAlias(p: GlobalName): List[LocalName]
    Attributes
    protected
    Definition Classes
    NotationBasedPresenter
  54. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  55. def getFromFirstArgOrEnvvar(args: List[String], name: String, default: String = ""): String
    Attributes
    protected
    Definition Classes
    Extension
  56. implicit def getNotations(p: GlobalName): List[TextNotation]

    returns

    an object o' that is presented instead (e.g., o itself) one position p for each component c of o' such that the c is the p-subobject of o a notation to use for presenting o'

    Attributes
    protected
    Definition Classes
    NotationBasedPresenter
  57. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  58. def initOther(e: Extension): Unit

    any extension can initialize other extensions if those are not meant to be added to the ExtensionManager

    any extension can initialize other extensions if those are not meant to be added to the ExtensionManager

    Attributes
    protected
    Definition Classes
    Extension
  59. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  60. def jobadattribs(implicit pc: PresentationContext): List[(String, String)]
    Attributes
    protected
  61. def log(e: Error): Unit

    logs an error - always logged

    logs an error - always logged

    Attributes
    protected
    Definition Classes
    Logger
  62. def log(s: ⇒ String, subgroup: Option[String] = None): Unit

    logs a message with this logger's logprefix

    logs a message with this logger's logprefix

    Attributes
    protected
    Definition Classes
    Logger
  63. def logError(s: ⇒ String): Unit

    log as an error message

    log as an error message

    Attributes
    protected
    Definition Classes
    Logger
  64. def logGroup[A](a: ⇒ A): A

    wraps around a group to create nested logging

    wraps around a group to create nested logging

    Attributes
    protected
    Definition Classes
    Logger
  65. def logPrefix: String

    the prefix used to identify this extension for logging, by default the class name

    the prefix used to identify this extension for logging, by default the class name

    Definition Classes
    ExtensionLogger
  66. def logTemp(s: ⇒ String): Unit

    temporary logging - always logged

    temporary logging - always logged

    Attributes
    protected
    Definition Classes
    Logger
  67. def makeErrorThrower(msg: String): ErrorHandler

    an ErrorHandler that wraps an error in a LocalError and throws it

    an ErrorHandler that wraps an error in a LocalError and throws it

    Attributes
    protected
    Definition Classes
    Extension
  68. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  69. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  70. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  71. def preparePresentation(o: Obj, origin: Option[CPath])(implicit rh: RenderingHandler): PresentationContext

    called once at the beginning of each presentation, override as needed

    called once at the beginning of each presentation, override as needed

    Attributes
    protected
    Definition Classes
    NotationBasedPresenter
  72. def recurse(obj: Obj)(implicit pc: PresentationContext): Int
    Attributes
    protected
    Definition Classes
    NotationBasedPresenter
  73. val report: Report
    Attributes
    protected
    Definition Classes
    ExtensionLogger
  74. def start(args: List[String]): Unit

    extension-specific initialization (override as needed, empty by default)

    extension-specific initialization (override as needed, empty by default)

    Definition Classes
    Extension
  75. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  76. def toString(): String
    Definition Classes
    AnyRef → Any
  77. def twoDimensional: Boolean

    1 or 2-dimensional notations, true by default

    1 or 2-dimensional notations, true by default

    Definition Classes
    NotationBasedPresenter
  78. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  79. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  80. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  81. def waitUntilRemainingTasksFinished: Unit

    extensions that process tasks in separate threads should override this and wait until those threads are done

    extensions that process tasks in separate threads should override this and wait until those threads are done

    Definition Classes
    Extension
  82. def wrapBrackets(brackets: Option[Boolean], body: ⇒ Unit)(implicit pc: PresentationContext): Unit

    wraps brackets around argument

    wraps brackets around argument

    brackets

    None/Some(true)/Some(false) for no/hidden/shown brackets

    Attributes
    protected

Inherited from NotationBasedPresenter

Inherited from ObjectPresenter

Inherited from Extension

Inherited from Logger

Inherited from AnyRef

Inherited from Any

Ungrouped