From 1c42d66ce87c14794117094310806c36dd13a177 Mon Sep 17 00:00:00 2001
From: atxy <181850195@smail.nju.edu.cn>
Date: Wed, 22 Sep 2021 14:59:11 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E4=BA=86subfigure?=
 =?UTF-8?q?=E6=94=AF=E6=8C=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 chapters/FigTabCode.tex | 20 ++++++++++++++++++++
 njuthesis.dtx           | 32 +++++++++++++++++++++++++++-----
 2 files changed, 47 insertions(+), 5 deletions(-)

diff --git a/chapters/FigTabCode.tex b/chapters/FigTabCode.tex
index 968dae3..92f1dc0 100644
--- a/chapters/FigTabCode.tex
+++ b/chapters/FigTabCode.tex
@@ -26,6 +26,26 @@
 \end{wrapfigure}
 \zhlipsum[3][name=xiangyu]
 
+\begin{figure}[h]
+    \begin{subfigure}{.32\textwidth}
+        \centering
+        \includegraphics[width=\textwidth]{njulogo}  
+        \caption{logo1}
+    \end{subfigure}
+    \begin{subfigure}{.32\textwidth}
+        \centering
+        \includegraphics[width=\textwidth]{njulogo}  
+        \caption{logo2}
+    \end{subfigure}
+    \begin{subfigure}{.32\textwidth}
+        \centering
+        \includegraphics[width=\textwidth]{njulogo}  
+        \caption{logo3}
+    \end{subfigure}
+    \caption{njulogos}
+\end{figure}
+    
+
 
 \section{琛ㄦ牸绀轰緥}
 \begin{table}[htbp]
diff --git a/njuthesis.dtx b/njuthesis.dtx
index d3b242a..a9afb27 100644
--- a/njuthesis.dtx
+++ b/njuthesis.dtx
@@ -671,7 +671,7 @@ through XeTeX.
 % 涓嬮潰杩欎釜渚嬪瓙灞曠ず浜嗗浣曟彃鍏ヤ竴寮犲悕绉颁负\file{myfig.jpg}锛屽搴﹀崰椤甸潰鏂囧瓧瀹藉害涓€鍗婄殑鍥剧墖銆傛敞鎰忔爣绛惧懡浠\label|蹇呴』鏀惧湪鍥炬敞鍛戒护|\caption|涔嬪悗銆�
 %
 % \begin{ctexexam}
-%   \begin{figure}
+%   \begin{figure}[h]
 %       \includegraphics[width=0.5\textwidth]{myfig}
 %       \caption{鎴戠殑鍥緘
 %       \label{fig:myfig}
@@ -690,7 +690,28 @@ through XeTeX.
 %   <text>
 % \end{ctexexam}
 % 
-% TODO锛歴ubfigure
+% TODO锛歴ubfigure \pkg{subcaption}
+%
+% \begin{ctexexam}
+%   \begin{figure}
+%       \begin{subfigure}{.32\textwidth}
+%          \centering
+%          \includegraphics[width=\textwidth]{fig1}  
+%          \caption{fig1}
+%       \end{subfigure}
+%       \begin{subfigure}{.32\textwidth}
+%          \centering
+%           \includegraphics[width=\textwidth]{fig2}  
+%           \caption{fig2}
+%       \end{subfigure}
+%       \begin{subfigure}{.32\textwidth}
+%           \centering
+%           \includegraphics[width=\textwidth]{fig3}  
+%           \caption{fig3}
+%       \end{subfigure}
+%       \caption{subfigures}
+%   \end{figure}
+% \end{ctexexam}
 %
 % \subsubsection{琛ㄦ牸}
 %
@@ -1144,11 +1165,12 @@ through XeTeX.
         ]{unicode-math} % Math fonts in xetex or luatex
 %    \end{macrocode}
 %
-% 閰嶇疆鍥剧墖璺緞
+% 閰嶇疆鍥剧墖
 %    \begin{macrocode}
 \RequirePackage{graphicx}
 \DeclareGraphicsExtensions{.pdf,.eps,.jpg,.png}
 \graphicspath{{figure/}} % 鍥剧墖璺緞
+\RequirePackage{subcaption}
 \RequirePackage{wrapfig} % Wrap text around figures
 %    \end{macrocode}
 %
@@ -1750,8 +1772,8 @@ through XeTeX.
 % 鍥捐〃鏍囬鏍峰紡
 \DeclareCaptionFont{songticap}{\zihao{5}\bf\songti}
 \captionsetup{
-    font=small,%
-    labelfont=songticap,
+  font=small,%
+  labelfont=songticap,
 	textfont=songticap,
 	strut=no,%
 	hypcap=true, % Links point to the top of the figure
-- 
GitLab