Permalink
Browse files

Update for next version of itex2MML

  • Loading branch information...
1 parent b79c399 commit 5aa8ff222bb83afb65d5ce5452b79b9bfa3bb440 @distler distler committed Jan 14, 2013
Showing with 64 additions and 0 deletions.
  1. +28 −0 app/views/layouts/tex.rhtml
  2. +28 −0 test/functional/wiki_controller_test.rb
  3. +8 −0 test/unit/page_renderer_test.rb
@@ -109,6 +109,19 @@
\DeclareSymbolFont{stmry}{U}{stmry}{m}{n}
\SetSymbolFont{stmry}{bold}{U}{stmry}{b}{n}
+% Manually declare the MnSymbolE font
+\DeclareFontFamily{OMX}{MnSymbolE}{}
+\DeclareSymbolFont{mnomx}{OMX}{MnSymbolE}{m}{n}
+\SetSymbolFont{mnomx}{bold}{OMX}{MnSymbolE}{b}{n}
+\DeclareFontShape{OMX}{MnSymbolE}{m}{n}{
+ <-6> MnSymbolE5
+ <6-7> MnSymbolE6
+ <7-8> MnSymbolE7
+ <8-9> MnSymbolE8
+ <9-10> MnSymbolE9
+ <10-12> MnSymbolE10
+ <12-> MnSymbolE12}{}
+
% Declare specific arrows from txfonts without loading the full package
\makeatletter
\def\re@DeclareMathSymbol#1#2#3#4{%
@@ -132,6 +145,21 @@
\re@DeclareMathSymbol{\parr}{\mathrel}{symbolsC}{77}
\makeatother
+% \llangle, \rrangle, \lmoustache and \rmoustache from MnSymbolE
+\makeatletter
+\def\Decl@Mn@Delim#1#2#3#4{%
+ \if\relax\noexpand#1%
+ \let#1\undefined
+ \fi
+ \DeclareMathDelimiter{#1}{#2}{#3}{#4}{#3}{#4}}
+\def\Decl@Mn@Open#1#2#3{\Decl@Mn@Delim{#1}{\mathopen}{#2}{#3}}
+\def\Decl@Mn@Close#1#2#3{\Decl@Mn@Delim{#1}{\mathclose}{#2}{#3}}
+\Decl@Mn@Open{\llangle}{mnomx}{'164}
+\Decl@Mn@Close{\rrangle}{mnomx}{'171}
+\Decl@Mn@Open{\lmoustache}{mnomx}{'245}
+\Decl@Mn@Close{\rmoustache}{mnomx}{'244}
+\makeatother
+
% Widecheck
\makeatletter
\DeclareRobustCommand\widecheck[1]{{\mathpalette\@widecheck{#1}}}
@@ -1162,6 +1162,19 @@ def set_tex_header
\DeclareSymbolFont{stmry}{U}{stmry}{m}{n}
\SetSymbolFont{stmry}{bold}{U}{stmry}{b}{n}
+% Manually declare the MnSymbolE font
+\DeclareFontFamily{OMX}{MnSymbolE}{}
+\DeclareSymbolFont{mnomx}{OMX}{MnSymbolE}{m}{n}
+\SetSymbolFont{mnomx}{bold}{OMX}{MnSymbolE}{b}{n}
+\DeclareFontShape{OMX}{MnSymbolE}{m}{n}{
+ <-6> MnSymbolE5
+ <6-7> MnSymbolE6
+ <7-8> MnSymbolE7
+ <8-9> MnSymbolE8
+ <9-10> MnSymbolE9
+ <10-12> MnSymbolE10
+ <12-> MnSymbolE12}{}
+
% Declare specific arrows from txfonts without loading the full package
\makeatletter
\def\re@DeclareMathSymbol#1#2#3#4{%
@@ -1185,6 +1198,21 @@ def set_tex_header
\re@DeclareMathSymbol{\parr}{\mathrel}{symbolsC}{77}
\makeatother
+% \llangle, \rrangle, \lmoustache and \rmoustache from MnSymbolE
+\makeatletter
+\def\Decl@Mn@Delim#1#2#3#4{%
+ \if\relax\noexpand#1%
+ \let#1\undefined
+ \fi
+ \DeclareMathDelimiter{#1}{#2}{#3}{#4}{#3}{#4}}
+\def\Decl@Mn@Open#1#2#3{\Decl@Mn@Delim{#1}{\mathopen}{#2}{#3}}
+\def\Decl@Mn@Close#1#2#3{\Decl@Mn@Delim{#1}{\mathclose}{#2}{#3}}
+\Decl@Mn@Open{\llangle}{mnomx}{'164}
+\Decl@Mn@Close{\rrangle}{mnomx}{'171}
+\Decl@Mn@Open{\lmoustache}{mnomx}{'245}
+\Decl@Mn@Close{\rmoustache}{mnomx}{'244}
+\makeatother
+
% Widecheck
\makeatletter
\DeclareRobustCommand\widecheck[1]{{\mathpalette\@widecheck{#1}}}
@@ -237,6 +237,14 @@ def test_footnotes
"evelopment")
end
+ def test_toc
+ assert_markup_parsed_as(
+ %{<h1 id='title_1'>Title</h1>\n<div class='maruku_toc'><ul><li><a href='#section_1_2'>Sect} +
+ %{ion 1</a></li><li><a href='#section_2_3'>Section 2</a></li></ul></div>\n<h2 id='section_} +
+ %{1_2'>Section 1</h2>\n\n<p>Foo</p>\n\n<h2 id='section_2_3'>Section 2</h2>\n\n<p>Bar</p>},
+ "#Title\n* Toc\n{:toc}\n\n##Section 1\n\nFoo\n\n##Section 2\n\nBar\n")
+ end
+
def test_ial_in_lists
assert_markup_parsed_as(

0 comments on commit 5aa8ff2

Please sign in to comment.