2

I have a table as follows. I want to increase the space between every two braces (I used \renewcommand{\arraystretch}{1.5} but it did not work so well).

\documentclass{article}    

\usepackage{multirow}
\usepackage{makecell}
\begin{document} 
\begin{table}
\begin{tabular}{|l|l|}
    \hline
    \makecell[l]{Objective \\ function}  & Equation of the heuristic information matrix \\
    \hline
    \multirow{3}{*}{1} &    $$
                            OT_{ij} = \left\{
                                \begin{array}{ll}
                                    1 & \forall j=0 \\
                                    \frac{max(1, ES_s-BS_s-(ET_j+ST_j))}{ES_s-BS_s)} & \forall i=0 \\
                                    \frac{max(1, ES_s-BS_s-(max(ET_i+ST_i, ET_j+ST_j)))}{ES_s-BS_s)} & \text{else}
                                \end{array}
                            \right.
                            $$ \\
                       &    $\eta_{ij}^1 = \frac{TW_{ij}}{max(TW_{ij})} + \frac{OT_{ij}}{max(OT_{ij})}$ \\
     \hline
     2                 &    $$
                        \eta_{ij}^2 = \left\{
                            \begin{array}{ll}
                                1 & \forall j=0 \\
                                \frac{\sum_{n \in \mathcal{T}}\sum_{k \in \mathcal{R}}\sum_{s \in \mathcal{S}} \: V_{nks}-\sum_{n \in \mathcal{T}}\sum_{s \in \mathcal{S}} \: V_{nr_js}}{\sum_{n \in \mathcal{T}}\sum_{k \in \mathcal{R}}\sum_{s \in \mathcal{S}} \: V_{nks}} & \forall i=0 \: \text{or} \: V_{irs}=V_{jrs}=1 \\
                                \frac{\sum_{n \in \mathcal{T}}\sum_{s \in \mathcal{S}} \: V_{nr_js}}{\sum_{n \in \mathcal{T}}\sum_{k \in \mathcal{R}}\sum_{s \in \mathcal{S}} \: V_{nks} \times \sum_{n \in \mathcal{T}}\sum_{s \in \mathcal{S}} \: V_{nr_is}} & \text{else}
                            \end{array}
                        \right.
                        $$ \\
     \hline
\end{tabular}
\end{table}
\end{document}

Moreover, I want to number each of these braces (a number in front of each brace), like the below image. Would it be possible to help me?

enter image description here

2
  • Please post a complete code, that we can compile as is. We don't even know which document class you're using.
    – Bernard
    Feb 19, 2021 at 14:34
  • Thanks! Just updated the post. Please let me know if there is anything else that I need to explain.
    – mdslt
    Feb 19, 2021 at 14:38

1 Answer 1

3

With use of the tabularx table, and nccmath and mathtools packages:

\documentclass{article}
\usepackage{geometry}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{lipsum}

\usepackage{nccmath, mathtools}
\usepackage{makecell, multirow, tabularx}

\begin{document}
\lipsum[11]
    \begin{table}[ht]
    \abovedisplayskip=-2pt
    \belowdisplayskip=-2pt
    \renewcommand\tabularxcolumn[1]{m{#1}}
\begin{tabularx}{\linewidth}{|c|>{\fleqn}X<{\endfleqn}|}
    \hline
\makecell[l]{Objective \\ function}  
    &   Equation of the heuristic information matrix    \\
    \hline
\multirow{4.4}{*}{1}   
    &   {\begin{align}
    OT_{ij} & = \begin{dcases}
                1   & \forall j=0 \\
    \frac{\max\bigl(1, ES_s-BS_s-(ET_j+ST_j)\bigr)}{ES_s-BS_s}
                    & \forall i=0 \\
    \frac{\max\Bigl(1, ES_s-BS_s-\bigl(\max(ET_i+ST_i, ET_j+ST_j)\bigr)\Bigr)}{ES_s-BS_s}
                    & \text{else}
              \end{dcases}     \\
\eta_{ij}^1 & = \frac{TW_{ij}}{\max(TW_{ij})} + \frac{OT_{ij}}{\max(OT_{ij})}
        \end{align}}  \\
    \hline
2   &   \begin{equation}
\eta_{ij}^2 = \begin{dcases}
                1   & \forall j=0 \\
    \frac{\sum\limits_{n \in \mathcal{T}}
          \sum\limits_{k \in \mathcal{R}}
          \sum\limits_{s \in \mathcal{S}}  V_{nks} -
          \sum\limits_{n \in \mathcal{T}}
          \sum\limits_{s \in \mathcal{S}} V_{nr_js}}
         {\sum\limits_{n \in \mathcal{T}}
          \sum\limits_{k \in \mathcal{R}}
          \sum\limits_{s \in \mathcal{S}}  V_{nks}}
                    & \forall i=0  \text{ or } V_{irs}=V_{jrs}=1 \\
    \frac{\sum\limits_{n \in \mathcal{T}}
          \sum\limits_{s \in \mathcal{S}} V_{nr_js}}
         {\sum\limits_{n \in \mathcal{T}}
          \sum\limits_{k \in \mathcal{R}}
          \sum\limits_{s \in \mathcal{S}}  V_{nks}
          \times
          \sum\limits_{n \in \mathcal{T}}
          \sum\limits_{s \in \mathcal{S}} V_{nr_is}}
                    & \text{else}
              \end{dcases}
          \end{equation}    \\
    \hline
\end{tabularx}
    \end{table}
\lipsum[12]
\end{document}

enter image description here

(redlines show part of page layout)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .