summaryrefslogtreecommitdiff
blob: 5afecbfa4241c3e18037b1e8d5a7bbb84571f8d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<?php
/********************************************************************************
 * bibtex.php
 * -----
 * Author: Quinn Taylor (quinntaylor@mac.com)
 * Copyright: (c) 2009 Quinn Taylor (quinntaylor@mac.com), Nigel McNie (http://qbnz.com/highlighter)
 * Release Version: 1.0.8.12
 * Date Started: 2009/04/29
 *
 * BibTeX language file for GeSHi.
 *
 * CHANGES
 * -------
 * 2009/04/29 (1.0.8.4)
 *  -  First Release
 *
 * TODO
 * -------------------------
 *  - Add regex for matching and replacing URLs with corresponding hyperlinks
 *  - Add regex for matching more LaTeX commands that may be embedded in BibTeX
 *    (Someone who understands regex better than I should borrow from latex.php)
 ********************************************************************************
 *
 *     This file is part of GeSHi.
 *
 *   GeSHi is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   GeSHi is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with GeSHi; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *
*******************************************************************************/

// http://en.wikipedia.org/wiki/BibTeX
// http://www.fb10.uni-bremen.de/anglistik/langpro/bibliographies/jacobsen-bibtex.html

$language_data = array (
    'LANG_NAME' => 'BibTeX',
    'OOLANG' => false,
    'COMMENT_SINGLE' => array(
        1 => '%%'
        ),
    'COMMENT_MULTI' => array(),
    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
    'QUOTEMARKS' => array(),
    'ESCAPE_CHAR' => '',
    'KEYWORDS' => array(
        0 => array(
            '@comment','@preamble','@string'
            ),
        // Standard entry types
        1 => array(
            '@article','@book','@booklet','@conference','@inbook',
            '@incollection','@inproceedings','@manual','@mastersthesis',
            '@misc','@phdthesis','@proceedings','@techreport','@unpublished'
            ),
        // Custom entry types
        2 => array(
            '@collection','@patent','@webpage'
            ),
        // Standard entry field names
        3 => array(
            'address','annote','author','booktitle','chapter','crossref',
            'edition','editor','howpublished','institution','journal','key',
            'month','note','number','organization','pages','publisher','school',
            'series','title','type','volume','year'
            ),
        // Custom entry field names
        4 => array(
            'abstract','affiliation','chaptername','cited-by','cites',
            'contents','copyright','date-added','date-modified','doi','eprint',
            'isbn','issn','keywords','language','lccn','lib-congress',
            'location','price','rating','read','size','source','url'
            )
        ),
    'URLS' => array(
        0 => '',
        1 => '',
        2 => '',
        3 => '',
        4 => ''
        ),
    'SYMBOLS' => array(
        '{', '}', '#', '=', ','
        ),
    'CASE_SENSITIVE' => array(
        1 => false,
        2 => false,
        3 => false,
        4 => false,
        GESHI_COMMENTS => false,
        ),
    // Define the colors for the groups listed above
    'STYLES' => array(
        'KEYWORDS' => array(
            1 => 'color: #C02020;', // Standard entry types
            2 => 'color: #C02020;', // Custom entry types
            3 => 'color: #C08020;', // Standard entry field names
            4 => 'color: #C08020;'  // Custom entry field names
            ),
        'COMMENTS' => array(
            1 => 'color: #2C922C; font-style: italic;'
            ),
        'STRINGS' => array(
            0 => 'color: #2020C0;'
            ),
        'SYMBOLS' => array(
            0 =>  'color: #E02020;'
            ),
        'REGEXPS' => array(
            1 => 'color: #2020C0;', // {...}
            2 => 'color: #C08020;',  // BibDesk fields
            3 => 'color: #800000;'   // LaTeX commands
            ),
        'ESCAPE_CHAR' => array(
            0 =>  'color: #000000; font-weight: bold;'
            ),
        'BRACKETS' => array(
            0 =>  'color: #E02020;'
            ),
        'NUMBERS' => array(
            ),
        'METHODS' => array(
            ),
        'SCRIPT' => array(
            )
        ),
    'REGEXPS' => array(
        // {parameters}
        1 => array(
            GESHI_SEARCH => "(?<=\\{)(?:\\{(?R)\\}|[^\\{\\}])*(?=\\})",
            GESHI_REPLACE => '\0',
            GESHI_MODIFIERS => 's',
            GESHI_BEFORE => '',
            GESHI_AFTER => ''
            ),
        2 => array(
            GESHI_SEARCH => "\bBdsk-(File|Url)-\d+",
            GESHI_REPLACE => '\0',
            GESHI_MODIFIERS => 'Us',
            GESHI_BEFORE => '',
            GESHI_AFTER => ''
            ),
        3 => array(
            GESHI_SEARCH => "\\\\[A-Za-z0-9]*+",
            GESHI_REPLACE => '\0',
            GESHI_MODIFIERS => 'Us',
            GESHI_BEFORE => '',
            GESHI_AFTER => ''
            ),
        ),
    'HIGHLIGHT_STRICT_BLOCK' => array(
        ),
    'OBJECT_SPLITTERS' => array(
        ),
    'STRICT_MODE_APPLIES' => GESHI_NEVER,
    'SCRIPT_DELIMITERS' => array(
        ),
    'PARSER_CONTROL' => array(
        'ENABLE_FLAGS' => array(
            'NUMBERS' => GESHI_NEVER
            ),
        'KEYWORDS' => array(
            3 => array(
                'DISALLOWED_AFTER' => '(?=\s*=)'
                ),
            4 => array(
                'DISALLOWED_AFTER' => '(?=\s*=)'
                ),
            )
        )
);