垂直居中表格中某个单元格的内容

垂直居中表格中某个单元格的内容

在此处输入图片描述我正在用 latex 写一篇研究论文,在格式化表格时遇到了麻烦。我正在制作一个整页表格,但我不知道如何垂直居中某些单元格的内容。这个问题已经被问过好几次了,但我尝试在其他情况下实施所提出的解决方案,但没有任何效果。请查看我的代码及其输出。谢谢!

\documentclass{article} 
\usepackage[utf8]{inputenc}
\usepackage{graphicx} 
\usepackage{blindtext}
\usepackage{multicol}
\usepackage{lipsum}
\usepackage{tikz}
\usepackage{array}
\usepackage{xcolor}
\usepackage{enumitem}
\usepackage[dvipsnames]{xcolor}
\usepackage{float}
\usepackage[table,xcdraw]{xcolor}
\addbibresource{sample.bib}
\usepackage[english]{babel}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage[legalpaper, margin=0.7in]{geometry} 
\geometry{left=2cm,right=2cm,top=2cm,bottom=2cm,columnsep=1cm}
\begin{document}
\begin{table}[htbp]
  \renewcommand{\arraystretch}{1.5}
    \centering
  \caption{Add caption}
  \addlinespace
    \begin{tabular}{p{3.11em}cp{3.52em}p{3.16em}p{2.89em}p{4.945em}p{3.055em}p{3.8em}p{3em}p{2.67em}p{3.4em}}
  \textcolor[rgb]{ 0,  .247,  .361}{\textbf{Author (s)}} & \multicolumn{1}{p{2.72em}}{\textcolor[rgb]{ 0,  .247,  .361}{\textbf{Publi-cation Date}}} & \textcolor[rgb]{ 0,  .247,  .361}{\textbf{Market}} & \textcolor[rgb]{ 0,  .247,  .361}{\textbf{Period Studied}} & \textcolor[rgb]{ 0,  .247,  .361}{\textbf{Input Data}} & \textcolor[rgb]{ 0,  .247,  .361}{\textbf{Predictor Technique}} & \textcolor[rgb]{ 0,  .247,  .361}{\textbf{Best Predictor}} & \textcolor[rgb]{ 0,  .247,  .361}{\textbf{Perfor-mance Metrics }} & \textcolor[rgb]{ 0,  .247,  .361}{\textbf{Trading Strategy}} & \textcolor[rgb]{ 0,  .247,  .361}{\textbf{Causal Relationship}} & \textcolor[rgb]{ 0,  .247,  .361}{\textbf{Profita-bility Metrics}} \\
    \midrule
    \textcolor[rgb]{ 0,  .247,  .361}{\cite{1}} & \textcolor[rgb]{ 0,  .247,  .361}{2021} & \textcolor[rgb]{ 0,  .247,  .361}{American, Forex} & \textcolor[rgb]{ 0,  .247,  .361}{2018-2020} & \textcolor[rgb]{ 0,  .247,  .361}{HPD, 2xTI} & \textcolor[rgb]{ 0,  .247,  .361}{XGBoost} & \textcolor[rgb]{ 0,  .247,  .361}{-} & \textcolor[rgb]{ 0,  .247,  .361}{Accuracy} & \textcolor[rgb]{ 0,  .247,  .361}{Yes} & \textcolor[rgb]{ 0,  .247,  .361}{-} & \textcolor[rgb]{ 0,  .247,  .361}{Yes} \\
    \midrule
    \textcolor[rgb]{ 0,  .404,  .592}{\cite{3}} & \textcolor[rgb]{ 0,  .404,  .592}{2019} & \textcolor[rgb]{ 0,  .404,  .592}{American} & \textcolor[rgb]{ 0,  .404,  .592}{2017-2019} & \textcolor[rgb]{ 0,  .404,  .592}{HPD, TI} & \textcolor[rgb]{ 0,  .404,  .592}{GCN + Graph Based Linear model + ARIMA} & \textcolor[rgb]{ 0,  .404,  .592}{Graph Based Linear model} & \textcolor[rgb]{ 0,  .404,  .592}{MAPE, RMSE, MAE} & \textcolor[rgb]{ 0,  .404,  .592}{-} & \textcolor[rgb]{ 0,  .404,  .592}{Yes} & \textcolor[rgb]{ 0,  .404,  .592}{-} \\
    \end{tabular}
\end{table}[![enter image description here][1]][1]
\end{document}

相关内容