flutter_tex icon indicating copy to clipboard operation
flutter_tex copied to clipboard

TeX not parsed

Open Seamate opened this issue 1 year ago • 0 comments

TeX is not parsed when used with the Flutter Html package as a tag extension

Is there something I am not doing right?

                           Html(
                            style: {
                              
                               'p': Style(
                                fontSize: FontSize(20),
                                margin: Margins.symmetric(vertical: 10),
                              ),    
                                  'body': Style(fontSize: FontSize(20))
                            },
                            data: lessonContent,
                            extensions: [
                              TagExtension(
                                  tagsToExtend: {"tex"},
                                  builder: (extensionContext) {
                                    return SingleChildScrollView(
                                        child: Center(
                                            child: Container(
                                      padding: EdgeInsets.all(8),
                                      decoration: BoxDecoration(
                                          color: Color.fromARGB(
                                              255, 231, 231, 231),
                                          borderRadius:
                                              BorderRadius.circular(10)),
                                      
                                      child: TeXView(
                                        renderingEngine:
                                            TeXViewRenderingEngine.katex(),
                                        child: TeXViewDocument(
                                            extensionContext.innerHtml),
                                      ),
                                    )));
                                  }),
                            ],
                          )

Please help on how I can achieve this.

Seamate avatar Jan 17 '24 08:01 Seamate