From 2967b207b252733bc7e22d215318bf6fa1f72abe Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Thu, 7 Jul 2011 10:18:55 -0500 Subject: [PATCH] Update for itex2MML 1.4.6 --- Gemfile | 2 +- app/views/layouts/tex.rhtml | 2 ++ test/functional/wiki_controller_test.rb | 2 ++ test/unit/page_renderer_test.rb | 10 ++++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index fb74bead..4d4721eb 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source "http://rubygems.org" gem "sqlite3-ruby", :require => "sqlite3" -gem "itextomml", ">=1.4.5" +gem "itextomml", ">=1.4.6" gem "rack", ">=1.1.0" gem "mongrel", ">=1.2.0.pre2" gem "rubyzip" diff --git a/app/views/layouts/tex.rhtml b/app/views/layouts/tex.rhtml index 8fb892b0..035352f1 100644 --- a/app/views/layouts/tex.rhtml +++ b/app/views/layouts/tex.rhtml @@ -155,6 +155,8 @@ %% Fix array \newcommand{\itexarray}[1]{\begin{matrix}#1\end{matrix}} +%% \itexnum is a noop +\newcommand{\itexnum}[1]{#1} %% Renaming existing commands \newcommand{\underoverset}[3]{\underset{#1}{\overset{#2}{#3}}} diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index 3c8ab806..c02269f3 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -1201,6 +1201,8 @@ class WikiControllerTest < ActionController::TestCase %% Fix array \newcommand{\itexarray}[1]{\begin{matrix}#1\end{matrix}} +%% \itexnum is a noop +\newcommand{\itexnum}[1]{#1} %% Renaming existing commands \newcommand{\underoverset}[3]{\underset{#1}{\overset{#2}{#3}}} diff --git a/test/unit/page_renderer_test.rb b/test/unit/page_renderer_test.rb index 60d10024..92a461f2 100644 --- a/test/unit/page_renderer_test.rb +++ b/test/unit/page_renderer_test.rb @@ -269,6 +269,16 @@ END_THM def test_have_latest_itex2mml + assert_markup_parsed_as( + %{

equation 47.3} + + %{47,347,3} + + %{

}, + "equation $\\href{http://ex.com}{47.3} 47,3 \\itexnum{47,3}$") + assert_markup_parsed_as( %{

equation