我怎样才能画出这张表格

我怎样才能画出这张表格

有没有可能在“监测污染”上方直接写上“影响”

代码为:

\textbf{Effects on} \newline 
\begin{tabular}{c c c}
\begin{flushleft}
\textbf{Small increases in \end{flushleft}} & \textbf{Monitoring} & \textbf{Pollution} \\
\textbf{} & \textbf{($\mu)$} & \textbf{($w$)} \\
\begin{flushleft}Reward of inspector, $r$ \end{flushleft} & Ambigous & Lower \\
\begin{flushleft}Penalty on inspector for taking bribe, $p_t$ \end{flushleft} & Lower &  Ambigous \\
\begin{flushleft}Penalty on factory for givin bribe, $p_g$ \end{flushleft} & Lower & Ambigous \\
\end{tabular}

表格结构错误

答案1

您可以将其添加到第一行本身。此外,您不需要使用这些\begin{flushleft}和朋友,因为这是通过列说明符本身完成的。

\documentclass{article}
\usepackage{bm}

\begin{document}

\begin{tabular}{lcc}
                                             & \multicolumn{2}{c}{\textbf{Effects on}}   \\
\textbf{Small increases in}                  & \textbf{Monitoring}  & \textbf{Pollution} \\
                                             & ($\bm{\mu}$)         & ($\bm{w}$)     \\
Reward of inspector, $r$                     & Ambigous             & Lower              \\
Penalty on inspector for taking bribe, $p_t$ & Lower                & Ambigous           \\
Penalty on factory for givin bribe, $p_g$    & Lower                & Ambigous           \\
\end{tabular}

\end{document}

在此处输入图片描述

此外,您需要使用\bm(来自bm您可以在适当的位置添加或删除任何变量(例如,包)以使变量变为粗体。

答案2

以下是MWE基于的multicolumn

\documentclass{article}
\usepackage{bm}

\begin{document}
\begin{tabular}{lcc}
    & \multicolumn{2}{c}{\bfseries Effect on}\\
    \bfseries Small increases in & \bfseries Monitoring & \bfseries Pollution \\
    & $(\bm{\mu})$ & $(\bm{w})$ \\
    Reward of inspector, $r$ & Ambiguous & Lower \\
    Penalty on inspector for taking bribe, $p_t$ & Lower &  Ambiguous \\
    Penalty on factory for giving bribe, $p_g$ & Lower & Ambiguous \\
\end{tabular}
\end{document}

答案3

\begin{flushleft}代码在这里不合适。相反,只需使用l/left 列说明符即可。

\multicolumn{2}{c}{\textbf{Effects on}}您可以使用如下所示的方式使“效果”文本位于第二列和第三列上方的中心。

\documentclass[]{article}

\begin{document}

\begin{tabular}{l c c}
   &  \multicolumn{2}{c}{\textbf{Effects on}} \\
\textbf{Small increases in\ldots} & \textbf{Monitoring} & \textbf{Pollution} \\
   & ($\mu)$ & \textbf{($w$)} \\
Reward of inspector, $r$  & Ambigous & Lower \\
Penalty on inspector for taking bribe, $p_t$  & Lower &  Ambigous \\
Penalty on factory for givin bribe, $p_g$  & Lower & Ambigous \\
\end{tabular}

\end{document}

桌子

答案4

几点:我放弃了刷新环境,并使用了l说明符tabular来实现它。另外,我将你的第一行(Effects on)作为一行包含在内tabular,但我使用了以避免需要某种多列方法。我还在输入之前rlap设置了一个组限制,但将数学模式内的括号移到了数学模式中以保持它们直立。最后,我删除了毫无用处的无关内容。{\itshape ...}tabular\textbf{}

\documentclass{article}
\begin{document}
{\itshape
\begin{tabular}{l c c}
&\rlap{\textbf{~~Effects on}}& \\
\textbf{Small increases in } & \textbf{Monitoring} & \textbf{Pollution} \\
& $(\mu)$ & $(w)$ \\
Reward of inspector, $r$  & Ambigous & Lower \\
Penalty on inspector for taking bribe, $p_t$  & Lower &  Ambigous \\
Penalty on factory for givin bribe, $p_g$ & Lower & Ambigous \\
\end{tabular}}
\end{document}

在此处输入图片描述

相关内容