0

The numbers are erased when I color the cell, because how do I solve it?

enter image description here

\documentclass[]{article}
\usepackage[table]{xcolor}
\usepackage{multirow}
\usepackage{boldline} 
\begin{document}

    \begingroup
    \def\arraystretch{2.2}%
    \begin{tabular}{V{4}p{10mm}|p{10mm}|p{25mm}|c|c|c|p{25mm}|c|c|cV{4}}
        \hlineB{3}
        \hline
        \rowcolor{blue!20}
        \multirow{2}{*}{1111}   & \multirow{2}{*}{222222} & \multicolumn{4}{V{1}cV{1}}{aaaaa} & \multicolumn{4}{cV{4}}{aaaaa}  \\
%       \hline
    %   \rowcolor{cyan}
    \cellcolor{blue!20}& \cellcolor{blue!20}& \cellcolor{cyan} 1 & \cellcolor{cyan} 1e-1 & \cellcolor{cyan} 1e-2 & \cellcolor{cyan} 1e-2 & \cellcolor{cyan} 1e-1 & \cellcolor{cyan} 1e-2 & \cellcolor{cyan} 1e-2 & \cellcolor{cyan} 1e-2 \\
        \hline
    100&200 & 1 & 1e-1 & 1e-2 & 1e-2 & 1e-1 & 1e-2 & 1e-2 & 1e-2 \\
        \hline
    100&200 & 1 & 1e-1 & 1e-2 & 1e-2 & 1e-1 & 1e-2 & 1e-2 & 1e-2 \\
        \hlineB{4}
    \end{tabular}
    \endgroup


\end{document} 
2

Change the position of the multirow to the last cell:

\documentclass[]{article}
\usepackage[table]{xcolor}
\usepackage{multirow}
\usepackage{boldline} 
\begin{document}

    \begingroup
    \def\arraystretch{2.2}%
    \begin{tabular}{V{4}p{10mm}|p{10mm}|p{25mm}|c|c|c|p{25mm}|c|c|cV{4}}
        \hlineB{3}
        \hline
        \rowcolor{blue!20}
    &  & \multicolumn{4}{V{1}cV{1}}{aaaaa} & \multicolumn{4}{cV{4}}{aaaaa}  \\
        %       \hline
        %   \rowcolor{cyan}
            \multirow{-2}{*}{\cellcolor{blue!20} 1111}   & \multirow{-2}{*}{\cellcolor{blue!20}222222} & \cellcolor{cyan} 1 & \cellcolor{cyan} 1e-1 & \cellcolor{cyan} 1e-2 & \cellcolor{cyan} 1e-2 & \cellcolor{cyan} 1e-1 & \cellcolor{cyan} 1e-2 & \cellcolor{cyan} 1e-2 & \cellcolor{cyan} 1e-2 \\
        \hline
        100&200 & 1 & 1e-1 & 1e-2 & 1e-2 & 1e-1 & 1e-2 & 1e-2 & 1e-2 \\
        \hline
        100&200 & 1 & 1e-1 & 1e-2 & 1e-2 & 1e-1 & 1e-2 & 1e-2 & 1e-2 \\
        \hlineB{4}
    \end{tabular}
    \endgroup


\end{document}

enter image description here

Note that the line on the right-hand side looks too thin. Consider making it thinner by changing

&  & \multicolumn{4}{**V{1}cV{1}**}{aaaaa} & \multicolumn{4}{cV{4}}{aaaaa}  \\

to

&  & \multicolumn{4}{**cV{1}**}{aaaaa} & \multicolumn{4}{cV{4}}{aaaaa}  \\

table with thinner line inside

  • i edited my question with new example please help mee – x-rw Jan 24 '19 at 19:39

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.