From d037609f4ad0b66c0d28e40f31e96f688efe2f66 Mon Sep 17 00:00:00 2001 From: chengxl Date: Thu, 26 Feb 2026 14:57:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E7=89=87=E7=BB=91?= =?UTF-8?q?=E5=AE=9Alabel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/LatexContent.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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'],[]).'}}';