Математические формулы, отображение

Опубликовано Ksenia-Polo - вт, 04/23/2019 - 11:58

Релиз в h5p https://h5p.org/november-2018-release-note#mathematical-formulas

Инструкция по h5p https://h5p.org/mathematical-expressions

О самом плагине https://www.mathjax.org/

Видео об установке библиотек https://youtu.be/FwSCERtu6T8

Добавление библиотеки на  admin/content/h5p

После добавления библиотеки можно прямо в текст вопросов вставлять вместо текста формулы.

Пример вставления формул: 

Mathematical expressions can be added to all text fields in the H5P authoring tool. There are three different ways you can use to let H5P know this is LaTeX:

  • \( some LaTeX \) for inline LaTeX, commonly used as part of sentences within a text
  • \[ some LaTeX \] or optionally $$ some LaTeX $$ for block LaTeX, commonly used as a standalone formula that will be centered

О latex https://onlineassist.site/node/407

Конфигурация:

Example: Drupal 7

You can alter the default configuration of the MathDisplay library by adding something like this to the settings.php file within your /sites/YOUR_SITE folder, typically it's /sites/default.
 

The release on November 2, 2018, added the possibility to use mathematical expressions in H5P through LaTeX notation.

Setup

To enable this feature a new H5P library needs to be installed. Download it here, and upload it through the library admin page on your H5P enabled site.

Usage

Mathematical expressions can be added to all text fields in the H5P authoring tool. There are three different ways you can use to let H5P know this is LaTeX:

  • \( some LaTeX \) for inline LaTeX, commonly used as part of sentences within a text
  • \[ some LaTeX \] or optionally $$ some LaTeX $$ for block LaTeX, commonly used as a standalone formula that will be centered
  •  

$conf['h5p_library_config'] = array(

  "H5P.MathDisplay" => array(

    "observers" => array(

      array("name" => "mutationObserver", "params" => array("cooldown" => 500)),

      array("name" => "domChangedListener"),

      array("name" => "interval", "params" => array("time" => 1000))

    ),

    "renderer" => array(

      "mathjax" => array(

        "src" => "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js",

        "config" => array(

          "extensions" => array("tex2jax.js"),

          "jax" => array("input/TeX", "output/HTML-CSS"),

          "tex2jax" => array(

            // Important, otherwise MathJax will be rendered inside CKEditor

            "ignoreClass" => "ckeditor"

          ),

          "messageStyle" => "none"

        )

      )

    )

  )

);