1<?php 2/** 3 * Fraction element for the Ad-Hoc MathML plugin 4 * 5 * Defines <mfrac> ... </mfrac> syntax 6 * More info: https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mfrac 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_mfrac extends syntax_plugin_adhocmathml_abstract { 13 14 protected $tag = 'mfrac'; 15 16 /* allow link attributes: */ 17 function allowSpecificAttribute(&$name, &$value) { 18 //dbg('MathML: <mfrac> - allowSpecificAttribute(' . $name . ', "' . $value . '")'); 19 20 switch (trim($name)) { 21 22 case 'linethickness': /* length-percentages */ 23 return preg_match('/^[\w\d\%]+$/', trim($value)); 24 break; 25 26 default: 27 return false; 28 } 29 } 30 31 32 /** 33 * ODT Renderer Functions 34 */ 35 function renderODTElementOpen($renderer, $HTMLelement, $data) { 36 //$renderer->table_open(); 37 } 38 function renderODTElementClose($renderer, $element) { 39 //$renderer->table_close(); 40 } 41}