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 / Heading.php < prev    next >
Encoding:
PHP Script  |  2008-07-02  |  784 b   |  33 lines

  1. <?php
  2.  
  3. class Text_Wiki_Render_Latex_Heading extends Text_Wiki_Render {
  4.  
  5.     function token($options)
  6.     {
  7.         // get nice variable names (type, level)
  8.         extract($options);
  9.  
  10.         if ($type == 'start') {
  11.             switch ($level)
  12.                 {
  13.                 case '1':
  14.                     return '\part{';
  15.                 case '2':
  16.                     return '\section{';
  17.                 case '3':
  18.                     return '\subsection{';
  19.                 case '4':
  20.                     return '\subsubsection{';
  21.                 case '5':
  22.                     return '\paragraph{';
  23.                 case '6':
  24.                     return '\subparagraph{';
  25.                 }
  26.         }
  27.         
  28.         if ($type == 'end') {
  29.             return "}\n";
  30.         }
  31.     }
  32. }
  33. ?>