Sha256: 256a0595ed6f9dc18167fff901bdceec14a908853371a085197e30718e50c65c

Contents?: true

Size: 833 Bytes

Versions: 12

Compression:

Stored size: 833 Bytes

Contents

# frozen_string_literal: true

require_relative "../font_style"

module Plurimath
  module Math
    module Function
      class FontStyle
        class DoubleStruck < FontStyle
          def initialize(parameter_one,
                         parameter_two = "double-struck")
            super
          end

          def to_asciimath
            "mathbb(#{parameter_one&.to_asciimath})"
          end

          def to_latex
            "\\mathbb{#{parameter_one&.to_latex}}"
          end

          def to_mathml_without_math_tag
            Utility.update_nodes(
              Utility.ox_element(
                "mstyle",
                attributes: { mathvariant: "double-struck" },
              ),
              [parameter_one&.to_mathml_without_math_tag],
            )
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
plurimath-0.3.9 lib/plurimath/math/function/font_style/double_struck.rb
plurimath-0.3.8 lib/plurimath/math/function/font_style/double_struck.rb
plurimath-0.3.7 lib/plurimath/math/function/font_style/double_struck.rb
plurimath-0.3.6 lib/plurimath/math/function/font_style/double_struck.rb
plurimath-0.3.5 lib/plurimath/math/function/font_style/double_struck.rb
plurimath-0.3.4 lib/plurimath/math/function/font_style/double_struck.rb
plurimath-0.3.3 lib/plurimath/math/function/font_style/double_struck.rb
plurimath-0.3.2 lib/plurimath/math/function/font_style/double_struck.rb
plurimath-0.3.1.2 lib/plurimath/math/function/font_style/double_struck.rb
plurimath-0.3.1 lib/plurimath/math/function/font_style/double_struck.rb
plurimath-0.3.0 lib/plurimath/math/function/font_style/double_struck.rb
plurimath-0.2.9 lib/plurimath/math/function/font_style/double_struck.rb