home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / php / PEAR / Text / Wiki / Render / Latex / Subscript.php < prev    next >
Encoding:
PHP Script  |  2008-07-02  |  1.4 KB  |  55 lines

  1. <?php
  2. // vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:
  3. /**
  4.  * Subscript rule end renderer for Latex
  5.  *
  6.  * PHP versions 4 and 5
  7.  *
  8.  * @category   Text
  9.  * @package    Text_Wiki
  10.  * @author     Bertrand Gugger <bertrand@toggg.com>
  11.  * @copyright  2005 bertrand Gugger
  12.  * @license    http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
  13.  * @version    CVS: $Id: Subscript.php,v 1.1 2005/08/15 10:09:04 toggg Exp $
  14.  * @link       http://pear.php.net/package/Text_Wiki
  15.  */
  16.  
  17. /**
  18.  * This class renders subscript text in Latex.
  19.  *
  20.  * @category   Text
  21.  * @package    Text_Wiki
  22.  * @author     Bertrand Gugger <bertrand@toggg.com>
  23.  * @copyright  2005 bertrand Gugger
  24.  * @license    http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
  25.  * @version    Release: @package_version@
  26.  * @link       http://pear.php.net/package/Text_Wiki
  27.  */
  28. class Text_Wiki_Render_Latex_Subscript extends Text_Wiki_Render {
  29.  
  30.     /**
  31.     *
  32.     * Renders a token into text matching the requested format.
  33.     *
  34.     * @access public
  35.     *
  36.     * @param array $options The "options" portion of the token (second
  37.     * element).
  38.     *
  39.     * @return string The text rendered from the token options.
  40.     *
  41.     */
  42.  
  43.     function token($options)
  44.     {
  45.         if ($options['type'] == 'start') {
  46.             return '_{';
  47.         }
  48.  
  49.         if ($options['type'] == 'end') {
  50.             return '}';
  51.         }
  52.     }
  53. }
  54. ?>
  55.