Skip to content
Browse files

now works with updated versions of oni and texpow

  • Loading branch information...
1 parent 0bd0dd0 commit 27163fca64f253cc2543e6a2c0b442716eb2796c @daveheitzman committed Apr 2, 2012
Showing with 163 additions and 19,692 deletions.
  1. +1 −1 .rvmrc
  2. +154 −1 lib/rmthemegen.rb
  3. +1 −1 lib/rmthemegen/version.rb
  4. +5 −5 rmthemegen.gemspec
  5. +2 −5 test/create_syntax.rb
  6. +0 −25 vendor/ultraviolet-0.10.2/History.txt
  7. +0 −233 vendor/ultraviolet-0.10.2/Manifest.txt
  8. +0 −52 vendor/ultraviolet-0.10.2/README.txt
  9. +0 −51 vendor/ultraviolet-0.10.2/Rakefile
  10. +0 −122 vendor/ultraviolet-0.10.2/bin/theme2latexrender
  11. +0 −156 vendor/ultraviolet-0.10.2/bin/theme2xhtmlrender
  12. +0 −140 vendor/ultraviolet-0.10.2/bin/uv
  13. +0 −94 vendor/ultraviolet-0.10.2/lib/uv.rb
  14. +0 −131 vendor/ultraviolet-0.10.2/lib/uv/render_processor.rb
  15. +0 −206 vendor/ultraviolet-0.10.2/lib/uv/utility.rb
  16. +0 −132 vendor/ultraviolet-0.10.2/render/latex/active4d.render
  17. +0 −96 vendor/ultraviolet-0.10.2/render/latex/all_hallows_eve.render
  18. +0 −171 vendor/ultraviolet-0.10.2/render/latex/amy.render
  19. +0 −111 vendor/ultraviolet-0.10.2/render/latex/blackboard.render
  20. +0 −552 vendor/ultraviolet-0.10.2/render/latex/brilliance_black.render
  21. +0 −561 vendor/ultraviolet-0.10.2/render/latex/brilliance_dull.render
  22. +0 −162 vendor/ultraviolet-0.10.2/render/latex/cobalt.render
  23. +0 −126 vendor/ultraviolet-0.10.2/render/latex/dawn.render
  24. +0 −132 vendor/ultraviolet-0.10.2/render/latex/eiffel.render
  25. +0 −123 vendor/ultraviolet-0.10.2/render/latex/espresso_libre.render
  26. +0 −93 vendor/ultraviolet-0.10.2/render/latex/idle.render
  27. +0 −99 vendor/ultraviolet-0.10.2/render/latex/iplastic.render
  28. +0 −96 vendor/ultraviolet-0.10.2/render/latex/lazy.render
  29. +0 −135 vendor/ultraviolet-0.10.2/render/latex/mac_classic.render
  30. +0 −117 vendor/ultraviolet-0.10.2/render/latex/magicwb_amiga.render
  31. +0 −204 vendor/ultraviolet-0.10.2/render/latex/pastels_on_dark.render
  32. +0 −123 vendor/ultraviolet-0.10.2/render/latex/slush_poppies.render
  33. +0 −81 vendor/ultraviolet-0.10.2/render/latex/spacecadet.render
  34. +0 −186 vendor/ultraviolet-0.10.2/render/latex/sunburst.render
  35. +0 −153 vendor/ultraviolet-0.10.2/render/latex/twilight.render
  36. +0 −126 vendor/ultraviolet-0.10.2/render/latex/zenburnesque.render
  37. +0 −131 vendor/ultraviolet-0.10.2/render/old/txt2tags.render
  38. +0 −140 vendor/ultraviolet-0.10.2/render/xhtml/active4d.render
  39. +0 −104 vendor/ultraviolet-0.10.2/render/xhtml/all_hallows_eve.render
  40. +0 −179 vendor/ultraviolet-0.10.2/render/xhtml/amy.render
  41. +0 −119 vendor/ultraviolet-0.10.2/render/xhtml/blackboard.render
  42. +0 −560 vendor/ultraviolet-0.10.2/render/xhtml/brilliance_black.render
  43. +0 −569 vendor/ultraviolet-0.10.2/render/xhtml/brilliance_dull.render
  44. +0 −170 vendor/ultraviolet-0.10.2/render/xhtml/cobalt.render
  45. +0 −134 vendor/ultraviolet-0.10.2/render/xhtml/dawn.render
  46. +0 −140 vendor/ultraviolet-0.10.2/render/xhtml/eiffel.render
  47. +0 −131 vendor/ultraviolet-0.10.2/render/xhtml/espresso_libre.render
  48. +0 −114 vendor/ultraviolet-0.10.2/render/xhtml/files/css/active4d.css
  49. +0 −72 vendor/ultraviolet-0.10.2/render/xhtml/files/css/all_hallows_eve.css
  50. +0 −147 vendor/ultraviolet-0.10.2/render/xhtml/files/css/amy.css
  51. +0 −88 vendor/ultraviolet-0.10.2/render/xhtml/files/css/blackboard.css
  52. +0 −605 vendor/ultraviolet-0.10.2/render/xhtml/files/css/brilliance_black.css
  53. +0 −599 vendor/ultraviolet-0.10.2/render/xhtml/files/css/brilliance_dull.css
  54. +0 −149 vendor/ultraviolet-0.10.2/render/xhtml/files/css/cobalt.css
  55. +0 −121 vendor/ultraviolet-0.10.2/render/xhtml/files/css/dawn.css
  56. +0 −121 vendor/ultraviolet-0.10.2/render/xhtml/files/css/eiffel.css
  57. +0 −109 vendor/ultraviolet-0.10.2/render/xhtml/files/css/espresso_libre.css
  58. +0 −62 vendor/ultraviolet-0.10.2/render/xhtml/files/css/idle.css
  59. +0 −80 vendor/ultraviolet-0.10.2/render/xhtml/files/css/iplastic.css
  60. +0 −73 vendor/ultraviolet-0.10.2/render/xhtml/files/css/lazy.css
  61. +0 −123 vendor/ultraviolet-0.10.2/render/xhtml/files/css/mac_classic.css
  62. +0 −104 vendor/ultraviolet-0.10.2/render/xhtml/files/css/magicwb_amiga.css
  63. +0 −188 vendor/ultraviolet-0.10.2/render/xhtml/files/css/pastels_on_dark.css
  64. +0 −85 vendor/ultraviolet-0.10.2/render/xhtml/files/css/slush_poppies.css
  65. +0 −51 vendor/ultraviolet-0.10.2/render/xhtml/files/css/spacecadet.css
  66. +0 −180 vendor/ultraviolet-0.10.2/render/xhtml/files/css/sunburst.css
  67. +0 −137 vendor/ultraviolet-0.10.2/render/xhtml/files/css/twilight.css
  68. +0 −91 vendor/ultraviolet-0.10.2/render/xhtml/files/css/zenburnesque.css
  69. +0 −101 vendor/ultraviolet-0.10.2/render/xhtml/idle.render
  70. +0 −107 vendor/ultraviolet-0.10.2/render/xhtml/iplastic.render
  71. +0 −104 vendor/ultraviolet-0.10.2/render/xhtml/lazy.render
  72. +0 −143 vendor/ultraviolet-0.10.2/render/xhtml/mac_classic.render
  73. +0 −125 vendor/ultraviolet-0.10.2/render/xhtml/magicwb_amiga.render
  74. +0 −212 vendor/ultraviolet-0.10.2/render/xhtml/pastels_on_dark.render
  75. +0 −131 vendor/ultraviolet-0.10.2/render/xhtml/slush_poppies.render
  76. +0 −89 vendor/ultraviolet-0.10.2/render/xhtml/spacecadet.render
  77. +0 −194 vendor/ultraviolet-0.10.2/render/xhtml/sunburst.render
  78. +0 −161 vendor/ultraviolet-0.10.2/render/xhtml/twilight.render
  79. +0 −134 vendor/ultraviolet-0.10.2/render/xhtml/zenburnesque.render
  80. +0 −97 vendor/ultraviolet-0.10.2/syntax/actionscript.syntax
  81. +0 −276 vendor/ultraviolet-0.10.2/syntax/active4d.syntax
  82. +0 −311 vendor/ultraviolet-0.10.2/syntax/active4d_html.syntax
  83. +0 −50 vendor/ultraviolet-0.10.2/syntax/active4d_ini.syntax
  84. +0 −21 vendor/ultraviolet-0.10.2/syntax/active4d_library.syntax
  85. +0 −33 vendor/ultraviolet-0.10.2/syntax/ada.syntax
  86. +0 −151 vendor/ultraviolet-0.10.2/syntax/antlr.syntax
  87. +0 −191 vendor/ultraviolet-0.10.2/syntax/apache.syntax
  88. +0 −384 vendor/ultraviolet-0.10.2/syntax/applescript.syntax
  89. +0 −70 vendor/ultraviolet-0.10.2/syntax/asp.syntax
  90. +0 −129 vendor/ultraviolet-0.10.2/syntax/asp_vb.net.syntax
  91. +0 −151 vendor/ultraviolet-0.10.2/syntax/bibtex.syntax
  92. +0 −41 vendor/ultraviolet-0.10.2/syntax/blog_html.syntax
  93. +0 −42 vendor/ultraviolet-0.10.2/syntax/blog_markdown.syntax
  94. +0 −27 vendor/ultraviolet-0.10.2/syntax/blog_text.syntax
  95. +0 −27 vendor/ultraviolet-0.10.2/syntax/blog_textile.syntax
  96. +0 −53 vendor/ultraviolet-0.10.2/syntax/build.syntax
  97. +0 −287 vendor/ultraviolet-0.10.2/syntax/bulletin_board.syntax
  98. +0 −109 vendor/ultraviolet-0.10.2/syntax/c++.syntax
  99. +0 −326 vendor/ultraviolet-0.10.2/syntax/c.syntax
  100. +0 −55 vendor/ultraviolet-0.10.2/syntax/cake.syntax
  101. +0 −36 vendor/ultraviolet-0.10.2/syntax/camlp4.syntax
  102. +0 −32 vendor/ultraviolet-0.10.2/syntax/cm.syntax
  103. +0 −119 vendor/ultraviolet-0.10.2/syntax/coldfusion.syntax
  104. +0 −176 vendor/ultraviolet-0.10.2/syntax/context_free.syntax
  105. +0 −59 vendor/ultraviolet-0.10.2/syntax/cs.syntax
  106. +0 −195 vendor/ultraviolet-0.10.2/syntax/css.syntax
  107. +0 −1,925 vendor/ultraviolet-0.10.2/syntax/css_experimental.syntax
  108. +0 −68 vendor/ultraviolet-0.10.2/syntax/csv.syntax
  109. +0 −142 vendor/ultraviolet-0.10.2/syntax/d.syntax
  110. +0 −81 vendor/ultraviolet-0.10.2/syntax/diff.syntax
  111. +0 −204 vendor/ultraviolet-0.10.2/syntax/dokuwiki.syntax
  112. +0 −47 vendor/ultraviolet-0.10.2/syntax/dot.syntax
  113. +0 −43 vendor/ultraviolet-0.10.2/syntax/doxygen.syntax
  114. +0 −62 vendor/ultraviolet-0.10.2/syntax/dylan.syntax
  115. +0 −78 vendor/ultraviolet-0.10.2/syntax/eiffel.syntax
  116. +0 −922 vendor/ultraviolet-0.10.2/syntax/erlang.syntax
  117. +0 −80 vendor/ultraviolet-0.10.2/syntax/f-script.syntax
  118. +0 −141 vendor/ultraviolet-0.10.2/syntax/fortran.syntax
  119. +0 −142 vendor/ultraviolet-0.10.2/syntax/fxscript.syntax
  120. +0 −34 vendor/ultraviolet-0.10.2/syntax/greasemonkey.syntax
  121. +0 −83 vendor/ultraviolet-0.10.2/syntax/gri.syntax
  122. +0 −191 vendor/ultraviolet-0.10.2/syntax/groovy.syntax
  123. +0 −22 vendor/ultraviolet-0.10.2/syntax/gtd.syntax
Sorry, we could not display the entire diff because it was too big.
View
2 .rvmrc
@@ -1 +1 @@
-rvm use 1.8.7-p352
+rvm use 1.9.2@rmtg
View
155 lib/rmthemegen.rb
@@ -1,3 +1,156 @@
# Your code goes here...
- require File.expand_path(__FILE__,"./../vendor/ultraviolet-0.10.2/lib/uv.rb")
require File.expand_path(__FILE__,"rmthemegen/rmthemegen_187.rb")
+ require 'uv'
+ require 'uv/utility'
+ require 'plist'
+
+ module Uv
+
+ def Uv.syntaxes_hash
+ Uv.init_syntaxes unless @syntaxes
+ @syntaxes
+ end
+
+ def Uv.css_string(css,code_name)
+ #input: a hash of css selectors=>styles
+ #output :usable css
+ # added by david heitzman
+ outs='<style type="text/css">'
+ css.each do |key, values|
+ if key == code_name
+ outs += "#{code_name} {"
+ else
+ outs += "#{code_name} #{key} {"
+ end
+ values.each do |style, value|
+ outs += " #{style}: #{value};" if value
+ end
+ outs += "} "
+ end
+ outs += "</style>"
+ end
+
+
+ def Uv.get_render_and_css(tm_theme)
+ # input: a string that a .tmTheme after being read with Plist::parse_xml
+ # output: [{a hash containing the render data structure },{ a hash containing the css string }]
+ # added by david heitzman
+
+ settings = tm_theme["settings"].find { |s| ! s["name"] }["settings"]
+
+ render = {"name" => tm_theme["name"]}
+ css = {}
+
+ standard_name = tm_theme["name"]
+ code_name = "pre.#{standard_name}"
+
+ render["tags"] = []
+ count_names = {}
+ tm_theme["settings"].each do |t|
+ if t["scope"]
+ class_name = t["name"].downcase.gsub(/\W/, ' ').gsub('.tmtheme', '').split(' ').collect{|s| s.capitalize}.join
+ if class_name == ""
+ class_name = "x" * t["name"].size
+ end
+
+ if count_names[class_name]
+ tname = class_name
+ class_name = "#{class_name}#{count_names[class_name]}"
+ count_names[tname] += count_names[tname] + 1
+ else
+ count_names[class_name] = 1
+ end
+
+ tag = {}
+ tag["selector"] = t["scope"]
+ tag["begin"] = "<span class=\"#{class_name}\">"
+ tag["end"] = "</span>"
+ render["tags"] << tag
+
+ if s = t["settings"]
+ style = {}
+ style["color"] = Uv.normalize_color(settings, s["foreground"], true)
+ style["background-color"] = Uv.normalize_color(settings, s["background"])
+ case s["fontStyle"]
+ when /bold/ then style["font-weight"] = "bold"
+ when /italic/ then style["font-style"] = "italic"
+ when /underline/ then style["text-decoration"] = "underline"
+ end
+ css[".#{class_name}"] = style
+ end
+ elsif ! t["name"]
+ if s = t["settings"]
+ style = {}
+ style["color"] = Uv.normalize_color(settings, s["foreground"], true)
+ style["background-color"] = Uv.alpha_blend(s["background"], s["background"])
+ css[code_name] = style
+ @style = style
+ style = {}
+ style["background-color"] = Uv.alpha_blend(s["selection"], s["selection"])
+ style["color"] = Uv.foreground( style["background-color"] )
+ css[".line-numbers"] = style
+
+ tag = {}
+ tag["begin"] = "<span class=\"line-numbers\">"
+ tag["end"] = "</span>"
+ render["line-numbers"] = tag
+ end
+ end
+ end
+
+ render["filter"] = "CGI.escapeHTML( @escaped )"
+
+ tag = {}
+ tag["begin"] = ""
+ tag["end"] = ""
+ render["line"] = tag
+
+
+ tag = {}
+ tag["begin"] = "<pre class=\"#{standard_name}\">"
+ tag["end"] = "</pre>"
+ render["listing"] = tag
+
+ tag = {}
+ tag["begin"] = ''
+
+ tag["end"] = ''
+
+ render["document"] = tag
+ return [render,css_string(css, code_name)]
+ end
+
+
+ def Uv.tmtheme_to_html(tm_theme,code_to_render, options)
+
+ #input: tm_theme - a string containing an xml representation of a textmate theme in plist format
+ #input: code_to_render - the code (ruby, php, python, c etc.) you want rendered as html
+ #input: options - a hash containing options such as line numbers, etc :line_numbers => false, :render_style => "classic", :headers => false, :code_type=>nil
+ # They are the same options you can give to Uv.parse
+ #output : [<css string>,<html string>]
+
+ opts = {:line_numbers => false, :render_style => "classic", :headers => false}.merge options
+ out = ""
+ begin
+ # Uv::init_syntaxes
+ syn=( Uv.syntax_node_for opts[:code_type].to_s )
+
+ processor = Textpow::DebugProcessor.new
+ syn.parse( tm_theme , processor )
+ render_str = Uv::get_render_and_css( Plist::parse_xml(tm_theme) )
+ render_processor = Uv::RenderProcessor.new( render_str.first, line_numbers=opts[:line_numbers], headers=opts[:headers] )
+ syn.parse( code_to_render, render_processor )
+ # RenderProcessor.load('xhtml', opts[:render_style], opts[:line_numbers], opts[:headers]) do |processor|
+ # syntax_node_for(opts[:code_type]).parse(code_to_parse, processor)
+ # end.string
+
+ out=[render_str.last, render_processor.string]
+ # out=[render_str.last, RenderProcessor.load('xhtml', opts[:render_style], opts[:line_numbers], opts[:headers]) do |processor|
+ # syntax_node_for(opts[:code_type]).parse(code_to_parse, processor)
+ # end.string]
+ rescue Exception=>e
+ out=['<style type="text/css"></style>',e.inspect,'<p>Error in tm_theme_to_html.</>']
+ end
+ out
+ end
+end
View
2 lib/rmthemegen/version.rb
@@ -1,3 +1,3 @@
module Rmthemegen
- VERSION = "0.0.38"
+ VERSION = "0.0.47"
end
View
10 rmthemegen.gemspec
@@ -15,11 +15,11 @@ Gem::Specification.new do |s|
s.required_ruby_version = '>= 1.8.7'
- s.add_dependency('xml-simple', ">= 1.0.15")
- s.add_dependency('color',">=1.4.1")
- s.add_dependency('textpow',"0.10.1")
- s.add_dependency('plist',"3.1.0")
- s.add_dependency('ultraviolet',"0.10.2")
+ s.add_dependency('xml-simple', "1.0.15")
+ s.add_dependency('color',"1.4.1")
+ s.add_dependency('textpow19')
+ s.add_dependency('plist')
+ s.add_dependency('ultraviolet1x')
s.add_dependency('rake')
s.bindir = "bin"
View
7 test/create_syntax.rb
@@ -1,10 +1,7 @@
require 'rubygems'
require 'textpow'
-
- require File.expand_path("../../vendor/ultraviolet-0.10.2/lib/uv.rb",__FILE__)
-
-# require 'uv'
-
+require 'uv'
+require File.expand_path('../../lib/rmthemegen.rb',__FILE__)
# Uv::init_syntaxes
# Uv::syntaxes_hash['ruby'].inspect
View
25 vendor/ultraviolet-0.10.2/History.txt
@@ -1,25 +0,0 @@
-== 0.10.2
-* Fixed --no-lines command line option.
-* Updated PHP syntax, no longer stalling.
-
-== 0.10.1 / 2007-06-15
-* Corrected line-number schemes in theme2xhtmlrender
-* Corrected alpha blending code in theme2xhtmlrender, Now the brilliance themes seem to work!
-* Modified html_processor to include whole syntax scopes.
-* Add index for duplicated setting names in tmTheme files.
-* Multiple fixes for latex, color boxes have now the right color and size.
-
-== 0.10.0 / 2007-05-15
-* Added copy files commant to Uv module and to command line utility.
- now the required files (ex. css) may be easily copied to a destination
- directory.
-* Small corrections in html_processor (should change name)
-* Many modifications to latex rendering
-* First latex rendering implementation (still buggy).
-* All processing is defined in render files.
-
-== 0.9.0 / 2007-04-24
-
-* 1 major enhancement
- * Birthday!
-
View
233 vendor/ultraviolet-0.10.2/Manifest.txt
@@ -1,233 +0,0 @@
-test/test_uv.rb
-lib/uv/render_processor.rb
-lib/uv/utility.rb
-lib/uv.rb
-bin/theme2xhtmlrender
-bin/theme2latexrender
-bin/uv
-History.txt
-Rakefile
-Manifest.txt
-README.txt
-render/xhtml/files/css/idle.css
-render/xhtml/files/css/lazy.css
-render/xhtml/files/css/espresso_libre.css
-render/xhtml/files/css/blackboard.css
-render/xhtml/files/css/brilliance_dull.css
-render/xhtml/files/css/sunburst.css
-render/xhtml/files/css/amy.css
-render/xhtml/files/css/zenburnesque.css
-render/xhtml/files/css/magicwb_amiga.css
-render/xhtml/files/css/dawn.css
-render/xhtml/files/css/eiffel.css
-render/xhtml/files/css/twilight.css
-render/xhtml/files/css/spacecadet.css
-render/xhtml/files/css/brilliance_black.css
-render/xhtml/files/css/mac_classic.css
-render/xhtml/files/css/active4d.css
-render/xhtml/files/css/slush_poppies.css
-render/xhtml/files/css/cobalt.css
-render/xhtml/files/css/iplastic.css
-render/xhtml/files/css/all_hallows_eve.css
-render/xhtml/files/css/pastels_on_dark.css
-render/xhtml/idle.render
-render/xhtml/lazy.render
-render/xhtml/espresso_libre.render
-render/xhtml/blackboard.render
-render/xhtml/brilliance_dull.render
-render/xhtml/sunburst.render
-render/xhtml/amy.render
-render/xhtml/zenburnesque.render
-render/xhtml/magicwb_amiga.render
-render/xhtml/dawn.render
-render/xhtml/eiffel.render
-render/xhtml/twilight.render
-render/xhtml/spacecadet.render
-render/xhtml/brilliance_black.render
-render/xhtml/mac_classic.render
-render/xhtml/active4d.render
-render/xhtml/slush_poppies.render
-render/xhtml/cobalt.render
-render/xhtml/iplastic.render
-render/xhtml/all_hallows_eve.render
-render/xhtml/pastels_on_dark.render
-render/latex/mac_classic.render
-render/latex/active4d.render
-render/latex/cobalt.render
-render/latex/magicwb_amiga.render
-render/latex/pastels_on_dark.render
-render/latex/iplastic.render
-render/latex/idle.render
-render/latex/lazy.render
-render/latex/espresso_libre.render
-render/latex/brilliance_dull.render
-render/latex/blackboard.render
-render/latex/sunburst.render
-render/latex/amy.render
-render/latex/zenburnesque.render
-render/latex/dawn.render
-render/latex/eiffel.render
-render/latex/twilight.render
-render/latex/spacecadet.render
-render/latex/slush_poppies.render
-render/latex/brilliance_black.render
-render/latex/all_hallows_eve.render
-render/old/txt2tags.render
-syntax/logo.syntax
-syntax/dylan.syntax
-syntax/latex_log.syntax
-syntax/textile.syntax
-syntax/build.syntax
-syntax/latex_memoir.syntax
-syntax/lexflex.syntax
-syntax/lisp.syntax
-syntax/gtd.syntax
-syntax/m.syntax
-syntax/ocaml.syntax
-syntax/d.syntax
-syntax/cm.syntax
-syntax/ocamlyacc.syntax
-syntax/opengl.syntax
-syntax/pascal.syntax
-syntax/lua.syntax
-syntax/active4d.syntax
-syntax/mel.syntax
-syntax/r.syntax
-syntax/r_console.syntax
-syntax/smarty.syntax
-syntax/latex.syntax
-syntax/prolog.syntax
-syntax/rez.syntax
-syntax/asp.syntax
-syntax/xhtml_1.0.syntax
-syntax/icalendar.syntax
-syntax/mootools.syntax
-syntax/scheme.syntax
-syntax/xml.syntax
-syntax/mail.syntax
-syntax/swig.syntax
-syntax/slate.syntax
-syntax/sweave.syntax
-syntax/qmake_project.syntax
-syntax/release_notes.syntax
-syntax/html_tcl.syntax
-syntax/html.syntax
-syntax/c.syntax
-syntax/pmwiki.syntax
-syntax/ruby.syntax
-syntax/csv.syntax
-syntax/ruby_on_rails.syntax
-syntax/xsl.syntax
-syntax/yaml.syntax
-syntax/io.syntax
-syntax/java.syntax
-syntax/gri.syntax
-syntax/movable_type.syntax
-syntax/cs.syntax
-syntax/css.syntax
-syntax/c++.syntax
-syntax/haml.syntax
-syntax/dot.syntax
-syntax/tsv.syntax
-syntax/ruby_experimental.syntax
-syntax/man.syntax
-syntax/bibtex.syntax
-syntax/objective-c.syntax
-syntax/subversion_commit_message.syntax
-syntax/ocamllex.syntax
-syntax/tcl.syntax
-syntax/tex.syntax
-syntax/ragel.syntax
-syntax/shell-unix-generic.syntax
-syntax/inform.syntax
-syntax/sql.syntax
-syntax/python.syntax
-syntax/modula-3.syntax
-syntax/cake.syntax
-syntax/logtalk.syntax
-syntax/ini.syntax
-syntax/diff.syntax
-syntax/fortran.syntax
-syntax/txt2tags.syntax
-syntax/s5.syntax
-syntax/scilab.syntax
-syntax/mips.syntax
-syntax/twiki.syntax
-syntax/perl.syntax
-syntax/fxscript.syntax
-syntax/markdown.syntax
-syntax/lilypond.syntax
-syntax/blog_html.syntax
-syntax/html_mason.syntax
-syntax/jquery_javascript.syntax
-syntax/json.syntax
-syntax/languagedefinition.syntax
-syntax/tex_math.syntax
-syntax/xml_strict.syntax
-syntax/php.syntax
-syntax/doxygen.syntax
-syntax/strings_file.syntax
-syntax/makefile.syntax
-syntax/setext.syntax
-syntax/ada.syntax
-syntax/active4d_ini.syntax
-syntax/active4d_library.syntax
-syntax/antlr.syntax
-syntax/javascript_+_prototype.syntax
-syntax/lighttpd.syntax
-syntax/template_toolkit.syntax
-syntax/sql_rails.syntax
-syntax/ssh-config.syntax
-syntax/mediawiki.syntax
-syntax/moinmoin.syntax
-syntax/javascript.syntax
-syntax/quake3_config.syntax
-syntax/qt_c++.syntax
-syntax/camlp4.syntax
-syntax/multimarkdown.syntax
-syntax/blog_text.syntax
-syntax/blog_textile.syntax
-syntax/bulletin_board.syntax
-syntax/groovy.syntax
-syntax/gtdalt.syntax
-syntax/regular_expressions_python.syntax
-syntax/latex_beamer.syntax
-syntax/remind.syntax
-syntax/regexp.syntax
-syntax/rd_r_documentation.syntax
-syntax/standard_ml.syntax
-syntax/literate_haskell.syntax
-syntax/python_django.syntax
-syntax/restructuredtext.syntax
-syntax/mod_perl.syntax
-syntax/coldfusion.syntax
-syntax/installer_distribution_script.syntax
-syntax/vectorscript.syntax
-syntax/macports_portfile.syntax
-syntax/yui_javascript.syntax
-syntax/actionscript.syntax
-syntax/active4d_html.syntax
-syntax/apache.syntax
-syntax/applescript.syntax
-syntax/asp_vb.net.syntax
-syntax/blog_markdown.syntax
-syntax/context_free.syntax
-syntax/css_experimental.syntax
-syntax/dokuwiki.syntax
-syntax/eiffel.syntax
-syntax/erlang.syntax
-syntax/f-script.syntax
-syntax/haskell.syntax
-syntax/greasemonkey.syntax
-syntax/html-asp.syntax
-syntax/html_django.syntax
-syntax/html_for_asp.net.syntax
-syntax/html_rails.syntax
-syntax/javaproperties.syntax
-syntax/javascript_+_prototype_bracketed.syntax
-syntax/objective-c++.syntax
-syntax/plain_text.syntax
-syntax/postscript.syntax
-syntax/processing.syntax
-syntax/property_list.syntax
-syntax/regular_expressions_oniguruma.syntax
View
52 vendor/ultraviolet-0.10.2/README.txt
@@ -1,52 +0,0 @@
-== Ultraviolet
-
-Ultraviolet is a syntax highlighting library and engine. It
-uses TextMate[http://macromates.com/] syntax files and parses
-them using the Textpow[http://textpow.rubyforge.org] library. It
-supports more than 60 programming languages out of the box.
-
-== SYNTAX
-
-
-== REQUIREMENTS:
-
-* Oniguruma for Ruby[http://oniguruma.rubyforge.org] v1.1.0 or higher.
-* Textpow[http://textpow.rubyforge.org] v0.9.0 or higher.
-
-== INSTALL:
-
-sudo gem install -r markray
-
-== BUGS/PROBLEMS/INCOMPATIBILITIES:
-
-
-== TODO:
-
-
-== CREDITS:
-
-
-== LICENSE:
-
-(The MIT License)
-
-Copyright (c) 2007 FIX
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
51 vendor/ultraviolet-0.10.2/Rakefile
@@ -1,51 +0,0 @@
-require 'rubygems'
-require 'fileutils'
-
-rubyforge_name = "ultraviolet"
-
-begin
- require 'hoe'
-
- class Hoe
- # Dirty hack to eliminate Hoe from gem dependencies
- def extra_deps
- @extra_deps.delete_if{ |x| x.first == 'hoe' }
- end
- end
-
- version = /^== *(\d+\.\d+\.\d+)/.match( File.read( 'History.txt' ) )[1]
-
- h = Hoe.new('ultraviolet', version) do |p|
- p.rubyforge_name = 'ultraviolet'
- p.author = ['Dizan Vasquez']
- p.email = ['dichodaemon@gmail.com']
- p.email = 'dichodaemon@gmail.com'
- p.summary = 'Syntax highlighting engine'
- p.description = p.paragraphs_of('README.txt', 1 ).join('\n\n')
- p.url = 'http://ultraviolet.rubyforge.org'
- p.rdoc_pattern = /^(lib|bin|ext)|txt$/
- p.changes = p.paragraphs_of('History.txt', 0).join("\n\n")
- p.extra_deps << ['textpow', '>= 0.10.0']
- p.clean_globs = ["manual/*"]
- end
-
- desc 'Create MaMa documentation'
- task :mama => :clean do
- system "mm -c -t refresh -o manual mm/manual.mm"
- end
-
- desc 'Publish MaMa documentation to RubyForge'
- task :mama_publish => [:clean, :mama] do
- config = YAML.load(File.read(File.expand_path("~/.rubyforge/user-config.yml")))
- host = "#{config["username"]}@rubyforge.org"
- remote_dir = "/var/www/gforge-projects/#{h.rubyforge_name}"
- local_dir = 'manual'
- system "rsync -av --delete #{local_dir}/ #{host}:#{remote_dir}"
- end
-
-rescue LoadError => e
- desc 'Run the test suite.'
- task :test do
- system "ruby -Ibin:lib:test test_#{rubyforge_name}.rb"
- end
-end
View
122 vendor/ultraviolet-0.10.2/bin/theme2latexrender
@@ -1,122 +0,0 @@
-#! /usr/bin/env ruby
-begin
- require 'plist'
-rescue LoadError
- require 'rubygems'
- require 'plist'
-end
-require 'uv/utility'
-
-base_dir = File.join( File.dirname(__FILE__), '..', 'render' )
-
-def settings
- unless @settings
- @settings = @theme["settings"].find { |s| ! s["name"] }["settings"]
- end
- @settings
-end
-
-@theme = Plist::parse_xml( ARGV[0] )
-render = {"name" => @theme["name"]}
-codecolumn = ""
-numbercolumn = ""
-standard_name = File.basename( ARGV[0] ).downcase.gsub(/\s+/, '_').gsub('.tmtheme', '').gsub(/\W/, '').gsub(/_+/, '_')
-
-render["tags"] = []
-
-@theme["settings"].each do |t|
- if t["scope"]
- class_name = t["name"].downcase.gsub(/\W/, ' ').gsub('.tmtheme', '').split(' ').collect{|s| s.capitalize}.join
- if class_name == ""
- class_name = "x" * t["name"].size
- end
-
- tag = {}
- tag["selector"] = t["scope"]
- render["tags"] << tag
-
- begin_string = ""
- pcount = 0
- if s = t["settings"]
- if s["background"]
- begin_string << "\\setlength{\\fboxsep}{0ex}\\colorbox[HTML]{#{Uv.normalize_color(settings, s["background"])[1..-1]}}{\\rule[-0.5ex]{0pt}{2.0ex}"
- else
- begin_string << "{"
- end
- pcount += 1
- if s["foreground"]
- begin_string << "\\color[HTML]{#{Uv.normalize_color(settings, s["foreground"], true)[1..-1]}}"
- end
- case s["fontStyle"]
- when /bold/
- begin_string << "\\textbf{"
- pcount += 1
- when /italic/
- begin_string << "\\textit{"
- pcount += 1
- when /underline/
- begin_string << "\\underline{"
- pcount += 1
- end
- tag["begin"] = begin_string
- tag["end"] = "}" * pcount
- end
-
-
- elsif ! t["name"]
- if s = t["settings"]
- codecolumn = "\\newcolumntype{C}{>{"
- codecolumn << "\\color[HTML]{#{Uv.normalize_color(settings, s["foreground"], true)[1..-1]}}" if s["foreground"]
- codecolumn << "\\columncolor[HTML]{#{Uv.alpha_blend(s["background"], s["background"])[1..-1]}}" if s["background"]
- codecolumn << "}l}"
- bg = Uv.alpha_blend(s["selection"], s["selection"]) if s["selection"]
- numbercolumn = "\\newcolumntype{N}{>{"
- numbercolumn << "\\color[HTML]{#{Uv.foreground(bg)[1..-1]}}" if bg
- numbercolumn << "\\columncolor[HTML]{#{bg[1..-1]}}" if s["selection"]
- numbercolumn << "}l}"
-
- tag = {}
- tag["begin"] = "\\texttt{"
- tag["end"] = "}&\\mbox{\\texttt{"
- render["line-numbers"] = tag end
- end
-end
-
-render["filter"] = '@escaped.gsub(/(\$)/, \'\\\\\\\\\1\').gsub(/\\\\(?!\$)/, \'$\\\\\\\\backslash$\').gsub(/(_|\{|\}|&|\#|%)/, \'\\\\\\\\\1\').gsub(/~/, \'\\\\textasciitilde \').gsub(/ /,\'\\\\hspace{1ex}\').gsub(/\t| /,\'\\\\hspace{3ex}\').gsub(/\"/, "\'\'").gsub(/(\^)/,\'\\\\\\\\\1{}\')'
-
-tag = {}
-tag["begin"] = ""
-tag["end"] = "}}\\\\"
-render["line"] = tag
-
-tag = {}
-tag["begin"] = <<END
-#{codecolumn}
-#{numbercolumn}
-\\begin{longtable}{NC}
-END
-
-tag["end"] = <<END
-\\end{longtable}
-END
-render["listing"] = tag
-
-tag = {}
-tag["begin"] = <<END
-\\documentclass[a4paper,landscape]{article}
-\\usepackage{xcolor}
-\\usepackage{colortbl}
-\\usepackage{longtable}
-\\usepackage[left=2cm,top=1cm,right=3cm,nohead,nofoot]{geometry}
-\\usepackage[T1]{fontenc}
-\\usepackage[scaled]{beramono}
-\\begin{document}
-END
-
-tag["end"] = <<END
-\\end{document}
-END
-
-render["document"] = tag
-
-File.open( File.join( base_dir, "latex", "#{standard_name}.render" ), "w" ) {|f| YAML.dump( render, f ) }
View
156 vendor/ultraviolet-0.10.2/bin/theme2xhtmlrender
@@ -1,156 +0,0 @@
-#! /usr/bin/env ruby
-begin
- require 'plist'
-rescue LoadError
- require 'rubygems'
- require 'plist'
-end
-require 'uv/utility'
-
-base_dir = File.join( File.dirname(__FILE__), '..', 'render' )
-
-
-def settings
- unless @settings
- @settings = @theme["settings"].find { |s| ! s["name"] }["settings"]
- end
- @settings
-end
-
-puts "Processing #{ARGV[0]}"
-
-@theme = Plist::parse_xml( ARGV[0] )
-render = {"name" => @theme["name"]}
-css = {}
-
-standard_name = File.basename( ARGV[0] ).downcase.gsub(/\s+/, '_').gsub('.tmtheme', '').gsub(/\W/, '').gsub(/_+/, '_')
-code_name = "pre.#{standard_name}"
-
-render["tags"] = []
-count_names = {}
-@theme["settings"].each do |t|
- if t["scope"]
- class_name = t["name"].downcase.gsub(/\W/, ' ').gsub('.tmtheme', '').split(' ').collect{|s| s.capitalize}.join
- if class_name == ""
- class_name = "x" * t["name"].size
- end
-
- if count_names[class_name]
- tname = class_name
- class_name = "#{class_name}#{count_names[class_name]}"
- count_names[tname] += count_names[tname] + 1
- else
- count_names[class_name] = 1
- end
-
- tag = {}
- tag["selector"] = t["scope"]
- tag["begin"] = "<span class=\"#{class_name}\">"
- tag["end"] = "</span>"
- render["tags"] << tag
-
- if s = t["settings"]
- style = {}
- style["color"] = Uv.normalize_color(settings, s["foreground"], true)
- style["background-color"] = Uv.normalize_color(settings, s["background"])
- case s["fontStyle"]
- when /bold/ then style["font-weight"] = "bold"
- when /italic/ then style["font-style"] = "italic"
- when /underline/ then style["text-decoration"] = "underline"
- end
- css[".#{class_name}"] = style
- end
- elsif ! t["name"]
- if s = t["settings"]
- style = {}
- style["color"] = Uv.normalize_color(settings, s["foreground"], true)
- style["background-color"] = Uv.alpha_blend(s["background"], s["background"])
- css[code_name] = style
- @style = style
- style = {}
- style["background-color"] = Uv.alpha_blend(s["selection"], s["selection"])
- style["color"] = Uv.foreground( style["background-color"] )
- css[".line-numbers"] = style
-
- tag = {}
- tag["begin"] = "<span class=\"line-numbers\">"
- tag["end"] = "</span>"
- render["line-numbers"] = tag
- end
- end
-end
-
-render["filter"] = "CGI.escapeHTML( @escaped )"
-
-tag = {}
-tag["begin"] = ""
-tag["end"] = ""
-render["line"] = tag
-
-
-tag = {}
-tag["begin"] = "<pre class=\"#{standard_name}\">"
-tag["end"] = "</pre>"
-render["listing"] = tag
-
-tag = {}
-tag["begin"] = <<END
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
-
-<head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
- <meta http-equiv="cache-control" content="no-cache" />
- <meta http-equiv="expires" content="3600" />
- <meta name="revisit-after" content="2 days" />
- <meta name="robots" content="index,follow" />
- <meta name="publisher" content="Dichodaemon" />
- <meta name="copyright" content="Dichodaemon" />
-
- <meta name="author" content="Dichodaemon" />
- <meta name="distribution" content="global" />
- <meta name="description" content="Ocatarinetabellachithchix" />
- <meta name="keywords" content="arzaversperia flexilimosos toves" />
- <link rel="stylesheet" type="text/css" media="screen,projection,print" href="css/#{standard_name}.css" />
- <title>#{standard_name}</title>
-
-</head>
-
-<body>
-END
-
-tag["end"] = <<END
- <p>
- <a href="http://validator.w3.org/check?uri=referer">
- <img style="border:0"
- src="http://www.w3.org/Icons/valid-xhtml10"
- alt="Valid XHTML 1.0 Strict" height="31" width="88" />
- </a>
- <a href="http://jigsaw.w3.org/css-validator/check?uri=referer">
- <img style="border:0;width:88px;height:31px"
- src="http://jigsaw.w3.org/css-validator/images/vcss"
- alt="Valid CSS!" />
- </a>
- </p>
-</body>
-</html>
-END
-
-render["document"] = tag
-
-File.open( File.join( base_dir, "xhtml", "#{standard_name}.render" ), "w" ) {|f| YAML.dump( render, f ) }
-
-File.open( File.join( base_dir, "xhtml", "files", "css", "#{standard_name}.css" ), "w" ) do |f|
- css.each do |key, values|
- if key == code_name
- f.puts "#{code_name} {"
- #puts @style
- else
- f.puts "#{code_name} #{key} {"
- end
- values.each do |style, value|
- f.puts " #{style}: #{value};" if value
- end
- f.puts "}"
- end
-end
View
140 vendor/ultraviolet-0.10.2/bin/uv
@@ -1,140 +0,0 @@
-#!/usr/bin/env ruby
-
-begin
- require 'rubygems'
- require 'uv'
-rescue LoadError
- $:.unshift File.join( File.dirname(__FILE__), '..', 'lib' )
- require 'uv'
-end
-
-require 'optparse'
-require 'ostruct'
-
-o = OpenStruct.new
-o.copy_files = false
-o.output = "xhtml"
-o.headers = false
-o.theme = "espresso_libre"
-o.lines = true
-
-options = OptionParser.new
-
-options.banner =<<END
-
-Usage: uv [options] input_file
-
-Parses input_file (or stdin, if no input_file is given) and
-outputs the coresponding HTML to stdout. If no syntax is specified,
-it tries to guess the best one. If no theme is specified, defaults
-to espresso_libre.
-
-Example:
-
- uv -t amy -h ~/.bashrc > bashrc.html
-
- Renders the contents of ~/.bashrc to file bashrc.html
- as a standalone web page.
-
-All options are non-mandatory
-
-Options:
-
-END
-
-options.on( "-c DIR", "--copy-files DIR", <<DESCRIPTION ) {|val| o.copy_files = val}
-Copy the required files to the specified output directory (css, images, etc).
-DESCRIPTION
-
-options.on( "-s SYNTAX", "--syntax SYNTAX", <<DESCRIPTION, Uv.syntaxes) {|val| o.syntax = val}
-The file's syntax (e.g. ruby, c++, etc.)
-DESCRIPTION
-
-options.on( "-o OUTPUT", "--output OUTPUT", <<DESCRIPTION) {|val| o.output = val}
-The output format (xhtml, latex, etc.) default to xhtml
-DESCRIPTION
-
-options.on( "-t THEME", "--theme THEME", <<DESCRIPTION, Uv.themes) {|val| o.theme = val}
-The theme to be used (e.g. amy, espresso_libre, etc.)
-DESCRIPTION
-
-options.on( "-n", "--no-lines", <<DESCRIPTION ) {|val| o.lines = false}
-Produces output without line numbers
-DESCRIPTION
-
-
-options.on( "-h", "--headers", <<DESCRIPTION ) {|val| o.headers = val}
-Include headers, outputs a self-contained web page/document
-DESCRIPTION
-
-options.on( "-d", "--debug", <<DESCRIPTION ) {|val| o.debug = val}
-Outputs debug information instead of normal page rendering
-DESCRIPTION
-
-options.on( "-l [syntaxes|themes]", "--list [syntaxes|themes]", ['syntaxes', 'themes'], <<DESCRIPTION ) {|val| o.list = val}
-Lists all the available syntaxes/themes
-DESCRIPTION
-
-
-options.on( "-?", "--help", <<DESCRIPTION ) {|val| o.help = val}
-Show this message
-DESCRIPTION
-
-rest = options.parse( ARGV )
-
-
-if o.help
- puts options
- exit
-elsif o.list
- if o.list == 'syntaxes'
- puts "Available syntaxes:\n"
- Uv.syntaxes.sort.each{ |s| puts " - #{s}"}
- elsif o.list == 'themes'
- puts "Available themes:\n"
- Uv.themes.sort.each{ |t| puts " - #{t}"}
- else
- STDERR.puts "Option #{o.list} is not valid should be one of [syntaxes, themes]"
- end
- exit
-end
-
-if o.copy_files
- unless File.exists?(o.copy_files)
- STDERR.puts "The specified output directory: #{o.copy_files} does not exist."
- exit -1
- end
- Uv.copy_files o.output, o.copy_files
-end
-
-o.filename = rest[0]
-
-if o.filename && ! o.syntax
- candidates = Uv.syntax_for_file o.filename
- if candidates.size > 1
- STDERR.puts "Many syntaxes match, please specify"
- STDERR.puts "\nMatching syntaxes:"
- candidates.sort.each { |name, syntax| STDERR.puts "\t - " + name}
- exit -1
- end
- o.syntax = candidates.first.first unless candidates.size == 0
-end
-
-unless o.syntax
- STDERR.puts "No default syntax found, please specify"
- exit -1
-end
-
-if o.filename
- o.text = File.read(o.filename)
-else
- o.text = STDIN
-end
-
-if o.debug
- Uv.debug( o.text, o.syntax )
- exit
-end
-
-puts Uv.parse( o.text, o.output, o.syntax, o.lines, o.theme, o.headers )
-
View
94 vendor/ultraviolet-0.10.2/lib/uv.rb
@@ -1,94 +0,0 @@
-require 'fileutils'
-require 'textpow'
-require File.expand_path('../uv/render_processor.rb',__FILE__)
-require File.expand_path('../uv/utility.rb',__FILE__)
-
-module Uv
-
- def Uv.syntaxes_hash
- Uv.init_syntaxes unless @syntaxes
- @syntaxes
- end
-
- def Uv.path
- result = []
- result << File.join(File.dirname(__FILE__), ".." )
- end
-
- def Uv.copy_files output, output_dir
- Uv.path.each do |dir|
- dir_name = File.join( dir, "render", output, "files" )
- FileUtils.cp_r( Dir.glob(File.join( dir_name, "." )), output_dir ) if File.exists?( dir_name )
- end
- end
-
- def Uv.init_syntaxes
- @syntaxes = {}
- Dir.glob( File.join(File.dirname(__FILE__), '..', 'syntax', '*.syntax') ).each do |f|
- @syntaxes[File.basename(f, '.syntax')] = Textpow::SyntaxNode.load( f )
- end
- end
-
- def Uv.syntaxes
- Dir.glob( File.join(File.dirname(__FILE__), '..', 'syntax', '*.syntax') ).collect do |f|
- File.basename(f, '.syntax')
- end
- end
-
- def Uv.themes
- Dir.glob( File.join(File.dirname(__FILE__), '..', 'render', 'xhtml', 'files', 'css', '*.css') ).collect do |f|
- File.basename(f, '.css')
- end
- end
-
- def Uv.syntax_for_file file_name
- init_syntaxes unless @syntaxes
- first_line = ""
- File.open( file_name, 'r' ) { |f|
- while (first_line = f.readline).strip.size == 0; end
- }
- result = []
- @syntaxes.each do |key, value|
- assigned = false
- if value.fileTypes
- value.fileTypes.each do |t|
- if t == File.basename( file_name ) || t == File.extname( file_name )[1..-1]
- result << [key, value]
- assigned = true
- break
- end
- end
- end
- unless assigned
- if value.firstLineMatch && value.firstLineMatch =~ first_line
- result << [key, value]
- end
- end
- end
- result
- end
-
- def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic", headers = false
- init_syntaxes unless @syntaxes
- renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
- raise( ArgumentError, "Output for #{output} is not yet implemented" ) unless File.exists?(renderer)
- css_class = render_style
- render_options = YAML.load( File.open( renderer ) )
- render_processor = RenderProcessor.new( render_options, line_numbers, headers )
- @syntaxes[syntax_name].parse( text, render_processor )
- render_processor.string
- end
-
- def Uv.debug text, syntax_name
- unless @syntaxes
- @syntaxes = {}
- Dir.glob( File.join(File.dirname(__FILE__), '..', 'syntax', '*.syntax') ).each do |f|
- @syntaxes[File.basename(f, '.syntax')] = Textpow::SyntaxNode.load( f )
- end
- end
- processor = Textpow::DebugProcessor.new
-
- @syntaxes[syntax_name].parse( text, processor )
- end
-
-end
View
131 vendor/ultraviolet-0.10.2/lib/uv/render_processor.rb
@@ -1,131 +0,0 @@
-require 'cgi'
-
-module Uv
-
-
- class RenderProcessor
- @@score_manager = Textpow::ScoreManager.new
-
- attr_reader :string
- attr_accessor :escapeHTML
-
- def initialize render_options, line_numbers = false, headers = true, score_manager = nil
- @score_manager = score_manager || @@score_manager
- @render_options = render_options
- @options = {}
- @headers = headers
- @line_numbers = line_numbers
- @escapeHTML = true
- end
-
- def start_parsing name
- @stack = [name]
- @string = ""
- @line = nil
- @line_number = 0
- print @render_options["document"]["begin"] if @headers
- print @render_options["listing"]["begin"]
-# opt = options @stack
-# print opt["begin"] if opt
- end
-
- def print string
- @string << string
- end
-
- def escape string
- if @render_options["filter"]
- @escaped = string
- @escaped = self.instance_eval( @render_options["filter"] )
- @escaped
- else
- string
- end
- end
-
- def open_tag name, position
- @stack << name
- print escape(@line[@position...position].gsub(/\n|\r/, '')) if position > @position
- @position = position
- opt = options @stack
- print opt["begin"] if opt
- end
-
- def close_tag name, position
- print escape(@line[@position...position].gsub(/\n|\r/, '')) if position > @position
- @position = position
- opt = options @stack
- print opt["end"] if opt
- @stack.pop
- end
-
- def close_line
- stack = @stack[0..-1]
- while stack.size > 1
- opt = options stack
- print opt["end"] if opt
- stack.pop
- end
- end
-
- def open_line
- stack = [@stack.first]
- clone = @stack[1..-1]
- while stack.size < @stack.size
- stack << clone.shift
- opt = options stack
- print opt["begin"] if opt
- end
- end
-
- def new_line line
- if @line
- print escape(@line[@position..-1].gsub(/\n|\r/, ''))
- close_line
- print @render_options["line"]["end"]
- print "\n"
- end
- @position = 0
- @line_number += 1
- @line = line
- print @render_options["line"]["begin"]
- if @line_numbers
- print @render_options["line-numbers"]["begin"]
- print @line_number.to_s.rjust(4).ljust(5)
- print @render_options["line-numbers"]["end"]
- print " "
- end
- open_line
- end
-
- def end_parsing name
- if @line
- print escape(@line[@position..-1].gsub(/\n|\r/, ''))
- while @stack.size > 1
- opt = options @stack
- print opt["end"] if opt
- @stack.pop
- end
- print @render_options["line"]["end"]
- print "\n"
- end
-# opt = options @stack
-# print opt["end"] if opt
- @stack.pop
- print @render_options["listing"]["end"]
- print @render_options["document"]["end"] if @headers
- end
-
- def options stack
- ref = stack.join ' '
- return @options[ref] if @options.has_key? ref
-
- result = @render_options['tags'].max do |a, b|
- @score_manager.score( a['selector'], ref ) <=> @score_manager.score( b['selector'], ref )
- end
- result = nil if @score_manager.score( result['selector'], ref ) == 0
- @options[ref] = result
- end
- end
-end
-
View
206 vendor/ultraviolet-0.10.2/lib/uv/utility.rb
@@ -1,206 +0,0 @@
-require 'rubygems'
-require 'plist'
-require 'textpow'
-
-module Uv
- def Uv.foreground bg
- fg = "#FFFFFF"
- 3.times do |i|
- fg = "#000000" if bg[i*2+1, 2].hex > 0xFF / 2
- end
- fg
- end
-
- def Uv.alpha_blend bg, fg
- unless bg =~ /^#((\d|[ABCDEF]){3}|(\d|[ABCDEF]){6}|(\d|[ABCDEF]){8})$/i
- raise(ArgumentError, "Malformed background color '#{bg}'" )
- end
- unless fg =~ /^#((\d|[ABCDEF]){3}|(\d|[ABCDEF]){6}|(\d|[ABCDEF]){8})$/i
- raise(ArgumentError, "Malformed foreground color '#{fg}'" )
- end
-
- if bg.size == 4
- tbg = (fg[1,1].hex * 0xff / 0xf).to_s(16).upcase.rjust(2, '0')
- tbg += (fg[2,1].hex * 0xff / 0xf).to_s(16).upcase.rjust(2, '0')
- tbg += (fg[3,1].hex * 0xff / 0xf).to_s(16).upcase.rjust(2, '0')
- bg = "##{tbg}"
- end
-
- result = ""
- if fg.size == 4
- result += (fg[1,1].hex * 0xff / 0xf).to_s(16).upcase.rjust(2, '0')
- result += (fg[2,1].hex * 0xff / 0xf).to_s(16).upcase.rjust(2, '0')
- result += (fg[3,1].hex * 0xff / 0xf).to_s(16).upcase.rjust(2, '0')
- elsif fg.size == 9
- if bg.size == 7
- div0 = bg[1..-1].hex
- div1, alpha = fg[1..-1].hex.divmod( 0x100 )
- 3.times {
- div0, mod0 = div0.divmod( 0x100 )
- div1, mod1 = div1.divmod( 0x100 )
- result = ((mod0 * alpha + mod1 * ( 0x100 - alpha ) ) / 0x100).to_s(16).upcase.rjust(2, '0') + result
- }
- else
- div_a, alpha_a = bg[1..-1].hex.divmod( 0x100 )
- div_b, alpha_b = fg[1..-1].hex.divmod( 0x100 )
- alpha = alpha_a + alpha_b * (0x100 - alpha_a)
- 3.times {
- div_b, c_b = div_b.divmod( 0x100 )
- div_a, c_a = div_a.divmod( 0x100 )
- result = ((c_a * alpha_a + ( 0x100 - alpha_a ) * alpha_b * c_b ) / alpha).to_s(16).upcase.rjust(2, '0') + result
- }
- end
- #result = "FF00FF"
- else
- result = fg[1..-1]
- end
- "##{result}"
- end
-
- def Uv.normalize_color settings, color, fg = false
- if color
- if fg
- alpha_blend( settings["foreground"] ? settings["foreground"] : "#000000FF", color )
- else
- alpha_blend( settings["background"] ? settings["background"] : "#000000FF", color )
- end
- else
- color
- end
- end
-
- def Uv.css_string(css,code_name)
- #input: a hash of css selectors=>styles
- #output :usable css
- # added by david heitzman
- outs='<style type="text/css">'
- css.each do |key, values|
- if key == code_name
- outs += "#{code_name} {"
- else
- outs += "#{code_name} #{key} {"
- end
- values.each do |style, value|
- outs += " #{style}: #{value};" if value
- end
- outs += "} "
- end
- outs += "</style>"
- end
-
-
- def Uv.get_render_and_css(tm_theme)
- # input: a string that a .tmTheme after being read with Plist::parse_xml
- # output: [{a hash containing the render data structure },{ a hash containing the css string }]
- # added by david heitzman
-
- settings = tm_theme["settings"].find { |s| ! s["name"] }["settings"]
-
- render = {"name" => tm_theme["name"]}
- css = {}
-
- standard_name = tm_theme["name"]
- code_name = "pre.#{standard_name}"
-
- render["tags"] = []
- count_names = {}
- tm_theme["settings"].each do |t|
- if t["scope"]
- class_name = t["name"].downcase.gsub(/\W/, ' ').gsub('.tmtheme', '').split(' ').collect{|s| s.capitalize}.join
- if class_name == ""
- class_name = "x" * t["name"].size
- end
-
- if count_names[class_name]
- tname = class_name
- class_name = "#{class_name}#{count_names[class_name]}"
- count_names[tname] += count_names[tname] + 1
- else
- count_names[class_name] = 1
- end
-
- tag = {}
- tag["selector"] = t["scope"]
- tag["begin"] = "<span class=\"#{class_name}\">"
- tag["end"] = "</span>"
- render["tags"] << tag
-
- if s = t["settings"]
- style = {}
- style["color"] = Uv.normalize_color(settings, s["foreground"], true)
- style["background-color"] = Uv.normalize_color(settings, s["background"])
- case s["fontStyle"]
- when /bold/ then style["font-weight"] = "bold"
- when /italic/ then style["font-style"] = "italic"
- when /underline/ then style["text-decoration"] = "underline"
- end
- css[".#{class_name}"] = style
- end
- elsif ! t["name"]
- if s = t["settings"]
- style = {}
- style["color"] = Uv.normalize_color(settings, s["foreground"], true)
- style["background-color"] = Uv.alpha_blend(s["background"], s["background"])
- css[code_name] = style
- @style = style
- style = {}
- style["background-color"] = Uv.alpha_blend(s["selection"], s["selection"])
- style["color"] = Uv.foreground( style["background-color"] )
- css[".line-numbers"] = style
-
- tag = {}
- tag["begin"] = "<span class=\"line-numbers\">"
- tag["end"] = "</span>"
- render["line-numbers"] = tag
- end
- end
- end
-
- render["filter"] = "CGI.escapeHTML( @escaped )"
-
- tag = {}
- tag["begin"] = ""
- tag["end"] = ""
- render["line"] = tag
-
-
- tag = {}
- tag["begin"] = "<pre class=\"#{standard_name}\">"
- tag["end"] = "</pre>"
- render["listing"] = tag
-
- tag = {}
- tag["begin"] = ''
-
- tag["end"] = ''
-
- render["document"] = tag
- return [render,css_string(css, code_name)]
- end
-
-
- def Uv.tmtheme_to_html(tm_theme,code_to_render, options)
-
- #input: tm_theme - a string containing an xml representation of a textmate theme in plist format
- #input: code_to_render - the code (ruby, php, python, c etc.) you want rendered as html
- #input: options - a hash containing options such as line numbers, etc :line_numbers => false, :render_style => "classic", :headers => false, :code_type=>nil
- # They are the same options you can give to Uv.parse
- #output : [<css string>,<html string>]
-
- opts = {:line_numbers => false, :render_style => "classic", :headers => false}.merge options
- out = ""
- begin
- Uv::init_syntaxes
- syn=( Uv::syntaxes_hash[ opts[:code_type].to_s ] )
- processor = Textpow::DebugProcessor.new
- syn.parse( tm_theme , processor )
- render_str = Uv::get_render_and_css( Plist::parse_xml(tm_theme) )
- render_processor = Uv::RenderProcessor.new( render_str.first, line_numbers=opts[:line_numbers], headers=opts[:headers] )
- syn.parse( code_to_render, render_processor )
- out=[render_str.last, render_processor.string]
- rescue Exception=>e
- out=['<style type="text/css"></style>','<p>Error in tm_theme_to_html.</>']
- end
- out
- end
-end
View
132 vendor/ultraviolet-0.10.2/render/latex/active4d.render
@@ -1,132 +0,0 @@
----
-name: Active4D
-line:
- begin: ""
- end: "}}\\\\"
-tags:
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{ECF1FF}{\rule[-0.5ex]{0pt}{2.0ex}
- end: "}"
- selector: text.html source.active4d
-- begin: "{\\color[HTML]{000000}"
- end: "}"
- selector: text.xml
-- begin: "{\\color[HTML]{D33535}"
- end: "}"
- selector: comment.line
-- begin: "{\\color[HTML]{D33435}"
- end: "}"
- selector: comment.block
-- begin: "{\\color[HTML]{666666}"
- end: "}"
- selector: string
-- begin: "{\\color[HTML]{66CCFF}\\textbf{"
- end: "}}"
- selector: string.interpolated variable
-- begin: "{\\color[HTML]{A8017E}"
- end: "}"
- selector: constant.numeric
-- begin: "{"
- end: "}"
- selector: constant.character, constant.other
-- begin: "{\\color[HTML]{66CCFF}\\textbf{"
- end: "}}"
- selector: constant.other.date, constant.other.time
-- begin: "{\\color[HTML]{A535AE}"
- end: "}"
- selector: constant.language
-- begin: "{\\color[HTML]{6392FF}\\textbf{"
- end: "}}"
- selector: variable.other.local
-- begin: "{\\color[HTML]{0053FF}\\textbf{"
- end: "}}"
- selector: variable
-- begin: "{\\color[HTML]{0BB600}"
- end: "}"
- selector: variable.other.table-field
-- begin: "{\\color[HTML]{006699}\\textbf{"
- end: "}}"
- selector: keyword
-- begin: "{"
- end: "}"
- selector: keyword.operator
-- begin: "{\\color[HTML]{FF5600}"
- end: "}"
- selector: storage
-- begin: "{\\color[HTML]{21439C}"
- end: "}"
- selector: entity.name.type
-- begin: "{"
- end: "}"
- selector: entity.other.inherited-class
-- begin: "{\\color[HTML]{21439C}"
- end: "}"
- selector: entity.name.function
-- begin: "{"
- end: "}"
- selector: variable.parameter
-- begin: "{\\color[HTML]{7A7A7A}"
- end: "}"
- selector: meta.tag
-- begin: "{\\color[HTML]{016CFF}"
- end: "}"
- selector: entity.name.tag
-- begin: "{\\color[HTML]{963DFF}"
- end: "}"
- selector: entity.other.attribute-name
-- begin: "{\\color[HTML]{45AE34}\\textbf{"
- end: "}}"
- selector: support.function
-- begin: "{\\color[HTML]{B7734C}"
- end: "}"
- selector: support.constant
-- begin: "{\\color[HTML]{A535AE}"
- end: "}"
- selector: support.type, support.class
-- begin: "{\\color[HTML]{A535AE}"
- end: "}"
- selector: support.variable
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{990000}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FFFFFF}
- end: "}"
- selector: invalid
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{656565}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FFFFFF}
- end: "}"
- selector: meta.diff
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{1B63FF}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FFFFFF}
- end: "}"
- selector: meta.diff.range
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{FF7880}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{000000}
- end: "}"
- selector: markup.deleted.diff
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{98FF9A}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{000000}
- end: "}"
- selector: markup.inserted.diff
-- begin: "{\\color[HTML]{5E5E5E}"
- end: "}"
- selector: source.diff
-listing:
- begin: |
- \newcolumntype{C}{>{\color[HTML]{000000}\columncolor[HTML]{FFFFFF}}l}
- \newcolumntype{N}{>{\color[HTML]{000000}\columncolor[HTML]{BAD6FD}}l}
- \begin{longtable}{NC}
-
- end: |
- \end{longtable}
-
-document:
- begin: |
- \documentclass[a4paper,landscape]{article}
- \usepackage{xcolor}
- \usepackage{colortbl}
- \usepackage{longtable}
- \usepackage[left=2cm,top=1cm,right=3cm,nohead,nofoot]{geometry}
- \usepackage[T1]{fontenc}
- \usepackage[scaled]{beramono}
- \begin{document}
-
- end: |
- \end{document}
-
-filter: "@escaped.gsub(/(\\$)/, '\\\\\\\\\\1').gsub(/\\\\(?!\\$)/, '$\\\\\\\\backslash$').gsub(/(_|\\{|\\}|&|\\#|%)/, '\\\\\\\\\\1').gsub(/~/, '\\\\textasciitilde ').gsub(/ /,'\\\\hspace{1ex}').gsub(/\\t| /,'\\\\hspace{3ex}').gsub(/\\\"/, \"''\").gsub(/(\\^)/,'\\\\\\\\\\1{}')"
-line-numbers:
- begin: \texttt{
- end: "}&\\mbox{\\texttt{"
View
96 vendor/ultraviolet-0.10.2/render/latex/all_hallows_eve.render
@@ -1,96 +0,0 @@
----
-name: All Hallow's Eve
-line:
- begin: ""
- end: "}}\\\\"
-tags:
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{434242}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FFFFFF}
- end: "}"
- selector: text
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{000000}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FFFFFF}
- end: "}"
- selector: source
-- begin: "{\\color[HTML]{9933CC}"
- end: "}"
- selector: comment
-- begin: "{\\color[HTML]{3387CC}"
- end: "}"
- selector: constant
-- begin: "{\\color[HTML]{CC7833}"
- end: "}"
- selector: keyword
-- begin: "{\\color[HTML]{D0D0FF}"
- end: "}"
- selector: meta.preprocessor.c
-- begin: "{"
- end: "}"
- selector: keyword.control.import
-- begin: "{"
- end: "}"
- selector: entity.name.function
-- begin: "{\\textit{"
- end: "}}"
- selector: variable.parameter
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{9B9B9B}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FFFFFF}
- end: "}"
- selector: source comment.block
-- begin: "{\\color[HTML]{66CC33}"
- end: "}"
- selector: string
-- begin: "{\\color[HTML]{AAAAAA}"
- end: "}"
- selector: string constant.character.escape
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{CCCC33}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{000000}
- end: "}"
- selector: string.interpolated
-- begin: "{\\color[HTML]{CCCC33}"
- end: "}"
- selector: string.regexp
-- begin: "{\\color[HTML]{CCCC33}"
- end: "}"
- selector: string.literal
-- begin: "{\\color[HTML]{555555}"
- end: "}"
- selector: string.interpolated constant.character.escape
-- begin: "{\\underline{"
- end: "}}"
- selector: entity.name.type
-- begin: "{\\textit{"
- end: "}}"
- selector: entity.other.inherited-class
-- begin: "{\\underline{"
- end: "}}"
- selector: entity.name.tag
-- begin: "{"
- end: "}"
- selector: entity.other.attribute-name
-- begin: "{\\color[HTML]{C83730}"
- end: "}"
- selector: support.function
-listing:
- begin: |
- \newcolumntype{C}{>{\color[HTML]{FFFFFF}\columncolor[HTML]{000000}}l}
- \newcolumntype{N}{>{\color[HTML]{FFFFFF}\columncolor[HTML]{73597E}}l}
- \begin{longtable}{NC}
-
- end: |
- \end{longtable}
-
-document:
- begin: |
- \documentclass[a4paper,landscape]{article}
- \usepackage{xcolor}
- \usepackage{colortbl}
- \usepackage{longtable}
- \usepackage[left=2cm,top=1cm,right=3cm,nohead,nofoot]{geometry}
- \usepackage[T1]{fontenc}
- \usepackage[scaled]{beramono}
- \begin{document}
-
- end: |
- \end{document}
-
-filter: "@escaped.gsub(/(\\$)/, '\\\\\\\\\\1').gsub(/\\\\(?!\\$)/, '$\\\\\\\\backslash$').gsub(/(_|\\{|\\}|&|\\#|%)/, '\\\\\\\\\\1').gsub(/~/, '\\\\textasciitilde ').gsub(/ /,'\\\\hspace{1ex}').gsub(/\\t| /,'\\\\hspace{3ex}').gsub(/\\\"/, \"''\").gsub(/(\\^)/,'\\\\\\\\\\1{}')"
-line-numbers:
- begin: \texttt{
- end: "}&\\mbox{\\texttt{"
View
171 vendor/ultraviolet-0.10.2/render/latex/amy.render
@@ -1,171 +0,0 @@
----
-name: Amy
-line:
- begin: ""
- end: "}}\\\\"
-tags:
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{200020}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{404080}\textit{
- end: "}}"
- selector: comment.block
-- begin: "{\\color[HTML]{999999}"
- end: "}"
- selector: string
-- begin: "{\\color[HTML]{707090}"
- end: "}"
- selector: constant.language
-- begin: "{\\color[HTML]{7090B0}"
- end: "}"
- selector: constant.numeric
-- begin: "{\\textbf{"
- end: "}}"
- selector: constant.numeric.integer.int32
-- begin: "{\\textit{"
- end: "}}"
- selector: constant.numeric.integer.int64
-- begin: "{\\textbf{"
- end: "}}"
- selector: constant.numeric.integer.nativeint
-- begin: "{\\underline{"
- end: "}}"
- selector: constant.numeric.floating-point.ocaml
-- begin: "{\\color[HTML]{666666}"
- end: "}"
- selector: constant.character
-- begin: "{\\color[HTML]{8080A0}"
- end: "}"
- selector: constant.language.boolean
-- begin: "{"
- end: "}"
- selector: constant.language
-- begin: "{"
- end: "}"
- selector: constant.other
-- begin: "{\\color[HTML]{008080}"
- end: "}"
- selector: variable.language, variable.other
-- begin: "{\\color[HTML]{A080FF}"
- end: "}"
- selector: keyword
-- begin: "{\\color[HTML]{A0A0FF}"
- end: "}"
- selector: keyword.operator
-- begin: "{\\color[HTML]{D0D0FF}"
- end: "}"
- selector: keyword.other.decorator
-- begin: "{\\underline{"
- end: "}}"
- selector: keyword.operator.infix.floating-point.ocaml
-- begin: "{\\underline{"
- end: "}}"
- selector: keyword.operator.prefix.floating-point.ocaml
-- begin: "{\\color[HTML]{C080C0}"
- end: "}"
- selector: keyword.other.directive
-- begin: "{\\color[HTML]{C080C0}\\underline{"
- end: "}}"
- selector: keyword.other.directive.line-number
-- begin: "{\\color[HTML]{80A0FF}"
- end: "}"
- selector: keyword.control
-- begin: "{\\color[HTML]{B0FFF0}"
- end: "}"
- selector: storage
-- begin: "{\\color[HTML]{60B0FF}"
- end: "}"
- selector: entity.name.type.variant
-- begin: "{\\color[HTML]{60B0FF}\\textit{"
- end: "}}"
- selector: storage.type.variant.polymorphic, entity.name.type.variant.polymorphic
-- begin: "{\\color[HTML]{B000B0}"
- end: "}"
- selector: entity.name.type.module
-- begin: "{\\color[HTML]{B000B0}\\underline{"
- end: "}}"
- selector: entity.name.type.module-type.ocaml
-- begin: "{\\color[HTML]{A00050}"
- end: "}"
- selector: support.other
-- begin: "{\\color[HTML]{70E080}"
- end: "}"
- selector: entity.name.type.class
-- begin: "{\\color[HTML]{70E0A0}"
- end: "}"
- selector: entity.name.type.class-type
-- begin: "{"
- end: "}"
- selector: entity.other.inherited-class
-- begin: "{\\color[HTML]{50A0A0}"
- end: "}"
- selector: entity.name.function
-- begin: "{\\color[HTML]{80B0B0}"
- end: "}"
- selector: variable.parameter
-- begin: "{\\color[HTML]{3080A0}"
- end: "}"
- selector: entity.name.type.token
-- begin: "{\\color[HTML]{3CB0D0}"
- end: "}"
- selector: entity.name.type.token.reference
-- begin: "{\\color[HTML]{90E0E0}"
- end: "}"
- selector: entity.name.function.non-terminal
-- begin: "{\\color[HTML]{C0F0F0}"
- end: "}"
- selector: entity.name.function.non-terminal.reference
-- begin: "{\\color[HTML]{009090}"
- end: "}"
- selector: entity.name.tag
-- begin: "{"
- end: "}"
- selector: entity.other.attribute-name
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{200020}{\rule[-0.5ex]{0pt}{2.0ex}
- end: "}"
- selector: support.constant
-- begin: "{"
- end: "}"
- selector: support.type, support.class
-- begin: "{"
- end: "}"
- selector: support.other.variable
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{FFFF00}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{400080}\textbf{
- end: "}}"
- selector: invalid.illegal
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{CC66FF}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{200020}
- end: "}"
- selector: invalid.deprecated
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{350060}{\rule[-0.5ex]{0pt}{2.0ex}
- end: "}"
- selector: source.camlp4.embedded
-- begin: "{"
- end: "}"
- selector: source.camlp4.embedded.parser.ocaml
-- begin: "{\\color[HTML]{805080}"
- end: "}"
- selector: punctuation
-listing:
- begin: |
- \newcolumntype{C}{>{\color[HTML]{D0D0FF}\columncolor[HTML]{200020}}l}
- \newcolumntype{N}{>{\color[HTML]{000000}\columncolor[HTML]{800000}}l}
- \begin{longtable}{NC}
-
- end: |
- \end{longtable}
-
-document:
- begin: |
- \documentclass[a4paper,landscape]{article}
- \usepackage{xcolor}
- \usepackage{colortbl}
- \usepackage{longtable}
- \usepackage[left=2cm,top=1cm,right=3cm,nohead,nofoot]{geometry}
- \usepackage[T1]{fontenc}
- \usepackage[scaled]{beramono}
- \begin{document}
-
- end: |
- \end{document}
-
-filter: "@escaped.gsub(/(\\$)/, '\\\\\\\\\\1').gsub(/\\\\(?!\\$)/, '$\\\\\\\\backslash$').gsub(/(_|\\{|\\}|&|\\#|%)/, '\\\\\\\\\\1').gsub(/~/, '\\\\textasciitilde ').gsub(/ /,'\\\\hspace{1ex}').gsub(/\\t| /,'\\\\hspace{3ex}').gsub(/\\\"/, \"''\").gsub(/(\\^)/,'\\\\\\\\\\1{}')"
-line-numbers:
- begin: \texttt{
- end: "}&\\mbox{\\texttt{"
View
111 vendor/ultraviolet-0.10.2/render/latex/blackboard.render
@@ -1,111 +0,0 @@
----
-name: Blackboard
-line:
- begin: ""
- end: "}}\\\\"
-tags:
-- begin: "{\\color[HTML]{AEAEAE}"
- end: "}"
- selector: comment
-- begin: "{\\color[HTML]{D8FA3C}"
- end: "}"
- selector: constant
-- begin: "{\\color[HTML]{FF6400}"
- end: "}"
- selector: entity
-- begin: "{\\color[HTML]{FBDE2D}"
- end: "}"
- selector: keyword
-- begin: "{\\color[HTML]{FBDE2D}"
- end: "}"
- selector: storage
-- begin: "{\\color[HTML]{61CE3C}"
- end: "}"
- selector: string, meta.verbatim
-- begin: "{\\color[HTML]{8DA6CE}"
- end: "}"
- selector: support
-- begin: "{"
- end: "}"
- selector: variable
-- begin: "{\\color[HTML]{AB2A1D}\\textit{"
- end: "}}"
- selector: invalid.deprecated
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{9D1E15}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{F8F8F8}
- end: "}"
- selector: invalid.illegal
-- begin: "{\\color[HTML]{FF6400}\\textit{"
- end: "}}"
- selector: entity.other.inherited-class
-- begin: "{\\color[HTML]{FF6400}"
- end: "}"
- selector: string constant.other.placeholder
-- begin: "{\\color[HTML]{BECDE6}"
- end: "}"
- selector: meta.function-call.py
-- begin: "{\\color[HTML]{7F90AA}"
- end: "}"
- selector: meta.tag, meta.tag entity
-- begin: "{\\color[HTML]{FFFFFF}"
- end: "}"
- selector: entity.name.section
-- begin: "{\\color[HTML]{D5E0F3}"
- end: "}"
- selector: keyword.type.variant
-- begin: "{\\color[HTML]{F8F8F8}"
- end: "}"
- selector: source.ocaml keyword.operator.symbol
-- begin: "{\\color[HTML]{8DA6CE}"
- end: "}"
- selector: source.ocaml keyword.operator.symbol.infix
-- begin: "{\\color[HTML]{8DA6CE}"
- end: "}"
- selector: source.ocaml keyword.operator.symbol.prefix
-- begin: "{\\underline{"
- end: "}}"
- selector: source.ocaml keyword.operator.symbol.infix.floating-point
-- begin: "{\\underline{"
- end: "}}"
- selector: source.ocaml keyword.operator.symbol.prefix.floating-point
-- begin: "{\\underline{"
- end: "}}"
- selector: source.ocaml constant.numeric.floating-point
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{F7F7F8}{\rule[-0.5ex]{0pt}{2.0ex}
- end: "}"
- selector: text.tex.latex meta.function.environment
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{7691F3}{\rule[-0.5ex]{0pt}{2.0ex}
- end: "}"
- selector: text.tex.latex meta.function.environment meta.function.environment
-- begin: "{\\color[HTML]{FBDE2D}"
- end: "}"
- selector: text.tex.latex support.function
-- begin: "{\\color[HTML]{FFFFFF}"
- end: "}"
- selector: source.plist string.unquoted, source.plist keyword.operator
-listing:
- begin: |
- \newcolumntype{C}{>{\color[HTML]{F8F8F8}\columncolor[HTML]{0C1021}}l}
- \newcolumntype{N}{>{\color[HTML]{FFFFFF}\columncolor[HTML]{253B76}}l}
- \begin{longtable}{NC}
-
- end: |
- \end{longtable}
-
-document:
- begin: |
- \documentclass[a4paper,landscape]{article}
- \usepackage{xcolor}
- \usepackage{colortbl}
- \usepackage{longtable}
- \usepackage[left=2cm,top=1cm,right=3cm,nohead,nofoot]{geometry}
- \usepackage[T1]{fontenc}
- \usepackage[scaled]{beramono}
- \begin{document}
-
- end: |
- \end{document}
-
-filter: "@escaped.gsub(/(\\$)/, '\\\\\\\\\\1').gsub(/\\\\(?!\\$)/, '$\\\\\\\\backslash$').gsub(/(_|\\{|\\}|&|\\#|%)/, '\\\\\\\\\\1').gsub(/~/, '\\\\textasciitilde ').gsub(/ /,'\\\\hspace{1ex}').gsub(/\\t| /,'\\\\hspace{3ex}').gsub(/\\\"/, \"''\").gsub(/(\\^)/,'\\\\\\\\\\1{}')"
-line-numbers:
- begin: \texttt{
- end: "}&\\mbox{\\texttt{"
View
552 vendor/ultraviolet-0.10.2/render/latex/brilliance_black.render
@@ -1,552 +0,0 @@
----
-name: "Brilliance Black \xE3\x8A\xB7"
-line:
- begin: ""
- end: "}}\\\\"
-tags:
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{FFFFFF}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{000000}\textbf{
- end: "}}"
- selector: meta.thomas_aylott
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{FFFFFF}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{555555}\underline{
- end: "}}"
- selector: meta.subtlegradient
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{FFFFFF}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{E6E6E6}
- end: "}"
- selector: meta.subtlegradient
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{482302}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FFFC80}
- end: "}"
- selector: string -meta.tag -meta.doctype -string.regexp -string.literal -string.interpolated -string.quoted.literal -string.unquoted, variable.parameter.misc.css, text string source string, string.unquoted string, string.regexp string
-- begin: "{\\color[HTML]{803D00}"
- end: "}"
- selector: punctuation.definition.string -meta.tag
-- begin: "{\\color[HTML]{F5EF28}"
- end: "}"
- selector: string.regexp punctuation.definition.string, string.quoted.literal punctuation.definition.string, string.quoted.double.ruby.mod punctuation.definition.string
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{274802}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FFF800}
- end: "}"
- selector: string.quoted.literal, string.quoted.double.ruby.mod
-- begin: "{\\color[HTML]{FFBC80}"
- end: "}"
- selector: string.unquoted -string.unquoted.embedded, string.quoted.double.multiline, meta.scope.heredoc
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{1A1A1A}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FFFC80}
- end: "}"
- selector: string.interpolated
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{274802}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FFF800}
- end: "}"
- selector: string.regexp
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{274802}{\rule[-0.5ex]{0pt}{2.0ex}
- end: "}"
- selector: string.regexp.group
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{274802}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{EBEBEB}
- end: "}"
- selector: "string.regexp.group string.regexp.group "
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{274802}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{EBEBEB}
- end: "}"
- selector: "string.regexp.group string.regexp.group string.regexp.group "
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{274802}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{EBEBEB}
- end: "}"
- selector: "string.regexp.group string.regexp.group string.regexp.group string.regexp.group "
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{274802}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{86FF00}
- end: "}"
- selector: string.regexp.character-class
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{274802}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{00FFF8}
- end: "}"
- selector: string.regexp.arbitrary-repitition
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{024B8E}{\rule[-0.5ex]{0pt}{2.0ex}
- end: "}"
- selector: "meta.group.assertion.regexp "
-- begin: "{\\color[HTML]{0086FF}"
- end: "}"
- selector: meta.assertion, meta.group.assertion keyword.control.group.regexp
-- begin: "{\\color[HTML]{C6FF00}"
- end: "}"
- selector: constant.numeric
-- begin: "{\\color[HTML]{86FF00}"
- end: "}"
- selector: constant.character
-- begin: "{\\color[HTML]{07FF00}"
- end: "}"
- selector: constant.language, keyword.other.unit, constant.other.java, constant.other.unit
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{044802}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{07FF00}
- end: "}"
- selector: constant.language.pseudo-variable
-- begin: "{\\color[HTML]{00FF79}"
- end: "}"
- selector: constant.other, constant.block
-- begin: "{\\color[HTML]{00FFF8}"
- end: "}"
- selector: support.constant, constant.name
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{024846}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{00FF79}
- end: "}"
- selector: variable.other.readwrite.global.pre-defined
-- begin: "{\\color[HTML]{00FFF8}"
- end: "}"
- selector: variable.other.constant
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{024846}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{00FFF8}
- end: "}"
- selector: support.variable
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{022748}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{00807C}
- end: "}"
- selector: variable.other.readwrite.global
-- begin: "{\\color[HTML]{0086FF}"
- end: "}"
- selector: variable.language, variable.other, variable.js
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{02068E}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{0086FF}
- end: "}"
- selector: variable.other.readwrite.class
-- begin: "{\\color[HTML]{406180}"
- end: "}"
- selector: variable.other.readwrite.instance
-- begin: "{\\color[HTML]{406180}"
- end: "}"
- selector: variable.other.php, variable.other.normal
-- begin: "{\\color[HTML]{666666}"
- end: "}"
- selector: punctuation.definition
-- begin: "{\\color[HTML]{FF7900}"
- end: "}"
- selector: storage -storage.modifier
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{482302}{\rule[-0.5ex]{0pt}{2.0ex}
- end: "}"
- selector: other.preprocessor, entity.name.preprocessor
-- begin: "{\\color[HTML]{666666}"
- end: "}"
- selector: variable.language.this.js
-- begin: "{\\color[HTML]{803D00}"
- end: "}"
- selector: storage.modifier
-- begin: "{\\color[HTML]{FF0007}"
- end: "}"
- selector: entity.name.class, entity.name.type.class
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{8E0206}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{800004}
- end: "}"
- selector: meta.class -meta.class.instance, declaration.class, meta.definition.class, declaration.module
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{480204}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FF0007}
- end: "}"
- selector: support.type, support.class
-- begin: "{\\color[HTML]{FF0007}"
- end: "}"
- selector: entity.name.instance
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{480227}{\rule[-0.5ex]{0pt}{2.0ex}
- end: "}"
- selector: meta.class.instance.constructor
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{480204}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FF0086}
- end: "}"
- selector: entity.other.inherited-class, entity.name.module
-- begin: "{\\color[HTML]{FF0086}"
- end: "}"
- selector: object.property.function, meta.definition.method
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{480227}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{800043}
- end: "}"
- selector: meta.function, meta.property.function, declaration.function
-- begin: "{\\color[HTML]{FF0086}"
- end: "}"
- selector: entity.name.function, entity.name.preprocessor
-- begin: "{\\color[HTML]{F800FF}"
- end: "}"
- selector: keyword
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{230248}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{F800FF}
- end: "}"
- selector: keyword.control
-- begin: "{"
- end: "}"
- selector: keyword.control.ruby.start-block
-- begin: "{\\color[HTML]{6100CC}"
- end: "}"
- selector: support.function - variable
-- begin: "{\\color[HTML]{6100CC}"
- end: "}"
- selector: keyword.operator, declaration.function.operator, meta.preprocessor.c.include
-- begin: "{\\color[HTML]{8C60BF}"
- end: "}"
- selector: keyword.other.special-method, meta.function-call entity.name.function
-- begin: "{\\color[HTML]{8083FF}"
- end: "}"
- selector: keyword.operator.getter
-- begin: "{"
- end: "}"
- selector: keyword.operator.setter
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{230248}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{8083FF}
- end: "}"
- selector: variable.parameter -variable.parameter.misc.css, meta.definition.method meta.definition.param-list, meta.function.method.with-arguments variable.parameter.function
-- begin: "{\\color[HTML]{FF0086}"
- end: "}"
- selector: source.regexp keyword.operator
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{333333}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{CDCDCD}
- end: "}"
- selector: meta.doctype, meta.tag.sgml-declaration.doctype, meta.tag.sgml.doctype
-- begin: "{\\color[HTML]{333333}"
- end: "}"
- selector: meta.tag
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{2A2A2A}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{666666}
- end: "}"
- selector: meta.tag.structure, meta.tag.segment
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{2C2C2C}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{4C4C4C}
- end: "}"
- selector: meta.tag.block, meta.tag.xml, meta.tag.key
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{482302}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FF7900}
- end: "}"
- selector: meta.tag.inline
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{482302}{\rule[-0.5ex]{0pt}{2.0ex}
- end: "}"
- selector: meta.tag.inline source
-- begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{480204}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FF0007}