Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
0d210fe10f
|
@ -83,6 +83,11 @@
|
||||||
\def\slash{\protect\itex@pslash}
|
\def\slash{\protect\itex@pslash}
|
||||||
\makeatother
|
\makeatother
|
||||||
|
|
||||||
|
% math-mode versions of \rlap, etc
|
||||||
|
% from Alexander Perlis, "A complement to \smash, \llap, and lap"
|
||||||
|
% http://math.arizona.edu/~aprl/publications/mathclap/
|
||||||
|
\def\clap#1{\hbox to 0pt{\hss#1\hss}}
\def\mathllap{\mathpalette\mathllapinternal}
\def\mathrlap{\mathpalette\mathrlapinternal}
\def\mathclap{\mathpalette\mathclapinternal}
\def\mathllapinternal#1#2{\llap{$\mathsurround=0pt#1{#2}$}}
\def\mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}}
\def\mathclapinternal#1#2{\clap{$\mathsurround=0pt#1{#2}$}}
|
||||||
|
|
||||||
% Renames \sqrt as \oldsqrt and redefine root to result in \sqrt[#1]{#2}
|
% Renames \sqrt as \oldsqrt and redefine root to result in \sqrt[#1]{#2}
|
||||||
\let\oldroot\root
|
\let\oldroot\root
|
||||||
\def\root#1#2{\oldroot #1 \of{#2}}
|
\def\root#1#2{\oldroot #1 \of{#2}}
|
||||||
|
|
|
@ -1007,6 +1007,11 @@ class WikiControllerTest < ActionController::TestCase
|
||||||
\def\slash{\protect\itex@pslash}
|
\def\slash{\protect\itex@pslash}
|
||||||
\makeatother
|
\makeatother
|
||||||
|
|
||||||
|
% math-mode versions of \rlap, etc
|
||||||
|
% from Alexander Perlis, "A complement to \smash, \llap, and lap"
|
||||||
|
% http://math.arizona.edu/~aprl/publications/mathclap/
|
||||||
|
\def\clap#1{\hbox to 0pt{\hss#1\hss}}
\def\mathllap{\mathpalette\mathllapinternal}
\def\mathrlap{\mathpalette\mathrlapinternal}
\def\mathclap{\mathpalette\mathclapinternal}
\def\mathllapinternal#1#2{\llap{$\mathsurround=0pt#1{#2}$}}
\def\mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}}
\def\mathclapinternal#1#2{\clap{$\mathsurround=0pt#1{#2}$}}
|
||||||
|
|
||||||
% Renames \sqrt as \oldsqrt and redefine root to result in \sqrt[#1]{#2}
|
% Renames \sqrt as \oldsqrt and redefine root to result in \sqrt[#1]{#2}
|
||||||
\let\oldroot\root
|
\let\oldroot\root
|
||||||
\def\root#1#2{\oldroot #1 \of{#2}}
|
\def\root#1#2{\oldroot #1 \of{#2}}
|
||||||
|
|
|
@ -212,6 +212,13 @@ 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>A</mi><mpadded lspace='-100%width'} +
|
||||||
|
%{ width='0'><mi>B</mi></mpadded></math></p>},
|
||||||
|
"equation $A \\mathllap{B}$")
|
||||||
|
|
||||||
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/} +
|
||||||
|
@ -247,8 +254,8 @@ END_THM
|
||||||
|
|
||||||
assert_markup_parsed_as(
|
assert_markup_parsed_as(
|
||||||
%{<p>\\rlap: <math class='maruku-mathml' display='} +
|
%{<p>\\rlap: <math class='maruku-mathml' display='} +
|
||||||
%{inline' xmlns='http://www.w3.org/1998/Math/MathML'><mpadded} +
|
%{inline' xmlns='http://www.w3.org/1998/Math/MathML'>} +
|
||||||
%{ width='0'><mn>123</mn></mpadded></math></p>},
|
%{<mn>123</mn></math></p>},
|
||||||
'\rlap: $\rlap{123}$')
|
'\rlap: $\rlap{123}$')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue