Update for itextomml 1.4.7

This commit is contained in:
Jacques Distler 2011-09-07 15:39:41 -05:00
parent 7bf832e8c7
commit ee05118e8f
4 changed files with 29 additions and 2 deletions

View file

@ -1,6 +1,6 @@
source "http://rubygems.org" source "http://rubygems.org"
gem "sqlite3-ruby", :require => "sqlite3" gem "sqlite3-ruby", :require => "sqlite3"
gem "itextomml", ">=1.4.6" gem "itextomml", ">=1.4.7"
gem "rack", ">=1.1.0" gem "rack", ">=1.1.0"
gem "mongrel", ">=1.2.0.pre2" gem "mongrel", ">=1.2.0.pre2"
gem "rubyzip" gem "rubyzip"
@ -10,4 +10,3 @@ gem "nokogiri"
gem "rake" gem "rake"
gem "rdoc" gem "rdoc"
gem "json" gem "json"
#gem "themes_for_rails"

View file

@ -12,6 +12,7 @@
\usepackage{color} \usepackage{color}
\usepackage{ucs} \usepackage{ucs}
\usepackage[utf8x]{inputenc} \usepackage[utf8x]{inputenc}
\usepackage{xparse}
\usepackage{hyperref} \usepackage{hyperref}
%----Macros---------- %----Macros----------
@ -146,6 +147,15 @@
{\ooalign{\box\tw@ \cr \box\z@}}} {\ooalign{\box\tw@ \cr \box\z@}}}
\makeatother \makeatother
% \mathraisebox{voffset}[height][depth]{something}
\makeatletter
\NewDocumentCommand\mathraisebox{moom}{%
\IfNoValueTF{#2}{\def\@temp##1##2{\raisebox{#1}{$\m@th##1##2$}}}{%
\IfNoValueTF{#3}{\def\@temp##1##2{\raisebox{#1}[#2]{$\m@th##1##2$}}%
}{\def\@temp##1##2{\raisebox{#1}[#2][#3]{$\m@th##1##2$}}}}%
\mathpalette\@temp{#4}}
\makeatletter
% udots (taken from yhmath) % udots (taken from yhmath)
\makeatletter \makeatletter
\def\udots{\mathinner{\mkern2mu\raise\p@\hbox{.} \def\udots{\mathinner{\mkern2mu\raise\p@\hbox{.}

View file

@ -1065,6 +1065,7 @@ class WikiControllerTest < ActionController::TestCase
\usepackage{color} \usepackage{color}
\usepackage{ucs} \usepackage{ucs}
\usepackage[utf8x]{inputenc} \usepackage[utf8x]{inputenc}
\usepackage{xparse}
\usepackage{hyperref} \usepackage{hyperref}
%----Macros---------- %----Macros----------
@ -1199,6 +1200,15 @@ class WikiControllerTest < ActionController::TestCase
{\ooalign{\box\tw@ \cr \box\z@}}} {\ooalign{\box\tw@ \cr \box\z@}}}
\makeatother \makeatother
% \mathraisebox{voffset}[height][depth]{something}
\makeatletter
\NewDocumentCommand\mathraisebox{moom}{%
\IfNoValueTF{#2}{\def\@temp##1##2{\raisebox{#1}{$\m@th##1##2$}}}{%
\IfNoValueTF{#3}{\def\@temp##1##2{\raisebox{#1}[#2]{$\m@th##1##2$}}%
}{\def\@temp##1##2{\raisebox{#1}[#2][#3]{$\m@th##1##2$}}}}%
\mathpalette\@temp{#4}}
\makeatletter
% udots (taken from yhmath) % udots (taken from yhmath)
\makeatletter \makeatletter
\def\udots{\mathinner{\mkern2mu\raise\p@\hbox{.} \def\udots{\mathinner{\mkern2mu\raise\p@\hbox{.}

View file

@ -275,6 +275,14 @@ END_THM
def test_have_latest_itex2mml def test_have_latest_itex2mml
assert_markup_parsed_as(
%{<p>equation <math class='maruku-mathml' displa} +
%{y='inline' xmlns='http://www.w3.org/1998/Math/} +
%{MathML'><mi>x</mi><menclose notation='box'><mp} +
%{added depth='2ex' height='3ex' voffset='5ex'><} +
%{mi>x</mi></mpadded></menclose></math></p>},
"equation $x\\boxed{\\mathraisebox{5ex}[3ex][2ex]{x}}$")
assert_markup_parsed_as( assert_markup_parsed_as(
%{<p>equation <math class='maruku-mathml' displa} + %{<p>equation <math class='maruku-mathml' displa} +
%{y='inline' xmlns='http://www.w3.org/1998/Math/} + %{y='inline' xmlns='http://www.w3.org/1998/Math/} +