Skip to content

Typesetting and Converting Mathematics - errors in the code() example #293

Open
@raph-of-burgondy

Description

@raph-of-burgondy

Hi,

In "Typesetting and Converting Mathematics" , there are two errors in the code() example

  • the function is named "typeset" instead of "code"
  • the code function must returns an iterable

So :

typeset(() => {
  const math = document.querySelector('#math');
  math.innerHTML = '$$\\frac{a}{1-a^2}$$';
  return math;
});

must be replaced by :

code(() => {
  const math = document.querySelector('#math');
  math.innerHTML = '$$\\frac{a}{1-a^2}$$';
  return [math];
});

br,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions