0

does any body know how to this kind of coloured boxes in latex? I have tried, but i failed dramatically

enter image description here

  • welcome to TeX.SE! please, show to us, what you tray so far and where you stack. otherwise this is "do-it-for-me" question ... which have low probabilities to be answered. – Zarko Apr 3 '17 at 21:30
  • Relevant tex.stackexchange.com/a/5365/124842 – Bobyandbob Apr 3 '17 at 21:42
  • As a minimum, please provide code that replicates a standard table we can use as foundation... – Werner Apr 3 '17 at 21:56
  • sorry well, before this replay i had try this sequence that i had search in the internet \begin{tcbitemize}[raster columns=4,raster equal height, colframe=red!75!black,colback=red!5!white,fonttitle=\bfseries] \tcbitem[squeezed title={Eventos}] \end{tcbitemize} And work is not bad, the ting is wit this i got 4 separate colored boxes as you can see but i was unable to replicate this one that i wanted. – cristian Apr 5 '17 at 14:50
2

Like this?

[1]: https://i.stack.imgur.com/v224a

MWE:

\documentclass{article}
\usepackage[table]{xcolor} 
\usepackage{tabularx}    
\newcolumntype{C}{>{\centering\arraybackslash}X}

\begin{document}
{   \renewcommand\tabularxcolumn[1]{m{#1}}
    \setlength\arrayrulewidth{1pt}\arrayrulecolor{white}
    \sffamily
    \rowcolors{2}{cyan!20}{cyan!10!gray!20}
\begin{tabularx}{\linewidth}{l|C|C|C}
\rowcolor{cyan!50!gray}
\color{white}   Event           &   \color{white}  Number of Years Ago
                                    &   \color{white}   Number of Days Ago on Calendar
                                        &   \color{white}   Date/Time on calendar   \\
    \hline
xxx                             & y & y & Jan. 1, 12 am     \\
    \hline
xxx xxx xxx xxx xxx xxx xxx xxx & y yy yyy yyyy yyyyy
                                    & y & Jan. 1, 12 am     \\
    \hline
xxx xxx xxx                     &   &   &                   \\
    \hline
xx xxx xxxx xxxxx           &   &   &                   \\
  \end{tabularx}
}
\end{document}

Real content of table and selection desired row colors I left to you :).

  • Thank you very much, sorry for not posting what i ad done. I had other way, but they didn't like what i did. I had four separate coloured boxes one next to the other, that i knew how to do it but i could,'t do what you just did thanks. – cristian Apr 5 '17 at 15:37

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.