Latex多图片灵活排版

tech2025-02-14  9

转自使用floatrow宏包处理浮动体此宏包支持各种浮动体排版,不仅仅是图片我在这里只摘摘录了几个原文的简单代码,并附上效果图 \begin{figure}[!htp] \begin{floatrow} \ffigbox[\FBwidth] { \includegraphics[width=0.45\textwidth]{1} \includegraphics[width=0.45\textwidth]{2} } {\caption{共享题注}\label{sharefig:a}} \end{floatrow} \end{figure}

\begin{figure}[!htp] \begin{floatrow} \ffigbox[\FBwidth] { \includegraphics[width=0.45\textwidth]{1} } {\caption{独立题注}\label{sepfig:a}} \ffigbox[\FBwidth] { \includegraphics[width=0.45\textwidth]{2} } {\caption{独立题注}\label{sepfig:b}} \end{floatrow} \end{figure}

\begin{figure}[!htp] \begin{floatrow} \ffigbox[\textwidth]{ \begin{subfloatrow}[2] \ffigbox[\FBwidth]{ \includegraphics[width=0.45\textwidth]{2} }{\caption{子题注}\label{subfig:a}} \ffigbox[\FBwidth]{ \includegraphics[width=0.45\textwidth]{1} }{\caption{子题注}\label{subfig:b}} \end{subfloatrow} }{\caption{共享题注带子题注}\label{fig:sub}} \end{floatrow} \end{figure}

\begin{figure}[!htp] \ffigbox[\textwidth] { \begin{subfloatrow}[2]%useFCwidth \ffigbox[\FBwidth]{ \includegraphics[width=0.4\textwidth]{1} }{\caption{子题注1}\label{trifig:a}} \ffigbox[\FBwidth]{ \includegraphics[width=0.4\textwidth]{2} }{\caption{子题注2}\label{trifig:b}} \end{subfloatrow} \begin{subfloatrow}[2]%useFCwidth \ffigbox[\FBwidth]{ \includegraphics[width=0.4\textwidth]{3} }{\caption{子题注3}\label{trifig:c}} \ffigbox[\FBwidth]{ \includegraphics[width=0.4\textwidth]{4} }{\caption{子题注4}\label{trifig:d}} \end{subfloatrow} }{\caption{四个子图}\label{trifig}} \end{figure}

最新回复(0)