2007-02-23 00:41:25 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
class Text_Wiki_Render_Latex_Url extends Text_Wiki_Render {
|
2007-07-20 12:03:04 +04:00
|
|
|
|
|
|
|
|
2007-02-23 00:41:25 +03:00
|
|
|
var $conf = array(
|
|
|
|
'target' => false,
|
|
|
|
'images' => true,
|
|
|
|
'img_ext' => array('jpg', 'jpeg', 'gif', 'png')
|
|
|
|
);
|
2007-07-20 12:03:04 +04:00
|
|
|
|
2007-02-23 00:41:25 +03:00
|
|
|
/**
|
2007-07-20 12:03:04 +04:00
|
|
|
*
|
2007-02-23 00:41:25 +03:00
|
|
|
* Renders a token into text matching the requested format.
|
2007-07-20 12:03:04 +04:00
|
|
|
*
|
2007-02-23 00:41:25 +03:00
|
|
|
* @access public
|
2007-07-20 12:03:04 +04:00
|
|
|
*
|
2007-02-23 00:41:25 +03:00
|
|
|
* @param array $options The "options" portion of the token (second
|
|
|
|
* element).
|
2007-07-20 12:03:04 +04:00
|
|
|
*
|
2007-02-23 00:41:25 +03:00
|
|
|
* @return string The text rendered from the token options.
|
2007-07-20 12:03:04 +04:00
|
|
|
*
|
2007-02-23 00:41:25 +03:00
|
|
|
*/
|
2007-07-20 12:03:04 +04:00
|
|
|
|
2007-02-23 00:41:25 +03:00
|
|
|
function token($options)
|
|
|
|
{
|
|
|
|
// create local variables from the options array (text,
|
|
|
|
// href, type)
|
|
|
|
extract($options);
|
|
|
|
|
2007-07-20 12:03:04 +04:00
|
|
|
if ($options['type'] == 'start') {
|
|
|
|
return '';
|
|
|
|
} else if ($options['type'] == 'end') {
|
|
|
|
return '\footnote{' . $href . '}';
|
|
|
|
} else {
|
|
|
|
return $text . '\footnote{' . $href . '}';
|
|
|
|
}
|
2007-02-23 00:41:25 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|