1<?php 2/** 3 * Space element for the Ad Hoc MathML plugin 4 * 5 * Defines <mspace> ... </mspace> syntax 6 * More info: https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mspace 7 * 8 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 9 * @author Sascha Leib <sascha.leib(at)kolmio.com> 10 */ 11 12class syntax_plugin_adhocmathml_mspace extends syntax_plugin_adhocmathml_abstract { 13 14 protected $tag = 'mspace'; 15 16 /* allow link attributes: */ 17 function allowSpecificAttribute(&$name, &$value) { 18 //dbg('MathML: <mspace> - allowSpecificAttribute(' . $name . ', "' . $value . '")'); 19 20 switch (trim($name)) { 21 22 case 'width': 23 case 'height': 24 case 'depth': /* length-percentages */ 25 return preg_match('/^[\w\d\%]+$/', trim($value)); 26 break; 27 28 default: 29 return false; 30 } 31 } 32 33 34 /** 35 * ODT Renderer Functions 36 */ 37 function renderODTElementOpen($renderer, $HTMLelement, $data) { 38 //$renderer->table_open(); 39 } 40 function renderODTElementClose($renderer, $element) { 41 //$renderer->table_close(); 42 } 43}