是否可以在 LaTeX 中制作这样的表格?可以吗?我必须使用哪些用户包?我遇到的问题是第 1 列和第 2 列中的垂直文本居中对齐
\documentclass[a3paper,12pt]{article}
\usepackage{array,tabularx,tabulary,booktabs,multirow,graphicx}
\usepackage{geometry} % Простой способ задавать поля
\geometry{top=10mm}
\geometry{bottom=10mm}
\geometry{left=10mm}
\geometry{right=10mm}
\begin{document}
%{\rotatebox[origin=c]{90}{Oil-Water \& Gas-Water}}
%{\rotatebox[origin=c]{90}{Gas-Oil}}
\begin{tabular}{|c|c|m{3cm}|b{3cm}|p{12cm}|p{2cm}|}
%\begin{tabulary}{\textwidth}{|J|J|J|J|J|J|}
\hline
{\rotatebox[origin=c]{90}{\textbf{ Well type }}} & {\rotatebox[origin=c]{90}{\textbf{System}}} & \textbf{Calculated parametr} & \textbf{Author} & \textbf{Limitations} & \textbf{Equation type} \\
\hline
\multirow{10}{*} & \multirow{8}{*} & \multirow{5}{*}{Critical Rate} & Chaperon & For vertical wells, the perforated interval, hp, is very small and the well is perforated at the top of the reservoir for water coning situations. Analytical equations are based on the equilibrium conditions of viscous forces and gravity forces. & Analitical \\ \cline{4-6}
& & & Hoyland et al & Equations are based on correlation of computer simulation runs. & \\ \cline{4-6}
& & & Meyer et al & Equations are based on simplified radial flow of oil under it's own gravity head. They are generally less accurate than more rigorous methods. For gas coning, it is assumed that the gas-oil contact is depressed around the wellbore because of radial flow. For simultaneous gas and water coning, the maximum possible oil production rate is calculated assuming an optimum placement of the perforated interval. & \\ \cline{4-6}
& {\rotatebox[origin=c]{90}{Oil-Water \& Gas-Water}} & & Schols & Equations are based on correlation of laboratory experiments. For oil mostly. & \\ \cline{4-6}
& & & Chirechi & Based on the potentiometric theory of Muskat and Wyckoff using and electrical analog model. & \\ \cline{3-6}
& & Post-water breakhrough & Kuo \& DesBrisay & This correlation was developed by investigating the sensitivity of water coning performance to various reservoir parameters using numerical simulation. & \\ \cline{3-6}
{\rotatebox[origin=c]{90}{Vertical}} & & \multirow{2}{*}{Breakthrough Time} & Bournazel \& Jeansen & Evaluation and modification of the plot developed by Sobocinski and Cornelius resulted in a simple analytical expression to fit the plot. & \\ \cline{4-6}
& & & Saboncinski \& Kornelius & This correlation is based on experimental data and computer simulation runs. A dimensionless plot that traces the rise of the cone apex from initial build-up to breakthrough was developed. & \\ \cline{2-6}
& {\rotatebox[origin=c]{90}{Gas-Oil}} & Critical Rate & Mayer et al & Equations are based on simplified radial flow of oil under it's own gravity head. They are generally less accurate than more rigorous methods. For gas coning, it is assumed that the gas-oil contact is depressed around the wellbore because of radial flow. For ultaneous gas and water coning, the maximum possible oil production rate is calculated assuming an optimum placement of the perforated interval.
Analytical equations are based on the equilibrium conditions of viscous forces and gravity forces. & \\ \cline{2-6}
& {\rotatebox[origin=c]{90}{Gas-Oil-Water}} & Critical Rate & Mayer et al & Equations are based on simplified radial flow of oil under it's own gravity head. They are generally less accurate than more rigorous methods. For gas coning, it is assumed that the gas-oil contact is depressed around the wellbore because of radial flow. For ultaneous gas and water coning, the maximum possible oil production rate is calculated assuming an optimum placement of the perforated interval.
Analytical equations are based on the equilibrium conditions of viscous forces and gravity forces. & \\
\hline
\hline
\multirow{9}{*}{\rotatebox[origin=c]{90}{Horizontal}} & \multirow{7}{*}{\rotatebox[origin=c]{90}{Oil-Water \& Gas-Water}} & \multirow{2}{*}{Critical Rate} & Chaperon & For horizontal wells, the method assumes that the well is drilled near the top of the reservoir for water coning situations. & \\ \cline{4-6}
& & & Efros & Based on the equilibrium conditions of viscous forces and gravity forces. & \\ \cline{3-6}
& & \multirow{2}{*}{Post-water breakhroug} & Mutalic \& Joshi & This correlation was developed by investigating the sensitivity of water coning performance to various reservoir parameters using numerical simulation. & \\ \cline{4-6}
& & & Suoza et al & Assumes the horizontal well traverses the entire drainage area, so flow beyond the ends of the well is neglected. & \\ \cline{3-6}
& & \multirow{3}{*}{Breakthrough Time} & Papatzakos et al & This solution applies only to infinite acting reservoirs. The solution is derived by a moving boundary method with constant pressure or gravity equilibrium assumed at the moving boundary. & \\ \cline{4-6}
& & & Ozkan \& Raghavan & Developed using numerical simulation. This solution applies only to infinite acting reservoirs. & \\ \cline{4-6}
& & & Suoza et al & Developed using numerical simulation, by correlating the results from many simulation runs. Assumes the horizontal well traverses the entire drainage area, so flow beyond the ends of the well is neglected & \\ \cline{2-6}
& \multirow{2}{*}{\rotatebox[origin=c]{90}{Gas-Oil}} & \multirow{2}{*}{Critical Rate} & Chaperon & For horizontal wells, the method assumes that the well is drilled near the top of the reservoir for water coning situations. & \\ \cline{4-6} & & & Joshi & The Equations are for short horizontal wells. They are modifications of the Meyer, Gardner, Pirson method for vertical wells. & \\
\hline
\end{tabular}
\end{document}
答案1
这是可能的,但是颜色会让事情变得有些复杂,因为\clines
实际上会在没有规则的列中产生一条白线——例如,第一列\cline{2-6}
实际上是\hline
白色的;当单元格背景是彩色时,您会看到这条白线。所以我不得不使用包来获得多色线条。彩色单元格的另一个后果是,必须在行组的末尾hhline
使用(使用参数 –n)才能看到文本。实际上,我使用了包中的命令和其他一些命令。\multirow{n}{…}
\multirowcell
make cell
\documentclass[a3paper,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{geometry} % Простой способ задавать поля
\geometry{margin=15mm}
\usepackage{array,tabularx,tabulary,multirow,graphicx, hhline}
\renewcommand{\tabularxcolumn}[1]{m{#1}}
\usepackage{makecell}
\renewcommand\theadfont{\bfseries}
\usepackage{colortbl}
\usepackage[x11names, tables]{xcolor}
\newcommand\cb{\arrayrulecolor{CadetBlue1!60!}}
\newcommand\yl{\arrayrulecolor{Yellow1!35}}
\newcommand\bk{\arrayrulecolor{black}}
\begin{document}
\begin{table}[!ht]
\sffamily\centering\setlength\arrayrulewidth{0.6pt}%
\begin{tabularx}{\linewidth}{!{\vrule width 1pt}c|c|m{2.4cm}|m{2.8cm}|X|c!{\vrule width 1pt}}
\Xhline{1pt}
\rowcolor{gray!30!}{\rotatebox[origin=c]{90}{\textbf{ Well type }}} & {\rotatebox[origin=c]{90}{\textbf{System}}} & \thead{Calculated\\ parameter} & \thead{Author} & \thead{Limitations} & \raisebox{-0.45\height}{\rotatebox{90}{\thead{Equation \\type}}} \\
\Xhline{1pt}
\multicolumn{6}{c}{} \\[-2ex]
\Xhline{1pt}
\rowcolor{Yellow1!35!} & & & Chaperon & For vertical wells, the perforated interval, hp, is very small and the well is perforated at the top of the reservoir for water coning situations. Analytical equations are based on the equilibrium conditions of viscous forces and gravity forces. & \cellcolor{DarkSeaGreen1!50!}Analytical \\
\hhline{|>{\yl}->{\bk}|>{\yl}->{\bk}|>{\yl}->{\bk}|---}
\rowcolor{Yellow1!35!} & & & Hoyland \& al. & Equations are based on correlation of computer simulation runs. & \cellcolor{DarkSeaGreen1!50!}Empirical \\
\hhline{|>{\yl}->{\bk}|>{\yl}->{\bk}|>{\yl}->{\bk}|---}
\rowcolor{Yellow1!35!} & & & Meyer \& al. & Equations are based on simplified radial flow of oil under it's own gravity head. They are generally less accurate than more rigorous methods. For gas coning, it is assumed that the gas-oil contact is depressed around the wellbore because of radial flow. For simultaneous gas and water coning, the maximum possible oil production rate is calculated assuming an optimum placement of the perforated interval. \break
Analytical equations are based on the equilibrium conditions of viscous forces and gravity forces. & \cellcolor{DarkSeaGreen1!50!}Analytical \\
\hhline{|>{\yl}->{\bk}|>{\yl}->{\bk}|>{\yl}->{\bk}|---}
\rowcolor{Yellow1!35!} & & & Schols & Equations are based on correlation of laboratory experiments. For oil mostly. & \cellcolor{DarkSeaGreen1!50!}Empirical \\
\hhline{|>{\yl}->{\bk}|>{\yl}->{\bk}|>{\yl}->{\bk}|---}
\rowcolor{Yellow1!35!} & & \multirowcell{-11}{Critical Rate} & Chirechi & Based on the potentiometric theory of Muskat and Wyckoff using and electrical analog model. & \cellcolor{Tan1!50!}Analytical \\
\hhline{|>{\yl}->{\bk}|>{\yl}->{\bk}|----}
\rowcolor{Yellow1!35!} & & \makecell{Post-water \\ breakthrough} & \mbox{Kuo \&} \mbox{DesBrisay} & This correlation was developed by investigating the sensitivity of water coning performance to various reservoir parameters using numerical simulation. &\cellcolor{Tan1!50!}Empirical \\
\hhline{|>{\yl}->{\bk}|>{\yl}->{\bk}|----}
\rowcolor{Yellow1!35!} & & & Bournazel \&~Jeansen & Evaluation and modification of the plot developed by Sobocinski and Cornelius resulted in a simple analytical expression to fit the plot. & \cellcolor{Tan1!50!}Empirical \\ \hhline{|>{\yl}->{\bk}|>{\yl}->{\bk}|>{\yl}->{\bk}|---}
\rowcolor{Yellow1!35!} & \multirowcell{-16}{\colorbox{Yellow1!35!}{\rotatebox{90}{Oil-Water \& Gas-Water}}} & \multirowcell{-3}{Breakthrough \\ time} & Saboncinski \&~Kornelius & This correlation is based on experimental data and computer simulation runs. A dimensionless plot that traces the rise of the cone apex from initial build-up to breakthrough was developed. & \cellcolor{Tan1!50!}Empirical \\
\hhline{|>{\yl}->{\bk}|-----}
\rowcolor{Yellow1!35!} & \rotatebox[origin=c]{90}{Gas-Oil } & \makecell{Critical Rate} & Meyer \& al. & Equations are based on simplified radial flow of oil under it's own gravity head. They are generally less accurate than more rigorous methods. For gas coning, it is assumed that the gas-oil contact is depressed around the wellbore because of radial flow. For simultaneous gas and water coning, the maximum possible oil production rate is calculated assuming an optimum placement of the perforated interval. \break
Analytical equations are based on the equilibrium conditions of viscous forces and gravity forces. & \cellcolor{Tan1!50!}Analytical \\
\hhline{|>{\yl}->{\bk}|-----}
\rowcolor{Yellow1!35!}\multirowcell{-25}{\colorbox{Yellow1!35!}{\rotatebox{90}{Vertical}}}& \makecell{\colorbox{Yellow1!35!}{\rotatebox{90}{Gas-Oil-Water }}} & \makecell{Critical Rate} & Meyer \& al. & Equations are based on simplified radial flow of oil under it's own gravity head. They are generally less accurate than more rigorous methods. For gas coning, it is assumed that the gas-oil contact is depressed around the wellbore because of radial flow. For simultaneous gas and water coning, the maximum possible oil production rate is calculated assuming an optimum placement of the perforated interval. \break
Analytical equations are based on the equilibrium conditions of viscous forces and gravity forces. & \cellcolor{Tan1!50!}Analytical \\
\Xhline{1pt}
\multicolumn{6}{c}{} \\[-2ex]
\Xhline{1pt}
\rowcolor{CadetBlue1!60!} & & \multirowcell{2}{Critical Rate} & Chaperon & For horizontal wells, the method assumes that the well is drilled near the top of the reservoir for water coning situations. & \cellcolor{DarkSeaGreen1!50!}Empirical \\
\hhline{|>{\cb}->{\bk}|>{\cb}->{\bk}|>{\cb}->{\bk}|---}
\rowcolor{CadetBlue1!60!}\cellcolor{CadetBlue1!60!} & & & Efros & Based on the equilibrium conditions of viscous forces and gravity forces. & \cellcolor{DarkSeaGreen1!50!}Empirical \\
\hhline{|>{\cb}->{\bk}|>{\cb}->{\bk}|----}
\rowcolor{CadetBlue1!60!} & & & \mbox{Mutalic \& Joshi} & This correlation was developed by investigating the sensitivity of water coning performance to various reservoir parameters using numerical simulation. & \cellcolor{Tan1!50!}Empirical \\
\hhline{|>{\cb}->{\bk}|>{\cb}->{\bk}|>{\cb}->{\bk}|---}
\rowcolor{CadetBlue1!60!} & &\multirowcell{-3}{Post-water \\ breakthrough} & Suoza \& al. & Assumes the horizontal well traverses the entire drainage area, so flow beyond the ends of the well is neglected. & \cellcolor{Tan1!50!}Empirical \\
\hhline{|>{\cb}->{\bk}|>{\cb}->{\bk}|----}
\rowcolor{CadetBlue1!60!} & & & Papatzakos \mbox{\& al.} & This solution applies only to infinite acting reservoirs. The solution is derived by a moving boundary method with constant pressure or gravity equilibrium assumed at the moving boundary. & \cellcolor{Tan1!50!}Empirical \\
\hhline{|>{\cb}->{\bk}|>{\cb}->{\bk}|>{\cb}->{\bk}|---}
\rowcolor{CadetBlue1!60!} & & & \mbox{Ozkan~\&} \mbox{Raghavan} & Developed using numerical simulation. This solution applies only to infinite acting reservoirs. & \cellcolor{Tan1!50!}Empirical \\
\hhline{|>{\cb}->{\bk}|>{\cb}->{\bk}|>{\cb}->{\bk}|---}
\rowcolor{CadetBlue1!60!} &\multirowcell{-12}{\colorbox{CadetBlue1!60!}{\rotatebox[origin=c]{90}{Oil-Water \& Gas-Water}}} & \multirowcell{-5}{Breakthrough\\ Time} & Suoza \& al. & Developed using numerical simulation, by correlating the results from many simulation runs. Assumes the horizontal well traverses the entire drainage area, so flow beyond the ends of the well is neglected. & \cellcolor{Tan1!50!}Empirical \\
\hhline{|>{\cb}->{\bk}|-----}
\rowcolor{CadetBlue1!60!} & & \multirowcell{3}{Critical Rate} & Chaperon & For horizontal wells, the method assumes that the well is drilled near the top of the reservoir for water coning situations. & \cellcolor{Tan1!50!}Empirical \\
\hhline{|>{\cb}->{\bk}|>{\cb}->{\bk}|>{\cb}->{\bk}|---}
\rowcolor{CadetBlue1!60!}\multirowcell{-16}{\colorbox{CadetBlue1!60!}{\rotatebox[origin=c]{90}{{Horizontal}}}} & \multirowcell{-3}{\colorbox{CadetBlue1!60!}{\rotatebox[origin=c]{90}{Gas-Oil}}} & \multirowcell{-3}{Critical Rate} & Joshi & The Equations are for short horizontal wells. They are modifications of the Meyer, Gardner, Pirson method for vertical wells. & \cellcolor{Tan1!50!} Empirical \\
\Xhline{1pt}
\end{tabularx}
\end{table}
\end{document}
答案2
在 ConTeXt 中很容易生成此类表格。作为概念验证,我复制了部分表格。我没有尝试将颜色与示例中给出的颜色进行匹配。
\setuppapersize[A3]
\setupbodyfont[10pt]
\startsetups table:style
\setupTABLE[column][3][width=3cm, align={middle,lohi}]
\setupTABLE[column][4][width=3cm]
\setupTABLE[column][5][width=12cm]
\setupTABLE[column][6][width=2cm]
\setupTABLE[align={lohi}, background=color]
\setupTABLE[row][1][foregroundstyle=bold, align={middle,lohi}, backgroundcolor=gray]
\setupTABLE[row][2,3,4,5,6,7,8,9,10,11][backgroundcolor=yellow]
\stopsetups
\defineframed
[tightbox]
[
align={middle,nothyphenated},
width=fit,
height=fit,
frame=off,
]
\def\rotatebox#1{\rotate{\tightbox{#1}}}
\starttext
\bTABLE[setups=table:style]
\bTR
\bTD \rotatebox{Well~type}\eTD
\bTD \rotatebox{System} \eTD
\bTD Calculated parameter \eTD
\bTD Author \eTD
\bTD Limitation \eTD
\bTD \rotatebox{Equation \\ type} \eTD
\eTR
\bTR
\bTD[ny=10] \rotatebox{Vertical} \eTD
\bTD[ny=8] \rotatebox{Oil-Water~&~Gas-Water} \eTD
\bTD[ny=5] Critical Rate \eTD
\bTD Chaperon \eTD
\bTD For vertical wells, the perforated interval, hp, is very small and the well is perforated at the top of the reservoir for water coning situations. Analytical equations are based on the equilibrium conditions of viscous forces and gravity forces. \eTD
\bTD[backgroundcolor=lightgreen] Analytical \eTD
\eTR
\bTR
\bTD Hoyland et al \eTD
\bTD Equations are based on correlation of computer simulation runs. \eTD
\bTD[backgroundcolor=lightgreen] Empirical \eTD
\eTR
\bTR
\bTD Meyer et al \eTD
\bTD Equations are based on simplified radial flow of oil under it's own gravity head. They are generally less accurate than more rigorous methods. For gas coning, it is assumed that the gas-oil contact is depressed around the wellbore because of radial flow. For simultaneous gas and water coning, the maximum possible oil production rate is calculated assuming an optimum placement of the perforated interval. \eTD
\bTD[backgroundcolor=lightgreen] Analytical \eTD
\eTR
\bTR
\bTD Schols \eTD
\bTD Equations are based on correlation of laboratory experiments. For oil mostly. \eTD
\bTD[backgroundcolor=lightgreen] Empirical \eTD
\eTR
\bTR
\bTD Chirechi \eTD
\bTD Based on the potentiometric theory of Muskat and Wyckoff using and electrical analog model. \eTD
\bTD[backgroundcolor=lightred] Analytical \eTD
\eTR
\bTR
\bTD Post-water breakthrough \eTD
\bTD Kuo & DesBrisay \eTD
\bTD This correlation was developed by investigating the sensitivity of water coning performance to various reservoir parameters using numerical simulation. \eTD
\bTD[backgroundcolor=lightred] Empirical \eTD
\eTR
% and so on.
\eTABLE
\stoptext
其结果如下:
请注意,代码相对干净。唯一的技巧是必须明确使用\rotatebox
宏。通常,只需传递orientation=90
给\bTD
宏就可以了,但由于某种原因,在这种情况下不起作用。我会试着看看为什么会发生这种情况。