Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there any possibility to write "Effects on" directly above "Monitoring Pollution"

Code is:

\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}

Table in wrong structure

share|improve this question
    
Welcome to TeX.SX! –  Adam Liter Apr 11 at 3:04

4 Answers 4

You can add it in the first row itself. Further, you need not use those \begin{flushleft} and friends as this is done with column specifiers themselves.

\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}

enter image description here

Also, you need to use \bm (from bm package) at appropriate places to make the variables bold.

share|improve this answer
    
I've aligned the code of the table of clearify the maening of it; I hope it's okay. –  Svend Tveskæg Apr 2 at 14:07
    
@SvendTveskæg Thank you. Really appreciated. :) –  Harish Kumar Apr 2 at 14:08
    
Thank you, Harish! –  user49042 Apr 2 at 14:11
    
The documentation of amsbsy (which provides \boldsymbol) says “Note: It is recommended nowadays to use the bm package, which became available in 1997.” –  egreg Apr 2 at 15:35
    
@egreg OK, I changed. amsmath has become a habit for me. Hence the usage. Thanks. –  Harish Kumar Apr 2 at 16:03

Here's a MWE based on 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}
share|improve this answer

The \begin{flushleft} code is not appropriate here. Instead, just use a l/left column specifier.

You can make the "Effects on" text center above the second and third columns by using \multicolumn{2}{c}{\textbf{Effects on}} as shown below.

\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}

table

share|improve this answer

Several points: I dispensed with the flushing environments, and used the l specifier of tabular to achieve it. Also, I included your first line (Effects on)as a row in the tabular, but I used an rlap to avoid requiring some sort of multi-column approach. I also set a group-limited {\itshape ...} before entering tabular, but moved the parens inside of math mode to keep them upright. Finally, I removed the extraneous \textbf{} which served no purpose.

\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}

enter image description here

share|improve this answer
    
Thank you, Steven B. Segletes! –  user49042 Apr 2 at 14:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.