samwilson / commonmark-latex

A LaTeX renderer extension for the League\CommonMark package.
https://packagist.org/packages/samwilson/commonmark-latex
GNU General Public License v3.0
6 stars 0 forks source link

Unknown environment 'enumerate' / 'itemize' #9

Open michabbb opened 2 weeks ago

michabbb commented 2 weeks ago

hi, do you have an idea why i am getting these errors ??

$environment
            ->addExtension(new CommonMarkCoreExtension())
            ->addExtension(new GithubFlavoredMarkdownExtension())
            ->addExtension(new ExternalLinkExtension())
            ->addExtension(new LatexRendererExtension())
            ->addRenderer(FencedCode::class, new CodeBlockRenderer($highlighter))
            ->addRenderer(Code::class, new InlineCodeBlockRenderer($highlighter));

        return (new MarkdownConverter($environment))->convert($text);

using "tempest/highlight": "^2.10"

samwilson commented 2 weeks ago

I assume you mean that the error message you're getting is "Unknown environment 'enumerate' / 'itemize'"?

Is that a latex error? Do you mean that there are other errors as well?

Could you expand your example to actually be usable, with all details? i.e. if that's a latex error then the code you've got here is not going to actually produce that error.

samwilson commented 2 weeks ago

Oh, and thanks for reporting the issue! I didn't mean to come across as grumpy. :-)

michabbb commented 2 weeks ago

pardon, i switched to <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script> because i had to find a working solution. as soon i have time, I will try to create a working example project for you. sorry!