如何在HVFloat中使用HVObox建立多個大表

如何在HVFloat中使用HVObox建立多個大表

我有幾個寬桌子,我需要將它們分成多頁來寫一本書。這個想法是左頁顯示表格的左半部分,右頁顯示右半部分。

例如這樣的事情

在此輸入影像描述

我找到了 hvfloat 包,它適用於 1 個表。但是,如果我製作超過 1 個表,它只會將同一個表的多個副本(最後一個儲存在 HVObox 中)放入文件中。

如何在同一個文檔中建立多個這樣的表?

答案1

這是浮動環境,這就是為什麼只有在這些雙面表格(框)之間有足夠的文字時才起作用的原因。否則,就不可能以正確的方式放置物體。一個工作範例:

\documentclass[12pt,twoside]{article} 
\usepackage{geometry}
\usepackage{hvfloat,booktabs,blindtext}
\renewcommand\thepage{\Huge\arabic{page}}
\begin{document}

\Blindtext

\savebox\hvOBox{%
\begin{tabular}{l*{18}r} \toprule
    & \textbf{1972} & \textbf{1973} & \textbf{1974} & \textbf{1975} & \textbf{1976}& \textbf{1977} & \textbf{1978} & 
    \textbf{1979} & \textbf{1980} & \textbf{1981} & \textbf{1982} & \ textbf{1983} & \textbf{1984} & \textbf{1985}& 
    \textbf{1986} & \textbf{1987} & \textbf{1988} & \textbf{1989} \\\midrule\addlinespace[3pt] 
    Zeile1&1&3&1&1&1&0&1&1&0&0&0&0&20&0&2&2&2&1\\\addlinespace[3pt]
    Zeile2&1&1&3&1&0&0&0&0&0&0&2&1&3&4&4&6&4&2\\\addlinespace[3pt] 
    Zeile3&2&1&2&1&0&0&0&0&0&0&0&1&5&3&1&7&7&3\\\addlinespace[3pt]
    Zeile4&1&0&5&1&2&0&0&0&0&2&1&0&1&0&3&7&2&1\\\addlinespace[3pt]
    Zeile6&2&1&1&0&0&0&0&0&0&1&2&0&5&2&2&5&4&2\\\addlinespace[3pt]
    Zeile5&0&0&4&2&1&2&2&1&0&0&0&1&1&0&2&5&4&3\\\addlinespace[3pt] 
    Zeile8&0&1&1&0&0&0&1&1&0&3&2&1&2&1&3&5&3&4\\\addlinespace[3pt]
    Zeile9&0&0&0&0&0&1&2&1&0&0&0&0&4&2&1&4&5&2\\\addlinespace[3pt] 
    Zeile10&0&1&3&0&1&0&1&0&0&1&1&0&1&1&1&4&4&1\\\addlinespace[3pt]
    Zeile11&0&2&2&1&1&0&1&0&0&0&0&2&6&1&0&2&1&1\\\addlinespace[3pt] 
    Zeile12&2&0&2&4&1&0&4&0&0&0&0&0&0&0&0&1&0&3\\\addlinespace[3pt]
    Lärm &2&3&0&0&0&0&0&0&0&0&1&0&2&0&0&2&2&2\\\addlinespace[3pt]
    Zeile13&0&1&0&0&1&0&3&0&0&0&0&0&2&0&1&3&0&2\\\addlinespace[3pt]
    Zeile14&0&1&0&0&0&0&0&0&0&0&0&0&3&3&2&1&1&0\\\addlinespace[3pt] 
    Zeile15&0&0&0&0&0&0&0&0&0&1&0&0&4&0&0&3&1&1\\\addlinespace[3pt]
    Zeile16&0&0&0&0&0&1&0&0&0&0&0&0&0&0&3&5&0&1\\\addlinespace[3pt]\midrule
    Artikelgesamt&2&6&13&8&4&3&5&4&0&6&3&5&23&10&8&15&13&1\\ \bottomrule
\end{tabular}}

\hvFloat[doublePage,useOBox,capPos=right,capVPos=top,floatCapSep=12pt]% 
  {table}%
  {}%%%%%%%%%%%%%%
  [A doublepage tabular with a caption on the right side of the 
   right part.]%
   {A caption for a double-sided tabular that will be placed on the right side of the right-hand part of the illustration.}%
  {tab:doublePage0}

\Blindtext[8]

\savebox\hvOBox{%
\begin{tabular}{l*{18}r} \toprule
        & \textbf{1972} & \textbf{1973} & \textbf{1974} & \textbf{1975} & \textbf{1976}& \textbf{1977} & \textbf{1978} & 
    \textbf{1979} & \textbf{1980} & \textbf{1981} & \textbf{1982} & \ textbf{1983} & \textbf{1984} & \textbf{1985}& 
    \textbf{1986} & \textbf{1987} & \textbf{1988} & \textbf{1989} \\\midrule\addlinespace[3pt] 
    Zeile1&1&3&1&1&1&0&1&1&0&0&0&0&20&0&2&2&2&1\\\addlinespace[3pt]
    Zeile16&0&0&0&0&0&1&0&0&0&0&0&0&0&0&3&5&0&1\\\addlinespace[3pt]\ midrule
    Artikelgesamt&2&6&13&8&4&3&5&4&0&6&3&5&23&10&8&15&13&1\\ \bottomrule
\end{tabular}}%%%%%%%%%%%%%%


\hvFloat[doublePage,useOBox,capPos=right,capVPos=top,floatCapSep=12pt]% 
  {table}%
  {}
  [A doublepage tabular with a caption on the right side of the right part.]%
  {A caption for a double-sided tabular that will be placed on the right side of the right-hand part of the illustration.}%
  {tab:doublePage1}
    
\Blindtext
\end{document}

在此輸入影像描述 在此輸入影像描述 在此輸入影像描述

\Blindtext[8]將兩個表格之間的線更改為\Blindtext[4],它將失敗,物件之間的文字太少。

解決方法是放置框中的表格或使用非浮動環境並手動將物件放置在對頁上。

相關內容