插入表格的简单方法?

发布于 2024-08-23 21:26:50 字数 1459 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉城 2024-08-30 21:26:50
\begin{wraptable}{O}{0.5\columnwidth}
% 0.5\columnwidth is 50% of the width for text. It will wrap to the "outer"
% of the current page, and thus if you have double-sided print, it'll still look
% good.
\begin{centering}
% The centering will look nice (else it's left-aligned, which isn't nice)
\begin{tabular}{|c|c|}
% Having your own tabular here.
\hline
Hello & World\tabularnewline
\hline
\hline 
Stack & Overflow!\tabularnewline
\hline
% End of content.
\end{tabular}
\par % Add for spacing
\end{centering}
\caption{Test Table}
% Enter your caption (a float having a caption looks cool)
\end{wraptable}

这将使表格换行并显示。漂浮。如果您熟悉 HTML 中的浮动,这看起来与它们类似。

\begin{wraptable}{O}{0.5\columnwidth}
% 0.5\columnwidth is 50% of the width for text. It will wrap to the "outer"
% of the current page, and thus if you have double-sided print, it'll still look
% good.
\begin{centering}
% The centering will look nice (else it's left-aligned, which isn't nice)
\begin{tabular}{|c|c|}
% Having your own tabular here.
\hline
Hello & World\tabularnewline
\hline
\hline 
Stack & Overflow!\tabularnewline
\hline
% End of content.
\end{tabular}
\par % Add for spacing
\end{centering}
\caption{Test Table}
% Enter your caption (a float having a caption looks cool)
\end{wraptable}

This will let the tabular wrap & float. This looks similar to the floats in HTML, if you're familiar with them.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文