修改图片绑定label
This commit is contained in:
@@ -701,22 +701,21 @@ page={{stage_page}},%号
|
|||||||
$latexLines[] = " \\includegraphics[width=0.9\\textwidth]{" . $sImageUrl . "}";
|
$latexLines[] = " \\includegraphics[width=0.9\\textwidth]{" . $sImageUrl . "}";
|
||||||
}
|
}
|
||||||
|
|
||||||
//添加图片的label
|
|
||||||
$ami_id = empty($aImageInfo['ami_id']) ? 0 : $aImageInfo['ami_id'];
|
|
||||||
if(!empty($ami_id)){
|
|
||||||
$latexLines[] = " \\label{fig:" . $ami_id . "}";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($aImageInfo['title']) && !empty($aImageInfo['note'])){
|
if(!empty($aImageInfo['title']) && !empty($aImageInfo['note'])){
|
||||||
$escapedTitle = '{\fontspec{Calibri}\footnotesize\bfseries\color{figerTitleColor} '.$this->dealContent(preg_replace('/^Figure\s+\d+\s*/i', '', $aImageInfo['title']),[]).'}\\\\';
|
$escapedTitle = '{\fontspec{Calibri}\footnotesize\bfseries\color{figerTitleColor} '.$this->dealContent(preg_replace('/^Figure\s+\d+\s*/i', '', $aImageInfo['title']),[]).'}\\\\';
|
||||||
$escapedTitle .= '{\vspace{0.5em}\raggedright\small {'.$this->dealContent($aImageInfo['note'],[]).'}}';
|
$escapedTitle .= '{\vspace{0.5em}\raggedright\small {'.$this->dealContent($aImageInfo['note'],[]).'}}';
|
||||||
$latexLines[] = " \\caption{" . $escapedTitle . "}";
|
$latexLines[] = " \\caption{" . $escapedTitle . "}";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($ami_info['title'])) {
|
if (!empty($aImageInfo['title']) && empty($aImageInfo['note'])) {
|
||||||
$escapedTitle = $this->dealContent(preg_replace('/^Figure\s+\d+\s*/i', '', $ami_info['title']),[]);
|
$escapedTitle = $this->dealContent(preg_replace('/^Figure\s+\d+\s*/i', '', $aImageInfo['title']),[]);
|
||||||
$latexLines[] = " \\caption{" . $escapedTitle . "}";
|
$latexLines[] = " \\caption{" . $escapedTitle . "}";
|
||||||
}
|
}
|
||||||
|
//添加图片的label
|
||||||
|
$ami_id = empty($aImageInfo['ami_id']) ? 0 : $aImageInfo['ami_id'];
|
||||||
|
if(!empty($ami_id)){
|
||||||
|
$latexLines[] = " \\label{fig:" . $ami_id . "}";
|
||||||
|
}
|
||||||
$latexLines[] = "\\end{figure" . ($isWideImage ? "*" : "") . "}";
|
$latexLines[] = "\\end{figure" . ($isWideImage ? "*" : "") . "}";
|
||||||
|
|
||||||
return ['status' => 1,'msg' => 'success','data' => implode("\n", $latexLines)];
|
return ['status' => 1,'msg' => 'success','data' => implode("\n", $latexLines)];
|
||||||
|
|||||||
Reference in New Issue
Block a user