# poi-tl-htmllatex-ex **Repository Path**: chenfoxin/poi-tl-htmllatex-ex ## Basic Information - **Project Name**: poi-tl-htmllatex-ex - **Description**: 对于poi-tl和poi-tl-ex的两个扩展包的整合,新增HtmlLatexRenderPolicy,能够支持富文本形式中混有公式的解析的情况。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 7 - **Forks**: 3 - **Created**: 2021-06-24 - **Last Updated**: 2025-05-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # poi-tl-htmllatex-ex #### 介绍 结合当前我在公司自己手头上的业务需要导出富文本混合latex公式形式的word文档,于是对poi-tl和poi-tl-ex的两个扩展包的整合,借鉴poi-tl-ex中的HtmlRenderPolicy的实现方式新增HtmlLatexRenderPolicy,能够实现富文本形式中混有Latex公式的解析的这种效果。 #### 原组件github地址 https://github.com/Sayi/poi-tl #### 富文本支持扩展组件github地址 https://github.com/draco1023/poi-tl-ext 在这里很感谢poi-tl-ext的组件作者(@draco1023)的耐心解答,感谢感谢!!! 案例,还是原来poi-tl的用法 ``` HtmlLatexRenderPolicy htmlLatexRenderPolicy = new HtmlLatexRenderPolicy(); Configure configure = Configure.builder() .bind("title",htmlLatexRenderPolicy) .build(); Map data = new HashMap<>(); data.put("title","
测试文本$$f\\left( x\\right)=\\frac{x}{x+1}+\\frac{x+1}{x+2}+\\frac{x+2}{x+3}$$测试文本
"); XWPFTemplate xwpfTemplate = XWPFTemplate.compile("路径.docx", configure); xwpfTemplate.render(data); xwpfTemplate.writeToFile("路径.docx"); ```