2 /*************************************************************************************
6 * modified by Matthias Pospiech (mail@matthiaspospiech.de)
7 *************************************************************************************
9 * This file is not yet part of GeSHi. (and is not compatible to the 1.1+ branch)
11 * GeSHi is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * GeSHi is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with GeSHi; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 ************************************************************************************/
27 if (isset($this) && is_a($this, 'GeSHi')) {
28 $this->set_symbols_highlighting(false
);
29 $this->set_numbers_highlighting(false
);
32 $language_data = array (
33 'LANG_NAME' => 'LaTeX',
34 'COMMENT_SINGLE' => array(1 => '%'),
35 'COMMENT_MULTI' => array(),
36 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE
,
37 'QUOTEMARKS' => array(),
42 '.', ',','\\',"~", "{", "}", "[", "]", "$"
44 'CASE_SENSITIVE' => array(
45 GESHI_COMMENTS
=> true
,
55 1 => 'color: #808080; font-style: italic;'
57 'ESCAPE_CHAR' => array(
70 1 => 'color: #00A000; font-weight: bold;', // Math inner
71 2 => 'color: #800000; font-weight: normal;', // \keyword #202020
72 3 => 'color: #2222D0; font-weight: normal;', // {...}
73 4 => 'color: #2222D0; font-weight: normal;', // [Option]
74 5 => 'color: #00A000; font-weight: normal;', // Mathe #CCF020
75 6 => 'color: #F00000; font-weight: normal;', // Structure \begin
76 7 => 'color: #F00000; font-weight: normal;', // Structure \end
77 8 => 'color: #F00000; font-weight: normal;', // Structure: Labels
78 //9 => 'color: #F00000; font-weight: normal;', // Structure
79 10 => 'color: #0000D0; font-weight: bold;', // Environment
80 11 => 'color: #0000D0; font-weight: bold;', // Environment
88 'OBJECT_SPLITTERS' => array(
93 GESHI_SEARCH
=> "(\\\\begin\\{)(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|alignat|flalign )(\\})(.*)(\\\\end\\{)(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|alignat|flalign)(\\})",
94 GESHI_REPLACE
=> '\\4',
95 GESHI_MODIFIERS
=> 's',
96 GESHI_BEFORE
=> '\1\2\3',
97 GESHI_AFTER
=> '\5\6\7'
101 GESHI_SEARCH
=> "(\\\\)([a-zA-Z]+)",
102 GESHI_REPLACE
=> '\1\2',
103 GESHI_MODIFIERS
=> '',
109 GESHI_SEARCH
=> "(\\{)(.*)(\\})",
110 GESHI_REPLACE
=> '\2',
111 GESHI_MODIFIERS
=> '',
112 GESHI_BEFORE
=> '\1',
117 GESHI_SEARCH
=> "(\[)(.+)(\])",
118 GESHI_REPLACE
=> '\2',
119 GESHI_MODIFIERS
=> '',
120 GESHI_BEFORE
=> '\1',
125 GESHI_SEARCH
=> "(\\$)(.+)(\\$)",
126 GESHI_REPLACE
=> '\1\2\3',
127 GESHI_MODIFIERS
=> '',
133 GESHI_SEARCH
=> "(\\\\begin)(?=[^a-zA-Z])",
134 GESHI_REPLACE
=> '\\1',
135 GESHI_MODIFIERS
=> '',
141 GESHI_SEARCH
=> "(\\\\end)(?=[^a-zA-Z])",
142 GESHI_REPLACE
=> '\\1',
143 GESHI_MODIFIERS
=> '',
149 GESHI_SEARCH
=> "(\\\\)(label|pageref|ref|cite)(?=[^a-zA-Z])",
150 GESHI_REPLACE
=> '\\1\\2',
151 GESHI_MODIFIERS
=> '',
155 // Structure: sections
157 GESHI_SEARCH => "(\\\\)(part|chapter|section|subsection|subsubsection|paragraph|subparagraph)(?=[^a-zA-Z])",
158 GESHI_REPLACE => '\1\\2',
159 GESHI_MODIFIERS => '',
165 GESHI_SEARCH
=> "(\\\\begin)(\\{)(.*)(\\})",
166 GESHI_REPLACE
=> '\\3',
167 GESHI_MODIFIERS
=> '',
173 GESHI_SEARCH
=> "(\\\\end)(\\{)(.*)(\\})",
174 GESHI_REPLACE
=> '\\3',
175 GESHI_MODIFIERS
=> '',
180 // ---------------------------------------------
182 'STRICT_MODE_APPLIES' => GESHI_NEVER
,
183 'SCRIPT_DELIMITERS' => array(
185 'HIGHLIGHT_STRICT_BLOCK' => array(