plugins/geshi/geshi/latex.php
author Dan
Fri, 29 May 2009 19:40:15 -0400
changeset 3 f3e2bbbd2155
parent 2 9e3258dfae15
permissions -rw-r--r--
Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     1
<?php
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     2
/*************************************************************************************
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     3
 * latex.php
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     4
 * -----
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
     5
 * Author: efi, Matthias Pospiech (matthias@pospiech.eu)
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
     6
 * Copyright: (c) 2006 efi, Matthias Pospiech (matthias@pospiech.eu), Nigel McNie (http://qbnz.com/highlighter)
3
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
     7
 * Release Version: 1.0.8.4
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
     8
 * Date Started: 2006/09/23
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
     9
 *
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    10
 * LaTeX language file for GeSHi.
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    11
 *
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    12
 * CHANGES
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    13
 * -------
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    14
 * 2008/08/18 (1.0.8.1)
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    15
 *  - Changes in color and some additional command recognition
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    16
 *  - No special Color for Brackets, it is only distracting
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    17
 *    if color should be reintroduced it should be less bright
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    18
 *  - Math color changed from green to violett, since green is now used for comments
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    19
 *  - Comments are now colored and the only green. The reason for coloring the comments
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    20
 *    is that often important information is in the comments und was merely unvisible before.
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    21
 *  - New Color for [Options]
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    22
 *  - color for labels not specialised anymore. It makes sence in large documents but less in
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    23
 *    small web examples.
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    24
 *  - \@keyword introduced
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    25
 *  - Fixed \& escaped ampersand
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    26
 * 2006/09/23 (1.0.0)
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    27
 *  -  First Release
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    28
 *
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    29
 * TODO
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    30
 * -------------------------
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    31
 * *
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    32
 *
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    33
 *************************************************************************************
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    34
 *
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    35
 *     This file is part of GeSHi.
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    36
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    37
 *   GeSHi is free software; you can redistribute it and/or modify
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    38
 *   it under the terms of the GNU General Public License as published by
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    39
 *   the Free Software Foundation; either version 2 of the License, or
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    40
 *   (at your option) any later version.
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    41
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    42
 *   GeSHi is distributed in the hope that it will be useful,
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    43
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    44
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    45
 *   GNU General Public License for more details.
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    46
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    47
 *   You should have received a copy of the GNU General Public License
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    48
 *   along with GeSHi; if not, write to the Free Software
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    49
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    50
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    51
 ************************************************************************************/
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    52
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    53
$language_data = array (
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    54
    'LANG_NAME' => 'LaTeX',
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    55
    'COMMENT_SINGLE' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    56
        1 => '%'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    57
        ),
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    58
    'COMMENT_MULTI' => array(),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    59
    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    60
    'QUOTEMARKS' => array(),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    61
    'ESCAPE_CHAR' => '',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    62
    'KEYWORDS' => array(
3
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    63
        1 => array(
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    64
            'addlinespace','address','appendix','author','backmatter',
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    65
            'bfseries','bibitem','bigskip','blindtext','caption','captionabove',
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    66
            'captionbelow','cdot','centering','cite','color','colorbox','date',
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    67
            'def','definecolor','documentclass','edef','eqref','else','email','emph','fbox',
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    68
            'fi','flushleft','flushright','footnote','frac','frontmatter','graphicspath','hfill',
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    69
            'hline','hspace','huge','include','includegraphics','infty','input','int','ifx',
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    70
            'item','label','LaTeX','left','let','limits','listfiles','listoffigures',
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    71
            'listoftables','mainmatter','makeatletter','makeatother','makebox',
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    72
            'makeindex','maketitle','mbox','mediumskip','newcommand',
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    73
            'newenvironment','newpage','nocite','nonumber','pagestyle','par','paragraph','parbox',
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    74
            'parident','parskip','partial','raggedleft','raggedright','raisebox','ref',
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    75
            'renewcommand','renewenvironment','right','rule','section','setlength',
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    76
            'sffamily','subparagraph','subsection','subsubsection','sum','table',
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    77
            'tableofcontents','textbf','textcolor','textit','textnormal',
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    78
            'textsuperscript','texttt','title','today','ttfamily','urlstyle',
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    79
            'usepackage','vspace'
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    80
            )
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    81
        ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    82
    'SYMBOLS' => array(
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    83
        "&", "\\", "{", "}", "[", "]"
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    84
        ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    85
    'CASE_SENSITIVE' => array(
3
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    86
        1 => true,
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    87
        GESHI_COMMENTS => false,
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    88
        ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    89
    'STYLES' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    90
        'KEYWORDS' => array(
3
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
    91
            1 => 'color: #800000;',
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    92
            ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    93
        'COMMENTS' => array(
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    94
            1 => 'color: #2C922C; font-style: italic;'
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    95
            ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    96
        'ESCAPE_CHAR' => array(
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    97
            0 =>  'color: #000000; font-weight: bold;'
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    98
            ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    99
        'BRACKETS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   100
            ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   101
        'STRINGS' => array(
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   102
            0 =>  'color: #000000;'
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   103
            ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   104
        'NUMBERS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   105
            ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   106
        'METHODS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   107
            ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   108
        'SYMBOLS' => array(
3
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
   109
            0 =>  'color: #E02020; '
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   110
            ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   111
        'REGEXPS' => array(
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   112
            1 => 'color: #8020E0; font-weight: normal;',  // Math inner
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   113
            2 => 'color: #C08020; font-weight: normal;', // [Option]
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   114
            3 => 'color: #8020E0; font-weight: normal;', // Maths
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   115
            4 => 'color: #800000; font-weight: normal;', // Structure: Labels
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   116
            5 => 'color: #00008B; font-weight: bold;',  // Structure (\section{->x<-})
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   117
            6 => 'color: #800000; font-weight: normal;', // Structure (\section)
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   118
            7 => 'color: #0000D0; font-weight: normal;', // Environment \end or \begin{->x<-} (brighter blue)
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   119
            8 => 'color: #C00000; font-weight: normal;', // Structure \end or \begin
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   120
            9 => 'color: #2020C0; font-weight: normal;', // {...}
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   121
            10 => 'color: #800000; font-weight: normal;', // \%, \& etc.
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   122
            11 => 'color: #E00000; font-weight: normal;', // \@keyword
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   123
            12 => 'color: #800000; font-weight: normal;', // \keyword
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   124
        ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   125
        'SCRIPT' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   126
            )
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   127
        ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   128
    'URLS' => array(
3
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
   129
        1 => 'http://www.golatex.de/wiki/index.php?title=%5C{FNAME}',
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   130
        ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   131
    'OOLANG' => false,
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   132
    'OBJECT_SPLITTERS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   133
        ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   134
    'REGEXPS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   135
        // Math inner
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   136
        1 => array(
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   137
            GESHI_SEARCH => "(\\\\begin\\{(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|alignat|flalign)\\})(.*)(\\\\end\\{\\2\\})",
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   138
            GESHI_REPLACE => '\3',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   139
            GESHI_MODIFIERS => 'Us',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   140
            GESHI_BEFORE => '\1',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   141
            GESHI_AFTER => '\4'
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   142
            ),
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   143
        // [options]
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   144
        2 => array(
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   145
            GESHI_SEARCH => "(?<=\[).+(?=\])",
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   146
            GESHI_REPLACE => '\0',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   147
            GESHI_MODIFIERS => 'Us',
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   148
            GESHI_BEFORE => '',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   149
            GESHI_AFTER => ''
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   150
            ),
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   151
        // Math mode with $ ... $
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   152
        3 => array(
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   153
            GESHI_SEARCH => "\\$.+\\$",
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   154
            GESHI_REPLACE => '\0',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   155
            GESHI_MODIFIERS => 'Us',
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   156
            GESHI_BEFORE => '',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   157
            GESHI_AFTER => ''
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   158
            ),
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   159
        // Structure: Label
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   160
        4 => "\\\\(?:label|pageref|ref|cite)(?=[^a-zA-Z])",
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   161
        // Structure: sections
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   162
        5 => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   163
            GESHI_SEARCH => "(\\\\(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph|addpart|addchap|addsec)\*?\\{)(.*)(?=\\})",
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   164
            GESHI_REPLACE => '\\2',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   165
            GESHI_MODIFIERS => 'U',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   166
            GESHI_BEFORE => '\\1',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   167
            GESHI_AFTER => ''
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   168
            ),
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   169
        // Structure: sections
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   170
        6 => "\\\\(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph|addpart|addchap|addsec)\*?(?=[^a-zA-Z])",
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   171
        // environment \begin{} and \end{} (i.e. the things inside the {})
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   172
        7 => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   173
            GESHI_SEARCH => "(\\\\(?:begin|end)\\{)(.*)(?=\\})",
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   174
            GESHI_REPLACE => '\\2',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   175
            GESHI_MODIFIERS => 'U',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   176
            GESHI_BEFORE => '\\1',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   177
            GESHI_AFTER => ''
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   178
            ),
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   179
        // Structure \begin and \end
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   180
        8 => "\\\\(?:end|begin)(?=[^a-zA-Z])",
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   181
        // {parameters}
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   182
        9 => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   183
            GESHI_SEARCH => "(?<=\\{)(?!<\|!REG3XP5!>).*(?=\\})",
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   184
            GESHI_REPLACE => '\0',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   185
            GESHI_MODIFIERS => 'Us',
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   186
            GESHI_BEFORE => '',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   187
            GESHI_AFTER => ''
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   188
            ),
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   189
        // \%, \& usw.
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   190
        10 => "\\\\(?:[_$%]|&amp;)",
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   191
        //  \@keywords
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   192
        11 => "(?<!<\|!REG3XP[8]!>)\\\\@[a-zA-Z]+\*?",
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   193
        // \keywords
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   194
        12 => "(?<!<\|!REG3XP[468]!>)\\\\[a-zA-Z]+\*?",
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   195
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   196
// ---------------------------------------------
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   197
        ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   198
    'STRICT_MODE_APPLIES' => GESHI_NEVER,
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   199
    'SCRIPT_DELIMITERS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   200
        ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   201
    'HIGHLIGHT_STRICT_BLOCK' => array(
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   202
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   203
    'PARSER_CONTROL' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   204
        'COMMENTS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   205
            'DISALLOWED_BEFORE' => '\\'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   206
        ),
3
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
   207
        'KEYWORDS' => array(
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
   208
            'DISALLOWED_BEFORE' => "(?<=\\\\)",
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
   209
            'DISALLOWED_AFTER' => "(?![A-Za-z0-9])"
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
   210
        ),
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   211
        'ENABLE_FLAGS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   212
            'NUMBERS' => GESHI_NEVER,
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   213
            'BRACKETS' => GESHI_NEVER
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   214
        )
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   215
    )
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   216
);
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   217
3
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
   218
?>