idyll icon indicating copy to clipboard operation
idyll copied to clipboard

couldn`t convert string f \mathbin⨾ g \in \operatorname{hom}(A, C)

Open suhr opened this issue 3 years ago • 3 comments

Describe the bug

Idyll fails to render math formulae with symbol.

To Reproduce Steps to reproduce the behavior:

  1. [Equation]f \mathbin⨾ g \in \operatorname{hom}(A, C)[/Equation]

Expected behavior

Idyll should show the formula correctly.

Desktop:

  • OS: NixOS
  • Browser: Firefox
  • Version: 84.0.2

Additional context

KaTeX actually shows this correctly: https://katex.org/?data=%7B%22displayMode%22%3Atrue%2C%22leqno%22%3Afalse%2C%22fleqn%22%3Afalse%2C%22throwOnError%22%3Atrue%2C%22errorColor%22%3A%22%23cc0000%22%2C%22strict%22%3A%22warn%22%2C%22output%22%3A%22htmlAndMathml%22%2C%22trust%22%3Afalse%2C%22macros%22%3A%7B%22%5C%5Cf%22%3A%22%231f(%232)%22%7D%2C%22code%22%3A%22f%20%5C%5Cmathbin%E2%A8%BE%20g%20%5C%5Cin%20%5C%5Coperatorname%7Bhom%7D(A%2C%20C)%22%7D. But it warns on a non-standard symbol, so if you enable strict mode, it throws an error. It seems like Idyll is overly strict on math, and there seems to be no option to make it less strict.

suhr avatar Jan 26 '21 19:01 suhr

Will keep this open because it should parse, but does [Equation latex:"f \mathbin⨾ g \in \operatorname{hom}(A, C)" /] work as a workaround?

mathisonian avatar Jan 27 '21 04:01 mathisonian

No, unfortunately.

suhr avatar Jan 27 '21 08:01 suhr

Got it - thanks for reporting @suhr. That leads me to suspect the bug is coming from the compiler rather than the [Equation] component. I'll dig into it and report back what i find

mathisonian avatar Jan 30 '21 02:01 mathisonian