cvs: pear /Text_Wiki/Text/Wiki/Render/Latex Bold.php Italic.php
| From: | bertrand GUGGER | Date: | Mon, 18 Jul 2005 15:16:48 +0000 |
| Subject: | cvs: pear /Text_Wiki/Text/Wiki/Render/Latex Bold.php Italic.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-33121@lists.php.net to get a copy of this message | ||
toggg Mon Jul 18 11:16:48 2005 EDT
Modified files:
/pear/Text_Wiki/Text/Wiki/Render/Latex Bold.php Italic.php
Log:
No more ugly include, actually rendering latex,
other classes for Latex renderer to be done (currently Xhtml) ....
http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Latex/Bold.php?r1=1.3&r2=1.4&ty=u
Index: pear/Text_Wiki/Text/Wiki/Render/Latex/Bold.php
diff -u pear/Text_Wiki/Text/Wiki/Render/Latex/Bold.php:1.3
pear/Text_Wiki/Text/Wiki/Render/Latex/Bold.php:1.4
--- pear/Text_Wiki/Text/Wiki/Render/Latex/Bold.php:1.3 Mon Jul 18 10:43:19 2005
+++ pear/Text_Wiki/Text/Wiki/Render/Latex/Bold.php Mon Jul 18 11:16:48 2005
@@ -1,4 +1,28 @@
<?php
-include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Strong.php';
-class Text_Wiki_Render_Latex_Bold extends Text_Wiki_Render_Latex_Strong {}
+class Text_Wiki_Render_Latex_Bold extends Text_Wiki_Render_Latex_Strong {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ if ($options['type'] == 'start') {
+ return '\textbf{';
+ }
+
+ if ($options['type'] == 'end') {
+ return '}';
+ }
+ }
+}
?>
http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Latex/Italic.php?r1=1.3&r2=1.4&ty=u
Index: pear/Text_Wiki/Text/Wiki/Render/Latex/Italic.php
diff -u pear/Text_Wiki/Text/Wiki/Render/Latex/Italic.php:1.3
pear/Text_Wiki/Text/Wiki/Render/Latex/Italic.php:1.4
--- pear/Text_Wiki/Text/Wiki/Render/Latex/Italic.php:1.3 Mon Jul 18 10:43:19 2005
+++ pear/Text_Wiki/Text/Wiki/Render/Latex/Italic.php Mon Jul 18 11:16:48 2005
@@ -1,5 +1,28 @@
<?php
-include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Emphasis.php';
class Text_Wiki_Render_Latex_Italic extends Text_Wiki_Render_Latex_Emphasis {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ if ($options['type'] == 'start') {
+ return '\textit{';
+ }
+
+ if ($options['type'] == 'end') {
+ return '}';
+ }
+ }
}
?>