LaTeX 中的非常宽的表

发布于 2024-09-18 16:17:02 字数 124 浏览 4 评论 0原文

有没有办法让 LaTeX 中的表格在宽度方向而不是长度方向跨越多个页面?据我所知,longtable 和 supertabular 都会在多个页面上打破表格,但只能在行之间打破,而我需要在列之间打破。如果可以在每页上重复几列就更好了。

Is there a way to have a table in LaTeX that spans multiple pages width-wise, rather than length-wise? As far as I can tell, both longtable and supertabular will break tables over multiple pages, but only by breaking between rows and I need to break between columns. Even better would be if it were possible to have a few columns repeated at on each page.

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

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

发布评论

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

评论(3

携君以终年 2024-09-25 16:17:02

我正在使用这个不太好的手动配置代码来分割太宽的表格:

\usepackage{tikz}

\newsavebox{\boxFinal}
\begin{lrbox}{\boxFinal}
  \scalebox{0.6}{
  \begin{tabular}{...}
...
  \end{tabular}
  }
\end{lrbox}

\begin{table}[htb]
  \centering
  \begin{tikzpicture}
    \clip (0,-\dp\boxFinal) rectangle (0.5\wd\boxFinal,\ht\boxFinal);
    \pgftext[left,base]{\usebox{\boxFinal}};
  \end{tikzpicture}
  \label{table_test1}\caption{Part 1 of 2.}
\end{table}

\begin{table}[htb]
  \centering
  \begin{tikzpicture}
    \clip (0.5\wd\boxFinal,-\dp\boxFinal) rectangle
      (\wd\boxFinal,\ht\boxFinal); \pgftext[left,base]{\usebox{\boxFinal}};
  \end{tikzpicture}
  \label{table_test2}\caption{Part 2 of 2.}
\end{table}

通常需要手动更正分割偏移。您可以通过添加或减去 0.5\wd\boxFinal 值来完成此操作。

这个想法取自 http://www.latex- Community.org/forum/viewtopic.php?f=5&t=2867

I am using this not so nice and manually configured code to split a too wide tabular:

\usepackage{tikz}

\newsavebox{\boxFinal}
\begin{lrbox}{\boxFinal}
  \scalebox{0.6}{
  \begin{tabular}{...}
...
  \end{tabular}
  }
\end{lrbox}

\begin{table}[htb]
  \centering
  \begin{tikzpicture}
    \clip (0,-\dp\boxFinal) rectangle (0.5\wd\boxFinal,\ht\boxFinal);
    \pgftext[left,base]{\usebox{\boxFinal}};
  \end{tikzpicture}
  \label{table_test1}\caption{Part 1 of 2.}
\end{table}

\begin{table}[htb]
  \centering
  \begin{tikzpicture}
    \clip (0.5\wd\boxFinal,-\dp\boxFinal) rectangle
      (\wd\boxFinal,\ht\boxFinal); \pgftext[left,base]{\usebox{\boxFinal}};
  \end{tikzpicture}
  \label{table_test2}\caption{Part 2 of 2.}
\end{table}

There is usually a need to manually correct split offsets. You can do this by adding or subtracting from 0.5\wd\boxFinal value.

The idea was taken from http://www.latex-community.org/forum/viewtopic.php?f=5&t=2867

嘿哥们儿 2024-09-25 16:17:02

一周以来,我一直在为同样的问题断断续续地揪着头发。我认为,以非 hacky 的方式,这可能不是完全可能的。

一种可能的解决方案是使用 dpfloat 包: http:// /www.ctan.org/tex-archive/help/Catalogue/entries/dpfloat.html

不幸的是,您将创建多个表并手动破坏它们,但至少最终结果应该看起来不错。另外,如果你按照 booktabs 包中的圣人指南放弃表格中的垂直规则(你必须用谷歌搜索,因为显然我作为一个新用户,没有足够的声誉来发布链接),这看起来会好得多参见 booktabs pdf 手册)。

I've been yanking my hair out with this same problem off and on for a week. I think that this may not be entirely possible in a non-hacky sort of way.

One possible hackly solution is to use the dpfloat package: http://www.ctan.org/tex-archive/help/Catalogue/entries/dpfloat.html

Unfortunately, you'd be creating multiple tables and breaking them manually, but at least the end result should look okay. Also, this will look much better if you ditch vertical rules in your tables as per the sage guidance in the booktabs package (which you will have to google because apparently I, as a new user, don't have enough reputation to post a link to the booktabs pdf manual).

如梦亦如幻 2024-09-25 16:17:02

一个好的解决方案是将整个桌子逆时针旋转 90 度,从而有更多的空间。

序言 \usepackage{pdflscape}

\newpage
\thispagestyle{empty}
\begin{landscape}
\begin{table}
...
\end{table}
\end{landscape}

A good solution would be to rotate the whole table 90 degrees counterclockwise, thus having more room for it.

Preamble \usepackage{pdflscape}

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