diff --git a/application/common/LatexContent.php b/application/common/LatexContent.php index e241dde..880f61d 100644 --- a/application/common/LatexContent.php +++ b/application/common/LatexContent.php @@ -701,8 +701,12 @@ page={{stage_page}},%号 $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'])){ $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'],[]).'}}';