Sha256: f474725e363f22603a5442afa0507edf871621b19ffa43ea46f553367fed2cd3

Contents?: true

Size: 961 Bytes

Versions: 19

Compression:

Stored size: 961 Bytes

Contents

# frozen_string_literal: true

require_relative "../font_style"

module Plurimath
  module Math
    module Function
      class FontStyle
        class SansSerif < FontStyle
          def initialize(parameter_one,
                         parameter_two = "sans-serif")
            super
          end

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

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

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

          def to_omml_without_math_tag(display_style)
            font_styles(display_style, sty: "p", scr: "sans-serif")
          end
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
plurimath-0.8.10 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.8.9 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.8.8 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.8.7 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.8.6 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.8.5 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.8.4 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.8.2 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.8.1 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.8.0 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.7.2 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.7.1 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.7.0 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.6.0 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.5.0 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.4.4 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.4.3 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.4.2 lib/plurimath/math/function/font_style/sans-serif.rb
plurimath-0.4.1 lib/plurimath/math/function/font_style/sans-serif.rb