dirtree 在其中一个表格单元格中创建的图形

dirtree 在其中一个表格单元格中创建的图形

我希望将文本列表和figure使用dirtree并排放置。因此,我使用表格环境,在一个单元格中放置itemized列表,在另一个单元格中放置figure环境。这不起作用。示例代码如下:

\begin{tabular}[h]{@{} p{0.35\linewidth} | p{0.6\linewidth}@{}} 

    \begin{itemize}[noitemsep,topsep=2pt,parsep=2pt,partopsep=2pt,leftmargin=*]
    \item something
    \end{itemize}

&

\begin{figure}%[htp]
\dirtree{%
.1 Sheet Metal Features.
.2 Principal Features.
.3 Face-Wall   \adjustbox{valign=t}{\includegraphics[scale=0.65]{..//Common/images/InventorWall.png}}.
.3 Bend   \qquad \adjustbox{valign=t}{\includegraphics[scale=0.65]{..//Common/images/InventorBend.png}}.
.3 Flange  \quad \adjustbox{valign=t}{\includegraphics[scale=0.65]{..//Common/images/InventorFlange.png}}.
.3 Loft Flange  \qquad \adjustbox{valign=t}{\includegraphics[scale=0.65]{..//Common/images/InventorLoftedFlange.png}}.
%.3 Rib \quad \quad  \adjustbox{valign=t}{\includegraphics[height=0.11\linewidth]{..//Common/images/Feature_Rib.png}}.
}
\caption{Sheet Metal features}
\label{tax_sm}
\end{figure}
\\
\end{tabular}

答案1

Afigure是浮动环境,因此不能嵌入到tabular

\captionof您可以通过capt-of

平均能量损失

\RequirePackage[demo]{graphicx}

\documentclass{article}

\usepackage{dirtree}
\usepackage{enumitem}
\usepackage{capt-of}
\usepackage{adjustbox}

\begin{document}

\begin{tabular}[h]{@{} p{0.35\linewidth} | p{0.6\linewidth}@{}}

    \begin{itemize}[noitemsep,topsep=2pt,parsep=2pt,partopsep=2pt,leftmargin=*]
    \item something
    \end{itemize}

&

\dirtree{%
.1 Sheet Metal Features.
.2 Principal Features.
.3 Face-Wall   \adjustbox{valign=t}{\includegraphics[scale=0.65]{..//Common/images/InventorWall.png}}.
.3 Bend   \qquad \adjustbox{valign=t}{\includegraphics[scale=0.65]{..//Common/images/InventorBend.png}}.
.3 Flange  \quad \adjustbox{valign=t}{\includegraphics[scale=0.65]{..//Common/images/InventorFlange.png}}.
.3 Loft Flange  \qquad \adjustbox{valign=t}{\includegraphics[scale=0.65]{..//Common/images/InventorLoftedFlange.png}}.
%.3 Rib \quad \quad  \adjustbox{valign=t}{\includegraphics[height=0.11\linewidth]{..//Common/images/Feature_Rib.png}}.
}
\captionof{figure}{Sheet Metal features}
\label{tax_sm}
\\
\end{tabular}

\end{document} 

输出

在此处输入图片描述

相关内容