我怎样才能将小文本框放入大文本框中?

我怎样才能将小文本框放入大文本框中?

如何将一个小文本框放入另一个更大的文本框(即图形)内?(可能类似于手动添加盒式图例。)

我正在寻找这样的东西:

_________
|aaa bbb|
|ccc ---|
|ddd |ee|
---------

我尝试过“\begin{subfigure}...\end{subfigure}”,但我不知道如何定位它(真的,除了位置说明符之外,我没有任何线索)。以下是起始代码;理想情况下,“a b”框应与“大量文本”框的右下角重叠。

\begin{figure}[t]
\begin{center}
\scalebox{0.8}{
\begin{boxedminipage}[t]{5in}
\begin{tabbing}
lots of text lots of text  \\
lots of text lots of text \\
lots of text lots of text \\
lots of text lots of text  \\
lots of text lots of text  \\
lots of text \\
lots of text \\
lots of text \\
lots of text \\
\end{tabbing}
\end{boxedminipage}}
\end{center}
\vspace{-0.2in}
\begin{boxedminipage}[b]{0.5in}
\begin{subfigure}
a \\
b \\
\end{subfigure}
\end{boxedminipage}
\caption{a caption}
\vspace{-0.2in}
\end{figure}

答案1

一个选项是使用文档不完善的包,在普通浮点中picinpar创建一个图像。一些注意事项:window

(1)据我所知,没有底部选项,但垂直位置可以通过要跳过的行数来控制(第一个选项)。

(2) 如果您想要为图像添加编号标题,而不是为整个浮动添加编号标题,请使用figwindowinsteafwindow环境。请注意,使用 captiondefcapt-ofcaption包制作的自定义标题在这里不起作用。

picins(3)建议使用软件包来代替picinpar。遗憾的是,在 TeXLive 发行版中不可用,但如果 有问题,您可以从 CTAN 下载它picinpar

另一方面,如果必须为主浮动添加边框,则可以使用minipage\fbox 内部的 (例如,参见 MWE)。或者更简单,使用framedmdframed环境(两者都需要同名的包)。

\documentclass{article}
\usepackage[demo]{graphicx} % option demo to use fake images
\usepackage{lipsum}         % dummy text
\usepackage{picinpar}       % win­dows in para­graphs

\begin{document}

\begin{figure}[t]
\fbox{  
\begin{minipage}{1\textwidth}
\begin{window}[%
6,% lines above
r,% position
\includegraphics[width=.5\textwidth]{some.jpg},% 
A simple caption% the subcaption
]
\lipsum[1]  
\end{window}
\end{minipage}
}
\caption{A figure float with a pseudo-subfloat inside.}
\end{figure}
\end{document}

平均能量损失

相关内容