ForNeVeR / xaml-math

A collection of .NET libraries for rendering mathematical formulae using the LaTeX typesetting style, for the WPF and Avalonia XAML-based frameworks
MIT License
637 stars 100 forks source link

Feature Request:enclose{circle} #386

Open Ygoalll opened 1 year ago

Ygoalll commented 1 year ago

I tried to use TeXFormula.createBufferedImage("\enclose{circle}{\mathrm{III}}", style, size, fg, bg) but it threw an exception "Unknown symbol or command or predefined TeXFormula: 'enclose'". If you have time, could you update the '\enclose{circle}' command? Alternatively, do you have any other way to generate the same output?

ForNeVeR commented 1 year ago

Oh, \enclose will be a tricky one. I'll mark this as a feature request for now.

ForNeVeR commented 1 year ago

Also, which package provides that? I wasn't able to make latexbase to render it:

image
Ygoalll commented 1 year ago

<script> MathJax = { tex: { inlineMath: [['$', '$'], ['\\(', '\\)']], tags: 'ams', packages: {'[+]': ['enclose']} }, loader: {load: ['[tex]/enclose']}, }; </script>

image

Should be these. The front-end generated this, but I also need the corresponding ones for my back-end.Thanks。

ForNeVeR commented 1 year ago

It looks like \enclose is exclusively provided by MathJax, and has nothing to do with the real LaTeX (see also this).

I am not against implementing a subset of MathJax in XAML-Math, but that won't be easy, I feel (that feeling is unrelated to the command being in the LaTeX or MathJax, but just a general commentary on this particular feature).

Ygoalll commented 1 year ago

fine