lib/maruku/ext/math/to_html.rb
# Creates an xml Mathml document of this node's TeX code.
#
# @return [MaRuKu::Out::HTML::HTMLElement]
Creates an xml Mathml document of this node's TeX code.
Creates an xml Mathml document of this node ' s TeX code .
def to_html_citation
        span = xelem('span')
        span['class'] = 'maruku-citation'
        span << xtext('[')
        self.cites.each do |c|
          if c =~ /(\w+):(\d\d\d\d\w{2,3})/ 
            a = xelem('a')
            a << xtext(c)
            a['href'] = "http://inspirehep.net/search?p=#{$1}%3A#{$2}"
            span << a << xtext(',')
          elsif c =~ /MR(\d+)/ 
            a = xelem('a')
            a << xtext(c)
            a['href'] = "http://www.ams.org/mathscinet-getitem?mr=#{$1}"
            span << a << xtext(',')
          else
            span << xtext(c + ',')
          end
        end
        span.children.last.chop! unless span.children.last == '['
        span << xtext(']')
        span
      end
def to_html_citation span = xelem ( 'span' ) span [ 'class' ] = 'maruku-citation' span << xtext ( '[' ) self . cites . each do | c | if c =~ / ( \w +):( \d \d \d \d \w {2,3}) / a = xelem ( 'a' ) a << xtext ( c ) a [ 'href' ] = "http://inspirehep.net/search?p=#{$1}%3A#{$2}" span << a << xtext ( ',' ) elsif c =~ / MR( \d +) / a = xelem ( 'a' ) a << xtext ( c ) a [ 'href' ] = "http://www.ams.org/mathscinet-getitem?mr=#{$1}" span << a << xtext ( ',' ) else span << xtext ( c + ',' ) end end span . children . last . chop! unless span . children . last == '[' span << xtext ( ']' ) span end
Creates an xml Mathml document of this node's TeX code.
Creates an xml Mathml document of this node ' s TeX code .
# INSPIRE # MathReviews
None
MaRuKu::Out::HTML::HTMLElement