多列表格

多列表格

我是 Latex 的新手,我想绘制图中所示的表格。

在此处输入图片描述非常感谢您的帮助

\begin{landscape}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}
 \hline
  Characteristics & \multicolumn{3}{|c|}{Where?} & \multicolumn{2}{|c|}{Who?} & Physical          Immersion? & Mental Immersion? & Computer Required? & Interactive?\\
\hline
Media & Real & Real & Virtual & Me & We & & & & \\
& World & World & World & & & & & & \\
& Here & There & & & & & & & \\
VR & Real & Real & Virtual & Me & We & & & & \\
\end{tabular}
\end{landscape}

答案1

也许这可以作为第一个提示:

\documentclass{scrartcl}
\usepackage{xcolor,colortbl}
\begin{document}
\begin{tabular}{ll}
1 & 2\\
3 & {\cellcolor{gray}X}\\
\end{tabular}
\end{document}

答案2

tabularx编辑 1:通过和使用X列的第二种方法

在此处输入图片描述

代码:

\documentclass{article}
\usepackage{array}
\usepackage[landscape]{geometry}
\usepackage{tabularx}
\usepackage{xcolor,colortbl}
\definecolor{Gray}{gray}{0.7}
 \renewcommand{\arraystretch}{1.8}
\begin{document}
\renewcommand\tabularxcolumn[1]{m{#1}}
\newcolumntype{L}{>{\raggedright\arraybackslash}m{2.5cm}}
\newcolumntype{a}{>{\columncolor{Gray}\centering\arraybackslash}X}
\newcolumntype{G}{>{\centering\arraybackslash}m{2cm}}
\newcolumntype{Y}{>{\centering\arraybackslash}X}

\begin{table}[t]
\caption{This is a table I am using}
\centering
\begin{tabularx}{1.1\textwidth}{|L|Y|Y|a|Y|a|Y|Y|a|Y|Y|Y|a|Y|}\hline
Characteristics & \multicolumn{3}{c|}{Where} &
 \multicolumn{2}{c|}{Who?} & 
 \multicolumn{2}{G|}{Physical immersion?} & 
 \multicolumn{2}{G|}{Mental imersion} & 
 \multicolumn{2}{G|}{Computer required?} & 
 \multicolumn{2}{c|}{Interactive?} \\ \hline
\rowcolor{white}
MEDIA & Real world here & Real word there& Virtual world & Me & We & Yes & No & Yes & No& Yes & No
& Yes & No \\ \hline
Virtual reality &x & & & & & & & & & & & & \\\hline
Augmented \newline reality & & & & & & & & & & & & & \\\hline
Telepresences &x & & & &x & & & & & & & & \\\hline
Teleoperation &x & & & & & & & & & & & & \\\hline
Novel & & & & & & & & & & & & & \\\hline
Interactive \newline fiction &x & & x& & x& & & & & & & & \\\hline
Online chat & & & & & & & & & & & & & \\\hline
Live TV \newline documentary & & & & & & & & & & & & & \\\hline
TV situation \newline Comdy & & & & & & & & & & & & & \\\hline
Cyberspace & & & & & & & & & & & & & \\\hline
\end{tabularx}
\label{table}
\end{table}
\end{document}

这是一次尝试,其中为类型定义了几种列类型m。特别是,au类型适用于灰色列。

在此处输入图片描述

代码:

\documentclass{article}
\usepackage{array}
\usepackage[margin=1cm]{geometry}
\usepackage{xcolor,colortbl}
 \renewcommand{\arraystretch}{1.8}
\begin{document}
\newcolumntype{a}{>{\columncolor{gray}\centering\arraybackslash}m{0.6cm}}
\newcolumntype{b}{>{\centering\arraybackslash}m{0.6cm}}
\newcolumntype{G}{>{\centering\arraybackslash}m{1.5cm}}
\newcolumntype{u}{>{\columncolor{gray}\centering\arraybackslash}m{1cm}}
\newcolumntype{U}{>{\centering\arraybackslash}m{1cm}}

\begin{table}[t]
\caption{This is a table I am using}
\centering
\begin{tabular}
{|l|U|U|u|b|a|b|b|a|b|b|b|a|b|}\hline
Characteristics & \multicolumn{3}{c|}{Where} &
 \multicolumn{2}{G|}{Who?} & 
 \multicolumn{2}{G|}{Physical immersion?} & 
 \multicolumn{2}{G|}{Mental imersion} & 
 \multicolumn{2}{G|}{Computer required?} & 
 \multicolumn{2}{G|}{Interactive?} \\ \hline
\rowcolor{white}
MEDIA & Real world here & Real word there& Virtual world & Me & We & Yes & No & Yes & No& Yes & No
& Yes & No \\ \hline
Virtual reality &x & & & & & & & & & & & & \\\hline
Augmented reality & & & & & & & & & & & & & \\\hline
Telepresences &x & & & &x & & & & & & & & \\\hline
Teleoperation &x & & & & & & & & & & & & \\\hline
Novel & & & & & & & & & & & & & \\\hline
Interactive fiction &x & & x& & x& & & & & & & & \\\hline
Online chat & & & & & & & & & & & & & \\\hline
Live TV documentary & & & & & & & & & & & & & \\\hline
TV situation Comdy & & & & & & & & & & & & & \\\hline
Cyberspace & & & & & & & & & & & & & \\\hline
\end{tabular}
\label{table}
\end{table}

\end{document}

相关内容