latex update
This commit is contained in:
@@ -45,6 +45,12 @@ class Preaccept extends Base
|
||||
}else{
|
||||
$list[$k]['is_repeat'] = 0;
|
||||
}
|
||||
if(strpos($v['refer_content'],'retraction')!==false||strpos($v['refer_content'],'retracted')!==false){
|
||||
$list[$k]['retract'] = 1;
|
||||
}else{
|
||||
$list[$k]['retract'] = 0;
|
||||
}
|
||||
|
||||
}
|
||||
$re["refers"] = $list;
|
||||
$re['repeat'] = empty($aRepeat) ? [] : $aRepeat;
|
||||
|
||||
@@ -632,6 +632,11 @@ class Production extends Base
|
||||
} else {
|
||||
$list[$k]['is_repeat'] = 0;
|
||||
}
|
||||
if(strpos($v['refer_content'],'retraction')!==false||strpos($v['refer_content'],'retracted')!==false){
|
||||
$list[$k]['retract'] = 1;
|
||||
}else{
|
||||
$list[$k]['retract'] = 0;
|
||||
}
|
||||
}
|
||||
$re['refers'] = $list;
|
||||
$re['repeat'] = empty($aRepeat) ? [] : $aRepeat;
|
||||
@@ -2243,9 +2248,15 @@ class Production extends Base
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$info = $this->article_main_obj->where("am_id",$data['id'])->find();
|
||||
if(isset($data["code"])){
|
||||
$content = $data['code'];
|
||||
}else{
|
||||
$content = $info['content'];
|
||||
}
|
||||
|
||||
$production_info = $this->production_article_obj->where("article_id",$info['article_id'])->find();
|
||||
$refers = $this->production_article_refer_obj->where("p_article_id",$production_info['p_article_id'])->where('state',0)->order("index")->select();
|
||||
$res = $this->convertToLatex($info['content'],$refers);
|
||||
$res = $this->convertToLatex($content,$refers);
|
||||
echo $res;
|
||||
// return jsonSuccess([$res]);
|
||||
}
|
||||
@@ -2259,9 +2270,9 @@ class Production extends Base
|
||||
return '';
|
||||
}
|
||||
//单行处理公式内容
|
||||
$pattern = '/^<wmath\s+data-latex="([^"]*)">.*<\/wmath>$/';
|
||||
$pattern = '/^<wmath[^>]*?\s+data-latex="([^"]*)"[^>]*?>.*?<\/wmath>$/';
|
||||
if(preg_match($pattern, $content) === 1){
|
||||
$pattern1 = '/<wmath\s+data-latex="([^"]*)">/';
|
||||
$pattern1 = '/<wmath[^>]*?\s+data-latex="([^"]*)">/';
|
||||
if (preg_match($pattern1, $content, $matches)) {
|
||||
$latexContent = $matches[1];
|
||||
// 将 $$ 转换为 $,因为equation环境不需要$$
|
||||
|
||||
Reference in New Issue
Block a user