0

Would anyone know why my borders are not appearing properly:

enter image description here

I'm using the following code:

\begin{table}[htp]
    \centering
    \resizebox{\textwidth}{!}{%
    \begin{tabular}{@{}|c|c|c|@{}}
        \toprule
        \rowcolor[HTML]{9B9B9B} 
        Posición & Función & Valores \\ \midrule
        &  & R para un Router \\ \cmidrule(l){3-3} 
        \multirow{-2}{*}{1} & \multirow{-2}{*}{Tipo de Equipo} & S para Switch ó Conmutador \\ \midrule
        2 & Función & Variara dependiendo del equipo \\ \midrule
        4-6 & Localización del Equipo & Tres primeras letras de la localización p. ej. Sevilla: SEV \\ \midrule
        8 & Ordenación de los equipos & Ascendente dependiendo de la fecha de instalación \\ \bottomrule
    \end{tabular}
    }
    \caption{Nomenclatura para Equipos}\label{table:Equipos}
\end{table}

Thank you in advance for you help.

5
  • 3
    You are using the rules from package booktabs which discourages vertical lines in tables. You could see it as a bug, but it is rather a design decision. Better use LaTeX's regular horizontal rules, if you want also vertical rules.
    – Johannes_B
    Feb 4, 2016 at 10:42
  • 1
    If you really need this, then change \aboverulesep and \belowrulesep to get rid of the vertical spacings. I don't recomment it, however
    – user31729
    Feb 4, 2016 at 10:43
  • @Johannes_B so instead of using '\midrule' I should use '\hrule'?
    – Neptune
    Feb 4, 2016 at 10:49
  • \hline and \cline.
    – Johannes_B
    Feb 4, 2016 at 10:50
  • thank you so much both of you for the help. Finally my tables looking as I wanted :D
    – Neptune
    Feb 4, 2016 at 10:57

1 Answer 1

1

Problem ocurred from using booktabs insted of regular horizontal rules. Implementing this change the code will look such as follows:

\begin{table}[htp]
    \centering
    \resizebox{\textwidth}{!}{%
    \begin{tabular}{@{}|c|c|c|@{}}
        \hline
        \rowcolor[HTML]{9B9B9B} 
        Posición & Función & Valores \\ \hline
        &  & R para un Router \\ \cline{3-3} 
        \multirow{-2}{*}{$1$} & \multirow{-2}{*}{Tipo de Equipo} & S para Switch ó Conmutador \\ \hline
        $2$ & Función & Variara dependiendo del equipo \\ \hline
        \numrange{4}{6} & Localización del Equipo & Tres primeras letras de la localización p. ej. Sevilla: SEV \\ \hline
        $8$ & Ordenación de los equipos & Ascendente dependiendo de la fecha de instalación \\ \hline
    \end{tabular}
    }
    \caption{Nomenclatura para Equipos}\label{table:Equipos}
\end{table}

Thank you to @Johannes_B and @Christian Hupfer for their help and answering so quickly.

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