code: def _init_math_handler(self):
          
          fields = self.settings.math_output.split(None, 1)
          name = fields[0].lower()
          option = fields[1] if len(fields) > 1 else None
          if name == 'html':
              option = self.settings.math_css or option
              self.math_handler = HTMLMathHandler(css_filename=option)
          elif name == 'mathml':
              if option:
                  raise ValueError(('Math handler "%s" does not support ' +
                                   'option "%s".') % (name, option))
              self.math_handler = MathMLMathHandler()
          elif name == 'mathjax':
              # The MathJax handler can be configured via different ways:
              #
              # - By passing an additional JS url to "--math-output"
              #   (to stay backwards-compatible with docutils)
              #
              # - By using "--mathjax-opts" (to stay backwards compatible
              #   with the previous html5css3 mathjax postprocessor)
              #
              # - By using "--mathjax-url" and "--mathjax-config" (the
              #   preferred way)
              js_url = option
              config = None
              if self.settings.mathjax_opts:
                  parts = self.settings.mathjax_opts.split(',')
                  options = dict(part.split('=', 1) for part in parts)
                  js_url = options.get('url', js_url)
                  config = options.get('config', config)
              js_url = self.settings.mathjax_url or js_url
              config = self.settings.mathjax_config or config
              self.math_handler = MathJaxMathHandler(js_url=js_url,
                                                     config_filename=config)
          elif name == 'latex':
              if option:
                  raise ValueError(('Math handler "%s" does not support ' +
                                   'option "%s".') % (name, option))
              self.math_handler = LaTeXMathHandler()
          else:
              raise ValueError('Unknown math handler "%s".' % name)
docs: Parse math configuration and set up math handler.