ultraviolet 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. data/History.txt +7 -0
  2. data/Manifest.txt +184 -188
  3. data/Rakefile +2 -2
  4. data/bin/theme2latexrender +9 -30
  5. data/bin/theme2xhtmlrender +17 -23
  6. data/lib/uv.rb +2 -2
  7. data/lib/uv/{html_processor.rb → render_processor.rb} +39 -13
  8. data/lib/uv/utility.rb +67 -0
  9. data/render/latex/active4d.render +7 -7
  10. data/render/latex/all_hallows_eve.render +6 -6
  11. data/render/latex/amy.render +7 -7
  12. data/render/latex/blackboard.render +5 -5
  13. data/render/latex/brilliance_black.render +171 -221
  14. data/render/latex/brilliance_dull.render +105 -105
  15. data/render/latex/cobalt.render +12 -12
  16. data/render/latex/dawn.render +8 -8
  17. data/render/latex/eiffel.render +4 -4
  18. data/render/latex/espresso_libre.render +5 -5
  19. data/render/latex/idle.render +2 -2
  20. data/render/latex/iplastic.render +5 -5
  21. data/render/latex/lazy.render +2 -2
  22. data/render/latex/mac_classic.render +7 -7
  23. data/render/latex/magicwb_amiga.render +8 -8
  24. data/render/latex/pastels_on_dark.render +5 -5
  25. data/render/latex/slush_poppies.render +1 -1
  26. data/render/latex/spacecadet.render +3 -3
  27. data/render/latex/sunburst.render +14 -14
  28. data/render/latex/twilight.render +9 -9
  29. data/render/latex/zenburnesque.render +2 -2
  30. data/render/xhtml/amy.render +1 -1
  31. data/render/xhtml/brilliance_black.render +74 -124
  32. data/render/xhtml/brilliance_dull.render +6 -6
  33. data/render/xhtml/files/css/active4d.css +1 -1
  34. data/render/xhtml/files/css/all_hallows_eve.css +1 -1
  35. data/render/xhtml/files/css/amy.css +6 -3
  36. data/render/xhtml/files/css/blackboard.css +3 -3
  37. data/render/xhtml/files/css/brilliance_black.css +193 -220
  38. data/render/xhtml/files/css/brilliance_dull.css +110 -90
  39. data/render/xhtml/files/css/cobalt.css +3 -3
  40. data/render/xhtml/files/css/dawn.css +6 -6
  41. data/render/xhtml/files/css/eiffel.css +1 -1
  42. data/render/xhtml/files/css/espresso_libre.css +2 -2
  43. data/render/xhtml/files/css/iplastic.css +3 -3
  44. data/render/xhtml/files/css/mac_classic.css +3 -3
  45. data/render/xhtml/files/css/magicwb_amiga.css +6 -3
  46. data/render/xhtml/files/css/pastels_on_dark.css +2 -2
  47. data/render/xhtml/files/css/spacecadet.css +1 -1
  48. data/render/xhtml/files/css/sunburst.css +7 -7
  49. data/render/xhtml/files/css/twilight.css +5 -5
  50. data/render/xhtml/files/css/zenburnesque.css +5 -2
  51. data/render/xhtml/mac_classic.render +1 -1
  52. data/render/xhtml/magicwb_amiga.render +1 -1
  53. data/render/xhtml/zenburnesque.render +1 -1
  54. data/syntax/antlr.syntax +49 -26
  55. data/syntax/apache.syntax +17 -2
  56. data/syntax/c.syntax +2 -2
  57. data/syntax/cm.syntax +32 -0
  58. data/syntax/coldfusion.syntax +4 -3
  59. data/syntax/css.syntax +8 -3
  60. data/syntax/d.syntax +4 -0
  61. data/syntax/groovy.syntax +10 -8
  62. data/syntax/gtd.syntax +22 -0
  63. data/syntax/haml.syntax +2 -2
  64. data/syntax/html.syntax +4 -4
  65. data/syntax/ini.syntax +5 -4
  66. data/syntax/javascript.syntax +2 -1
  67. data/syntax/languagedefinition.syntax +50 -39
  68. data/syntax/macports_portfile.syntax +21 -1
  69. data/syntax/makefile.syntax +1 -0
  70. data/syntax/objective-c.syntax +37 -30
  71. data/syntax/pascal.syntax +1 -1
  72. data/syntax/perl.syntax +40 -0
  73. data/syntax/php.syntax +672 -379
  74. data/syntax/pmwiki.syntax +113 -0
  75. data/syntax/property_list.syntax +4 -14
  76. data/syntax/python.syntax +17 -14
  77. data/syntax/release_notes.syntax +12 -3
  78. data/syntax/ruby_experimental.syntax +8 -8
  79. data/syntax/standard_ml.syntax +79 -3
  80. data/syntax/twiki.syntax +2 -2
  81. data/syntax/txt2tags.syntax +18 -18
  82. data/syntax/xml.syntax +1 -0
  83. data/syntax/yaml.syntax +2 -2
  84. metadata +193 -194
  85. data/syntax/buggy/nemerle.yaml +0 -74
  86. data/syntax/gtd2_text.syntax +0 -31
  87. data/syntax/old/YAML.yaml +0 -160
  88. data/syntax/old/txt2tags.yaml +0 -139
@@ -1,3 +1,10 @@
1
+ == 0.10.1 / 2007-06-15
2
+ * Corrected line-number schemes in theme2xhtmlrender
3
+ * Corrected alpha blending code in theme2xhtmlrender, Now the brilliance themes seem to work!
4
+ * Modified html_processor to include whole syntax scopes.
5
+ * Add index for duplicated setting names in tmTheme files.
6
+ * Multiple fixes for latex, color boxes have now the right color and size.
7
+
1
8
  == 0.10.0 / 2007-05-15
2
9
  * Added copy files commant to Uv module and to command line utility.
3
10
  now the required files (ex. css) may be easily copied to a destination
@@ -1,237 +1,233 @@
1
- render/old/txt2tags.render
2
- render/xhtml/active4d.render
3
- render/xhtml/all_hallows_eve.render
4
- render/xhtml/amy.render
5
- render/xhtml/brilliance_black.render
6
- render/xhtml/brilliance_dull.render
7
- render/xhtml/cobalt.render
8
- render/xhtml/eiffel.render
9
- render/xhtml/espresso_libre.render
10
- render/xhtml/idle.render
11
- render/xhtml/iplastic.render
12
- render/xhtml/lazy.render
13
- render/xhtml/mac_classic.render
14
- render/xhtml/magicwb_amiga.render
15
- render/xhtml/pastels_on_dark.render
16
- render/xhtml/slush_poppies.render
17
- render/xhtml/spacecadet.render
18
- render/xhtml/sunburst.render
19
- render/xhtml/twilight.render
20
- render/xhtml/blackboard.render
21
- render/xhtml/dawn.render
22
- render/xhtml/zenburnesque.render
23
- render/xhtml/files
24
- render/xhtml/files/css
25
- render/xhtml/files/css/active4d.css
26
- render/xhtml/files/css/all_hallows_eve.css
27
- render/xhtml/files/css/amy.css
1
+ test/test_uv.rb
2
+ lib/uv/render_processor.rb
3
+ lib/uv/utility.rb
4
+ lib/uv.rb
5
+ bin/theme2xhtmlrender
6
+ bin/theme2latexrender
7
+ bin/uv
8
+ History.txt
9
+ Rakefile
10
+ Manifest.txt
11
+ README.txt
12
+ render/xhtml/files/css/idle.css
13
+ render/xhtml/files/css/lazy.css
14
+ render/xhtml/files/css/espresso_libre.css
28
15
  render/xhtml/files/css/blackboard.css
29
- render/xhtml/files/css/brilliance_black.css
30
16
  render/xhtml/files/css/brilliance_dull.css
31
- render/xhtml/files/css/cobalt.css
17
+ render/xhtml/files/css/sunburst.css
18
+ render/xhtml/files/css/amy.css
19
+ render/xhtml/files/css/zenburnesque.css
20
+ render/xhtml/files/css/magicwb_amiga.css
32
21
  render/xhtml/files/css/dawn.css
33
22
  render/xhtml/files/css/eiffel.css
34
- render/xhtml/files/css/espresso_libre.css
35
- render/xhtml/files/css/idle.css
36
- render/xhtml/files/css/iplastic.css
37
- render/xhtml/files/css/lazy.css
23
+ render/xhtml/files/css/twilight.css
24
+ render/xhtml/files/css/spacecadet.css
25
+ render/xhtml/files/css/brilliance_black.css
38
26
  render/xhtml/files/css/mac_classic.css
39
- render/xhtml/files/css/magicwb_amiga.css
40
- render/xhtml/files/css/pastels_on_dark.css
27
+ render/xhtml/files/css/active4d.css
41
28
  render/xhtml/files/css/slush_poppies.css
42
- render/xhtml/files/css/spacecadet.css
43
- render/xhtml/files/css/sunburst.css
44
- render/xhtml/files/css/twilight.css
45
- render/xhtml/files/css/zenburnesque.css
46
- render/latex/amy.render
47
- render/latex/espresso_libre.render
48
- render/latex/eiffel.render
49
- render/latex/sunburst.render
29
+ render/xhtml/files/css/cobalt.css
30
+ render/xhtml/files/css/iplastic.css
31
+ render/xhtml/files/css/all_hallows_eve.css
32
+ render/xhtml/files/css/pastels_on_dark.css
33
+ render/xhtml/idle.render
34
+ render/xhtml/lazy.render
35
+ render/xhtml/espresso_libre.render
36
+ render/xhtml/blackboard.render
37
+ render/xhtml/brilliance_dull.render
38
+ render/xhtml/sunburst.render
39
+ render/xhtml/amy.render
40
+ render/xhtml/zenburnesque.render
41
+ render/xhtml/magicwb_amiga.render
42
+ render/xhtml/dawn.render
43
+ render/xhtml/eiffel.render
44
+ render/xhtml/twilight.render
45
+ render/xhtml/spacecadet.render
46
+ render/xhtml/brilliance_black.render
47
+ render/xhtml/mac_classic.render
48
+ render/xhtml/active4d.render
49
+ render/xhtml/slush_poppies.render
50
+ render/xhtml/cobalt.render
51
+ render/xhtml/iplastic.render
52
+ render/xhtml/all_hallows_eve.render
53
+ render/xhtml/pastels_on_dark.render
54
+ render/latex/mac_classic.render
55
+ render/latex/active4d.render
56
+ render/latex/cobalt.render
57
+ render/latex/magicwb_amiga.render
58
+ render/latex/pastels_on_dark.render
59
+ render/latex/iplastic.render
50
60
  render/latex/idle.render
51
61
  render/latex/lazy.render
52
- render/latex/all_hallows_eve.render
53
- render/latex/blackboard.render
62
+ render/latex/espresso_libre.render
54
63
  render/latex/brilliance_dull.render
64
+ render/latex/blackboard.render
65
+ render/latex/sunburst.render
66
+ render/latex/amy.render
55
67
  render/latex/zenburnesque.render
56
- render/latex/magicwb_amiga.render
57
68
  render/latex/dawn.render
69
+ render/latex/eiffel.render
58
70
  render/latex/twilight.render
59
71
  render/latex/spacecadet.render
60
- render/latex/brilliance_black.render
61
- render/latex/mac_classic.render
62
- render/latex/active4d.render
63
72
  render/latex/slush_poppies.render
64
- render/latex/cobalt.render
65
- render/latex/iplastic.render
66
- render/latex/pastels_on_dark.render
67
- test/test_uv.rb
68
- lib/uv/html_processor.rb
69
- lib/uv.rb
70
- syntax/old
71
- syntax/old/txt2tags.yaml
72
- syntax/old/YAML.yaml
73
- syntax/buggy
74
- syntax/buggy/nemerle.yaml
75
- syntax/gtd2_text.syntax
76
- syntax/multimarkdown.syntax
77
- syntax/asp.syntax
78
- syntax/active4d_ini.syntax
79
- syntax/sweave.syntax
80
- syntax/xsl.syntax
73
+ render/latex/brilliance_black.render
74
+ render/latex/all_hallows_eve.render
75
+ render/old/txt2tags.render
76
+ syntax/logo.syntax
77
+ syntax/dylan.syntax
78
+ syntax/latex_log.syntax
79
+ syntax/textile.syntax
80
+ syntax/build.syntax
81
+ syntax/latex_memoir.syntax
82
+ syntax/lexflex.syntax
83
+ syntax/lisp.syntax
84
+ syntax/gtd.syntax
85
+ syntax/m.syntax
81
86
  syntax/ocaml.syntax
82
87
  syntax/d.syntax
83
- syntax/ruby_on_rails.syntax
84
- syntax/standard_ml.syntax
85
- syntax/r.syntax
86
- syntax/gri.syntax
88
+ syntax/cm.syntax
89
+ syntax/ocamlyacc.syntax
90
+ syntax/opengl.syntax
91
+ syntax/pascal.syntax
92
+ syntax/lua.syntax
93
+ syntax/active4d.syntax
87
94
  syntax/mel.syntax
88
- syntax/javascript_+_prototype_bracketed.syntax
89
- syntax/lighttpd.syntax
90
- syntax/blog_text.syntax
91
- syntax/m.syntax
92
- syntax/tcl.syntax
93
- syntax/textile.syntax
94
- syntax/build.syntax
95
+ syntax/r.syntax
96
+ syntax/r_console.syntax
97
+ syntax/smarty.syntax
98
+ syntax/latex.syntax
99
+ syntax/prolog.syntax
100
+ syntax/rez.syntax
101
+ syntax/asp.syntax
95
102
  syntax/xhtml_1.0.syntax
103
+ syntax/icalendar.syntax
104
+ syntax/mootools.syntax
105
+ syntax/scheme.syntax
96
106
  syntax/xml.syntax
97
- syntax/latex_log.syntax
98
- syntax/lisp.syntax
99
- syntax/rez.syntax
100
- syntax/logo.syntax
101
- syntax/ocamllex.syntax
107
+ syntax/mail.syntax
108
+ syntax/swig.syntax
102
109
  syntax/slate.syntax
103
- syntax/ruby.syntax
104
- syntax/s5.syntax
105
- syntax/php.syntax
110
+ syntax/sweave.syntax
106
111
  syntax/qmake_project.syntax
107
- syntax/ocamlyacc.syntax
112
+ syntax/release_notes.syntax
113
+ syntax/html_tcl.syntax
114
+ syntax/html.syntax
115
+ syntax/c.syntax
116
+ syntax/pmwiki.syntax
117
+ syntax/ruby.syntax
108
118
  syntax/csv.syntax
119
+ syntax/ruby_on_rails.syntax
120
+ syntax/xsl.syntax
109
121
  syntax/yaml.syntax
110
- syntax/scheme.syntax
111
- syntax/python.syntax
112
- syntax/ragel.syntax
113
- syntax/haml.syntax
114
- syntax/objective-c.syntax
122
+ syntax/io.syntax
123
+ syntax/java.syntax
124
+ syntax/gri.syntax
125
+ syntax/movable_type.syntax
115
126
  syntax/cs.syntax
116
- syntax/moinmoin.syntax
117
- syntax/mootools.syntax
118
127
  syntax/css.syntax
119
- syntax/dot.syntax
120
128
  syntax/c++.syntax
121
- syntax/strings_file.syntax
122
- syntax/objective-c++.syntax
123
- syntax/javascript.syntax
124
- syntax/jquery_javascript.syntax
125
- syntax/json.syntax
126
- syntax/latex.syntax
127
- syntax/prolog.syntax
128
- syntax/regexp.syntax
129
- syntax/remind.syntax
130
- syntax/sql.syntax
131
- syntax/mediawiki.syntax
129
+ syntax/haml.syntax
130
+ syntax/dot.syntax
131
+ syntax/tsv.syntax
132
+ syntax/ruby_experimental.syntax
133
+ syntax/man.syntax
134
+ syntax/bibtex.syntax
135
+ syntax/objective-c.syntax
136
+ syntax/subversion_commit_message.syntax
137
+ syntax/ocamllex.syntax
138
+ syntax/tcl.syntax
139
+ syntax/tex.syntax
140
+ syntax/ragel.syntax
141
+ syntax/shell-unix-generic.syntax
132
142
  syntax/inform.syntax
133
- syntax/pascal.syntax
134
- syntax/c.syntax
135
- syntax/blog_textile.syntax
136
- syntax/html.syntax
137
- syntax/ini.syntax
138
- syntax/ada.syntax
139
- syntax/context_free.syntax
140
- syntax/lexflex.syntax
143
+ syntax/sql.syntax
144
+ syntax/python.syntax
145
+ syntax/modula-3.syntax
141
146
  syntax/cake.syntax
142
- syntax/swig.syntax
143
- syntax/tex.syntax
144
- syntax/bulletin_board.syntax
145
- syntax/rd_r_documentation.syntax
146
- syntax/html-asp.syntax
147
- syntax/html_for_asp.net.syntax
147
+ syntax/logtalk.syntax
148
+ syntax/ini.syntax
149
+ syntax/diff.syntax
150
+ syntax/fortran.syntax
148
151
  syntax/txt2tags.syntax
149
- syntax/tex_math.syntax
150
- syntax/latex_beamer.syntax
151
- syntax/html_tcl.syntax
152
- syntax/bibtex.syntax
153
- syntax/lua.syntax
154
- syntax/smarty.syntax
155
- syntax/perl.syntax
156
- syntax/io.syntax
157
- syntax/latex_memoir.syntax
158
- syntax/mod_perl.syntax
159
- syntax/sql_rails.syntax
160
- syntax/java.syntax
161
- syntax/tsv.syntax
162
- syntax/qt_c++.syntax
163
- syntax/man.syntax
152
+ syntax/s5.syntax
164
153
  syntax/scilab.syntax
154
+ syntax/mips.syntax
155
+ syntax/twiki.syntax
156
+ syntax/perl.syntax
157
+ syntax/fxscript.syntax
158
+ syntax/markdown.syntax
165
159
  syntax/lilypond.syntax
166
- syntax/template_toolkit.syntax
167
- syntax/html_django.syntax
160
+ syntax/blog_html.syntax
161
+ syntax/html_mason.syntax
162
+ syntax/jquery_javascript.syntax
163
+ syntax/json.syntax
164
+ syntax/languagedefinition.syntax
165
+ syntax/tex_math.syntax
166
+ syntax/xml_strict.syntax
167
+ syntax/php.syntax
168
+ syntax/doxygen.syntax
169
+ syntax/strings_file.syntax
170
+ syntax/makefile.syntax
171
+ syntax/setext.syntax
172
+ syntax/ada.syntax
173
+ syntax/active4d_ini.syntax
174
+ syntax/active4d_library.syntax
168
175
  syntax/antlr.syntax
169
- syntax/fortran.syntax
176
+ syntax/javascript_+_prototype.syntax
177
+ syntax/lighttpd.syntax
178
+ syntax/template_toolkit.syntax
179
+ syntax/sql_rails.syntax
180
+ syntax/ssh-config.syntax
181
+ syntax/mediawiki.syntax
182
+ syntax/moinmoin.syntax
183
+ syntax/javascript.syntax
184
+ syntax/quake3_config.syntax
185
+ syntax/qt_c++.syntax
186
+ syntax/camlp4.syntax
187
+ syntax/multimarkdown.syntax
188
+ syntax/blog_text.syntax
189
+ syntax/blog_textile.syntax
190
+ syntax/bulletin_board.syntax
191
+ syntax/groovy.syntax
192
+ syntax/gtdalt.syntax
193
+ syntax/regular_expressions_python.syntax
194
+ syntax/latex_beamer.syntax
195
+ syntax/remind.syntax
196
+ syntax/regexp.syntax
197
+ syntax/rd_r_documentation.syntax
198
+ syntax/standard_ml.syntax
199
+ syntax/literate_haskell.syntax
200
+ syntax/python_django.syntax
170
201
  syntax/restructuredtext.syntax
171
- syntax/mail.syntax
172
- syntax/makefile.syntax
173
- syntax/twiki.syntax
174
- syntax/active4d.syntax
175
- syntax/html_mason.syntax
176
- syntax/release_notes.syntax
177
- syntax/mips.syntax
202
+ syntax/mod_perl.syntax
203
+ syntax/coldfusion.syntax
204
+ syntax/installer_distribution_script.syntax
178
205
  syntax/vectorscript.syntax
179
- syntax/logtalk.syntax
180
- syntax/r_console.syntax
181
- syntax/literate_haskell.syntax
182
206
  syntax/macports_portfile.syntax
183
- syntax/markdown.syntax
184
- syntax/regular_expressions_python.syntax
185
- syntax/groovy.syntax
186
- syntax/setext.syntax
187
- syntax/opengl.syntax
188
- syntax/diff.syntax
189
- syntax/modula-3.syntax
190
- syntax/icalendar.syntax
191
- syntax/apache.syntax
192
- syntax/gtdalt.syntax
193
- syntax/dylan.syntax
194
- syntax/xml_strict.syntax
195
207
  syntax/yui_javascript.syntax
196
- syntax/javaproperties.syntax
197
- syntax/python_django.syntax
198
- syntax/movable_type.syntax
199
- syntax/quake3_config.syntax
200
- syntax/ruby_experimental.syntax
201
- syntax/shell-unix-generic.syntax
202
- syntax/postscript.syntax
203
- syntax/plain_text.syntax
204
- syntax/ssh-config.syntax
205
- syntax/processing.syntax
206
- syntax/property_list.syntax
207
208
  syntax/actionscript.syntax
208
209
  syntax/active4d_html.syntax
209
- syntax/active4d_library.syntax
210
+ syntax/apache.syntax
210
211
  syntax/applescript.syntax
211
212
  syntax/asp_vb.net.syntax
212
- syntax/blog_html.syntax
213
213
  syntax/blog_markdown.syntax
214
- syntax/camlp4.syntax
215
- syntax/coldfusion.syntax
214
+ syntax/context_free.syntax
216
215
  syntax/css_experimental.syntax
217
216
  syntax/dokuwiki.syntax
218
- syntax/doxygen.syntax
219
217
  syntax/eiffel.syntax
220
218
  syntax/erlang.syntax
221
219
  syntax/f-script.syntax
222
- syntax/fxscript.syntax
223
- syntax/greasemonkey.syntax
224
220
  syntax/haskell.syntax
221
+ syntax/greasemonkey.syntax
222
+ syntax/html-asp.syntax
223
+ syntax/html_django.syntax
224
+ syntax/html_for_asp.net.syntax
225
225
  syntax/html_rails.syntax
226
- syntax/installer_distribution_script.syntax
227
- syntax/javascript_+_prototype.syntax
228
- syntax/languagedefinition.syntax
226
+ syntax/javaproperties.syntax
227
+ syntax/javascript_+_prototype_bracketed.syntax
228
+ syntax/objective-c++.syntax
229
+ syntax/plain_text.syntax
230
+ syntax/postscript.syntax
231
+ syntax/processing.syntax
232
+ syntax/property_list.syntax
229
233
  syntax/regular_expressions_oniguruma.syntax
230
- syntax/subversion_commit_message.syntax
231
- bin/theme2xhtmlrender
232
- bin/theme2latexrender
233
- bin/uv
234
- History.txt
235
- Rakefile
236
- Manifest.txt
237
- README.txt
data/Rakefile CHANGED
@@ -25,7 +25,7 @@ begin
25
25
  p.url = 'http://ultraviolet.rubyforge.org'
26
26
  p.rdoc_pattern = /^(lib|bin|ext)|txt$/
27
27
  p.changes = p.paragraphs_of('History.txt', 0).join("\n\n")
28
- p.extra_deps << ['textpow', '>= 0.9.0']
28
+ p.extra_deps << ['textpow', '>= 0.10.0']
29
29
  p.clean_globs = ["manual/*"]
30
30
  end
31
31
 
@@ -48,4 +48,4 @@ rescue LoadError => e
48
48
  task :test do
49
49
  system "ruby -Ibin:lib:test test_#{rubyforge_name}.rb"
50
50
  end
51
- end
51
+ end
@@ -5,6 +5,7 @@ rescue LoadError
5
5
  require 'rubygems'
6
6
  require 'plist'
7
7
  end
8
+ require 'uv/utility'
8
9
 
9
10
  base_dir = File.join( File.dirname(__FILE__), '..', 'render' )
10
11
 
@@ -15,28 +16,6 @@ def settings
15
16
  @settings
16
17
  end
17
18
 
18
- def normalize_color color
19
- if color =~ /^#/ && color.size == 9
20
- div0 = (settings["background"] ? settings["background"][1..-1].hex : 0xFFFFFF )
21
- div1, alpha = color[1..-1].hex.divmod( 0x100 )
22
- result = ""
23
- 3.times {
24
- div0, mod0 = div0.divmod( 0x100 )
25
- div1, mod1 = div1.divmod( 0x100 )
26
- result = ((mod1 * alpha + mod0 * ( 0x100 - alpha ) ) / 0x100).to_s(16).upcase.rjust(2, '0') + result
27
- }
28
- result = result
29
- result
30
- elsif color =~ /^#/ && color.size == 4
31
- r = (color[0].hex * 256 / 16).to_s(16).upcase.rjust(2, '0')
32
- g = (color[1].hex * 256 / 16).to_s(16).upcase.rjust(2, '0')
33
- b = (color[2].hex * 256 / 16).to_s(16).upcase.rjust(2, '0')
34
- r + g + b
35
- elsif color =~ /^#/ && color.size == 7
36
- return color[1..-1]
37
- end
38
- end
39
-
40
19
  @theme = Plist::parse_xml( ARGV[0] )
41
20
  render = {"name" => @theme["name"]}
42
21
  codecolumn = ""
@@ -60,13 +39,13 @@ render["tags"] = []
60
39
  pcount = 0
61
40
  if s = t["settings"]
62
41
  if s["background"]
63
- begin_string << "\\colorbox[HTML]{#{normalize_color(s["background"])}}{"
42
+ begin_string << "\\setlength{\\fboxsep}{0ex}\\colorbox[HTML]{#{Uv.normalize_color(settings, s["background"])[1..-1]}}{\\rule[-0.5ex]{0pt}{2.0ex}"
64
43
  else
65
44
  begin_string << "{"
66
45
  end
67
46
  pcount += 1
68
47
  if s["foreground"]
69
- begin_string << "\\color[HTML]{#{normalize_color(s["foreground"])}}"
48
+ begin_string << "\\color[HTML]{#{Uv.normalize_color(settings, s["foreground"], true)[1..-1]}}"
70
49
  end
71
50
  case s["fontStyle"]
72
51
  when /bold/
@@ -87,13 +66,13 @@ render["tags"] = []
87
66
  elsif ! t["name"]
88
67
  if s = t["settings"]
89
68
  codecolumn = "\\newcolumntype{C}{>{"
90
- codecolumn << "\\color[HTML]{#{normalize_color(s["foreground"])}}" if s["foreground"]
91
- codecolumn << "\\columncolor[HTML]{#{normalize_color(s["background"])}}" if s["background"]
69
+ codecolumn << "\\color[HTML]{#{Uv.normalize_color(settings, s["foreground"], true)[1..-1]}}" if s["foreground"]
70
+ codecolumn << "\\columncolor[HTML]{#{Uv.alpha_blend(s["background"], s["background"])[1..-1]}}" if s["background"]
92
71
  codecolumn << "}l}"
93
-
72
+ bg = Uv.alpha_blend(s["selection"], s["selection"]) if s["selection"]
94
73
  numbercolumn = "\\newcolumntype{N}{>{"
95
- numbercolumn << "\\color[HTML]{#{normalize_color(s["foreground"])}}" if s["foreground"]
96
- numbercolumn << "\\columncolor[HTML]{#{normalize_color(s["selection"])}}" if s["selection"]
74
+ numbercolumn << "\\color[HTML]{#{Uv.foreground(bg)[1..-1]}}" if bg
75
+ numbercolumn << "\\columncolor[HTML]{#{bg[1..-1]}}" if s["selection"]
97
76
  numbercolumn << "}l}"
98
77
 
99
78
  tag = {}
@@ -103,7 +82,7 @@ render["tags"] = []
103
82
  end
104
83
  end
105
84
 
106
- render["filter"] = '@escaped.gsub(/(_|\{|\}|&|\#|\\\\)/, \'\\\\\\\\\1\').gsub(/~/, \'\\\\textasciitilde\').gsub(/ /,\'\\\\hspace{1ex}\').gsub(/\t/,\'\\\\hspace{3ex}\')'
85
+ render["filter"] = '@escaped.gsub(/(\$)/, \'\\\\\\\\\1\').gsub(/\\\\(?!\$)/, \'$\\\\\\\\backslash$\').gsub(/(_|\{|\}|&|\#|%)/, \'\\\\\\\\\1\').gsub(/~/, \'\\\\textasciitilde \').gsub(/ /,\'\\\\hspace{1ex}\').gsub(/\t| /,\'\\\\hspace{3ex}\').gsub(/\"/, "\'\'").gsub(/(\^)/,\'\\\\\\\\\1{}\')'
107
86
 
108
87
  tag = {}
109
88
  tag["begin"] = ""