Sha256: 413c89cd1053f6814432034afac57a7cb7de8f87da97a54975354fb3e52a64a4
Contents?: true
Size: 577 Bytes
Versions: 5
Compression:
Stored size: 577 Bytes
Contents
require 'katex' require 'sskatex' # Make sure our KaTeX assets are available (this can be disabled if you are not using math-mode) def preprocess_katex_assets # Copy stylesheet @items.create(File.open(File.join(Katex.gem_path, 'vendor', 'katex', 'stylesheets', 'katex.css'), 'r').read, {}, '/styles/katex.css') # Copy fonts fontPath = File.join(Katex.gem_path, 'vendor', 'katex', 'fonts') Dir.foreach(fontPath) do |item| next if item == '.' or item == '..' @items.create(File.open(File.join(fontPath, item), 'r').read, {}, '/styles/fonts/' + item) end end
Version data entries
5 entries across 5 versions & 1 rubygems