ultraviolet1x 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +16 -0
- data/History.txt +25 -0
- data/README.rdoc +29 -0
- data/README.txt +52 -0
- data/Rakefile +11 -0
- data/bin/theme2latexrender +122 -0
- data/bin/theme2xhtmlrender +156 -0
- data/bin/uv +140 -0
- data/broken_syntax/markdown.syntax +543 -0
- data/broken_syntax/php.syntax +1253 -0
- data/lib/uv/render_processor.rb +140 -0
- data/lib/uv/utility.rb +67 -0
- data/lib/uv/version.rb +3 -0
- data/lib/uv.rb +95 -0
- data/mm/manual.mm +840 -0
- data/render/latex/active4d.render +132 -0
- data/render/latex/all_hallows_eve.render +96 -0
- data/render/latex/amy.render +171 -0
- data/render/latex/blackboard.render +111 -0
- data/render/latex/brilliance_black.render +552 -0
- data/render/latex/brilliance_dull.render +561 -0
- data/render/latex/cobalt.render +162 -0
- data/render/latex/dawn.render +126 -0
- data/render/latex/eiffel.render +132 -0
- data/render/latex/espresso_libre.render +123 -0
- data/render/latex/idle.render +93 -0
- data/render/latex/iplastic.render +99 -0
- data/render/latex/lazy.render +96 -0
- data/render/latex/mac_classic.render +135 -0
- data/render/latex/magicwb_amiga.render +117 -0
- data/render/latex/pastels_on_dark.render +204 -0
- data/render/latex/slush_poppies.render +123 -0
- data/render/latex/spacecadet.render +81 -0
- data/render/latex/sunburst.render +186 -0
- data/render/latex/twilight.render +153 -0
- data/render/latex/zenburnesque.render +126 -0
- data/render/old/txt2tags.render +131 -0
- data/render/xhtml/active4d.render +140 -0
- data/render/xhtml/all_hallows_eve.render +104 -0
- data/render/xhtml/amy.render +179 -0
- data/render/xhtml/blackboard.render +119 -0
- data/render/xhtml/brilliance_black.render +560 -0
- data/render/xhtml/brilliance_dull.render +569 -0
- data/render/xhtml/cobalt.render +170 -0
- data/render/xhtml/dawn.render +134 -0
- data/render/xhtml/eiffel.render +140 -0
- data/render/xhtml/espresso_libre.render +131 -0
- data/render/xhtml/files/css/active4d.css +114 -0
- data/render/xhtml/files/css/all_hallows_eve.css +72 -0
- data/render/xhtml/files/css/amy.css +147 -0
- data/render/xhtml/files/css/blackboard.css +88 -0
- data/render/xhtml/files/css/brilliance_black.css +605 -0
- data/render/xhtml/files/css/brilliance_dull.css +599 -0
- data/render/xhtml/files/css/cobalt.css +149 -0
- data/render/xhtml/files/css/dawn.css +121 -0
- data/render/xhtml/files/css/eiffel.css +121 -0
- data/render/xhtml/files/css/espresso_libre.css +109 -0
- data/render/xhtml/files/css/idle.css +62 -0
- data/render/xhtml/files/css/iplastic.css +80 -0
- data/render/xhtml/files/css/lazy.css +73 -0
- data/render/xhtml/files/css/mac_classic.css +123 -0
- data/render/xhtml/files/css/magicwb_amiga.css +104 -0
- data/render/xhtml/files/css/pastels_on_dark.css +188 -0
- data/render/xhtml/files/css/slush_poppies.css +85 -0
- data/render/xhtml/files/css/spacecadet.css +51 -0
- data/render/xhtml/files/css/sunburst.css +180 -0
- data/render/xhtml/files/css/twilight.css +137 -0
- data/render/xhtml/files/css/zenburnesque.css +91 -0
- data/render/xhtml/idle.render +101 -0
- data/render/xhtml/iplastic.render +107 -0
- data/render/xhtml/lazy.render +104 -0
- data/render/xhtml/mac_classic.render +143 -0
- data/render/xhtml/magicwb_amiga.render +125 -0
- data/render/xhtml/pastels_on_dark.render +212 -0
- data/render/xhtml/slush_poppies.render +131 -0
- data/render/xhtml/spacecadet.render +89 -0
- data/render/xhtml/sunburst.render +194 -0
- data/render/xhtml/twilight.render +161 -0
- data/render/xhtml/zenburnesque.render +134 -0
- data/syntax/actionscript.syntax +97 -0
- data/syntax/active4d.syntax +276 -0
- data/syntax/active4d_html.syntax +311 -0
- data/syntax/active4d_ini.syntax +50 -0
- data/syntax/active4d_library.syntax +21 -0
- data/syntax/ada.syntax +33 -0
- data/syntax/antlr.syntax +151 -0
- data/syntax/apache.syntax +191 -0
- data/syntax/applescript.syntax +384 -0
- data/syntax/asp.syntax +70 -0
- data/syntax/asp_vb.net.syntax +129 -0
- data/syntax/bibtex.syntax +151 -0
- data/syntax/blog_html.syntax +41 -0
- data/syntax/blog_markdown.syntax +42 -0
- data/syntax/blog_text.syntax +27 -0
- data/syntax/blog_textile.syntax +27 -0
- data/syntax/buggy/nemerle.syntax +74 -0
- data/syntax/build.syntax +53 -0
- data/syntax/bulletin_board.syntax +287 -0
- data/syntax/c++.syntax +186 -0
- data/syntax/c.syntax +414 -0
- data/syntax/cake.syntax +55 -0
- data/syntax/camlp4.syntax +36 -0
- data/syntax/cm.syntax +32 -0
- data/syntax/coffeescript.syntax +216 -0
- data/syntax/coldfusion.syntax +119 -0
- data/syntax/context_free.syntax +176 -0
- data/syntax/cs.syntax +59 -0
- data/syntax/css.syntax +195 -0
- data/syntax/css_experimental.syntax +1925 -0
- data/syntax/csv.syntax +68 -0
- data/syntax/d.syntax +142 -0
- data/syntax/diff.syntax +81 -0
- data/syntax/dokuwiki.syntax +204 -0
- data/syntax/dot.syntax +47 -0
- data/syntax/doxygen.syntax +43 -0
- data/syntax/dylan.syntax +62 -0
- data/syntax/eiffel.syntax +78 -0
- data/syntax/erlang.syntax +922 -0
- data/syntax/f-script.syntax +80 -0
- data/syntax/fortran.syntax +141 -0
- data/syntax/fxscript.syntax +142 -0
- data/syntax/greasemonkey.syntax +34 -0
- data/syntax/gri.syntax +83 -0
- data/syntax/groovy.syntax +191 -0
- data/syntax/gtd.syntax +22 -0
- data/syntax/gtdalt.syntax +143 -0
- data/syntax/haml.syntax +88 -0
- data/syntax/haskell.syntax +88 -0
- data/syntax/html-asp.syntax +27 -0
- data/syntax/html.syntax +362 -0
- data/syntax/html_django.syntax +36 -0
- data/syntax/html_for_asp.net.syntax +424 -0
- data/syntax/html_mason.syntax +119 -0
- data/syntax/html_rails.syntax +40 -0
- data/syntax/html_tcl.syntax +26 -0
- data/syntax/icalendar.syntax +32 -0
- data/syntax/inform.syntax +48 -0
- data/syntax/ini.syntax +55 -0
- data/syntax/installer_distribution_script.syntax +77 -0
- data/syntax/io.syntax +81 -0
- data/syntax/java.syntax +211 -0
- data/syntax/javaproperties.syntax +20 -0
- data/syntax/javascript.syntax +256 -0
- data/syntax/javascript_+_prototype.syntax +72 -0
- data/syntax/javascript_+_prototype_bracketed.syntax +140 -0
- data/syntax/jquery_javascript.syntax +114 -0
- data/syntax/json.syntax +136 -0
- data/syntax/languagedefinition.syntax +708 -0
- data/syntax/latex.syntax +566 -0
- data/syntax/latex_beamer.syntax +41 -0
- data/syntax/latex_log.syntax +50 -0
- data/syntax/latex_memoir.syntax +64 -0
- data/syntax/lexflex.syntax +219 -0
- data/syntax/lighttpd.syntax +54 -0
- data/syntax/lilypond.syntax +492 -0
- data/syntax/lisp.syntax +61 -0
- data/syntax/literate_haskell.syntax +24 -0
- data/syntax/logo.syntax +29 -0
- data/syntax/logtalk.syntax +152 -0
- data/syntax/lua.syntax +86 -0
- data/syntax/m.syntax +142 -0
- data/syntax/macports_portfile.syntax +163 -0
- data/syntax/mail.syntax +118 -0
- data/syntax/makefile.syntax +36 -0
- data/syntax/man.syntax +17 -0
- data/syntax/mediawiki.syntax +567 -0
- data/syntax/mel.syntax +92 -0
- data/syntax/mips.syntax +66 -0
- data/syntax/mod_perl.syntax +50 -0
- data/syntax/modula-3.syntax +47 -0
- data/syntax/moinmoin.syntax +189 -0
- data/syntax/mootools.syntax +572 -0
- data/syntax/movable_type.syntax +162 -0
- data/syntax/multimarkdown.syntax +39 -0
- data/syntax/objective-c++.syntax +18 -0
- data/syntax/objective-c.syntax +233 -0
- data/syntax/ocaml.syntax +764 -0
- data/syntax/ocamllex.syntax +167 -0
- data/syntax/ocamlyacc.syntax +184 -0
- data/syntax/old/YAML.yaml +160 -0
- data/syntax/old/txt2tags.yaml +139 -0
- data/syntax/opengl.syntax +14 -0
- data/syntax/pascal.syntax +77 -0
- data/syntax/perl.syntax +1115 -0
- data/syntax/plain_text.syntax +32 -0
- data/syntax/pmwiki.syntax +113 -0
- data/syntax/postscript.syntax +114 -0
- data/syntax/processing.syntax +106 -0
- data/syntax/prolog.syntax +40 -0
- data/syntax/property_list.syntax +635 -0
- data/syntax/python.syntax +868 -0
- data/syntax/python_django.syntax +21 -0
- data/syntax/qmake_project.syntax +114 -0
- data/syntax/qt_c++.syntax +26 -0
- data/syntax/quake3_config.syntax +32 -0
- data/syntax/r.syntax +81 -0
- data/syntax/r_console.syntax +16 -0
- data/syntax/ragel.syntax +201 -0
- data/syntax/rd_r_documentation.syntax +91 -0
- data/syntax/regexp.syntax +50 -0
- data/syntax/regular_expressions_oniguruma.syntax +107 -0
- data/syntax/regular_expressions_python.syntax +109 -0
- data/syntax/release_notes.syntax +46 -0
- data/syntax/remind.syntax +253 -0
- data/syntax/restructuredtext.syntax +250 -0
- data/syntax/rez.syntax +80 -0
- data/syntax/ruby.syntax +1035 -0
- data/syntax/ruby_experimental.syntax +145 -0
- data/syntax/ruby_on_rails.syntax +88 -0
- data/syntax/s5.syntax +69 -0
- data/syntax/sass.syntax +45 -0
- data/syntax/scheme.syntax +347 -0
- data/syntax/scilab.syntax +41 -0
- data/syntax/setext.syntax +147 -0
- data/syntax/shell-unix-generic.syntax +384 -0
- data/syntax/slate.syntax +149 -0
- data/syntax/smarty.syntax +63 -0
- data/syntax/sql.syntax +237 -0
- data/syntax/sql_rails.syntax +18 -0
- data/syntax/ssh-config.syntax +33 -0
- data/syntax/standard_ml.syntax +121 -0
- data/syntax/strings_file.syntax +39 -0
- data/syntax/subversion_commit_message.syntax +36 -0
- data/syntax/sweave.syntax +84 -0
- data/syntax/swig.syntax +57 -0
- data/syntax/tcl.syntax +152 -0
- data/syntax/template_toolkit.syntax +121 -0
- data/syntax/tex.syntax +86 -0
- data/syntax/tex_math.syntax +49 -0
- data/syntax/textile.syntax +215 -0
- data/syntax/tsv.syntax +50 -0
- data/syntax/twiki.syntax +241 -0
- data/syntax/txt2tags.syntax +79 -0
- data/syntax/vectorscript.syntax +57 -0
- data/syntax/xhtml_1.0.syntax +4027 -0
- data/syntax/xml.syntax +180 -0
- data/syntax/xml_strict.syntax +92 -0
- data/syntax/xsl.syntax +60 -0
- data/syntax/yaml.syntax +160 -0
- data/syntax/yui_javascript.syntax +176 -0
- data/test/ultraviolet_test.rb +17 -0
- data/test/uv_test.rb +0 -0
- data/ultraviolet1x.gemspec +22 -0
- metadata +333 -0
data/mm/manual.mm
ADDED
@@ -0,0 +1,840 @@
|
|
1
|
+
~Ultraviolet~
|
2
|
+
~~Syntax Highlighting Engine~~
|
3
|
+
|
4
|
+
#Introduction# | index
|
5
|
+
|
6
|
+
=About=
|
7
|
+
|
8
|
+
Ultraviolet is a syntax highlighting engine based on
|
9
|
+
[Textpow http://textpow.rubyforge.org]. Since it uses [Textmate http://macromates.com]
|
10
|
+
syntax files, it offers out of the box syntax highlighting for more than 50
|
11
|
+
[languages http://macromates.com/svn/Bundles/trunk/Bundles/] and 20
|
12
|
+
[themes > themes].
|
13
|
+
|
14
|
+
Ultraviolet is at the same time a stand-alone command line utility and a Ruby
|
15
|
+
library.
|
16
|
+
|
17
|
+
= Requirements =
|
18
|
+
|
19
|
+
* [Textpow http://textpow.rubyforge.org].
|
20
|
+
|
21
|
+
= Installation =
|
22
|
+
|
23
|
+
If you have [rubygems http://docs.rubygems.org/] installation is straightforward by typing
|
24
|
+
(as root if needed):
|
25
|
+
|
26
|
+
--------hl shell-unix-generic,,false------
|
27
|
+
gem install -r ultraviolet --include-dependencies
|
28
|
+
------------------------------------------
|
29
|
+
|
30
|
+
If you prefer to get the sources, the last stable version may be
|
31
|
+
downloaded [here http://rubyforge.org/frs/?group_id=3513].
|
32
|
+
|
33
|
+
= Status =
|
34
|
+
|
35
|
+
The current version of Ultraviolet is able to produce html output for all
|
36
|
+
the syntaxes in textmate's [repository http://macromates.com/svn/Bundles/trunk/Bundles/].
|
37
|
+
Further work will be done to produce latex output.
|
38
|
+
|
39
|
+
= To Do =
|
40
|
+
|
41
|
+
|| Priority | Description |
|
42
|
+
| high | Complete *rdoc* api documentation |
|
43
|
+
| alpha | Produce latex output |
|
44
|
+
| high | Implement lazy loading for syntaxes (significant speed increase expected) |
|
45
|
+
| medium | Support for user defined syntaxes and themes in user's HOME directory |
|
46
|
+
|
47
|
+
# Usage #
|
48
|
+
|
49
|
+
= Command Line =
|
50
|
+
|
51
|
+
Some examples of command line usage.
|
52
|
+
|
53
|
+
* Getting help:
|
54
|
+
--------hl shell-unix-generic,,false--------
|
55
|
+
uv --help
|
56
|
+
--------------------------------------------
|
57
|
+
|
58
|
+
* Listing available syntaxes:
|
59
|
+
--------hl shell-unix-generic,,false--------
|
60
|
+
uv -l syntax
|
61
|
+
--------------------------------------------
|
62
|
+
|
63
|
+
* Listing available themes:
|
64
|
+
--------hl shell-unix-generic,,false--------
|
65
|
+
uv -l themes
|
66
|
+
--------------------------------------------
|
67
|
+
|
68
|
+
* Letting uv to guess the parameters:
|
69
|
+
--------hl shell-unix-generic,,false--------
|
70
|
+
uv lib/uv.rb
|
71
|
+
--------------------------------------------
|
72
|
+
|
73
|
+
* Specifying a syntax and a theme
|
74
|
+
--------hl shell-unix-generic,,false--------
|
75
|
+
uv -s yaml -t espresso_libre syntax/ini.syntax
|
76
|
+
--------------------------------------------
|
77
|
+
|
78
|
+
* Output results to `index.html` and copy required files (/eg/ css):
|
79
|
+
--------hl shell-unix-generic,,false--------
|
80
|
+
uv -c . syntax/ini.syntax > index.html
|
81
|
+
--------------------------------------------
|
82
|
+
|
83
|
+
* Producing output in latex and converting to pdf:
|
84
|
+
--------hl shell-unix-generic,,false--------
|
85
|
+
uv -h -o latex lib/uv.rb > uv.tex
|
86
|
+
pdflatex uv.tex
|
87
|
+
--------------------------------------------
|
88
|
+
|
89
|
+
= Using ultraviolet as a library =
|
90
|
+
|
91
|
+
The interface is very similar to the one of the command line.
|
92
|
+
|
93
|
+
* List of available syntaxes:
|
94
|
+
--------hl ruby,,false--------
|
95
|
+
puts Uv.syntaxes.join( ", " )
|
96
|
+
--------------------------------------------
|
97
|
+
|
98
|
+
* Listing available themes:
|
99
|
+
--------hl ruby,,false--------
|
100
|
+
puts Uv.themes.join( ", " )
|
101
|
+
--------------------------------------------
|
102
|
+
|
103
|
+
* Parsing a css string. Produce xhtml output, with line numbers
|
104
|
+
using *amy* theme:
|
105
|
+
--------hl ruby,,false--------
|
106
|
+
result = Uv.parse( text, "xhtml", "css", true, "amy")
|
107
|
+
------------------------------
|
108
|
+
|
109
|
+
* Output copy required files for `xhtml` format to directory `site`:
|
110
|
+
--------hl ruby,,false--------
|
111
|
+
Uv.copy_files "xhtml", "site"
|
112
|
+
------------------------------
|
113
|
+
|
114
|
+
#Examples#
|
115
|
+
|
116
|
+
##Syntax Gallery##
|
117
|
+
|
118
|
+
These are just some examples of the languages that ultraviolet handles. The
|
119
|
+
complete list is [here http://macromates.com/svn/Bundles/trunk/Bundles/].
|
120
|
+
|
121
|
+
= C =
|
122
|
+
--------hl c---------------
|
123
|
+
void Init_oregexp() {
|
124
|
+
mOniguruma = rb_define_module("Oniguruma");
|
125
|
+
VALUE cORegexp = rb_define_class_under(mOniguruma, "ORegexp", rb_cObject);
|
126
|
+
rb_define_alloc_func(cORegexp, oregexp_allocate);
|
127
|
+
rb_define_method( cORegexp, "initialize", oregexp_initialize, 2 );
|
128
|
+
rb_define_method( cORegexp, "match", oregexp_match, -1 );
|
129
|
+
rb_define_method( cORegexp, "=~", oregexp_match_op, 1 );
|
130
|
+
rb_define_method( cORegexp, "gsub", oregexp_m_gsub, -1 );
|
131
|
+
rb_define_method( cORegexp, "sub", oregexp_m_sub, -1 );
|
132
|
+
rb_define_method( cORegexp, "gsub!", oregexp_m_gsub_bang, -1 );
|
133
|
+
rb_define_method( cORegexp, "sub!", oregexp_m_sub_bang, -1 );
|
134
|
+
rb_define_method( cORegexp, "scan", oregexp_m_scan, 1 );
|
135
|
+
rb_define_method( cORegexp, "===", oregexp_m_eqq, 1 );
|
136
|
+
rb_define_const( mOniguruma, "VERSION", rb_str_new2(onig_version()) );
|
137
|
+
}
|
138
|
+
|
139
|
+
---------------------------
|
140
|
+
|
141
|
+
= C++ =
|
142
|
+
|
143
|
+
--------hl c++-------------
|
144
|
+
#ifndef UNIT_H_
|
145
|
+
#define UNIT_H_
|
146
|
+
|
147
|
+
#include "Traits.h"
|
148
|
+
#include <set>
|
149
|
+
#include <deque>
|
150
|
+
|
151
|
+
namespace Learning {
|
152
|
+
template <
|
153
|
+
typename Real,
|
154
|
+
template <typename> class Son,
|
155
|
+
typename traits = Traits<Real, Son> >
|
156
|
+
class Unit {
|
157
|
+
public:
|
158
|
+
typedef typename traits::vector_type vector_type;
|
159
|
+
typedef typename traits::unit_type unit_type;
|
160
|
+
|
161
|
+
template <typename InputIterator>
|
162
|
+
Unit(
|
163
|
+
InputIterator begin,
|
164
|
+
InputIterator end
|
165
|
+
) :
|
166
|
+
value( begin, end )
|
167
|
+
{}
|
168
|
+
|
169
|
+
virtual void addNeighbor( const unit_type & unit ) {
|
170
|
+
neighbors.insert( &unit );
|
171
|
+
neighborList.push_back( &unit );
|
172
|
+
}
|
173
|
+
|
174
|
+
virtual void deleteNeighbor( const unit_type & unit ) {
|
175
|
+
neighbors.erase( &unit );
|
176
|
+
typename std::deque< const unit_type* >::iterator i;
|
177
|
+
for ( i = neighborList.begin(); i != neighborList.end(); i++ ) {
|
178
|
+
if ( (*i) == &unit ) {
|
179
|
+
neighborList.erase( i );
|
180
|
+
break;
|
181
|
+
}
|
182
|
+
}
|
183
|
+
}
|
184
|
+
|
185
|
+
bool hasNeighbor( const unit_type & unit ) {
|
186
|
+
return neighbors.find( &unit) != neighbors.end();
|
187
|
+
}
|
188
|
+
|
189
|
+
int getNeighborCount() {
|
190
|
+
return neighbors.size();
|
191
|
+
}
|
192
|
+
|
193
|
+
unit_type & getNeighbor( int pos ) {
|
194
|
+
return *( const_cast< unit_type* >(neighborList[pos]) );
|
195
|
+
}
|
196
|
+
|
197
|
+
vector_type & getValue() {
|
198
|
+
return value;
|
199
|
+
}
|
200
|
+
|
201
|
+
virtual ~Unit() {
|
202
|
+
}
|
203
|
+
private:
|
204
|
+
Unit( const unit_type & );
|
205
|
+
std::set< const unit_type * > neighbors;
|
206
|
+
std::deque< const unit_type* > neighborList;
|
207
|
+
vector_type value;
|
208
|
+
};
|
209
|
+
}
|
210
|
+
|
211
|
+
|
212
|
+
#endif /*UNIT_H_*/
|
213
|
+
---------------------------
|
214
|
+
|
215
|
+
= Bibtex =
|
216
|
+
|
217
|
+
----------hl bibtex----------
|
218
|
+
@String{icra04 = {2004 IEEE Int. Conf. on Robotics and Automation}}
|
219
|
+
@String{icra04_address = {New Orleans, USA}}
|
220
|
+
|
221
|
+
@Article{roweisghahramani99,
|
222
|
+
author = {Sam Roweis and Zoubin Ghahramani},
|
223
|
+
title = {A Unifying Review of Linear Gaussian Models},
|
224
|
+
journal = {Neural Computation},
|
225
|
+
year = {1999},
|
226
|
+
number = {11},
|
227
|
+
pages = {305-345}
|
228
|
+
}
|
229
|
+
|
230
|
+
@PhdThesis{murphy01,
|
231
|
+
author = {Kevin Patrick Murphy},
|
232
|
+
title = {Dynamic Bayesian Networks: Representation, Inference and Learning},
|
233
|
+
school = {University of California, Berkeley},
|
234
|
+
year = {2001}
|
235
|
+
}
|
236
|
+
----------------------------
|
237
|
+
|
238
|
+
= Latex =
|
239
|
+
|
240
|
+
---------hl latex-----------
|
241
|
+
%------------------------------------------------------------------------------
|
242
|
+
\subsection{Measuring prediction accuracy}
|
243
|
+
%------------------------------------------------------------------------------
|
244
|
+
|
245
|
+
A common performance metric for probabilistic approaches is the maximum data
|
246
|
+
likelihood or approximations like the \ac{bic} (see \S
|
247
|
+
\ref{sec:hmm:structure_learning}). However, for our particular application,
|
248
|
+
this metric has the drawback of not having any geometric interpretation.
|
249
|
+
Intuitively, we would like to know \emph{how far} was the predicted state from
|
250
|
+
the real one. Hence, we have preferred to measure the performance of our
|
251
|
+
algorithm in terms of the average error, computed as the expected distance between
|
252
|
+
the prediction for a time horizon $H$ and the effective observation $O_{t+H}$.
|
253
|
+
|
254
|
+
\begin{equation}
|
255
|
+
\langle E \rangle = \sum_{i \in \states} P([S_{t+H}=i] \mid O_{1:t}) \lVert
|
256
|
+
O_{t+H} - \mu_i \rVert^{1/2}
|
257
|
+
\label{eq:results:expected_distance}
|
258
|
+
\end{equation}
|
259
|
+
|
260
|
+
\noindent for a single time step. This measure may be generalized for a complete
|
261
|
+
data set containing $K$ observation sequences:
|
262
|
+
|
263
|
+
\begin{equation}
|
264
|
+
\langle E \rangle =
|
265
|
+
\frac{1}{K}
|
266
|
+
\sum_{k = 1}^{K}
|
267
|
+
\frac{1}{T^k-H}
|
268
|
+
\sum_{t = 1}^{T^k - H}
|
269
|
+
\sum_{i \in \states}
|
270
|
+
P([S_{t+H}=i] \mid O_{1:t}^k) \lVert O^k_{t+H} - \mu_i \rVert^{1/2}
|
271
|
+
\label{eq:results:expected_distance_general}
|
272
|
+
\end{equation}
|
273
|
+
|
274
|
+
It is worth noting that, as opposed to the standard approach in machine
|
275
|
+
learning of conducting tests using a ``learning'' and a ``testing'' data sets,
|
276
|
+
the experiments we have presented here will use only a single data set. The
|
277
|
+
reason is that, since learning takes place after prediction, there is no need
|
278
|
+
to such separation: every observation sequence is ``unknown'' when prediction
|
279
|
+
takes place.
|
280
|
+
----------------------------
|
281
|
+
|
282
|
+
= Diff =
|
283
|
+
|
284
|
+
--------hl diff-----------
|
285
|
+
--- /etc/apache2/apache2.conf 2006-11-15 22:13:53.000000000 +0100
|
286
|
+
+++ /etc/apache2/apache2.conf.dpkg-new 2007-01-15 19:10:51.000000000 +0100
|
287
|
+
@@ -1,50 +1,91 @@
|
288
|
+
+#
|
289
|
+
# Based upon the NCSA server configuration files originally by Rob McCool.
|
290
|
+
-# Changed extensively for the Debian package by Daniel Stone <daniel@sfarc.net>
|
291
|
+
-# and also by Thom May <thom@debian.org>.
|
292
|
+
+#
|
293
|
+
+# This is the main Apache server configuration file. It contains the
|
294
|
+
+# configuration directives that give the server its instructions.
|
295
|
+
+# See <URL:http://httpd.apache.org/docs-2.1/> for detailed information about
|
296
|
+
+# the directives.
|
297
|
+
--------------------------
|
298
|
+
|
299
|
+
= HTML =
|
300
|
+
|
301
|
+
---------hl html-----------
|
302
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
303
|
+
<!DOCTYPE html
|
304
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
305
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
306
|
+
|
307
|
+
<!--
|
308
|
+
|
309
|
+
RDoc Documentation
|
310
|
+
|
311
|
+
-->
|
312
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
313
|
+
<head>
|
314
|
+
<title>RDoc Documentation</title>
|
315
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
316
|
+
</head>
|
317
|
+
<frameset rows="20%, 80%">
|
318
|
+
<frameset cols="25%,35%,45%">
|
319
|
+
<frame src="fr_file_index.html" title="Files" name="Files" />
|
320
|
+
<frame src="fr_class_index.html" name="Classes" />
|
321
|
+
<frame src="fr_method_index.html" name="Methods" />
|
322
|
+
</frameset>
|
323
|
+
<frame src="files/lib/oniguruma_rb.html" name="docwin" />
|
324
|
+
</frameset>
|
325
|
+
</html>
|
326
|
+
---------------------------
|
327
|
+
|
328
|
+
= CSS =
|
329
|
+
|
330
|
+
-------hl css--------------
|
331
|
+
/* === Classes =================================== */
|
332
|
+
|
333
|
+
table.header-table {
|
334
|
+
color: white;
|
335
|
+
font-size: small;
|
336
|
+
}
|
337
|
+
|
338
|
+
.type-note {
|
339
|
+
font-size: small;
|
340
|
+
color: #DEDEDE;
|
341
|
+
}
|
342
|
+
|
343
|
+
.xxsection-bar {
|
344
|
+
background: #eee;
|
345
|
+
color: #333;
|
346
|
+
padding: 3px;
|
347
|
+
}
|
348
|
+
|
349
|
+
.section-bar {
|
350
|
+
color: #333;
|
351
|
+
border-bottom: 1px solid #999;
|
352
|
+
margin-left: -20px;
|
353
|
+
}
|
354
|
+
|
355
|
+
|
356
|
+
.section-title {
|
357
|
+
background: #79a;
|
358
|
+
color: #eee;
|
359
|
+
padding: 3px;
|
360
|
+
margin-top: 2em;
|
361
|
+
margin-left: -30px;
|
362
|
+
border: 1px solid #999;
|
363
|
+
}
|
364
|
+
|
365
|
+
.top-aligned-row { vertical-align: top }
|
366
|
+
.bottom-aligned-row { vertical-align: bottom }
|
367
|
+
---------------------------
|
368
|
+
|
369
|
+
##Theme Gallery## | themes
|
370
|
+
|
371
|
+
= active4d =
|
372
|
+
|
373
|
+
----------hl ruby,active4d-------
|
374
|
+
module Uv
|
375
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
376
|
+
init_syntaxes unless @syntaxes
|
377
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
378
|
+
css_class = render_style
|
379
|
+
render_options = YAML.load( File.open( renderer ) )
|
380
|
+
if output == "xhtml"
|
381
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
382
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
383
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
384
|
+
else
|
385
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
386
|
+
end
|
387
|
+
end
|
388
|
+
end
|
389
|
+
---------------------------------
|
390
|
+
|
391
|
+
= all_hallows_eve =
|
392
|
+
|
393
|
+
----------hl ruby,all_hallows_eve-------
|
394
|
+
module Uv
|
395
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
396
|
+
init_syntaxes unless @syntaxes
|
397
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
398
|
+
css_class = render_style
|
399
|
+
render_options = YAML.load( File.open( renderer ) )
|
400
|
+
if output == "xhtml"
|
401
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
402
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
403
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
404
|
+
else
|
405
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
406
|
+
end
|
407
|
+
end
|
408
|
+
end
|
409
|
+
---------------------------------
|
410
|
+
|
411
|
+
= amy =
|
412
|
+
|
413
|
+
----------hl ruby,amy-------
|
414
|
+
module Uv
|
415
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
416
|
+
init_syntaxes unless @syntaxes
|
417
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
418
|
+
css_class = render_style
|
419
|
+
render_options = YAML.load( File.open( renderer ) )
|
420
|
+
if output == "xhtml"
|
421
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
422
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
423
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
424
|
+
else
|
425
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
426
|
+
end
|
427
|
+
end
|
428
|
+
end
|
429
|
+
---------------------------------
|
430
|
+
|
431
|
+
= blackboard =
|
432
|
+
|
433
|
+
----------hl ruby,blackboard-------
|
434
|
+
module Uv
|
435
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
436
|
+
init_syntaxes unless @syntaxes
|
437
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
438
|
+
css_class = render_style
|
439
|
+
render_options = YAML.load( File.open( renderer ) )
|
440
|
+
if output == "xhtml"
|
441
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
442
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
443
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
444
|
+
else
|
445
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
446
|
+
end
|
447
|
+
end
|
448
|
+
end
|
449
|
+
---------------------------------
|
450
|
+
|
451
|
+
= brilliance_black =
|
452
|
+
|
453
|
+
----------hl ruby,brilliance_black-------
|
454
|
+
module Uv
|
455
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
456
|
+
init_syntaxes unless @syntaxes
|
457
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
458
|
+
css_class = render_style
|
459
|
+
render_options = YAML.load( File.open( renderer ) )
|
460
|
+
if output == "xhtml"
|
461
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
462
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
463
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
464
|
+
else
|
465
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
466
|
+
end
|
467
|
+
end
|
468
|
+
end
|
469
|
+
---------------------------------
|
470
|
+
|
471
|
+
= brilliance_dull =
|
472
|
+
|
473
|
+
----------hl ruby,brilliance_dull-------
|
474
|
+
module Uv
|
475
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
476
|
+
init_syntaxes unless @syntaxes
|
477
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
478
|
+
css_class = render_style
|
479
|
+
render_options = YAML.load( File.open( renderer ) )
|
480
|
+
if output == "xhtml"
|
481
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
482
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
483
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
484
|
+
else
|
485
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
486
|
+
end
|
487
|
+
end
|
488
|
+
end
|
489
|
+
---------------------------------
|
490
|
+
|
491
|
+
= cobalt =
|
492
|
+
|
493
|
+
----------hl ruby,cobalt-------
|
494
|
+
module Uv
|
495
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
496
|
+
init_syntaxes unless @syntaxes
|
497
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
498
|
+
css_class = render_style
|
499
|
+
render_options = YAML.load( File.open( renderer ) )
|
500
|
+
if output == "xhtml"
|
501
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
502
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
503
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
504
|
+
else
|
505
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
506
|
+
end
|
507
|
+
end
|
508
|
+
end
|
509
|
+
---------------------------------
|
510
|
+
|
511
|
+
= dawn =
|
512
|
+
|
513
|
+
----------hl ruby,dawn-------
|
514
|
+
module Uv
|
515
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
516
|
+
init_syntaxes unless @syntaxes
|
517
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
518
|
+
css_class = render_style
|
519
|
+
render_options = YAML.load( File.open( renderer ) )
|
520
|
+
if output == "xhtml"
|
521
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
522
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
523
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
524
|
+
else
|
525
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
526
|
+
end
|
527
|
+
end
|
528
|
+
end
|
529
|
+
---------------------------------
|
530
|
+
|
531
|
+
= eiffel =
|
532
|
+
|
533
|
+
----------hl ruby,eiffel-------
|
534
|
+
module Uv
|
535
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
536
|
+
init_syntaxes unless @syntaxes
|
537
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
538
|
+
css_class = render_style
|
539
|
+
render_options = YAML.load( File.open( renderer ) )
|
540
|
+
if output == "xhtml"
|
541
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
542
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
543
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
544
|
+
else
|
545
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
546
|
+
end
|
547
|
+
end
|
548
|
+
end
|
549
|
+
---------------------------------
|
550
|
+
|
551
|
+
= espresso_libre =
|
552
|
+
|
553
|
+
----------hl ruby,espresso_libre-------
|
554
|
+
module Uv
|
555
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
556
|
+
init_syntaxes unless @syntaxes
|
557
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
558
|
+
css_class = render_style
|
559
|
+
render_options = YAML.load( File.open( renderer ) )
|
560
|
+
if output == "xhtml"
|
561
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
562
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
563
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
564
|
+
else
|
565
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
566
|
+
end
|
567
|
+
end
|
568
|
+
end
|
569
|
+
---------------------------------
|
570
|
+
|
571
|
+
= idle =
|
572
|
+
----------hl ruby,idle-------
|
573
|
+
module Uv
|
574
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
575
|
+
init_syntaxes unless @syntaxes
|
576
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
577
|
+
css_class = render_style
|
578
|
+
render_options = YAML.load( File.open( renderer ) )
|
579
|
+
if output == "xhtml"
|
580
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
581
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
582
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
583
|
+
else
|
584
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
585
|
+
end
|
586
|
+
end
|
587
|
+
end
|
588
|
+
---------------------------------
|
589
|
+
|
590
|
+
= iplastic =
|
591
|
+
|
592
|
+
----------hl ruby,iplastic-------
|
593
|
+
module Uv
|
594
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
595
|
+
init_syntaxes unless @syntaxes
|
596
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
597
|
+
css_class = render_style
|
598
|
+
render_options = YAML.load( File.open( renderer ) )
|
599
|
+
if output == "xhtml"
|
600
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
601
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
602
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
603
|
+
else
|
604
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
605
|
+
end
|
606
|
+
end
|
607
|
+
end
|
608
|
+
---------------------------------
|
609
|
+
|
610
|
+
= lazy =
|
611
|
+
|
612
|
+
----------hl ruby,lazy-------
|
613
|
+
module Uv
|
614
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
615
|
+
init_syntaxes unless @syntaxes
|
616
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
617
|
+
css_class = render_style
|
618
|
+
render_options = YAML.load( File.open( renderer ) )
|
619
|
+
if output == "xhtml"
|
620
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
621
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
622
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
623
|
+
else
|
624
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
625
|
+
end
|
626
|
+
end
|
627
|
+
end
|
628
|
+
---------------------------------
|
629
|
+
|
630
|
+
= mac_classic =
|
631
|
+
|
632
|
+
----------hl ruby,mac_classic-------
|
633
|
+
module Uv
|
634
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
635
|
+
init_syntaxes unless @syntaxes
|
636
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
637
|
+
css_class = render_style
|
638
|
+
render_options = YAML.load( File.open( renderer ) )
|
639
|
+
if output == "xhtml"
|
640
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
641
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
642
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
643
|
+
else
|
644
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
645
|
+
end
|
646
|
+
end
|
647
|
+
end
|
648
|
+
---------------------------------
|
649
|
+
|
650
|
+
= magicwb_amiga =
|
651
|
+
|
652
|
+
----------hl ruby,magicwb_amiga-------
|
653
|
+
module Uv
|
654
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
655
|
+
init_syntaxes unless @syntaxes
|
656
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
657
|
+
css_class = render_style
|
658
|
+
render_options = YAML.load( File.open( renderer ) )
|
659
|
+
if output == "xhtml"
|
660
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
661
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
662
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
663
|
+
else
|
664
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
665
|
+
end
|
666
|
+
end
|
667
|
+
end
|
668
|
+
---------------------------------
|
669
|
+
|
670
|
+
= pastels_on_dark =
|
671
|
+
|
672
|
+
----------hl ruby,pastels_on_dark-------
|
673
|
+
module Uv
|
674
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
675
|
+
init_syntaxes unless @syntaxes
|
676
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
677
|
+
css_class = render_style
|
678
|
+
render_options = YAML.load( File.open( renderer ) )
|
679
|
+
if output == "xhtml"
|
680
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
681
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
682
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
683
|
+
else
|
684
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
685
|
+
end
|
686
|
+
end
|
687
|
+
end
|
688
|
+
---------------------------------
|
689
|
+
|
690
|
+
= slush_poppies =
|
691
|
+
|
692
|
+
----------hl ruby,slush_poppies-------
|
693
|
+
module Uv
|
694
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
695
|
+
init_syntaxes unless @syntaxes
|
696
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
697
|
+
css_class = render_style
|
698
|
+
render_options = YAML.load( File.open( renderer ) )
|
699
|
+
if output == "xhtml"
|
700
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
701
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
702
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
703
|
+
else
|
704
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
705
|
+
end
|
706
|
+
end
|
707
|
+
end
|
708
|
+
---------------------------------
|
709
|
+
|
710
|
+
= spacecadet =
|
711
|
+
|
712
|
+
----------hl ruby,spacecadet-------
|
713
|
+
module Uv
|
714
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
715
|
+
init_syntaxes unless @syntaxes
|
716
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
717
|
+
css_class = render_style
|
718
|
+
render_options = YAML.load( File.open( renderer ) )
|
719
|
+
if output == "xhtml"
|
720
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
721
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
722
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
723
|
+
else
|
724
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
725
|
+
end
|
726
|
+
end
|
727
|
+
end
|
728
|
+
---------------------------------
|
729
|
+
|
730
|
+
= sunburst =
|
731
|
+
|
732
|
+
----------hl ruby,sunburst-------
|
733
|
+
module Uv
|
734
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
735
|
+
init_syntaxes unless @syntaxes
|
736
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
737
|
+
css_class = render_style
|
738
|
+
render_options = YAML.load( File.open( renderer ) )
|
739
|
+
if output == "xhtml"
|
740
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
741
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
742
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
743
|
+
else
|
744
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
745
|
+
end
|
746
|
+
end
|
747
|
+
end
|
748
|
+
---------------------------------
|
749
|
+
|
750
|
+
= twilight =
|
751
|
+
|
752
|
+
----------hl ruby,twilight-------
|
753
|
+
module Uv
|
754
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
755
|
+
init_syntaxes unless @syntaxes
|
756
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
757
|
+
css_class = render_style
|
758
|
+
render_options = YAML.load( File.open( renderer ) )
|
759
|
+
if output == "xhtml"
|
760
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
761
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
762
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
763
|
+
else
|
764
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
765
|
+
end
|
766
|
+
end
|
767
|
+
end
|
768
|
+
---------------------------------
|
769
|
+
|
770
|
+
= zenburnesque =
|
771
|
+
|
772
|
+
----------hl ruby,zenburnesque-------
|
773
|
+
module Uv
|
774
|
+
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
|
775
|
+
init_syntaxes unless @syntaxes
|
776
|
+
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
|
777
|
+
css_class = render_style
|
778
|
+
render_options = YAML.load( File.open( renderer ) )
|
779
|
+
if output == "xhtml"
|
780
|
+
render_processor = HtmlProcessor.new( render_options, line_numbers )
|
781
|
+
@syntaxes[syntax_name].parse( text, render_processor )
|
782
|
+
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
|
783
|
+
else
|
784
|
+
raise( ArgumentError, "Output for #{output} is not yet implemented" )
|
785
|
+
end
|
786
|
+
end
|
787
|
+
end
|
788
|
+
---------------------------------
|
789
|
+
|
790
|
+
# Maintainer info #
|
791
|
+
|
792
|
+
= Updating syntax files =
|
793
|
+
|
794
|
+
Ultraviolet stores syntax files under the `syntax` directory. Syntax files can
|
795
|
+
be directly converted from Textmate format using the `plist2syntax` script that
|
796
|
+
gets installed with Textpow.
|
797
|
+
|
798
|
+
--------hl shell-unix-generic,,false------
|
799
|
+
plist2syntax $BUNDLE_DIR/Java.tmbundle/Syntaxes/Java.plist
|
800
|
+
mv java.yaml syntax/java.syntax
|
801
|
+
------------------------------------------
|
802
|
+
|
803
|
+
= Updating theme files =
|
804
|
+
|
805
|
+
Currently only XHTML is "officially" supported by ultraviolet, nevertheless,
|
806
|
+
experimental latex output support already exists and other output formats can
|
807
|
+
be included in the future. This is important because theme conversion is format
|
808
|
+
dependent. For xhmtl, the command is `theme2xhtmlrender` as shown in the
|
809
|
+
following example.
|
810
|
+
|
811
|
+
--------hl shell-unix-generic,,false------
|
812
|
+
theme2xhtmlrender $THEME_DIR/Amy.tmTheme
|
813
|
+
------------------------------------------
|
814
|
+
|
815
|
+
For latex, the command `theme2latexrender` is used instead.
|
816
|
+
|
817
|
+
--------hl shell-unix-generic,,false------
|
818
|
+
theme2latexrender $THEME_DIR/Amy.tmTheme
|
819
|
+
------------------------------------------
|
820
|
+
|
821
|
+
|
822
|
+
# Links #
|
823
|
+
|
824
|
+
= Rubyforge Project page =
|
825
|
+
|
826
|
+
* [Ultraviolet http://rubyforge.org/projects/ultraviolet/]
|
827
|
+
|
828
|
+
= Requirements =
|
829
|
+
|
830
|
+
* [Textpow http://rubyforge.org/projects/textpow/].
|
831
|
+
|
832
|
+
= Projects using Ultraviolet =
|
833
|
+
|
834
|
+
* [Macaronic markup engine http://mama.rubyforge.org/].
|
835
|
+
* [Radiograph rails plugin http://agilewebdevelopment.com/plugins/radiograph].
|
836
|
+
* [SimpleHighlight plugin for SimpleLog http://www.daikini.com/past/2007/6/14/simplehighlight_syntax_highlighting_for_simplelog/]
|
837
|
+
|
838
|
+
= Other =
|
839
|
+
|
840
|
+
* [Uv tutorial in french http://blog.irrealia.org/articles/2007/06/13/apr-egrave-s-coderay-ultraviolet-utilisation-dans-rails-en-ligne-de-commande-ou-comme-une-librairie]
|