Sha256: 6a222c1f749b676f3377f77d3a63ae2d438748907270e3c6fe8512efbd129f35

Contents?: true

Size: 941 Bytes

Versions: 4

Compression:

Stored size: 941 Bytes

Contents

# frozen_string_literal: true

require_relative "../font_style"

module Plurimath
  module Math
    module Function
      class FontStyle
        class Bold < FontStyle
          def initialize(parameter_one,
                         parameter_two = "bold")
            super
          end

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

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

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

          def to_omml_without_math_tag(display_style)
            font_styles(display_style, sty: "b")
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
plurimath-0.8.14 lib/plurimath/math/function/font_style/bold.rb
plurimath-0.8.13 lib/plurimath/math/function/font_style/bold.rb
plurimath-0.8.12 lib/plurimath/math/function/font_style/bold.rb
plurimath-0.8.11 lib/plurimath/math/function/font_style/bold.rb