latex update
This commit is contained in:
@@ -2226,7 +2226,18 @@ class Production extends Base
|
||||
return '';
|
||||
}
|
||||
//单行处理公式内容
|
||||
$pattern = '/^<wmath\s+data-latex="([^"]*)">.*<\/wmath>$/';
|
||||
if(preg_match($pattern, $content) === 1){
|
||||
$pattern1 = '/<wmath\s+data-latex="([^"]*)">/';
|
||||
if (preg_match($pattern1, $content, $matches)) {
|
||||
$latexContent = $matches[1];
|
||||
// 将 $$ 转换为 $,因为equation环境不需要$$
|
||||
$latexContent = str_replace('$$', '', $latexContent);
|
||||
|
||||
return "\\begin{equation}\n\t{$latexContent}\n\\end{equation}";
|
||||
}
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user