1

I want to represent this in latex:

I have tried to replicate it, but I can't find the way to make those "sub-tables", any help is useful!

    \documentclass[10pt]{article}
\usepackage[spanish]{babel}
\usepackage{amsmath, amssymb, amsthm, tikz}
\usepackage[margin=1in]{geometry}
\usepackage[shortlabels]{enumitem}
\usetikzlibrary{babel}

\begin{document}
    \begin{center}

\begin{table}[!h]
        \centering
        
\begin{tabular}{|p{0.25\textwidth}|p{0.25\textwidth}|p{0.25\textwidth}|p{0.25\textwidth}|}
\hline 
 Importa el orden & Estan todos & Se repiten & Formula \\
\hline 
 Si & 

\begin{tabular}{|p{0.99\textwidth}|}
\hline 
 No \\
\hline 
 Si \\
 \hline
\end{tabular} & 

\begin{tabular}{|p{0.99\textwidth}|}
\hline 
 No \\
\hline 
 Si \\
\hline 
 No \\
\hline 
 Si \\
 \hline
\end{tabular} & 

\begin{tabular}{|p{0.99\textwidth}|}
\hline 
 $\displaystyle A_{n}^{m} =\frac{m!}{( m-n) !}$ \\
\hline 
 $\displaystyle AR_{n}^{m} =m^{n}$ \\
\hline 
 $\displaystyle P_{n} =n!$ \\
\hline 
 $\displaystyle PR_{n}^{\alpha _{1} ,\alpha _{2} ,.\dotsc ,\alpha _{m}} =\frac{m!}{\alpha _{1} !\alpha _{2} !\dotsc \alpha _{m} !}$ \\
 \hline
\end{tabular} \\
\hline 
 No &  & 

\begin{tabular}{|p{0.99\textwidth}|}
\hline 
 No \\
\hline 
 Si \\
 \hline
\end{tabular} & 

\begin{tabular}{|p{0.99\textwidth}|}
\hline 
 $\displaystyle \mathbb{C}_{n}^{m} =\frac{m!}{( m-n) !n!}$ \\
\hline 
 $\displaystyle \mathbb{C} R=\mathbb{C}_{n}^{m+n-1}$ \\
 \hline
\end{tabular} \\
 \hline
\end{tabular}
        
        \end{table}
\end{center}

\end{document}
2
  • I usually use this website to generate tables graphically, where you can quickly create custom tables and get the code in Latex. I hope it helps. Mar 27, 2022 at 5:23
  • One should never enclose a table or figure environment in a center environment`.
    – Mico
    Mar 27, 2022 at 8:31

1 Answer 1

1

I used the multirow package and some cline's to simulate the "subtables" you referred to.

Here's my code

\documentclass[10pt]{article}
\usepackage[spanish]{babel}
\usepackage{amsmath, amssymb, amsthm, tikz}
\usepackage[margin=1in]{geometry}
\usepackage[shortlabels]{enumitem}
\usetikzlibrary{babel}
\usepackage{multirow}

\begin{document}
\begin{table}[!h] \centering
\begin{tabular}{|c|c|c|c|}\hline
    Importa el orden & Están todos & Se repiten & Ta. To. Tabulado \\\hline
    \multirow{4}{*}{Sí} & \multirow{2}{*}{No} & No & $ A_n^m = \frac{m!}{(m-n)!}$\\\cline{3-4}
    && Sí& $ AR_n^m = m^n$\\\cline{2-4}
    &\multirow{2}{*}{Sí} & No & $ P_n = n!$\\\cline{3-4}
    & & Sí&$ PR_n^{\alpha_1, \alpha_2, \cdots, a_m} = \frac{n!}{\alpha_1!\alpha_2!\cdots\alpha_m!}$\\\hline
    \multirow{2}{*}{No} &  & No & $ \mathbb{C}_n^m = \frac{n!}{m!(n-m)!}$\\\cline{3-4}
    && Sí & $\mathbb{C}R_n^m = \mathbb{C}^{m+n-1}_{n}$\\\hline
\end{tabular}
\end{table}
\end{document}

Finshed table

You must log in to answer this question.

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