0

Cant make it happen guys, the missing line is killing me, any help?

\begin{table}[!htpb] \label{tabela1}
    \centering
    \begin{small} 
        \setlength{\tabcolsep}{3pt} 

        \begin{tabular}{|c|c|c|c|}\hline
            & \multicolumn{2}{c|}{Constante de Velocidade}\\ \cline{2-3} 

            \raisebox{1.5ex}{Função de Ativação} & Valores Iniciais de $k_1$ & Valores Retornados de $k_1$ &    \raisebox{1.5ex}{Energia de Rede}  \\ \hline

            \multirow{3}{4em}{Tangente Hiperbólica} & X & X & X  \\ 
             & 5& X & X  \\ 
             & 6& X & X  \\ \hline
            \multirow{3}{4em}{Sigmóide} & X & X & X  \\ 
            & 5& X & X  \\ 
            & 6& X & X  \\ \hline

        \end{tabular} 
    \end{small}
    \caption{Testes das funções de Ativação da Rede}
    \label{t_cronograma}
\end{table} 
  • 2
    Welcome to TeX.SX! Can you please expand the code snippet that you have posted to a full minimal working example. A MWE should compile and be as small as possible to demonstrate your problem. it's much easier to help you if we have complete code to start from. – Andrew May 4 '17 at 11:55
  • 1
    Could you also describe what output you want. – Andrew Swann May 4 '17 at 11:56
0

Hope the below tag helps your need:

\documentclass{book}
\usepackage{multirow}
\begin{document}

\begin{table}[!htpb] \label{tabela1}
\centering
\begin{small} 
    \setlength{\tabcolsep}{3pt} 
    \begin{tabular}{|c|c|c|c|}\hline
        & \multicolumn{2}{c|}{Constante de Velocidade} &\\ \cline{2-3} 
        \raisebox{1.5ex}{Função de Ativação} & Valores Iniciais de $k_1$ 
        & Valores Retornados de $k_1$ &     \raisebox{1.5ex}{Energia de Rede}
        \\ \hline
        \multirow{3}{4em}{Tangente Hiperbólica} & X & X & X  \\ 
         & 5& X & X  \\ 
         & 6& X & X  \\ \hline
        \multirow{3}{4em}{Sigmóide} & X & X & X  \\ 
        & 5& X & X  \\ 
        & 6& X & X  \\ \hline
    \end{tabular} 
\end{small}
\caption{Testes das funções de Ativação da Rede}
\label{t_cronograma}
\end{table} 
\end{document}
  • small is not an environment but switch to small font size. – Zarko May 4 '17 at 13:54
0

enter image description here

With fully exploit of recent version of multirow package and correct use of command \small:

\documentclass{book}
\usepackage{array, multirow}
\usepackage{ragged2e}

\begin{document}

\begin{table}
\centering
\small
\renewcommand\arraystretch{1.2}
\begin{tabular}{|p{5em}|c|c|>{\Centering}p{5em}|}
    \hline
\multirow{2}{=}{\centering
                Função de Ativação}
    &   \multicolumn{2}{c|}{Constante de Velocidade}    
                    &   \multirow{2}{=}{\centering
                                        Energia de Rede}    \\ 
    \cline{2-3}
    &   Valores Iniciais de $k_1$
        &   Valores Retornados de $k_1$     &               \\ 
    \hline
\multirow{3}{=}{\centering
                Tangente Hiperbólica} 
    &   X   &   X   &   X                                   \\
    &   5   &   X   &   X                                   \\
    &   6   &   X   &   X                                   \\ 
    \hline
\multirow{3}{=}{\centering
                Sigmóide} 
    &   X   &   X   &   X                                   \\
    &   5   &   X   &   X                                   \\
    &   6   &   X   &   X                                   \\ 
    \hline
\end{tabular}
    \caption{Testes das funções de Ativação da Rede}
\label{tabela1}
    \end{table}
\end{document}

You can remove package ragged2e but in this case the columns headers had to be defined as:

\begin{tabular}{|p{5em}|c|c|>{\centering\arraybackslash}p{5em}|}

Alternative solution with use of booktabs for more "professional" (as stated in package documentation) looks:

enter image description here

\documentclass{book}
\usepackage{array, booktabs, multirow}
\usepackage{ragged2e}

\begin{document}

\begin{table} 
\centering
\small
\begin{tabular}{p{5em} c c >{\Centering}p{5em} }
    \toprule
\multirow{2}{=}{\centering
                Função de Ativação}
    &   \multicolumn{2}{c}{Constante de Velocidade $k_1$}    
                    &   \multirow{2}{=}{\centering
                                        Energia de Rede}    \\ 
    \cmidrule(lr){2-3}
    &   Valores Iniciais
        &   Valores Retornados  &                           \\ 
    \midrule
\multirow{3}{=}{\centering
                Tangente Hiperbólica} 
    &   X   &   X   &   X                                   \\
    &   5   &   X   &   X                                   \\
    &   6   &   X   &   X                                   \\ 
    \addlinespace
\multirow{3}{=}{\centering
                Sigmóide} 
    &   X   &   X   &   X                                   \\
    &   5   &   X   &   X                                   \\
    &   6   &   X   &   X                                   \\ 
    \bottomrule
\end{tabular}
    \caption{Testes das funções de Ativação da Rede}
\label{tabela1}
    \end{table}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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