多语言展示
当前在线:1293今日阅读:84今日分享:32

Latex如何在表格中插入图片?

这篇文章介绍1. Latex如何在表格中插入图片;2. Latex表格图形互相插入并编号;3. Latex中如何将两张图片并排放置并编号;
工具/原料

Latex

方案1:Latex表格里面嵌入图形

表格里面嵌入图形,下面代码编译结果如下,% Please add the following required packages to your document preamble:% \usepackage{booktabs}% \usepackage{graphicx}\begin{table}\caption{My caption}\label{my-label}\resizebox{\textwidth}{!}{%\begin{tabular}{@{}lllllll@{}}\topruleDiameter & \tabincell{c}{ Mass \\fraction}  & \tabincell{c}{Nodal \\ displacement\\ Point A(cm)} & \tabincell{c}{ Macro \\ strucure } & ~~ \tabincell{c}{ Micro \\ strucure }  & \tabincell{c}{ Effective \\ elasticity matrix \\ $\bm{D}^{\rm{H}}(\times 10^{10} \rm{Pa})$}& \tabincell{c}{ Effective thermal\\ conductivity matrix \\ $\bm{\kappa}^{\rm{H}} \rm{(W/(m\cdot K))} $ }\\ \midrule5l/8 & 0.358 & 0.8 & \begin{minipage}{0.1\textwidth}      \includegraphics{tablemac01.png}    \end{minipage} & ~~~ \begin{minipage}{0.1\textwidth}      \includegraphics[width=10mm, height=10mm]{tablemic01.png}    \end{minipage} & $ \begin{bmatrix}9.8027 &1.7863  &0 \\ 1.7863& 1.9910 &0 \\0 & 0 & 1.9025\end{bmatrix} $ & $\begin{bmatrix}17.6935 & 0\\0 & 7.2114\end{bmatrix}$ \\l/2 & 0.365 & 0.8 & \begin{minipage}{0.1\textwidth}      \includegraphics{tablemac02.png}    \end{minipage}  & ~~~ \begin{minipage}{0.1\textwidth}      \includegraphics[width=10mm, height=10mm]{tablemic02.png}    \end{minipage}  & $\begin{bmatrix}9.5829 &1.5858  &0 \\ 1.5858& 1.9910 &0 \\0 & 0 & 1.6686\end{bmatrix}$ & $\begin{bmatrix}17.4168 & 0\\0 & 7.5532\end{bmatrix}$ \\3l/8 & 0.369 & 0.8 & \begin{minipage}{0.1\textwidth}      \includegraphics{tablemac02.png}    \end{minipage}  &~~~ \begin{minipage}{0.1\textwidth}      \includegraphics[width=10mm, height=10mm]{tablemic02.png}    \end{minipage}   & $\begin{bmatrix}9.7710 &1.6096  &0 \\ 1.6096 & 2.3651 &0 \\0 & 0 & 1.6805\end{bmatrix}$ & $\begin{bmatrix}17.6979 & 0\\0 & 7.2430\end{bmatrix} $ \\ \bottomrule\end{tabular}%}\end{table}

方案2:Latex表格图形互相插入并编号

Latex表格图形互相插入并编号,下面代码编译结果如下,\begin{figure}        \centering       \begin{tabular}{cc}         %\hline         % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...         \begin{minipage}{0.1\textwidth}      \includegraphics[width=50mm, height=30mm]{tiger.jpg}    \end{minipage}   & \begin{minipage}{0.1\textwidth}      \includegraphics[width=50mm, height=30mm]{tiger.jpg}    \end{minipage}   \\         (a) & (b) \\        $ \begin{bmatrix}9.8027 &1.7863  &0 \\ 1.7863& 1.9910 &0 \\0 & 0 & 1.9025\end{bmatrix} $ & $\begin{bmatrix}9.8027 &1.7863  &0 \\ 1.7863& 1.9910 &0 \\0 & 0 & 1.9025\end{bmatrix} $ \\         (c) & (d) \\        % \hline       \end{tabular}       \caption{SSSS}\end{figure}%

方案3:Latex表格图形互相插入并编号

Latex表格图形互相插入并编号,下面代码编译结果如下,\begin{figure}        \centering       \begin{tabular}{cc}         %\hline         % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...         \begin{minipage}{0.1\textwidth}      \includegraphics[width=50mm, height=30mm]{tiger.jpg}    \end{minipage}   & \begin{minipage}{0.1\textwidth}      \includegraphics[width=50mm, height=30mm]{tiger.jpg}    \end{minipage}   \\         (a) & (b) \\        $ \begin{bmatrix}9.8027 &1.7863  &0 \\ 1.7863& 1.9910 &0 \\0 & 0 & 1.9025\end{bmatrix} $ & $\begin{bmatrix}9.8027 &1.7863  &0 \\ 1.7863& 1.9910 &0 \\0 & 0 & 1.9025\end{bmatrix} $ \\         (c) & (d) \\        % \hline       \end{tabular}       \caption{SSSS}\end{figure}

方案4:Latex中如何将两张图片并排放置并编号

\begin{figure}\begin{center}\begin{minipage}{120mm}\subfigure[An example of an individual figure sub-caption.]{\resizebox*{6cm}{!}{\includegraphics{senu_gr1.eps}}}\hspace{5pt}\subfigure[An example of an individual figure sub-caption.]{\resizebox*{6cm}{!}{\includegraphics{senu_gr2.eps}}}\caption{\label{fig2} Example of a two-part figure with individualsub-captions showing that captions are flush left and justified ifgreater than one line of text, otherwise centred under the figure.}\label{sample-figure}\end{minipage}\end{center}\end{figure}

注意事项

欢迎提问,有问必答, 如果对您帮助,请在下面投票,您的认可是我不断分享的动力!

推荐信息