] > inline.modes: automatic inline/block attribute

inline.modes: automatic inline/block attribute

Provides support for adding automatically the attributes display="inline" or display="block" in XHTML+MathML,etc.

1 Synopsis

This module tries to determine the value of the display="block" or "inline" attribute to the math element. To use it, set the entity "&inline.elements;" to a list of elements; in descendents of these display="inline" will be the default, otherwise display="inline" will be. Overrule with @display[whatever] as usual. See xhtml.mv in the lib directory for an example of it being used.

!declare-prefix @prefix[i] @uri[http://gloss.bham.ac.uk/mv/pmath/inline] {
!declare-prefix @prefix[html] @uri[http://gloss.bham.ac.uk/mv/html/plain] {
!declare-prefix @prefix[m] @uri[http://gloss.bham.ac.uk/mv/pmath/pmathml] {
!declare-prefix @prefix[xml] @uri[http://gloss.bham.ac.uk/mv/xml/xml] {
!init-parameter @name[m:display] @value[block]
!mode @name[i:body-content] @template[html:body-content] @type[process]
  !hook @mode[html:body-content] @action[process]
  !elt @fullname[[&inline.elements;]] ; e.g., "$p||li||dt||dd||h1||h2||h3||h4||h5||h6||table"
    !execute @mode[html:body-content] @hook[process] ${m:display}="inline"
  !include @mode[html:body-content] @hook[process]
}; !declare-prefix
}; !declare-prefix
}; !declare-prefix
}; !declare-prefix

This file is part of the GLOSS system, Copyright Richard Kaye http://gloss.bham.ac.uk/. Usage permitted under the GPL. No Warranty.

This page is copyright. Web page design and creation by GLOSS.