在狭小空间内处理多张桌子

在狭小空间内处理多张桌子

我正在尝试为纸笔 RPG(游戏主屏幕)创建一份简短而方便的规则摘要。因此我必须处理大量小段落和表格。我的目标是在几张纸上获得大量信息 - 尽可能清晰地排列。

我更喜欢scrartcldocumentclass用于DIV=15较小的边距)。目前,我的大多数表格(下面的代码)。

截屏

我想将所有细长的表格排列成两列(例如使用multicol),以便在每张纸上获得尽可能多的表格(但也有更宽的表格)。这是类似 word 文档的屏幕截图

截屏

这大致显示了我所期望的TeX输出。

有什么想法可以让我以美观且节省空间的方式排列表格吗?我认为浮动表格在这里没用。而且每页的浮动表格数量是有限制的,如果我没记错的话。

哪种表环境最适合我的需求,或者是否有一种“聪明”的方法可以通过创建自己的环境来处理这些表?抱歉,我没有具体说明,但也许其他人尝试使用 latex 创建这样的“备忘单”。

总结: 我需要大量的表格和\paragraph图表,以便在较少的纸张上排列整齐。就像学校的备忘单一样,但看起来美观又清晰。

这里你有一个清理过的 TeX 文件,可以了解我的文档是什么样子的:

\documentclass[a4paper,10pt,DIV=15]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{booktabs, longtable, multicol}

\title{Game Master Screen }
\begin{document}

\maketitle

\section{Fighting}

\begin{multicols}{2}

\subsection{Melee}
\paragraph{important rule} short explanation, just one to three sentences.
\paragraph{useful rule} short explanation, just one to three sentences.
\paragraph{not useful rule} short explanation, just one to three sentences. Short explanation, just one to three sentences. 

\subsection{Special Maneuvers}
\paragraph{disarming} short explanation, just one to three sentences.
\paragraph{another one} is eplained in tab.\,\ref{tab:extab}.
\paragraph{yet another one} is eplained somewhere else in very short sentences.

\end{multicols}

\begin{table}
\caption{Example Table\label{tab:extab}}
\begin{longtable}{lllp{6cm}}
\toprule
Talent & AU & WV & Anmerkungen \\ 
\midrule
Raufen  &  1W & 2/0 &
           keine besonderen Kampfmanöver;
           gute AT: echte SP oder W6\,KR kampfunfähig \\ 

Boxen   &  1W & 2/0  &
           KK-14; bei 6 +1W, wieder 6: für 1W20\,KR
           kampfunfähig\\ 

Ringen  &  1W & 2/0 &
           AT gelungen: Wurf, 1W6 SP, 1\,KR kampfunfähig
           \emph{oder}
           Würgegriff (kein Schaden), dann AT-2 und PA+2
           (gelungen: 1W SP), anschließend +/-3 usw.;
           Kein RS! \\ 

Hruruzat & 2W & 3/1 &
           KK-15; bei Pasch +2W SP  \\ 

gegen Bewaffnete      & \ldots & \ldots &
           nur Ausweichen, AT erst möglich, wenn Gegners AT
           misslingt; wenn Gegner Pariert, dann SP durch dessen
           Waffe \\
\bottomrule
\end{longtable} 
\end{table}

\section{Magic}

More text and tables go here.


\end{document}

答案1

我的方法和你略有不同,但这是一些初始代码。当我得到更接近你发布的内容时,我会更新它。

我没有用表格填满整个页面,但这当然是可能的。制作完所有表格后,只需找到正确的顺序来列出它们以填满整个页面即可。

\documentclass[a4paper,10pt,twocolumn,landscape]{scrartcl}
%% make the margins small, but this will leave very little room
%% for printing a title.
\usepackage[margin=1cm]{geometry}
%% You want to economize on space.  Let's not waste it on indenting
%% paragraphs particularly since, visually, you don't really have any.
\setlength{\parindent}{0pt}
%% your fonts and other packages
\usepackage[T1]{fontenc}
%% setting up to use alternate shading of rows of your tables
\usepackage[table]{xcolor}
\colorlet{altrowcolor}{gray!20}
\colorlet{tableheadcolor}{gray!50}
%% Allows your tables to fit to the width of the line they're contained in
%% use column type "X" to indicate the column that will expand to help fit 
%% to line.  "X" is automatically converted to column type "p" once the 
%% best fit has been found.
\usepackage{tabularx}
%% packages for this demonstration purpose only
\pagestyle{empty}
\usepackage{lipsum}
\begin{document}
  \rowcolors{0}{altrowcolor}{white}
  \begin{tabularx}{\linewidth}{|Xcccp{5cm}c|}\hline
    \multicolumn{6}{|>{\columncolor{tableheadcolor}}c|}{ Title for this table}\\
    Some texts     & 3 & 4 & 599 & NA, MP, OK, RP, ST, NA & $10+$ \\
    Longer Content & 3 & 4 & 599 & NA, MP, OK,            & $10+$ \\
    Some texts     & 3 & 4 & 599 & NA, MP, OK,            & $10+$ \\
    Some texts     & 3 & 4 & 599 & NA, MP, OK,            & $10+$ \\
    Some texts     & 3 & 4 & 599 & NA, MP, OK,            & $10+$ \\
    Some texts     & 3 & 4 & 599 & NA, MP, OK,            & $10+$ \\\hline
  \end{tabularx}

    \vspace{1ex}

  \rowcolors{0}{altrowcolor}{white}
  \begin{tabularx}{\linewidth}{|lX|}\hline
    \multicolumn{2}{|>{\columncolor{tableheadcolor}}c|}{ Title for second table}\\
    some category     & much longer content that may need to be wrapped around and continue on a second line. \\
    another category  & but we can have short lines too \\
    a third category  & random content that doesn't have to fill the line or wrap \\
    a fourth category & random content that doesn't have to fill the line or wrap \\
    a fifth category  & random content that doesn't have to fill the line or wrap \\\hline
  \end{tabularx}
  \vspace{1ex}

  \begin{tabularx}{0.5\linewidth-1em}[t]{|X|c|c|c|}\hline
    initial content & col 1 & col 2 & col 3 \\\hline
    initial content & col 1 & col 2 & col 3 \\\hline
    initial content & col 1 & col 2 & col 3 \\\hline
    initial content & col 1 & col 2 & col 3 \\\hline
    initial content & col 1 & col 2 & col 3 \\\hline
  \end{tabularx}\hspace*{1em}%
  {\begin{minipage}[t]{0.5\linewidth}\raggedright{}
    \textbf{Here is some text set next to a table} Lorem ipsum dolor sit
    amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat
    ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu
    libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula
    augue eu neque. Pel- lentesque habitant morbi tristique senectus
  \end{minipage}}

  \vspace{\fill}

\pagebreak

  \rowcolors{0}{altrowcolor}{white}
  \begin{tabularx}{\linewidth}{|X|}\hline
    \multicolumn{1}{|>{\columncolor{tableheadcolor}}c|}{Title for third table}
    \\
    {\let\par\relax\lipsum[1]} \\
    {\let\par\relax\lipsum[2]} \\\hline
  \end{tabularx}

  \vspace{1ex}

  Create a table with shaded in cells.  There is probably a much better way to make this table
  than what I've done.  In particular, the \verb=\cNam= command is only just a hack to make the columns look nicer.

  \vspace{1ex}

  \newcommand{\mtcc}{\cellcolor{gray!20}}%%empty-cell-content
  \newcommand{\cNam}[1]{\hspace*{0.65em}#1\hspace*{0.65em}}%%             column name
  \rowcolors{0}{white}{white}
  \begin{tabularx}{\linewidth}{|X|c|c|c|c|c|c|c|c|c|}\hline
    \multicolumn{10}{|>{\columncolor{tableheadcolor}}c|}{ Title for fourth table}\\\hline
    Col Titles      & \cNam{A} & \cNam{B} & C\cNam{C} & \cNam{D} & \cNam{E} & \cNam{F} & \cNam{G} & \cNam{H} & \cNam{I}   \\\hline
    id for this row & 23       & 43       & 54        & 340      & 23       & 43       & 54       & 340      & 23  \\\hline
    id for this row & \mtcc    & 43       & 54        & 340      & 23       & 43       & 54       & 340      & 23  \\\hline
    id for this row & \mtcc    & \mtcc    & 54        & 340      & 23       & 43       & 54       & 340      & 23  \\\hline
    id for this row & \mtcc    & \mtcc    & \mtcc     & 340      & 23       & 43       & 54       & 340      & 23  \\\hline
    id for this row & \mtcc    & \mtcc    & \mtcc     & \mtcc    & 23       & 43       & 54       & 340      & 23  \\\hline
    id for this row & \mtcc    & \mtcc    & \mtcc     & \mtcc    & \mtcc    & 43       & 54       & 340      & 23  \\\hline
    id for this row & \mtcc    & \mtcc    & \mtcc     & \mtcc    & \mtcc    & \mtcc    & 54       & 340      & 23  \\\hline
    id for this row & \mtcc    & \mtcc    & \mtcc     & \mtcc    & \mtcc    & \mtcc    & \mtcc    & 340      & 23  \\\hline
    id for this row & \mtcc    & \mtcc    & \mtcc     & \mtcc    & \mtcc    & \mtcc    & \mtcc    & \mtcc    & 23  \\\hline
  \end{tabularx}

\end{document}

在此处输入图片描述

相关内容