質問
Mulitrowでテーブルを作成していますが、問題が発生しています。私が理解する限り、これはマルチローの形です:
\multirow{count}{alignment}{content}
カウントはマージする行の数、アライメントはl、c、r、または *のいずれかであり、コンテンツは行のコンテンツです。以下を試しました:
\multirow{3}{*}{Framing}
しかし、私は問題を抱えています。セルで「フレーミング」という言葉を見るのではなく、「3*フレーミング」が表示され、マルチロー要素が機能していないことを示しています。何か案が?
また、セル内のテキストを垂直に整列させるにはどうすればよいですか?
更新: usepackage {multirow}はそれを解決すると思いましたが、それでも問題があります。まず、垂直方向のアライメントを作成できません。第二に、「フレーミング」セルで奇妙なことをします。 「フレーミング」を左に整列させる代わりに、文字「L」を含む1つの仮想行を取得し、2つの仮想行の後、「フレーミング」という言葉を取得します!!それはこのようなものです:
______________
| l |
| |
| Framing |
| |
| |
| |
| |
______________
これはそれについて尋ねた人のための私のテーブルです:
\begin{table*}\tiny
\centering
\begin{tabular}{|c|c|c|c|c|p{2in}|}
\hline
Rule & Factor & Best Value & \Delta_t & \Delta_{do} & Comments \\
\hline
% Diagonal Dominance Rule
\multirow{3}{*}{Diagonal Dominance} & Line Angle & 45 & 15 & 30 & The angle between the prominent line of the object and
the diagonal lines \\ % TODO: What object? Make sure it is clear.
& Line Distance & 0 & 0.25 & 1 & The distance, in screen coordinates, from the
prominent line of the object to the diagonal lines. \\ % TODO: Need to define screen coordinates
& Corner Distances & 0 & 0.1 & 0.7 & The distance, in screen coordinates, from the
end of the prominent line of the object to the corners of the screen. \\
\hline
% Framing Rule
\multirow{4}{l}{Framing} & Left Distance & 0 & ${Frame Width}*5\%$ & ${Frame Width}*25\%$ & The distance between the
left side of the frame covering the object and the left or the right side of the intended frame, whichever closer. \\
& Right Distance & 0 & ${Frame Width}*5\%$ & ${Frame Width}*25\%$ & The distance between the
right side of the frame covering the object and the left or the right side of the intended frame, whichever closer. \\
& Top Distance & 0 & ${Frame Height}*5\%$ & ${Frame Height}*25\%$ & The distance between the
top side of the frame covering the object and the upper or the lower side of the intended frame, whichever closer. \\
& Bottom Distance & 0 & ${Frame Height}*5\%$ & ${Frame Height}*25\%$ & The distance between the
bottom side of the frame covering the object and the upper or the lower side of the intended frame, whichever closer. \\
\hline
\end{tabular}
\caption{The factors of each rule and their parameters.}
\label{table:factors}
\end{table*}
よろしく、
ラフィッド
解決
1)あなたは置きました \usepackage{multirow}
あなたのドキュメントの最初に?
2)おそらく従うべき良い例があります。私はこのパッケージを使用したことがありませんが、短時間(秒)でこれを見つけることができました ページ Google経由。その例に従うことはあなたを助けますか?
アップデート: あなたの実際のテーブルを見た後、私はそれを言うのは嫌いですが、あなたの間隔のグリッチは「コメント」列に複数の行に流出したためだと思います。私はあなたのコメントを切り捨てて、これを手に入れました(列1は、必要に応じて垂直に中心になっています):
\begin{table*}\tiny
\centering
\begin{tabular}{|c|c|c|c|c|p{3cm}|}
\hline
Rule & Factor & Best Value & \Delta_t & \Delta_{do} & Comments \\
\hline
% Diagonal Dominance Rule
\multirow{3}{*}{Diagonal Dominance} & Line Angle & 45 & 15 & 30 & The angle between... \\
& Line Distance & 0 & 0.25 & 1 & The distance, in... \\
& Corner Distances & 0 & 0.1 & 0.7 & The distance, in... \\
\hline
% Framing Rule
\multirow{4}{*}{Framing} & Left Distance & 0 & ${Frame Width}*5\%$ & ${Frame Width}*25\%$ & The distance... \\
& Right Distance & 0 & ${Frame Width}*5\%$ & ${Frame Width}*25\%$ & The distance... \\
& Top Distance & 0 & ${Frame Height}*5\%$ & ${Frame Height}*25\%$ & The distance... \\
& Bottom Distance & 0 & ${Frame Height}*5\%$ & ${Frame Height}*25\%$ & The distance... \\
\hline
\end{tabular}
\caption{The factors of each rule and their parameters.}
\label{table:factors}
\end{table*}
{l}の議論に関して、私が最初に投稿したリンクはおそらく間違っていると思います。ラテックスは、私が *のlに置き換えようとするときにいくつかのエラーを吐き出します \multirow
口論。私はこれをテストテーブルで取得します:
! Missing number, treated as zero.
<to be read again>
l
l.12 \multirow{4}{l}{Batch}
& MM & Min-Min \\
! Illegal unit of measure (pt inserted).
<to be read again>
l
l.12 \multirow{4}{l}{Batch}
& MM & Min-Min \\
見つけた後 これ, 、2番目の議論だと思います \multirow
アライメントではなく、幅用です。 Lyx Wiki Linkedは、この形式はそうだと言っています。
\multirow{number of rows}{cell width}{cell entry}
{cell width}はActuall {alignment}であると想定しており、以前のリンクがそれを混乱させると思います。 Lyx Wikiの間隔についてのメモをご覧ください。必要に応じて、入札を行うために必要な場合に使用できます。
\renewcommand{\multirowsetup}{\centering}
交換します \centering
と \raggedleft
また \raggedright
必要に応じて。私はまだあなたが複数の行でトラブルに遭遇するだろうと思います。少なくとも、それらを捨てることは、間隔を必要に応じて機能させることを示しました...あなたのデフォルトの例を強制する方法は私を超えているのではないかと思います。しかし、おそらく今、あなたは問題がどこにあるのか知っていますか?
あなたが本当に、本当に、本当に望んでいたなら、あなたはあなたの文を分割し、それがいくつかの行をいくつか把握し、あなたを調整することができると思います \multirow
それに応じて、行の増加についての引数。おそらく、ネストされたマルチロー構造も必要ですが、
| | item 1, 2 rows | comment 1 line 1 |
| multirow, 4 rows | | comment 1 line 2 (spill over) |
| | item 2, 2 rows | comment 2 line 1 |
| | | comment 2 line 2 (spill over) |
それは理にかなっていますか?列1はセクションのすべての行に及び、後続の行はスプリットアップコメントで必要な行の数に及び、コメントに必要な各行(一部は3または4を取る)が独自の別の行に並んで表示され、ただ表示されます次回に続く。しかし、文の間隔が奇妙に見えるかどうかはわかりません。
ナフランブル。あなたの考えのための食べ物があります。
最後の更新: これについての最後の希望の方法は、Tikzテーブルを使用することかもしれません。基本的に、ノードは「セル」のようなものです。次に、それらをまとめて、テーブルのように見せます。おそらく恐ろしい提案ですが、セル間隔などで必要な柔軟性がすべてあることを保証します。いくつかのアイデア:
他のヒント
はい、必要です multirow
パッケージ。
\usepackage{multirow}
\begin{document}
\begin{table}
\centering
\begin{tabular}{l||c|r}
Header 1 & Header 2 & Header 3 \\
\multirow{2}{*}{Hello} & stuff & stuff \\
& Body 2 & Body 3
\end{tabular}
\end{table}
\end{document}
編集後に編集して質問します。2つのエラーがありました。
\multirow{4}{l}{Framing}
. 。に変更しました\multirow{4}{*}{Framing}
Delta_t
に変更されました$Delta_t$
.
そうでなければ、すべてが問題ないようです。あなたは尋ねたいかもしれません tex.stackexchange.com, 、 それも。
ワイルド推測:あなたは得ています undefined control sequence: multirow
あなたが欠けているからです \usepackage{multirow}
前文で?