1

Why is the edge is not drawn?

This is the code:

\documentclass[]{article}
    \usepackage[table]{xcolor}

    \begin{document}
    \begingroup
    \def\arraystretch{2.2}%
    \begin{tabular}[]{|p{25mm}|c|c|c|}
      \hline
       \multicolumn{4}{c|}{aaaaa} \\
      \hline
      \rowcolor{cyan}
      1 & 1e-1 & 1e-2 & 1e-2 \\
      \hline
      2 & 1e-1 & 1e-2 & 1e-2 \\
      \hline
      3 & 1e-1 & 1e-2 & 1e-2 \\
      \hline
      4 & 1e-1 & 1e-2 & 1e-2 \\
      \hline
      5 & 1e-1 & 1e-2 & 1e-2 \\
      \hline
    \end{tabular}
    \endgroup
    \end{document}

And the not wanted result (see red circle):

enter image description here

1

You missed adding an leading | in \multicolumn{4}{|c|}{aaaaa} \\.

with the code

\documentclass[]{article}
    \usepackage[table]{xcolor}

    \begin{document}
    \begingroup
    \def\arraystretch{2.2}%
    \begin{tabular}[]{|p{25mm}|c|c|c|}
      \hline
       \multicolumn{4}{|c|}{aaaaa} \\ % <===============================
      \hline
      \rowcolor{cyan}
      1 & 1e-1 & 1e-2 & 1e-2 \\
      \hline
      2 & 1e-1 & 1e-2 & 1e-2 \\
      \hline
      3 & 1e-1 & 1e-2 & 1e-2 \\
      \hline
      4 & 1e-1 & 1e-2 & 1e-2 \\
      \hline
      5 & 1e-1 & 1e-2 & 1e-2 \\
      \hline
    \end{tabular}
    \endgroup
    \end{document}

you get the result:

enter image description here

  • how write in bold font the title? – x-rw Jan 23 at 15:38

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.