1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2025-12-10 08:46:41 +01:00

Merge pull request #18 from PFischbeck/mathjax

Add 'mathjax-rails' gem
This commit is contained in:
Philipp Fischbeck 2015-01-03 16:48:25 +01:00
commit 19d55ff01a
4 changed files with 19 additions and 0 deletions

View File

@ -31,6 +31,8 @@ gem 'bh', '~> 1.2'
gem 'will_paginate', '~> 3.0.6'
gem 'will_paginate-bootstrap'
gem 'mathjax-rails'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

View File

@ -56,6 +56,8 @@ GEM
json (1.8.1)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mathjax-rails (2.3.0)
railties (>= 3.0)
mime-types (2.4.3)
minitest (5.4.3)
multi_json (1.10.1)
@ -125,6 +127,7 @@ DEPENDENCIES
coffee-rails (~> 4.0.0)
jbuilder (~> 2.0)
jquery-rails
mathjax-rails
rails (= 4.1.7)
sass-rails (~> 4.0.3)
sdoc (~> 0.4.0)

View File

@ -4,6 +4,18 @@
<title><%= t :site_title %></title>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
processEscapes: true
},
"HTML-CSS": { availableFonts: ["TeX"] }
});
</script>
<%= mathjax_tag config: 'TeX-AMS_HTML' %>
<%= csrf_meta_tags %>
</head>
<body>

View File

@ -4,6 +4,8 @@ Rails.application.routes.draw do
end
resources :translations, only: [:index, :show]
mathjax 'mathjax'
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".