我有一张需要跨越多页的表格,因此我使用\usepackage{longtable}
。
但是我也在使用,\multirow
因为我的评论实在太长了,无法放在一个评论里!但仍然存在问题……
所以我尝试了一下,但还是没成功!任何帮助都将不胜感激。我需要它,这样我才能获得行名和相应的信息。相似性理想需要跨越两行。注释必须适合表格!
最小工作示例如下:
\documentclass[a4paper,12pt]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{fancyhdr}
\usepackage[parfill]{parskip}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{longtable}
\pagestyle{fancyplain}
\fancyhf{}
\rhead{\fancyplain{}{\today}}
\cfoot{\fancyplain{}{\thepage}}
\begin{document}
\maketitle
\begin{longtable}[H]
\caption{\label{labelname}Table Caption}
\footnotesize
Painting & Lucien Freud, A Man and his Daughter, 1963-4.jpg \\
Comment & \multirow{3}{*}{ This painting is in the style of Lucien Freud. Initially, the 3rd colour is significant. This is over Lucien Freud's 3rd significant colour. The last attribute, the painting's contrast is greatly unbroken, when the image is at a scaled to 20. There are either warm or cool colours but not both, so the image is not very varied. The contrast for this painting is very larger than Lucien Freud's. } \\
Similarity & freud & 1.0 \\
& Bacon & 0.0 \\
Classification & Freud \\ \hline
\end{tabular} \scriptsize \par}
\end{longtable}
答案1
这里不需要multirow
。请使用p
列类型。此外,您的代码中存在一些错误。您更正后的代码为:
\documentclass[a4paper,12pt]{article}
\usepackage[margin=2cm,headheight=\baselineskip]{geometry}
\usepackage{fancyhdr}
\usepackage[parfill]{parskip}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{longtable}
\pagestyle{fancyplain}
\fancyhf{}
\rhead{\fancyplain{}{\today}}
\cfoot{\fancyplain{}{\thepage}}
\title{Where are the mistakes?}
\author{redrubia}
\begin{document}
\maketitle
\begin{longtable}{cp{.65\textwidth}c}
\caption{Table Caption\label{labelname}}\\\hline
Painting & Lucien Freud, A Man and his Daughter, 1963-4.jpg & \\
Comment & This painting is in the style of Lucien Freud. Initially, the 3rd colour is significant. This is over Lucien Freud's 3rd significant colour. The last attribute, the painting's contrast is greatly unbroken, when the image is at a scaled to 20. There are either warm or cool colours but not both, so the image is not very varied. The contrast for this painting is very larger than Lucien Freud's. & \\
Similarity & freud & 1.0 \\
& Bacon & 0.0 \\
Classification & Freud & \\ \hline
\end{longtable}
\end{document}
将此文件与您的文件进行比较并找出错误作为练习。