latex.php

gehe zur Dokumentation dieser Datei
00001 <?php
00002 /*************************************************************************************
00003  * latex.php
00004  * -----
00005  * Original Author: efi
00006  * modified by Matthias Pospiech (mail@matthiaspospiech.de)
00007  *************************************************************************************
00008  *
00009  *   This file is not yet part of GeSHi. (and is not compatible to the 1.1+ branch)
00010  *
00011  *   GeSHi is free software; you can redistribute it and/or modify
00012  *   it under the terms of the GNU General Public License as published by
00013  *   the Free Software Foundation; either version 2 of the License, or
00014  *   (at your option) any later version.
00015  *
00016  *   GeSHi is distributed in the hope that it will be useful,
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *   GNU General Public License for more details.
00020  *
00021  *   You should have received a copy of the GNU General Public License
00022  *   along with GeSHi; if not, write to the Free Software
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024  *
00025  ************************************************************************************/
00026 
00027 if (isset($this) && is_a($this, 'GeSHi')) {
00028     $this->set_symbols_highlighting(false);
00029     $this->set_numbers_highlighting(false);
00030 }
00031 
00032 $language_data = array (
00033     'LANG_NAME' => 'LaTeX',
00034     'COMMENT_SINGLE' => array(1 => '%'),
00035     'COMMENT_MULTI' => array(),
00036     'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
00037     'QUOTEMARKS' => array(),
00038     'ESCAPE_CHAR' => '',
00039     'KEYWORDS' => array(
00040         ),
00041     'SYMBOLS' => array(
00042         '.', ',','\\',"~", "{", "}", "[", "]", "$"
00043         ),
00044     'CASE_SENSITIVE' => array(
00045         GESHI_COMMENTS => true,
00046         1 => false,
00047         2 => false,
00048         3 => false,
00049         4 => false,
00050         ),
00051     'STYLES' => array(
00052         'KEYWORDS' => array(
00053             ),
00054         'COMMENTS' => array(
00055             1 => 'color: #808080; font-style: italic;'
00056             ),
00057         'ESCAPE_CHAR' => array(
00058             ),
00059         'BRACKETS' => array(
00060             ),
00061         'STRINGS' => array(
00062             ),
00063         'NUMBERS' => array(
00064             ),
00065         'METHODS' => array(
00066             ),
00067         'SYMBOLS' => array(
00068             ),
00069         'REGEXPS' => array(
00070             1 => 'color: #00A000; font-weight: bold;',  // Math inner
00071             2 => 'color: #800000; font-weight: normal;', // \keyword #202020
00072             3 => 'color: #2222D0; font-weight: normal;', // {...}
00073             4 => 'color: #2222D0; font-weight: normal;', // [Option]
00074             5 => 'color: #00A000; font-weight: normal;', // Mathe #CCF020
00075             6 => 'color: #F00000; font-weight: normal;', // Structure \begin
00076             7 => 'color: #F00000; font-weight: normal;', // Structure \end
00077             8 => 'color: #F00000; font-weight: normal;', // Structure: Labels
00078             //9 => 'color: #F00000; font-weight: normal;',  // Structure
00079             10 => 'color: #0000D0; font-weight: bold;',  // Environment
00080             11 => 'color: #0000D0; font-weight: bold;',  // Environment
00081         ),
00082         'SCRIPT' => array(
00083             )
00084         ),
00085     'URLS' => array(
00086         ),
00087     'OOLANG' => false,
00088     'OBJECT_SPLITTERS' => array(
00089         ),
00090     'REGEXPS' => array(
00091         // Math inner
00092         1 => array(
00093             GESHI_SEARCH => "(\\\\begin\\{)(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|alignat|flalign )(\\})(.*)(\\\\end\\{)(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|alignat|flalign)(\\})",
00094             GESHI_REPLACE => '\\4',
00095             GESHI_MODIFIERS => 's',
00096             GESHI_BEFORE => '\1\2\3',
00097             GESHI_AFTER => '\5\6\7'
00098             ),
00099         //  \keywords
00100         2 => array(
00101             GESHI_SEARCH => "(\\\\)([a-zA-Z]+)",
00102             GESHI_REPLACE => '\1\2',
00103             GESHI_MODIFIERS => '',
00104             GESHI_BEFORE => '',
00105             GESHI_AFTER => ''
00106             ),
00107         // {parameters}
00108         3 => array(
00109             GESHI_SEARCH => "(\\{)(.*)(\\})",
00110             GESHI_REPLACE => '\2',
00111             GESHI_MODIFIERS => '',
00112             GESHI_BEFORE => '\1',
00113             GESHI_AFTER => '\3'
00114             ),
00115         // [Option]
00116         4 => array(
00117             GESHI_SEARCH => "(\[)(.+)(\])",
00118             GESHI_REPLACE => '\2',
00119             GESHI_MODIFIERS => '',
00120             GESHI_BEFORE => '\1',
00121             GESHI_AFTER => '\3'
00122             ),
00123         // Mathe  mit $ ... $
00124         5 => array(
00125             GESHI_SEARCH => "(\\$)(.+)(\\$)",
00126             GESHI_REPLACE => '\1\2\3',
00127             GESHI_MODIFIERS => '',
00128             GESHI_BEFORE => '',
00129             GESHI_AFTER => ''
00130             ),
00131         // Structure begin
00132         6 => array(
00133             GESHI_SEARCH => "(\\\\begin)(?=[^a-zA-Z])",
00134             GESHI_REPLACE => '\\1',
00135             GESHI_MODIFIERS => '',
00136             GESHI_BEFORE => '',
00137             GESHI_AFTER => '\\2'
00138             ),
00139         // Structure end
00140         7 => array(
00141             GESHI_SEARCH => "(\\\\end)(?=[^a-zA-Z])",
00142             GESHI_REPLACE => '\\1',
00143             GESHI_MODIFIERS => '',
00144             GESHI_BEFORE => '',
00145             GESHI_AFTER => '\\2'
00146             ),
00147         //Structure: Label
00148         8 => array(
00149             GESHI_SEARCH => "(\\\\)(label|pageref|ref|cite)(?=[^a-zA-Z])",
00150             GESHI_REPLACE => '\\1\\2',
00151             GESHI_MODIFIERS => '',
00152             GESHI_BEFORE => '',
00153             GESHI_AFTER => '\\3'
00154             ),
00155 // Structure: sections
00156 /*9 => array(
00157             GESHI_SEARCH => "(\\\\)(part|chapter|section|subsection|subsubsection|paragraph|subparagraph)(?=[^a-zA-Z])",
00158             GESHI_REPLACE => '\1\\2',
00159             GESHI_MODIFIERS => '',
00160             GESHI_BEFORE => '',
00161             GESHI_AFTER => '\\3'
00162             ),*/
00163 // environment begin
00164 10 => array(
00165             GESHI_SEARCH => "(\\\\begin)(\\{)(.*)(\\})",
00166             GESHI_REPLACE => '\\3',
00167             GESHI_MODIFIERS => '',
00168             GESHI_BEFORE => '',
00169             GESHI_AFTER => ''
00170             ),
00171 // environment end
00172 11 => array(
00173             GESHI_SEARCH => "(\\\\end)(\\{)(.*)(\\})",
00174             GESHI_REPLACE => '\\3',
00175             GESHI_MODIFIERS => '',
00176             GESHI_BEFORE => '',
00177             GESHI_AFTER => ''
00178             ),
00179 
00180 // ---------------------------------------------
00181         ),
00182     'STRICT_MODE_APPLIES' => GESHI_NEVER,
00183     'SCRIPT_DELIMITERS' => array(
00184         ),
00185     'HIGHLIGHT_STRICT_BLOCK' => array(
00186         )
00187 );
00188 
00189 ?>

Erzeugt am Thu May 14 00:55:48 2009 für OpenRat von  doxygen 1.5.8